Data aggregation method and system based on cooperation of user side and power center server
By using encryption and verified secret sharing technology that cooperates with the power center server in the smart grid system, the problem of data security and privacy leakage in traditional centralized data collection and model training is solved, and efficient and secure model training collaboration is achieved.
Patent Information
- Application Number
- CN202411655287.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, traditional centralized data collection and model training have problems with data transmission security and privacy leakage, especially during the process of user data being transmitted from local to server.
Encryption, digital signatures and verifiable secret sharing technologies ensure the security of data during transmission and storage by working together between the user side and the power center server. The specific steps include the user training locally and generating gradient parameters and signatures after masking, performing verified secret sharing, and sending the summing result to the server; after the server verifies, the main mask is restored, and the aggregation operation is performed, and the result is finally returned to the user.
It realizes efficient model training collaboration between the user side and the server while ensuring data privacy and security, reduces the risk of data leakage and ensures the privacy rights and interests of users.
Smart Images

Figure CN119577801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data aggregation method and system based on collaboration between a user terminal and a power center server. Background Art
[0002] As the next generation of power grid system, smart grid upgrades the traditional power grid into a more efficient, reliable, flexible and sustainable power system by integrating advanced information and communication technologies. It realizes real-time monitoring, automated analysis and control through two-way information and power flow to meet diverse energy needs. The efficient operation of smart grid is inseparable from the collection and processing of a large amount of data, including user power consumption data, renewable energy output data, equipment operation status data, etc. These data provide the basis for many key tasks such as power grid optimization control, energy consumption prediction, anomaly detection, etc.
[0003] In the existing technology, most traditional centralized data collection and model training have many problems that lead to data transmission security and privacy leakage. On the one hand, centralized collection requires users to transfer all raw data from local to the server. In this process, the amount of data is large and there are security threats in the transmission channel. For example, network attacks may intercept data in transmission, and hackers can use network vulnerabilities to steal user data in transmission, which may contain a lot of sensitive information. On the other hand, a large amount of data from different users is stored in the server. When the security protection of the server is breached, user data will be leaked.
[0004] In view of this, a data aggregation method and system based on collaboration between a user terminal and a power center server is needed. Summary of the invention
[0005] The embodiments of the present application provide a data aggregation method and system based on collaboration between a user terminal and a power center server, which are used to solve the problem of data leakage damaging the privacy rights and interests of users.
[0006] A first aspect of an embodiment of the present application provides a data aggregation method based on collaboration between a user terminal and a power center server, including:
[0007] Each user terminal generates a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature;
[0008] Each user terminal performs model training in a local data set, and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed;
[0009] Each user terminal performs verifiable secret sharing of the mask value, sums the secret shares received from other users, and sends the sum result to the power center server;
[0010] The power center server verifies the received summation result and restores the main mask after the verification passes;
[0011] The power center server performs aggregation operation according to the gradient parameter after masking and the main mask, and returns the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result.
[0012] Furthermore, each user terminal performs model training in a local data set, and after the training is completed, uploads the masked gradient parameters and corresponding signatures to the power center server, including:
[0013] Each user terminal extracts the gradient parameters of the locally trained neural network model, and adds a random number to the extracted gradient parameters to obtain a new gradient:
[0014]
[0015] in: is the new gradient, ω i is the extracted gradient parameter, r i is a random number;
[0016] Each user terminal signs the new gradient:
[0017]
[0018] Where: i is the signature, SIG.sign is the digital signature algorithm, SK′ i For the private key.
[0019] Furthermore, after each user terminal performs model training in a local data set and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed, the method further includes:
[0020] The power center server performs signature verification after receiving the masked gradient parameters and the corresponding signature, and sends the identity identifiers of all legal users to the clients that pass the verification.
[0021] Furthermore, each user terminal performs verifiable secret sharing of the mask value, sums the secret shares received from other users, and sends the sum result to the power center server, including:
[0022] Each user terminal selects a polynomial to calculate a secret share, and authenticates and encrypts the secret share before sending it to the power center server;
[0023] The power center server forwards the received encrypted shares to the corresponding user terminals, and each user terminal decrypts and verifies the validity of the shares;
[0024] Each user terminal that passes the secret share verification sums the received shares and sends the sum result to the power center server.
[0025] Furthermore, each user terminal selects a polynomial to calculate a secret share, and authenticates and encrypts the secret share and sends it to the power center server, including:
[0026] Polynomial P i (x) Expression:
[0027]
[0028] Where: t―1 is the polynomial P i (x) times, x k is the user identity, a ik The polynomial coefficients are randomly selected for each user and set a i0 :=r i .
[0029] Furthermore, the power center server forwards the received encrypted shares to the corresponding user terminals, and each user terminal decrypts and verifies the validity of the shares, including:
[0030] Share ji The test formula is as follows:
[0031]
[0032] Where: r ji For user U j Secret shared with user U i share, For user U i Com jk Commitment Group j The kth element in is used to verify whether the decrypted secret share is correct.
[0033] Furthermore, each user terminal that passes the secret share verification sums the received shares and sends the sum result to the power center server, including:
[0034] The sum expression:
[0035]
[0036] Where: R i To sum the results, The set of users who have passed the secret share verification.
[0037] Furthermore, the power center server verifies the received summation result and restores the main mask after the verification is passed, including:
[0038] The server verifies the sum of the shares sent by each user by checking the following formula: i Effectiveness:
[0039]
[0040] The expression of the main mask r is:
[0041]
[0042] Where: r i For user U i The random number mask.
[0043] Furthermore, the power center server performs an aggregation operation according to the gradient parameter after the masking process and the main mask, and returns the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result, including:
[0044] The power center server sums the gradient parameters after the masking process and subtracts the main mask to obtain the aggregation result:
[0045] The power center server encrypts and signs the aggregation results respectively, and sends the encryption results and signatures to each user terminal, so that each user terminal decrypts and obtains the global model parameters of this round of training after verification, and enters the next round of training.
[0046] A second aspect of the embodiment of the present application provides a data aggregation system based on collaboration between a user terminal and a power center server, including:
[0047] A key pair generation unit is used for each user terminal to generate a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature;
[0048] A model training unit, used for each user terminal to perform model training in a local data set, and upload the masked gradient parameters and corresponding signatures to the power center server after the training is completed;
[0049] A verifiable secret sharing unit, configured for each user terminal to perform verifiable secret sharing of the mask value, sum the secret shares received from other users, and send the sum result to the power center server;
[0050] A summation result verification unit, used for the power center server to verify the received summation result, and restore the main mask after the verification is passed;
[0051] The aggregation result feedback unit is used for the power center server to perform aggregation operation according to the gradient parameter after masking and the main mask, and return the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result.
[0052] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0053] The present invention ensures data security by generating key pairs respectively by the user end and the power center server, wherein the user end generates key pairs for encryption, digital signature and secret negotiation, and the server generates key pairs for encryption and digital signature; the user end first performs model training on the local data set, sends the gradient parameters and signatures of the masking process after training to the server, then performs verifiable secret sharing of the mask value, and sums the received secret shares of other users and sends them to the server; the power center server verifies the received summation result, restores the main mask after success, and then performs aggregation operation in combination with the previous masking gradient parameters, and returns the result to the user end, so that each user end can enter the next round of training. The present invention realizes efficient model training collaboration between the user end and the server under the premise of ensuring data privacy and security.
[0054] Other advantages, objectives, and features of the present invention will be set forth in part in the following description, and in part will be apparent to those skilled in the art based on an examination of the following or may be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The present invention is a flowchart of an embodiment of a data aggregation method based on collaboration between a user terminal and a power center server. DETAILED DESCRIPTION
[0056] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0057] Embodiment 1
[0058] See also Figure 1 , an embodiment of a data aggregation method based on collaboration between a user terminal and a power center server in the present invention comprises the following steps:
[0059] S11. Each user terminal generates a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature;
[0060] This step is the initialization phase. Set the system security parameters to k, the number of users n and the threshold t, the key negotiation parameter pp←KA.param(k), and the plaintext space Domains for secret sharing Each user U i Each of them generates a pair of public and private key pairs (PK i ,SK i )←Keygen(k), key pair for digital signature (PK′ i ,SK′ i )←SIG.gen(k) and the key pair (PK″) used for secret negotiation i ,SK″ i )←KA.gen(pp); The power center server S generates a public-private key pair (PK, SK)←Keygen(k) for encryption and a key pair (PK′, SK′)←SIG.gen(k) for digital signature.
[0061] S12. Each user terminal performs model training in the local data set, and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed;
[0062] Step S12 is the local training stage, which also includes the following:
[0063] Each user terminal extracts the gradient parameters of the locally trained neural network model and adds a random number to the extracted gradient parameters to obtain a new gradient:
[0064]
[0065] in: is the new gradient, ω i is the extracted gradient parameter, r i is a random number;
[0066] Each user terminal signs the new gradient:
[0067]
[0068] Where: i is the signature, SIG.sign is the digital signature algorithm, SK′ i For the private key.
[0069] Specifically, each user terminal performs model training in a local data set, and after the training is completed, the masked gradient parameters and corresponding signatures are uploaded to the power center server, and the following steps are also included:
[0070] After receiving the masked gradient parameters and the corresponding signatures, the power center server performs signature verification and sends the identities of all legal users to the clients that pass the verification.
[0071] That is will and σ i The server verifies the signature of the received encrypted gradient, records the verified user set as U1, and identifies the user is sent to each user, where each element in X is uniformly randomly selected from the domain F.
[0072] S13. Each user terminal verifiably shares the mask value, sums the secret shares received from other users, and sends the sum result to the power center server;
[0073] This step is the verifiable secret sharing phase, which includes the following:
[0074] 1. Each user terminal selects a polynomial to calculate the secret share, authenticates and encrypts the secret share, and sends it to the power center server;
[0075] Each user U i ∈U1 randomly selects a polynomial of degree t-1, polynomial P i (x) Expression:
[0076]
[0077] Where: t―1 is the polynomial P i (x) times, x k is the user identity, a ik The polynomial coefficients are randomly selected for each user and set a i0 :=r i .
[0078] In addition, a i0 :=r i ; User U i Calculate |U1| secret shares r ij =P i (x j )(j=1,2,…,|U1|), and then use the symmetric key agreed with each user to authenticate and encrypt the share e ij ←AE.enc(KA.agree(SK″ i ,PK″ j ),r ij ), sends the encrypted share (with implicit user identity information) to the server S, while user U i Calculate and make public your commitments:
[0079]
[0080] Among them: Com ik Represents the set Com i The kth element in .
[0081] 2. The power center server forwards the received encrypted shares to the corresponding user end, and each user end decrypts and verifies the validity of the shares;
[0082] 3. Each user end that passes the secret share verification will sum the received shares and send the sum result to the power center server.
[0083] The server records the set of users who receive the encrypted shares as U2, and then forwards the encrypted shares to the corresponding users; each user U i ∈U2 uses the negotiated symmetric key to decrypt the encrypted share r ji ←AE.dec(KA.agree(SK′ i ′,PK′ j ′),e ji ), and then verify whether the following formula is established to verify the validity of the share, share r ji The test formula is as follows:
[0084]
[0085] Where: rji For user U j Secret shared with user U i share, For user U i Com jk Commitment Group j The kth element in is used to verify whether the decrypted secret share is correct.
[0086] If the equality does not hold, then user U i Reject the share and broadcast to user U j Complaint from user U j Exit this training round.
[0087] The set of users who have passed all secret share verifications is recorded as U3, and then each user U i ∈U3 sums up the verified shares it receives:
[0088]
[0089] UserU i R i Encrypt c with the public key of server S i ←Enc(PK,R i ), and then sign the ciphertext σ′ i =SIG.sign(SK′ i ,c i ), the ciphertext c i and signature σ′ i Sent to server S together.
[0090] S14. The power center server verifies the received summation result and restores the main mask after the verification passes;
[0091] This step is the main mask recovery stage. After receiving the data, the server first verifies the signature and then decrypts the ciphertext. i ←Dec(SK,c i ), check whether the following formula is true to verify the sum of the shares sent by each user R i Effectiveness:
[0092]
[0093] The set of users who have passed the share verification is recorded as U4(>t); then the server S uses R i (U i ∈U4) as the share of homomorphic secret sharing, and the Lagrange interpolation polynomial is used to solve the equations to obtain The sum of the masks of the user set (called the main mask), the expression of the main mask r is:
[0094]
[0095] Where: r i For user U i The random number mask.
[0096] S15. The power center server performs aggregation operation according to the gradient parameters after masking and the main mask, and returns the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result.
[0097] This step is the parameter update phase, including:
[0098] The power center server sums the gradient parameters after masking and subtracts the main mask to obtain the aggregation result:
[0099]
[0100] The power center server encrypts and signs the aggregation results respectively, and sends the encrypted results and signatures to each user end, so that each user end can verify and decrypt to obtain the global model parameters of this round of training and enter the next round of training.
[0101] Specifically, the server The public key of each user in the aggregation will encrypt the aggregation result c′ i ←Enc(PK i ,ω) then signσ″ i =SIG.sign(SK′,c′ i ), c′ i and σ″ i Send back to user U i , user U i After signature verification and decryption, you can obtain the global model parameters of this round of training and then enter the next round of training.
[0102] The above-mentioned embodiment realizes secure data aggregation through secret sharing and its homomorphism, which can minimize communication costs and be resilient to user disconnections; at the same time, it adopts verifiable secret sharing and digital signature technology to ensure the validity and integrity of data transmitted between users and servers, and can also resist collusion among some users and collusion between servers and users, so that it has both security and practicality, and can superiorly maintain data privacy and integrity without affecting performance.
[0103] Embodiment 4
[0104] An embodiment of a data aggregation system based on collaboration between a user terminal and a power center server in the present invention includes the following steps:
[0105] A key pair generation unit is used for each user terminal to generate a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature;
[0106] The model training unit is used for each user terminal to perform model training in the local data set, and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed;
[0107] A verifiable secret sharing unit is used for each user end to perform a verifiable secret sharing of the mask value, sum the secret shares received from other users, and send the sum result to the power center server;
[0108] A summation result verification unit is used for the power center server to verify the received summation result and restore the main mask after the verification is passed;
[0109] The aggregation result feedback unit is used for the power center server to perform aggregation operation according to the gradient parameters after masking and the main mask, and return the obtained aggregation result to each user end, so that each user end enters the next round of training after receiving the aggregation result.
[0110] For the specific definition of the system, please refer to the definition of the method above, which will not be repeated here. Each module in the above system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0111] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0112] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored. In addition, each functional unit in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0114] It can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A data aggregation method based on collaboration between a user terminal and a power center server, characterized in that: include: Each user terminal generates a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature; Each user terminal performs model training in a local data set, and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed; Each user terminal performs verifiable secret sharing of the mask value, sums the secret shares received from other users, and sends the sum result to the power center server; The power center server verifies the received summation result and restores the main mask after the verification passes; The power center server performs aggregation operation according to the gradient parameter after masking and the main mask, and returns the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result.
2. The data aggregation method based on collaboration between the user end and the power center server according to claim 1 is characterized in that: Each user terminal performs model training in a local data set, and uploads the masked gradient parameters and corresponding signatures to the power center server after the training is completed, including: Each user terminal extracts the gradient parameters of the locally trained neural network model, and adds a random number to the extracted gradient parameters to obtain a new gradient: in: is the new gradient, ω i is the extracted gradient parameter, r i is a random number; Each user terminal signs the new gradient: Where: i is the signature, SIG.sign is the digital signature algorithm, SK′ i For the private key.
3. The data aggregation method based on collaboration between the user end and the power center server according to claim 2 is characterized in that: After each user terminal performs model training in a local data set and uploads the masked gradient parameters and corresponding signatures to the power center server after the training, the method further includes: The power center server performs signature verification after receiving the masked gradient parameters and the corresponding signature, and sends the identity identifiers of all legal users to the clients that pass the verification.
4. The data aggregation method based on collaboration between the user end and the power center server according to claim 1 is characterized in that: Each user terminal performs verifiable secret sharing of the mask value, sums the secret shares received from other users, and sends the sum result to the power center server, including: Each user terminal selects a polynomial to calculate a secret share, and authenticates and encrypts the secret share before sending it to the power center server; The power center server forwards the received encrypted shares to the corresponding user terminals, and each user terminal decrypts and verifies the validity of the shares; Each user terminal that passes the secret share verification sums the received shares and sends the sum result to the power center server.
5. The data aggregation method based on collaboration between the user end and the power center server according to claim 4 is characterized in that: Each user terminal selects a polynomial to calculate a secret share, and authenticates and encrypts the secret share and sends it to the power center server, including: Polynomial P i (x) Expression: Where: t―1 is the polynomial P i (x) times, x k is the user identity, a ik The polynomial coefficients are randomly selected for each user and set a i0 :=r i .
6. The data aggregation method based on collaboration between the user end and the power center server according to claim 4 is characterized in that: The power center server forwards the received encrypted shares to the corresponding user terminals, and each user terminal decrypts and verifies the validity of the shares, including: Share ji The test formula is as follows: Where: r ji For user U j Secret shared with user U i share, For user U i Com jk Commitment Group j The kth element in is used to verify whether the decrypted secret share is correct.
7. The data aggregation method based on collaboration between the user end and the power center server according to claim 4 is characterized in that: Each user terminal that passes the secret share verification sums the received shares and sends the sum result to the power center server, including: The sum expression: Where: R i To sum the results, The set of users who have passed the secret share verification.
8. The data aggregation method based on collaboration between the user end and the power center server according to claim 1 is characterized in that: The power center server verifies the received summation result and restores the main mask after the verification is passed, including: The server verifies the sum of the shares sent by each user by checking the following formula: i Effectiveness: The expression of the main mask r is: Where: r i For user U i The random number mask.
9. The data aggregation method based on collaboration between the user end and the power center server according to claim 1 is characterized in that: The power center server performs an aggregation operation according to the gradient parameter after the masking process and the main mask, and returns the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result, including: The power center server sums the gradient parameters after the masking process and subtracts the main mask to obtain the aggregation result: The power center server encrypts and signs the aggregation results respectively, and sends the encryption results and signatures to each user terminal, so that each user terminal decrypts and obtains the global model parameters of this round of training after verification, and enters the next round of training.
10. A data aggregation system based on collaboration between a user terminal and a power center server, characterized in that: include: A key pair generation unit is used for each user terminal to generate a key pair for encryption, digital signature and secret negotiation, and the power center server generates a key pair for encryption and digital signature; A model training unit, used for each user terminal to perform model training in a local data set, and upload the masked gradient parameters and corresponding signatures to the power center server after the training is completed; A verifiable secret sharing unit, configured for each user terminal to perform verifiable secret sharing of the mask value, sum the secret shares received from other users, and send the sum result to the power center server; A summation result verification unit, used for the power center server to verify the received summation result, and restore the main mask after the verification is passed; The aggregation result feedback unit is used for the power center server to perform aggregation operation according to the gradient parameter after masking and the main mask, and return the obtained aggregation result to each user terminal, so that each user terminal enters the next round of training after receiving the aggregation result.