Power data traceability system and power data processing method based on blockchain

Through the multi-layer encryption and authentication mechanism of blockchain nodes and encryption proxy nodes, the data leakage risk of centralized databases is solved, the high-security storage and traceability of power data are achieved, and the stability of the power system and data transparency are improved.

CN119299150BActive Publication Date: 2025-09-23GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411386464.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-09-23
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Traditional power data security protection solutions rely on centralized databases, which pose a risk of data leakage. Once the database fails, the stability of the entire system is affected, and the security of the data traceability process is low.

Method used

A blockchain-based power data traceability system is adopted. The original power data is initially encrypted by the blockchain node and re-encrypted by the authorized encryption proxy node. The re-encrypted ciphertext is stored in combination with the decentralized characteristics of the blockchain, and digital signatures and smart contracts are used to authenticate and process traceability requests.

Benefits of technology

It improves the security of the power data storage process and the data traceability process, reduces the risk of single point failure, and ensures the immutability and transparency of data during transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299150B_ABST
    Figure CN119299150B_ABST
Patent Text Reader

Abstract

The present application relates to a blockchain-based power data traceability system, power data processing method, power data traceability method, device, computer equipment, computer-readable storage medium, and computer program product. The system includes a blockchain node, a data traceability party, and multiple encryption proxy nodes authorized by the blockchain node. The blockchain node is used to initially encrypt the received original power data using a key stored on the local end to obtain initial encrypted data. Based on the key stored on the local end and the key of the data traceability party, the re-encryption key is determined and sent to the encryption proxy node. The data traceability party is used to send a power data traceability request to the blockchain node. The power data traceability request carries the digital signature of the data traceability party. When the identity verification is passed, a rich query is performed in the blockchain through a preset smart contract to obtain the power data traceability result. The above system can improve the security of the power data traceability process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a blockchain-based power data traceability system, power data processing method, power data traceability method, device, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the continuous development and intelligentization of power systems, the types and quantities of power data are also increasing rapidly. These power data include privacy information such as users' electricity usage habits and behavioral patterns. The leakage or tampering of power data can easily affect the stable operation of the power system. Therefore, the security protection of power data has become an important issue to be solved.

[0003] In traditional solutions, the security protection of power data mainly relies on centralized databases and traditional public key encryption technology. For example, power data is stored in a central database. When a third party has data traceability requirements, the central database sends the power data encrypted using traditional public key encryption technology to the third party, reducing the risk of leakage in the power data sharing process.

[0004] However, the central database in the above solution is easily targeted by attacks and is inherently at risk of data leakage. Once the central database fails, the entire system will be affected. As a result, data privacy is difficult to fully guarantee during the transmission and storage of power data, leading to certain security risks in data traceability and data sharing, that is, the security of the data traceability process is relatively low. Summary of the Invention

[0005] Based on this, it is necessary to provide a blockchain-based power data traceability system, power data processing method, power data traceability method, device, computer equipment, computer-readable storage medium and computer program product that can improve the security of data traceability in response to the above technical problems.

[0006] In a first aspect, the present application provides a blockchain-based power data traceability system, the system comprising a blockchain node, a data traceability party, and a plurality of encryption proxy nodes authorized by the blockchain node, the encryption proxy nodes being respectively connected to the blockchain node and the data traceability party;

[0007] The blockchain node is configured to initially encrypt the received raw power data using a key stored locally to obtain initial encrypted data, determine a re-encryption key based on the key and a key of the data traceability party, generate a plurality of re-encryption key fragments based on the number of encryption proxy nodes and the re-encryption key, and send the plurality of re-encryption key fragments to the encryption proxy nodes, wherein the re-encryption key fragments correspond one-to-one to the encryption proxy nodes;

[0008] The encryption proxy node is configured to re-encrypt the initial encrypted data according to the re-encryption key fragment to obtain a re-encrypted ciphertext, and feed the re-encrypted ciphertext back to the blockchain node;

[0009] The data traceability party is used to send a power data traceability request to the blockchain node, where the power data traceability request carries the digital signature of the data traceability party; and if the identity verification is passed, perform a rich query in the blockchain through a preset smart contract to obtain the power data traceability result;

[0010] The blockchain node is also used to authenticate the data traceability party based on the digital signature when receiving the power data traceability request sent by the data traceability party.

[0011] In one of the embodiments, the data traceability party is also used to obtain the identity information of the blockchain node corresponding to the power data traceability result, authenticate the identity of the blockchain node based on the identity information, and verify the validity of the power data traceability result to obtain the identity authentication result and the validity verification result.

[0012] In one of the embodiments, the data traceability party is also used to determine whether the number of re-encrypted ciphertexts contained in the power data traceability result is greater than a preset threshold value when the blockchain node passes identity authentication and the power data traceability result passes validity verification. When the number of re-encrypted ciphertexts is greater than the preset threshold value, the re-encrypted ciphertexts in the power data traceability result are merged to obtain a merged re-encrypted ciphertext, and the merged re-encrypted ciphertext is decrypted based on a preset private key to obtain the target power data.

[0013] In one embodiment, the system further includes a verification node for obtaining the re-encrypted ciphertext, and packaging the re-encrypted ciphertext to generate a block if the re-encrypted ciphertext meets a preset block packaging and uploading condition. The block packaging and uploading condition is determined based on the generation time of the re-encrypted ciphertext, a data processing quantity threshold preset in the blockchain, and a block size threshold preset in the blockchain. If it is determined that the blockchain nodes in the blockchain reach a consensus according to a preset consensus mechanism, the block is stored on the chain.

[0014] In a second aspect, the present application provides a power data processing method, which is applied to a blockchain node of any of the above-mentioned blockchain power data traceability system embodiments, the method comprising:

[0015] Initially encrypting the received raw power data using the key stored on the local end to obtain initial encrypted data;

[0016] Sending a data re-encryption message carrying the initial encrypted data and a preset re-encryption key to the authorized encryption proxy node, wherein the data re-encryption message is used to instruct the encryption proxy node to re-encrypt the initial encrypted data using the re-encryption key to obtain a re-encrypted ciphertext, where the re-encryption key is determined based on the key stored on the local end and the key of the data traceability party;

