CN-122001575-A - Block chain-based federal learning method, system, storage medium and program product
Abstract
The embodiment of the application provides a federation learning method, a federation learning system, a storage medium and a program product based on a blockchain, and relates to the technical field of blockchains. The method comprises the steps of generating updating parameters of a trusted model based on a correctness verification algorithm of preset secret shares, extracting contribution degree indexes of all participating nodes to the trusted model according to the updating parameters, verifying authenticity, executing corresponding rewards distribution through a blockchain intelligent contract, exciting the participating nodes to iteratively optimize and train the trusted model, determining a trained target model after iteration convergence, executing attribute-based encryption on the target model, generating an encrypted ciphertext for supporting a multi-scene access strategy, uploading the encrypted ciphertext to a blockchain, performing equivalent test on a test trapdoor submitted by a data user based on the blockchain, verifying plaintext consistency corresponding to the encrypted ciphertext and the target model, and opening the target model access right after verification. The scheme of the application solves the problem that the application requirements of the differentiation in multiple fields cannot be met.
Inventors
- GAO HONGMIN
- ZHONG ZIYUAN
- WU JING
- Ye Keke
- PAN XIAOFENG
- XU MINGWEI
- HE YANG
- MENG FANYU
- CHEN YUXIN
- FAN YUXING
Assignees
- 中移动信息技术有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260211
Claims (10)
- 1. A blockchain-based federal learning method, comprising: Generating updating parameters of a trusted model based on a correctness verification algorithm of a preset secret share, wherein the trusted model is an initial model formed by verification aggregation after each participating node is trained based on data; Extracting contribution degree indexes of all the participating nodes to the trusted model according to the updating parameters, verifying authenticity, executing corresponding rewarding distribution through intelligent contracts of a blockchain, exciting the participating nodes to iteratively optimize and train the trusted model, and determining a trained target model after iteration convergence, wherein the target model is a final model of the trusted model after multiple iterations and meeting convergence conditions; Performing attribute-based encryption on the target model, generating an encrypted ciphertext for supporting a multi-scene access strategy, and uploading the encrypted ciphertext to the blockchain; and based on the blockchain, performing equivalent test on a test trapdoor submitted by a data user, verifying the consistency of the encrypted ciphertext and the plaintext corresponding to the target model, and opening the access right of the target model if the verification passes.
- 2. The method of claim 1, wherein generating the update parameters of the trusted model based on a correctness verification algorithm of the preset secret share comprises: Registering and issuing training content and task requirements of federal learning in a blockchain by using a preset task issuing party, and paying a fee as a prize pool of the federal learning training task; under the condition that the preset participating node checks the training content and the task requirement and decides to participate, determining an initial committee according to the accessed participating node; dividing a private key corresponding to the initial committee into secret shares based on a correctness verification algorithm of preset secret shares, and generating an accumulated value from the secret share set; generating a corresponding proof of verification for each of the secret shares; And taking the accumulated value and the verification evidence as update parameters of a trusted model, and uploading the update parameters to a blockchain.
- 3. The method of claim 1, wherein extracting the contribution index of each of the participating nodes to the trusted model and verifying the authenticity according to the updated parameters, performing corresponding reward distribution by intelligent contracts of a blockchain, exciting the participating nodes to iteratively optimize training the trusted model, determining a trained target model after iterative convergence, comprising: The participating node takes the updated parameters as training input of a local model, and performs local model training to generate local updated parameters; Encrypting the local updating parameters by utilizing the updating parameters, generating a first ciphertext, and uploading the first ciphertext and the time consumption of the participating node for completing the local model training to the blockchain; Extracting contribution degree indexes of all the participating nodes to the trusted model and verifying authenticity according to the first ciphertext and the time consumption, and automatically executing rewarding distribution of the participating nodes by utilizing the intelligent contract; Aggregating the first ciphertext to generate a global model updating ciphertext, and obtaining a global model updating plaintext through collaborative decryption after multi-member verification of an initial committee; And re-uploading the global model updating plaintext serving as an updating parameter of a new round of training to a blockchain, repeatedly executing the step of carrying out local model training to generate a local updating parameter by each participating node until the preset iteration times are completed, and determining a target model after the training is completed after the iteration convergence.
- 4. The method of claim 1, wherein performing attribute-based encryption on the target model, generating an encrypted ciphertext for supporting a multi-scene access policy, uploading the encrypted ciphertext to the blockchain, comprises: the method comprises the steps of executing global key initialization based on a preset attribute authority, generating a system key pair, and uploading system public parameters of an attribute-based encryption system to a blockchain, wherein the attribute authority respectively generates attribute private keys associated with respective attribute characteristics for a task issuer and a data user; and based on a predefined multi-scene access strategy, performing attribute-based encryption on the target model, generating an encrypted ciphertext, and uploading ciphertext parameters corresponding to the encrypted ciphertext to a blockchain for storage.
- 5. The method of claim 1, wherein prior to performing the equivalence test on the test trapdoor submitted by the data user based on the blockchain, the method further comprises: acquiring an attribute private key of a data user; Performing blinding treatment on the attribute private key to generate a conversion key; And receiving verification parameters generated by a preset third-party server by using the conversion key, wherein the verification parameters are generated by the third-party server by processing the conversion key, downloading a corresponding encrypted ciphertext from a preset distributed storage system under the condition that the data user meets an access strategy, and executing decryption operation on the encrypted ciphertext.
- 6. The method of claim 1, wherein performing an equivalence test on a test trapdoor submitted by a data user based on the blockchain, verifying consistency of the encrypted ciphertext with plaintext corresponding to the target model, and opening access rights of the target model if the verification passes, comprises: Downloading an encrypted ciphertext of the target model from the blockchain, and performing blinding treatment on the encrypted ciphertext to generate a test trapdoor; Acquiring verification parameters corresponding to the encrypted ciphertext; and calling the intelligent contract, verifying the consistency of the encrypted ciphertext and the plaintext corresponding to the target model according to the test trapdoor and the verification parameter, and opening the access right of the target model when verification is passed.
- 7. The method of claim 6, wherein invoking the intelligent contract verifies the plaintext consistency of the encrypted ciphertext with the plaintext corresponding to the target model based on the test trapdoor and the verification parameter, and opening the target model access rights if the verification passes, comprising: Invoking the intelligent contract, executing a consistency equivalent test corresponding to the encrypted ciphertext and the target model based on the test trapdoor and the verification parameter, and determining an equivalent test result; If the equivalent test result is a first numerical value, judging that the encrypted ciphertext is completely consistent with the plaintext, and opening the access right of the target model through the intelligent contract; if the equivalent test result is a second value, judging the encrypted ciphertext as an invalid ciphertext; The equivalent test result is stored in a preset decentralised distributed storage network, and integrity verification is triggered through the blockchain, wherein the integrity verification is successful and is used for indicating that the verification process is effective.
- 8. A blockchain-based federal learning system, comprising: The system comprises a first processing module, a second processing module and a third processing module, wherein the first processing module is used for generating updating parameters of a trusted model based on a correctness verification algorithm of a preset secret share; the second processing module is used for extracting contribution degree indexes of all the participating nodes to the trusted model according to the updating parameters, verifying authenticity, executing corresponding rewards distribution through intelligent contracts of a blockchain, exciting the participating nodes to iteratively optimize and train the trusted model, and determining a target model after iteration convergence, wherein the target model is a final model of the trusted model after multiple iterations and meeting convergence conditions; the third processing module is used for executing attribute-based encryption on the target model, generating an encrypted ciphertext for supporting a multi-scene access strategy, and uploading the encrypted ciphertext to the blockchain; and the fourth processing module is used for performing equivalent test on the test trapdoor submitted by the data user based on the blockchain, verifying the consistency of the encrypted ciphertext and the plaintext corresponding to the target model, and opening the access right of the target model if the verification passes.
- 9. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
- 10. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 7.
Description
Block chain-based federal learning method, system, storage medium and program product Technical Field The application relates to the technical field of blockchains, in particular to a federal learning method, a federal learning system, a federal learning storage medium and a federal learning program product based on blockchains. Background The existing federal learning scheme is not designed with dynamic committee election and secret share correctness proving mechanism, when partial nodes are offline or bad, decryption blocking or potential safety hazard is easily caused, and robustness and expandability are lacking. The existing federal learning system only provides a white list or coarse granularity access control of fixed role management, is difficult to flexibly allocate rights and service quality for different application scenes (such as financial wind control, medical diagnosis and intelligent manufacturing), and cannot realize differentiated authorization based on user attributes, usage scenes or data sensitivity. Meanwhile, the prior art does not fully consider the on-chain integrity verification and equivalence test of the encryption model, lacks a safe and efficient on-chain intelligent contract verification mechanism, and cannot guarantee the correctness and consistency of the model in the storage, transmission and decryption processes. Disclosure of Invention At least one embodiment of the application provides a federal learning method, a federal learning system, a storage medium and a program product based on a blockchain, which are used for solving the problems that the existing federal learning scheme is poor in scene suitability under a decentralization architecture, and poor in cooperative optimization of full-flow safety and high-efficiency availability, so that the requirements of multi-field differentiated application cannot be met. In order to solve the technical problems, the application is realized as follows: In a first aspect, an embodiment of the present application provides a blockchain-based federal learning method, including: Generating updating parameters of a trusted model based on a correctness verification algorithm of a preset secret share, wherein the trusted model is an initial model formed by verification aggregation after each participating node is trained based on data; Extracting contribution degree indexes of all the participating nodes to the trusted model according to the updating parameters, verifying authenticity, executing corresponding rewarding distribution through intelligent contracts of a blockchain, exciting the participating nodes to iteratively optimize and train the trusted model, and determining a trained target model after iteration convergence, wherein the target model is a final model of the trusted model after multiple iterations and meeting convergence conditions; Performing attribute-based encryption on the target model, generating an encrypted ciphertext for supporting a multi-scene access strategy, and uploading the encrypted ciphertext to the blockchain; and based on the blockchain, performing equivalent test on a test trapdoor submitted by a data user, verifying the consistency of the encrypted ciphertext and the plaintext corresponding to the target model, and opening the access right of the target model if the verification passes. Optionally, generating the update parameter of the trusted model based on a correctness verification algorithm of the preset secret share includes: Registering and issuing training content and task requirements of federal learning in a blockchain by using a preset task issuing party, and paying a fee as a prize pool of the federal learning training task; under the condition that the preset participating node checks the training content and the task requirement and decides to participate, determining an initial committee according to the accessed participating node; dividing a private key corresponding to the initial committee into secret shares based on a correctness verification algorithm of preset secret shares, and generating an accumulated value from the secret share set; generating a corresponding proof of verification for each of the secret shares; And taking the accumulated value and the verification evidence as update parameters of a trusted model, and uploading the update parameters to a blockchain. Optionally, extracting a contribution index of each participating node to the trusted model and verifying authenticity according to the updated parameters, executing corresponding rewards distribution through intelligent contracts of a blockchain, exciting the participating nodes to perform iterative optimization training on the trusted model, and determining a target model after the iterative convergence, wherein the target model comprises: The participating node takes the updated parameters as training input of a local model, and performs local model training to generate local updated parameters; Encrypting