Smart grid power consumption plan security aggregation method and system based on homomorphic encryption

Through homomorphic encryption and blockchain technology, the problems of tampering and privacy leakage during the transmission of power consumption plans in the smart grid are solved, and efficient and reliable power consumption plans aggregation and electricity bill settlement are achieved, ensuring data integrity and user privacy protection.

CN114139170BActive Publication Date: 2024-12-17CHINA SOUTHERN POWER GRID DIGITAL GRID GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202111062153.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2024-12-17
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

Power consumption plans in smart power grids are easily tampered with or impersonated during transmission, resulting in unfair electricity bill settlement, and the risk of user privacy information leakage, the current technology is inefficient in computing efficiency and cannot meet real-time requirements.

Method used

Adopt a secure aggregation method based on homomorphic encryption, combined with blockchain technology, ensure data integrity and privacy through homomorphic message authentication code, realize direct computing of ciphertext data, and use blockchain's distributed network and consensus mechanism Ensure traceability of electricity use plans.

Benefits of technology

It improves the confidentiality and integrity of power consumption plans, reduces calculation overhead, supports efficient power generation scheduling and electricity bill settlement, and ensures user privacy protection and data reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139170B_ABST
    Figure CN114139170B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for securely aggregating power consumption plans of smart grids based on homomorphic encryption, which belongs to the field of smart grids. A distributed network is constructed based on blockchain technology, which can realize direct operation of ciphertext data and reliable storage of data. A certificate authorization and authentication mechanism is established through a public key infrastructure, and the privacy and integrity of power consumption plans are simultaneously guaranteed through efficient homomorphic encryption algorithms and homomorphic message authentication code technologies. The method supports the power system to adjust power generation according to power consumption information submitted by users on the basis of privacy protection, thereby promoting reliable and efficient power generation and scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of smart grids and relates to a method and system for securely aggregating smart grid power consumption plans based on homomorphic encryption. Background Art

[0002] With the development of network technology and the research and development of new electricity meters, smart grid, as a new generation of power grid, can efficiently respond to power generation, transmission and distribution needs and realize flexible resource allocation. With its characteristics of maximizing asset utilization and optimizing service quality, it has gradually become a new power grid system to replace the traditional power grid. However, with the development of complex business and the expansion of network scale, while applying various technologies such as the Internet of Things and cloud computing to improve management and control capabilities and service quality, smart grids also need to deal with the risks brought by weak security links.

[0003] The smart grid system formulates power generation and distribution plans based on user power demand, and supports real-time adjustment of power generation to reduce waste of power resources. User power demand is divided into two categories. First, large power users such as factories and enterprises submit additional power consumption plans to the control center through smart meters in addition to basic power consumption. When the electricity bill is settled, the operator compares the actual power consumption with the planned power consumption to charge fees; second, household power users submit power saving plans to the control center through smart meters, that is, publish the power consumption reduction in a certain period, and reduce a certain amount of electricity charges according to the discount table when the electricity bill is settled. In addition, in addition to giving economic incentives to users who follow the power consumption plan, operators should also formulate punishment measures for users who exceed the planned power consumption.

[0004] Data aggregation technology is used to reduce communication congestion, and the electricity consumption plan is uploaded to the control center after filtering at the intermediate gateway. However, since the electricity consumption plan is indirectly related to the electricity bill settlement, if the data is maliciously tampered with during the transmission process or the legitimate user is impersonated by an illegal user, it may lead to under- or over-charging of electricity bills, making it difficult to ensure fairness and justice in the settlement stage; secondly, the data upload and fusion process is not public, making it difficult to trace whether the electricity consumption plan has been submitted and when it was submitted; most importantly, the electricity consumption plan involves user privacy information, and attackers may infer the user's personal privacy, such as enterprise size and family size, through data mining and other technologies. Therefore, it is urgent to realize the user's identity authentication and the integrity, traceability and privacy protection of the electricity consumption plan to prevent the threat of privacy leakage caused by identity impersonation and data eavesdropping or tampering.

