Enterprise power load joint prediction method and system based on horizontal LSTM federated learning
By using a method based on horizontal LSTM federated learning to generate public and private keys and use Paillier addition homomorphic encryption, the problem of data privacy leakage and prediction accuracy in power load forecasting is solved, and efficient and accurate power forecasting is achieved while ensuring data security. Load analysis.
Patent Information
- Application Number
- CN202210763482.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-06-30
AI Technical Summary
Traditional power load forecasting methods cannot accurately predict power load, and there is a serious risk of privacy leakage in collecting, storing, and exchanging real-time power load data of a large number of enterprises, individuals, and regions. Malicious attacks may cause irreversible damage to the power grid system.
An enterprise power load joint forecasting method based on horizontal LSTM federated learning is adopted. By generating public and private keys and using Paillier additive homomorphic encryption to encrypt the LSTM model parameters, it ensures the privacy and security of intermediate transmission parameters and participants’ local data, and through federated learning The method performs data processing locally to avoid uncontrollable data flow.
It achieves efficient and accurate analysis of power load on the premise of ensuring data privacy and security, prevents malicious users from inferring the original information of participants, and improves data security and prediction effects.
Smart Images

Figure CN115134077B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data security and relates to a method and system for joint prediction of enterprise power load based on horizontal LSTM federated learning. Background Art
[0002] The short-term accurate prediction of power load is the core part of power grid planning, which is conducive to the stable dispatch of power resources and can significantly improve the economic and social benefits of the power grid. The power load data sequence will be affected by many non-quantitative factors such as non-periodic social events, dates, weather, seasons, etc. Traditional statistical methods cannot accurately predict power load. The LSTM model has a certain memory and can make full use of historical information to accurately predict power load. Collecting comprehensive and detailed data from all parties can further improve the effect of LSTM model in predicting power load. However, there is a serious risk of privacy leakage in collecting, storing, and exchanging a large number of real-time power load data of enterprises, individuals, and regions. Malicious attackers stealing real-time power load data will not only affect the privacy security of users, but may also cause irreversible damage to the power grid system. The existence of this problem seriously hinders the mining and application of power data. Therefore, there is an urgent need for a method to solve the problem of uncontrollable data flow and sensitive data leakage. Summary of the invention
[0003] The purpose of the present invention is to solve the problems in the prior art and provide a method and system for joint prediction of enterprise power load based on horizontal LSTM federated learning, which can ensure the privacy security of intermediate transmission parameters and local data of participants, while fully mining historical data information and analyzing power load efficiently and accurately.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The enterprise power load joint forecasting method based on horizontal LSTM federated learning includes:
[0006] Step 1: Key generation: Generate public and private keys {pk, sk} based on LSTM model parameters, and broadcast the public key pk to all participants;
[0007] Step 2: Model initialization: Initialize the local iteration times E(E∈Z + ), the number of global iterations j = 0, the parameter w of the LSTM model j and learning rate η, and the parameters w of the LSTM model j , learning rate η and global iteration number j are broadcast to all participants;
[0008] Step 3: Local iterative update: Parameter w based on LSTM model j, learning rate η and global iteration number j, train the local data of the participants, and after local iteration E(E∈Z + ) times, an updated LSTM model is obtained;
[0009] Step 4: Encryption: Based on Paillier additive homomorphic encryption and the local public key pk, the updated LSTM model is encrypted to obtain the ciphertext;
[0010] Step 5: Receive model parameters, broadcast the updated LSTM model parameters and iteration times, and receive the updated ciphertext uploaded by the participants. After receiving K ciphertexts, aggregate the received ciphertexts and notify other participants who have not uploaded updates to stop local iterations.
[0011] Step 6: Update the global model. Decrypt the received ciphertext based on the private key sk, perform weighted aggregation model updates based on the amount of data used locally by the participants, update the global iteration count j←j+1, and broadcast the aggregation results and updated iteration count to all participants.
[0012] Step 7, iterative update; repeat steps 3-6 until the global iteration number j is greater than the set threshold, the model training is completed, and each participant obtains the final global model.
[0013] A further improvement of the present invention is:
[0014] Step 1, step 2, step 5 and step 6 are the work of the server; step 3 and step 4 are the work of the participants; step 3 also includes: the participant receives the model parameters and global iteration number j broadcast by the server; step 4 also includes: the participant uploads the ciphertext to the server.
[0015] Based on the LSTM model parameters, the public and private keys {pk, sk} are generated as follows:
[0016] Step 1.1: Multiply each component in the LSTM model parameters by ±10 n , and convert them into positive integers, let the largest positive integer be M, select two prime numbers p and q, and ensure that pq>2M;
[0017] Step 1.2, calculate N = pq and λ = lcm(p-1, q-1); and select g = N+1;
[0018] Among them, the function lcm represents the calculation of the greatest common divisor of two numbers, sk=λ is the private key generated by the server, and pk=(N, g) is the public key generated by the server.
[0019] Step 3, specifically:
[0020] Step 3.1: In the jth iteration, the i-th (i∈[P])th participant receives the LSTM model broadcast by the server, denoted as Where k is the number of local iterations, and k is initialized to 0;
[0021] Step 3.2: The i-th participant randomly selects local m i Number of digging
[0022] Step 3.3: Participant i uses the decrypted LSTM model to train the extracted m i data, and obtain m i Gradient
[0023] For m i Gradient Take the average value to get the unbiased gradient of the local data:
[0024]
[0025] Step 3.4: Update the local model
[0026] Step 3.5, update the local iteration number k←k+1;
[0027] Step 3.6: Repeat the above steps E times to get the final local update
[0028] Based on Paillier additive homomorphic encryption and the local public key pk, the updated LSTM model is encrypted to obtain the ciphertext; specifically:
[0029] Step 4.1, select any
[0030] Step 4.2: For model w j Each component in To encrypt, if If is a positive integer, the component is directly encrypted to obtain the component The ciphertext
[0031]
[0032] like If is a positive floating point number, Expand 10 n times to make it an integer Then encrypt
[0033]
[0034] Reduce the encrypted result by 10n Get the ciphertext
[0035]
[0036] like If it is a negative number, the model w j Each component in Preprocessing is performed, specifically, for each component of the model parameters Processing to get a positive number
[0037]
[0038] Positive Numbers Encrypt to get the corresponding ciphertext
[0039] Step 4.3: Each ciphertext According to the amount The position of the reorganized vector is obtained as the model w j The ciphertext Enc(w j ).
[0040] The received ciphertext is decrypted based on the private key sk, and the weighted aggregation model is updated according to the amount of data used locally by the participants, specifically:
[0041] Step 6.1: The server decrypts the K encrypted model parameters received according to the private key sk get
[0042] Step 6.2: The server weights the aggregation model parameters according to the amount of data used locally by the participants. The aggregation rule is:
[0043]
[0044] in,
[0045] Step 6.3: Update the global iteration number j←j+1.
[0046] The server decrypts the ciphertext using the private key sk=λ, as follows:
[0047] Step 6.1.1, for the ciphertext Enc(w j ) If the amount If is an integer, decrypt directly to get the plaintext
[0048]
[0049] If the amount is a decimal, then the component Expand 10 n times to make it an integer, and then decrypt it to get
[0050]
[0051] Then reduce the decrypted result by 10 n times the plaintext
[0052]
[0053] Step 6.1.2: If the decryption result is greater than Then
[0054] Step 6.1.3: According to the amount The position of the reorganized vector is obtained by ciphertext Enc(w j ) The corresponding decryption model
[0055] The enterprise power load joint forecasting system based on horizontal LSTM federated learning includes:
[0056] A key generation module, which generates public and private keys {pk, sk} based on LSTM model parameters, and broadcasts the public key pk to all participants;
[0057] Model initialization module: The model initialization module is used to initialize the local iteration number E (E∈Z + ), the number of global iterations j = 0, the parameter w of the LSTM model j and learning rate η, and the parameters w of the LSTM model j , learning rate η and global iteration number j are broadcast to all participants;
[0058] Local iterative update module; the local iterative update module is based on the parameter w of the LSTM model j , learning rate η and global iteration number j, train the local data of the participants, and after local iteration E(E∈Z + ) times, an updated LSTM model is obtained;
[0059] Encryption module; the encryption module encrypts the updated LSTM model based on Paillier additive homomorphic encryption and a local public key pk to obtain a ciphertext;
[0060] Receiving module: The receiving module is used to broadcast the updated LSTM model parameters and iteration times, and receive the updated ciphertext uploaded by the participants. After receiving K ciphertexts, the received ciphertexts are aggregated, and other participants who have not uploaded updates are notified to stop local iterations.
[0061] Update the global model module; the updated global model module decrypts the received ciphertext based on the private key sk, performs weighted aggregation model updates according to the amount of data used locally by the participants, updates the global iteration number j←j+1, and broadcasts the aggregation result and the updated iteration number to all participants;
[0062] Iterative update module: The iterative update module is used until the global iteration number j is greater than the set threshold, and each participant obtains the final global model.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] The present invention adopts a federated learning method to allow the original data of each participant to be stored locally, thereby protecting the security of multi-party data. At the same time, based on homomorphic encryption, even if the user obtains the ciphertext exchanged in the middle, the model parameter information cannot be obtained, effectively preventing malicious users from inferring the original information of the participants based on the intermediate parameter information. Therefore, the homomorphic encryption method improves the security of the data of the participants. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 It is a schematic diagram of the logical architecture of the enterprise power load joint prediction method based on horizontal LSTM federated learning of the present invention;
[0067] Figure 2 Some data samples used in the present invention;
[0068] Figure 3 A comparison diagram of the mean square error MSE of the present invention and that of the present invention with only one participant on the power load data set;
[0069] Figure 4 This is a comparison diagram of the mean square error (MSE) of the present invention when the number of participants K has different values;
[0070] Figure 5 It is a flow chart of the enterprise power load joint prediction method based on horizontal LSTM federated learning of the present invention;
[0071] Figure 6 This is a schematic diagram of the structure of the enterprise power load joint forecasting system based on horizontal LSTM federated learning of the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0073] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0075] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0076] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0077] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0078] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0079] See also Figure 1 The present invention discloses a method for predicting enterprise power load security based on horizontal LSTM federated learning, comprising:
[0080] Step 1: Key generation. In a horizontal federated learning scenario with one server and P participants, the server generates a public-private key {pk, sk} and broadcasts the public key pk to all participants. The method for the server to generate the public-private key is as follows:
[0081] Step 1.1: Multiply each component in the LSTM model parameters by ±10 n , and convert them into positive integers, let the largest positive integer be M, then select two prime numbers p and q to ensure that pq>2M;
[0082] Step 1.2, calculate N = pq and λ = lcm(p-1, q-1); and select g = N+1;
[0083] Among them, the function lcm represents the calculation of the greatest common divisor of two numbers, sk=λ is the private key generated by the server, and pk=(N, g) is the public key generated by the server.
[0084] Step 2: Initialize the model and broadcast the model parameters, etc. The server initializes the local iteration times E(E∈Z + ), the number of global iterations j = 0, the parameter w of the LSTM model j And learning rate η, etc., then broadcast the model parameters and number of iterations to all participants;
[0085] Step 3: Local iterative update: the participant receives the model parameters and iteration number j broadcast by the server, and then uses the stochastic gradient descent method to train the local data. + ) times, the updated model is obtained. The specific steps of step 3 are:
[0086] Step 3.1: In the jth iteration, the i-th (i∈[P])th participant receives the LSTM model broadcast by the server, denoted as Where k is the number of local iterations, and k is initialized to 0;
[0087] Step 3.2: The i-th participant randomly selects local m i Data
[0088] Step 3.3: Participant i uses the decrypted LSTM model to train the extracted m i data, and obtain m i Gradient
[0089] For m i Gradient Take the average value to get the unbiased gradient of the local data:
[0090]
[0091] Step 3.4: Update the local model
[0092] Step 3.5, update the local iteration number k←k+1;
[0093] Step 3.6: Repeat the above steps E times to get the final local update
[0094] E is a hyperparameter set before training the model, which indicates the total number of local iterations required by each participant. Here, k indicates the number of local iterations of each participant in real time, so k is constantly changing. When k is equal to E, the local iteration process is terminated and the participant uploads the local update.
[0095] Step 4: Encrypt and upload the ciphertext. Through the Paillier addition homomorphic encryption method, the participants use the local public key to encrypt the updated model and upload the ciphertext to the server. In step 4, each participant encrypts the model parameter w through the public key pk = (N, g) j The specific process is:
[0096] Step 4.1: Select any integer in represents the set of positive integers that are coprime to N and less than N, r is any element in the set, so r is coprime to N and less than N;
[0097] Step 4.2: LSTM model w j Each component in To encrypt, if If is a positive integer, the component is directly encrypted to obtain the component The ciphertext
[0098]
[0099] like If is a positive floating point number, Expand 10 n times to make it an integer Then encrypt
[0100]
[0101] Reduce the encrypted result by 10 n Get the ciphertext
[0102]
[0103] like If it is a negative number, the model w j Each component in Preprocessing is performed, specifically, for each component of the model parameters Processing to get a positive number
[0104]
[0105] Positive Numbers Encrypt to get the corresponding ciphertext
[0106] Step 4.3: Each ciphertext According to the amount The position of the reorganized vector is obtained as the model w j The ciphertext Enc(w j ).
[0107] Step 5: Receive model parameters. When the server broadcasts the latest model parameters and iteration times, it starts to receive updated ciphertexts uploaded by the participants. After the server receives K ciphertexts, it starts to aggregate the received ciphertexts and notifies other participants who have not uploaded updates to stop local iterations.
[0108] Step 6: Update the global model. The server uses the private key sk to decrypt the received ciphertext, updates the weighted aggregation model according to the amount of data used locally by the participants, updates the number of iterations j←j+1, and broadcasts the aggregation results and the updated number of iterations to all participants. The specific steps of step 6 are:
[0109] Step 6.1: The server decrypts the K encrypted model parameters received according to the private key sk get
[0110] Step 6.2: The server weights the aggregation model parameters according to the amount of data used locally by the participants. The aggregation rule is:
[0111]
[0112] in,
[0113] Step 6.3: Update the global iteration number j←j+1.
[0114] In step 6.1, the specific process of the server decrypting the ciphertext using the private key sk=λ is:
[0115] Step 6.1.1, for the ciphertext Enc(w j ) If the amount If is an integer, decrypt directly to get the plaintext
[0116]
[0117] If the amount is a decimal, then the component Expand 10 n times to make it an integer, and then decrypt it to get
[0118]
[0119] Then reduce the decrypted result by 10 n times the plaintext
[0120]
[0121] Step 6.1.2: If the decryption result is greater than Then
[0122] Step 6.1.3: According to the amount The position of the reorganized vector is obtained by ciphertext Enc(w j ) The corresponding decryption model
[0123] Step 7: Iterative update: repeat steps 3-6 for all participants and servers until the number of iterations j is greater than the set threshold, the model training is completed, and each participant can obtain the final global model;
[0124] Step 8: Federated reasoning: Analyze the historical power information of the enterprise based on the LSTM model, predict the future power load, and use the mean square error (MSE) to evaluate the performance of the model.
[0125]
[0126] (x i ,y i ), i = 1, 2, ..., m represents m data and labels, pred(x i ) represents data x i The predicted value of .
[0127] refer to Figure 2 , Figure 3 and Figure 4 ,in, Figure 2 This is a sample diagram of the power load data set used. Due to the large number of samples, Figure 2 Only a portion of the sample is taken. Figure 2 The left side is the serial number, the middle is the time point, and the right side is the power consumption corresponding to each time point. Figure 3 The mean square error experimental results of deploying the LSTM model on the local data of a single participant (a unilateral scenario) and the method proposed in the present invention (a federated learning scenario) are shown in Figure 2. Figure 4 The figure below shows the experimental results of the mean square error of the proposed method under different numbers of participants. By observing the experimental results of these two figures, it can be found that the proposed method in this paper - the federated learning scenario - can significantly improve the utility of the model and reduce the loss value of the model compared to the traditional unilateral scenario, and the improvement effect of the model is more significant as the number of participants increases.
[0128] refer to Figure 5 The present invention provides an enterprise security power load forecasting method based on horizontal LSTM federated learning, and its logical architecture includes three parts: local training, homomorphic encryption and horizontal federated learning, with horizontal federated learning as the main body. The use of LSTM models with long short-term memory can improve the accuracy of time-series power load data prediction. In order to protect the privacy and security of data, the method of horizontal federated learning is used to ensure that the data does not leave the local area, and homomorphic encryption is used to ensure that malicious users cannot obtain update parameters even if they obtain the intermediate ciphertext, thereby effectively solving the inference attack behavior.
[0129] See also Figure 6 The present invention discloses a joint forecasting system for enterprise power load based on horizontal LSTM federated learning, including:
[0130] A key generation module, which generates public and private keys {pk, sk} based on LSTM model parameters, and broadcasts the public key pk to all participants;
[0131] Model initialization module: The model initialization module is used to initialize the local iteration number E (E∈Z +), the number of global iterations j = 0, the parameter w of the LSTM model j and learning rate η, and the parameters w of the LSTM model j , learning rate η and global iteration number j are broadcast to all participants;
[0132] Local iterative update module; the local iterative update module is based on the parameter w of the LSTM model j , learning rate η and global iteration number j, train the local data of the participants, and after local iteration E(E∈Z + ) times, an updated LSTM model is obtained;
[0133] Encryption module; the encryption module encrypts the updated LSTM model based on Paillier additive homomorphic encryption and a local public key pk to obtain a ciphertext;
[0134] Receiving module: The receiving module is used to broadcast the updated LSTM model parameters and iteration times, and receive the updated ciphertext uploaded by the participants. After receiving K ciphertexts, the received ciphertexts are aggregated, and other participants who have not uploaded updates are notified to stop local iterations.
[0135] Update the global model module; the updated global model module decrypts the received ciphertext based on the private key sk, performs weighted aggregation model updates according to the amount of data used locally by the participants, updates the global iteration number j←j+1, and broadcasts the aggregation result and the updated iteration number to all participants;
[0136] Iterative update module: The iterative update module is used until the global iteration number j is greater than the set threshold, and each participant obtains the final global model.
[0137] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. The enterprise power load joint forecasting method based on horizontal LSTM federated learning is characterized by: include: Step 1: Generate key; Generate public and private keys {pk, sk} based on LSTM model parameters, and broadcast the public key pk to all participants; The public and private keys {pk, sk} are generated based on the LSTM model parameters, specifically: Step 1.1: Multiply each component in the LSTM model parameters by ±10 n , and convert them into positive integers, let the largest positive integer be M, select two prime numbers p and q, and ensure that pq>2M; Step 1.2, calculate N = pq and λ = lcm(p-1,q-1); and select g = N+1; Among them, the function lcm represents the calculation of the greatest common factor of two numbers, sk = λ is the private key generated by the server, and pk = (N, g) is the public key generated by the server; Step 2: Model initialization: Initialize the number of local iterations E of each participant in each round of iteration, where E∈Z + , global iteration number j = 0, parameter w of LSTM model j and learning rate η, and the parameters w of the LSTM model j , learning rate η and global iteration number j are broadcast to all participants; Step 3: Local iterative update: Parameter w based on LSTM model j , learning rate η and global iteration number j, train the local data of the participants, and after E local iterations, obtain an updated LSTM model; The step 3 is specifically: Step 3.1: In the jth iteration, the i-th participant receives the LSTM model broadcast by the server, denoted as Where i∈[P], k is the number of local iterations, and k is initialized to 0; Step 3.2: The i-th participant randomly selects local m i Data Step 3.3: Participant i uses the decrypted LSTM model to train the extracted m i data, and obtain m i Gradient For m i Gradient Take the average value to get the unbiased gradient of the local data: Step 3.4: Update the local model Step 3.5, update the local iteration number k←k+1; Step 3.6: Repeat steps 3.1 to 3.5E times to get the final local update. Step 4: Encryption: Based on Paillier additive homomorphic encryption and the local public key pk, the updated LSTM model is encrypted to obtain the ciphertext; The updated LSTM model is encrypted based on Paillier additive homomorphic encryption and the local public key pk to obtain a ciphertext; specifically: Step 4.1, select any Step 4.2: For model w j Each component in To encrypt, if If is a positive integer, the component is directly encrypted to obtain the component The ciphertext like If is a positive floating point number, Expand 10 n times to make it an integer Then encrypt Reduce the encrypted result by 10 n Get the ciphertext like If it is a negative number, the model w j Each component in Preprocessing is performed, specifically, for each component of the model parameters Processing to get a positive number Positive Numbers Encrypt to get the corresponding ciphertext Enc(w ji ); Step 4.3: Each ciphertext According to the amount The position of the reorganized vector is obtained as the model w j The ciphertext Enc(w j ); Step 5: Receive model parameters, broadcast the updated LSTM model parameters and iteration times, and receive the updated ciphertext uploaded by the participants. After receiving K ciphertexts, aggregate the received ciphertexts and notify other participants who have not uploaded updates to stop local iterations. Step 6: Update the global model. Decrypt the received ciphertext based on the private key sk, perform weighted aggregation model updates based on the amount of data used locally by the participants, update the global iteration count j←j+1, and broadcast the aggregation results and updated iteration count to all participants. The ciphertext received by decrypting the private key sk is updated according to the weighted aggregation model based on the amount of data used locally by the participant, specifically: Step 6.1: The server decrypts the K encrypted model parameters received according to the private key sk get Step 6.2: The server weights the aggregation model parameters according to the amount of data used locally by the participants. The aggregation rule is: in, Step 6.3, update the global iteration number j←j+1; the server decrypts the ciphertext using the private key sk=λ, specifically: Step 6.1.1, for the ciphertext Enc(w j ) If the amount If is an integer, decrypt directly to get the plaintext If the amount is a decimal, then the component Expand 10 n times to make it an integer, and then decrypt it to get Then reduce the decrypted result by 10 n times the plaintext Step 6.1.2: If the decryption result is greater than Then Step 6.1.3: According to the amount The position of the reorganized vector is obtained by ciphertext Enc(w j ) The corresponding decryption model Step 7, iterative update; repeat steps 3-6 until the global iteration number j is greater than the set threshold, the model training is completed, and each participant obtains the final global model; Step 1, step 2, step 5 and step 6 are the work of the server; step 3 and step 4 are the work of the participants; step 3 also includes: the participants receive the model parameters and global iteration number j broadcast by the server; step 4 also includes: the participants upload the ciphertext to the server.
2. The enterprise power load joint forecasting system based on horizontal LSTM federated learning is characterized by: The enterprise power load joint prediction method based on horizontal LSTM federated learning as claimed in claim 1 is adopted, and the enterprise power load joint prediction system based on horizontal LSTM federated learning includes: A key generation module, which generates a public and private key {pk, sk} based on the LSTM model parameters, and broadcasts the public key pk to all participants; Model initialization module: The model initialization module is used to initialize the local iteration number E of each participant in each round of iteration, where E∈Z + , global iteration number j = 0, parameter w of LSTM model j and learning rate η, and the parameters w of the LSTM model j , learning rate η and global iteration number j are broadcast to all participants; Local iterative update module; the local iterative update module is based on the parameter w of the LSTM model j , learning rate η and global iteration number j, train the local data of the participants, and after E local iterations, obtain an updated LSTM model; Encryption module; the encryption module encrypts the updated LSTM model based on Paillier additive homomorphic encryption and a local public key pk to obtain a ciphertext; Receiving module: The receiving module is used to broadcast the updated LSTM model parameters and iteration times, and receive the updated ciphertext uploaded by the participants. After receiving K ciphertexts, the received ciphertexts are aggregated, and other participants who have not uploaded updates are notified to stop local iterations. Update the global model module; the updated global model module decrypts the received ciphertext based on the private key sk, performs weighted aggregation model updates according to the amount of data used locally by the participants, updates the global iteration number j←j+1, and broadcasts the aggregation result and the updated iteration number to all participants; Iterative update module: The iterative update module is used until the global iteration number j is greater than the set threshold, and each participant obtains the final global model.
Citation Information
Patent Citations
Federated learning privacy protection method based on homomorphic encryption in Internet of Vehicles
CN112583575A
Training method and device of federated model based on neural network, and computer device
CN113159289A
Federal learning method based on differential privacy and chaotic encryption
CN113239404A
Federal learning privacy protection method based on homomorphic encryption
CN113434873A
Intelligent factory temperature and humidity control method based on federal learning
CN114399031A
