Power data federated learning privacy protection method based on efficient homomorphic encryption

By adopting efficient homomorphic encryption technology in power data federated learning, the problems of large amount of computing and privacy leakage risks of existing encryption technologies are solved, efficient and secure power data privacy protection is achieved, and algorithm efficiency and accuracy of neural network models are improved.

CN119646871APending Publication Date: 2025-03-18STATE GRID TIANJIN ELECTRIC POWER COMPANY +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411689429.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing encryption technology has a large amount of computing, high computing resource overhead in the federated learning of power data, and has the risk of privacy leakage, making it difficult to meet the needs of fast and accurate power data analysis.

Method used

The power data federated learning privacy protection method based on efficient homomorphic encryption is adopted. The gradient parameters of the neural network model are initialized and encrypted locally by the client, and the encrypted parameters are uploaded to the server. The server can perform gradient averaging aggregation without decryption, ensuring the security during data transmission.

Benefits of technology

It reduces the computational volume, improves the algorithm efficiency, ensures the confidentiality and security of power data, while retaining the useful features and information of the data to the greatest extent, and improving the accuracy and robustness of the neural network model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646871A_ABST
    Figure CN119646871A_ABST
Patent Text Reader

Abstract

The invention relates to a power data federated learning privacy protection method based on efficient homomorphic encryption. The method comprises the following steps: step 1, a client initializes a neural network model; step 2, the server side encrypts and updates local neural network model gradient parameters uploaded by the client side; 3, the server side executes gradient average aggregation operation, the server side does not need to decrypt, the encrypted gradient parameters uploaded by the client side are directly calculated, an average value is solved, and therefore global gradient parameters are updated; step 4, after each client receives the updated global gradient, carrying out decryption calculation operation; 5, loading the updated weight parameters of the neural network model into a local neural network model, and performing neural network model training by using a local data set; the problems that an existing encryption technology is large in operand, large in computing resource overhead and low in algorithm efficiency, and privacy leakage exists in the transmission and analysis process of power data can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power data privacy protection, and particularly to a power data federated learning privacy protection method, and more particularly to a power data federated learning privacy protection method based on efficient homomorphic encryption. Background Art

[0002] With the advent of the era of power big data, many power stations are reluctant to share their power data to prevent privacy data leakage due to privacy security issues, thus forming "data islands". Federated learning can better deal with this problem, but there is a risk of privacy leakage during the training process of federated learning.

[0003] Therefore, how to improve data utilization while strengthening privacy protection capabilities to maintain a balance between the two is an urgent problem that federated learning needs to solve. When multiple participants jointly train a neural network model, they usually need to exchange intermediate results. If the plaintext results are sent directly, there may be a risk of privacy leakage. During the training process, the use of encryption schemes will bring certain computing and communication overheads, which will affect the training efficiency. It is also difficult to apply to resource-constrained environments.

[0004] There are currently two solutions to the privacy risks faced by federated learning, namely encryption and perturbation. The most commonly used encryption method is to use homomorphic encryption technology to provide privacy protection for the transmission of data during federated training. Homomorphic encryption is an encryption method that allows users to perform operations directly on ciphertext. The result after the operation is still ciphertext, and the result after decryption is the same as the result of the operation on plaintext. However, homomorphic encryption will lead to a significant increase in computing costs. When processing large-scale power data, encryption, decryption, and computing operations performed in an encrypted state may consume a lot of computing resources and time. For some power data analysis tasks that require high computing performance, homomorphic encryption may not meet the needs of quickly obtaining accurate results.

[0005] The most commonly used method of perturbation is differential privacy technology, which ensures that even when the attacker has the most background knowledge, he cannot infer the sensitive information of the target record. However, the noise added by differential privacy may reduce the accuracy and availability of power data. Power data usually requires high precision. For example, in applications such as power load forecasting and power grid fault diagnosis, small errors may lead to large decision-making errors. The noise introduced by differential privacy may interfere with the key features in the data and affect the prediction and analysis effect of the neural network model.

[0006] There are two current solutions:

[0007] The aggregation server has the ability to obtain the statistical characteristics of the data uploaded by the participants by analyzing the aggregation results, which will cause the privacy of the participants to be leaked. Therefore, protecting the parameters of the neural network model shared by the participants becomes an important issue. In addition, when the malicious aggregation server and the key distributor collude to attack, the gradient information of the participants will be leaked, thereby leaking the privacy of the participants. Therefore, Wang Yezhong et al. proposed a privacy protection method based on homomorphic encryption technology, which includes the following core steps: First, the key generation center initializes the multi-key homomorphic encryption security parameters and public parameters, generates different private keys for each participant, and the participants complete the initialization of parameters such as related operations, key pairs, random numbers, etc. covering the parameters of the neural network model locally, and encrypt the local neural network model parameters. Then the client jointly establishes the public key and secret key of the homomorphic encryption scheme, which is kept secret from the server but known to the client. Next, the server determines the parameters of the neural network model and splits and distributes them, and the participants train the split neural network model and encrypt the output to the server. Finally, the aggregation server receives and aggregates the encrypted neural network model parameters, uses the split neural network model output as input and processes it on the server neural network model, and feeds the results back to the participants to update the local neural network model until convergence or preset conditions are met. After the training is completed, the participants decrypt the encrypted training results.