[0005] At present, the smart grid field mainly adopts three types of data privacy protection technologies: differential privacy, secure multi-party computing and homomorphic encryption. Differential privacy balances data privacy and availability by adding disturbances to the original data, but can only obtain approximate data; secure multi-party computing requires multiple rounds of communication between the participating entities, and at the same time requires high computing power for smart meters; most of the existing data aggregation schemes use the Paillier algorithm to implement direct operations on ciphertext, but the calculation is relatively expensive and cannot be applied to smart grid scenarios with high real-time requirements. In order to improve the efficiency and accuracy of the algorithm, the present invention improves the homomorphic encryption algorithm to balance privacy protection with reliability and efficiency.

[0006] To achieve data integrity protection, the present invention adopts homomorphic message authentication code technology. Homomorphic message authentication code can compress multiple message authentication codes into one message authentication code, and only needs to be verified once to identify data tampering attacks, reducing the computational overhead of verification. In order to compare the planned electricity consumption with the actual electricity consumption in the settlement stage, the present invention realizes the traceability of the electricity consumption plan based on blockchain technology. Blockchain is an incremental database in which multiple nodes participate in accounting, and it runs according to the consensus mechanism to ensure the consistency of the ledger. The blockchain network is distributed, there is no central node, and the data on the chain is difficult to tamper with and traceable.

[0007] The present invention adopts a safe and efficient homomorphic encryption algorithm to realize the additive fusion of electricity consumption plans. Based on the identity of each subject in the certificate authentication system, the homomorphic message authentication code technology is combined to realize batch verification of data integrity, and the blockchain technology is used to establish electricity consumption plan data storage as a voucher for electricity bill settlement. Summary of the invention

[0008] The present invention aims to solve the problems of low efficiency, easy privacy leakage and easy data tampering when aggregating electricity consumption plans, and provides a method and system for secure aggregation of smart grid electricity consumption plans based on homomorphic encryption, which can realize direct calculation of ciphertext data, combine with blockchain technology, ensure the confidentiality and integrity of electricity consumption plans, support the power system to adjust the power generation according to the electricity consumption information submitted by users on the basis of privacy protection, and promote reliable and efficient power generation and scheduling.

[0009] In order to achieve the above object, the present invention adopts the following technical scheme:

[0010] The present invention provides a method for securely aggregating a smart grid electricity consumption plan based on homomorphic encryption, based on a system including a key generation center and a blockchain composed of a control center node (Control Center, CC), a gateway node (Gateway, GW) and a smart meter node (Smart Meter, SM). The method includes the following steps:

[0011] 1) System initialization steps: The key generation center generates public and private key pairs for the smart meter node and the gateway node respectively, and the smart meter node and the gateway node perform identity registration; the key generation center generates homomorphic encryption algorithm parameters and homomorphic message authentication code parameters;

[0012] 2) Electricity plan upload step: the user inputs the plaintext data of the electricity plan to the smart meter node, the smart meter node encrypts the electricity plan data according to the homomorphic encryption algorithm parameters, and calculates the message authentication code of the electricity plan ciphertext according to the homomorphic message authentication code parameters, obtains the electricity plan ciphertext and the message authentication code, and uploads them to the gateway node to request the electricity plan;

[0013] 3) Data security aggregation step: The gateway node verifies the data integrity and identity of the smart meter node according to the power consumption plan request of the smart meter node, and uploads the hash value of the power consumption plan ciphertext to the blockchain after verification; the power consumption plan ciphertext sent by the smart meter node is added and aggregated to generate a preliminary aggregation result containing the preliminary aggregation ciphertext and upload it to the control center node, and the hash value of the preliminary aggregation result is uploaded to the blockchain;

[0014] 4) Aggregation ciphertext decryption step: The control center node verifies the data integrity and gateway node identity based on the preliminary aggregation result. After verification, the preliminary aggregation ciphertext sent by the aggregation gateway node is added to obtain the final aggregation result, and the final aggregation result is decrypted to obtain the power consumption plan aggregation result. The power generation and distribution plan is formulated according to the power consumption plan aggregation result;

[0015] 5) Electricity bill settlement steps: The control center node calculates the electricity plan ciphertext hash value and searches the blockchain for a consistent electricity plan ciphertext hash value. If so, the electricity bill is settled based on the relationship between the actual electricity consumption and the planned electricity consumption in the electricity plan and the operator’s electricity price.

