Energy data upload and consensus system and method based on on-chain and off-chain collaboration
By adopting on-chain and off-chain collaborative energy data upload and consensus system in the State Grid scenario, and using homomorphic signature and smart contract technology, the problem of insufficient blockchain storage and computing power in energy data sharing is solved, and data is realized Trusted uploads and sharing improve system throughput and security.
Patent Information
- Application Number
- CN202111645928.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the State Grid scenario, due to the huge scale of energy data and the limitations of blockchain performance, energy data sharing is unsafe and insufficient storage and computing capabilities. The existing technology cannot effectively ensure the trustworthiness of data and system throughput.
Adopt energy data upload and consensus system based on on-chain and off-chain collaboration, through the collaborative work of multiple user units, blockchain side chains and main chains, and using homomorphic signature technology and smart contracts, the user unit signs energy data. Upload to the blockchain side chain, the side chain is aggregated and calculated and sent to the main chain, and the main chain is verified and recorded to ensure the credibility and legality of the data.
It realizes the trustworthy upload and sharing of energy data, solves the problem of insufficient storage and computing power of blockchain, improves system throughput, ensures the security and credibility of data, and fully explores the blockchain's Computational performance and extended storage capabilities.
Smart Images

Figure CN114374502B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of blockchain technology and energy data technology, and relates to an energy data upload and consensus system and method, in particular to an energy data upload and consensus system and method based on on-chain and off-chain collaboration. Background Art
[0002] Blockchain technology is abbreviated as BT (Blockchain technology), also known as distributed ledger technology. Blocks, as the basic units of blockchain, are connected to each other in chronological order. In the blockchain, there are many distributed nodes, each of which can store transaction information, and the digital ledger is arranged on each node. The information stored in the node is shared with other nodes through a peer-to-peer (p2p) network, and then the accuracy is verified through a consensus mechanism before it is saved in the node's ledger. After encryption, the information stored in the ledger on each node cannot be modified. Therefore, blockchain technology has the characteristics of decentralization, openness and transparency.
[0003] The consensus mechanism is an algorithm for blockchain transactions to reach a distributed consensus, which solves the problem of how blockchain can reach consistency (mutual trust between nodes) in a distributed scenario. As a data structure that stores data in chronological order, blockchain can support different consensus mechanisms. The goal of the consensus mechanism based on blockchain is to allow all honest nodes to maintain a consistent view of the blockchain.
[0004] The consortium chain is a blockchain formed by a group of specific group members. It has the characteristics of partial decentralization, strong controllability, data not being disclosed by default, and fast transaction speed. Its application in energy scenarios can break down data barriers, solve the problem of secure data sharing between users, and reduce the cost of data use.
[0005] The data collaboration technology between on-chain and off-chain is an important direction for the development of alliance chain, aiming to achieve the relevance and consistency of blockchain and all traditional trusted information system data. The on-chain data must be a complete execution process of "consensus" and "storage" to achieve "distributed transactionality". Without consensus, consistency and correctness cannot be guaranteed, and it cannot be accepted by all participants on the chain; the data after consensus is not stored by multiple parties, which means that the data may be lost or tampered with by one party. Off-chain refers to data that is not stored on the blockchain. Truly realize the decentralized connection of on-chain and off-chain data.
[0006] However, due to the large number of end-user members in the State Grid scenario, the amount of energy data generated is huge, and the establishment of the alliance chain network is large and complex, and the system throughput of the State Grid main chain is difficult to meet the system requirements. In the overall structure of the State Grid chain "one master, two sides and multiple slaves", due to the huge amount of data in the energy Internet and the limitations of the performance of the blockchain itself, the energy data sharing under the participation of multiple parties is unsafe, and there are problems such as insufficient blockchain storage capacity and computing power.
[0007] At present, cross-chain data in the energy Internet usually adopts the method of "storing the full data on the side chain and the summary on the main chain", and realizes the rapid data upload through multi-chain collaboration, effectively improving the system throughput. Such a solution relies on the credibility of the side chain nodes, and cannot guarantee the correctness of the summary content of the data set stored in the main chain. In addition, such a solution lacks the record of the statistical information of the data set.
[0008] For example, patent CN201811341446.5 discloses a main-side chain distributed storage method based on blockchain. The patent is divided into several blockchain side chains according to different regions; each blockchain main chain and blockchain side chain contains several block units; the blockchain side chain processes the asset data related information of the area corresponding to the blockchain side chain, and reports the asset data processing information to the blockchain main chain according to the preset period T. The blockchain main chain obtains data information from each blockchain side chain, and processes and stores all regional data information. However, the patent does not cite homomorphic signature technology or any other technology, cannot guarantee data credibility, and fails to solve the problem of insufficient cross-chain transaction computing power.
[0009] Homomorphic signature was proposed by Robert Johnson, David Molnar, Dawn Song and David Wagner in 2002. It allows anyone to calculate the signature value of the result data after the joint operation of two sets of signed messages, or the signature value of any message subset of a signed message set, etc. without the signature private key.
[0010] The difference between this signature scheme and the common signature scheme is that the original information of the signature does not need to be hashed to maintain homomorphism. For example, the patent "State Grid Data Upload Mechanism Based on Zero-Knowledge Proof" uploads the collected energy data to the side chain after signing. It is necessary to calculate the hash value, average value and other information of the data set at the side chain node to generate a zero-knowledge proof that the description information is true, and upload the description / statistical information and zero-knowledge proof to the main chain together. After the main chain's smart contract verifies the legality, the data set description / statistical information is archived on the main chain. This patent scheme requires that the keys of each power terminal are independent of each other, the processing logic is relatively complex, the storage data is limited, and a large amount of off-chain computing resources and another trusted party are required. In addition, the most advanced zero-knowledge proof system cannot support complex computing logic of too large a data set, and there is a risk of difficult data authentication.
[0011] For example, patent CN112395353A discloses a smart electricity meter quality data sharing method and system based on alliance chain. The patent adopts an identification-based on-chain and off-chain storage method. It collects the production quality data of smart electricity meters on the manufacturer side and the meter operation and maintenance data on the power grid company side, and uploads the data identification to the chain, encrypts the transmission, and sorts it through a general consensus algorithm. However, the patent also does not use homomorphic signature technology or any other technology, and is not considered a strong consensus mechanism. Summary of the invention
[0012] The purpose of the present invention is to overcome the shortcomings of the prior art and propose an energy data upload and consensus system and method based on on-chain and off-chain collaboration, which can solve the problems of blockchain storage capacity and data credibility during energy data upload.
[0013] The present invention solves the practical problem by adopting the following technical solutions:
[0014] An energy data upload and consensus system based on on-chain and off-chain collaboration, comprising: a plurality of user units, a blockchain side chain and a blockchain main chain; the plurality of user units are connected to the blockchain main chain through corresponding blockchain side chains respectively; the user units are used for energy data collection and upload, and upload the generated signatures to the blockchain side chain; the blockchain side chain is used to receive and store the signatures of each user unit, and send the aggregated and calculated homomorphic signatures to the blockchain main chain; the blockchain main chain is used to verify the homomorphic signature information transmitted by the side chain and make final records.
[0015] Furthermore, user units include smart meters, each of which is registered as a blockchain node.
[0016] Moreover, each user unit includes a pair of private key sk and public key pk; the private key is used to sign the hash function of energy data, terminal device identification id, and the hash function of the number of transmissions, and the public key is publicly recorded on the blockchain to verify the corresponding signature.
[0017] An energy data uploading and consensus system and method based on on-chain and off-chain collaboration, comprising the following steps:
[0018] Step 1: The user unit collects the user's energy data for a period of time, generates a signature and uploads it to the blockchain side chain;
[0019] Step 2: The blockchain sidechain receives and stores the signatures of each user unit, and sends the aggregated and calculated homomorphic signatures to the blockchain mainchain;
[0020] Moreover, the specific method of step 1 is:
[0021] User unit i uses private key sk to collect energy data x i ,h(id i ), and h(nonce) for key sharing homomorphic signature (h(nonce), h(id i ), x i )Upload to the blockchain sidechain;
[0022] Where id is the identifier of the terminal, nonce represents the number of transmissions; for a statistical task, all terminals share the same nonce; h(·) is a collision-resistant hash function.
[0023] Moreover, the specific method of step 2 is:
[0024] Blockchain sidechain nodes calculate statistical results and supporting evidence And send s and PoC to the blockchain main chain through smart contracts.
[0025] Step 3: The blockchain main chain will verify the homomorphic signature information transmitted by the side chain and make a final record.
[0026] Moreover, the specific method of step 3 is:
[0027] After the blockchain main chain receives s and PoC from the blockchain side chain, it verifies the statistical result s according to PoC through the smart contract;
[0028] Smart contract verification e(PoC, Q) = e(h 1 P 1 ,s 1 Q)e(h 2 P 2 ,s 2Q)e(sP 3 ,s 3 Q), where h 1 =n·h(nonce), e(·) is a bilinear mapping function.
[0029] If the verification is successful, the data is considered legal, and the statistical results and signatures are archived and recorded on the blockchain main chain.
[0030] Advantages and beneficial effects of the present invention:
[0031] 1. The present invention mainly aims at the characteristics of large energy big data volume and high mining value, and proposes a specific energy data trusted upload scheme, which can solve the problems of blockchain storage capacity and data trustworthiness during energy data upload. Specifically, the smart terminal device collects energy data, and the energy data of the user unit and the data after hashing the power terminal identification and the number of transmissions are trusted to be uploaded to the chain through the homomorphic signature technology. After the blockchain side chain calculates the signature of all node data, it is uploaded to the main chain. At the same time, the smart contract is used on the main chain to verify whether it is legal. After the verification is passed, the main chain will record and archive the received description / statistical information and display it. This energy data trusted upload scheme can solve the problem of security and trustworthiness of energy data sharing under the participation of multiple parties, making it possible to fully explore the statistical value of energy data. At the same time, the original data is not uploaded to the main chain during cross-chain interaction. The main chain only calculates the results of the homomorphic signatures of all energy terminals transmitted from the side chain, which effectively solves the problem of insufficient storage capacity and computing power of the State Grid chain.
[0032] 2. The present invention can solve the problem of insufficient storage capacity and data reliability of the State Grid Chain when energy data is uploaded to the blockchain when all energy terminal devices share the same key. Through cross-chain, homomorphic signature, smart contract and other technologies, the distributed storage of energy data is realized, and the blockchain shared transaction records are guaranteed to be traceable and cannot be tampered with, and a trusted upload mechanism for energy data is established. The energy terminal devices share the same key. After collecting energy data, they use the private key to homomorphically sign the hash function of the energy data, the energy terminal device identifier, and the hash function of the number of transmissions, and then send them to the blockchain side chain. The blockchain side chain collects the homomorphic signatures of all energy terminal devices, and transmits the energy data statistics and the subsidiary certificates generated according to the homomorphic signatures to the blockchain main chain. After the smart contract of the blockchain main chain verifies that the statistics uploaded by the side chain and the corresponding homomorphic signatures are legal, the records can be archived on the main chain without storing the original data in the State Grid Chain main chain, effectively ensuring data sharing security and improving system throughput.
[0033] 3. The intelligent terminal device equipped with a trusted execution environment described in the present invention can realize the process of trusted energy data collection and chain-uploading; the proposed asymmetric encryption signature scheme can ensure the trusted chain-uploading of energy data; the cross-chain upload mechanism of energy data based on homomorphic signature can fully tap the computing performance of blockchain and expand the storage capacity of blockchain; the energy data upload scheme ensures the full credibility of energy data collection, transmission, and analysis, and realizes the trusted sharing of energy data. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the main structure of the national grid chain of the present invention;
[0035] Figure 2 It is a process flow chart of the present invention. DETAILED DESCRIPTION
[0036] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings:
[0037] An energy data upload and consensus system based on on-chain and off-chain collaboration, such as Figure 1 As shown, it includes: multiple user units, a blockchain side chain and a blockchain main chain; the multiple user units are connected to the blockchain main chain through the corresponding blockchain side chain respectively; the user units are used to collect and upload energy data, and upload the generated signatures to the blockchain side chain; the blockchain side chain is used to receive and store the signatures of each user unit, and send the aggregated and calculated homomorphic signatures to the blockchain main chain; the blockchain main chain is used to verify the homomorphic signature information transmitted by the side chain and make final records.
[0038] In this embodiment, the user units include smart meters, each of which is registered as a blockchain node;
[0039] In this embodiment, each user unit includes a pair of private key sk and public key pk; the private key is used to sign the hash function of energy data, terminal device identification ID, and the hash function of the number of transmissions, and the public key is publicly recorded on the blockchain for verifying the corresponding signature.
[0040] The following is a further description of the responsibilities of each component in the system:
[0041] The user unit consists of smart meters and other devices, each of which is registered as a blockchain node, and can realize the functions of energy data collection and upload. Each user unit i contains a pair of private keys sk and public keys pk. The private key sk is used to sign the hash function of energy data, terminal device identification id, and the hash function of the number of transmissions. The public key pk is publicly recorded on the blockchain and used to verify the corresponding signature.
[0042] The blockchain side chain is used to receive and store the signatures of each user unit, and send the aggregated and calculated homomorphic signatures to the blockchain main chain.
[0043] The blockchain main chain is used to verify the homomorphic signature information transmitted by the side chain and make final records.
[0044] An energy data upload and consensus system and method based on on-chain and off-chain collaboration, such as Figure 2 As shown, the following steps are included:
[0045] Step 1: The user unit collects the user's energy data for a period of time, generates a signature and uploads it to the blockchain side chain;
[0046] In this embodiment, the collected energy data is denoted as x i .
[0047] The specific method of step 1 is:
[0048] User unit i uses private key sk to collect energy data x i ,h(id i ), and h(nonce) for key sharing homomorphic signature (h(nonce), h(id i ), x i )Upload to the blockchain sidechain;
[0049] Among them, id is the terminal's identifier, and nonce represents the number of times it is sent (each time the terminal sends a message, nonce increases by 1);
[0050] For a statistical task, all terminals share the same nonce;
[0051] h(·) is a collision-resistant hash function.
[0052] In this embodiment, the structure is as follows:
[0053] sk=(s 1 、s 2 、s 3 ), where s i ∈F q (random)
[0054] pk=(P 1 , P 2 , P 3 、s 1 Q.s 2 Q.s 3 Q), where P i , Q∈G (randomly selected and made public)
[0055] The output of terminal i is out i=(x i , σ i ), σ i =(s 1 h(nonce))P 1 ·(s 2 ·h(id i ))P 2 ·(s 3 ·x i ) 3 Each terminal will out i Upload to the blockchain sidechain;
[0056] Step 2: The blockchain sidechain receives and stores the signatures of each user unit, and sends the aggregated and calculated homomorphic signatures to the blockchain mainchain.
[0057] The specific method of step 2 is:
[0058] Blockchain sidechain nodes calculate statistical results and supporting evidence And send s and PoC to the blockchain main chain through smart contracts.
[0059] Step 3: The blockchain main chain will verify the homomorphic signature information transmitted by the side chain and make a final record.
[0060] The specific method of step 3 is:
[0061] After the blockchain main chain receives s and PoC from the blockchain side chain, it verifies the statistical result s according to PoC through the smart contract;
[0062] Smart contract verification e(PoC, Q) = e(h 1 P 1 ,s 1 Q)e(h 2 P 2 ,s 2 Q)e(sP 3 ,s 3 Q), where h 1 =n·h(nonce), e(·) is a bilinear mapping function.
[0063] If the verification is successful, the data is considered legal, and the statistical results and signatures are archived and recorded on the blockchain main chain.
[0064] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation manner. Any other implementation manners derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.
Claims
1. A method for uploading and consensus of energy data based on on-chain and off-chain collaboration, characterized by: The following steps are involved: Step 1: The user unit collects the user's energy data for a period of time, generates a signature and uploads it to the blockchain side chain; Each user unit i contains a pair of private key sk and public key pk; Its construction is as follows: sk = (s1, s2, s3); Among them, s1, s2, s3∈Fq; pk=(P1、P2、P3、s1Q、s2Q、s3Q), where P1、P2、P3、Q∈G id is the terminal identifier, and the output of terminal i is out i =(x i , σ i ), σ i =(s1·h(nonce))P1·(s2·h(id i ))P2·(s3·x i )P3 Each terminal will out i Upload to the blockchain sidechain; Nonce represents the number of times it is sent; For a statistical task, all terminals share the same nonce; h(·) is a collision-resistant hash function; Step 2: The blockchain sidechain receives and stores the signatures of each user unit, and sends the aggregated and calculated homomorphic signatures to the blockchain mainchain; Step 3: The blockchain main chain will verify the homomorphic signature information transmitted by the side chain and make a final record; Smart contract verification e(PoC, Q) = e(h1P1, s1Q) e(h2P2, s2Q) e(sP3, s3Q), where h1 = n·h(nonce), e(·) is a bilinear mapping function; The specific method of step 2 is: Blockchain side chain node calculation statistics results and supporting evidence And send s and PoC to the blockchain main chain through smart contracts.
2. The energy data uploading and consensus method based on on-chain and off-chain collaboration according to claim 1 is characterized in that: User units include smart meters, each of which is registered as a blockchain node.
3. The energy data uploading and consensus method based on on-chain and off-chain collaboration according to claim 1 is characterized by: Each user unit includes a pair of private key sk and public key pk; the private key is used to sign the hash function of energy data, terminal device identification id, and the hash function of the number of transmissions, and the public key is publicly recorded on the blockchain to verify the corresponding signature.
4. The energy data uploading and consensus method based on on-chain and off-chain collaboration according to claim 1 is characterized in that: The specific method of step 1 is: User unit i uses private key sk to collect energy data x i ,h(id i ), and h(nonce) for key sharing homomorphic signature (h(nonce), h(id i ), x i )Upload to the blockchain sidechain; Where id is the identifier of the terminal, nonce represents the number of transmissions; for a statistical task, all terminals share the same nonce; h(·) is a collision-resistant hash function.
5. The energy data uploading and consensus method based on on-chain and off-chain collaboration according to claim 1 is characterized in that: The specific method of step 3 is: After the blockchain main chain receives s and PoC from the blockchain side chain, it verifies the statistical result s according to PoC through the smart contract; Smart contract verification e(PoC, Q) = e(h1P1, s1Q)e(h2P2, s2Q)e(sP3, s3Q), where h1 = n·h(nonce), e(·) is a bilinear mapping function; If the verification is successful, the data is considered legal, and the statistical results and signatures are archived and recorded on the blockchain main chain.
Citation Information
Patent Citations
A main side chain distributed storage mode based on a block chain
CN109669940A
Alliance chain-based intelligent electric energy meter quality data sharing method and system
CN112395353A
Blockchain assisted V2G security authentication and private data aggregation method
CN111832066A
Power data uploading system and method based on zero-knowledge proof
CN113660092A