[0008] But the prior art 1 has the following disadvantages:

[0009] This solution generates different private keys for each participant and ensures the security and confidentiality of the keys, which increases the difficulty of key management. Once there is a problem with the private key, it may affect the security of the entire system. At the same time, in the process of calculating the sum of all random numbers, the generation and processing of random numbers requires a high degree of randomness and accuracy, otherwise it may affect the effect of encryption and neural network model updates. In addition, operations such as blinding will distort the original characteristics of the data to a certain extent, thereby affecting the training effect and accuracy of the neural network model.

[0010] Prior art 2:

[0011] In addition, the existing centralized algorithms have privacy risks in communication and server storage in power grid applications, as well as the difficulty of collecting device status information caused by "data islands", while federated learning can effectively solve privacy issues. Therefore, Ming Tao and others first established a federated learning neural network model through initialization, local training, and neural network model averaging, and used federated learning for power consumer feature extraction and identification. They used principal component analysis (PCA) to extract features from smart meter data and trained a feedforward ANN neural network model for each feature.

[0012] However, the second prior art has the following disadvantages:

[0013] The entire neural network model architecture of this solution is relatively complex, which may increase the difficulty in actual deployment and maintenance. Once a problem occurs, the cost of troubleshooting and repair is high. In addition, this method performs well in specific data sets and scenarios, but in the face of complex and changeable actual conditions in the power system, such as different regions, different user types, different seasons and weather conditions, the adaptability and generalization ability of its neural network model may be challenged.

[0014] Therefore, in view of the shortcomings of existing encryption technology, such as large computational complexity, high computing resource overhead and low algorithm efficiency, as well as the problem of privacy leakage in the process of transmission and analysis of power data, the present invention proposes a privacy protection method for federated learning of power data based on efficient homomorphic encryption.

[0015] After searching, no public documents of the prior art identical or similar to the present invention were found. Summary of the invention

[0016] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a privacy protection method for federated learning of power data based on efficient homomorphic encryption, which can solve the problems of large computational complexity, high computing resource overhead and low algorithm efficiency of existing encryption technologies, as well as the privacy leakage of power data during transmission and analysis.

[0017] The present invention solves the practical problem by adopting the following technical solutions:

[0018] A privacy protection method for federated learning of power data based on efficient homomorphic encryption includes the following steps:

[0019] Step 1: The client initializes the neural network model and encrypts the gradient parameters, thereby completing the initialization process of the neural network model;

[0020] Step 2: The client uploads the gradient parameters of the neural network model initialized in step 1 to the server, and the server encrypts and updates the local neural network model gradient parameters uploaded by the client;

[0021] Step 3: The server performs a gradient average aggregation operation. The server directly calculates the encrypted gradient parameters uploaded by the client without decryption, calculates the average value, and updates the global gradient parameters.

[0022] Step 4: After receiving the updated global gradient, each client performs decryption calculation operations.

[0023] Step 5: Load the updated neural network model weight parameters into the local neural network model, and use the local data set to train the neural network model. Repeat the above steps until the set number of iterations is reached and the training process is completed, thereby achieving privacy protection for power data federated learning.

[0024] Moreover, the specific steps of step 1 include:

[0025] (1) The client, as the starting point for training the neural network model, first builds a local neural network model; through a random algorithm, the client generates the gradient parameters of the neural network model;

[0026] (2) The client generates a public key and a private key. While generating the gradient parameters of the neural network model, the client generates a public key and a private key pair through the optimized homomorphic encryption algorithm;

[0027] (3) The client securely uploads the encrypted gradient parameters to the server;

[0028] (4) Broadcast encrypted gradient parameters;

[0029] (5) Decrypt the parameters and update the weights. Then load the decrypted parameters and update the weights into your own neural network model to complete the initialization process.

[0030] Moreover, the specific method for the client in step (2) of step 1 to generate a public key and a private key pair through the optimized homomorphic encryption algorithm is:

[0031] Select two large prime numbers p and q, satisfying gcd(pq,(p-1)(q-1))=1;

[0032] Calculate n = pq, λ = lcm(p-1,q-1),