[0016] Furthermore, the step of performing identity registration between the smart meter node and the gateway node in step 1) includes:

[0017] The smart meter node and the gateway node send their identity information and node type to the key generation center to apply for a public-private key pair;

[0018] The key generation center generates public and private key pairs for the smart meter node and the gateway node respectively, and sends them to the smart meter node and the gateway node;

[0019] The smart meter node and the gateway node send node identity information, node type and public key information to the control center respectively, requesting identity registration;

[0020] The control center node verifies the identities of the smart meter and gateway nodes. After the verification is successful, a certificate is issued to the node to complete the identity registration.

[0021] Further, in step 1), the key generation center generates homomorphic encryption algorithm parameters according to the number of smart meters, and the homomorphic encryption algorithm parameters include a pseudo-random function family and a set of secret values ​​of smart meter nodes and control center nodes; the step of the key generation center generating homomorphic encryption algorithm parameters includes: the key generation center generates a pseudo-random function family according to a security parameter; randomly selects a preset number of secret values ​​from the full set of secret values ​​to form a secret value subset, and distributes it to the control center node; the key generation center divides the full set of secret values ​​into a plurality of addition subsets and a subtraction subset from which the secret value subset is subtracted, distributes the addition subset and the subtraction subset to each smart meter node, and pre-places the secret value in the Trusted Platform Module (TPM) of the smart meter node;

[0022] The homomorphic message authentication code parameters generated by the key generation center include a pseudo-random number generator, a key randomly selected from the key space of the pseudo-random number generator, a pseudo-random function, and a key randomly selected from the key space of the pseudo-random function; the key generation center sends the above keys to the control center node, the gateway node and the smart meter node.

[0023] Furthermore, in step 2), the step of encrypting the electricity consumption plan data by the smart meter node includes:

[0024] The user inputs plain text data of the electricity consumption plan for the next day, week or month into the smart meter node, including additional electricity consumption or electricity reduction;

[0025] The smart meter node generates an encryption key based on the addition subset and the subtraction subset of the stored secret value, and calculates the ciphertext of the electricity consumption plan according to the encryption key and the plaintext of the electricity consumption plan;

[0026] The smart meter node calculates the hash value of the plaintext and ciphertext of the electricity consumption plan, that is, the hash value of the electricity consumption plan;

[0027] The smart meter node calculates the homomorphic message authentication code according to the smart meter node identity information and certificate, the power consumption plan ciphertext, the power consumption plan hash value and the homomorphic message authentication code parameters;

[0028] The smart meter node uses the smart meter node identity information and certificate, power consumption plan ciphertext, power consumption plan hash value and homomorphic message authentication code as power consumption plan request information, submits the power consumption plan request to the gateway node, and calculates the power consumption plan request hash value and uploads it to the blockchain.

[0029] Furthermore, in step 2), the smart meter node divides the plaintext data of the power consumption plan into multiple sub-periods, generates encryption keys for the plaintext of the power consumption plan of each sub-period, calculates the ciphertext of the power consumption plan of each sub-period, and obtains the ciphertext of the entire power consumption plan.

[0030] Furthermore, in step 3), the method for verifying the data integrity is as follows: the gateway node fuses the homomorphic message authentication code, and performs integrity verification on the data according to the key and the fused homomorphic message authentication code. If the verification is successful, it means that the data has not been tampered with;

[0031] The method for verifying the identity of the smart meter node is as follows: the gateway node verifies the validity of the smart meter node certificate. The validity conditions include that the digital certificate is within the validity period, the root certificate corresponding to the node that issued the certificate is in the trust domain, and the digital certificate has not been frozen or revoked.

[0032] Furthermore, the method for calculating the preliminary aggregation result in step 3) is: the gateway node addition aggregates the electricity consumption plan ciphertext uploaded by the smart meter node to obtain the preliminary aggregated ciphertext of the electricity consumption plan; calculates the homomorphic message authentication code based on the gateway node identity information and certificate, the preliminary aggregated ciphertext, and the homomorphic message authentication code parameters; calculates the preliminary aggregation result based on the gateway node identity information and certificate, the preliminary aggregated ciphertext and the homomorphic message authentication code.

