Search

CN-121984977-A - Block chain-based secure smart grid communication method and system

CN121984977ACN 121984977 ACN121984977 ACN 121984977ACN-121984977-A

Abstract

The invention relates to the technical field of blockchain, in particular to a secure smart grid communication method and system based on blockchain. The invention firstly provides a dynamic updating algorithm for efficiently processing the addition and deletion changes of the power grid nodes and optimizing the selection and communication paths of the nodes in the subareas, secondly provides a dynamic load balancing intelligent contract method and a multi-level state channel method so as to realize efficient communication and dynamic adjustment between the nodes in the same subarea and the cross subareas and ensure the stability of the network under different load conditions, and finally provides a privacy protection multiparty calculation method of the encryption vector space, which ensures the privacy safety in the power grid transaction and the data processing and realizes the safe calculation and verification of multiparty data on the premise of not revealing privacy.

Inventors

  • HAN YI
  • HUANG JUN
  • GAO LU

Assignees

  • 韩毅

Dates

Publication Date
20260505
Application Date
20251226

Claims (10)

  1. 1. A blockchain-based secure smart grid communication method, comprising: partitioning the block chain nodes according to administrative grades, wherein the partition comprises a primary partition and a secondary partition; Traversing all the blockchain nodes in the secondary partition, calculating the total distance from each blockchain node to other blockchain nodes in the same partition, selecting the blockchain node with the minimum total distance in the secondary partition as a secondary partition optimal node, and forwarding a secondary partition adjacency matrix to other blockchain nodes in the same partition by the secondary partition optimal node; If the secondary partition is newly added or deleted, a dynamic updating algorithm is used for reselecting a second area optimal node, updating the secondary partition adjacent matrix and forwarding again; Traversing all the common nodes in the primary partition by taking the secondary partition optimal node as the common node of the primary partition, calculating the total distance from each common node to other common nodes in the same partition, selecting the common node with the minimum total distance as the primary partition optimal node, and forwarding a primary partition adjacency matrix to other common nodes in the same partition by the primary partition optimal node; if any common node information is updated, the total distance from each common node to other common nodes is recalculated, the optimal node of the first-level partition is selected, the first-level partition adjacent matrix is updated, and the first-level partition adjacent matrix is forwarded again.
  2. 2. The blockchain-based secure smart grid communication method of claim 1, wherein the administrative level is divided into a provincial administrative area and a territory administrative area, the blockchain link points comprise grids, micro-grids and virtual power plants, the primary partition is divided in the provincial administrative area and comprises a plurality of secondary partitions, and the secondary partition is divided in the territory administrative area and comprises all blockchain nodes in the territory administrative area.
  3. 3. The method for secure smart grid communication based on blockchain as in claim 1, wherein the obtaining of the secondary partition adjacency matrix comprises: initializing a secondary partition optimal node and a secondary partition adjacency matrix, randomly selecting a block chain node in a secondary partition, and establishing a distance matrix from the block chain node to other block chain nodes in the same partition; Calculating the total distance from the blockchain node to other blockchain nodes in the same partition, recording the total distance of the blockchain node as the shortest distance, and updating the secondary partition optimal node and the secondary partition adjacency matrix based on the blockchain node; Taking the blockchain node as a root node, traversing other blockchain nodes of the same partition in breadth first, calculating the total distance from each blockchain node to other blockchain nodes in the same partition, if the total distance corresponding to the traversed blockchain link point is smaller than the shortest distance, updating the secondary-partition optimal node and the secondary-partition adjacent matrix, otherwise, skipping the node; And obtaining a secondary-partition optimal node and a secondary-partition adjacency matrix, and forwarding the secondary-partition adjacency matrix to other blockchain nodes in the same partition by the secondary-partition optimal node.
  4. 4. The blockchain-based secure smart grid communication method of claim 1, wherein the dynamic update algorithm includes incremental and local updates; The incremental updating comprises the steps of expanding the secondary partition adjacent matrix, initializing the distance between a newly-increased node and all other blockchain nodes to be positive infinity, updating the corresponding distance between the newly-increased node and the two nodes in the secondary partition adjacent matrix, updating the distance only for the paths related to the newly-increased node, updating the existing shortest distance if the sum of the updated path distances is smaller than the existing shortest distance, repeating the distance updating until all the blockchain nodes finish updating, reselecting the blockchain node corresponding to the existing shortest distance as the secondary partition optimal node, updating the secondary partition adjacent matrix and forwarding again; The local updating comprises the steps of removing rows and columns related to nodes to be deleted from the secondary-stage area adjacent matrix to generate a new matrix, updating the existing shortest distance only for paths related to the nodes to be deleted, if the sum of updated path distances is smaller than the existing shortest distance, repeating the distance updating until all the block chain link points are updated, reselecting the block chain node corresponding to the existing shortest distance as a second area optimal node, updating the secondary-stage area adjacent matrix and forwarding again.
  5. 5. The blockchain-based secure smart grid communication method of claim 1, wherein the common node is updated with information when at least one of the secondary-partition optimal node, the secondary-partition adjacency matrix, and the minimum total distance is updated.
  6. 6. The blockchain-based secure smart grid communication method of claim 1, further comprising: Communication among the block chain nodes is realized, communication is carried out in the same partition by a dynamic load balancing intelligent contract method, and communication is carried out among different partitions by a multi-level state channel method; the dynamic load balancing intelligent contract method comprises the following steps: Initializing an intelligent contract, and setting an initial state, a load threshold value, an execution period and a time stamp of a node; periodically collecting and updating real-time data of the nodes for subsequent analysis and dynamic adjustment; according to the real-time data, automatically identifying a load abnormal node, and dynamically adjusting the load abnormal node; analyzing historical data, and optimizing current and future load distribution strategies according to past operation performances of the system; When the load is abnormal or the node fails, an alarm is automatically generated and related personnel are notified, so that the system can quickly respond and intervene under the abnormal condition; The multi-level state channel comprises: The representative nodes in different partitions perform handshake through the dynamic load balancing intelligent contract, and a temporary state channel is established; the representative node exchanges data in the channel, and all communication data are transmitted after digital signature and verification; in the data exchange process, the representative node continuously updates the state in the channel and confirms the signature; After the data exchange is completed, the representative node sends the final state to a blockchain for settlement, verifies all state updates through the dynamic load balancing intelligent contract, records the settlement result on the chain, and closes the channel.
  7. 7. The blockchain-based secure smart grid communication method of claim 6, further comprising: The privacy protection multiparty computing method based on the encryption vector space among the blockchain nodes carries out transactions, and the privacy protection multiparty computing method of the encryption vector space comprises the following steps: each participant converts own original data into vectors, and encrypts the vectors by using a homomorphic encryption algorithm to obtain encrypted vectors; under the framework of homomorphic encryption, the system performs addition and multiplication operations on the encryption vector; Each encryption vector is added with a random noise vector in the calculation process to generate a noise encryption vector; The noise encryption vectors of all the participants are integrated into a matrix, and the matrix operation is carried out with another encryption matrix; after the calculation is completed, a decryption result is obtained by a decryption function, and in order to eliminate the influence of noise on the calculation result, the noise accumulation amount is subtracted from the decryption result.
  8. 8. A blockchain-based secure smart grid communication system, comprising: the intelligent partition module is used for partitioning the blockchain nodes according to administrative grades and comprises a first-level partition and a second-level partition; The secondary partition operation and maintenance module is used for traversing all the blockchain nodes in the secondary partition, calculating the total distance from each blockchain node to other blockchain nodes in the same partition, selecting the blockchain node with the minimum total distance in the secondary partition as a secondary partition optimal node, and forwarding a secondary partition adjacent matrix to other blockchain nodes in the same partition by the secondary partition optimal node; The first-level partition operation and maintenance module is used for taking the second-level partition optimal node as the common node of the first-level partition, traversing all the common nodes in the first-level partition, calculating the total distance from each common node to other common nodes in the same partition, selecting the common node with the minimum total distance as the first-level partition optimal node, forwarding a first-level partition adjacent matrix to other common nodes in the same partition by the first-level partition optimal node, if any common node information is updated, recalculating the total distance from each common node to other common nodes, selecting the first-level partition optimal node, updating the first-level partition adjacent matrix and forwarding again.
  9. 9. The blockchain-based secure smart grid communication system of claim 8, further comprising: the node communication module comprises a same-partition communication module and a cross-partition communication module and is used for realizing communication among the blockchain nodes; The same-partition communication module is used for communicating in the same partition through a dynamic load balancing intelligent contract method, and the dynamic load balancing intelligent contract method comprises the following steps: Initializing an intelligent contract, and setting an initial state, a load threshold value, an execution period and a time stamp of a node; periodically collecting and updating real-time data of the nodes for subsequent analysis and dynamic adjustment; according to the real-time data, automatically identifying a load abnormal node, and dynamically adjusting the load abnormal node; analyzing historical data, and optimizing current and future load distribution strategies according to past operation performances of the system; When the load is abnormal or the node fails, an alarm is automatically generated and related personnel are notified, so that the system can quickly respond and intervene under the abnormal condition; The cross-partition communication module is used for communicating between different partitions through a multi-level state channel method, and the multi-level state channel comprises: The representative nodes in different partitions perform handshake through the dynamic load balancing intelligent contract, and a temporary state channel is established; the representative node exchanges data in the channel, and all communication data are transmitted after digital signature and verification; in the data exchange process, the representative node continuously updates the state in the channel and confirms the signature; After the data exchange is completed, the representative node sends the final state to the blockchain for settlement, verifies all state updates through the dynamic load balancing intelligent contract, records the settlement result on the chain, and closes the channel at the same time.
  10. 10. The blockchain-based secure smart grid communication system of claim 9, further comprising: The node transaction module is used for carrying out transactions between the blockchain nodes based on a privacy protection multiparty computing method of an encryption vector space, and the privacy protection multiparty computing method of the encryption vector space comprises the following steps: each participant converts own original data into vectors, and encrypts the vectors by using a homomorphic encryption algorithm to obtain encrypted vectors; under the framework of homomorphic encryption, the system performs addition and multiplication operations on the encryption vector; Each encryption vector is added with a random noise vector in the calculation process to generate a noise encryption vector; The noise encryption vectors of all the participants are integrated into a matrix, and the matrix operation is carried out with another encryption matrix; after the calculation is completed, a decryption result is obtained by a decryption function, and in order to eliminate the influence of noise on the calculation result, the noise accumulation amount is subtracted from the decryption result.