[0033] Then randomly select a number of And pre-calculate the corresponding v = r n modn 2 , introduce a secret parameter b = λ -1 modn, that is, public key pk=n, private key sk=(λ,b).

[0034] The public key is used to encrypt data, and the private key is used to decrypt data.

[0035] Moreover, the specific method of step (3) of step 1 is:

[0036] The client uses the optimized homomorphic encryption algorithm to encrypt the gradient parameters of the neural network model using the previously generated private key, and securely uploads the encrypted gradient parameters to the server for use by other clients.

[0037] Moreover, the specific method of step (4) of step 1 is:

[0038] After receiving the encrypted gradient parameters uploaded by the client, the server broadcasts them to all clients participating in the training.

[0039] Moreover, the specific method of step (5) of step 1 is:

[0040] After other clients participating in the training receive the encrypted gradient parameters broadcast by the server, they decrypt these parameters using their respective private keys; the decrypted parameters are used to update the weights of their respective local neural network models, thereby completing the initialization process of the neural network model.

[0041] Moreover, the specific steps of step 2 include:

[0042] (1) The client uploads the encrypted gradient parameters to the server, and completes a learning process through interaction between the client and the server. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train local data.

[0043] (2) After completing a learning session, the client sets a privacy budget;

[0044] (3) Adding differential privacy noise: The client uses the updated neural network model to train the local data to obtain the local gradient parameter G y To ensure privacy protection, client y y Add differential privacy noise that conforms to the Laplace distribution. The sensitivity Δf is set to 1: Among them, G y is the original local gradient parameter, represents a random noise value drawn from the Laplace distribution, where ΔG is the range of the gradient parameter (here we assume that the gradient parameter is between 0 and 1, so ΔG = 1); ε is the privacy budget, which controls the size of the added noise, G′ y is the gradient parameter with privacy protection.

[0045] (4) After the client completes the differential privacy noise addition, it trims and encrypts the gradient parameters;

[0046] (5) The client sends the encrypted local gradient parameters to the server;

[0047] Moreover, the specific steps of step 2 (4) include:

[0048] ① The client needs to trim the gradient parameters. The trimmed gradient parameters will be kept within a reasonable threshold range. The upper and lower limits of the threshold are set, and then the current trimming threshold is adjusted according to the average value of the gradient.

[0049] ② Then, the client uses the public keys p and q generated in the key generation phase to encrypt the clipped gradient parameters; the encryption process includes two steps: first, the clipped gradient parameters are modulo p and modulo q respectively to obtain the intermediate result G y,p and G y,q Then, using the characteristics of homomorphic encryption, G y,p and G y,q Perform specific operations to obtain the final encrypted local gradient parameter C y .

[0050] Moreover, the specific method of step (5) of step 2 is:

[0051] G y The server aggregates all the encrypted gradient parameters received to obtain the global encrypted gradient parameters. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train the local data.

[0052] Moreover, the specific steps of step 3 include:

[0053] (1) The client uses an optimized homomorphic encryption algorithm to encrypt the gradient information and sends the encrypted gradient to the server;

[0054] (2) The server accepts encrypted gradient parameters from all clients;

[0055] (3) The server directly operates on the encrypted gradient parameters uploaded by the client without decryption, thereby completing the operation of updating the global gradient parameters.

[0056] Moreover, the specific steps of the decryption calculation operation of step 4 include:

[0057] a) This formula is the beginning of the decryption process, and the original global gradient information is restored by performing a series of operations on the global encrypted gradient.

[0058] b) Use the properties of exponentiation to simplify.

[0059] c) The decryption result of the global encrypted gradient is represented as the sum of the corresponding parts of the local gradients of each client modulo p and q respectively.

[0060] d) C global modp = G global,p modp+G global,q modq, further clarifies the decrypted form of the global gradient.

[0061] e) According to Euler's theorem and the greatest common divisor condition:

[0062] f)G global =qG global,p modn+pG global,q modn, this formula is the expression of the global gradient, which uses p and q as well as the intermediate results obtained previously to calculate and restore the global gradient G global .

[0063] Advantages and beneficial effects of the present invention:

[0064] 1. This invention proposes a method for protecting the privacy of federated learning of power data based on efficient homomorphic encryption. In the process of federated learning training, differential privacy technology is combined with optimized Paillier homomorphic encryption technology. On the premise of ensuring the confidentiality and secure aggregation of power data, we improve the efficiency of the algorithm by reducing the amount of calculation. At the same time, while protecting privacy, the useful features and information of power data are retained to the greatest extent, ensuring that the neural network model trained based on these data can produce valuable analysis results, thereby achieving more comprehensive protection of power privacy data.

