Power data privacy protection and security supervision method and system based on block chain
By employing homomorphic encryption, asymmetric keys, attribute-based encryption, and blockchain technology, the contradiction between power data privacy protection and on-chain data supervision has been resolved, achieving both privacy protection and efficient supervision of power data, and ensuring the transparency and security of transactions.
Patent Information
- Application Number
- CN202410262712.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2024-11-08
AI Technical Summary
Existing technologies in power systems have failed to effectively utilize homomorphic encryption and zero-knowledge proofs simultaneously, making it impossible to simultaneously achieve privacy protection of power data and supervision of on-chain data, resulting in privacy information leakage and electricity theft security issues.
By employing homomorphic public and private keys, asymmetric keys, attribute-based encryption, and blockchain technology, transaction information is verified through additive homomorphic properties, and smart contracts are designed for access control, thereby enabling encrypted processing of power data and auditing by regulatory agencies.
It achieves privacy protection for electricity data and efficient supervision of on-chain data, ensuring the transparency and immutability of transactions, enhancing data security and regulatory capabilities, and reducing the risk of electricity theft.
Smart Images

Figure CN118916908A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of blockchain, homomorphic encryption, zero-knowledge proof, and attribute-based encryption, and in particular relates to a method and system for privacy protection and security supervision of power data based on blockchain. Background Art
[0002] With the rapid development of smart grids, massive amounts of power data will be generated in the five major links of power generation, transmission, transformation, distribution and consumption. For enterprises, they can discover the deep semantics of the data through data mining, artificial intelligence and other methods to create more value. However, these deep semantics often contain the privacy information of power users.
[0004] The main method to solve the problem of privacy information leakage of power users is to use privacy computing technologies including homomorphic encryption and zero-knowledge proof. [1] A power resource scheduling framework (PRDF) with privacy protection function is proposed, which adopts a certificateless aggregate signcryption scheme based on cloud-fog collaboration. [2] A supervised blockchain transaction privacy protection model is proposed by using probabilistic public key encryption algorithm, commitment scheme, zero-knowledge proof and identity-based encryption system. [3] This paper studies the privacy protection model of power data based on data features, adopts a feature classification model based on the maximum information coefficient, and uses differential privacy technology to obtain privacy-protected anonymous data sets to achieve data privacy protection. [4] This paper studies the privacy protection method of power grid data based on blockchain, combines blockchain technology with Paillier homomorphic encryption method, and directly encrypts data at the smart meter end. [5] A privacy protection method based on empirical mode decomposition (EMD) and homomorphic encryption is proposed, which can effectively protect the privacy of user power data. [6] A regulated power blockchain transaction privacy protection system is proposed, which can ensure that the regulatory agency can decrypt the transaction amount and other confidential transaction information and implement strict supervision of the transaction. Wang Linxin et al. [7] A new big data privacy protection technology based on blockchain is proposed. Compared with the traditional smart grid big data privacy protection technology, the technology proposed in this paper has a high sensitive data hiding rate, short key generation time and encryption time, strong anti-decryption ability, and good application prospects. Zhou Peng et al. [8] A new smart grid data sharing framework is proposed, which realizes data sharing among distributed power sources through proxy re-encryption and homomorphic encryption technology, greatly improving user privacy rights. Guo et al. [9]Based on a novel symmetric homomorphic encryption scheme, an efficient smart grid scheme is designed to achieve lightweight aggregation.
[10] A privacy-preserving data aggregation scheme supporting fine-grained access control in smart grids is proposed. This scheme can not only ensure user privacy and the integrity of electricity consumption data, but also perform fine-grained access control on aggregated data, which can better meet practical application needs.
[0005] Wang et al.
[11] A secure stochastic energy management framework based on blockchain and directed acyclic graph modified by DAG method is proposed to improve the resilience, reliability and sustainability of networked microgrids, including novel data recovery techniques and unscented transformation methods for prediction error uncertainty modeling. Liang et al.
[12] A distributed protection framework based on blockchain is proposed, which aims to improve the self-defense capability of modern power systems against cyber attacks by encapsulating meter measurements as blocks by using meters as nodes, and proves its effectiveness through simulation experiments on the IEEE-118 benchmark system. Guan et al.
[13] A privacy-preserving and efficient data aggregation scheme is proposed to solve the problem of users' private information being leaked due to almost real-time power consumption data in smart grids. By grouping users and creating a private blockchain for each group to record member data, using pseudonyms to hide user identities, and using Bloom filters for fast identity authentication, the scheme is able to protect users' internal privacy.
[14] proposed the DeepCoin framework, combining deep learning and blockchain technology to realize a high-throughput peer-to-peer energy system based on Byzantine fault tolerance in smart grids, and introduced an intrusion detection system based on recurrent neural networks to prevent network attacks and fraudulent transactions. Luo et al.
[15] Using blockchain technology, a secure data aggregation solution based on homomorphic encryption and PBFT (PracticalByzantine Fault Tolerance) consensus was designed.
[0006] Through the above analysis, the problems and defects of the prior art are as follows:
[0007] In the operation of the power system, the transaction information between power users and enterprises can be encrypted using privacy computing technologies such as homomorphic encryption and zero-knowledge proof, and then the encrypted transaction data can be uploaded to the blockchain for storage. However, existing solutions do not consider these two technical means at the same time. They either only use technologies such as homomorphic encryption to protect transaction information, or only save the original transaction information in the blockchain. Summary of the invention
[0008] In response to the problems existing in the prior art, the present invention provides a method for privacy protection and security supervision of power data based on blockchain.
[0009] The present invention is implemented as follows: a method for privacy protection and security supervision of power data based on blockchain, comprising the following steps:
[0010] Related key generation: Generate homomorphic public and private keys and the user's asymmetric keys;
[0011] Interaction between the two parties: The transaction party signs the transaction information with its own private key, encrypts it with the public key of the power data administrator, and then sends it to the power data administrator. The power data administrator verifies the signature information of the transaction party. After successful verification, it encrypts and signs its own account address and transaction information and sends it to the transaction party. The transaction party verifies the information. If the verification is successful, it writes its own account address, transaction information, and total power consumption / balance after the transaction, encrypts and signs it, and sends it to the power data administrator;
[0012] Transaction verification and data on-chain: In order to reach a consensus on the transaction information in the blockchain, the transaction information needs to be broadcast on the chain. Other nodes first verify the ownership of the account. After the verification is passed, the legitimacy of the transaction power data is verified. Finally, the correctness of the transaction power data is verified through the properties of additive homomorphism. If all the above steps are passed, the transaction information is added to the new block.
[0013] Power data audit on blockchain: Through attribute-based encryption, regulators can decrypt on-chain data and determine the legitimacy of the data through automatic or manual audits.
[0014] Furthermore, step 3 utilizes the property of additive homomorphism to verify the ciphertext transaction information, and the calculation is as follows:
[0015]
[0016]
[0017] Furthermore, step 4 utilizes attribute-based encryption to implement access control on encrypted data decryption operations, ensuring that only regulatory agencies can obtain original plaintext transaction information to implement automatic or manual audits.
[0018] Further, the step 1 is specifically as follows:
[0019] The alliance chain administrator uses the Paillier algorithm to generate a homomorphic key, the private key sk p Saved by the administrator, when the user joins the alliance chain, the administrator will use the homomorphic public key pk pSent to the user, the user uses the homomorphic public key to encrypt the transaction information. After user n joins the alliance chain, he generates an asymmetric public-private key pair (pk n ,sk n ), use the public key to generate the account address Address, and use the signature to prove the account ownership.
[0020] Further, the step 2 is specifically as follows:
[0021] User A submits a transaction application to power data administrator B, signs the transaction information m with his own private key, and then encrypts it with the private key of power data administrator B to obtain Enc B (Sig A (m)), and sends it to the power data administrator B, who receives the transaction information Enc B (Sig A (m)), use your own private key to decrypt and verify the signature of user A. After successful verification, encrypt and sign your own account address and transaction information to obtain the following information:
[0022] Enc A (Sig B (Address B )||Enc P (m)||Enc P (Sum B ))
[0023] Power data administrator B sends the encrypted ciphertext to user A. After receiving the ciphertext, user A decrypts it with the private key and verifies the signature of power data administrator B. After the verification is passed, the user writes his own account address, transaction information, and total power consumption / balance after the transaction, encrypts and signs it, and obtains the following information:
[0024] Sig B (Address B )||Sig B (Address B )||Enc P (m)||Enc P (Sum A )||Enc P (Sum B ).
[0025] Further, the step 3 is specifically as follows:
[0026] After user A receives the information from power data administrator B, it generates transaction information as described above, and then broadcasts the transaction information for other nodes to verify. The verification process is as follows:
[0027] The first step is to verify the account ownership. A and Address B Find the account addresses of user A and power data administrator B, and use Sig A and Sig B To verify whether the accounts of both parties to the transaction belong to user A and power data administrator B, once the verification is passed, proceed to the second step.
[0028] The second step is to verify the legitimacy of the transaction power data. Verify whether the total power consumption / balance amount is greater than 0 and whether the power data amount of the transaction initiator's account is greater than the transaction power data amount. Here, user A will use zero-knowledge proof to prove to the verification node to achieve privacy protection of the total power consumption / balance data. If the verification is passed here, the third step will be carried out.
[0029] The third step is to verify the correctness of the transaction power data by adding homomorphic properties, that is, to verify whether the transaction power data amount of the initiator plus the transaction power data amount is equal to the current account power data amount; and whether the current account power data amount of the recipient in the transaction plus the transaction power data amount is equal to the account power data amount before the transaction is completed, that is, whether the following two formulas are true.
[0030]
[0031]
[0032] If all three steps of verification are passed, the verification is passed. The verification node verifies the legitimacy of the transaction, writes the transaction into the new block, and updates the power data volume of the account of user A and power data administrator B to Enc respectively. P (Sum A ) and Enc P (Sum B ). On the contrary, if one of the above three steps of verification fails, the verification node returns an error message to A and terminates the verification.
[0033] When the transaction is written into the block after all verifications are passed, in order to protect the privacy of the total power consumption / balance data, it will be encrypted based on the attribute using smart contracts to meet the access control requirements.
[0034] Further, the step 4 is specifically as follows:
[0035] Although the encrypted total power consumption / balance data can protect the privacy of the data, it cannot be audited by the regulatory authorities, so it will also bring some security threats, such as the security of electricity theft caused by internal and external attackers. Therefore, this project intends to design a smart contract to perform access control and decryption operations. The regulatory authorities can audit the total power consumption / balance data through this contract. Manual audit method: The supervisor initiates a data access request and submits attributes to the smart contract at the same time. If it does not meet the requirements, the data will be refused to be provided. If the smart contract is verified, the corresponding data will be taken out from the blockchain, and the key will be used to decrypt the response transaction information, and then the decrypted data will be provided to the supervisor. The supervisor audits and supervises the total power consumption / balance data he obtains. Automatic audit method: It is planned to provide an interface that can directly link the smart contract that provides data, and then use artificial intelligence to audit and supervise these data. The problematic transaction information will be submitted to the regulatory authorities.
[0036] When a user has doubts about the queried data, he or she can initiate a query to the Public Key Infrastructure (PKI) to obtain more information.
[0037] Another object of the present invention is to provide a blockchain-based power data privacy protection and security supervision system, comprising:
[0038] The key generation module is configured with functions for generating homomorphic public and private keys and user asymmetric keys to ensure encryption and decryption of transactions and data;
[0039] The transaction party interaction module is used for the transaction party to sign the transaction information with its private key and encrypt it with the public key of the power data administrator; the power data administrator verifies the signature information of the transaction party. After successful verification, the data containing the power data administrator's account address and transaction information is encrypted and signed with its private key and sent to the transaction party; the transaction party verifies the information received from the power data administrator. After successful verification, the account address, transaction information and the total power consumption or balance after the transaction are encrypted and signed and sent to the power data administrator;
[0040] The transaction verification and data on-chain module is used to broadcast transaction information in the blockchain network so as to reach a consensus on the transaction information in the network; it is used for other nodes to first verify the account ownership, and after the verification is passed, further verify the legitimacy of the transaction power data volume, and verify the correctness of the transaction power data through the additive homomorphic property; it is used to add the transaction information to the new block after the transaction information passes all verification steps;
[0041] The power data audit module is used to enable regulatory agencies to decrypt on-chain data through attribute-based encryption technology; it is used to enable regulatory agencies to determine the legitimacy of data through automatic or manual audits.
[0042] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a blockchain-based power data privacy protection and security supervision method.
[0043] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of a blockchain-based power data privacy protection and security supervision method.
[0044] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0045] First, in view of the technical problems existing in the above-mentioned prior art, some creative technical effects are brought about after solving the problems. The specific description is as follows:
[0046] 1) During the transaction process, the power data is first encrypted using homomorphic encryption to protect data privacy. Afterwards, the administrator can conduct subsequent audits and supervision of the encrypted data through zero-knowledge proof technology while ensuring the normal transaction process.
[0047] 2) In order to prevent the security problem of electricity theft caused by internal and external attackers, the present invention also designs smart contracts through attribute-based encryption to perform access control and decryption operations. The regulatory authorities can use this contract to perform manual and automatic audits on the total electricity consumption / balance data.
[0048] Second, in order to solve the problem of leaking user privacy information during power data transactions, the present invention uses technologies such as homomorphic encryption and zero-knowledge proof to perform privacy processing on these data and the transaction process, so as to ensure that the user's power data does not affect the subsequent normal use while sensitive data is invisible. In addition, in order to prevent internal and external attackers from stealing electricity, the transaction records are uploaded to the blockchain to ensure that the transaction records cannot be tampered with. At the same time, a controllable blockchain power data protection solution is designed by using technologies such as attribute-based encryption to meet the needs of access control.
[0049] Enhanced data privacy protection: Through homomorphic encryption and asymmetric key technology, the present invention protects the user's power data privacy. Even if the data is intercepted during transmission, it cannot be interpreted by unauthorized persons.
[0050] Improved data security: The introduction of blockchain technology makes electricity data records tamper-proof, enhancing data security and reliability.
[0051] Improved regulatory capabilities: Attribute-based encryption and audit mechanisms enable regulators to effectively supervise and audit power data without infringing user privacy, reducing the risk of fraud and erroneous data.
[0052] Improved transaction efficiency: The decentralized blockchain network improves the efficiency and transparency of power data transactions, reducing centralized processing bottlenecks and related delays.
[0053] Third, the technical solution of the present invention solves the technical problems that people have been eager to solve but have never been able to solve successfully:
[0054] The privacy protection of power data and the supervision of on-chain data are relatively contradictory issues. First, the privacy protection of data requires the encryption or privacy processing of data; while the supervision of on-chain data requires the acquisition of original data. The present invention combines homomorphic encryption, zero-knowledge proof, attribute-based encryption and blockchain technologies to achieve the privacy protection of power data and the efficient and accurate supervision of privacy chain data.
[0055] Fourth, the significant technical progress of the power data privacy protection and security supervision method based on blockchain in the present invention is mainly reflected in the following aspects:
[0056] 1. Enhanced data privacy protection: Through the application of homomorphic encryption and attribute-based encryption technology, this method can encrypt power transaction information without exposing the user's specific power consumption data. This encryption method ensures that even if the data is intercepted by a third party during transmission or storage, the specific power usage information cannot be parsed, thereby greatly improving the level of data privacy protection.
[0057] 2. Verifiable transaction information: The use of asymmetric key system and digital signature technology ensures the identity verification of both parties and the non-repudiation of transaction information. At the same time, the transaction information verification of ciphertext through the property of additive homomorphism can verify the correctness of the transaction without decryption, which protects data privacy while ensuring the transparency and credibility of the transaction.
[0058] 3. Decentralized data audit mechanism: The data audit mechanism implemented using blockchain technology not only improves the efficiency and transparency of the audit, but also achieves fine control over audit authority through the application of attribute-based encryption technology, ensuring that only authorized regulatory agencies can access and audit power data on the chain.
[0059] 4. Promote the healthy development of the power market: By ensuring the authenticity, integrity and non-tamperability of power transaction data, this method provides a safe and reliable trading environment for power market participants. This helps to enhance the confidence of market participants and promote the healthy and orderly development of the power market.
[0060] 5. Support scalable power data application scenarios: This method is not only applicable to the privacy protection and security supervision of power data, but its framework and technical principles can also be extended to other scenarios that require data privacy protection and auditing, such as smart homes, power demand response, etc., and has broad application prospects.
[0061] Overall, this blockchain-based power data privacy protection and security supervision method not only ensures power data security and user privacy, but also provides a new and efficient technical means for the supervision and operation of the power market. It is an important technological advancement in the field of power data management. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a diagram of a power transmission process provided by an embodiment of the present invention;
[0063] Figure 2 It is a schematic diagram of the problem to be solved by the present invention provided by the embodiment of the present invention;
[0064] Figure 3 is an execution flow chart provided by an embodiment of the present invention;
[0065] Figure 4 is a system structure diagram provided by an embodiment of the present invention;
[0066] Figure 5 It is a flowchart of a method for privacy protection and security supervision of power data based on blockchain provided by an embodiment of the present invention;
[0067] Figure 6 This is a rendering of the feasibility of introducing technologies such as homomorphic encryption, zero-knowledge proof, and attribute-based encryption into the solution through experimental analysis. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0069] The present invention provides a general framework of a power data privacy protection and security supervision method based on blockchain. The following is a further elaboration of this framework and a detailed description of the entire process.
[0070] 1. Related key generation
[0071] 1.1 Generation of homomorphic public and private keys:
[0072] Use a homomorphic encryption algorithm (such as Paillier homomorphic encryption) to generate a pair of public and private keys. The public key is used to encrypt data, and the private key is used to decrypt and perform homomorphic operations.
[0073] The public key will be made public to all parties involved, while the private key will be kept securely by the power data administrator.
[0074] 1.2 User asymmetric key generation:
[0075] Each user generates his own asymmetric key pair (private key and public key).
[0076] The user's public key will be used to sign the transaction information to ensure the non-repudiation of the transaction.
[0077] The user's private key is used to sign transaction information and needs to be kept confidential.
[0078] 2. Interaction between the two parties
[0079] 2.1 Signature and encryption of transaction parties:
[0080] The transaction parties use their own private keys to sign the transaction information.
[0081] The signed transaction information is encrypted using the public key of the power data administrator.
[0082] Send the encrypted transaction information to the power data manager.
[0083] 2.2 Power data administrator verification and response:
[0084] After receiving the encrypted transaction information, the power data administrator uses his own private key to decrypt it and verify the signature of the transaction party.
[0085] After successful verification, the power data administrator will encrypt and sign his or her account address and transaction information, and then send it to the trading party.
[0086] 2.3 Transaction parties re-verify and submit:
[0087] After receiving the response from the power data administrator, the transaction party will conduct verification.
[0088] If the verification is successful, the transaction party will write its own account address, transaction information, and total electricity consumption / balance after the transaction into the transaction record, and encrypt and sign it.
[0089] Send the encrypted and signed transaction records to the power data manager.
[0090] 3. Transaction verification and data on-chain
[0091] 3.1 Broadcast transaction information:
[0092] The power data manager broadcasts the transaction information on the blockchain.
[0093] 3.2 Node Verification:
[0094] After receiving the transaction information, other nodes first verify the account ownership to ensure that the transaction party is the owner of the account.
[0095] Then verify the legitimacy of the transaction power data volume, such as whether it exceeds the account balance.
[0096] 3.3 Homomorphic Verification:
[0097] The ciphertext transaction information is verified by using the homomorphic property of addition. Specifically, the balance of the power data before and after the transaction is verified by homomorphic addition operation.
[0098] 3.4 Added to the new block:
[0099] If all verifications pass, the transaction information will be added to the new block, waiting to be confirmed and written into the blockchain.
[0100] 4. Power data audit on blockchain
[0101] 4.1 Regulatory agencies decrypt data:
[0102] The regulator uses the attribute-based encrypted private key (which only the regulator has) to decrypt the on-chain encrypted electricity data.
[0103] 4.2 Data Audit:
[0104] The regulatory agency makes a judgment on the legitimacy of the decrypted power data through automatic or manual audits.
[0105] If non-compliant transactions or data are found, regulators can take appropriate measures.
[0106] This is just a rough description, and the specific implementation needs to be adjusted according to specific business needs and technical choices. I hope this can help you understand this blockchain-based power data privacy protection and security supervision method more deeply.
[0107] Two specific application examples of the embodiment of the present invention are:
[0108] Example 1: Smart Grid Power Trading
[0109] Key generation: Each user and power data manager in the smart grid generates a pair of homomorphic public and private keys and asymmetric keys. The user's private key is used to sign transactions, and the public key is used by other users to verify signatures; the homomorphic encryption public key is used to encrypt power data, and the private key is used to decrypt, ensuring the privacy of data during transmission and storage.
[0110] Interaction between the two parties: When user A wants to sell electricity to user B, user A signs the transaction information (such as electricity volume and price) with his own private key, encrypts it with the public key of the power data administrator, and sends it to the power data administrator. After the administrator verifies the signature, he decrypts the transaction information with his own private key, encrypts it again, signs it, and sends it to user B. After user B verifies the information, he confirms the transaction and sends the confirmation information back to the administrator.
[0111] Transaction verification and data on-chain: The power data administrator broadcasts the transaction information on the blockchain, and other nodes verify the legitimacy of the transaction and the correctness of the power data. Through the consensus mechanism, the transaction is recorded on the blockchain, ensuring the immutability of the data and the transparency of the transaction.
[0112] Power data audit: Regulators can use specific attribute-based encryption keys to decrypt transaction data on the blockchain for auditing and supervision to ensure the legality and fairness of transactions while protecting user privacy.
[0113] In the power trading of smart grids, this solution can effectively ensure the security of power trading between users, data privacy and transparency. For example, smart contracts supported by blockchain technology automatically execute transactions, reduce intermediaries, improve transaction efficiency and reduce costs.
[0114] Example 2: Distributed Energy Resource Management
[0115] Key generation: Operators of distributed energy resources (such as solar and wind power plants) and power data managers generate their own homomorphic public and private keys and asymmetric keys.
[0116] Interaction between the two parties: When a power plant generates excess electricity and wants to sell it to the power grid, it uses its private key to sign the power data and transaction information, and encrypts and sends it using the public key of the power data administrator. After the power data administrator verifies the information, it encrypts, signs, and verifies the transaction information with the power grid according to the above process.
[0117] Transaction verification and data on-chain: Once the transaction information is verified, the power data administrator records it on the blockchain to ensure the authenticity and immutability of the data. Other nodes verify the correctness of the transaction through homomorphic encryption without exposing the specific power data content.
[0118] Power data auditing: Regulators use attribute-based encryption technology to audit data on the blockchain to ensure that power transactions of distributed energy resources comply with relevant regulations while protecting data privacy.
[0119] In distributed energy management, this solution can achieve secure recording and trading of power data generated by distributed energy, making energy distribution more efficient and transparent. For example, using blockchain technology can incentivize residents to use solar panels to generate electricity and sell excess electricity to the grid, promoting the use of renewable energy.
[0120] The present invention mainly improves the following problems and defects of the prior art and achieves significant technical progress:
[0121] In recent years, as State Grid Corporation of China and China Southern Power Grid have continued to increase their investment in digital transformation to improve their intelligent and digital management, this has directly promoted the in-depth development of the big data analysis market in the power industry. The power grid will generate massive amounts of data during operation, and companies can extract high-value data from these data through data mining, machine learning and other technical means to achieve user information labeling and present customer portraits.
[0122] In view of the problems existing in the prior art, the technical solution adopted by the present invention is:
[0123] Homomorphic encryption and asymmetric key technology: By generating homomorphic public and private keys and the user's asymmetric keys, the security and privacy of power data during transmission and storage are ensured.
[0124] Secure interaction between transaction parties: The transaction parties ensure the security of transaction information by using their own private key signatures and the public key encryption of the power data administrator, while the legitimacy of the transaction is ensured by the power data administrator's verification of the information.
[0125] Application of blockchain technology: Utilize the immutability and decentralization characteristics of blockchain technology to ensure the authenticity, integrity and traceability of power data, while improving the transparency and efficiency of transactions.
[0126] Attribute-based encryption and audit mechanism: Through attribute-based encryption technology, encryption protection of on-chain data is achieved. Only authorized regulatory agencies can decrypt data for auditing, thereby effectively realizing data supervision.
[0127] The present invention provides a method for privacy protection and security supervision of power data based on blockchain. In this example, Figure 1 , Figure 2As shown in the figure, there are three types of members in the blockchain-based power data: 1) Users, i.e., the basic members on the blockchain, are the providers of transaction information and the senders of modification requests on the blockchain, as well as the main sources of data; 2) Power data administrators, appointed and managed by the power grid company and other relevant departments, are the verifiers and confirmers of power data and the managers and maintainers of blockchain nodes; c) Supervisors, who are auditors and regulators on the blockchain, conduct audits and supervision based on the total power consumption / balance data they obtain, and submit problematic transaction information to the regulatory authorities. Figure 4 As shown, the method comprises the following steps:
[0128] Related key generation
[0129] The alliance chain administrator uses the Paillier algorithm to generate a homomorphic key, the private key sk p Saved by the administrator, when the node joins the alliance chain, the administrator will use the homomorphic public key pk p Sent to the user, the user uses the homomorphic public key to encrypt the transaction amount. After user n joins the alliance chain, he generates an asymmetric public-private key pair (pk n ,sk n ), use the public key to generate the account address Address, and use the signature to prove the account ownership.
[0130] ·Interaction between two parties
[0131] User A submits a transaction application to power data administrator B, signs the transaction information m with his own private key, and then encrypts it with the private key of power data administrator B to obtain Enc B (Sig A (m)), and sends it to the power data administrator B, who receives the transaction information Enc B (Sig A (m)), use your own private key to decrypt and verify the signature of user A. After successful verification, encrypt and sign your own account address and transaction information to obtain the following information:
[0132] Enc A (Sig B (Address B )||Enc P (m)||Enc P (Sum B ))
[0133] Power data administrator B sends the encrypted ciphertext to user A. After receiving the ciphertext, user A decrypts it with the private key and verifies the signature of power data administrator B. After the verification is passed, the user writes his own account address, transaction information, and total power consumption / balance after the transaction, encrypts and signs it, and obtains the following information:
[0134] Sig B (Address B )||Sig B (Address B )||Enc P (m)||Enc P (Sum A )||Enc P (Sum B )
[0135] Transaction verification and data on-chain
[0136] After receiving the information from the transaction recipient, the transaction initiator generates the transaction information as described above, and then broadcasts the transaction information for other nodes to verify. The verification process is as follows:
[0137] The first step is to verify the account ownership. A and Address B Find the account addresses of user A and power data administrator B, and use Sig A and Sig B To verify whether the accounts of both parties to the transaction belong to user A and power data administrator B, once the verification is passed, proceed to the second step.
[0138] The second step is to verify the legitimacy of the transaction power data. Verify whether the total power consumption / balance amount is greater than 0 and whether the power data amount of the transaction initiator's account is greater than the transaction power data amount. Here, user A will use zero-knowledge proof to prove to the verification node to achieve privacy protection of the total power consumption / balance data. If the verification is passed here, the third step will be carried out.
[0139] The third step is to verify the correctness of the transaction power data by adding homomorphic properties, that is, to verify whether the transaction power data amount of the initiator plus the transaction power data amount is equal to the current account power data amount; and whether the current account power data amount of the recipient in the transaction plus the transaction power data amount is equal to the account power data amount before the transaction is completed, that is, whether the following two formulas are true.
[0140]
[0141]
[0142] If all three steps of verification are passed, the verification is passed. The verification node verifies the legitimacy of the transaction, writes the transaction into the new block, and updates the power data volume of the account of user A and power data administrator B to Enc respectively. P (Sum A ) and Enc P (Sum B ). On the contrary, if one of the above three steps of verification fails, the verification node returns an error message to A and terminates the verification.
[0143] When the transaction is written into the block after all verifications are passed, in order to protect the privacy of the total power consumption / balance data, it will be encrypted based on the attribute using smart contracts to meet the access control requirements.
[0144] Blockchain total power consumption / balance data audit
[0145] Although the encrypted total power consumption / balance data can protect the privacy of the data, it cannot be audited by the regulatory authorities, so it will also bring some security threats, such as the security of electricity theft caused by internal and external attackers. Therefore, this project intends to design a smart contract to perform access control and decryption operations. The regulatory authorities can audit the total power consumption / balance data through this contract. Manual audit method: The supervisor initiates a data access request and submits attributes to the smart contract at the same time. If it does not meet the requirements, the data will be refused to be provided. If the smart contract is verified, the corresponding data will be taken out from the blockchain, and the key will be used to decrypt the response transaction information, and then the decrypted data will be provided to the supervisor. The supervisor audits and supervises the total power consumption / balance data he obtains. Automatic audit method: It is planned to provide an interface that can directly link the smart contract that provides data, and then use artificial intelligence to audit and supervise these data. The problematic transaction information will be submitted to the regulatory authorities.
[0146] When a user has doubts about the queried data, he or she can initiate a query to the Public Key Infrastructure (PKI) to obtain more information.
[0147] In this example, the consortium chain administrator first generates a homomorphic key, and the private key is kept by the administrator. When the node joins the consortium chain, the administrator sends the homomorphic public key to the user, and the user uses the homomorphic public key to encrypt the transaction amount. After the user joins the consortium chain, he generates an asymmetric public-private key pair for himself, uses the public key to generate the account address, and uses the signature to prove the account ownership; then the user interacts with the power data administrator. After the user submits a transaction application to the power data administrator, he signs the transaction information with his own private key, and then encrypts it with the power data administrator's private key and sends the ciphertext to the power data administrator. After receiving the transaction information, the power data administrator uses his own private key to decrypt it and verify the user's signature. After successful verification, his own account address and transaction information are encrypted and signed. And send it to the user. After receiving the ciphertext, the user decrypts it with the private key and verifies the signature of the power data administrator. After the verification is passed, the user writes in and encrypts and signs the account address, transaction information, and total power consumption / balance after the transaction; then the transaction party broadcasts the transaction information and asks the node to verify it. If the verification is successful, the verification node authenticates the legitimacy of the transaction, writes the transaction into the new block, and updates the power data of the user and power data administrator's accounts respectively. If the verification fails, the verification node returns an error message to the user; finally, the regulatory department audits the total power consumption / balance data through the smart contract. There are two audit methods: manual audit and automatic audit. Transaction information with problems will be submitted to the regulatory department.
[0148] The present invention mainly realizes the privacy protection of power data and the supervision and auditability after being uploaded to the chain. First, the power transaction information of user A and user B will be encrypted through homomorphic encryption technology to complete the privacy protection of the transaction process and transaction information; in addition, through zero-knowledge proof, the blockchain manager can supervise and audit the transaction information. Then the transaction information is uploaded to the blockchain for storage through a smart contract. During the upload process, through attribute-based encryption, the homomorphically encrypted power data can be restored by the blockchain supervisor to obtain the original data, so as to obtain the data through the smart contract, and audit the data to see whether it meets the requirements, so as to realize data supervision.
[0149] The data privacy protection scheme of the present invention adopts a scheme designed by technologies such as homomorphic encryption and zero-knowledge proof, in which key generation and management are strict and secure. In addition, these technologies are based on strict mathematical proofs and are public-private key pair schemes constructed using mathematical properties. In practical applications, it is difficult for attackers to derive the user's private key even if they obtain partial information. This scheme has high security and the adversary cannot crack the key.
[0150] The data supervision scheme of the present invention utilizes technologies such as attribute-based encryption and smart contracts. The generation of private keys is based on mathematical calculations, and the encryption process undergoes strict data derivation. An attacker cannot obtain any information about the plaintext from the ciphertext. During the audit phase, the audit data contains information to verify the integrity of the power data. Through zero-knowledge proof technology, blockchain supervisors can determine the source of the power data, and users cannot forge the power data on the chain.
[0151] The present invention experimentally analyzes the feasibility of introducing technologies such as homomorphic encryption, zero-knowledge proof, and attribute-based encryption into the scheme. In this experiment, since the main complexity of these technologies is concentrated on the computational overhead, the cases where the number of users is 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, and 200 are evaluated. And compared with the other two lightweight schemes. According to the test results, the following conclusions can be drawn: the proposed scheme has the lowest computational overhead, and with the increase in the number of users, the growth rate is also the slowest. That is, compared with other schemes, this scheme has a higher advantage. Figure 6 shown.
[0152] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0153] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A method for privacy protection and security supervision of power data based on blockchain, characterized in that The steps include: 1) Related key generation: Generate homomorphic public and private keys and the user's asymmetric key; 2) Interaction between the two parties: The transaction party signs the transaction information with its own private key, encrypts it with the public key of the power data administrator, and then sends it to the power data administrator; the power data administrator verifies the signature information of the transaction party, and after successful verification, encrypts and signs its own account address and transaction information and sends it to the transaction party; the transaction party verifies the information, and if the verification is successful, writes its own account address, transaction information, and total power consumption / balance after the transaction, encrypts and signs it, and sends it to the power data administrator; 3) Transaction verification and data on-chain: In order to reach a consensus on the transaction information in the blockchain, the transaction information needs to be broadcast on the chain; other nodes first verify the account ownership, and after the verification, verify the legitimacy of the transaction power data, and finally verify the correctness of the transaction power data through the property of additive homomorphism; if all the above steps are passed, the transaction information is added to the new block; 4) Power data audit on blockchain: Through attribute-based encryption, regulators can decrypt on-chain data and determine the legitimacy of the data through automatic or manual audits.
2. A method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: Step 3 uses the property of additive homomorphism to verify the ciphertext transaction information, and the calculation is as follows:
3. The method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: The step 4 utilizes attribute-based encryption to implement access control on encrypted data decryption operations, ensuring that only regulatory agencies can obtain original plaintext transaction information to implement automatic or manual audits.
4. The method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: The step 1 is specifically as follows: The alliance chain administrator uses the Paillier algorithm to generate a homomorphic key, the private key sk p Saved by the administrator, when the user joins the alliance chain, the administrator will use the homomorphic public key pk p Send it to the user, and the user uses the homomorphic public key to encrypt the transaction information; after user n joins the alliance chain, he generates an asymmetric public-private key pair (pk n ,sk n ), use the public key to generate the account address Address, and use the signature to prove the account ownership.
5. The method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: The step 2 is specifically as follows: User A submits a transaction application to power data administrator B, signs the transaction information m with his own private key, and then encrypts it with the private key of power data administrator B to obtain Enc B (Sig A (m)), and sends it to the power data administrator B, who receives the transaction information Enc B (Sig A (m)), use your own private key to decrypt and verify the signature of user A. After successful verification, encrypt and sign your own account address and transaction information to obtain the following information: Enc A (Sig B (Address B )||Enc P (m)||Enc P (Sum B )) Power data administrator B sends the encrypted ciphertext to user A. After receiving the ciphertext, user A decrypts it with the private key and verifies the signature of power data administrator B. After the verification is passed, the user writes his own account address, transaction information, and total power consumption / balance after the transaction, encrypts and signs it, and obtains the following information: Sig B (Address B )||Sig B (Address B )||Enc P (m)||Enc P (Sum A )||Enc P (Sum B )。 6. The method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: The step 3 is specifically as follows: After user A receives the information from power data administrator B, it generates transaction information as described above, and then broadcasts the transaction information for other nodes to verify. The verification process is as follows: The first step is to verify account ownership using Address A and Address B Find the account addresses of user A and power data administrator B, and use Sig A and Sig B To verify whether the accounts of both parties of the transaction belong to user A and power data administrator B, if the verification is passed, the second step will be entered; The second step is to verify the legitimacy of the transaction power data volume, verify whether the total power consumption / balance amount is greater than 0, and whether the power data volume of the transaction initiator's account is greater than the transaction power data volume; here user A will use zero-knowledge proof to prove to the verification node to achieve privacy protection of the total power consumption / balance data. If the verification is passed, the third step will be carried out; The third step is to verify the correctness of the transaction power data by adding homomorphic properties, that is, to verify whether the transaction power data of the initiator plus the transaction power data is equal to the current account power data; and whether the current account power data of the recipient in the transaction plus the transaction power data is equal to the account power data before the transaction is completed, that is, whether the following two formulas are true: If all three steps of verification are passed, the verification is passed. The verification node verifies the legitimacy of the transaction, writes the transaction into the new block, and updates the power data volume of the account of user A and power data administrator B to Enc respectively. P (Sum A ) and Enc P (Sum B ); On the contrary, if one of the above three steps of verification fails, the verification node returns an error message to A and terminates the verification; When the transaction is written into the block after all verifications are passed, in order to protect the privacy of the total power consumption / balance data, it will be encrypted based on the attribute using smart contracts to meet the access control requirements.
7. The method for privacy protection and security supervision of power data based on blockchain as claimed in claim 1, characterized in that: The step 4 is specifically as follows: Although the encrypted total power consumption / balance data can ensure the privacy of the data, it cannot be audited by the regulatory authorities, so it will also bring some security threats, such as the security problem of power theft caused by internal and external attackers. Therefore, this project intends to design a smart contract to perform access control and decryption operations. The regulatory authorities can audit the total power consumption / balance data through this contract; manual audit method: the supervisor initiates a data access request and submits attributes to the smart contract at the same time. If it does not meet the requirements, the data will be refused to be provided; if the smart contract is verified, the corresponding data will be taken out from the blockchain, and the key will be used to decrypt the response transaction information, and then the decrypted data will be provided to the supervisor. The supervisor will audit and supervise according to the total power consumption / balance data obtained; automatic audit method: it is planned to provide an interface that can directly link to the smart contract that provides data, and then use artificial intelligence to audit and supervise these data. The problematic transaction information will be submitted to the regulatory authorities; When users have doubts about the queried data, they can initiate a query to the public key infrastructure to obtain more information.
8. A blockchain-based power data privacy protection and security supervision system according to the method of claim 1, characterized in that: include: The key generation module is configured with functions for generating homomorphic public and private keys and user asymmetric keys to ensure encryption and decryption of transactions and data; The transaction party interaction module is used for the transaction party to sign the transaction information with its private key and encrypt it with the public key of the power data administrator; the power data administrator verifies the signature information of the transaction party. After successful verification, the data containing the power data administrator's account address and transaction information is encrypted and signed with its private key and sent to the transaction party; the transaction party verifies the information received from the power data administrator. After successful verification, the account address, transaction information and the total power consumption or balance after the transaction are encrypted and signed and sent to the power data administrator; The transaction verification and data on-chain module is used to broadcast transaction information in the blockchain network so as to reach a consensus on the transaction information in the network; it is used for other nodes to first verify the account ownership, and after the verification is passed, further verify the legitimacy of the transaction power data volume, and verify the correctness of the transaction power data through the additive homomorphic property; it is used to add the transaction information to the new block after the transaction information passes all verification steps; The power data audit module is used to enable regulatory agencies to decrypt on-chain data through attribute-based encryption technology; it is used to enable regulatory agencies to determine the legitimacy of data through automatic or manual audits.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the blockchain-based power data privacy protection and security supervision method as claimed in claim 1.
10. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the blockchain-based power data privacy protection and security supervision method as claimed in claim 1.
Citation Information
Cited By
Power sensitive database lightweight supervision method and system based on metadata analysis
CN121029706A