[0017] Receive the re-encrypted ciphertext fed back by the encryption proxy node.

[0018] In one embodiment, the initial encryption of the received raw power data using the key stored on the local end to obtain the initial encrypted data includes:

[0019] The received original power data is symmetrically encrypted using the public key stored in the local end to obtain initial encrypted data, wherein the public key stored in the local end is determined based on an elliptic curve cryptography key generation algorithm.

[0020] In one embodiment, the number of the encryption proxy nodes is multiple, and the re-encryption key is determined based on the following steps:

[0021] A re-encryption key is generated based on the private key stored on the local end, the public key of the data traceability party, and the number of the encryption proxy nodes.

[0022] In a third aspect, the present application further provides a power data processing device, comprising:

[0023] An initial encryption module, used to perform initial encryption on the received original power data using a key stored in the local terminal to obtain initial encrypted data;

[0024] a re-encryption module, configured to send a data re-encryption message carrying the initial encrypted data and a preset re-encryption key to an authorized encryption proxy node, wherein the data re-encryption message is used to instruct the encryption proxy node to re-encrypt the initial encrypted data using the re-encryption key to obtain a re-encrypted ciphertext, wherein the re-encryption key is determined based on the key stored on the local terminal and the key of the data traceability party;

[0025] The data receiving module is used to receive the re-encrypted ciphertext fed back by the encryption proxy node.

[0026] In a fourth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in any one of the above-mentioned power data processing method embodiments when executing the computer program.

[0027] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in any one of the above-mentioned power data processing method embodiments.

[0028] In a sixth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned power data processing method embodiments.

[0029] In a seventh aspect, the present application provides a power data traceability method, which is applied to the data traceability method of any of the above-mentioned blockchain power data traceability system embodiments, and the method includes:

[0030] Sending a power data traceability request carrying the digital signature of the data traceability party to a blockchain node, so that the verification node in the blockchain authenticates the data traceability party based on the digital signature;

[0031] When the data traceability party passes the identity authentication, a rich query is performed in the blockchain through a preset smart contract to obtain the power data traceability result.

[0032] In one embodiment, after obtaining the power data tracing result, the power data tracing method further includes:

[0033] Obtain the identity information of the blockchain node corresponding to the power data traceability result;

[0034] The blockchain node is authenticated based on the identity information, and the power data traceability result is verified for validity to obtain an identity authentication result and a validity verification result.

[0035] In one embodiment, after obtaining the identity authentication result and the validity verification result, the power data tracing method further includes:

[0036] When the blockchain node passes the identity authentication and the power data traceability result passes the validity verification, determining whether the number of re-encrypted ciphertexts included in the power data traceability result is greater than a preset threshold value;

[0037] When the number of the re-encrypted ciphertexts is greater than the preset threshold value, merging the re-encrypted ciphertexts in the power data tracing result to obtain a merged re-encrypted ciphertext;

[0038] Based on a preset private key, the combined re-encrypted ciphertext is decrypted to obtain target power data.

[0039] In an eighth aspect, the present application further provides a power data tracing device, comprising:

[0040] A request sending module is used to send a power data traceability request to a blockchain node through a blockchain interface. The power data traceability request carries a digital signature of the data traceability party, and the digital signature is used by the blockchain node to authenticate the data traceability party.

[0041] The data tracing module is used to perform rich queries in the blockchain through a preset smart contract to obtain power data tracing results when the data tracing party passes identity authentication.

[0042] In a ninth aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above-mentioned power data traceability embodiments when executing the computer program.

[0043] In a tenth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned power data tracing method embodiments are implemented.

[0044] In the eleventh aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned power data tracing method embodiments.

[0045] The above-mentioned blockchain-based power data traceability system, power data processing method, power data traceability method, device, computer equipment, computer-readable storage medium and computer program product are different from traditional solutions. During the power data processing process, each blockchain node will initially encrypt the received original power data through the key stored on the local end to obtain initial encrypted data, and then the encryption agent node authorized by the blockchain node will further re-encrypt the initial encryption result to obtain re-encrypted ciphertext. Combined with the decentralized distributed ledger technology of the blockchain, the re-encrypted ciphertext is stored in the blockchain, which can greatly reduce the risk of single point failure and improve the security of the power data storage process. Furthermore, in the process of power data traceability, when the data traceability party initiates a power data traceability request, the blockchain node first authenticates the data requester through the digital signature carried in the power data traceability request. Only when the identity authentication is passed, the power data traceability will be carried out in the blockchain through the preset smart contract, thereby improving the security of the data traceability process; and, the power data stored in the blockchain has undergone initial encryption and re-encryption, so that in the process of data interaction with the data traceability party, the power data traceability results are not easily tampered with or leaked, thereby improving the security of the data traceability process. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 This is an application environment diagram of a power data processing method and a power data tracing method in one embodiment;

[0048] Figure 2 1 is a flow chart of a method for processing power data in one embodiment;

[0049] Figure 3 is a flowchart of a power data processing method in a detailed embodiment;

[0050] Figure 4 Schematic diagram of a flow chart of a power data tracing method in one embodiment;

[0051] Figure 5 A flowchart of a power data tracing method in a detailed embodiment;

[0052] Figure 6 is a structural block diagram of a power data processing device in one embodiment;

[0053] Figure 7 is a structural block diagram of a power data processing device in one embodiment;

[0054] Figure 8 This is a structural block diagram of a blockchain-based power data traceability system in one embodiment;

[0055] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0057] The power data processing method provided in the embodiment of the present application can be applied to Figure 1 In the blockchain-based power data traceability system shown in FIG, the blockchain node 110 is respectively connected to the encryption agent node 120 and the data traceability party 130.