[0065] 2. The neural network model proposed in the present invention consists of two parts: the client and the server. The client trains the neural network model locally. The client can independently determine the degree of privacy protection and set a privacy budget, accurately control the privacy protection level of power data, and ensure that sensitive power information is not used improperly. Subsequently, noise that complies with differential privacy is added to ensure that even the change of a single data point will not significantly affect the output of the model. Then, the optimized homomorphic encryption algorithm is used to encrypt these noise-added parameters, and then the ciphertext of the gradient parameters is uploaded. This not only ensures the security of the data transmission process, but also prevents the server from directly accessing sensitive data. After completing a round of update operations, the client obtains and decrypts the global gradient and updates the local neural network model; the server aggregates the encrypted gradient, securely updates the global gradient and transmits it back to the client. This process prevents the server from becoming a potential data leakage point. The two parties repeat this update process, and after multiple iterations, until the pre-set number of iterations is reached, the training process ends. This process ensures the accuracy and robustness of the neural network model.

[0066] 3. In view of the inevitable risk of privacy leakage when power data is in the communication process and when the server stores information, and the defects of the existing technology, the present invention proposes a privacy protection strategy and implementation method for federated learning of power data based on efficient homomorphic encryption. This method can effectively protect the privacy of sensitive data of the client. By applying the optimized Paillier homomorphic encryption technology and differential privacy technology, the amount of calculation is reduced and the efficiency of the algorithm is improved while ensuring the privacy of power data. The performance of the neural network model is comparable to that of the centralized method. First, a small amount of noise is injected into the gradient parameters uploaded by the client. Secondly, these gradient parameters are encrypted using the optimized Paillier homomorphic encryption technology, which not only protects privacy but also ensures high data usability. Then, the differentially private encrypted gradient is uploaded to the server, and the global gradient is updated after secure aggregation and averaging to improve the accuracy of neural network model training.

[0067] 4. The present invention adopts an optimized homomorphic encryption algorithm to perform calculations on encrypted data without exposing the private key, thereby reducing the risk of private key leakage and solving the problem of key management complexity in the prior art. Differential privacy technology protects personal privacy by adding an appropriate amount of noise to the original data, but traditional differential privacy methods may distort the original characteristics of the data. However, in combination with the framework of homomorphic encryption, differential privacy technology can more finely control the amount of noise added to reduce the impact on data characteristics, solving the problem of data feature distortion.

[0068] In addition, the introduction of differential privacy technology not only protects user privacy, but also enhances the generalization ability of the neural network model, enabling it to perform well in different data sets and scenarios. The neural network model can better adapt to various complex scenarios, improve the accuracy and reliability of predictions and decisions, and solve the problem of low adaptability and weak generalization ability of the neural network model in the second solution of the existing technology. At the same time, the optimized homomorphic encryption algorithm can improve computing efficiency, reduce computing time and resource consumption while ensuring security, and solve the problem of low computing efficiency in the second technical solution. In summary, the present invention not only ensures the confidentiality of the entire federated learning process and the privacy of power data, but also significantly reduces the complexity of calculations, thereby effectively saving computing resources, improving the efficiency of the algorithm, and realizing the secure communication and integration of power data information, providing an effective technical solution for the protection of power data privacy.

[0069] 5. The innovation of the present invention is that it adopts the optimized Paillier homomorphic encryption algorithm, which effectively enhances the security attributes of federated learning. Specifically: First, through this optimized algorithm, strict confidentiality protection can be provided for the entire federated learning process, ensuring that data is not leaked during transmission and processing, and achieving secure aggregation at the same time. Second, while achieving the above-mentioned confidentiality and secure aggregation goals, the efficiency of the algorithm is improved by reducing the amount of computation. This innovation enables federated learning to greatly improve the running speed and processing capacity on the basis of ensuring data security, and effectively breaks through the bottleneck of traditional federated learning where security and efficiency are difficult to balance. Another innovation of the present invention is that it breaks through the limitation that most privacy protection methods only use a single technology, and organically combines the optimized homomorphic encryption algorithm with differential privacy technology. On the one hand, the optimized homomorphic encryption algorithm effectively guarantees the confidentiality of power data during processing, transmission and storage, keeps the data in an encrypted state, effectively prevents data leakage, and reduces the amount of computation. On the other hand, differential privacy technology adds appropriate noise to power data, further blurs the characteristics of individual power data, and reduces the risk of privacy being inferred. This combination is not a simple superposition, but a mutual synergy and complementary enhancement, which can meet higher-level security requirements and provide a more powerful and comprehensive solution for the privacy protection of power data. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 is a process flow chart of the present invention;

[0071] Figure 2 It is a schematic diagram of the gradient average polymerization operation process of the present invention. DETAILED DESCRIPTION

[0072] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings:

[0073] A privacy protection method for federated learning of power data based on efficient homomorphic encryption, such as Figure 1 As shown, the following steps are included:

[0074] Step 1: The client initializes the neural network model and encrypts the gradient parameters, thereby completing the initialization process of the neural network model;

[0075] The specific steps of step 1 include:

[0076] (1) The client, as the starting point for training the neural network model, first builds a local neural network model; through a random algorithm, the client generates the gradient parameters of the neural network model;

[0077] In this embodiment, these parameters are key components in the neural network model training process, and they will be used for subsequent gradient updates and neural network model optimization.

[0078] (2) The client generates a public key and a private key. While generating the gradient parameters of the neural network model, the client generates a public key and a private key pair through the optimized homomorphic encryption algorithm;

[0079] The specific method for the client in step (2) of step 1 to generate a public key and a private key pair through the optimized homomorphic encryption algorithm is:

[0080] Select two large prime numbers p and q, satisfying gcd(pq,(p-1)(q-1))=1;

[0081] Calculate n = pq, λ = lcm(p-1,q-1),

[0082] Then randomly select a number of And pre-calculate the corresponding v = r n modn 2 , introduce a secret parameter b = λ -1 modn, that is, public key pk=n, private key sk=(λ,b).

[0083] The public key is used to encrypt data, and the private key is used to decrypt data.

[0084] In this embodiment, these two keys will be distributed to all clients participating in the training to ensure that the encryption and decryption process of the data can proceed smoothly. At the same time, the private key is kept confidential from the server to enhance the security of the system.

[0085] (3) The client securely uploads the encrypted gradient parameters to the server;

[0086] The specific method of step (3) of step 1 is:

[0087] The client uses the optimized homomorphic encryption algorithm to encrypt the gradient parameters of the neural network model using the previously generated private key, and securely uploads the encrypted gradient parameters to the server for use by other clients.

[0088] In this embodiment, this step ensures the security of the gradient parameters during transmission and prevents data leakage.

[0089] (4) Broadcast encrypted gradient parameters;

[0090] The specific method of step (4) of step 1 is:

[0091] After receiving the encrypted gradient parameters uploaded by the client, the server broadcasts them to all clients participating in the training.

[0092] In this embodiment, this step realizes data sharing and synchronization, providing a basis for subsequent parameter updates and neural network model training.

[0093] (5) Decrypt the parameters and update the weights. Then load the decrypted parameters and update the weights into your own neural network model to complete the initialization process.

[0094] The specific method of step (5) of step 1 is:

[0095] After other clients participating in the training receive the encrypted gradient parameters broadcast by the server, they decrypt these parameters using their respective private keys; the decrypted parameters are used to update the weights of their respective local neural network models, thereby completing the initialization process of the neural network model.

[0096] In this embodiment, this step ensures that each client can obtain accurate gradient information and optimize the neural network model accordingly.

[0097] Step 2: The client uploads the gradient parameters of the neural network model initialized in step 1 to the server, and the server encrypts and updates the local neural network model gradient parameters uploaded by the client.

[0098] The specific steps of step 2 include:

[0099] (1) The client uploads the encrypted gradient parameters to the server, and completes a learning process through interaction between the client and the server. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train local data to improve the accuracy and generalization ability of the neural network model.

[0100] (2) After completing a learning session, the client sets a privacy budget;

[0101] The specific method of step (2) of step 2 is:

[0102] To protect the client's privacy, each client needs to set a privacy budget ε.

[0103] The privacy budget is an important parameter that controls the amount of added noise, thereby balancing the relationship between privacy protection and the performance of the neural network model.

[0104] (3) Add differential privacy noise. The client uses the updated neural network model to train the local data to obtain the local gradient parameter G y To ensure privacy protection, client y yAdd differential privacy noise that conforms to the Laplace distribution. The sensitivity Δf is set to 1: Among them, G y is the original local gradient parameter, represents a random noise value drawn from the Laplace distribution, where ΔG is the range of the gradient parameter (here we assume that the gradient parameter is between 0 and 1, so ΔG = 1); ε is the privacy budget, which controls the size of the added noise, G′ y is the gradient parameter with privacy protection.

[0105] (4) After the client completes the differential privacy noise addition, it trims and encrypts the gradient parameters;

[0106] The specific steps of step (4) of step 2 include:

[0107] ① In order to avoid the gradient explosion problem, the client needs to clip the gradient parameters. The clipped gradient parameters will be kept within a reasonable threshold range. By setting the upper and lower limits of the threshold, and then adjusting the current clipping threshold according to the average value of the gradient, the stability and convergence of the neural network model can be ensured.

[0108] ② Then, the client uses the public keys p and q generated in the key generation phase to encrypt the clipped gradient parameters; the encryption process includes two steps: first, the clipped gradient parameters are modulo p and modulo q respectively to obtain the intermediate result G y,p and G y,q Then, using the characteristics of homomorphic encryption, G y,p and G y,q Perform specific operations to obtain the final encrypted local gradient parameter C y .

