CN108718344A - A kind of electric network data storage method and distributed power grid data-storage system - Google Patents
A kind of electric network data storage method and distributed power grid data-storage system Download PDFInfo
- Publication number
- CN108718344A CN108718344A CN201810596311.7A CN201810596311A CN108718344A CN 108718344 A CN108718344 A CN 108718344A CN 201810596311 A CN201810596311 A CN 201810596311A CN 108718344 A CN108718344 A CN 108718344A
- Authority
- CN
- China
- Prior art keywords
- data
- node
- data storage
- slave
- nodes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013500 data storage Methods 0.000 title claims abstract description 153
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000007246 mechanism Effects 0.000 claims description 14
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 238000013524 data verification Methods 0.000 claims description 12
- 230000009471 action Effects 0.000 claims description 9
- 238000004891 communication Methods 0.000 claims description 8
- 230000008447 perception Effects 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 9
- 238000012550 audit Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000001915 proofreading effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000013480 data collection Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/126—Applying verification of the received information the source of the received data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1051—Group master selection mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A kind of electric network data storage method of offer of the embodiment of the present invention and distributed power grid data-storage system, the electric network data storage method is a kind of data storage scheme for the decentralization realized based on block chain technology, the Centroid being susceptible in existing centralization electric network data storage scheme can effectively be avoided by the risk of centralized malicious attack, improve the safety of data storage.
Description
Technical Field
The invention relates to the technical field of intelligent power grid data storage, in particular to a power grid data storage method and a distributed power grid data storage system.
Background
In a traditional smart power grid, a wireless sensing node monitors the operation of power grid equipment in real time, and uploads collected power grid data to a trusted central node regularly through a neighboring data collection base station for power grid data storage and sharing, but the centralized storage mode easily causes the problem that the central node is attacked maliciously to cause node failure or the problem of information security such as intentionally tampered stored data.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a power grid data storage method and a distributed power grid data storage system, so as to improve the above problems.
In one aspect, a preferred embodiment of the present invention provides a power grid data storage method, which is applied to a distributed power grid data storage system, where the distributed data storage system includes a plurality of data storage nodes and data sensing nodes corresponding to the data storage nodes one to one, and the data storage nodes are connected in communication with each other, and the power grid data storage method includes:
each data storage node calculates respective workload certification based on a workload certification mechanism, the data storage node which calculates the workload certification at the fastest speed serves as a main node, and other data storage nodes serve as slave nodes;
the master node generates a data set according to the power grid data acquired by the data sensing nodes and broadcasts the data set and the workload to each slave node;
each slave node verifies whether the master node meets preset storage requirements or not based on a consensus algorithm and the received data sets and workloads;
when each slave node recognizes that the master node meets preset storage requirements, the master node integrates the data set into a data block and broadcasts the data block to each slave node for storage.
Further, each slave node saves the received data block, including:
and the slave node extracts the encrypted hash value contained in the data block and links the data block to a corresponding data block in a stored block chain according to the encrypted hash value so as to save the data block.
Further, the step of verifying whether the master node meets the preset storage requirement by each slave node based on a consensus algorithm and the received data set and workload comprises:
each slave node checks the validity and correctness of the data set according to the block hash value included in the data set and the workload and the digital signature of the master node;
each slave node signs the respective data verification result and broadcasts the signed data verification result to other slave nodes except the slave node;
each slave node compares the received data examination results sent by other slave nodes with the data examination results of the slave node and sends the comparison results to the master node for summarizing;
and the master node judges whether each slave node recognizes that the slave node meets the preset storage requirement according to the summary result.
Further, the step of the master node determining whether each slave node approves the validity and correctness of the data block according to the summary result includes:
and the master node counts whether the number of the slave nodes which accept the legality and the correctness of the data block reaches a preset number, and if so, the master node judges that each slave node recognizes that the slave node meets a preset storage requirement.
Further, the power grid data storage method further comprises the following steps:
the data sensing node acquires power grid data according to a preset time interval and sends an acquisition result to the data storage node for caching; or/and
and the data perception node acquires power grid data and sends an acquisition result to the data storage node for caching when detecting an electric charge payment action initiated by a user.
Further, before the step of selecting a data storage node, which calculates a workload proof fastest from the data storage nodes based on a workload proof mechanism, as a master node is performed, the method further includes:
acquiring node sharing configuration parameters;
and configuring the nodes based on the configuration parameters, and taking the configured nodes as data storage nodes in the distributed power grid data storage system.
On the other hand, a preferred embodiment of the present invention further provides a distributed power grid data storage system, where the distributed power grid data storage system includes a plurality of data storage nodes and data sensing nodes corresponding to the data storage nodes one to one, and the data storage nodes are in communication connection with each other;
each data perception node is respectively used for acquiring power grid data according to a preset time interval and sending an acquisition result to a corresponding data storage node for caching; or/and
the data perception node is used for acquiring power grid data and sending an acquisition result to the corresponding data storage node for caching when an electric charge payment action initiated by a user is detected;
each data storage node is used for calculating respective workload certification based on a workload certification mechanism, the data storage node which calculates the workload certification most quickly is used as a master node, and other data storage nodes are used as slave nodes; wherein,
the master node is used for generating a data set according to the power grid data acquired by the data sensing node and broadcasting the data set and the workload to each slave node;
each slave node is used for verifying whether the master node meets a preset storage requirement or not based on a consensus algorithm and the received data set and workload;
when each slave node recognizes that the master node meets preset storage requirements, the master node is used for integrating the data set into a data block and broadcasting the data block to each slave node for storage.
Further, the slave node is specifically configured to extract a cryptographic hash value included in the data block, and link the data block to a corresponding data block in a stored block chain according to the cryptographic hash value, so as to save the data block.
Further, each slave node is specifically configured to check the validity and correctness of the data set according to the block hash value included in the data set and the workload and the digital signature of the master node; signing the respective data verification results, and broadcasting the signed data verification results to other slave nodes except the slave nodes; comparing the received data examination results sent by other slave nodes with the data examination results of the slave nodes, and sending the comparison results to the master node for summarizing;
and the master node is specifically used for judging whether each slave node agrees to meet the preset storage requirement according to the summary result.
Further, the master node is specifically configured to count whether the number of slave nodes that deny the validity and the correctness of the data block reaches a preset number, and if so, determine that each slave node recognizes itself to meet a preset storage requirement.
Compared with the prior art, the embodiment of the invention provides a power grid data storage method and a distributed power grid data storage system, the power grid data storage method is a decentralized distributed data storage scheme realized based on a block chain technology, does not depend on a globally credible third party entity, and adopts an end-to-end communication mode among nodes, so that the risk that a central node is subjected to centralized malicious attack easily appearing in the conventional centralized power grid data storage scheme is effectively avoided, and the safety of data storage is improved. Meanwhile, the decentralized distributed power grid data storage system provided by the invention has good expandability and reliability.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic system structure diagram of a distributed power grid data storage system according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of a power grid data storage method according to an embodiment of the present invention.
Fig. 3 is a sub-flowchart of step S12 shown in fig. 2.
Fig. 4 is another schematic flow chart of the power grid data storage method according to the embodiment of the present invention.
Icon: 10-distributed grid data storage system; 11-data aware nodes; 12-data storage node.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
As shown in fig. 1, which is a schematic structural diagram of a distributed power grid data storage system 10 according to a preferred embodiment of the present invention, the distributed power grid data storage system 10 includes a plurality of data storage nodes 12 and data sensing nodes 11 corresponding to the data storage nodes 12 one to one, and the data storage nodes 12 are connected in communication with each other.
The data sensing node 11 is configured to collect power consumption data of a user, encrypt a collection result, and send the encrypted collection result to the corresponding data storage node 12, where the power consumption data may be, but is not limited to, power consumption degrees, payment details, and the like. Optionally, the data-aware node 11 may be, but is not limited to, a smart meter or the like.
The data storage node 12 is configured to store the power consumption data and the like acquired by the data sensing node 11 in a block chain manner, and the power consumption data value stored in the data storage node 12 may include a pseudonym, a data type, metadata and the like of data sensing, so that a user can query the power consumption data and payment records of the user at any time. Alternatively, the data storage node may be, but is not limited to, a router, a server, a computer, etc.
In this embodiment, each data storage node 12 in the distributed power grid data storage system 10 is equivalent to a public ledger, and parameters such as sharing conditions, duration, times and the like may be set between the data storage nodes 12 in an intelligent contract manner, so as to automatically perform sharing, secure access and the like of data between the nodes. In addition, the distributed power grid data storage system 10 provided in the present embodiment is a decentralized storage system, and has good scalability and reliability.
Further, based on the description of the distributed power grid data storage system 10, as shown in fig. 2, an embodiment of the present invention provides a power grid data storage method, which is applied to the distributed power grid data storage system 10, and specific processes and steps of the power grid data storage method will be described in detail below with reference to fig. 2. It should be noted that the application switching method provided by the embodiment of the present invention is not limited by the specific sequence shown in fig. 2 and described below.
Step S10, each data storage node 12 calculates its own workload proof based on a workload proof mechanism, and the data storage node 12 that calculates the workload proof most quickly serves as a master node, and the other data storage nodes 12 serve as slave nodes;
step S11, the master node generates a data set according to the grid data collected by the data sensing node 11, and broadcasts the data set and the workload to each slave node;
step S12, each slave node verifies whether the master node meets the preset storage requirement based on a consensus algorithm and the received data set and workload;
step S13, when each slave node recognizes that the master node meets the preset storage requirement, the master node integrates the data set into a data block, and broadcasts the data block to each slave node for storage.
In this embodiment, the power grid data storage method provided in steps S10 to S13 implements distributed storage of power grid data based on a workload certification mechanism and a consensus algorithm in a blockchain technique, where each data storage node 12 serves as a public "ledger" to perform data storage, and compared with the prior art, the method does not depend on a trusted storage node to perform data storage, that is, decentralized data storage, and can effectively avoid the risk that a central node, which is easy to appear in the existing centralized power grid data storage scheme, is subjected to centralized malicious attack, thereby improving the security of data storage.
In detail, in step S10, the Proof of workload (POW) mechanism is a master node used when selecting the consensus operation process from the data storage nodes 12, for example, each data storage node 12 competes for finding a valid Proof of workload to try to record the current data block, and the node that finds the valid Proof of workload the fastest will obtain a certain amount of rewards, and is responsible for auditing the grid data to be stored and building them into a new data block on the data storage block chain. The workload certification refers to calculating an encrypted hash value of a data block to be currently stored according to a random number x and numerical values such as a hash value timestamp and a merkel root value of a last block in a block chain, and the data storage node 12 which calculates the random number x at first serves as a master node and broadcasts a data set to be currently stored and a calculated workload (PoW) to other data aggregators (slave nodes) so as to audit and check. Specifically, in the present embodiment, the calculation process of the workload proving mechanism includes the following processes.
(1) Constructing a data block, forming transaction information to be written into the data block into a transaction list, and generating Merkle root hash from the transaction list information through a Merkle tree algorithm;
(2) assembling related fields such as Merkle root hash, difficulty value and the like into a block head, and inputting the block head as data proved by workload;
(3) and (3) changing the random number at the head of the block, namely the numerical value of the nonce, continuously adopting SHA256 operation after changing, comparing the operation result with the preset value, and if the operation result is smaller than the preset value, finishing the work load certification.
It should be noted that, in the present embodiment, based on the frame technology of the tile chain, each tile header includes three Merkle trees, and the three Merkle trees respectively correspond to three objects, namely Transactions (Transactions), receipts (accept), and status (State).
In step S11, the data set is that the data storage node 12 receives the power consumption data, such as power consumption degrees, payment data, and the like, collected and uploaded by the corresponding data sensing node 11, and stores the safe and effective power grid data in its local storage. When the stored power grid data reaches preset requirements (such as data size, storage duration and the like), the data storage node 12 integrates all valid data collected in the period of time into a data set, and performs data signature on the data set, so as to ensure source validity and verifiability of the data set.
In step S12, as shown in fig. 3, the step of verifying whether the master node meets the preset storage requirement by each slave node based on the consensus algorithm and the received data set and workload includes the following steps S120 to S123.
Step S120, each slave node checks the legality and correctness of the data set according to the block hash value and the digital signature of the master node included in the data set and the workload;
step S121, each slave node signs the respective data verification result and broadcasts the signed data verification result to other slave nodes except for the slave node;
step S122, each slave node compares the received data examination results sent by other slave nodes with the data examination result of the slave node, and sends the comparison result to the master node for summarizing;
and step S123, the master node judges whether each slave node agrees to meet the preset storage requirement according to the summary result.
In detail, in steps S120 to S123, in the embodiment of the present invention, a bayer Fault tolerant consensus mechanism (PBFT) may be adopted to implement block consensus operation between the slave nodes, where the data storage node 12 that calculates the proof of the effective workload as the master node in the current consensus process and the other data storage nodes 12 are slave nodes. Specifically, each slave node verifies the validity and correctness of the data block according to information such as the hash value and the digital signature of the data block sent by the master node, attaches the respective audit result to the respective digital signature and broadcasts the digital signature to other slave nodes to realize mutual supervision and common inspection among the slave nodes, the slave nodes receive and summarize the audit results of other slave nodes, compare the audit results with the self audit results and send a reply to the master node, the master node summarizes all the audit replies from the slave nodes, and judges whether the slave nodes agree with self to meet the preset storage requirement according to the statistical result, if the slave nodes agree, the master node integrates the data block and the corresponding digital signature and sends the data block and the corresponding digital signature to all the slave nodes for storage.
Optionally, in an embodiment, a specific implementation manner of step S123 may be: and the master node counts whether the number of the slave nodes which agree with the legality and the correctness of the data block reaches a preset number, and if so, judges that each slave node agrees with the self to meet a preset storage requirement. For example, if all the slave nodes agree on the validity and correctness of the current data block, it is determined that the master node agrees on itself to meet the preset storage requirement.
It should be noted that, in the above steps S10 and S12, each slave node performs public audit and verification on the data set to be stored sent by the master node based on a workload certification mechanism and a consensus algorithm (such as a byzantine fault-tolerant consensus mechanism), so that the validity and the authenticity and validity of the data are effectively ensured.
If all other slave nodes recognize the master node as the proof of the fastest workload for calculating the value x, the master node obtains the right to integrate the data sets into a new data block and store the data block in the block chain, and the distributed grid data storage system 10 also issues a system award to the master node in step S13.
Optionally, in an embodiment, the step of storing the received data block by each slave node includes: and the slave node extracts the encrypted hash value contained in the data block and links the data block to a corresponding data block in a stored block chain according to the encrypted hash value so as to save the data block. For the calculation of the encrypted hash value, reference may be made to the description of the workload certification in step S10, and this embodiment is not described herein again.
It should be noted that, in the above steps S10-S13, in order to implement privacy protection for each data storage node 12, in the present embodiment, each data storage node 12 may communicate in an anonymous protection manner (for example, each data storage node 12 may communicate based on a block address without involving an actual address, name, etc. of each node), so that both communication parties cannot know the true identity of the other party. Meanwhile, in the process of realizing the power grid data storage, the power grid data collected at different times can be encrypted by adopting the asymmetric secret key, so that the safety of data storage is ensured to the maximum extent.
Further, before performing step S10, in an embodiment, the power grid data storage method may further include: the data sensing node 11 acquires power grid data according to a preset time interval and sends an acquisition result to the data storage node 12 for caching; or/and
the data sensing node 11 collects the power grid data and sends the collection result to the data storage node 12 for caching when detecting the electric charge payment action initiated by the user.
In detail, the two grid data collection modes have different triggering modes of the data sensing node 11, and in actual implementation, the two modes may be adopted separately, or may be a mode based on priority and adopt two triggering modes at the same time, for example, the priority of the electric charge payment and storage action triggering mode is higher than that of the triggering mode reaching the preset time interval, that is, when the data sensing node 11 detects the electric charge payment and storage action, whether the preset time interval is reached is not considered.
Further, according to actual requirements, as shown in fig. 4, when each data storage node 12 joins the distributed grid data storage system 10, the following steps S14 and S15 may be executed.
Step S14, acquiring node sharing configuration parameters;
and step S15, configuring a node based on the configuration parameter, and using the configured node as a data storage node 12 in the distributed power grid data storage system 10.
In detail, the shared configuration parameter in step S14 may be manually input into the node to be configured by a user, or may be sent to the node to be configured by another electronic device or an existing data storage node 12 in the distributed power grid data storage system 10, which is not limited herein.
In step S15, when the node to be configured that completes parameter configuration joins the distributed power grid data storage system 10, the distributed power grid data storage system 10 may verify the identity information and the like of the node, and allow the node to join the node after the verification is passed, so as to improve the security of the stored data in the distributed power grid data storage system 10.
Further, referring to fig. 1 again, each data sensing node 11 in the distributed power grid data storage system 10 provided by the present invention is respectively configured to collect power grid data according to a preset time interval and send a collection result to a corresponding data storage node 12 for caching; or/and
the data sensing node 11 is used for acquiring power grid data when detecting an electric charge payment action initiated by a user and sending an acquisition result to the corresponding data storage node 12 for caching;
each data storage node 12 is used for calculating respective workload proofreading based on a workload proofreading mechanism, the data storage node 12 which calculates the workload proofreading most quickly serves as a master node, and the other data storage nodes 12 serve as slave nodes; wherein,
the master node is used for generating a data set according to the power grid data acquired by the data sensing node 11 and broadcasting the data set and the workload to each slave node;
each slave node is used for verifying whether the master node meets a preset storage requirement or not based on a consensus algorithm and the received data set and workload;
when each slave node recognizes that the master node meets preset storage requirements, the master node is used for integrating the data set into a data block and broadcasting the data block to each slave node for storage.
In an embodiment, the slave node is specifically configured to extract a cryptographic hash value included in the data chunk, and link the data chunk to a corresponding data chunk in a stored chunk chain according to the cryptographic hash value, so as to save the data chunk.
In another embodiment, each slave node is specifically configured to check the validity and correctness of the data set according to the block hash value included in the data set and the workload and the digital signature of the master node; signing the respective data verification results, and broadcasting the signed data verification results to other slave nodes except the slave nodes; comparing the received data examination results sent by other slave nodes with the data examination results of the slave nodes, and sending the comparison results to the master node for summarizing;
and the master node is specifically used for judging whether each slave node agrees to meet the preset storage requirement according to the summary result.
In another embodiment, the master node is specifically configured to count whether the number of slave nodes that deny the validity and the correctness of the data block reaches a preset number, and if so, determine that each slave node recognizes itself to meet a preset storage requirement.
It should be noted that, for the detailed description of each action performed by the master node and each slave node when performing the grid data storage, reference may be made to the foregoing steps S10-S16, and this embodiment is not described again here.
In summary, the embodiments of the present invention provide a power grid data storage method and a distributed power grid data storage system 10, where the power grid data storage method is a decentralized distributed data storage scheme implemented based on a block chain technology, and does not depend on a globally trusted third party entity, and an end-to-end communication manner is adopted among nodes, so that a risk that a central node is subjected to centralized malicious attack, which is easily occurred in an existing centralized power grid data storage scheme, is effectively avoided, and security of data storage is improved. Meanwhile, the decentralized distributed power grid data storage system 10 provided by the invention has good expandability and reliability.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof, which essentially contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only an alternative embodiment of the present invention and is not intended to limit the present invention, and various modifications and variations of the present invention may occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A power grid data storage method is applied to a distributed power grid data storage system, the distributed data storage system comprises a plurality of data storage nodes and data sensing nodes corresponding to the data storage nodes one to one, and the data storage nodes are in communication connection with one another, and the power grid data storage method comprises the following steps:
each data storage node calculates respective workload certification based on a workload certification mechanism, the data storage node which calculates the workload certification at the fastest speed serves as a main node, and other data storage nodes serve as slave nodes;
the master node generates a data set according to the power grid data acquired by the data sensing nodes and broadcasts the data set and the workload to each slave node;
each slave node verifies whether the master node meets preset storage requirements or not based on a consensus algorithm and the received data sets and workloads;
when each slave node recognizes that the master node meets preset storage requirements, the master node integrates the data set into a data block and broadcasts the data block to each slave node for storage.
2. The method according to claim 1, wherein the step of storing the received data blocks by each slave node comprises:
and the slave node extracts the encrypted hash value contained in the data block and links the data block to a corresponding data block in a stored block chain according to the encrypted hash value so as to save the data block.
3. The method according to claim 1, wherein the step of verifying whether the master node meets the preset storage requirement by each slave node based on a consensus algorithm and the received data sets and workloads comprises:
each slave node checks the validity and correctness of the data set according to the block hash value included in the data set and the workload and the digital signature of the master node;
each slave node signs the respective data verification result and broadcasts the signed data verification result to other slave nodes except the slave node;
each slave node compares the received data examination results sent by other slave nodes with the data examination results of the slave node and sends the comparison results to the master node for summarizing;
and the master node judges whether each slave node recognizes that the slave node meets the preset storage requirement according to the summary result.
4. The power grid data storage method according to claim 3, wherein the step of the master node determining whether each slave node agrees with the validity and correctness of the data block according to the summary result comprises:
and the master node counts whether the number of the slave nodes which accept the legality and the correctness of the data block reaches a preset number, and if so, the master node judges that each slave node recognizes that the slave node meets a preset storage requirement.
5. The grid data storage method according to claim 1, further comprising:
the data sensing node acquires power grid data according to a preset time interval and sends an acquisition result to the data storage node for caching; or/and
and the data perception node acquires power grid data and sends an acquisition result to the data storage node for caching when detecting an electric charge payment action initiated by a user.
6. The power grid data storage method according to claim 1, wherein before performing the step of selecting a data storage node from the data storage nodes that most quickly calculates the workload proof based on a workload proof mechanism as the master node, the method further comprises:
acquiring node sharing configuration parameters;
and configuring the nodes based on the configuration parameters, and taking the configured nodes as data storage nodes in the distributed power grid data storage system.
7. A distributed power grid data storage system is characterized by comprising a plurality of data storage nodes and data sensing nodes which correspond to the data storage nodes one by one, wherein the data storage nodes are in communication connection;
each data perception node is respectively used for acquiring power grid data according to a preset time interval and sending an acquisition result to a corresponding data storage node for caching; or/and
the data perception node is used for acquiring power grid data and sending an acquisition result to the corresponding data storage node for caching when an electric charge payment action initiated by a user is detected;
each data storage node is used for calculating respective workload certification based on a workload certification mechanism, the data storage node which calculates the workload certification most quickly is used as a master node, and other data storage nodes are used as slave nodes; wherein,
the master node is used for generating a data set according to the power grid data acquired by the data sensing node and broadcasting the data set and the workload to each slave node;
each slave node is used for verifying whether the master node meets a preset storage requirement or not based on a consensus algorithm and the received data set and workload;
when each slave node recognizes that the master node meets preset storage requirements, the master node is used for integrating the data set into a data block and broadcasting the data block to each slave node for storage.
8. The distributed power grid data storage system according to claim 7, wherein the slave node is specifically configured to extract a cryptographic hash value included in the data chunk, and link the data chunk to a corresponding data chunk in the stored chunk chain according to the cryptographic hash value to save the data chunk.
9. The distributed power grid data storage system according to claim 7, wherein each of the slave nodes is specifically configured to check validity and correctness of the data set according to a block hash value included in the data set and the workload and a digital signature of the master node; signing the respective data verification results, and broadcasting the signed data verification results to other slave nodes except the slave nodes; comparing the received data examination results sent by other slave nodes with the data examination results of the slave nodes, and sending the comparison results to the master node for summarizing;
and the master node is specifically used for judging whether each slave node agrees to meet the preset storage requirement according to the summary result.
10. The distributed power grid data storage system of claim 9, wherein the master node is specifically configured to count whether the number of slave nodes that deny the validity and correctness of the data block reaches a preset number, and if so, determine that each slave node recognizes itself to meet a preset storage requirement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810596311.7A CN108718344A (en) | 2018-06-11 | 2018-06-11 | A kind of electric network data storage method and distributed power grid data-storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810596311.7A CN108718344A (en) | 2018-06-11 | 2018-06-11 | A kind of electric network data storage method and distributed power grid data-storage system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108718344A true CN108718344A (en) | 2018-10-30 |
Family
ID=63913048
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810596311.7A Pending CN108718344A (en) | 2018-06-11 | 2018-06-11 | A kind of electric network data storage method and distributed power grid data-storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108718344A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302501A (en) * | 2018-12-10 | 2019-02-01 | 北京八分量信息科技有限公司 | A kind of industrial control data storage method based on block chain technology, apparatus and system |
CN109598135A (en) * | 2018-12-10 | 2019-04-09 | 北京八分量信息科技有限公司 | A kind of industrial control equipment O&M information storage means, apparatus and system |
CN110753103A (en) * | 2019-10-16 | 2020-02-04 | 长春银彩通信息科技有限公司 | Method and system for distributed efficient data sealing |
CN110751480A (en) * | 2019-09-24 | 2020-02-04 | 中国银联股份有限公司 | Information query method, device, equipment and computer readable storage medium |
CN111369088A (en) * | 2018-12-25 | 2020-07-03 | 中国电力科学研究院有限公司 | Block chain control system and control method for power grid dispatching system |
CN112380549A (en) * | 2020-11-13 | 2021-02-19 | 国网福建省电力有限公司经济技术研究院 | Power grid engineering project investment statistical data management method based on block chain |
CN112733211A (en) * | 2021-01-15 | 2021-04-30 | 重庆邮电大学 | Intelligent power grid data storage scheme based on block chain |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170031676A1 (en) * | 2015-07-27 | 2017-02-02 | Deja Vu Security, Llc | Blockchain computer data distribution |
CN107094155A (en) * | 2017-06-14 | 2017-08-25 | 广东工业大学 | A kind of secure storage method of data and device based on alliance's block chain |
CN107122477A (en) * | 2017-05-02 | 2017-09-01 | 成都中远信电子科技有限公司 | A kind of block chain storage system |
CN107181599A (en) * | 2017-07-18 | 2017-09-19 | 天津理工大学 | The storage of route location data confidentiality and sharing method based on block chain |
US20180039667A1 (en) * | 2016-08-05 | 2018-02-08 | Chicago Mercantile Exchange Inc. | Systems and methods for blockchain rule synchronization |
-
2018
- 2018-06-11 CN CN201810596311.7A patent/CN108718344A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170031676A1 (en) * | 2015-07-27 | 2017-02-02 | Deja Vu Security, Llc | Blockchain computer data distribution |
US20180039667A1 (en) * | 2016-08-05 | 2018-02-08 | Chicago Mercantile Exchange Inc. | Systems and methods for blockchain rule synchronization |
CN107122477A (en) * | 2017-05-02 | 2017-09-01 | 成都中远信电子科技有限公司 | A kind of block chain storage system |
CN107094155A (en) * | 2017-06-14 | 2017-08-25 | 广东工业大学 | A kind of secure storage method of data and device based on alliance's block chain |
CN107181599A (en) * | 2017-07-18 | 2017-09-19 | 天津理工大学 | The storage of route location data confidentiality and sharing method based on block chain |
Non-Patent Citations (1)
Title |
---|
吴振铨等: ""基于联盟区块链的智能电网数据安全存储与共享系统"", 《计算机应用》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109302501A (en) * | 2018-12-10 | 2019-02-01 | 北京八分量信息科技有限公司 | A kind of industrial control data storage method based on block chain technology, apparatus and system |
CN109598135A (en) * | 2018-12-10 | 2019-04-09 | 北京八分量信息科技有限公司 | A kind of industrial control equipment O&M information storage means, apparatus and system |
CN109598135B (en) * | 2018-12-10 | 2020-11-10 | 北京八分量信息科技有限公司 | Industrial control equipment operation and maintenance information storage method, device and system |
CN109302501B (en) * | 2018-12-10 | 2021-12-17 | 北京八分量信息科技有限公司 | Industrial control data storage method, device and system based on block chain technology |
CN111369088A (en) * | 2018-12-25 | 2020-07-03 | 中国电力科学研究院有限公司 | Block chain control system and control method for power grid dispatching system |
CN110751480A (en) * | 2019-09-24 | 2020-02-04 | 中国银联股份有限公司 | Information query method, device, equipment and computer readable storage medium |
CN110753103A (en) * | 2019-10-16 | 2020-02-04 | 长春银彩通信息科技有限公司 | Method and system for distributed efficient data sealing |
CN112380549A (en) * | 2020-11-13 | 2021-02-19 | 国网福建省电力有限公司经济技术研究院 | Power grid engineering project investment statistical data management method based on block chain |
CN112733211A (en) * | 2021-01-15 | 2021-04-30 | 重庆邮电大学 | Intelligent power grid data storage scheme based on block chain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108718344A (en) | A kind of electric network data storage method and distributed power grid data-storage system | |
CN109462587B (en) | Block chain layered consensus method, block chain network system and block chain node | |
Shen et al. | Privacy-preserving and lightweight key agreement protocol for V2G in the social Internet of Things | |
Rathore et al. | Real-time secure communication for Smart City in high-speed Big Data environment | |
Li et al. | Towards blockchain-based software-defined networking: security challenges and solutions | |
Makhdoom et al. | Blockchain for IoT: The challenges and a way forward | |
CN110268679B (en) | Block chain-based authentication method and system | |
AbuNaser et al. | Advanced survey of blockchain for the internet of things smart home | |
CN111556120A (en) | Data processing method and device based on block chain, storage medium and equipment | |
CN109919771B (en) | Industrial internet transaction device applying hierarchical block chain technology | |
CN105247529A (en) | Synchronizing credential hashes between directory services | |
CN110797099A (en) | Medical data sharing method and system based on block chain | |
CN112749969B (en) | Data processing method and device, computer equipment and storage medium | |
WO2021051581A1 (en) | Server cluster file synchronization method and apparatus, electronic device, and storage medium | |
Jiang et al. | An improved password-based remote user authentication protocol without smart cards | |
CN110944301A (en) | Intelligent cell equipment monitoring system based on block chain and key management method | |
Sani et al. | Xyreum: A high-performance and scalable blockchain for iiot security and privacy | |
CN109951490A (en) | Webpage integrity assurance, system and electronic equipment based on block chain | |
CN110929229A (en) | Block chain-based office document credibility verification method and system | |
CN112214544A (en) | Ubiquitous power Internet of things edge data safe storage method based on permission block chain | |
CN114302389A (en) | Authentication and key agreement method, gateway, sensor and electronic equipment | |
CN116151826A (en) | Efficient and reliable block chain-based power transaction terminal trust management method | |
KR20060104838A (en) | Method and sensor certification system being suitable to sensor network environment | |
Wu et al. | Reinforced practical Byzantine fault tolerance consensus protocol for cyber physical systems | |
Lalle et al. | A privacy-protection scheme for smart water grid based on blockchain and machine learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181030 |
|
RJ01 | Rejection of invention patent application after publication |