[0033] Furthermore, in step 4), the method for verifying the integrity of the data is as follows: the control center node fuses the homomorphic message authentication code, and performs integrity verification on the data according to the key and the fused homomorphic message authentication code; if the verification is successful, it means that the integrity of the data is not destroyed;

[0034] The method for verifying the identity of the gateway node is to verify whether the gateway node certificate is valid. If it is valid, the gateway node identity is verified;

[0035] The method for decrypting the final aggregation result is as follows: the control center node generates a decryption key based on the stored secret value subset, and uses the decryption key to decrypt the final aggregation result to obtain the plain text of the electricity consumption plan aggregation result.

[0036] Furthermore, in step 5), the control center node obtains the actual power consumption of each smart meter node, and calculates the power consumption plan ciphertext hash value according to the smart meter identity information and certificate, power consumption plan plaintext and ciphertext sent by the smart meter node.

[0037] The present invention provides a smart grid electricity consumption plan security aggregation system based on homomorphic encryption, including a key generation center and a blockchain composed of a control center node, a gateway node and a smart meter node, wherein:

[0038] The control center node is used to issue and revoke digital certificates of smart meter nodes and gateway nodes, decrypt aggregated ciphertext data, formulate power generation and distribution plans based on the aggregated results of the power consumption plan, and publish the electricity fee information that the users of smart meters need to pay based on the relationship between the actual power consumption and the planned power consumption in the power consumption plan;

[0039] The gateway node is used to verify the data integrity and identity of the smart meter node according to the power consumption plan request of the smart meter node, and upload the power consumption plan ciphertext hash value to the blockchain after verification; the power consumption plan ciphertext sent by the smart meter node is added and aggregated to generate a preliminary aggregation result containing the preliminary aggregation ciphertext and upload it to the control center node, and the preliminary aggregation result hash value is uploaded to the blockchain;

[0040] The smart meter node is used to encrypt the power consumption plan data according to the homomorphic encryption algorithm parameters and the homomorphic message authentication code parameters, obtain the power consumption plan ciphertext, and upload it to the gateway node to make a power consumption plan request;

[0041] The key generation center is used to generate and distribute legal public and private key pairs for smart meter node and gateway node certificates, and to generate and distribute homomorphic encryption algorithm parameters and homomorphic message authentication code parameters for smart meter nodes and control center nodes.

[0042] Compared with the prior art, the present invention has the following advantages:

[0043] The present invention constructs a distributed network based on blockchain technology to achieve reliable data storage, establishes a certificate authorization and authentication mechanism through a public key infrastructure, and ensures the privacy and integrity of the electricity plan through an efficient homomorphic encryption algorithm and homomorphic message authentication code technology. While protecting the privacy of users, the present invention designs a safe and efficient homomorphic encryption scheme. The encryption key and the decryption key are generated based on a pre-distributed secret value. Each time the smart meter node uploads the electricity plan, a newly generated encryption key is used, and the accurate electricity plan aggregation result can be obtained. Compared with the Paillier encryption algorithm, the calculation overhead of encryption and decryption can be greatly reduced; the integrity of the electricity plan is protected by the homomorphic authentication code, and batch authentication of data is supported. Once the data is tampered with, it can be discovered in time; based on blockchain technology, the traceability of the electricity plan is guaranteed. Once the electricity plan released by the smart meter node is on the chain, it cannot be modified. The nodes in the blockchain network can obtain the release and aggregation of the electricity plan in real time. The data on the chain is used as the basis for the formulation of power generation and distribution plans and the settlement of electricity bills, encouraging users to save electric energy, and it has high practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a blockchain network architecture diagram of a smart grid electricity consumption plan security aggregation system based on homomorphic encryption.

[0045] Figure 2 It is a flow chart of a method for secure aggregation of smart grid electricity consumption plans based on homomorphic encryption. DETAILED DESCRIPTION

[0046] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, the present invention is further described in detail below through its specific embodiments in conjunction with the accompanying drawings.