[0058] Specifically, blockchain node 110 initially encrypts the received raw power data using its locally stored key to obtain the initial encrypted data. It then determines a re-encryption key based on its locally stored key and the key of the data traceability source. Based on the number of encryption proxy nodes 120 and the re-encryption key, it generates multiple re-encryption key fragments. These re-encryption key fragments are sent to encryption proxy nodes 120, with each re-encryption key fragment corresponding to each encryption proxy node. The encryption proxy node 120 then re-encrypts the initial encrypted data using the re-encryption key fragments to obtain a re-encrypted ciphertext, which it then feeds back to blockchain node 110. Blockchain node 110 then stores the re-encrypted ciphertext fed back by the encryption proxy node on-chain.

[0059] When data traceability source 130 sends a power data traceability request carrying its digital signature to blockchain node 110, blockchain node 110 authenticates the data traceability source based on the digital signature. If the authentication is successful, data traceability source 130 performs a rich query on the blockchain through a pre-set smart contract to obtain the power data traceability result. Blockchain node 110 can be a data node through which power data flows, including but not limited to terminals, edge servers, master stations, data development departments, etc.

[0060] In an exemplary embodiment, Figure 2 As shown, a power data processing method is provided, which is applied to Figure 1 Taking the blockchain node 110 in FIG. 1 as an example, the following steps are included:

[0061] S100 , initially encrypting the received original power data using the key stored in the local end to obtain initial encrypted data.

[0062] Among them, the key stored in the blockchain node can be used to encrypt the received original power data, which includes but is not limited to power consumption, power consumption time, data type, device identification and other data. The initial encryption method can be symmetric encryption or asymmetric encryption.

[0063] Specifically, for raw power data that requires privacy protection and sharing, the blockchain node that owns the data initiates a request and encrypts the raw power data using the key stored on the blockchain node itself. The raw power data is encrypted into ciphertext to obtain the initial encrypted data, thereby protecting the raw power data from being directly exposed.

[0064] S200: Sending a data re-encryption message carrying initial encrypted data and a preset re-encryption key to an authorized encryption proxy node.

[0065] Among them, the data re-encryption message is used to instruct the encryption proxy node to re-encrypt the initial encrypted data using the re-encryption key to obtain the re-encrypted ciphertext. The re-encryption key is determined based on the key stored on the local end and the key of the data traceability party.

[0066] An encryption proxy node is a trusted entity between the sender and receiver. In this embodiment, there are multiple encryption proxy nodes, which together form a proxy using a threshold proxy re-encryption scheme. After receiving the data re-encryption message and the re-encryption key, the multiple encryption proxy nodes collaborate to send the initial encryption result sent by the blockchain node, re-encrypting it into a form that the receiver can decrypt, thereby generating re-encrypted ciphertext. Re-encryption differs from initial encryption in that the multiple encryption proxy nodes re-encrypt the initial encryption result without decrypting it.

[0067] S300: Receive the re-encrypted ciphertext fed back by the encryption proxy node.

[0068] Re-encrypted ciphertext refers to the final encryption result after being processed by the encryption proxy node. The encryption proxy node feeds the re-encrypted ciphertext back to the blockchain node, which then stores it on-chain. Because blockchain is a distributed ledger technology, once data is on-chain, it becomes immutable and traceable, making the re-encrypted ciphertext impossible to tamper with while stored. The decentralized nature of blockchain also increases data transparency and security.

[0069] In this embodiment, by combining multi-layer encryption and blockchain technology, the security and immutability of raw power data from collection to storage are enhanced. Initial encryption protects the basic security of raw power data, while re-encryption further enhances the security and access control of raw power data. On-chain storage provides complete traceability and tamper-proofing for raw power data. This combination of multiple mechanisms enhances user privacy and data security in the power industry.

[0070] In an exemplary embodiment, Figure 3 As shown, S100 includes:

[0071] S110, symmetrically encrypting the received original power data using the public key stored in the local end to obtain initial encrypted data, where the public key stored in the local end is determined based on an elliptic curve cryptography key generation algorithm.

[0072] In this embodiment, the blockchain node uses the public key stored locally to encrypt the raw power data. The public key is part of a key pair in the encryption process, the other part being the corresponding private key. The public key can be publicly used to encrypt data, but decryption can only be performed with the corresponding private key. Symmetric encryption is an encryption method that uses the same key to encrypt and decrypt data. Elliptic curve cryptography key generation algorithm is a public key encryption technology that generates a key pair (public key and private key) through point operations on an elliptic curve.

[0073] For example, before the initial encryption of the raw power data, the identity of the blockchain node needs to be verified. For example, calling the node API of Hyperledger Fabric to connect to the blockchain, using the blockchain address node_address of the blockchain node as a parameter, and using the query function to query and return the blockchain node information, the query process can be expressed as formula (1):

[0074] (1)

[0075] In formula (1), Represents the query results, including but not limited to digital certificates, transaction history records, organizational information, and identity confirmation information. Furthermore, identity comparison and verification are performed based on the query results, including but not limited to: verifying whether the digital certificate is valid (by verifying its signature), checking whether there are any abnormal or illegal activities in the transaction history records, confirming whether the organizational information is consistent with expectations, and checking whether the identity confirmation information matches. After confirming the identity, the encryption proxy node needs to set the client's identity. The setting method is shown in formula (2):

[0076] (2)

[0077] in Indicates the client identity settings, is the client object, Is the identity information of the node, and then use the function Get the client's identification information:

[0078] (3)

[0079] in Is the client identification information, Is the client object.

[0080] After verifying the identity information of the blockchain node, it is necessary to generate a key for initial encryption. The specific key generation process is as follows: set the security parameter sec, select a prime number q, and use it as the generator of the cyclic group G. is a generator of the group. Define a set of hash functions ,in , key derivation function , where the parameter l is derived from the security parameter sec. These parameters constitute the public parameter set of the system Then, using the elliptic curve cryptography key generation algorithm, a random number is selected. ,calculate , the public key and private key of the blockchain node are calculated as , and the public key and private key of the data traceability party are .

[0081] Then, the blockchain node is based on its own public key The original power data is initially encrypted. The initial encryption process is: select a random value ,calculate , and then calculate , , , and finally Use the key to symmetric encrypt the original power data and obtain the initial encryption result , The plain text representing the raw power data.