[0109] How encryption works:

[0110] iG y,p =(G y ) mod p, get an intermediate result G related to p y,p .

[0111] ii.G y,q =(G y ) mod q, get an intermediate result G related to p y,q .

[0112] iii. First, G y,p Raise to the power of p, multiply by q, then by the inverse of q, and add G y,q After q times the power, multiply it by p and then by the inverse of p to get the final encrypted local gradient parameter Cy . Where q -1 represents the inverse element of a positive integer less than q and coprime to q, p -1 represents a positive integer inverse that is less than p and coprime to p.

[0113] (5) The client sends the encrypted local gradient parameters to the server;

[0114] The specific method of step (5) of step 2 is:

[0115] C y The server aggregates all the encrypted gradient parameters received to obtain the global encrypted gradient parameters. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train local data to improve the accuracy and generalization ability of the neural network model.

[0116] This step enables data sharing and collaboration between clients while ensuring data security and privacy. The global encrypted gradient parameter update will be used to update the global neural network model and serve as the basis for the next round of training.

[0117] Step 3: The server performs the gradient average aggregation operation. The server directly calculates the encrypted gradient parameters uploaded by the client without decryption, calculates the average value, and updates the global gradient parameters.

[0118] The server performs the gradient average aggregation operation process as follows Figure 2 shown.

[0119] The specific steps of step 3 include:

[0120] (1) The client uses an optimized homomorphic encryption algorithm to encrypt the gradient information and sends the encrypted gradient to the server;

[0121] (2) The server accepts encrypted gradient parameters from all clients;

[0122] (3) The server directly operates on the encrypted gradient parameters uploaded by the client without decryption, thereby completing the operation of updating the global gradient parameters.

[0123] How gradient average aggregation calculation works:

[0124] a) The local information of each client is aggregated to form a global gradient representation.

[0125] b) For each client and After the sum is taken, modulo n, multiplied by the corresponding coefficient and averaged.

[0126] c) Extracting the summation symbol makes the expression clearer.

[0127] Among them, C global is the average gradient parameter, n is the number of clients, C y Encrypt the local gradient parameters uploaded by the client. After calculating the average value and updating the global gradient parameters on the server side, the server sends these updated encrypted gradient parameters to all clients participating in the training. After receiving the updated ciphertext gradient parameters, the client will decrypt them using its own private key.

[0128] Step 4: After receiving the updated global gradient, each client performs decryption calculation operations;

[0129] The specific steps of the decryption calculation operation in step 4 include:

[0130] g) This formula is the beginning of the decryption process, and the original global gradient information is restored by performing a series of operations on the global encrypted gradient.

[0131] h) Use the properties of exponentiation to simplify.

[0132] i) The decryption result of the global encrypted gradient is represented as the sum of the corresponding parts of the local gradients of each client modulo p and q respectively.

[0133] j)C global modp = G global,p modq+G global,q modq, further clarifies the decrypted form of the global gradient.

[0134] k) According to Euler's theorem and the greatest common divisor condition:

[0135] l)G global =qG global,p modn+pG global,q modn, this formula is the expression of the global gradient, which uses p and q as well as the intermediate results obtained previously to calculate and restore the global gradient G global .

[0136] Step 5: Load the updated neural network model weight parameters into the local neural network model, and use the local data set to train the neural network model. Repeat the above steps until the set number of iterations is reached and the training process is completed, thereby achieving privacy protection for power data federated learning.

[0137] In this embodiment, in addition to the technical solutions mentioned above, there are still other solutions that can be used to achieve this effect. When processing gradient parameters, the client can use differential privacy noise with a Gaussian distribution as an alternative strategy in addition to Laplace distribution to further enhance the security protection of data privacy. Gaussian distribution is ubiquitous in many natural and engineering phenomena, has good mathematical properties and theoretical basis, and is easy to analyze and process. In addition, in some cases, the addition of Gaussian distribution noise may result in relatively little interference with the original data, while still meeting certain privacy protection requirements.

[0138] Embodiment 1:

[0139] This solution is applied to the privacy protection of the load decomposition algorithm. The load decomposition method is mainly based on historical power load data, using relevant machine learning algorithms to build a neural network model to achieve the purpose of decomposing the total load into the power load of a single device. Then, the trained neural network model is applied to the actual measurement scenario. This method can obtain the status information of each power-consuming device at the current moment in real time. This is of certain significance to the user itself, power operators, and even the entire society. The specific implementation process is as follows:

[0140] Step 1: Define a neural network model suitable for the load decomposition algorithm. A neural network model based on sequence-to-point mapping relationship (seq2point) is selected to achieve this by directly mapping an input sequence to a point in the output sequence. Load decomposition is an algorithm trained for time series data and has its own uniqueness. Power time series data is closely related to time. The data is usually sampled at a certain time interval, has a uniform sampling frequency, and is sorted in chronological order.

[0141] Step 2: The client adds noise to the gradient parameters and performs neural network model training; after receiving the neural network model parameters from the central server, the client updates the local neural network model with the global neural network model parameters. During the training process, according to the differential privacy protection idea proposed in the invention, noise perturbations that conform to the Laplace distribution mechanism are added to the neural network model parameters.

[0142] Step 3: The client clips and encrypts the gradient parameters. In order to avoid the gradient explosion problem, the client needs to clip the gradient parameters. The clipped gradient parameters will be kept within a reasonable range, thereby ensuring the stability and convergence of the neural network model. Next, the client uses the public keys p and q generated in the key generation phase to encrypt the clipped gradient parameters. The encryption process includes two steps: First, the clipped gradient parameters are modulo p and modulo q respectively to obtain the intermediate result G y,p and G y,q Then, using the characteristics of homomorphic encryption, G y,p and G y,q Perform specific operations to obtain the final encrypted local gradient parameter G y .

[0143] Step 4: The client trains the neural network model and encrypts the local noisy gradient parameters and uploads them to the server.

[0144] G y The encrypted gradient parameters are sent to the server, and the server aggregates all the received encrypted gradient parameters to obtain the global encrypted gradient parameters. This step enables data sharing and collaboration between clients while ensuring data security and privacy. The global encrypted gradient parameter update will be used to update the global neural network model and serve as the basis for the next round of training.

[0145] Step 5: The server receives and processes the data and updates the global gradient parameters. The server performs the gradient average aggregation operation. The server can directly calculate the encrypted gradient parameters uploaded by the client without decryption, and calculate the average value to update the global gradient parameters.

[0146] Step 6: Repeat the steps of downloading the global gradient parameters and decrypting them, training the neural network model, and encrypting and uploading them.

[0147] The above process goes through multiple iterations until the algorithm meets the convergence criteria or reaches the preset number of iterations. In this framework, the central server is responsible for summarizing and calculating the weighted average of the neural network model parameters to build a global neural network model. The local client updates the neural network model parameters by training the local power load data set, and verifies the performance of the global neural network model on the same data set to predict and analyze the load data. With the help of information interaction between the client and the central server, a global deep learning neural network model is finally constructed.

[0148] It should be emphasized that the embodiments of the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation modes. Any other implementation modes derived by those skilled in the art based on the technical solutions of the present invention also fall within the scope of protection of the present invention.

Claims

1. A privacy protection method for federated learning of power data based on efficient homomorphic encryption, characterized by: The following steps are involved: Step 1: The client initializes the neural network model and encrypts the gradient parameters, thereby completing the initialization process of the neural network model; Step 2: The client uploads the gradient parameters of the neural network model initialized in step 1 to the server, and the server encrypts and updates the local neural network model gradient parameters uploaded by the client; Step 3: The server performs a gradient average aggregation operation. The server directly calculates the encrypted gradient parameters uploaded by the client without decryption, and calculates the average value to update the global gradient parameters. Step 4: After receiving the updated global gradient, each client performs decryption calculation operations; Step 5: Load the updated neural network model weight parameters into the local neural network model, and use the local data set to train the neural network model; repeat the above steps until the set number of iterations is reached and the training process is completed, thereby achieving privacy protection of power data federated learning.

2. According to claim 1, a method for protecting privacy in federated learning of power data based on efficient homomorphic encryption is characterized in that: The specific steps of step 1 include: (1) The client, as the starting point for training the neural network model, first builds a local neural network model; through a random algorithm, the client generates the gradient parameters of the neural network model; (2) The client generates a public key and a private key. While generating the gradient parameters of the neural network model, the client generates a public key and a private key pair through the optimized homomorphic encryption algorithm; (3) The client securely uploads the encrypted gradient parameters to the server; (4) Broadcast encrypted gradient parameters; (5) Decrypt the parameters and update the weights. Then load the decrypted parameters and update the weights into your own neural network model to complete the initialization process.

3. According to claim 2, a method for protecting privacy in federated learning of power data based on efficient homomorphic encryption is characterized in that: The specific method for the client in step (2) of step 1 to generate a public key and a private key pair through the optimized homomorphic encryption algorithm is: Select two large prime numbers p and q, satisfying gcd(pq,(p-1)(q-1))=1; Calculate n = pq, λ = lcm(p-1,q-1), Then randomly select a number of And pre-calculate the corresponding v = r n modn 2 , introduce a secret parameter b = λ -1 modn, that is, public key pk = n, private key sk = (λ, b); The public key is used to encrypt data, and the private key is used to decrypt data.