[0047] This embodiment discloses a smart grid power consumption plan security aggregation system based on homomorphic encryption, including a key generation center and a blockchain. Figure 1 As shown in the figure, the blockchain network is composed of three types of nodes: smart meter nodes, gateway nodes and control center nodes. Assume that there are n smart meter nodes, m gateway nodes, 1 control center node, and the gateway node GWID j Responsible for aggregation j Smart Meter Nodes Smart meter nodes are installed in users’ homes or offices to collect, encrypt and upload electricity consumption plans; gateway nodes are responsible for uploading data to the chain, preliminarily aggregating data and forwarding aggregated data; control center nodes are responsible for collecting and decrypting aggregated data, formulating power generation and distribution plans and settling electricity bills.

[0048] This embodiment also discloses a method for securely aggregating power consumption plans of smart grids based on homomorphic encryption, which is implemented based on the above system. Figure 2 As shown, the following steps are included:

[0049] Step 1: System initialization;

[0050] The specific implementation includes the following sub-steps:

[0051] Step 1.1: Smart Meter Node SMID i Gateway node GWID j Send identity information and node type (SMID i ,SM) and (GWID j ,GW)(SMID i GWID j is the identity information, SM and GW are the node types) to request the generation of a public and private key pair; the key generation center is the smart meter node SMID i Gateway node GWID j Generate and distribute public-private key pairs and (in is the public key, is the private key); smart meter node SMID i Gateway node GWID j Send requests to the control center node respectively and The control center nodes are smart meter nodes SMID i Gateway node GWID jCertificate issuance and

[0052] Step 1.2: The key generation center randomly selects k∈{0,1} according to the security parameter λ λ , generating a family of pseudo-random functions f k It is represented as a pseudo-random function with input key k; then ns secret values ​​α1, α2, …, α are randomly selected. ns , and randomly and uniformly divided into n additive subsets A1,A1,…,A containing s elements n ; The key generation center is from the complete set of secret values ​​{α1,α2,…,α ns} randomly select x elements to generate a set, i.e. a subset of secret values And randomly divide the remaining ns-x secret values ​​into n subtraction subsets The key generation center adds the ith addition subset A i and the ith subtraction subset Distributed to smart meter node SMID i , preset in the trusted platform module TPM of the smart meter node, and the collection Sent to the control center node for storage.

[0053] Step 1.3: The key generation center selects the pseudo-random number generator G and the pseudo-random function F respectively, and randomly selects the key k1 from the key space of the pseudo-random number generator G and the key k2 from the key space of the pseudo-random function F as the control center authentication parameters, and sends the keys to the control center node, gateway node and smart meter node.

[0054] Step 2: Upload the electricity plan;

[0055] It includes the following sub-steps:

[0056] Step 2.1: User U i SMID in smart meter node i Input the power consumption plan for the next day. The power consumption plan divides the next day into d sub-periods. The power consumption plan is plain text P i ={p i1 ,p i2 ,…,p id}.

[0057] Step 2.2: For the t-th sub-period electricity consumption plan input at time T, the smart meter node SMID i Generate encryption keys where h(·) is the hash function, f α (t+T) is the key for the secret value subset Ai The element α in the equation is the output value of the pseudo-random function of t+T, and M is a large integer. Similarly, the SMID of the smart meter node i Generate encryption key ek for each sub-cycle electricity consumption plan i1 ,ek i2 ,…,ek id .

[0058] Step 2.3: Smart Meter Node SMID i Calculate the ciphertext c corresponding to the electricity consumption plan of the tth sub-cycle it =(ek it +p it )modM. Similarly, the SMID of the smart meter node i Generate the ciphertext C of each sub-cycle electricity consumption plan respectively i ={c i1 ,c i2 ,…,c id}.

[0059] Step 2.4: Smart Meter Node SMID i Calculate the hash value of the electricity consumption plan i1 =h(P i ||C i ).

[0060] Step 2.5: Smart Meter Node SMID i Generate a homomorphic message authentication code for the electricity consumption plan ciphertext in Denotes G(k1) and Inner product operation over a finite field, “T” represents the transpose of the vector.

[0061] Step 2.6: Smart Meter Node SMID i send To the gateway node GWID j , and Upload to blockchain storage.

