An Auditable Personalized Smart Grid Data Privacy Protection Method
Through the combination of blockchain and elliptic curve algorithm, the privacy protection problem of user power data in the smart grid is solved, personalized data security and auditability are achieved, data authenticity and reliability are ensured, and data quality requirements are met at the same time.
Patent Information
- Application Number
- CN202510189089.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-02-20
AI Technical Summary
The privacy protection of user power data in smart grids faces the risk of sensitive information leakage, and existing encryption technology cannot effectively guarantee the authenticity and reliability of data. At the same time, the amount of noise added by the gateway is unreliable, resulting in data utility loss.
Using a method of combining blockchain technology with differential privacy, security parameters are generated through the gateway and uploaded to the blockchain, and multiple rounds of encryption and verification are used to ensure data security and auditability, personalized privacy budgets are set according to user categories and a list of Laplace random numbers are generated to add noise to the power data.
It realizes personalized privacy protection for different user categories, ensures the authenticity and reliability of data, prevents privacy leakage, meets the data quality requirements of power grid companies, and provides auditable data processing processes.
Smart Images

Figure CN119835084B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data security, and particularly relates to an auditable personalized intelligent grid data privacy protection method. Background Art
[0002] The core development concept of the intelligent grid is to optimize power generation, transmission, and distribution by analyzing information on how users use electricity and how they consume it. The electrical energy data collected in each link of power generation, transmission, distribution, power consumption, and dispatching of the intelligent grid has the characteristics of large scale, multiple types, and high availability. The intelligent grid adjusts the power production and transmission and distribution efficiency by collecting and analyzing the power usage and supply status, thereby reducing power transmission losses and saving electrical energy.
[0003] In order to analyze information such as the load implementation situation of the power grid, power grid companies usually collect electricity consumption data periodically and relatively frequently, usually collecting it every 15 minutes or less to estimate the real-time electricity consumption of the power grid, manage the power generation, transmission, and distribution of the intelligent grid, and prevent problems such as large-scale power consumption collapses. Further, dynamic electricity price strategies can also be formulated according to the statistical results. In the task of collecting electricity quantity data, the number of electricity meter nodes is quite large, and each collection task may require thousands of nodes to participate. The intelligent grid system model is as Figure 1 shown. The gateway is responsible for collecting, aggregating, and processing a large amount of user electricity quantity data, and then storing it in the cloud server of the control center to reduce the system transmission overhead.
[0004] However, in this process, since attackers will eavesdrop on the communication path and thus steal the electricity quantity data, resulting in the leakage of sensitive information of users contained in the electricity quantity data, such as the occupancy rate of users' homes, economic status, and whether there are people at home, threatening user privacy, as Figure 2 shown. In addition, the importance of data privacy for different users is different. For example, the electricity quantity data of confidential units has a higher sensitivity. If its protection is insufficient, privacy leakage problems will occur. Therefore, it is urgent to protect the privacy of electricity quantity data and provide different privacy protection levels for electricity quantity data with different sensitivities.
[0005] The intelligent grid data collection process has the following characteristics: 1) frequent data collection; 2) a large number of intelligent electricity meter nodes; 3) limited computing power of intelligent electricity meters; 4) a large amount of electricity consumption data; 5) high data real-time performance. Therefore, while protecting user data privacy, it is necessary to minimize the computing overhead and communication overhead of intelligent electricity meters as much as possible. Compared with traditional privacy technologies such as encryption, differential privacy technology has a low computational complexity and can process real-time data more efficiently, and better meets the privacy protection in intelligent grid data collection. Therefore, when aggregating user electricity quantity data, the gateway can use differential privacy technology to add noise to the electricity quantity data.
[0006] However, for the power grid company, the fog nodes acting as gateways are semi-trusted. They will honestly protect the privacy of power consumption data, but the amount of noise they add is random, and the gateway can release power consumption data with arbitrary noise. Without accessing the original data, the power grid company cannot accurately evaluate the utility loss. If the added noise does not meet the requirements of the power grid company, resulting in a rapid reduction in data utility, the quality of service of the power consumption data is unacceptable to the power grid company at this time, causing serious losses.
[0007] Blockchain technology has the characteristics of decentralization and anti-tampering. Use blockchain as a reliable intermediary between the gateway and the power grid company; the verification nodes in the blockchain verify whether the noise added by the gateway to the power consumption data meets the user's utility loss, without the need for an additional secure channel to transmit the specific information of the added noise amount; and, the blockchain can record the interactions between different parties, ensuring efficient and secure transmission and sharing of data. Therefore, by combining blockchain with differential privacy, realizing secure and auditable personalized power consumption data privacy protection is the current research focus of the digital drive in the power industry. Summary of the Invention
[0008] To solve the problems existing in the background technology, the present invention provides an auditable personalized smart grid data privacy protection method, including:
[0009] S1: The gateway generates corresponding security parameters according to the user power consumption data it collects, and uploads the generated security parameters to the blockchain for recording; the security parameters include: the set of user categories, the maximum privacy budget for each type of user, and the probability quantum parameter;
[0010] S2: After obtaining the security parameters of the gateway from the blockchain, the power grid company sends the query request for the user power consumption data, the set privacy budget for each type of user, and the acceptable maximum utility loss to the blockchain;
[0011] S3: The gateway, the power grid company, and the blockchain respectively generate the same list of Laplace random numbers according to the probability quantum parameter, the maximum utility loss, and the privacy budget for each type of user; among them, the gateway queries the privacy budget for each type of user from the blockchain;
[0012] S4: The power grid company shuffles the generated list of Laplace random numbers to obtain a shuffled list of Laplace random numbers, and uploads the shuffled list of Laplace random numbers to the blockchain;
[0013] S5: The blockchain verifies whether the shuffled list of Laplace random numbers is valid according to the generated list of Laplace random numbers. If the verification is successful, execute step S6; otherwise, feedback a query failure to the power grid company;
[0014] S6: The blockchain encrypts each element in the shuffled Laplace random number list according to the public key of the gateway, the public key of the power grid company, and the first random number list generated by using the elliptic curve algorithm to obtain the first ciphertext list, and sends the first ciphertext list and the first random number list to the gateway;
[0015] S7: The gateway shuffles the first ciphertext list through a verifiable shuffling protocol, and re-encrypts the shuffled first ciphertext list by using the second random number list generated by the elliptic curve algorithm to obtain the second ciphertext list; and decrypts the second ciphertext list by using the second random number list and the first random number list to obtain the noise list, and judges whether the noise list is valid according to the Laplace random number list. If so, randomly select noise from the noise list for each type of user's electricity consumption data and add it to the user's electricity consumption data to obtain the noise-added user's electricity consumption data;
[0016] S8: The gateway encrypts the user's electricity consumption data by using its own public key, the public key of the power grid company, and the third random number list generated by using the elliptic curve algorithm to obtain the encrypted user's electricity consumption data, and generates a zero-knowledge proof according to the third random number list and the hash value of the third random number list; sends the encrypted user's electricity consumption data, the second ciphertext list, the hash value of the third random number list, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user's electricity consumption data to the blockchain for recording;
[0017] S9: The blockchain verifies whether the second ciphertext list is correctly generated from the first ciphertext list through a proof protocol corresponding to the verifiable shuffling protocol, and at the same time verifies whether the hash value of the third random number list is correct by using the zero-knowledge verification algorithm according to the zero-knowledge proof. If both verifications pass, send the encrypted user's electricity consumption data, the second ciphertext list, the hash value of the third random number list, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user's electricity consumption data to the power grid company;
[0018] S10: The power grid company verifies whether the hash value of the third random number list is correct by using the zero-knowledge verification algorithm according to the zero-knowledge proof. If the verification passes, decrypt the encrypted user's electricity consumption data according to the second ciphertext list and the decryption key by using the property of homomorphic encryption to obtain the noise-added user's electricity consumption data, and verify the noise-added user's electricity consumption data by using the hash value of the noise-added user's electricity consumption data. If the verification passes, the query is successful.
[0019] The present invention has at least the following beneficial effects
[0020] In terms of data security, the present invention encrypts data through multiple rounds of elliptic curve algorithms, such as encrypting Laplace random number lists, user electricity consumption data, etc., to prevent data from being stolen and tampered with. At the same time, a multi-link verification mechanism, such as the verification of relevant data by blockchain and power grid companies, avoids the entry of illegal data and effectively guarantees the authenticity and reliability of the data. At the privacy protection level, personalized privacy budgets are set according to different user categories, and Laplace random number lists are generated by combining probability quantum parameters, etc., to add noise perturbations to the original electricity consumption data, effectively preventing the leakage of user privacy. Regarding data availability and accuracy, based on the maximum utility loss acceptable to power grid companies, the data quality is reasonably controlled during the privacy protection process. The multi-round verification mechanism also ensures that there are no errors or deviations in the data during each processing link, meeting the business analysis requirements of power grid companies. In terms of auditability, using the immutable characteristics of blockchain, from uploading security parameters at the gateway to subsequent recording of encrypted data, keys and other information, all operations can be traced completely, facilitating the review of the compliance and transparency of the entire data privacy protection process. The present invention can provide different levels of privacy protection for different users, protect the privacy of users with strong data sensitivity, make full use of the data value of users with low data sensitivity, and achieve better privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic diagram of the system model of the present invention;
[0022] Figure 2 is a schematic diagram of the attack model;
[0023] Figure 3 is a schematic diagram of the method flow of the present invention;
[0024] Figure 4 is a schematic diagram of the composition of user types in the power grid of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] The following describes the embodiments of the present invention through specific specific examples. Those skilled in the art can easily understand the other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0026] Please refer to Figure 1 、 Figure 2 and Figure 3 , the present invention provides an auditable personalized smart grid data privacy protection method, including:
[0027] S1: The gateway generates corresponding security parameters based on the user electricity consumption data it collects, and uploads the generated security parameters to the blockchain for recording; the security parameters include: the set A of user categories m , the maximum privacy budget ε for each type of user max and the probabilistic quantum parameter δ;
[0028] In this embodiment, after the gateway and the power grid company are registered in the trusted center (Certificate Authority, CA), they can join the blockchain network and become an ordinary node. The CA assigns a pair of EC-Elgamal keys (P G , S G ) to the gateway, and assigns a key pair (P C , S C ) to the power grid company. These two types of nodes interact with each other by invoking the smart contract SC on the blockchain. The transactions generated on the SC will be recorded in the ledger B. The nodes in the blockchain network are divided into two types: verification nodes are responsible for verifying transactions, generating blocks, and running consensus algorithms to maintain a public ledger; ordinary nodes are responsible for transmitting transactions and broadcasting blocks and do not participate in ledger maintenance.
[0029] For the convenience of data processing, the present invention assumes that all user power grid data sets can be statistically represented as histogram data. The power consumption data set of all users is D = {D1,..., D N}, where D n represents the power consumption data of the nth user. The gateway aggregates the power consumption data according to user attributes. Let the set of attribute values be A = {A1,..., A M}, and each attribute represents each type of user. The aggregated power consumption data of all users is represented as histogram data, denoted as D' = {f1,..., f M}; where f m represents the power consumption data set corresponding to the mth attribute value A m ; the power consumption data set f m of each user is composed of V data {d1,..., d V}. At this time, transmitting all M types of data can be regarded as the transmission of M individual data sets.
[0030] Since different categories of user attributes have different degrees of privacy protection, different categories of users have different maximum privacy budgets, which are pre-agreed and set jointly by all relevant participating parties. The probabilistic quantum parameter is also pre-agreed and set jointly by all relevant participating parties.
[0031] In this embodiment, according to the different attributes A m of the demand-side power consumption data, users are divided into the following categories:
[0032] Household users:
[0033] The electricity consumption of household users is mainly used for living and household appliances, including the power supply for household appliances such as lighting, air conditioners, TVs, refrigerators, washing machines, water heaters, as well as the needs for charging, entertainment, etc.
[0034] The electricity consumption data of residential users may reflect private information such as personal living habits, living status, and the number of family members. For example, the electricity consumption data may expose privacy content such as the user's residence time, living habits, and the number of family members. The leakage of this information may lead to the infringement of personal privacy, such as being used for theft, surveillance and other bad behaviors.
[0035] Commercial users:
[0036] The electricity consumption of commercial users is mainly used for commercial operations and office premises, including lighting, air conditioners, refrigeration equipment, computers, POS machines, etc. in shops, office buildings, restaurants, supermarkets, etc.
[0037] The sensitivity of the electricity consumption data of commercial users is mainly reflected in commercial operations. These data may contain information such as the production cost, sales volume, profit margin, and operation efficiency of the enterprise. The leakage of this information may lead to competitors obtaining trade secrets, affecting the commercial status and profitability of the enterprise.
[0038] Industrial users:
[0039] The electricity consumption of industrial users is mainly used for production and industrial equipment, including production lines, mechanical equipment, lighting, air conditioners, heating equipment, etc.
[0040] The electricity consumption data of industrial users is usually associated with the production activities and equipment operation of the enterprise. These data may contain key information such as the production capacity, equipment utilization rate, and production efficiency of the enterprise. The leakage of this information may lead to the exposure of the enterprise's trade secrets. Competitors may obtain sensitive information about the enterprise's production situation by analyzing the electricity consumption data, thus affecting the competitiveness and market position of the enterprise.
[0041] Agricultural users:
[0042] The electricity consumption of agricultural users is mainly used for agricultural production and facility equipment, including irrigation, greenhouse equipment, breeding equipment, agricultural machinery, etc.
[0043] The electricity consumption data of agricultural users may disclose privacy information such as crop planting information, irrigation conditions, agricultural activity cycles, economic status, and land resource utilization, which may lead to risks and problems in commercial competition, water resource management, agricultural production, and land use.
[0044] Government agency users:
[0045] The electricity consumption of government agency users is mainly used for administrative work, and power support needs to be provided for office premises, conference halls, administrative buildings, etc. to ensure the normal operation of daily office work and administrative management. Government agencies are responsible for managing and operating various public facilities, including transportation, public transportation, municipal infrastructure, cultural and sports facilities, etc. Government agencies are responsible for maintaining social public safety and public order, including police stations, fire departments, emergency management agencies, etc. Government agencies are responsible for environmental protection and ecological construction work, including environmental monitoring, ecological protection, water resource management, etc.
[0046] As an important role in power management and supervision, the electricity consumption data of government agencies may involve sensitive information such as energy use in the public service field and government procurement. These data are of great significance for government decision-making, public resource allocation, etc., and leakage may have a negative impact on the public interest.
[0047] Transportation users:
[0048] The electricity consumption of transportation users is mainly used for transportation vehicles and charging facilities, including the power supply of electric vehicles, electric bicycles, public transportation, and related charging pile equipment.
[0049] The electricity consumption data of transportation users may expose sensitive information such as the number of transportation vehicles, operating routes, and transportation frequencies, which may lead to security risks such as traffic flow monitoring and leakage of transportation plans. In addition, these data may also reveal confidential information in aspects such as business competition and transportation strategies, which may affect the commercial interests of enterprises. Figure 4 Specifically depicts different types of users in the power grid system.
[0050] Therefore, different levels of privacy protection need to be adopted for different types of users, and the privacy budget is determined according to the privacy protection level.
[0051] S2: After the power grid company obtains the security parameters of the gateway from the blockchain, it sends the query request for user electricity consumption data, the privacy budget set for each type of user, and the acceptable maximum utility loss to the blockchain;
[0052] In this embodiment, after the power grid company receives the security parameters of the gateway, it sets the privacy budget and the acceptable maximum utility loss for each type of user. When setting the privacy budget, it is necessary to ensure that the privacy budget of each type of user is less than its agreed maximum privacy budget ε max , to obtain the privacy budget set ε = {ε1,..., ε M} of all types of users; the power grid sets the acceptable maximum utility loss α so that the data after noise addition by the subsequent gateway satisfies the following conditions:
[0053]
[0054] Among them, M represents the number of user categories, and f m represents the original electricity consumption data of the m-th category of users collected by the gateway, represents the electricity consumption data of the m-th category of users after the gateway adds noise, and α is the maximum acceptable utility loss.
[0055] When the power grid company sends the query request for user electricity consumption data, the privacy budget set for each category of users, and the maximum acceptable utility loss to the blockchain, the blockchain verifies whether the privacy budget of each type of user uploaded by the power grid company is less than its maximum privacy budget. If the verification passes, it sends a verification success message to the gateway and the power grid company, and executes step S3. Otherwise, it feedbacks a query failure to the power grid company.
[0056] In this embodiment, the security parameters generated by the gateway in S1 include the maximum privacy budget for each category of users. The power grid company sets the privacy budget for each category of users in S2. The whole process fully considers the privacy requirement differences of different user categories. Subsequent steps operate based on these privacy budgets. For example, in the link of generating the Laplace random number list, the privacy budget is combined to ensure that while meeting the data query requirements, the user privacy is maximally protected, and prevent user privacy leakage caused by excessive queries.
[0057] S3: The gateway, the power grid company, and the blockchain respectively generate the same Laplace random number list according to the probability quantum parameter, the maximum utility loss, and the privacy budget of each category of users; among them, the gateway queries the privacy budget of each category of users from the blockchain;
[0058] Preferably, the Laplace random number list includes:
[0059] S31: Determine the input parameters, and the input parameters include: the probability quantum parameter δ, the maximum acceptable utility loss α, and the privacy budget ε of each category of users m ;
[0060] S32: Create an empty list N m , define a range set Initialize the variable z to -α; initialize p to 0, and initialize d to be equal to the length of the list N m ;
[0061] S33: When z ≤ |α| and , F Lap (,) represents generating the corresponding random number according to the Laplace cumulative distribution probability; add the current value of z to the list N m ;
[0062] S34: Let p = p + δ, z = z + 1, and repeat steps S33 - S34 until z > |α| or So far, a list N of Laplace random numbers is obtained. m .
[0063] In this embodiment, Laplace random number lists are generated by the gateway, the power grid company, and the blockchain. The power grid company shuffles the generated Laplace random number list to obtain a shuffled Laplace random number list. The blockchain needs to verify whether the shuffled Laplace random number list uploaded by the power grid company is valid based on its own generated Laplace random number list. If the initial Laplace random number lists generated by the three parties are different, the blockchain cannot determine whether the shuffling operation of the power grid company is correct and compliant, and it is difficult to judge whether the data has been tampered with or there are incorrect processes. This verification can ensure the authenticity and reliability of the data, laying a solid foundation for the subsequent data processing links. For example, in the subsequent steps, the noise list generated based on the verified shuffled Laplace random number list can be used by the gateway to add noise to the user electricity consumption data, thereby ensuring the normal operation of the user privacy protection mechanism. The gateway, the power grid company, and the blockchain all play key roles in the entire data processing process. The gateway is responsible for collecting and preliminarily processing the user electricity consumption data. The power grid company initiates a data query request and finally uses the processed data. The blockchain serves as an important link for data storage and verification. The three parties generating the same Laplace random number list provides the same basis for their respective subsequent data processing operations, avoiding inconsistencies caused by different data processing bases, ensuring the smooth operation of the entire solution process. At the same time, this embodiment is based on the set probability quantum parameter δ, the acceptable maximum utility loss α, and the privacy budget ε for each type of user m The noise in the generated Laplace random number list all meets the requirements of the maximum utility loss acceptable to the power grid company.
[0064] S4: The power grid company shuffles the generated Laplace random number list to obtain a shuffled Laplace random number list, and uploads the shuffled Laplace random number list to the blockchain;
[0065] In this embodiment, list N is generated m After that, the power grid company shuffles N m to obtain a new list N'. m . Then, the power grid company calls the smart contract to send the new list to the blockchain network. During the consensus process, each verification node first uses its own generated list N m to check whether N' m is valid. Ensure that the power grid company does not add other noises to the noise generation list.
[0066] S5: The blockchain verifies whether the shuffled Laplace random number list is valid according to the generated Laplace random number list. If the verification is successful, execute step S6; otherwise, feedback a query failure to the power grid company.
[0067] S6: The blockchain encrypts each element in the shuffled Laplace random number list according to the public key of the gateway, the public key of the power grid company, and the first random number list generated by using the elliptic curve algorithm to obtain the first ciphertext list, and sends the first ciphertext list and the first random number list to the gateway;
[0068] Preferably, the encrypting each element in the shuffled Laplace random number list to obtain the first ciphertext list includes:
[0069] S61: Construct a joint public key according to the public key of the gateway and the public key of the power grid company
[0070] S62: Generate the first random number list by using the elliptic curve algorithm;
[0071] S63: Encrypt each element in the shuffled Laplace random number list by using the joint public key and the first random number list to obtain the first ciphertext list, B represents the base point of the elliptic curve; β i represents the i-th random number in the first random number list, z i represents the i-th element in the first ciphertext list; σ i represents the i-th element in the shuffled Laplace random number list.
[0072] In this embodiment, generating the first random number list by using the elliptic curve algorithm includes: setting the elliptic curve parameters, assuming that in this embodiment, the base point B = 2, the order of the group n = 17, the public key P CR = 5, and the shuffled noise random number list N' k sent by the power grid company = {3, -1, 4}. For each element σ i in the shuffled noise random number list, use a secure random number generator (such as the secrets module in Python) to generate the corresponding random number β i , and the generation range of the random number is [1, 16], specifically as follows:
[0073] β1 = 7, β2 = 11, β3 = 13
[0074] Calculate the ciphertext:
[0075] For σ1 = 3, z1 = (β1·B, σ1 + β1·P CR ) = (7·2, 3 + 7·5) = (14, 38)
[0076] For σ2 = -1, z2 = (β2·B, σ2 + β2·P CR ) = (11·2, -1 + 11·5) = (22, 54)
[0077] For σ3 = 4, z3 = (β3·B, σ3 + β3·P CR ) = (13·2, 4 + 13·5) = (26, 69)
[0078] The encrypted ciphertext list is: {z1, z2, z3} = {(14, 38), (22, 54), (26, 69)}
[0079] In this embodiment, the shuffled Laplace random number list is encrypted by using the public keys of the gateway and the power grid company and the first random number list through the elliptic curve algorithm, and the original random number list is converted into the first ciphertext list. The elliptic curve cryptosystem (ECC) has high security. Based on the difficulty of the discrete logarithm problem, it is very difficult for an attacker to reverse the original random number information from the encrypted ciphertext. For example, even if the attacker intercepts the first ciphertext list, it is almost impossible to restore the content of the shuffled Laplace random number list without knowing the private key and the details of the specific encryption algorithm (including the generation method of random numbers, etc.), thus effectively protecting the confidentiality of the data. The encryption process adds a layer of security protection to the data. Because any tampering with the ciphertext will result in an incorrect result during decryption, the receiving party (gateway) can detect whether the data has been tampered with by verifying whether the decryption is successful. This ensures the integrity of the data during the transmission from the blockchain to the gateway, and ensures the authenticity and reliability of the data. At the same time, the blockchain plays a key role in this process. It records the public keys used for encryption, the generated first random number list, and the encrypted first ciphertext list. These complete data records can be used for auditing purposes. When it is necessary to check whether the data processing process is compliant and whether there is a risk of data leakage, these records can provide detailed information. At the same time, due to the immutable nature of the blockchain, the authenticity and reliability of these records are guaranteed, which is convenient for retrospective and liability determination afterwards.
[0080] S7: The gateway shuffles the first ciphertext list through a verifiable shuffling protocol, and re - encrypts the shuffled first ciphertext list by using the second random number list generated by the elliptic curve algorithm to obtain the second ciphertext list; and decrypts the second ciphertext list by using the second random number list and the first random number list to obtain the noise list, and judges whether the noise list is valid according to the Laplace random number list. If so, randomly select noise from the noise list for each type of user's electricity consumption data and add it to the user's electricity consumption data to obtain the noise - added user's electricity consumption data;
[0081] In this embodiment, the gateway applies a verifiable shuffling protocol to the received first ciphertext list (z1,..., z d ) First, shuffle the ciphertext list through the shuffling function π(i), and then re - encrypt to obtain z i ′ = ((γ i + β π(i) )B, σ π(i) +(γ i + β π(i) )P GC ), where γ i represents the i-th element in the second list of random numbers generated using the elliptic curve algorithm; π(i) represents the position after shuffling of the i-th element in the first list of ciphertexts; β π(i) represents the π(i)-th random number in the first list of random numbers; B represents the base point of the elliptic curve; P GC represents the joint public key; P G and P C represent the public key of the gateway and the public key of the power grid company; σ π(i) represents the π(i)-th element in the list of shuffled Laplace random numbers; z i ′ represents the i-th element in the second list of ciphertexts. For the gateway, σ π(i) , β π(i) , γ i , B and P GC are all known, so the gateway can decrypt z i ′ to obtain the decrypted noise list σ π(i) , and randomly select σ π(i) to add to the data. The data after adding noise is
[0082] In this embodiment, the Verifiable Shuffle Protocol includes three steps: a re-encryption algorithm, shuffling, and a proof system. Re-encryption is part of the Verifiable Shuffle Protocol. After the gateway performs shuffling (shuffling) and re-encryption, the verification node executes the corresponding proof. Once re-encrypted, the data becomes tamper-proof (regardless of any cheating by the power grid company or the verification node), while maintaining privacy protection. The verification node can use the Verifiable Shuffle Algorithm (proof) to ensure the correctness of the re-encryption process. This method allows verification of data correctness even if the verification node cannot directly view the encrypted data. Since the noise list and the gateway's Laplace random number list are generated using the same parameters and the same algorithm, the noise list and the Laplace random number list should be consistent. The Laplace random number list can be used to determine whether the noise list is valid and whether the data in the noise list has been altered. The gateway shuffles the first ciphertext list using the Verifiable Shuffle Protocol, disrupting the original data order and further increasing the randomness of the data. This completely disrupts the original data arrangement after processing. Even if an attacker obtains partial data, it is difficult to infer the original data's patterns or regularities, significantly enhancing data obfuscation and providing additional security. The second ciphertext list is re-encrypted using a second random number list generated by an elliptic curve algorithm, introducing a new element of randomness. This re-encryption process, leveraging the complexity and randomness of the elliptic curve algorithm, further enhances data security and makes it even more difficult to decrypt. Even if someone knows the first encrypted data, the re-encryption process using new random numbers prevents them from easily deriving the original encrypted data, thus protecting user data privacy. A verifiable shuffling protocol allows for verification of the shuffling process in subsequent operations. This allows other participants (such as blockchains or power grid companies) to verify the correct execution of the shuffling operation, ensuring transparency and reliability of the data processing process. This verifiability helps prevent malicious or erroneous operations during data processing, ensuring the fairness and accuracy of the data processing process and the trustworthiness of the entire system. The second ciphertext list is decrypted using the second random number list and the first random number list to obtain a noise list, and the validity of the noise list is determined based on the Laplace random number list, ensuring that the processed data meets the expected noise distribution and privacy protection requirements. This verification mechanism ensures the reliability of the noise list, thereby ensuring the effectiveness of the user's electricity consumption data after the final noise is added in terms of privacy protection, and avoiding the failure of user privacy protection due to incorrect noise processing. Step S7 uses multiple data processing and verification methods to not only strengthen data security and privacy protection, but also ensure the verifiability of the data processing process, while taking into account the availability of data, playing an important role in the reliability and effectiveness of the entire smart grid data privacy protection system.
[0083] S8: The gateway uses its own public key, the public key of the power grid company, and a list of third random numbers generated using the elliptic curve algorithm to encrypt the user's electricity consumption data to obtain the encrypted user's electricity consumption data, and generates a zero-knowledge proof based on the list of third random numbers and the hash value of the list of third random numbers; it sends the encrypted user's electricity consumption data, the second password text list, the hash value of the list of third random numbers, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user's electricity consumption data to the blockchain for recording; in this embodiment, the decryption key μ m,i = β π(i) + γ i + η k .
[0084] Gateway Zero-Knowledge Proof Generation Algorithm
[0085] Objective: Generate a zero-knowledge proof ZKP(η k );
[0086] Input: Elliptic curve parameter base point B and the order n of the group, the private random number η of the gateway k .
[0087] Output: Zero-knowledge proof: commitment value C and response value s;
[0088] 1. The gateway selects a random number r, where r ∈ {1, 2,..., n - 1}, and the generation method of the random number is the same as before.
[0089] 2. Calculate the commitment value s: Use the random number r and the elliptic curve base point B to calculate the commitment value:
[0090] C = r·B
[0091] 3. The verification node generates a random challenge value c, where c ∈ {1, 2,..., n - 1}, and the gateway receives this challenge value c.
[0092] 4. Calculate the response value: The gateway calculates the response value s based on the challenge value c, the random number r, and its private value η k Calculate the response value s:
[0093] s = (r + c·η k ) mod n
[0094] 5. Generate the proof: The generated zero-knowledge proof is published to the verification node as a binary tuple (C, s), that is: ZKP(η k ) = (C, s).
[0095] In this embodiment, the elliptic curve algorithm and the generated third random number list are used to encrypt the user's electricity consumption data, converting the user's electricity consumption data into encrypted user electricity consumption data, taking advantage of the strong security of elliptic curve cryptography. Elliptic curve encryption is based on the difficulty of the discrete logarithm problem, ensuring that only entities with the corresponding private key can decrypt the data, protecting the user's electricity consumption data from unauthorized access and tampering. In the above example, the encrypted user electricity consumption data is incomprehensible to a third party without the correct decryption key, greatly improving the confidentiality of the data. A zero-knowledge proof is generated, allowing the gateway to prove its knowledge and correct generation of the third random number list without revealing the list, thus ensuring the privacy of the data. This means that even when certain properties of the data need to be verified (such as whether the generation of random numbers complies with regulations), sensitive information will not be exposed, adding an extra layer of privacy protection to the entire system while ensuring the reliability and compliance of the data processing process. Sending the hash value of the third random number list and the hash value of the noise-added user electricity consumption data to the blockchain for recording ensures the integrity of the data. Any tampering with these data will change their hash values, enabling the verifier to easily check whether the data has been tampered with. For example, if an attacker attempts to modify the encrypted user electricity consumption data or other information, the corresponding hash values will not match and will thus be detected, ensuring the integrity of the data during transmission and storage. The zero-knowledge proof allows the blockchain or other verifiers to verify the correctness of the information without obtaining sensitive information. Through the zero-knowledge proof protocol, the verifier can check whether the gateway has generated the third random number list in accordance with the specified method without knowing the actual random number list, enhancing the verifiability and trust of the system. Sending all key information to the blockchain for recording takes advantage of the immutable property of the blockchain. In this way, every operation step in the system can be traced on the blockchain, facilitating auditors to review the entire data processing process and ensuring that the data processing process complies with regulations and privacy protection standards. In the event of a data breach or dispute, the problem can be located based on the records on the blockchain and can be used as evidence, improving the transparency and reliability of the entire system.
[0096] S9: The blockchain verifies whether the second ciphertext list is correctly generated from the first ciphertext list through a proof protocol corresponding to the verifiable shuffle protocol, and at the same time, uses the zero-knowledge verification algorithm to verify whether the hash value of the third random number list is correct based on the zero-knowledge proof. If both verifications pass, the encrypted user electricity consumption data, the second ciphertext list, the hash value of the third random number list, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user electricity consumption data are sent to the power grid company;
[0097] S10: The power grid company uses the zero-knowledge verification algorithm to verify whether the hash value of the third random number list is correct based on zero-knowledge proof. If all verifications pass, it decrypts the encrypted user electricity consumption data using the attributes of homomorphic encryption according to the second ciphertext list and the decryption key, obtains the noisy user electricity consumption data, and uses the hash value of the noisy user electricity consumption data to verify the noisy user electricity consumption data. If the verification passes, the query is successful.
[0098] Parameters known to the verification node: public key η k · B, challenge value c, elliptic curve base point B, order n of the group, hash value recorded in the blockchain. Note that if the verifier knows η k · B and B, in theory, η can be calculated through the inverse operation of elliptic curve point multiplication. k . However, this is actually infeasible within the framework of elliptic curve encryption because this operation depends on solving the elliptic curve discrete logarithm problem (ECDLP), which is extremely difficult with existing mathematical and computational resources. Therefore, the verifier cannot derive η k · from B and B. k .
[0099] Provided by the gateway: ZKP(η k ) = (C, s), hash(η k )
[0100] First, verify whether hash(η k ) is consistent with the hash value recorded in the blockchain. If not, the verification fails. If it is consistent, then verify the proof sent by the gateway as follows:
[0101] L = s · B
[0102] R = C + c · (η k · B)
[0103] Compare whether L is equal to R. If they are equal, the verification passes.
[0104] Preferably, the decrypting the encrypted user electricity consumption data using the attributes of homomorphic encryption includes:
[0105]
[0106] μ m,i = β π(i) + γ i + η k
[0107]
[0108] where represents the encrypted user electricity consumption data, z′i Represents the second ciphertext list, represents the user's power consumption data after adding noise.
[0109] The requester verifies whether the decryption is correct by using the hash value to verify whether the decryption is correct.
[0110] In summary, in terms of data security, the present invention encrypts multiple rounds through the elliptic curve algorithm, such as encrypting the Laplace random number list, user power consumption data, etc., to prevent data from being stolen and tampered with. At the same time, a multi-link verification mechanism, such as the verification of relevant data by the blockchain and the power grid company, avoids illegal data from entering, and effectively guarantees the authenticity and reliability of the data. At the privacy protection level, personalized privacy budgets are set according to different user categories, and the Laplace random number list is generated by combining probability quantum parameters, etc., to add noise perturbation to the original power consumption data, effectively preventing user privacy leakage. Regarding data availability and accuracy, based on the maximum utility loss acceptable to the power grid company, the data quality is reasonably controlled during the privacy protection process. The multi-round verification mechanism also ensures that there are no errors or deviations in the data during each processing link, meeting the business analysis requirements of the power grid company. In terms of auditability, by using the immutable characteristics of the blockchain, uploading security parameters from the gateway to subsequent recording of encrypted data, keys and other information, all operations can be traced completely, facilitating the review of the compliance and transparency of the entire data privacy protection process. The present invention can provide different levels of privacy protection for different users, protect the privacy of users with strong data sensitivity, make full use of the data value of users with low data sensitivity, and achieve better privacy protection.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.
Claims
1. An auditable personalized smart grid data privacy protection method, characterized in that Including: S1: The gateway generates corresponding security parameters based on the user electricity consumption data it collects, and uploads the generated security parameters to the blockchain for recording; The security parameters include: the set of user categories, the maximum privacy budget for each type of user, and the probability quantum parameter; S2: After obtaining the security parameters of the gateway from the blockchain, the power grid company sends the query request for the user electricity consumption data, the privacy budget set for each type of user, and the acceptable maximum utility loss to the blockchain; S3: The gateway, the power grid company, and the blockchain respectively generate the same list of Laplace random numbers according to the probability quantum parameter, the maximum utility loss, and the privacy budget for each type of user; among them, the gateway queries the privacy budget for each type of user from the blockchain; S4: The power grid company shuffles the generated list of Laplace random numbers to obtain a shuffled list of Laplace random numbers, and uploads the shuffled list of Laplace random numbers to the blockchain; S5: The blockchain verifies whether the shuffled list of Laplace random numbers is valid according to the generated list of Laplace random numbers. If the verification is successful, step S6 is executed; otherwise, a query failure is feedback to the power grid company; S6: The blockchain encrypts each element in the shuffled list of Laplace random numbers according to the public key of the gateway, the public key of the power grid company, and the first list of random numbers generated by using the elliptic curve algorithm to obtain a first list of ciphertexts, and sends the first list of ciphertexts and the first list of random numbers to the gateway; S7: The gateway shuffles the first list of ciphertexts through a verifiable shuffling protocol, and re-encrypts the shuffled first list of ciphertexts by using the second list of random numbers generated by the elliptic curve algorithm to obtain a second list of ciphertexts; and decrypts the second list of ciphertexts by using the second list of random numbers and the first list of random numbers to obtain a noise list, and judges whether the noise list is valid according to the list of Laplace random numbers. If so, randomly select noise from the noise list for each type of user's electricity consumption data and add it to the user's electricity consumption data to obtain the noise-added user electricity consumption data; S8: The gateway encrypts the user electricity consumption data by using its own public key, the public key of the power grid company, and the third list of random numbers generated by using the elliptic curve algorithm to obtain the encrypted user electricity consumption data, and generates a zero-knowledge proof according to the hash value of the third list of random numbers and the third list of random numbers; sends the encrypted user electricity consumption data, the second list of ciphertexts, the hash value of the third list of random numbers, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user electricity consumption data to the blockchain for recording; S9: The blockchain verifies whether the second list of ciphertexts is correctly generated from the first list of ciphertexts through the proof protocol corresponding to the verifiable shuffling protocol, and at the same time verifies whether the hash value of the third list of random numbers is correct by using the zero-knowledge verification algorithm according to the zero-knowledge proof. If both verifications pass, the encrypted user electricity consumption data, the second list of ciphertexts, the hash value of the third list of random numbers, the decryption key, the zero-knowledge proof, and the hash value of the noise-added user electricity consumption data are sent to the power grid company; S10: The power grid company uses the zero-knowledge verification algorithm to verify whether the hash value of the third random number list is correct based on zero-knowledge proof. If the verification passes, it decrypts the encrypted user electricity consumption data using the second ciphertext list and the decryption key according to the attributes of homomorphic encryption to obtain the noisy user electricity consumption data, and uses the hash value of the noisy user electricity consumption data to verify the noisy user electricity consumption data. If the verification passes, the query is successful.
2. The method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, characterized in that, The blockchain verifies whether the privacy budget of each type of user uploaded by the power grid company is less than its maximum privacy budget. If the verification passes, it sends a verification success message to the gateway and the power grid company and executes step S3. Otherwise, it feedbacks a query failure to the power grid company.
3. The method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, wherein Generating the Laplace random number list includes: S31: Determine input parameters, where the input parameters include: probability quantum parameter δ, acceptable maximum utility loss α, and privacy budget for each type of user ; S32: Create an empty list , define a range set , initialize the variable z to ; initialize to 0, initialize d to be equal to the length of the list ; S33: When and then it means to generate a corresponding random number according to the Laplace cumulative distribution probability; add the current value z to the list ; S34: Let , Repeat steps S33 to S34 until or is reached, obtaining a list of Laplace random numbers .
4. A method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, characterized in that, Encrypting each element in the shuffled Laplace random number list to obtain the first ciphertext list includes: S61: Construct a joint public key based on the public key of the gateway and the public key of the power grid company ; S62: Using the elliptic curve algorithm to generate the first random number list; S63: Encrypt each element in the shuffled Laplace random number list using the combined public key and the first random number list to obtain a first ciphertext list, , represents the base point of the elliptic curve; represents the th random number in the first random number list, represents the th element in the first ciphertext list; represents the th element in the shuffled Laplace random number list.
5. A method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, characterized in that, Re-encrypting the shuffled first ciphertext list using the second random number list generated by the elliptic curve algorithm includes: Among them, represents the th element in the second password text list, represents the th element in the second random number list generated by using the elliptic curve algorithm; represents the position after shuffling of the th element in the first password text list; represents the th random number in the first random number list; represents the base point of the elliptic curve; represents the combined public key; and represent the public key of the gateway and the public key of the power grid company; represents the th element in the shuffled Laplace random number list.
6. The method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, characterized in that, Encrypting the user electricity consumption data to obtain the encrypted user electricity consumption data includes: Among them, represents the encrypted user electricity consumption data, represents the random number in the third random number list; represents the jointly public key; and represent the public key of the gateway and the public key of the power grid company; represents the base point of the elliptic curve, represents the user electricity consumption data.
7. A method for protecting the privacy of personalized smart grid data that can be audited according to claim 1, characterized in that, Decrypting the encrypted user electricity consumption data using the attributes of homomorphic encryption includes: Among them, represents the encrypted user electricity consumption data, represents the random number in the third random number list, represents the second ciphertext list, represents the user electricity consumption data after adding noise, represents the th element in the shuffled Laplace random number list, represents the user electricity consumption data; represents the th random number in the first random number list; represents the shuffled position of the th element in the first ciphertext list; represents the th element in the second random number list generated by using the elliptic curve algorithm; represents the combined public key; represents the base point of the elliptic curve; and represents the public key of the gateway and the public key of the power grid company.
Citation Information
Patent Citations
Power grid data auditing method and device, power grid system and storage medium
CN114239078A
Privacy protection method and system for data of intelligent power distribution terminal
CN117371019A