[0082] In this embodiment, public key symmetric encryption is used so that only the person (or device) holding the corresponding private key can decrypt and read the data, which can effectively reduce the risk of data tampering or theft. The introduction of the elliptic curve cryptography key generation algorithm further improves encryption efficiency and security.

[0083] In an exemplary embodiment, the number of encryption proxy nodes is multiple, and the re-encryption key is determined based on the following steps: generating a re-encryption key based on the private key stored on the local end, the public key of the data traceability party, and the number of encryption proxy nodes.

[0084] The private key stored on this end is a pair with the public key stored in this section in the above embodiment, and can be used to decrypt data encrypted by the public key. In this embodiment, the specific process of generating the re-encryption key is as follows: , where the parameter N is the number of re-encryption key fragments generated by re-encryption (that is, the number of participating encryption proxy nodes), and a random number is selected ,calculate 、 , since the re-encryption scheme is non-interactive, It is the key and temporary key pair of the data traceability party Then, a random value is selected ,calculate , and construct the series as Polynomial ,For example , further, calculate ,set up And repeat N times. Select random value ,in is the node number of the encryption agent, and is calculated 、 、 、 、 as well as , define the re-encrypted fragment as , , output the re-encryption key The re-encryption process is as follows: multiple encryption proxy nodes determine Is it established? Calculate 、 , output ,in Re-encrypt the ciphertext.

[0085] In this embodiment, multiple encryption proxy nodes participate in the re-encryption process. Even if the key of a certain encryption proxy node is leaked or other data security issues arise, the participation of other encryption proxy nodes can ensure that the data security of the overall system is as unaffected as possible, further improving the data security of the power data processing process.

[0086] In order to make a clearer description of the power data processing method provided by this application, the following is a detailed embodiment and attached Figure 3 The power data processing method is explained and described. The detailed embodiment includes the following steps:

[0087] S110, symmetrically encrypting the received original power data using the public key stored in the local end to obtain initial encrypted data, where the public key stored in the local end is determined based on an elliptic curve cryptography key generation algorithm.

[0088] S200, send a data re-encryption message carrying the initial encrypted data and a preset re-encryption key to the authorized encryption proxy node. The data re-encryption message is used to instruct the encryption proxy node to re-encrypt the initial encrypted data using the re-encryption key to obtain a re-encrypted ciphertext. The re-encryption key is determined based on the key stored on this end and the key of the data traceability party.

[0089] S300: Receive the re-encrypted ciphertext fed back by the encryption proxy node.

[0090] In an exemplary embodiment, Figure 4 As shown, a power data processing method is provided, which is applied to Figure 1The data traceability method 130 in the example is used as an example to illustrate, including the following steps:

[0091] S400: Send a power data traceability request carrying the digital signature of the data traceability party to the blockchain node.

[0092] S500, when the data traceability party passes the identity authentication, a rich query is performed in the blockchain through the preset smart contract to obtain the power data traceability results.

[0093] The blockchain interface refers to an interface through which data traceability parties interact with the blockchain network. Data traceability parties can use the blockchain interface to send power data traceability requests to blockchain nodes. Power data traceability requests are used to track specific target power data. A smart contract is an automated, code-based protocol that automatically executes operations based on preset conditions. In this embodiment, the data query process can be automatically managed through smart contracts. A rich query refers to the retrieval of complex, comprehensive information rather than just a single data point during the query process. For example, a rich query can query power data flow records across multiple time periods and between different nodes, thereby providing richer and more detailed traceability information.

[0094] For example, the data traceability party can be a regulatory agency or a data trading center. When either sends a data traceability request to the blockchain, the blockchain node in the blockchain verifies the identity of the data traceability party. The identity information of the regulatory agency or data trading center can be stored in the certificate authority (CA) provided by the member service of the Fabric network. Each organization has its own CA, which is responsible for managing and issuing digital certificates for its members: , where Indicates organization, Indicates a member of an organization. The power data traceability request carries the digital signature of the data traceability party. The blockchain node will first use the digital signature based on the elliptic curve encryption algorithm to verify the identity of the data traceability method. The specific verification process is as follows: , For the digital signature of the data traceability party, when When the digital signature is verified, the data traceability party passes the identity verification. Further, the access control list (ACL) of the Fabric network or the access control logic in the smart contract is used to check whether the data traceability party has access rights. The access control list is verified by the formula Sure, Indicates the role, Indicates permissions, , only authorized data traceability parties can perform specific traceability operations.

[0095] When the data traceability party has traceability authority, automatic traceability information query can be performed through the smart contract in the blockchain: ,The smart contract performs rich query on the information stored in each block in the ,blockchain, that is, a query method that uses complex conditions, sorting, paging, and full-text search to retrieve and filter data, and uses key-value pairs to query primary key information to obtain relevant ,information, and obtain the power data traceability results, which are then ,sent to the data traceability party.

[0096] Specifically, the authorized data traceability party first sets the user identity to the client's current identity so that it can connect to the blockchain network and perform query operations: ,in Represents the client's identity setting operation, is the client instance, It is the user's identity information. Further, the data traceability party connects to the gateway and obtains the specified channel and chain code. The specific process is as follows: ,in is the network channel instance to which the client connects; , is the chaincode contract instance in the network channel, is the channel name, is the chain code name. Finally, the power data traceability result including the re-encrypted ciphertext is obtained according to the query function in the chain code:

[0097]

[0098] in, is the re-encrypted ciphertext obtained by the query, is the chaincode contract instance, is the name of the chaincode query function, Is the key used to identify a specific re-encrypted ciphertext.

[0099] In this embodiment, through digital signature and identity authentication mechanism, the power data traceability request can be made legal and secure. Only authorized data traceability can query and trace the data. Combined with smart contracts, the data query process is made more automated. Through rich queries, the flow process of power data can be understood more comprehensively and more accurate power data traceability results can be obtained.

[0100] In one embodiment, Figure 5 As shown, after S500, the power data tracing method further includes:

[0101] S600, obtain the identity information of the blockchain node corresponding to the power data traceability result, authenticate the blockchain node based on the identity information, and verify the validity of the power data traceability result to obtain the identity authentication result and the validity verification result.

[0102] Following the above embodiment, after receiving the power data traceability result, the data traceability party also needs to verify the identity of the blockchain node to confirm that the power data traceability result is from an authorized blockchain node. First, the information of the transaction creator corresponding to the power data traceability result is obtained, and the identity of the obtained identity information is authenticated to verify that the transaction creator is an authorized blockchain node. , , It is the verification result, which indicates whether the transaction creator is authorized and obtains the authentication result. Furthermore, it is necessary to verify the validity of the power data traceability result. The data traceability party first verifies Is the signature correct? Specifically, the calculation of the hash coefficient in the verification equation can be as follows:

[0103] in, and is the original encrypted value, are the public parameters used to generate the proof, 、 、 is the intermediate value in the re-encryption process, where 、 、 , It is the preset auxiliary information used to verify the validity of the power data traceability results. After verification:

[0104] 、 、

[0105] The validity verification result of the power data traceability result can be obtained.

[0106] In this embodiment, the security of the data sharing process between the blockchain nodes and the data traceability parties is improved through double verification of the blockchain nodes and the power data traceability results.

[0107] In one embodiment, Figure 5 As shown, after S600, the power data tracing method further includes:

[0108] S700, when the blockchain node passes the identity authentication and the power data traceability result passes the validity verification, determine whether the number of re-encrypted ciphertexts contained in the power data traceability result is greater than the preset threshold value.

[0109] S800: When the number of re-encrypted ciphertexts is greater than a preset threshold, the re-encrypted ciphertexts in the power data traceability result are merged to obtain a merged re-encrypted ciphertext.

[0110] S900: Decrypt the combined re-encrypted ciphertext based on the preset private key to obtain the target power data.

[0111] Continuing from the above embodiment, when the blockchain node passes the identity authentication and the power data traceability result passes the validity verification, the data traceability party decrypts the power data traceability result. Since there are multiple encryption proxy nodes, the power data traceability result also includes multiple re-encrypted ciphertexts obtained by re-encrypting multiple encryption proxy nodes. Only when the data traceability party obtains a number of re-encrypted ciphertexts exceeding the preset threshold value, can the data traceability party decrypt it through the private key to obtain the target power data.

[0112] Specifically, when the number of re-encrypted ciphertexts is greater than the preset threshold, the data traceability party merges the re-encrypted ciphertexts in the power data traceability results and decrypts the merged re-encrypted ciphertexts using the private key, i.e. ,in , the specific decryption process is: ,calculate 、 ,in ,calculate, 、 、 、 , output symmetric key , and then the data traceability party uses the key The combined re-encrypted ciphertext is decrypted to obtain the target power data.

[0113] In this embodiment, through the threshold proxy re-encryption algorithm, the encrypted content can be converted from one key to another while maintaining the encrypted state. Only when the data traceability party obtains a certain number (exceeding the threshold value) of re-encrypted ciphertexts can it use its own private key to decrypt the data and obtain the target power data without knowing the key of the blockchain node, thereby improving the data security of the data traceability and data sharing process.

[0114] In order to make a clearer description of the power data traceability method provided by this application, the following is a detailed embodiment and attached Figure 5The power data traceability method is explained and described. The detailed embodiment includes the following steps:

[0115] S400: Send a power data traceability request carrying the digital signature of the data traceability party to the blockchain node.

[0116] S500, when the data traceability party passes the identity authentication, a rich query is performed in the blockchain through the preset smart contract to obtain the power data traceability results.

[0117] S600, obtain the identity information of the blockchain node corresponding to the power data traceability result, authenticate the blockchain node based on the identity information, and verify the validity of the power data traceability result to obtain the identity authentication result and the validity verification result.

[0118] S700, when the blockchain node passes the identity authentication and the power data traceability result passes the validity verification, determine whether the number of re-encrypted ciphertexts contained in the power data traceability result is greater than the preset threshold value.

[0119] S800: When the number of re-encrypted ciphertexts is greater than a preset threshold, the re-encrypted ciphertexts in the power data traceability result are merged to obtain a merged re-encrypted ciphertext.

[0120] S900: Decrypt the combined re-encrypted ciphertext based on the preset private key to obtain the target power data.

[0121] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0122] Based on the same inventive concept, the embodiments of the present application also provide a power data processing device for implementing the power data processing method involved above, and a power data tracing device for implementing the power data tracing method involved above. The implementation solution provided by the device is similar to the implementation solution described in the above method, so the specific limitations in the embodiments of one or more power data processing devices and power data tracing devices provided below can be found in the above limitations on the power data processing method and the power data tracing method, and will not be repeated here.

[0123] In an exemplary embodiment, Figure 6 As shown, a power data processing device 600 is provided, comprising: an initial encryption module 610, a re-encryption module 620 and a data storage module 630, wherein:

[0124] The initial encryption module 610 is used to perform initial encryption on the received original power data using the key stored in the local terminal to obtain initial encrypted data;

[0125] The re-encryption module 620 is configured to send a data re-encryption message carrying the initially encrypted data and a preset re-encryption key to an authorized encryption proxy node. The data re-encryption message instructs the encryption proxy node to re-encrypt the initially encrypted data using the re-encryption key to obtain re-encrypted ciphertext. The re-encryption key is determined based on the key stored on the local terminal and the key of the data traceability party.

[0126] The data receiving module 630 is configured to receive the re-encrypted ciphertext fed back by the encryption proxy node.

[0127] In one embodiment, the initial encryption module 610 is further used to symmetrically encrypt the received original power data using the public key stored on the local end to obtain initial encrypted data. The public key stored on the local end is determined based on an elliptic curve cryptography key generation algorithm.

[0128] In one embodiment, the power data processing device 600 is further configured to generate a re-encryption key based on a private key stored on the local end, a public key of the data traceability party, and the number of encryption proxy nodes.

[0129] In an exemplary embodiment, Figure 7 As shown, a power data tracing device 700 is provided, including: a request sending module 710 and a data tracing module 720, wherein:

[0130] The request sending module 710 is used to send an electric power data traceability request carrying the digital signature of the data traceability party to the blockchain node, so that the verification node in the blockchain can authenticate the data traceability party based on the digital signature.

[0131] The data tracing module 720 is used to perform a rich query in the blockchain through a preset smart contract to obtain the power data tracing results when the data tracing party passes the identity authentication.

[0132] In one instance, the power data traceability device 700 is also used to obtain the identity information of the blockchain node corresponding to the power data traceability result, authenticate the blockchain node based on the identity information, and verify the validity of the power data traceability result to obtain the identity authentication result and the validity verification result.

[0133] In one instance, the power data traceability device 700 is also used to determine whether the number of re-encrypted ciphertexts contained in the power data traceability result is greater than a preset threshold value when the blockchain node passes identity authentication and the power data traceability result passes validity verification. When the number of re-encrypted ciphertexts is greater than the preset threshold value, the re-encrypted ciphertexts in the power data traceability result are merged to obtain a merged re-encrypted ciphertext, and the merged re-encrypted ciphertext is decrypted based on the private key of the data traceability party to obtain the target power data.

[0134] Each module in the above-mentioned power data processing device and power data tracing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0135] Based on the same inventive concept, the embodiment of the present application also provides a blockchain-based power data traceability system 800 for implementing the above-mentioned power data processing method and the above-mentioned power data traceability method 820, as shown in FIG. Figure 8 As shown, the blockchain-based power data traceability system 800 includes a blockchain node 810, a data traceability party 820, and multiple encryption proxy nodes 830 authorized by the blockchain node 810. The blockchain node 810 is communicated with the encryption proxy node 830 and the data traceability party 820 respectively.

[0136] The blockchain node 810 is used to initially encrypt the received raw power data using the key stored on this end to obtain the initial encrypted data, determine the re-encryption key based on the key and the key of the data traceability party 820, generate multiple re-encryption key fragments according to the number of encryption proxy nodes 830 and the re-encryption key, and send the multiple re-encryption key fragments to the encryption proxy node 830. The re-encryption key fragments correspond to the encryption proxy node 830 one-to-one.

[0137] The encryption proxy node 830 is used to re-encrypt the initial encrypted data according to the re-encryption key fragment to obtain the re-encrypted ciphertext, and feed the re-encrypted ciphertext back to the blockchain node 810.

[0138] The data traceability party 820 is used to send a power data traceability request to the blockchain node 810, and the power data traceability request carries the digital signature of the data traceability party 820; and when the identity authentication is passed, a rich query is performed in the blockchain through a preset smart contract to obtain the power data traceability result.

[0139] The blockchain node 810 is also used to authenticate the data traceability party 820 based on the digital signature when receiving an electric power data traceability request sent by the data traceability party 820 and carrying the digital signature of the data traceability party 820.

[0140] Among them, the blockchain node 810 mainly includes terminals, edge servers, main stations, and data development centers. In the process of power data collection, sensors are mainly basic hardware such as electricity meters. Since they do not have intelligent features, they are not used as blockchain nodes 810. Specifically, the terminal can be a smart terminal, which is generally used for data collection. The data involved includes but is not limited to electricity consumption, electricity consumption time, data type, device identification, terminal operation status, and collection timestamp; the edge server is generally used for data processing, and the data involved includes but is not limited to electricity consumption, data processing logs, data processing results, server status, device label, and data transmission information; the main station is generally used for data aggregation, and the data involved includes but is not limited to data volume, data quality, data storage location, server information, main station status, main station identification, and data transmission information; the data development department is generally used for data development, and the data involved includes but is not limited to data volume, development process, development results, and development department information. Smart terminals, edge servers, main stations, and data development departments are used as blockchain nodes 810 to record every step of the data collection, processing, aggregation, and development process. Through the data chain structure of the blockchain, when it is necessary to trace data processing information and data transmission information, the operations performed on the data by all nodes involved in the data processing and detailed information on the equipment can be queried in a timely manner.

[0141] The blockchain in this embodiment is built on the Hyperledger Fabric architecture, utilizing the PBFT (Practical Byzantine Fault Tolerance) consensus mechanism and smart contracts written in JavaScript to automatically execute and verify data processing operations. Hyperledger Fabric is an open-source blockchain platform hosted by the Linux Foundation and designed for enterprise applications. It is part of the Hyperledger project, which aims to provide a modular architecture to facilitate the development and deployment of blockchain solutions. Smart contracts enhance the authenticity and consistency of each data operation and make data operations automated and transparent. Furthermore, smart contracts facilitate the storage of various data types, including the identity information of blockchain nodes 810, shared data, and operational information, enhancing the system's data management capabilities and convenience. During the blockchain network initialization phase, the system undergoes processes such as container startup, smart chaincode loading, database initialization, authorization certificate generation, initial public key pair generation, and initial ledger updates. Furthermore, all participating nodes are identified and their identity information (such as device identification, location information, and category) is registered.

[0142] In the system of this embodiment, when data traceability and data sharing are involved, the encryption algorithm used is a threshold proxy re-encryption algorithm, which provides security for data sharing between blockchain nodes 810 and between blockchain nodes 810 and other data nodes. Specifically, for blockchain nodes 810 that need to share data, after blockchain identity confirmation and security authentication, multiple encryption proxy nodes 830 map ciphertext into re-encrypted ciphertext fragments without decrypting the original text and store them on the blockchain. Data traceability parties 820130 can obtain the original text after collecting re-encrypted ciphertext that exceeds the threshold value.