[0062] Step 3: Data security aggregation;

[0063] It includes the following sub-steps:

[0064] Step 3.1: Gateway Node GWID j Received j The electricity consumption plan request sent by the smart meter node is combined with the received homomorphic message authentication code calculate and If a′j +b′ j =tag′ j , it means that the data of the smart meter has not been tampered with.

[0065] Step 3.2: Gateway Node GWID j Verify n j The validity of the certificate of a smart meter node includes that the digital certificate is still valid, the root certificate corresponding to the node that issued the certificate is in the trust domain, and the digital certificate has not been frozen or revoked. If the verification is successful, it means that the identity of the smart meter node is legal.

[0066] Step 3.3: Gateway Node GWID j The ciphertext hash value h(SMID i ,GWID j ,C i ,hash i1 ) is uploaded to blockchain storage.

[0067] Step 3.4: Gateway Node GWID j Initial aggregated electricity consumption plan ciphertext c it , get the initial aggregate ciphertext AC j ={ac j1 ,ac j2 ,…,ac jd},in

[0068] Step 3.5: Gateway Node GWID j Calculate the homomorphic message authentication code corresponding to the ciphertext of the preliminary aggregated electricity consumption plan

[0069] Step 3.6: Gateway Node GWID j The preliminary aggregation results Upload to the control center node and hash the initial aggregation result Upload to blockchain storage.

[0070] Step 4: Decrypt the aggregated ciphertext;

[0071] It includes the following sub-steps:

[0072] Step 4.1: The control center node receives the preliminary aggregation results sent by m gateway nodes and merges the received homomorphic message authentication code calculate and If aa′+ab′=atag′, it means that the data transmitted by the gateway node has not been tampered with.

[0073] Step 4.2: The control center node verifies the validity of the certificates of the m gateway nodes respectively. If the verification is successful, it means that the gateway node is a legitimate node.

[0074] Step 4.3: The control center node again adds and aggregates the preliminary aggregated ciphertext sent by the m gateway nodes The final aggregation result AAC = (aac1, aac2, ..., aac d ).

[0075] Step 4.4: The control center node stores a subset of secret values Calculate the decryption key for the tth sub-period Similarly, the control center node generates decryption keys dk1, dk2, …, dk for each sub-period aggregated ciphertext. d .

[0076] Step 4.5: The control center node uses the decryption key to calculate the power consumption plan aggregation result aam corresponding to the preliminary aggregation ciphertext of the t-th sub-period t =(aac t -dk t )modM. Similarly, the control center node decrypts the preliminary aggregated ciphertext of each sub-period and obtains aam1, aam2, …, aam d , that is, decrypting the final aggregation result to obtain the electricity consumption plan aggregation result.

[0077] Step 4.6: The control center node aggregates the results aam1, aam2, …, aam according to each sub-period of the power consumption plan d Develop power generation and distribution plans for the day ahead.

[0078] Step 5: Electricity bill settlement;

[0079] It includes the following sub-steps:

[0080] Step 5.1: The control center node obtains the SMID of the smart meter node i The actual electricity consumption of the user;

[0081] Step 5.2: Smart Meter Node SMID i Identity information and electricity plan Send to the control center node;

[0082] Step 5.3: The control center node calculates the power consumption plan ciphertext hash value h(SMID i ,GWID j ,C i ,h(P i ||C i)) and check on the blockchain whether the data has been uploaded. If it exists on the chain, it means that the smart meter node SMID i Send electricity plan in advance i Corresponding ciphertext C i To the gateway node GWID j .

[0083] Step 5.4: The control center node compares the actual power consumption of each sub-period with the planned power consumption. If the two are consistent, the settlement is made according to the normal billing method; if the actual power consumption exceeds the plan, an additional electricity fee is charged on the basis of the normal billing; if the actual power consumption is less than the planned power consumption, the power fee is reduced or exempted according to the power fee discount table.

[0084] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.

Claims

