Power data privacy protection and privacy intersection method and system based on block chain
By combining blockchain, homomorphic encryption and privacy intersection technology in power data privacy protection, the balance problem between power data privacy and data sharing is solved, the security, privacy and reliable sharing of power data are realized, filling the gap There is a technical gap in the power industry in terms of data security and privacy protection.
Patent Information
- Application Number
- CN202410674290.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-10-22
AI Technical Summary
Existing power data privacy protection solutions cannot ensure the privacy of transaction information while achieving data sharing, and it is difficult to balance data supervision and privacy.
Adopting blockchain-based power data privacy protection and privacy intersection methods, blockchain technology ensures the security and non-tamperability of data, and combines homomorphic encryption and privacy intersection technology to achieve data encryption, sharing and transactions. Ensure that only authorized users can access and decrypt data, and upload results to the blockchain to ensure data traceability.
It effectively protects users' private information, ensures the security of data during transmission, calculation and storage, realizes decentralized management of data, reduces the risk of privacy leaks, and ensures that data cannot be tampered with through blockchain technology. and transparency, enhancing the trust and reliability of data sharing.
Smart Images

Figure CN118821202A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of blockchain, privacy intersection, homomorphic encryption, etc., and in particular relates to a method and system for power data privacy protection and privacy intersection based on blockchain. Background Art
[0002] With the vigorous 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. Among them, a large amount of user power consumption information, equipment status and other data are involved. In order to protect the privacy of users, privacy protection is particularly important. In smart grids, power companies need to match user power consumption information in different data sources for intelligent scheduling, optimizing energy distribution, etc. However, direct information sharing is problematic due to privacy and security reasons. Privacy intersection technology can help power companies find the same users without exposing detailed user power consumption information, thereby matching user power consumption information. Blockchain can ensure the transparency and traceability of power data. Each data transaction is recorded on the blockchain and can be viewed and verified by anyone, thereby increasing the credibility of the data. Many solutions have been proposed to achieve cooperative sharing of information and prevent malicious attacks and information leakage without exposing detailed information.
[0003] The main method to solve the problem of cooperative sharing of information without exposing detailed information is to use privacy computing technologies such as homomorphic encryption and private intersection (PSI). In order to meet the needs of data sharing in the contemporary digital context and take into account the necessity of protecting the security of privacy data, Chen Luyu et al. proposed a privacy data authorization method for blockchain smart contracts based on TrustZone. Emiliano et al. constructed a PSI and authorized PSI (APSI) protocol that is secure in malicious models under standard encryption assumptions, with linear communication and computational complexity. Shao Hang et al. analyzed the technical integration application of homomorphic encryption in typical privacy computing application scenarios such as secure intersection, hidden query, multi-party joint computing, and multi-party joint modeling. Shen Liyan et al. focused on introducing two types of PSI research technologies under the current mainstream secure multi-party computing framework, and explained in detail the application scenarios of the privacy intersection problem, further reflecting the practical research value of this problem. Kolesnikov V et al. discussed in detail the application of a lightweight protocol they designed in semi-honest secure private set intersection (PSI). Pinkas B et al., using the latest efficiency improvements in the Oblivious Transfer (OT) extension, proposed a major optimization of the previous PSI protocol and a new PSI protocol with better running time than the existing protocol. Wei Lifei et al., designed an obliviously programmable pseudo-random secret sharing (OPPR-SS) cryptographic component based on symmetric cryptography, and designed a dual-cloud-assisted OT-MP-PSI protocol based on the OPPR-SS component, which assigned the tasks of secret distribution and reconstruction to untrusted cloud servers to assist in the completion, so that participants with weak computing power can also complete the OT-MP-PSI protocol. Cui Hongrui et al., briefly explained the problem definition of the intersection of privacy-preserving sets, focusing on the main ideas and suitable application scenarios of the PSI protocol with the best current performance (communication and computing load), and finally compared the performance of these protocols. Ma Minyao et al., based on the Goldwasser-Micali encryption system, proposed a psi-CA protocol, and the results showed that the protocol is both secure and correct under the semi-honest model. Xiong Lu et al. proposed a privacy-preserving intersection algorithm BPSI based on blockchain, which can avoid the assumption of trust in cloud computing centers while providing higher computing efficiency.
[0004] Uploading power data information to the blockchain is an important means to prevent malicious attacks and information leakage. Liu Yansong et al. proposed an on-chain data sharing architecture for on-chain data sharing, which effectively solved the problem of malicious parties using the transaction transparency of the blockchain for data analysis and ensured the privacy and security of user data during the sharing process. Sheng Nianzu et al. stored the device status and data hash value on the blockchain and used smart contracts to build a third-party data trading platform to ensure the security of data sharing and conveniently complete data monetization and data value transfer. Zhang Jun et al. proposed a distributed smart power energy system blockchain group architecture to solve the problems of adaptive scheduling, privacy protection, system analysis and transaction execution in distributed energy systems. Wu Zhenquan et al. used the emerging alliance blockchain technology to select several data collection base stations in the smart grid to form a smart grid data storage alliance chain (DSCB) system, realizing the reliable, safe and efficient operation of the power grid. Liang et al. proposed a distributed protection framework based on blockchain, which aims to improve the self-defense capability of modern power systems against network attacks by encapsulating meter measurements into blocks by using meters as nodes, and proved its effectiveness through simulation experiments on the IEEE-118 benchmark system.
[0005] In the operation of the power system, in order to protect the privacy of transaction information between power users and enterprises, and help power companies find the same users for intelligent scheduling and energy allocation optimization without exposing detailed user electricity consumption information, privacy computing technologies such as homomorphic encryption can be used for encryption, and then the encrypted transaction data is privacy-intersected, and finally uploaded to the blockchain for storage to ensure data transparency and traceability. However, there is an obvious problem with existing solutions: they either only use homomorphic encryption, privacy-intersection and other technologies to protect transaction information, or only save the original transaction information in the blockchain. Although the former effectively protects the privacy of transaction information, it brings challenges to on-chain data supervision; although the latter simplifies on-chain data supervision, it cannot ensure the privacy of transaction information. While achieving privacy protection, ensuring sufficient data sharing is still a trade-off issue, and a balance needs to be struck between on-chain data supervision and privacy requirements. Summary of the invention
[0006] In response to the problem of power data and the leakage of privacy information during effective data analysis, the present invention proposes a method and system for power data privacy protection and privacy resolution based on blockchain.
[0007] The protection scope of the present invention covers the following points: first, blockchain technology is used to ensure the security and non-tamperability of power data, thereby protecting the user's privacy information from unauthorized access and modification; second, through key generation and data encryption technology, the privacy of power data is effectively protected to ensure that only authorized users can access and decrypt data; then, privacy intersection technology is introduced to protect the privacy of user sets, thereby realizing effective sharing and trading of data; finally, the system includes an establishment module, a key registration module, a data reading and encryption module, a privacy intersection module and an on-chain module. Through the cooperation of these modules, the security and auditability of the power data sharing and transaction process are realized, and the integrity and traceability of the data are protected to the greatest extent.
[0008] The invention covers the entire process from power data collection to data trading, as well as the key technologies and system components involved. By protecting the entire process, it ensures that while data sharing and trading are achieved, the privacy and data security of users are protected, thereby maximizing the scope of patent protection.
[0009] The present invention is a method for privacy protection and privacy intersection of power data based on blockchain, and the method comprises:
[0010] S1: Establish microgrid and power chain;
[0011] S2: In the key generation phase, the smart meter, interpolator, and accountant generate relevant components and upload them to the microgrid;
[0012] S3: In the data reading and encryption phase, the data owner will read the power data and encrypt it;
[0013] S4: In the power data privacy intersection phase, the user set under each accountant is divided into n pairs of combinations. After the privacy intersection of these n combinations is performed separately, the n plaintext intersections are then intersected to obtain the final intersection result.
[0014] S5: When the intersection result is uploaded to the blockchain, the accountant verifies the signature message after receiving the message sent by the intervenor. If there is no problem, the intersection result is uploaded to the blockchain.
[0015] Further, the process of S1 is specifically as follows:
[0016] A microgrid is mainly composed of residential buildings, office buildings and power stations in a small area. The regional scope of the microgrid can be allocated by managers or negotiated offline by entities. The power chain is constructed in the form of a consortium chain, and the power chain members are managers in the entity, and members are usually determined in the form of off-chain negotiations. After determining the power chain members, it is necessary to create a microgrid contract on the power chain, which includes the power chain members, the scope of the microgrid and other relevant information.
[0017] Further, the process of S2 is specifically as follows:
[0018] In a microgrid, there are three main entities: smart meters (SM), intersectors (ITS), and bookkeepers (BK). The entity with stronger computing power in the microgrid serves as the bookkeeper (BK). If there are L bookkeepers in the microgrid, the intersectors need to be divided into L groups, with one bookkeeper assigned to each group. After the assignment, each entity uploads the public key and identification symbol to the power chain, and the parties who need relevant data can view it on the power chain. Each bookkeeper needs to generate a Paillier homomorphic encryption key pair (sk i =(λ,μ),pk i =(n,g)), and upload the public key to the microgrid contract; the interpolator generates the ITS quadruple (Prk ij ,Puk ij ,Id ij ,r), where (Prk ij ,Puk ij )Key pair used for digital signature and authentication; Id ij is a random unique identifier, r is a random number used for homomorphic encryption, and the intersector needs to convert (Prk ij ,Id ijk ,r) is uploaded to the microgrid contract; the smart meter also needs to generate the SM triplet (Prk ijk ,Puk ijk ,Id ijk ); then the user imports the SM triplet into the smart meter and (Puk ij ,Id ijk ) is uploaded to the microgrid contract.
[0019] Further, the process of S3 is specifically as follows:
[0020] Each smart meter periodically reads power data pd ijk , and use the bookkeeper's BK i The public key and ITS ij The generated random number r is encrypted, so use cpd ijk Represents the encryption result, then:
[0021]
[0022] Then by S ijk The raw data message generated is:
[0023]
[0024] Where Id ijk For S ijk Unique identifier, date ijk is the current date information, ts ijk is the timestamp, then S ijk Signing the original data message and get a signature Finally, S. ijk Will Sent to the corresponding ITS.
[0025] Further, the process of S4 is specifically as follows:
[0026] Hypothesis I ij Smart Meter S ij1 , S ij2 For privacy, please contact both parties; S ij1 , S ij2 Have data sets S respectively ij1 :X={x1,...,x n1}、S ij2 :Y={y1,…,y n2}, where n1≥n2; element bit length σ; number of bins b=εn2; k random hash functions h1,…,h k : The reduced bit length of an item in the hash table is μ = σ-log2b + log2k; symmetric security parameter κ; statistical security parameter λ; mask length l = λ + log2(κn1) + log2(n2); N = 2 μ ; Virtual element d2; Storage size s; The key size is fixed to 128 bits according to the NIST guidelines (NIST 2012) Security level: symmetric security parameter κ = 128, statistical security parameter λ = 40;
[0027] (1) Hash the elements of each party into a hash table
[0028] Electricity User ij1 Using simple hashing and k hash functions {h1,...,h k}Map the elements in set X into a two-dimensional hash table T1[][], where each element is hashed k times; the size of the first dimension is b, which points to the container in the table, and the second dimension points to the element in the container; the power user S ij2 Using Cockoo hashing and k hash functions {h1,...,hk} Map the elements in its set Y to a one-dimensional hash table T2[] and storage S[], where each element only needs to randomly select one from k hash functions for hashing; if a conflict occurs, the original element is squeezed out and the squeezed element is re-hashed to another position. If there is a conflict after re-hashing k times, it is mapped to storage S[]. The size of the hash table is b, and the size of the storage is s; then the power user S ij2 Fill all empty entries in T2 and S with d2;
[0029] Let |T1[i]| be the number of elements stored in the i-th bin of hash table T1, and μ be the bit length of these elements (1≤i≤b);
[0030] (2) OPRF evaluation and mask calculation through OT
[0031] For each bin 1≤i≤b, perform the following steps respectively:
[0032] Step 1: Set v j = T1[i][j] and w = T2[i], where 1≤j≤|T1[i]|;
[0033] Step 2: All parties execute the OPRF protocol, where the power user S ij1 Learn the random key t generated by calling the OPRF protocol i , power user S ij2 Input its element w and get
[0034] Step 3: Hold the OPRF key i Electricity users S ij1 Evaluate Fon locally on input v j and obtain
[0035] For each element in storage S, the parties repeat the same steps, where for the i-th storage location, the power user S ij1 Evaluate its OPRF on the entire input set X and obtain n1 masks The electricity user S ij2 Evaluate the OPRF on S[i] and obtain a mask If an element T2[i] matches any element in T1[i], their OPRF outputs will be equal; if no element in T2[i] matches any element in T1[i], their OPRF outputs will be different, but with probability |T1[i]|·2 -l except;
[0036] (3) Privacy request
[0037] Assume that power user S ij1 The shielded intersection set of
[0038] S ij1 Randomly permute V and send it to S ij2 Medium; S ij2 and S ij1 The hash function used in the protocol is the same, and both parties have agreed on this hash function before the protocol begins; if S ij2 The hash result of S ij1 The hash results of S are the same, then they are hashed into the same box; thus, S ij2 It knows that it needs to search in this box; by performing the above search, S ij2 Calculate the intersection Z = {T2[i]|M2[i]∈V};
[0039] Each party performs the same operation to identify whether the element on the storage is in the intersection: S ij1 Arrange and Send to S ij2 ,if Then S ij2 Add S[i] to the intersection Z; S ij1 No output; S ij2 Output intersection Z = X∩Y;
[0040] Will I ij User S ij The set is divided into n pairs of combinations. After performing privacy intersection on these n combinations, the n plaintext intersections are then intersected. This gives I ij The final privacy result of the user is as follows:
[0041]
[0042] After this I ij Generate Message for:
[0043]
[0044] Among them, S ij A ij The smart meter collection under Id ijk A ij Unique identifier, date ij is the current date information, ts ij is the timestamp. ij sign and get a signature Will Send to Bookkeeper B i.
[0045] Further, the process of S5 is specifically as follows:
[0046] Bookkeeper B i Receive A ij After the message is sent, the signed message is verified. If there is no problem, the result PSID is obtained. ij Upload to blockchain.
[0047] Another object of the present invention is to provide a blockchain-based smart grid security auditable data sharing system for implementing the blockchain-based smart grid security auditable data sharing method, the system comprising:
[0048] Building modules for establishing microgrids and power chains;
[0049] The key registration module is connected to the establishment module and is used for the smart meter, the interposer, and the bookkeeper to generate relevant components and upload them to the microgrid during the key generation phase;
[0050] The data reading and encryption module is connected to the key registration module, and the data owner will read the power data and encrypt it;
[0051] The privacy intersection module is connected to the data reading and encryption module, and is used to divide the user set under each accountant into n pairs of combinations, perform privacy intersection on these n combinations respectively, and then perform intersection on these n plaintext intersections to obtain the final intersection result;
[0052] The on-chain module is connected to the privacy intersection module. After the accountant receives the message sent by the intersection device, he verifies the signed message. If there is no problem, the intersection result is uploaded to the blockchain.
[0053] 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 the blockchain-based smart grid secure and auditable data sharing method.
[0054] 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 the blockchain-based smart grid secure and auditable data sharing method.
[0055] Another object of the present invention is to provide an information data processing terminal, which is used to implement the blockchain-based smart grid secure and auditable data sharing system.
[0056] In combination with the above technical solutions and the technical problems solved, please analyze the advantages and positive effects of the technical solutions to be protected by the present invention from the following aspects:
[0057] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems. The specific description is as follows:
[0058] 1) Privacy leakage has always been a serious problem in the process of power data trading. Although traditional encryption technology can protect the security of data during transmission, it cannot completely prevent data leakage during calculation. To address this problem, the present invention adopts homomorphic encryption technology, which effectively prevents the leakage of user privacy information while ensuring the normal operation of power trading. Homomorphic encryption technology allows calculation operations to be performed on ciphertext without decryption, so it can ensure the security and integrity of data while protecting privacy.
[0059] 2) In order to prevent internal and external attackers from stealing calculation data, the present invention adopts a combination of homomorphic encryption and privacy intersection technology. Through homomorphic encryption, the data remains invisible in the three stages before, during, and after calculation, thereby effectively preventing the risk of data theft. At the same time, the introduction of privacy intersection technology further enhances the security and privacy protection capabilities of the data. In addition, in order to ensure the immutability of the data, the present invention uploads the intersection results to the blockchain distributed ledger, so that any attempt to tamper with the data will be immediately detected, thereby ensuring the credibility and integrity of the data.
[0060] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:
[0061] 1) The present invention effectively protects the user's power data privacy through privacy intersection and homomorphic encryption technology. During data trading and analysis, sensitive information is invisible, the user's privacy is effectively protected, and the security and privacy of user data are improved.
[0062] 2) Homomorphic encryption technology is used to encrypt power data, ensuring the security of data during transmission, calculation and storage. Even if the data is stolen by attackers, the sensitive information cannot be decrypted, effectively preventing data leakage and tampering.
[0063] 3) The privacy intersection results are uploaded to the blockchain distributed ledger, realizing the sharing of power privacy data among different power companies in the alliance power chain. Through the application of blockchain technology, the immutability and transparency of data are ensured, and the trust and reliability of data sharing are enhanced.
[0064] 4) The use of blockchain technology to record the transaction and processing of power data ensures the integrity and credibility of the data. Any attempt to tamper with the data will be detected immediately, ensuring the reliability and authenticity of the data.
[0065] The present invention comprehensively utilizes cutting-edge technologies such as privacy intersection, homomorphic encryption and blockchain, filling the technical gap in the power industry in data security, privacy protection and shared transactions, and improving the technical level and competitiveness of the power industry.
[0066] Third, as auxiliary evidence of the inventiveness of the claims of the present invention, it is also reflected in the following important aspects:
[0067] (1) The expected benefits and commercial value of the technical solution of the present invention after transformation are:
[0068] The invention provides an advanced solution that can meet the increasing demand for social data security and privacy protection, and therefore will attract a large number of users and customers. If the technical solution is in a leading position in the same industry, it will bring technological leadership, thereby attracting more partners and investors. By providing secure data sharing and trading solutions, competitive advantages can be gained in the electricity market or other related markets, thereby increasing market share and bringing revenue growth. In summary, this technical solution is expected to bring considerable benefits and commercial value to power grid companies, but the specific benefits and value depend on factors such as market acceptance, technical implementation, and competitive situation.
[0069] (2) The technical solution of the present invention fills the technical gap in the industry at home and abroad:
[0070] This invention involves the integrated application of multiple fields such as blockchain technology, data encryption technology, and privacy protection technology, aiming to solve problems such as power data security, privacy protection, and shared transactions. This comprehensive solution for the power industry is relatively new and has not yet been widely adopted in the industry at home and abroad. Although blockchain technology has attracted much attention in recent years and has been applied in some fields, its application in the power industry has not yet been popularized. There are also gaps in the industry or the solutions to problems such as power data security, privacy protection, and shared transactions have not yet reached the ideal level. Therefore, from the description of the technical solution, the present invention fills the technical gaps in data security, privacy protection, and shared transactions in the domestic and foreign power industries, and provides a new solution for the development of this field, which is innovative and forward-looking.
[0071] Fourth, the present invention provides a method for privacy protection and privacy intersection of power data based on blockchain, which aims to solve the privacy leakage and security problems existing in smart grid data sharing in the prior art. By adopting blockchain technology, decentralized management, encryption protection and privacy intersection of power data are realized, thereby ensuring the security and privacy of data.
[0072] In existing technologies, data sharing in smart grids often relies on centralized data management methods, which poses a serious risk of privacy leakage. This is because centralized servers are vulnerable to hacker attacks, which can lead to user data being stolen or abused. In addition, existing data sharing methods often lack effective privacy protection mechanisms, making user privacy information easily leaked.
[0073] The present invention solves these problems by introducing blockchain technology. First, blockchain technology provides a decentralized data management method, which enables users to directly control and manage their own data, reducing the risk of privacy leakage caused by centralized management. Secondly, the present invention uses cryptographic algorithms to encrypt and protect data to ensure the security of data during transmission and storage. Finally, through the privacy intersection method, data sharing is achieved under the premise of protecting privacy, avoiding the leakage of user privacy information.
[0074] The method of the present invention includes the steps of establishing a microgrid and a power chain, key generation, data reading and encryption, power data privacy intersection, and uploading the intersection results to the chain. In the key generation stage, the smart meter, the intersection device, and the accountant generate relevant components and upload them to the microgrid, providing a basis for subsequent data encryption and privacy intersection. In the data reading and encryption stage, the data owner reads the power data and encrypts it to ensure the security of the data. In the power data privacy intersection stage, through a series of complex calculations and operations, data intersection is achieved under the premise of protecting privacy. Finally, in the stage of uploading the intersection results to the chain, the accountant uploads the intersection results to the blockchain, realizing the traceability and non-tamperability of the data.
[0075] The significant technical advancement of the present invention is:
[0076] 1. It realizes decentralized data management and reduces the risk of privacy leakage.
[0077] 2. Cryptography algorithms are used to encrypt and protect data, improving data security.
[0078] 3. Data sharing is achieved through the privacy intersection method, protecting the user's privacy information.
[0079] 4. The use of blockchain technology makes data traceable and tamper-proof, enhancing the reliability of data.
[0080] The present invention provides a method for privacy protection and privacy intersection of power data based on blockchain, which effectively solves the privacy leakage and security problems in smart grid data sharing in the prior art, and has significant technological progress and practical application value.
[0081] Fifth, the mathematical model of the present invention has made significant technical progress in solving the technical problems of the prior art. First of all, we must make it clear that the mathematical model plays a vital role in the present invention. It is a tool for abstracting and simplifying practical problems, and represents the various elements and relationships of the problem through variables, equations and constraints.
[0082] In the existing technologies, the privacy protection and privacy intersection problems of power data often face problems such as the complexity of data processing, insufficient privacy protection, and low computing efficiency. For example, in terms of data processing, existing technologies often have difficulty in effectively processing large-scale, high-dimensional power data, resulting in low data processing efficiency and difficulty in ensuring data accuracy. In terms of privacy protection, existing technologies often cannot achieve data sharing and utilization while protecting user privacy, thereby limiting the scope of application and value of data.
[0083] In response to these problems, the mathematical model of the present invention achieves efficient processing, privacy protection, and privacy intersection of power data through precise mathematical expressions and calculations. Specifically, the mathematical model transforms the privacy protection and privacy intersection problems of power data into mathematical problems through reasonable variable settings and equation construction, so that mathematical tools can be used for precise analysis and calculation. This not only improves the efficiency of data processing, but also ensures the accuracy of the data.
[0084] At the same time, mathematical models play an important role in privacy protection. By introducing cryptographic algorithms and privacy intersection technology, mathematical models can realize data sharing and utilization under the premise of protecting user privacy. This not only avoids the leakage of user privacy information, but also expands the application scope and value of data.
[0085] In addition, the mathematical model also improves the calculation efficiency by improving the optimization algorithm and the calculation method, which enables the method of the present invention to maintain high efficiency when processing large-scale, high-dimensional power data, thereby meeting the needs of practical applications.
[0086] In summary, the mathematical model of the present invention has made significant technical progress in solving the technical problems of the prior art. It can not only efficiently process power data, achieve privacy protection and privacy intersection, but also improve computing efficiency, providing strong support for the development and application of smart grids. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 Shown is a diagram of the privacy seeking process;
[0088] Figure 2 Shown is a diagram of the problem to be solved by the present invention;
[0089] Figure 3 Provided is an execution flow chart of the present invention;
[0090] Figure 4 Shown is a system structure diagram of the present invention; Figure 5 It is a system flow chart of power data privacy protection and privacy intersection based on blockchain; Figure 6 This is a test result diagram of the data volume on both sides of the PSI during the experiment. DETAILED DESCRIPTION
[0091] 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.
[0092] The power data privacy protection and privacy intersection method based on blockchain can demonstrate its application value in multiple fields. The following are two specific application examples:
[0093] Example 1: Smart Grid Data Management and Privacy Protection
[0094] In the data management and privacy protection of smart grids, this method can effectively ensure the privacy of user data and promote the secure sharing of data:
[0095] 1) Scenario setting: In smart grids, a large number of smart meters (SMs) regularly read users' electricity consumption data. These data contain sensitive information and need to be properly handled.
[0096] 2) Data encryption and sharing: Through this method, the user's power data is first encrypted and then shared and analyzed without leaking any personal information.
[0097] 3) Privacy-seeking: Multiple organizations hope to share their power data information for joint analysis and improve the efficiency of the power grid while maintaining data privacy. Through privacy-seeking technology, all parties can achieve effective use of data without directly sharing the original data.
[0098] Example 2: Secure sharing of power data across institutions
[0099] This method is also applicable to cross-institutional power data security sharing scenarios, promoting inter-industry collaboration while protecting data privacy:
[0100] 1) Scenario setting: Multiple power companies or research institutions want to share their power data for large-scale analysis or research, but do not want to disclose their sensitive information.
[0101] 2) Blockchain enables data sharing: By establishing a power chain, different power companies or research institutions can serve as members of the power chain and achieve secure and reliable data sharing through blockchain technology.
[0102] 3) Privacy intersection and data analysis: Through privacy intersection technology, institutions can find common data sets without directly disclosing their own data, and conduct in-depth data analysis to provide support for power system optimization and decision-making.
[0103] Through these two examples, it can be seen that the power data privacy protection and privacy intersection method based on blockchain not only helps to protect user data privacy, but also promotes cross-institutional collaboration and data sharing, thereby bringing more efficient and secure data processing solutions to the power industry. Figure 1 , 2 As shown, an embodiment of the present invention provides a method for power data privacy protection and privacy intersection based on blockchain, the method comprising:
[0104] S1: Establish microgrid and power chain;
[0105] S2: In the key generation phase, the smart meter, interpolator, and accountant generate relevant components and upload them to the microgrid;
[0106] S3: In the data reading and encryption phase, the data owner will read the power data and encrypt it;
[0107] S4: In the power data privacy intersection phase, the user set under each accountant is divided into n pairs of combinations. After the privacy intersection of these n combinations is performed separately, the n plaintext intersections are then intersected to obtain the final intersection result.
[0108] S5: When the intersection result is uploaded to the blockchain, the accountant verifies the signature message after receiving the message sent by the intervenor. If there is no problem, the intersection result is uploaded to the blockchain.
[0109] The process of S1 is specifically as follows:
[0110] A microgrid is mainly composed of residential buildings, office buildings and power stations in a small area. The regional scope of the microgrid can be allocated by managers or negotiated offline by entities. The power chain is constructed in the form of a consortium chain, and the power chain members are managers in the entity, and members are usually determined in the form of off-chain negotiations. After determining the power chain members, it is necessary to create a microgrid contract on the power chain, which includes the power chain members, the scope of the microgrid and other relevant information.
[0111] The process of S2 is specifically as follows:
[0112] In a microgrid, there are three main entities: smart meters (SM), intersectors (ITS), and bookkeepers (BK). The entity with stronger computing power in the microgrid serves as the bookkeeper (BK). If there are L bookkeepers in the microgrid, the intersectors need to be divided into L groups, with one bookkeeper assigned to each group. After the assignment, each entity uploads the public key and identification symbol to the power chain, and the parties who need relevant data can view it on the power chain. Each bookkeeper needs to generate a Paillier homomorphic encryption key pair (sk i =(λ,μ),pk i =(n,g)), and upload the public key to the microgrid contract; the interpolator generates the ITS quadruple (Prk ij ,Puk ij ,Id ij ,r), where (Prk ij ,Puk ij )Key pair used for digital signature and authentication; Id ij is a random unique identifier, r is a random number used for homomorphic encryption, and the intersector needs to convert (Prk ij ,Id ijk ,r) is uploaded to the microgrid contract; the smart meter also needs to generate the SM triplet (Prk ijk ,Puk ijk ,Id ijk ); then the user imports the SM triplet into the smart meter and (Puk ij ,Id ijk ) is uploaded to the microgrid contract.
[0113] The process of S3 is specifically as follows:
[0114] Each smart meter periodically reads power data pd ijk , and use the bookkeeper's BK i The public key and ITS ij The generated random number r is encrypted, so use cpd ijk Represents the encryption result, then:
[0115]
[0116] Then by S ijk The raw data message generated is:
[0117]
[0118] Where Id ijk For S ijk Unique identifier, date ijk is the current date information, ts ijk is the timestamp, then S ijk Signing the original data message and get a signature Finally, S. ijk Will Sent to the corresponding ITS.
[0119] The process of S4 is specifically as follows:
[0120] Hypothesis I ij Smart Meter S ij1 , S ij2 For privacy, please contact both parties; S ij1 , S ij2 Have data sets S respectively ij1 :X={x1,…,x n1}、S ij2 :Y={y1,…,y n2}, where n1≥n2; element bit length σ; number of bins b=εn2; k random hash functions h1,…,h k : The reduced bit length of an item in the hash table is μ = σ-log2b + log2k; symmetric security parameter κ; statistical security parameter λ; mask length l = λ + log2(κn1) + log2(n2); N = 2 μ ; Virtual element d2; Storage size s; The key size is fixed to 128 bits according to the NIST guidelines (NIST 2012) Security level: symmetric security parameter κ = 128, statistical security parameter λ = 40;
[0121] (1) Hash the elements of each party into a hash table
[0122] Electricity User ij1 Using simple hashing and k hash functions {h1,…,h k}Map the elements in set X into a two-dimensional hash table T1[][], where each element is hashed k times; the size of the first dimension is b, which points to the container in the table, and the second dimension points to the element in the container; the power user S ij2 Using Cockoo hashing and k hash functions {h1,…,h k} Map the elements in its set Y to a one-dimensional hash table T2[] and storage S[], where each element only needs to randomly select one from k hash functions for hashing; if a conflict occurs, the original element is squeezed out and the squeezed element is re-hashed to another position. If there is a conflict after re-hashing k times, it is mapped to storage S[]. The size of the hash table is b, and the size of the storage is s; then the power user S ij2 Fill all empty entries in T2 and S with d2;
[0123] Let |T1[i]| be the number of elements stored in the i-th bin of hash table T1, and μ be the bit length of these elements (1≤i≤b);
[0124] (2) OPRF evaluation and mask calculation through OT
[0125] For each bin 1≤i≤b, perform the following steps respectively:
[0126] Step 1: Set v j = T1[i][j] and w = T2[i], where 1≤j≤|T1[i]|;
[0127] Step 2: All parties execute the OPRF protocol, where the power user S ij1 Learn the random key t generated by calling the OPRF protocol i , power user S ij2 Input its element w and get
[0128] Step 3: Hold the OPRF key i Electricity users S ij1 Evaluate Fon locally on input v j and obtain
[0129] For each element in storage S, the parties repeat the same steps, where for the i-th storage location, the power user S ij1 Evaluate its OPRF on the entire input set X and obtain n1 masks The electricity user S ij2 Evaluate the OPRF on S[i] and obtain a mask If an element T2[i] matches any element in T1[i], their OPRF outputs will be equal; if no element in T2[i] matches any element in T1[i], their OPRF outputs will be different, but with probability |T1[i]|·2 -l except;
[0130] (3) Privacy request
[0131] Assume that power user Sij1 The shielded intersection set of
[0132] S ij1 Randomly permute V and send it to S ij2 Medium; S ij2 and S ij1 The hash function used in the protocol is the same, and both parties have agreed on this hash function before the protocol begins; if S ij2 The hash result of S ij1 The hash results of S are the same, then they are hashed into the same box; thus, S ij2 It knows that it needs to search in this box; by performing the above search, S ij2 Calculate the intersection Z = {T2[i]|M2[i]∈V};
[0133] Each party performs the same operation to identify whether the element on the storage is in the intersection: S ij1 Arrange and Send to S ij2 ,if Then S ij2 Add S[i] to the intersection Z; S ij1 No output; S ij2 Output intersection Z = X∩Y;
[0134] Will I ij User S ij The set is divided into n pairs of combinations. After performing privacy intersection on these n combinations, the n plaintext intersections are then intersected. This gives I ij The final privacy result of the user is as follows:
[0135]
[0136] After this I ij Generate Message for:
[0137]
[0138] Among them, S ij A ij The smart meter collection under Id ijk A ij Unique identifier, date ij is the current date information, ts ij is the timestamp. ij sign and get a signature Will Send to Bookkeeper B i .
[0139] The process of S5 is specifically as follows:
[0140] Bookkeeper B i Receive A ij After the message is sent, the signed message is verified. If there is no problem, the result PSID is obtained. ij Upload to blockchain.
[0141] Example:
[0142] A method for privacy protection and privacy intersection of power data based on blockchain. In this example, Figure 2 , Figure 3 As shown in the figure, there are three types of members in the blockchain-based power data: a users, i.e., the basic members on the blockchain, are the providers of data on the blockchain, the senders of exchange requests, and the main sources of data; b interrogators, appointed and managed by the power grid company and other relevant departments, are the interrogators of power data; c bookkeepers, who are entities with stronger computing power in the microgrid, generate Paillier homomorphic encryption keys and upload public keys to the microgrid contract, and accept and store the exchange results under each bookkeeper.
[0143] like Figure 5 As shown, an embodiment of the present invention provides a method for implementing the method for power data privacy protection and privacy intersection based on blockchain, and the system includes:
[0144] A module is established for the power participants to divide the microgrid and establish the power chain after offline negotiation. This power chain adopts the alliance chain model, and only the participants can upload and share data. After the microgrid is divided, the negotiation results need to be uploaded to the power chain in the form of a program to upload the power contract. The power participants include accountants, who are generally entities with strong computing power in the microgrid. Finally, the exchange data is only uploaded to the power chain by the accountant.
[0145] The key registration module is connected to the establishment module. In order to ensure the security of power data and prevent it from being leaked, the main function of the encryption module is to generate encryption keys and random identities, including the public and private keys of system entities such as smart meters, interposers, and accountants that need to encrypt data, as well as their random identities. After generating the key, the key registration module needs to write the public key and random identity of the corresponding entity into the power contract and upload it to the blockchain.
[0146] The data reading and encryption module is connected to the key registration module. When the interleaver reads the data of the smart meter, the smart meter needs to use the public and private keys generated by the key composition module to encrypt the power data. The encryption algorithm in the encryption module is implemented using the Paillier homomorphic encryption algorithm. After the power data is encrypted, the smart meter needs to use the private key to sign its own random identity, and then upload the encrypted data and the identity signature to the interleaver for subsequent work.
[0147] The privacy intersection module is connected to the data reading and encryption module. After reading the encrypted power data, the intersector verifies the signature through the public key of the corresponding smart meter. After the verification is correct, the user set under each accountant will be divided into n pairs. After the privacy intersection is performed on these n combinations, the n plaintext intersections are intersected to obtain the final intersection result. After obtaining the intersection result, the intersector needs to use its private key to sign the random identity, and then upload the intersection result and signature to the accountant.
[0148] The on-chain module is connected to the privacy intersection module. After the accountant receives the final intersection result uploaded by the intersector, he first verifies the correctness of its signature. After the verification is correct, the final result is uploaded to the power chain.
[0149] An embodiment of the present invention provides a computer device, which includes 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 the blockchain-based smart grid secure and auditable data sharing method.
[0150] An embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the blockchain-based smart grid secure and auditable data sharing method.
[0151] An embodiment of the present invention provides an information data processing terminal, which is used to implement the blockchain-based smart grid secure and auditable data sharing system.
[0152] The embodiment of the present invention provides a method for power data privacy protection and privacy intersection based on blockchain. A power data privacy protection scheme based on blockchain and privacy protection computing is proposed. First, the electricity consumption data collected by the smart meter is encrypted by Paillier homomorphic encryption to protect the user's privacy; then, the ciphertext privacy intersection technology is used to obtain the preprocessed data set required for subsequent tasks; in order to ensure that the privacy request result cannot be tampered with and can be flexibly accessed, the privacy request result is uploaded to the power chain for storage. Theoretical analysis and simulation results show the superiority of the scheme in privacy protection and ciphertext privacy set intersection.
[0153] like Figure 6 As shown in the figure, in order to simulate the computational overhead of the PSI scheme, the amount of data on both sides of the PSI party was tested during the experiment. When the amount of data is 40k, the PSI computational overhead of this scheme is only 0.44 seconds. In addition, the PSI operation on the ciphertext is at most 0.1 seconds longer than the PSI operation on the plaintext.
[0154] 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.
[0155] 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.
Claims
1. A method for privacy protection and privacy intersection of power data based on blockchain, characterized in that: The method includes: S1: Establish microgrid and power chain; S2: In the key generation phase, the smart meter, interpolator, and accountant generate relevant components and upload them to the microgrid; S3: In the data reading and encryption phase, the data owner will read the power data and encrypt it; S4: In the power data privacy intersection phase, the user set under each accountant is divided into n pairs of combinations. After the privacy intersection of these n combinations is performed separately, the n plaintext intersections are then intersected to obtain the final intersection result. S5: When the intersection result is uploaded to the blockchain, the accountant verifies the signature message after receiving the message sent by the intervenor. If there is no problem, the intersection result is uploaded to the blockchain.
2. According to the blockchain-based smart grid security and auditable data sharing method of claim 1, it is characterized in that: The process of S1 is specifically as follows: A microgrid is mainly composed of residential buildings, office buildings and power stations in a small area. The regional scope of the microgrid can be allocated by managers or negotiated offline by entities. The power chain is constructed in the form of a consortium chain, and the power chain members are managers in the entity, and members are usually determined in the form of off-chain negotiations. After determining the power chain members, it is necessary to create a microgrid contract on the power chain, which includes the power chain members, the scope of the microgrid and other relevant information.
3. According to the blockchain-based smart grid security and auditable data sharing method of claim 1, it is characterized in that: The process of S2 is specifically as follows: In a microgrid, there are three main entities: smart meters (SM), intersectors (ITS), and bookkeepers (BK). The entity with stronger computing power in the microgrid serves as the bookkeeper (BK). If there are L bookkeepers in the microgrid, the intersectors need to be divided into L groups, with one bookkeeper assigned to each group. After the assignment, each entity uploads the public key and identification symbol to the power chain, and the parties who need relevant data can view it on the power chain. Each bookkeeper needs to generate a Paillier homomorphic encryption key pair (sk i =(λ,μ),pk i =(n,g)), and upload the public key to the microgrid contract; the interpolator generates the ITS quadruple (Prk ij ,Puk ij ,Id ij ,r), where (Prk ij ,Puk ij )Key pair used for digital signature and authentication; Id ij is a random unique identifier, r is a random number used for homomorphic encryption, and the intersector needs to convert (Prk ij ,Id ijk ,r) is uploaded to the microgrid contract; the smart meter also needs to generate the SM triplet (Prk ijk ,Puk ijk ,Id ijk ); then the user imports the SM triplet into the smart meter and (Puk ij ,Id ijk ) is uploaded to the microgrid contract.
4. According to the blockchain-based smart grid security and auditable data sharing method of claim 1, it is characterized in that: The process of S3 is specifically as follows: Each smart meter periodically reads power data pd ijk , and use the bookkeeper's BK i The public key and ITS ij The generated random number r is encrypted, so use cpd ijk Represents the encryption result, then: Then by S ijk The raw data message generated is: Where Id ijk For S ijk Unique identifier, date ijk is the current date information, ts ijk is the timestamp, then S ijk Signing the original data message and get a signature Finally, S. ijk Will Sent to the corresponding ITS.
5. According to the blockchain-based smart grid security and auditable data sharing method of claim 1, it is characterized in that: The process of S4 is specifically as follows: Hypothesis I ij Smart Meter S ij1 , S ij2 For privacy, please contact both parties; S ij1 , S ij2 Have data sets S respectively ij1 :X={x1,...,x n1 }、S ij2 :Y={y1,…,y n2 }, where n1≥n2; element bit length σ; number of bins b=εn2; k random hash functions The reduced bit length of an item in the hash table is μ = σ-log2b + log2k; symmetric security parameter κ; statistical security parameter λ; mask length l = λ + log2(κn1) + log2(n2); N = 2 μ ; Virtual element d2; Storage size s; The key size is fixed to 128 bits according to the NIST guidelines (NIST 2012) Security level: Symmetric security parameter κ = 128, statistical security parameter λ = 40; (1) Hash the elements of each party into a hash table Electricity User ij1 Using simple hashing and k hash functions {h1,...,h k }Map the elements in set X into a two-dimensional hash table T1[][], where each element is hashed k times; the size of the first dimension is b, which points to the container in the table, and the second dimension points to the element in the container; the power user S ij2 Using Cockoo hashing and k hash functions {h1,...,h k } Map the elements in its set Y to a one-dimensional hash table T2[] and storage S[], where each element only needs to randomly select one from k hash functions to be hashed; if a conflict occurs, the original element is squeezed out and the squeezed element is re-hashed to another position. If there is a conflict after re-hashing k times, it is mapped to storage S[]. The size of the hash table is b, and the size of the storage is s; then the power user S ij2 Fill all empty entries in T2 and S with d2; Let |T1[i]| be the number of elements stored in the i-th bin of hash table T1, and μ be the bit length of these elements (1≤i≤b); (2) OPRF evaluation and mask calculation through OT For each bin 1≤i≤b, perform the following steps respectively: Step 1: Set v j = T1[i][j] and w = T2[i], where 1≤j≤|T1[i]|; Step 2: All parties execute the OPRF protocol, where the power user S ij1 Learn the random key t generated by calling the OPRF protocol i , power user S ij2 Input its element w and get Step 3: Hold the OPRF key i Electricity users S ij1 Evaluate Fon locally on input v j and obtain For each element in storage S, the parties repeat the same steps, where for the i-th storage location, the power user S ij1 Evaluate its OPRF on the entire input set X and obtain n1 masks The electricity user S ij2 Evaluate the OPRF on S[i] and obtain a mask If an element T2[i] matches any element in T1[i], their OPRF outputs will be equal; if T2[i] matches no element in T1[i], their OPRF outputs will be different, but with probability |T1[i]|·2 -l except; (3) Privacy request Assume that power user S ij1 The shielded intersection set of S ij1 Randomly permute V and send it to S ij2 Medium; S ij2 and S ij1 The hash function used in the protocol is the same, and both parties have agreed on this hash function before the protocol begins; if S ij2 The hash result of S ij1 The hash results of S are the same, then they are hashed into the same box; thus, S ij2 It knows that it needs to search in this box; by performing the above search, S ij2 Calculate the intersection Z = {T2[i]|M2[i]∈V}; Each party performs the same operation to identify whether the element on the storage is in the intersection: S ij1 Arrange and Send to S ij2 ,if Then S ij2 Add S[i] to the intersection Z; S ij1 No output; S ij2 Output intersection Z = X∩Y; Will I ij User S ij The set is divided into n pairs of combinations. After performing privacy intersection on these n combinations, the n plaintext intersections are then intersected. This gives I ij The final privacy result of the user is as follows: After this I ij Generate Message for: Among them, S ij A ij The smart meter collection under Id ijk A ij Unique identifier, date ij is the current date information, ts ij is the timestamp. ij sign and get a signature Will Send to Bookkeeper B i .
6. The method for sharing secure and auditable data of smart grid based on blockchain according to claim 1 is characterized in that: The process of S5 is specifically as follows: Bookkeeper B i Receive A ij After the message is sent, the signature message is verified. If there is no problem, the result PSID is obtained. ij Upload to blockchain.
7. A blockchain-based smart grid security auditable data sharing system that implements the blockchain-based smart grid security auditable data sharing method as described in any one of claims 1 to 6, characterized in that: The system includes: Building modules for establishing microgrids and power chains; The key registration module is connected to the establishment module and is used for the smart meter, the interposer, and the bookkeeper to generate relevant components and upload them to the microgrid during the key generation phase; The data reading and encryption module is connected to the key registration module, and the data owner will read the power data and encrypt it; The privacy intersection module is connected to the data reading and encryption module, and is used to divide the user set under each accountant into n pairs of combinations, perform privacy intersection on these n combinations respectively, and then perform intersection on these n plaintext intersections to obtain the final intersection result; The on-chain module is connected to the privacy intersection module. After the accountant receives the message sent by the intersection device, he verifies the signed message. If there is no problem, the intersection result is uploaded to the blockchain.
8. 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 smart grid secure and auditable data sharing method as described in any one of claims 1-6.
9. 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 smart grid secure and auditable data sharing method as described in any one of claims 1 to 6.
10. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the smart grid secure and auditable data sharing system based on blockchain as described in claim 7.
Citation Information
Cited By
Privacy intersection result verification method and device
CN119442318A
Intelligent logistics authorization cloud-assisted PSI-CA method supporting block chain and electronic equipment
CN119622828A
Blockchain-enabled smart logistics authorization cloud-assisted PSI-CA method and electronic device
CN119622828B
A method for power data anti-quantum grid encryption privacy set intersection
CN122741245A
Multi-agent privacy data collaborative analysis method and system for power grid sharing scenario
CN122824378A