Description

Block chain-based secure smart grid communication method and system Technical Field The invention relates to the technical field of blockchain, in particular to a secure smart grid communication method and system based on blockchain. Background The power grid is one of key infrastructures depending on operation in modern society and is a comprehensive system for connecting all links of power generation, power transmission, power distribution and power utilization. The power generation system realizes the transmission and distribution of electric energy from the power generation end to the user end through a physical power line and various power equipment, and ensures the stable supply and efficient utilization of power resources. The power grid communication is used as a core tie for information exchange and instruction transmission between all links in the power grid, and is a key technical means for supporting safe, stable and efficient operation of the power grid. The blockchain technology is used as a decentralized distributed ledger technology, and is gradually applied to various industries by virtue of the advantages of transparency, non-falsification, decentralization, traceability and the like of data. Especially in the field of power communication, the blockchain technology can carry out transparent and safe management and sharing on data of each link of power generation, transmission, distribution and power utilization in a power system through a safe point-to-point network structure. The blockchain technology applied to the power communication system still has the defects in terms of intelligence and safety. Although partial power systems introduce a Pow consensus algorithm for block chain partitioning, the level of intellectualization of the Pow consensus algorithm is not perfect enough, and an effective operation and maintenance strategy is lacking when block chain link point information is updated. In addition, the existing system often lacks sufficient security when processing communication and transaction between nodes in the same partition or across partitions, and sensitive information is easy to leak. Therefore, a safe smart grid communication method and system based on block chains are provided. Disclosure of Invention The invention aims to provide a safe intelligent power grid communication method and system based on a blockchain so as to realize the intellectualization, safety and high efficiency in the power grid communication process. In order to solve the problems in the prior art, the invention firstly provides a dynamic updating algorithm for efficiently maintaining the topology change of the power grid nodes, secondly provides a dynamic load balancing intelligent contract method and a multi-level state channel method so as to ensure efficient communication and dynamic adjustment between nodes in the same partition and across partitions, and finally provides a privacy protection multiparty computing method of an encryption vector space so as to ensure privacy security in power grid transaction and data processing. In order to achieve the above purpose, the present invention provides the following technical solutions: A blockchain-based secure smart grid communication method, comprising: partitioning the block chain nodes according to administrative grades, wherein the partition comprises a primary partition and a secondary partition; Traversing all the blockchain nodes in the secondary partition, calculating the total distance from each blockchain node to other blockchain nodes in the same partition, selecting the blockchain node with the minimum total distance in the secondary partition as a secondary partition optimal node, and forwarding a secondary partition adjacency matrix to other blockchain nodes in the same partition by the secondary partition optimal node; If the secondary partition is newly added or deleted, a dynamic updating algorithm is used for reselecting a second area optimal node, updating the secondary partition adjacent matrix and forwarding again; Traversing all the common nodes in the primary partition by taking the secondary partition optimal node as the common node of the primary partition, calculating the total distance from each common node to other common nodes in the same partition, selecting the common node with the minimum total distance as the primary partition optimal node, and forwarding a primary partition adjacency matrix to other common nodes in the same partition by the primary partition optimal node; if any common node information is updated, the total distance from each common node to other common nodes is recalculated, the optimal node of the first-level partition is selected, the first-level partition adjacent matrix is updated, and the first-level partition adjacent matrix is forwarded again. Further, the administrative level is divided into a provincial administrative area and a ground administrative area, the block chain link points comp