1. A method for secure aggregation of smart grid electricity consumption plans based on homomorphic encryption, based on a system comprising a key generation center and a blockchain consisting of a control center node, a gateway node and a smart meter node, It is characterized in that The method comprises the following steps: 1) System initialization steps: The key generation center generates public and private key pairs for the smart meter node and the gateway node respectively, and the smart meter node and the gateway node perform identity registration; the key generation center generates homomorphic encryption algorithm parameters and homomorphic message authentication code parameters; the key generation center generates homomorphic encryption algorithm parameters according to the number of smart meters, and the homomorphic encryption algorithm parameters include a pseudo-random function family and a set of secret values ​​of the smart meter node and the control center node; the steps for the key generation center to generate homomorphic encryption algorithm parameters include: the key generation center generates a pseudo-random function family according to a security parameter; randomly selects a preset number of secret values ​​from the full set of secret values; The values ​​are combined into a secret value subset and distributed to the control center node; the key generation center divides the full set of secret values ​​into multiple addition subsets and a subtraction subset subtracted from the secret value subset, distributes the addition subset and the subtraction subset to each smart meter node, and the secret value is preset in the trusted platform module of the smart meter node; the homomorphic message authentication code parameters generated by the key generation center include a pseudo-random number generator, a key randomly selected from the key space of the pseudo-random number generator, a pseudo-random function, and a key randomly selected from the key space of the pseudo-random function; the key generation center sends the above keys to the control center node, the gateway node and the smart meter node; 2) Electricity plan upload step: the user inputs the plaintext data of the electricity plan to the smart meter node, the smart meter node encrypts the electricity plan data according to the homomorphic encryption algorithm parameters, and calculates the message authentication code of the electricity plan ciphertext according to the homomorphic message authentication code parameters, obtains the electricity plan ciphertext and message authentication code, and uploads them to the gateway node to request the electricity plan; 3) Data security aggregation step: The gateway node verifies the data integrity and identity of the smart meter node according to the power consumption plan request of the smart meter node, and uploads the hash value of the power consumption plan ciphertext to the blockchain after verification; the power consumption plan ciphertext sent by the smart meter node is added and aggregated to generate a preliminary aggregation result containing the preliminary aggregation ciphertext and upload it to the control center node, and the hash value of the preliminary aggregation result is uploaded to the blockchain; 4) Aggregation ciphertext decryption step: The control center node verifies the data integrity and gateway node identity based on the preliminary aggregation result. After verification, the preliminary aggregation ciphertext sent by the aggregation gateway node is added to obtain the final aggregation result. The final aggregation result is decrypted to obtain the power consumption plan aggregation result, and the power generation and distribution plan is formulated based on the power consumption plan aggregation result. 5) Electricity bill settlement steps: The control center node calculates the electricity plan ciphertext hash value and searches the blockchain for a consistent electricity plan ciphertext hash value. If so, the electricity bill is settled based on the relationship between the actual electricity consumption and the planned electricity consumption in the electricity plan and the operator’s electricity price.

2. The method according to claim 1, It is characterized in that In step 1), the steps of identity registration between the smart meter node and the gateway node include: The smart meter node and the gateway node send their identity information and node type to the key generation center to apply for a public-private key pair; The key generation center generates public and private key pairs for the smart meter node and the gateway node respectively, and sends them to the smart meter node and the gateway node; The smart meter node and the gateway node send node identity information, node type and public key information to the control center respectively, requesting identity registration; The control center node verifies the identities of the smart meter and gateway nodes. After the verification is successful, a certificate is issued to the node to complete the identity registration.

3. The method according to claim 1, It is characterized in that In step 2), the steps for the smart meter node to encrypt the electricity consumption plan data include: The user inputs plain text data of the electricity consumption plan for the next day, week or month into the smart meter node, including additional electricity consumption or electricity reduction; The smart meter node generates an encryption key based on the addition subset and the subtraction subset of the stored secret value, and calculates the ciphertext of the electricity consumption plan according to the encryption key and the plaintext of the electricity consumption plan; The smart meter node calculates the hash value of the plaintext and ciphertext of the electricity consumption plan, that is, the hash value of the electricity consumption plan; The smart meter node calculates a homomorphic message authentication code according to the smart meter node identity information and certificate, the power consumption plan ciphertext, the power consumption plan hash value and the homomorphic message authentication code parameters; The smart meter node uses the smart meter node identity information and certificate, the power consumption plan ciphertext, the power consumption plan hash value and the homomorphic message authentication code as the power consumption plan request information, submits the power consumption plan request to the gateway node, and calculates the power consumption plan request hash value and uploads it to the blockchain.