[0143] The data traceability party 820 in this embodiment can be a power data monitoring department and a data trading center. The power data monitoring department is responsible for real-time monitoring of the power data collection and transmission process, as well as forward tracing of data recorded on the blockchain. The power data monitoring department can monitor the operation of each blockchain node 810 in real time, improve the accuracy and reliability of the data, and respond quickly when anomalies occur. Through these real-time monitoring and recording functions, the power data monitoring department can effectively manage the entire life cycle of power data. The data trading center is a platform for data exchange and transaction. It communicates and transacts with the data development department, records the detailed information of each data transaction, and realizes the automated processing of data transactions through smart contracts, improving the fairness, justice, and traceability of data transactions. When problems arise with power data, the data trading center can reversely trace the source through the services provided by the blockchain backend to quickly locate and resolve the problem. In addition, the data trading center facilitates task delineation and workload assessment, improving data management and operational efficiency.

[0144] It should be noted that, in this embodiment, the data processing process of the blockchain node 810, the encryption proxy node 830 and the data traceability party 820 in the blockchain-based power data traceability system 800 has been introduced in detail in the above power data processing method embodiment and the power data traceability method embodiment, and will not be repeated here.

[0145] The above-mentioned blockchain-based power data traceability system is different from traditional solutions. During the power data processing process, each blockchain node will initially encrypt the received raw power data using the key stored on the local end to obtain the initial encrypted data. The encryption proxy node authorized by the blockchain node will then further re-encrypt the initial encryption result to obtain the re-encrypted ciphertext. Combined with the decentralized distributed ledger technology of the blockchain, the re-encrypted ciphertext is stored in the blockchain, which can effectively reduce the risk of single point failure and improve the security of the power data storage process. Furthermore, during the power data traceability process, when the data traceability party initiates a power data traceability request, the blockchain node first authenticates the data requester through the digital signature carried in the power data traceability request. Only if the authentication is passed will the power data traceability be carried out in the blockchain through the preset smart contract, thereby improving the security of the data traceability process. In addition, the power data stored in the blockchain has been initially encrypted and re-encrypted. Therefore, during the data interaction with the data traceability party, the power data traceability result is not easily tampered with or leaked, thereby improving the security of the data traceability process.

[0146] In one embodiment, the data traceability party 820 is also used to obtain the identity information of the blockchain node corresponding to the power data traceability result, authenticate the identity of the blockchain node 810 based on the identity information, and verify the validity of the power data traceability result to obtain the identity authentication result and the validity verification result.

[0147] The specific limitations of this embodiment can be found in the above limitations on the power data traceability method, which will not be repeated here.

[0148] In one embodiment, the data traceability party 820 is also used to determine whether the number of re-encrypted ciphertexts contained in the power data traceability result is greater than a preset threshold value when the blockchain node 810 passes identity authentication and the power data traceability result passes validity verification. When the number of re-encrypted ciphertexts is greater than the preset threshold value, the re-encrypted ciphertexts in the power data traceability result are merged to obtain a merged re-encrypted ciphertext, and the merged re-encrypted ciphertext is decrypted based on a preset private key to obtain the target power data.

[0149] The specific limitations of this embodiment can be found in the above limitations on the power data traceability method, which will not be repeated here.

[0150] In an exemplary embodiment, the system also includes a verification node for obtaining re-encrypted ciphertext, and packaging the re-encrypted ciphertext to generate a block when the re-encrypted ciphertext meets the preset block packaging and uploading conditions. The block packaging and uploading conditions are determined based on the generation time of the re-encrypted ciphertext, the data processing quantity threshold preset in the blockchain, and the block size threshold preset in the blockchain. When it is determined that the blockchain nodes 810 in the blockchain reach a consensus according to the preset consensus mechanism, the block is stored on the chain.

[0151] The re-encrypted ciphertext refers to the final encryption result after being processed by the encryption proxy node 830. The encryption proxy node 830 feeds the re-encrypted ciphertext back to the blockchain node 810, which then stores it on-chain. Because blockchain is a distributed ledger technology, once data is on-chain, it becomes immutable and traceable, making the re-encrypted ciphertext impossible to tamper with while stored. The decentralized nature of blockchain also increases data transparency and security.

[0152] Block packaging refers to the way blockchain systems package data into blocks for storage. Blocks are the basic unit of data storage in blockchains, and each block can contain multiple data entries. The packaging process involves grouping these data together according to certain rules and conditions. For example, a blockchain system determines whether to package data based on the time the ciphertext was generated. For example, if the time since the last block generation exceeds the preset batch timeout, block generation is triggered. Blockchains typically set a threshold; when the amount of accumulated data on the chain reaches this threshold, data is packaged and generated into blocks. For example, when the number of transactions in a batch reaches a preset maximum number of transactions, block generation is triggered. Furthermore, to prevent blocks from becoming too large, blockchain systems limit the size of each block. For example, when the total size of the transaction data in a batch reaches the preset maximum block size (in bytes), block generation is triggered.

[0153] A consensus mechanism means that within a blockchain, the storage of a block must be verified and agreed upon by multiple blockchain nodes 810. In this embodiment, the consensus mechanism used may be the PBFT consensus mechanism. A validator node is a special node within the blockchain, responsible for verifying the authenticity and integrity of data. A validator node 810 is only allowed to store a block within the blockchain if, through the consensus mechanism, it determines that a majority of blockchain nodes 810 (e.g., more than two-thirds of the blockchain nodes 810) agree on the correctness of the data. Furthermore, each blockchain node 810 maintains a complete copy of the blockchain. When a new block is verified, it is added to the local copy of each blockchain node 810, ensuring data synchronization within the blockchain.

[0154] Specifically, when determining whether the re-encrypted ciphertext meets the preset block packaging and upload conditions, it is necessary to consider the impact of the block generation time interval and the computing power of the blockchain node 810, including the accumulated number of transactions and block size. When the block packaging and upload conditions are met, it is necessary to go through a series of operations such as endorsement, packaging, distribution, and consensus. Finally, the verification node reaches a consensus and submits the new block to the local blockchain copy. Only then will the new block be added to the blockchain and broadcast to the entire network. After verifying the validity of the block, other blockchain nodes 810 in the blockchain also add it to the local blockchain, ensuring the consistency and integrity of the blockchain data.