4. According to claim 2, a method for protecting privacy in power data federated learning based on efficient homomorphic encryption is characterized in that: The specific method of step (3) of step 1 is: The client uses the optimized homomorphic encryption algorithm to encrypt the gradient parameters of the neural network model using the previously generated private key, and securely uploads the encrypted gradient parameters to the server for use by other clients.

5. According to claim 2, a method for protecting privacy in federated learning of power data based on efficient homomorphic encryption is characterized in that: The specific method of step (4) of step 1 is: After receiving the encrypted gradient parameters uploaded by the client, the server broadcasts them to all clients participating in the training.

6. According to claim 2, a method for protecting privacy in federated learning of power data based on efficient homomorphic encryption is characterized in that: The specific method of step (5) of step 1 is: After other clients participating in the training receive the encrypted gradient parameters broadcast by the server, they decrypt these parameters using their respective private keys; the decrypted parameters are used to update the weights of their respective local neural network models, thereby completing the initialization process of the neural network model.

7. The method for privacy protection of power data federated learning based on efficient homomorphic encryption according to claim 1 is characterized in that: The specific steps of step 2 include: (1) The client uploads the encrypted gradient parameters to the server, and completes a learning process through interaction between the client and the server. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train local data. (2) After completing a learning session, the client sets a privacy budget; (3) Adding differential privacy noise: The client uses the updated neural network model to train the local data to obtain the local gradient parameter G y ; To ensure privacy protection, client y y Add differential privacy noise that conforms to the Laplace distribution; the sensitivity Δf is set to 1: Among them, G y is the original local gradient parameter, represents a random noise value drawn from the Laplace distribution, where ΔG is the range of the gradient parameter (here we assume that the gradient parameter is between 0 and 1, so ΔG = 1); ε is the privacy budget, which controls the size of the added noise, G′ y is the gradient parameter with privacy protection; (4) After the client completes the differential privacy noise addition, it trims and encrypts the gradient parameters; (5) The client sends the encrypted local gradient parameters to the server.

8. The method for protecting privacy in federated learning of power data based on efficient homomorphic encryption according to claim 7 is characterized in that: The specific steps of step (4) of step 2 include: ① The client needs to trim the gradient parameters. The trimmed gradient parameters will be kept within a reasonable threshold range. The upper and lower limits of the threshold are set, and then the current trimming threshold is adjusted according to the average value of the gradient. ② Then, the client uses the public keys p and q generated in the key generation phase to encrypt the clipped gradient parameters; the encryption process includes two steps: first, the clipped gradient parameters are modulo p and modulo q respectively to obtain the intermediate result G y,p and G y,q Then, using the characteristics of homomorphic encryption, G y,p and G y,q Perform specific operations to obtain the final encrypted local gradient parameter G y .

9. The method for protecting privacy in federated learning of power data based on efficient homomorphic encryption according to claim 7 is characterized in that: The specific method of step (5) of step 2 is: G y The encrypted gradient parameters are sent to the server, and the server aggregates all the received encrypted gradient parameters to obtain the global encrypted gradient parameters. The client uses the private key to decrypt the downloaded global gradient parameters, and then uses them to update the weights of the local neural network model. The updated neural network model will be used to train the local data.

10. The method for privacy protection of power data federated learning based on efficient homomorphic encryption according to claim 1, characterized in that: The specific steps of step 3 include: (1) The client uses an optimized homomorphic encryption algorithm to encrypt the gradient information and sends the encrypted gradient to the server; (2) The server accepts encrypted gradient parameters from all clients; (3) The server directly operates on the encrypted gradient parameters uploaded by the client without decryption, thereby completing the operation of updating the global gradient parameters; The specific steps of the decryption calculation operation in step 4 include: a) This formula is the beginning of the decryption process, and the original global gradient information is restored by performing a series of operations on the global encrypted gradient; b) Use the properties of power operations to simplify; c) All The decryption result of the local encrypted gradient is expressed as the sum of the corresponding parts of the local gradient of each client modulo p and q respectively; d) G global modp = G global,p modp+G global,q modq, further clarifies the decrypted form of the global gradient; e) According to Euler's theorem and the greatest common divisor condition: f)G global =qG global,p modn+pG global,q modn, this formula is the expression of the global gradient, which uses p and q as well as the intermediate results obtained previously to calculate and restore the global gradient G global .

Citation Information

Cited By

  • Multi-source heterogeneous power data processing method and system

    CN120012142A

  • Power Internet of Things anomaly detection and early warning method and system based on ciphertext features

    CN120185936A

  • Cross-domain collaborative privacy protection method and system, medium and product

    CN121864464A