4. The method according to claim 3, It is characterized in that In step 2), the smart meter node divides the plaintext data of the power consumption plan into multiple sub-periods, generates encryption keys for the plaintext of the power consumption plan of each sub-period, calculates the ciphertext of the power consumption plan of each sub-period, and obtains the ciphertext of the entire power consumption plan.

5. The method according to claim 3, It is characterized in that The method for verifying the data integrity in step 3) is: the gateway node fuses the homomorphic message authentication code, and verifies the integrity of the data according to the key and the fused homomorphic message authentication code. If the verification is successful, it means that the data has not been tampered with; The method for verifying the identity of the smart meter node is as follows: the gateway node verifies the validity of the smart meter node certificate. The validity conditions include that the digital certificate is within the validity period, the root certificate corresponding to the node that issued the certificate is in the trust domain, and the digital certificate has not been frozen or revoked.

6. The method according to claim 1, It is characterized in that The method for calculating the preliminary aggregation result in step 3) is: the gateway node adds and aggregates the electricity consumption plan ciphertext uploaded by the smart meter node to obtain the preliminary aggregated ciphertext of the electricity consumption plan; another homomorphic message authentication code is calculated according to the identity information and certificate of the gateway node, the preliminary aggregated ciphertext, and the homomorphic message authentication code parameters; The preliminary aggregation result is calculated according to the gateway node identity information and certificate, the preliminary aggregation ciphertext and the other homomorphic message authentication code.

7. The method according to claim 6, It is characterized in that The method for verifying the data integrity in step 4) is: the control center node fuses the other homomorphic message authentication code, and verifies the integrity of the data according to the key and the fused homomorphic message authentication code; If the verification is successful, it means that the data integrity has not been compromised; The method for verifying the identity of the gateway node is to verify whether the gateway node certificate is valid. If it is valid, the gateway node identity is verified; The method for decrypting the final aggregation result is as follows: the control center node generates a decryption key based on the stored secret value subset, and uses the decryption key to decrypt the final aggregation result to obtain the plain text of the electricity consumption plan aggregation result.

8. The method according to claim 1, It is characterized in that In step 5), the control center node obtains the actual power consumption of each smart meter node, and calculates the power consumption plan ciphertext hash value according to the smart meter identity information and certificate, power consumption plan plaintext and ciphertext sent by the smart meter node.

9. A smart grid electricity consumption plan security aggregation system based on homomorphic encryption, used to implement the method described in any one of claims 1 to 8, It is characterized in that It includes a key generation center and a blockchain consisting of a control center node, a gateway node, and a smart meter node, where: The control center node is used to issue and revoke digital certificates of smart meter nodes and gateway nodes, decrypt aggregated ciphertext data, formulate power generation and distribution plans based on the aggregated results of the power consumption plan, and publish the electricity fee information that the users of smart meters need to pay based on the relationship between the actual power consumption and the planned power consumption in the power consumption plan; The gateway node is used to verify the data integrity and identity of the smart meter node according to the power consumption plan request of the smart meter node, and upload the power consumption plan ciphertext hash value to the blockchain after verification; the power consumption plan ciphertext sent by the smart meter node is added and aggregated to generate a preliminary aggregation result containing the preliminary aggregation ciphertext and upload it to the control center node, and the preliminary aggregation result hash value is uploaded to the blockchain; The smart meter node is used to encrypt the power consumption plan data according to the homomorphic encryption algorithm parameters and the homomorphic message authentication code parameters, obtain the power consumption plan ciphertext, and upload it to the gateway node to make a power consumption plan request; The key generation center is used to generate and distribute legal public and private key pairs for smart meter node and gateway node certificates, and to generate and distribute homomorphic encryption algorithm parameters and homomorphic message authentication code parameters for smart meter nodes and control center nodes.

Citation Information

Cited By

  • Privacy protection data aggregation method and system for large-scale advanced measurement system

    CN121984781A