A federated learning method, system, device and medium supporting identity verification
By introducing ring signatures and decentralized blockchain structures in federated learning, the problem of illegal sources of model parameters is solved, the security and legitimacy of user identity information is ensured, and the security and reliability of federated learning are improved.
Patent Information
- Application Number
- CN202211047582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-08-29
AI Technical Summary
Traditional federated learning frameworks have the problem that the source of model parameters is illegal and the specific source of model parameters cannot be obtained. There is also the risk of illegal users uploading malicious updates and semi-honest aggregators inferring user identity privacy.
Combining ring signatures with a decentralized blockchain structure, a trusted organization generates system security parameters and public-private key pairs to verify the legitimacy of users participating in training. The ring signature algorithm is then used to ensure the legitimacy of model parameters and the protection of user identities.
It achieves the protection of the identity information of users participating in training in complex environments, ensures the legitimacy of the source of model parameters, and improves the security and reliability of federated learning.
Smart Images

Figure CN115438322B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and information security, and in particular to a federated learning method, system, device and medium supporting identity authentication. Background Art
[0002] The rise of technologies like artificial intelligence and machine learning has opened up opportunities to uncover valuable insights from massive amounts of data in fields like smart healthcare, finance, and education. To achieve high-precision, high-performance models, traditional machine learning requires users to provide large amounts of raw data for training. However, due to numerous privacy breaches, data security and personal privacy are becoming increasingly important. In particular, because this data may contain sensitive user information, many users refuse to provide their raw data, creating a bottleneck in the development of artificial intelligence.
[0003] In 2016, the introduction of Federated Learning (Federated Learning) broke through this bottleneck. Federated Learning allows users to train models locally. Therefore, users only need to provide a trained local model rather than large amounts of raw data, significantly alleviating the privacy threats posed by traditional machine learning. Furthermore, since users no longer need to provide raw data, they are more willing to participate in the federated learning process. However, traditional federated learning frameworks still have some issues that affect model reliability. These flaws, such as single points of failure and lack of incentives, hinder the efficient and reliable operation of federated learning. Blockchain, as an emerging distributed ledger technology, offers traceability, decentralization, and immutability, and can be used to address the challenges faced by traditional federated learning.
[0004] On the other hand, considering a federated learning system with illegal users and semi-honest aggregators, illegal users may upload malicious updates that affect the global model effect. The semi-honest aggregator will record the intermediate calculation results and further attempt to infer the user's identity privacy. There is a problem that the source of the model parameters is illegal and the specific source of the model parameters cannot be obtained. Summary of the Invention
[0005] In response to the problems in the prior art where the source of model parameters is illegal and the specific source of model parameters cannot be obtained, the present invention proposes a federated learning method, system, device and medium that supports identity verification. By combining ring signatures with a decentralized blockchain structure and introducing them into the federated learning algorithm, the problem of the inability to guarantee the legitimacy of data sources during machine learning model training is solved, the identity information of users participating in the training is protected, and actual security needs can still be met in complex environments.
[0006] A federated learning method supporting identity proof includes the following steps:
[0007] Step 1: Initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain;
[0008] Step 2: Send the required identity information and geographic location of the training participants obtained from the training participants to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participants obtained from the trusted institution on the blockchain;
[0009] Step 3: Use the stochastic gradient descent algorithm to update the model parameters obtained from the training participant to obtain the current model parameters of the training participant;
[0010] Step 4: Based on the current model parameters obtained in step 3, the local model to be signed by the current training participant is updated. A ring signature is generated based on the public and private key pair obtained from the trusted institution. The generated ring signature is sent to the MEC server for verification. If the verification passes, the current training participant is determined to be a legitimate user.
[0011] Step 5: Calculate the accuracy loss value of the local model of the legal training participant determined in step 4;
[0012] Step 6: Based on the accuracy loss value calculated in step 5, the three legitimate training participants whose accuracy loss values are closest to 1 are given response rewards using the set reward mechanism;
[0013] Step 7: The legitimate training participant with the accuracy loss value closest to 1 is elected as the temporary leader of this round, the local models of the legitimate training participants are aggregated, and the latest local model is published to the blockchain;
[0014] Step 8: Get the data point index value of the i-th legal training participant and use the loss function of the minimization task to obtain the optimized global model parameters.
[0015] In order to better implement the present invention, the specific operation of step 2 is: The random number x selected in the training is used as the master key, and the master public key corresponding to the random number x is calculated. The identity information and geographic information required by the training participants obtained from the training participants are sent to the trusted institution for registration, and legal training participants are generated. Based on all legal training participants, independent public keys and private keys corresponding to the public keys are generated and returned to the corresponding training participants, and the public key set is used as a set Indicates that it is published on the blockchain.
[0016] In order to better implement the present invention, further, the specific operation of step 3 is: the initial global model M0 downloaded from the blockchain by the training participating user and the data stored locally are used to train the local model of the training participating user, and the current model parameters of the training participating user are updated using the stochastic gradient descent algorithm.
[0017] In order to better implement the present invention, further, the step 4 specifically includes the following steps:
[0018] Step 41: Based on the random operator α selected from the additive cyclic group obtained from the training participants i , calculate the signature element ci of the training participating users, in the set Z * q Select a random number r and calculate the operator α of the current signing user in the additive cyclic group u , the signature element c of the current signing user u , the signature parameter V of the current signing user;
[0019] Step 42: Operator α of the current signing user in the additive cyclic group calculated in step 41 u , the signature element c of the current signing user u , the signature parameter V of the current signing user, the public and private key pair of the current signing user, and calculate the ring signature σ of the local model of the current signing user;
[0020] Step 43: Verify whether the ring signature is valid based on the signature element ci of the training participant calculated in step 41. If the verification is successful, it is determined that the current training participant is a legitimate user.
[0021] In order to better implement the present invention, further, the specific operation of using the calculated precision loss value in step 5 to determine the accuracy of the local model of the training participating user is: if the precision loss value of the local model of the training participating user is closer to 1, the precision of the local model of the training participating user is higher; if the precision loss value of the local model of the training participating user is close to 0, the precision of the local model of the training participating user is lower.
[0022] In order to better implement the present invention, further, the system security parameters include an additive cyclic group G1 of order q, a generator E of the additive cyclic group G1, a multiplicative cyclic group G2 of order q, a bilinear map e: G1×G1→G2, and hash functions H1, H2, H1: {0, 1} * →G1,
[0023] In order to better implement the present invention, further, based on the above-mentioned federated learning method supporting identity authentication, a federated learning system supporting identity authentication is proposed, including an initialization unit, a registration unit, a training unit, a signature verification unit, a precision loss unit, an incentive unit, an aggregation unit, and an output unit;
[0024] The initialization unit is used to initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain;
[0025] The registration unit is used to send the identity information and geographic location required by the training participant obtained from the training participant to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participant obtained from the trusted institution on the blockchain;
[0026] The training unit is used to update the model parameters obtained from the training participating users using the stochastic gradient descent algorithm to obtain the current model parameters of the training participating users;
[0027] The signature verification unit is used to update the local model to be signed by the current training participant obtained from the training participant using the current model parameters obtained, generate a ring signature based on the public and private key pair obtained from the trusted institution, and send the generated ring signature to the MEC server for verification. If the verification passes, it is determined that the current training participant is a legitimate user;
[0028] The precision loss unit is used to determine the legal training participant and calculate the precision loss value of the local model of the legal training participant;
[0029] The incentive unit is configured to give a response reward to three legitimate training participants whose accuracy loss values are closest to 1 according to the calculated accuracy loss value, using a set reward mechanism;
[0030] The aggregation unit is used to elect the legal training participant with the accuracy loss value closest to 1 as the temporary leader of this round, aggregate the local models of the legal training participants, and publish the latest local model to the blockchain;
[0031] The output unit is used to obtain the data point index value of the i-th legal training participating user, and obtain the optimized global model parameters by minimizing the loss function of the task.
[0032] In order to better implement the present invention, further, an electronic device is proposed, comprising a memory for storing a computer program;
[0033] The processor is configured to implement the aforementioned federated learning method supporting identity authentication when executing the computer program.
[0034] In order to better implement the present invention, further, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned federated learning method supporting identity authentication is implemented.
[0035] The present invention has the following beneficial effects:
[0036] This invention cleverly combines ring signatures with a decentralized blockchain structure and introduces them into the federated learning algorithm, solving the problem of the inability to guarantee the legitimacy of data sources during machine learning model training. It also protects the identity information of users participating in the training and can still meet actual security needs in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a connection block diagram of the proposed federated learning system supporting identity authentication. DETAILED DESCRIPTION
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, 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. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.
[0039] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections, electrical connections; direct connections, indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0040] This invention involves four entities: the principal, the trusted agency (TA), the train participating user (Train Participating User), and the MEC server (Mobile Edge Computing). The specific roles are described as follows:
[0041] Client: proposes the need to establish a federated learning model. Users who meet the requirements can apply to participate in the federated learning task.
[0042] Trusted institution: An absolutely trusted institution that generates system security parameters in the initial stage of the system and registers the identities and issues keys to users participating in federated learning training.
[0043] Training participants: As information providers and miners of the blockchain system, training participants obtain the current global model from the blockchain, train their own local models, generate ring signatures for the models, and upload them to the MEC server. Training participants who pass the signature verification can be determined to be legitimate users.
[0044] MEC server: Verifies the ring signatures generated by training participants and calculates the model accuracy loss value for the verified local model.
[0045] Blockchain: The system uses a private blockchain to permanently store the federated learning global model and conducts block consensus by electing temporary leaders.
[0046] Example 1:
[0047] This embodiment proposes a federated learning method that supports identity verification, including the following steps:
[0048] Step 1: Initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain;
[0049] Step 2: Send the required identity information and geographic location of the training participants obtained from the training participants to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participants obtained from the trusted institution on the blockchain;
[0050] Step 3: Use the stochastic gradient descent algorithm to update the model parameters obtained from the training participant to obtain the current model parameters of the training participant;
[0051] Step 4: Based on the current model parameters obtained in step 3, the local model to be signed by the current training participant is updated. A ring signature is generated based on the public and private key pair obtained from the trusted institution. The generated ring signature is sent to the MEC server for verification. If the verification passes, the current training participant is determined to be a legitimate user.
[0052] Step 5: Calculate the accuracy loss value of the local model of the legal training participant determined in step 4;
[0053] Step 6: Based on the accuracy loss value calculated in step 5, the three legitimate training participants whose accuracy loss values are closest to 1 are given response rewards using the set reward mechanism;
[0054] Step 7: The legitimate training participant with the accuracy loss value closest to 1 is elected as the temporary leader of this round, the local models of the legitimate training participants are aggregated, and the latest local model is published to the blockchain;
[0055] Step 8: Get the data point index value of the i-th legal training participant and use the loss function of the minimization task to obtain the optimized global model parameters.
[0056] Working Principle: This invention cleverly combines ring signatures with a decentralized blockchain structure and introduces them into the federated learning algorithm. This solves the problem of data source legitimacy during machine learning model training, protects the identity information of users participating in the training, and can still meet actual security needs in complex environments.
[0057] Example 2:
[0058] Based on the above-mentioned Example 1, this example describes the specific steps of the federated learning method that supports identity verification.
[0059] Working principle: The specific operation of step 2 is: to obtain the The random number x selected in the training is used as the master key, and the master public key corresponding to the random number x is calculated. The identity information and geographic information required by the training participants obtained from the training participants are sent to the trusted institution for registration, and legal training participants are generated. Based on all legal training participants, independent public keys and private keys corresponding to the public keys are generated and returned to the corresponding training participants, and the public key set is used as a set Indicates that it is published on the blockchain.
[0060] The specific operation of step 3 is: training the local model of the training participant using the initial global model M0 downloaded from the blockchain by the training participant and the data stored locally, and updating the current model parameters of the training participant using the stochastic gradient descent algorithm.
[0061] The step 4 specifically includes the following steps:
[0062] Step 41: Based on the random operator α selected from the additive cyclic group obtained from the training participants i , calculate the signature element ci of the training participating users, in the set Z * q Select a random number r and calculate the operator α of the current signing user in the additive cyclic groupu , the signature element c of the current signing user u , the signature parameter V of the current signing user;
[0063] Step 42: Operator α of the current signing user in the additive cyclic group calculated in step 41 u , the signature element c of the current signing user u , the signature parameter V of the current signing user, the public and private key pair of the current signing user, and calculate the ring signature σ of the local model of the current signing user;
[0064] Step 43: Verify whether the ring signature is valid based on the signature element ci of the training participant calculated in step 41. If the verification is successful, it is determined that the current training participant is a legitimate user.
[0065] The specific operation of using the calculated precision loss value in step 5 to determine the precision of the local model of the training participating user is as follows: if the precision loss value of the local model of the training participating user is closer to 1, the precision of the local model of the training participating user is higher; if the precision loss value of the local model of the training participating user is close to 0, the precision of the local model of the training participating user is lower.
[0066] The rest of this embodiment is the same as that of the above-mentioned embodiment 1, and therefore will not be described in detail.
[0067] Example 3:
[0068] This embodiment, based on any one of the above embodiments 1-2, proposes a federated learning system that supports identity verification, including an initialization unit, a registration unit, a training unit, a signature verification unit, a precision loss unit, an incentive unit, an aggregation unit, and an output unit;
[0069] The initialization unit is used to initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain;
[0070] The registration unit is used to send the identity information and geographic location required by the training participant obtained from the training participant to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participant obtained from the trusted institution on the blockchain;
[0071] The training unit is used to update the model parameters obtained from the training participating users using the stochastic gradient descent algorithm to obtain the current model parameters of the training participating users;
[0072] The signature verification unit is used to update the local model to be signed by the current training participant obtained from the training participant using the current model parameters obtained, generate a ring signature based on the public and private key pair obtained from the trusted institution, and send the generated ring signature to the MEC server for verification. If the verification passes, it is determined that the current training participant is a legitimate user;
[0073] The precision loss unit is used to determine the legal training participant and calculate the precision loss value of the local model of the legal training participant;
[0074] The incentive unit is configured to give a response reward to three legitimate training participants whose accuracy loss values are closest to 1 according to the calculated accuracy loss value, using a set reward mechanism;
[0075] The aggregation unit is used to elect the legal training participant with the accuracy loss value closest to 1 as the temporary leader of this round, aggregate the local models of the legal training participants, and publish the latest local model to the blockchain;
[0076] The output unit is used to obtain the data point index value of the i-th legal training participating user, and obtain the optimized global model parameters by minimizing the loss function of the task.
[0077] Furthermore, an electronic device is proposed, comprising a memory for storing a computer program;
[0078] The processor is configured to implement the aforementioned federated learning method supporting identity authentication when executing the computer program.
[0079] Furthermore, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned federated learning method supporting identity authentication.
[0080] The rest of this embodiment is the same as any of the above embodiments 1-2, so it will not be repeated here.
[0081] Example 4:
[0082] This embodiment is described in detail based on any one of the above embodiments 1-3 using a specific embodiment.
[0083] Working Principle: This embodiment deploys federated learning on a blockchain. The blockchain system performs the function of a central aggregator, allowing participants with original data to join and update local model parameters. The updated global model is stored in a block. To prevent malicious users from illegally accessing the global model, the block maintains confidentiality. Furthermore, to protect the identities of training participants, provided the local model's legitimate origin is verified, a ring signature algorithm is introduced. Users who pass verification are deemed legitimate, and their local models are accepted and included in global model aggregation. Then, by calculating the accuracy loss function of the local gradients, an incentive is provided to participants who honestly upload their local models. By cleverly combining ring signatures with a decentralized blockchain structure, this approach is incorporated into the federated learning algorithm. This solves the problem of data source legitimacy during machine learning model training and ensures the identity of training participants is protected. This ensures that the proposed method can meet practical security requirements even in complex environments.
[0084] This invention involves four entities: the principal, the trusted agency (TA), the train participating user (Train Participating User), and the MEC server (Mobile Edge Computing). The roles of the anonymous identity-based federated learning system are described as follows:
[0085] Client: proposes the need to establish a federated learning model. Users who meet the requirements can apply to participate in the federated learning task.
[0086] Trusted institution: An absolutely trusted institution that generates system security parameters in the initial stage of the system and registers the identities and issues keys to users participating in federated learning training.
[0087] Training participants: As information providers and miners of the blockchain system, training participants obtain the current global model from the blockchain, train their own local models, generate ring signatures for the models, and upload them to the MEC server. Training participants who pass the signature verification can be determined to be legitimate users.
[0088] MEC server: Verifies the ring signatures generated by training participants and calculates the model accuracy loss value for the verified local model.
[0089] Blockchain: The system uses a private blockchain to permanently store the federated learning global model and conducts block consensus by electing temporary leaders.
[0090] The specific steps of the method include:
[0091] (1) Initialize: The trusted institution runs the initialization algorithm to generate system security parameters {G1, G2, q, E, e, H1, H2} and the institution key pair {x, M pk The client sends a data request, initializes a global model, and publishes it on the blockchain.
[0092] The trusted organization runs the initialization algorithm to generate system security parameters: G1 is an additive cyclic group of order q, E is a generator of G1, G2 is a multiplicative cyclic group of order q, there exists a bilinear mapping e: G1×G1→G2, and there exist hash functions H1 and H2, with H1: {0, 1} * →G1, The client uses the deep learning initialization function to generate the initial global model M0 and publishes it on the blockchain;
[0093] (2) User registration: Users participating in model training send the required identity, geographic location and other information to a trusted institution. If the uploaded information is legal, the registration is successful. The institution will return the public and private key pairs and other relevant information to the successfully registered training participants.
[0094] Trusted institutions are gathering Randomly select an x as the master key, such as when q = 9973, randomly select an x = 6666, and calculate the corresponding public key M pk =xE; Training participants will need the required identity and geographic location information ID i ∈{0, 1} * Submit to a trusted institution for registration. If the above information is legal, the registration is approved. The trusted institution will independently generate a public key for each legal user. and the corresponding private key Signing key Return to the corresponding legal user, let the set The public parameters {G1, G2, e, q, E, M pk , H1, H2, Q} are published on the blockchain;
[0095] (3) Model training: Training participants download the global model from the blockchain and use the data stored locally to complete the training of the local model.
[0096] The training participants use the stochastic gradient descent algorithm SGD to update the local model parameters and obtain the model parameters of user i in round t:
[0097]
[0098] in, is the local model parameter of user i participating in the t-th round of training, η represents the learning rate when the parameters are updated, The loss of the user who participated in the t-1 round of training after training is defined as its loss in the dataset D i The difference between the actual value and the predicted value.
[0099] (4) Authentication: The training participant updates the local model to be signed, using the signature key returned by the trusted institution. Generate a ring signature, and the MEC server verifies the generated ring signature. The training participating users who pass the verification are determined to be legitimate users.
[0100] Training participants update the local model generated in this round, obtain available signature ring members from the blockchain, and cooperate to generate a ring signature. If the signature is verified, the local model generated by them can participate in the accuracy loss calculation and global model aggregation:
[0101] a) Signature generation, let It is the local model parameter that the training participant u needs to sign. The training participant i randomly selects a random operator α in the additive cycle group G1. i , first calculate the signature element of user i Gather again Randomly select an r and calculate α according to the following formula u , user u's signature element c u and signature parameter V:
[0102]
[0103]
[0104]
[0105] in, The public key and private key of the training participant u are respectively. The training participant u calculates the local model parameters Ring signature
[0106] b) Signature verification, MEC server calculates signature elements Then verify whether the ring signature is valid by judging whether the following formula is true:
[0107]
[0108] Among them, M pk is the public key corresponding to the master key of the trusted institution. If the equation holds, the verification is successful and the training participant u is determined to be a legitimate user. Otherwise, the verification is rejected.
[0109] c) Proof of correctness: Verify that the signature of the training participant u is valid:
[0110]
[0111] because So the server calculates,
[0112]
[0113] (5) Accuracy-loss: In order to elect the temporary leader of this round and implement the incentive mechanism, the MEC server will calculate the model accuracy loss value of the legitimate users who have passed the signature verification.
[0114] The MEC server calculates the accuracy loss value of legitimate user i
[0115]
[0116] Among them, ||·|| is the Minkowski distance, which is used to measure the offset of model parameters, and χ i Indicates that from data D i The model parameters are extracted from the feature space. The closer the value is to 1, the higher the accuracy of the local model. When the value is close to 0, the opposite is true.
[0117] (6) User Incentives: Compare the top three legitimate users whose accuracy loss values are closest to 1 in this round and give them response rewards as an incentive mechanism to encourage their contributions.
[0118] The MEC server compares the three legitimate users with the highest local model accuracy based on the calculated accuracy loss value.
[0119] Give certain response rewards as encouragement.
[0120] (7) Model-aggregation: The legitimate user with the precision loss value closest to 1 is elected as the temporary leader of this round. The global model of the legitimate users is aggregated and the latest global model is published to the blockchain. The remaining legitimate users will verify the generated blocks. When 3 / 4 of the nodes agree on the block, the new block will be accepted.
[0121] When the number of local models uploaded by legitimate users reaches a certain number, the MEC server will calculate the accuracy loss value of this round.
[0122] The legitimate user with the highest local model accuracy is elected as the temporary leader to execute this round of global model aggregation process:
[0123]
[0124] in, represents the global model of round t, |D i | represents the size of the dataset of the user participating in the FL task. Legitimate users with larger datasets can get larger weights.
[0125] (8) Multiple-iterations: Training participants download the latest global model and start a new round of iterations.
[0126] u i is the index value of the data point of the i-th legal user, and let n i =|u i |, Then we have:
[0127]
[0128] in, represents the loss value of legitimate user i in round t, L t (ω) represents the total loss value of n legitimate users in round t. Finally, by minimizing the loss function L t (ω) to optimize the global model parameter ω, which can be expressed as:
[0129] ω=argminL t (ω)
[0130] The rest of this embodiment is the same as any of the above embodiments 1-3, so it will not be repeated here.
[0131] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the scope of protection of the present invention.
Claims
1. A federated learning method supporting identity verification, characterized in that: The following steps are involved: Step 1: Initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain; Step 2: Send the required identity information and geographic location of the training participants obtained from the training participants to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participants obtained from the trusted institution on the blockchain; Step 3: Use the stochastic gradient descent algorithm to update the model parameters obtained from the training participant to obtain the current model parameters of the training participant; Step 4: Based on the current model parameters obtained in step 3, the local model to be signed by the current training participant is updated. A ring signature is generated based on the public and private key pair obtained from the trusted institution. The generated ring signature is sent to the MEC server for verification. If the verification passes, the current training participant is determined to be a legitimate user. Step 5: Calculate the accuracy loss value of the local model of the legal training participant determined in step 4; Step 6: Based on the accuracy loss value calculated in step 5, the three legitimate training participants whose accuracy loss values are closest to 1 are given response rewards using the set reward mechanism; Step 7: The legitimate training participant with the accuracy loss value closest to 1 is elected as the temporary leader of this round, the local models of the legitimate training participants are aggregated, and the latest local model is published to the blockchain; Step 8: Get the index value of the data point of the legal training participant, and use the loss function of the minimization task to obtain the optimized global model parameters; The step 4 specifically includes the following steps: Step 41: Select a random operator from the additive cycle group obtained from the training participant. , calculate the signature element ci of the training participating users, in the set Z * q Select a random number r and calculate the operator of the current signing user in the additive cycle group , the signature element of the current signing user , the signature parameter V of the current signing user; Step 42: The operator of the current signing user in the additive cyclic group calculated in step 41 , the signature element of the current signing user , the signature parameter V of the current signing user, the public and private key pair of the current signing user, and calculate the ring signature of the local model of the current signing user ; Step 43: Verify whether the ring signature is valid based on the signature element ci of the training participant calculated in step 41. If the verification is successful, it is determined that the current training participant is a legitimate user.
2. A federated learning method supporting identity verification as claimed in claim 1, characterized in that: The specific operation of step 2 is: obtain the The random number x selected in the algorithm is used as the master key, and the master public key corresponding to the random number x is calculated. The identity information and geographic information required by the training participants obtained from the training participants are sent to the trusted institution for registration to generate legal training participants. Based on all legal training participants, independent public keys and private keys corresponding to the public keys are generated and returned to the corresponding training participants. The public key set is represented by set Q and published on the blockchain.
3. A federated learning method supporting identity verification as claimed in claim 2, characterized in that: The specific operation of step 3 is: training the local model of the training participant using the initial global model M0 downloaded from the blockchain by the training participant and the data stored locally, and updating the current model parameters of the training participant using the stochastic gradient descent algorithm.
4. The method for federated learning supporting identity verification according to claim 1, wherein: The specific operation of using the calculated precision loss value in step 5 to determine the precision of the local model of the training participating user is as follows: if the precision loss value of the local model of the training participating user is closer to 1, the precision of the local model of the training participating user is higher; if the precision loss value of the local model of the training participating user is close to 0, the precision of the local model of the training participating user is lower.
5. A federated learning method supporting identity verification according to any one of claims 1 to 4, characterized in that: The system security parameters include the additive cyclic group G1 of order q, the generator E of the additive cyclic group G1, the multiplicative cyclic group G2 of order q, the bilinear map , hash functions H1, H2, 、 .
6. A federated learning system supporting identity verification, configured to execute the federated learning method supporting identity verification as claimed in claim 1; characterized in that: It includes initialization unit, registration unit, training unit, signature verification unit, precision loss unit, incentive unit, aggregation unit, and output unit; The initialization unit is used to initialize the trusted institution, generate system security parameters, and publish the system security parameters and the initial global model M0 generated by the deep learning initialization function obtained from the client in the blockchain; The registration unit is used to send the identity information and geographic location required by the training participant obtained from the training participant to the trusted institution for registration, and publish the public and private key pairs of the successfully registered training participant obtained from the trusted institution on the blockchain; The training unit is used to update the model parameters obtained from the training participating users using the stochastic gradient descent algorithm to obtain the current model parameters of the training participating users; The signature verification unit is used to update the local model to be signed by the current training participant obtained from the training participant using the current model parameters obtained, generate a ring signature based on the public and private key pair obtained from the trusted institution, and send the generated ring signature to the MEC server for verification. If the verification passes, it is determined that the current training participant is a legitimate user; The precision loss unit is used to determine the legal training participant and calculate the precision loss value of the local model of the legal training participant; The incentive unit is configured to give a response reward to three legitimate training participants whose accuracy loss values are closest to 1 according to the calculated accuracy loss value, using a set reward mechanism; The aggregation unit is used to elect the legal training participant with the accuracy loss value closest to 1 as the temporary leader of this round, aggregate the local models of the legal training participants, and publish the latest local model to the blockchain; The output unit is used to obtain the data point index value of the i-th legal training participating user, and obtain the optimized global model parameters by minimizing the loss function of the task.
7. An electronic device, characterized in that: comprising a memory and a processor, wherein the memory is used to store a computer program; The processor is configured to implement the federated learning method supporting identity authentication as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the federated learning method supporting identity authentication as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Distributed Internet of Things intrusion detection method and system based on block chain and federated learning
CN113794675A
Heterogeneous parallel block chain and on-chain data and off-chain contract cooperation method thereof
CN113821564A