[0155] In this embodiment, through the packaging and consensus mechanism, reasonable packaging conditions are set, and the re-encrypted ciphertext is dynamically packaged to improve the efficiency and security of data storage. The consensus mechanism further enhances the security of the system, allowing data to reach consensus among multiple blockchain nodes. Ultimately, the re-encrypted ciphertext is not only fully protected, but also can achieve cross-node synchronization and efficient storage, thereby improving the security and integrity of the data.

[0156] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 9 As shown. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as re-encrypted ciphertext. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for processing power data or a method for tracing power data is implemented.

[0157] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of any power data processing method embodiment when executing the computer program.

[0159] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any power data processing method embodiment are implemented.

[0160] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of any power data processing method embodiment when executed by a processor.

[0161] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of any embodiment of the power data tracing method are implemented.

[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any embodiment of the power data tracing method are implemented.

[0163] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of any embodiment of the power data tracing method when executed by a processor.

[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0165] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0166] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0167] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A blockchain-based power data traceability system, characterized by: The system includes a blockchain node, a data traceability party, and multiple encryption proxy nodes authorized by the blockchain node, wherein the blockchain node is respectively communicated with the encryption proxy node and the data traceability party; The blockchain node is configured to initially encrypt the received raw power data using a key stored locally to obtain initial encrypted data, determine a re-encryption key based on the key and a key of the data traceability party, generate a plurality of re-encryption key fragments based on the number of encryption proxy nodes and the re-encryption key, and send the plurality of re-encryption key fragments to the encryption proxy nodes, wherein the re-encryption key fragments correspond one-to-one to the encryption proxy nodes; The encryption proxy node is configured to re-encrypt the initial encrypted data according to the re-encryption key fragment to obtain a re-encrypted ciphertext, and feed the re-encrypted ciphertext back to the blockchain node; The data traceability party is used to send a power data traceability request to the blockchain node, and the power data traceability request carries the digital signature of the data traceability party; And when the identity verification is passed, a rich query is performed in the blockchain through the preset smart contract to obtain the power data traceability results; The blockchain node is also used to authenticate the data traceability party based on the digital signature when receiving an electric power data traceability request sent by the data traceability party and carrying the digital signature of the data traceability party.

2. The system according to claim 1, wherein: The data traceability party is also used to obtain the identity information of the blockchain node corresponding to the power data tracing result, authenticate the identity of the blockchain node based on the identity information, and verify the validity of the power data tracing result to obtain the identity authentication result and the validity verification result.

3. The system according to claim 2, characterized in that The data traceability party is also used to determine whether the number of re-encrypted ciphertexts contained in the power data tracing result is greater than a preset threshold value when the blockchain node passes identity authentication and the power data tracing result passes validity verification. When the number of re-encrypted ciphertexts is greater than the preset threshold value, the re-encrypted ciphertexts in the power data tracing result are merged to obtain a merged re-encrypted ciphertext, and the merged re-encrypted ciphertext is decrypted based on a preset private key to obtain the target power data.

4. The system according to claim 1, wherein: The system also includes a verification node for obtaining the re-encrypted ciphertext, and packaging the re-encrypted ciphertext to generate a block if the re-encrypted ciphertext meets a preset block packaging and uploading condition. The block packaging and uploading condition is determined based on the generation time of the re-encrypted ciphertext, a data processing quantity threshold preset in the blockchain, and a block size threshold preset in the blockchain. If it is determined that the blockchain nodes in the blockchain reach a consensus according to a preset consensus mechanism, the block is stored on the chain.

5. A method for processing power data, characterized in that: In a blockchain node of a power data traceability system of a blockchain according to any one of claims 1 to 4, the method comprises: Initially encrypting the received raw power data using the key stored on the local end to obtain initial encrypted data; Sending a data re-encryption message carrying the initial encrypted data and a preset re-encryption key to the authorized encryption proxy node, wherein the data re-encryption message is used to instruct the encryption proxy node to re-encrypt the initial encrypted data using the re-encryption key to obtain a re-encrypted ciphertext, where the re-encryption key is determined based on the key stored on the local end and the key of the data traceability party; Receive the re-encrypted ciphertext fed back by the encryption proxy node.

6. The power data processing method according to claim 5, characterized in that: The initial encryption of the received original power data using the key stored in the local end to obtain the initial encrypted data includes: The received original power data is symmetrically encrypted using the public key stored in the local end to obtain initial encrypted data, wherein the public key stored in the local end is determined based on an elliptic curve cryptography key generation algorithm.

7. The power data processing method according to claim 5, characterized in that: There are multiple encryption proxy nodes, and the re-encryption key is determined based on the following steps: A re-encryption key is generated based on the private key stored on the local end, the public key of the data traceability party, and the number of the encryption proxy nodes.

8. A method for tracing the source of power data, characterized in that: In the data tracing method of the blockchain-based power data tracing system according to any one of claims 1 to 4, the power data tracing method includes: Sending a power data traceability request carrying the digital signature of the data traceability party to a blockchain node, so that the verification node in the blockchain authenticates the data traceability party based on the digital signature; When the data traceability party passes the identity authentication, a rich query is performed in the blockchain through a preset smart contract to obtain the power data traceability result.

9. The power data tracing method according to claim 8, characterized in that: After obtaining the power data tracing result, the method further includes: Obtain the identity information of the blockchain node corresponding to the power data traceability result; The blockchain node is authenticated based on the identity information, and the power data traceability result is verified for validity to obtain an identity authentication result and a validity verification result.

10. The power data tracing method according to claim 9, characterized in that: After obtaining the identity authentication result and the validity verification result, the method further includes: When the blockchain node passes the identity authentication and the power data traceability result passes the validity verification, determining whether the number of re-encrypted ciphertexts included in the power data traceability result is greater than a preset threshold value; When the number of the re-encrypted ciphertexts is greater than the preset threshold value, merging the re-encrypted ciphertexts in the power data tracing result to obtain a merged re-encrypted ciphertext; Based on a preset private key, the combined re-encrypted ciphertext is decrypted to obtain target power data.

Citation Information

Patent Citations

  • Tracing data access control method based on improved proxy re-encryption

    CN111008855A

  • Product data chaining method based on blockchain and smart contract and medium

    CN113098876A