A high-reliability joint model training method and system based on blockchain

Through the joint model training method of blockchain and secure multi-party computing, it solves the challenges of trust, privacy protection and efficiency in federated learning, achieves publicly auditable, privacy protection and efficient model training, ensuring model trust and limited resources. Equipment involvement.

CN117892339BActive Publication Date: 2024-08-23JINAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311830711.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2024-08-23
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

Federated learning has challenges in enhancing model trust, protecting gradient and intermediate model confidentiality, and supporting the participation of federation members with limited resources. Existing blockchain-based methods have problems such as privacy leakage, high economic costs, and unverifiable incentive mechanisms. .

Method used

Adopt a trusted federated model training method based on blockchain and secure multi-party computing to ensure public auditability, privacy protection and efficiency by generating key pairs, federation member screening protocols, joint training and settlement modules, and use smart contract evaluation Contribute and distribute bounties.

Benefits of technology

It realizes the generation of publicly auditable and privacy-protecting training records, supports robust model training process verification, ensures fair and verifiable incentives, and improves the efficiency of federated learning and the participation ability of devices with limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117892339B
    Figure CN117892339B
Patent Text Reader

Abstract

The present invention discloses a high-credibility joint model training method and system based on blockchain, wherein the method steps include: based on blockchain nodes, generating key pairs for signatures of workers and service providers respectively; based on the key pairs, performing a federation member screening protocol and forming a federation; based on the formed federation, performing high-credibility joint training on the task target model; after completing the joint training, settling the joint training task. The present invention is built based on blockchain and secure multi-party computing technology. The joint model training method designed by the present invention is publicly auditable. Compared with many existing publicly auditable joint model training methods, the present invention avoids the problems of privacy leakage caused by blockchain, high call fees caused by multiple rounds of calling smart contracts, and unverifiable incentive mechanisms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cyberspace security, and in particular to a high-reliability joint model training method and system based on blockchain. Background Art

[0002] The development of machine learning and the emergence of various models have made artificial intelligence more and more widely used in reality. Federated Learning (FL) is a distributed machine learning paradigm that can alleviate privacy issues and prevent data abuse in machine learning, in which a service provider and multiple federation members jointly train a global model without sharing training data. Specifically, in a federation, the service provider publishes the latest global model to the federation members, and the federation members perform local training to output gradients and upload them to the service provider. The service provider then aggregates the received gradients to optimize the global model. This process is repeated for multiple rounds until the preset number of rounds is reached. Since Google proposed FL in 2016, it has been used to meet various real-world needs.

[0003] Although federated learning provides many advantageous features, it faces challenges in enhancing model trust. Specifically, first, the training process of FL is vulnerable to attacks by malicious federated members and lacks public auditability. If correct model training cannot be guaranteed, customers' trust in the final model will be reduced, limiting the practical application of FL. Second, protecting the confidentiality of gradients and intermediate models involved in the training process is crucial to preventing privacy leakage, because the exposure of such information will enable anyone to reconstruct the global model, which is detrimental to all federated members. In addition, FL must also be efficient to support the participation of federated members with limited resources but large amounts of training data.

[0004] In recent years, many efforts have been made to address the above challenges in FL, which can be divided into two categories. The first category is to use cryptographic proofs generated by a central server to verify the correctness of model training. However, it is worth noting that this type of solution mainly solves the verification of the joint training process by federation members, and lacks a mechanism to detect and hold malicious federation members accountable.

[0005] The second category of solutions is to use blockchain and smart contracts to audit and verify federated learning operations. However, these blockchain-based approaches are based on specialized blockchains and need to be optimized to reduce their overhead. Specifically, their smart contract calls are linearly related to the number of training rounds, resulting in huge economic costs. In addition, the use of transparent blockchain technology raises privacy issues. In addition, the incentive mechanism they introduced lacks verifiability, which makes people question the accurate assessment of the contribution and reputation of federation members. Summary of the invention

[0006] In order to solve the technical problems in the above background, the present invention proposes a trusted joint model training method based on blockchain and secure multi-party computing. This method takes into account the considerations of public auditability, privacy protection and high efficiency, and is more suitable for model training and application needs in reality.

[0007] To achieve the above objectives, the present invention provides a high-reliability joint model training method based on blockchain, the steps comprising:

[0008] Based on the blockchain node, generate key pairs for workers and service providers to sign respectively;

[0009] Based on the key pair, a federation member screening protocol is performed to form a federation;

[0010] Based on the formed federation, high-confidence joint training of mission target models is carried out;

[0011] After the joint training is completed, the joint training task is settled.

[0012] Preferably, the method for generating the key pair includes:

[0013] Confirm whether the worker and service provider have registered the blockchain node. If not, register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk S )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

[0014] Preferably, the method for forming a federation includes:

[0015] The federation member screening protocol is executed on the service providers and workers who are willing to accept the task, and the workers are screened as federation members to form a federation; after that, the service provider generates a random number for concealing privacy and distributes it to the federation members. At the same time, the service provider publishes the federation information on the chain.

[0016] Preferably, the method for performing the joint training includes: each federation member first confirms whether it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached.

[0017] Preferably, the method for settling joint training tasks includes: having the service provider record a training record that contains a random number mask and does not leak privacy, while evaluating the contribution of each federation member to the task and uploading it to the chain together with the training record. The smart contract will distribute the bounty provided by the service provider to the federation members based on the contribution.

[0018] The present invention also provides a high-credibility joint model training system based on blockchain, which is used to implement the above method and includes: a generation module, a screening module, a training module and a settlement module;

[0019] The generation module is used to generate a key pair for signing by the worker and the service provider based on the blockchain node;

[0020] The screening module is used to perform a federation member screening protocol based on the key pair to form a federation;

[0021] The training module is used to perform high-confidence joint training on the task target model based on the formed federation;

[0022] The settlement module is used to settle the joint training task after completing the joint training.

[0023] Preferably, the workflow of the generation module includes:

[0024] Confirm whether the worker and service provider have registered the blockchain node. If not, register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk s )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

[0025] Preferably, the workflow of the screening module includes: executing a federation member screening protocol on service providers and workers willing to accept tasks, screening workers as federation members to form a federation; thereafter, the service provider generates a random number for concealing privacy and distributes it to the federation members, and at the same time, the service provider publishes the federation information on the chain.

[0026] Preferably, the workflow of the training module includes: each federation member first confirms whether it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached.

[0027] Preferably, the workflow of the settlement module includes: the service provider generates training records that are masked with random numbers and do not leak privacy, and at the same time evaluates the contribution of each federation member to the task and uploads it to the chain together with the training records. The smart contract distributes the bounty provided by the service provider to the federation members based on the contribution.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The present invention is built on the basis of blockchain and secure multi-party computing technology. The joint model training method designed by the present invention is publicly auditable. Compared with many existing publicly auditable joint model training methods, the present invention avoids the privacy leakage caused by blockchain, the high calling fees caused by multiple rounds of calling smart contracts, and the problem that the incentive mechanism cannot be verified.

[0030] 2. The present invention proposes a method for generating training records that supports public auditing and privacy protection, allowing anyone to audit and verify the correctness of the training process and bounty distribution. Compared with many existing methods for generating training correctness proofs based on cryptography, the method used in the present invention supports the generation of training records of a robust training process and allows anyone to verify the correctness of the training.

[0031] 3. Based on the existing joint model training method, the present invention uses secure multi-party computing technology to improve the federation member screening technology and designs a new privacy-preserving federation member screening protocol. Compared with the existing federation member screening technology and joint model training method, the protocol designed by the present invention takes into account both security and privacy protection, and makes the joint model training method more efficient, thereby supporting resource-limited devices to participate in training. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0033] Figure 1 A schematic diagram of the structure of a training method according to an embodiment of the present invention;

[0034] Figure 2 Schematic diagram of the training method flow in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] In view of the defects of the current mainstream methods, the present invention designs a new federated learning model training method based on the existing federated learning model training, using blockchain and secure multi-party computing technology, which can generate trustworthy high-quality models. First, it enables anyone to track the model training process without compromising privacy, hold malicious workers accountable and verify the authenticity of the training process. Secondly, the scheme of the present invention supports robust model training technology. In addition, the present invention adopts incentives to ensure fairness, privacy and verifiability. This is achieved through smart contracts, which distribute rewards based on the contributions of each member and can verify the correctness of these contributions without compromising personal privacy. In addition, combined with recent progress in federated member selection strategies, these strategies have proven their effectiveness in improving training efficiency by forming the best worker federation before training begins. In view of this, the present invention proposes a privacy-preserving member selection protocol to further improve the efficiency of this method.

[0038] Before explaining, let's first explain the relevant terms:

[0039] Service providers: Service providers, such as cloud servers and other devices with strong computing power, want to make profits by providing model inference and prediction services without leaking the model. However, due to insufficient training data, they are unable to train a model that can be used for services on their own and are willing to pay a bounty to hire other data owners to train the model.

[0040] Workers: Data owners, such as smartphones, sensors and other devices with certain data collection and processing capabilities. The data they hold is personal and private, and they are willing to participate in model training without sharing data and on the premise of being profitable.

[0041] Customer: The service purchaser, such as medical equipment, cameras and other equipment with certain data collection and processing functions, holds sample data and is willing to purchase the model inference service of the service provider to make inferences and predictions on the samples held.

[0042] Model training task: refers to a list containing parameter settings related to model training and the amount of reward, so that workers can evaluate the computing power and network conditions required to perform the task based on these parameter settings, and weigh whether to accept the task based on the reward amount.

[0043] Federation: A group consisting of at least one service provider acting as a dispatcher and multiple federation members.

[0044] Federal information: A list containing the network IP addresses, blockchain network addresses, public keys and other identity information of each party.

[0045] Technical explanation:

[0046] Utilization of blockchain: In the present invention, blockchain is used as a publicly auditable and decentralized trading platform to assist in joint model training and reasoning prediction services.

[0047] Utilization of secure multi-party computing: In the present invention, secure multi-party computing is used as a privacy-preserving and verifiable tool to prevent the leakage of training data and models of all parties during the training and audit verification process, and supports service providers to generate training records that can be used to publicly audit the correctness of training without leaking privacy; for example, first, the service provider uses the intersection of privacy sets to screen out workers who hold samples that are beneficial to model training; secondly, the service provider uses secret sharing technology to generate vectorized shares of zero-value secret sharing, and the multiplication secret sharing of the vector li·1 and distribute The gradient is masked for the federation member i, and due to the additive and multiplicative homomorphism of secret sharing, the share does not affect the correctness in the verification of the aggregation algorithm.

[0048] Embodiment 1

[0049] The following will describe in detail how the present invention is implemented in conjunction with this embodiment: Figure 1 The structure diagram of the training method of this embodiment is shown. The trusted joint model training based on blockchain and secure multi-party computing includes the initialization stage of the model training task, the preprocessing stage of the task, the execution stage of the task and the settlement stage of the task. The initialization stage and the preprocessing stage of the model training task occur before the training. In the initialization stage of the model training task, the main operations are task definition, key generation and submission of bounty to the chain; in the preprocessing stage of the task, federal member screening and random number generation are performed; the execution stage of the task occurs during the training process, and the federal members perform joint model training; the settlement stage of the task occurs after the training, when the service provider generates training records, evaluates the contribution of each federal member to the task and submits it to the chain. The smart contract will issue bounties to federal members based on their contributions to complete the model training task. The specific training process is as follows Figure 2As shown:

[0050] Step 1: Generate a key pair for workers and service providers to sign based on the blockchain node.

[0051] That is, in the initialization phase of the model training task, the worker and the service provider register the blockchain node and generate their own key pairs for signing. In particular, the service provider defines the model training task and the bounty amount and publishes them on the blockchain. The specific steps include:

[0052] First, the worker and the service provider confirm whether they have registered the blockchain node. If not, they register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk S )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

[0053] Then, the service provider defines the model training task, including: model structure, total number of training rounds R, learning rate η, total bounty amount B; and pre-trains an initial global model M 0 And use the private key sk S Generate a signature Combine the defined training tasks with M 0 , Chain together.

[0054] Finally, the smart contract will check whether the service provider’s account has a balance that satisfies the bounty amount B. If not, it will not be uploaded to the chain.

[0055] Step 2: Based on the key pair, conduct the federation member screening protocol and form a federation.

[0056] That is, in the pre-processing stage of the task, the service provider and the workers who are willing to accept the task execute the federation member screening protocol, select workers with suitable training data as federation members to form a federation, and then the service provider generates enough random numbers for privacy protection and distributes them to the federation members. At the same time, the service provider publishes the federation information on the chain. The specific steps include:

[0057] First, after a worker retrieves a model training task on the blockchain, if he chooses to accept it, he will execute a privacy-preserving federated member screening protocol with the service provider: Assume that the training data label set of worker i participating in the protocol is L i , the service provider holds the label set L of the training data required by the model S, the service provider and the worker first execute a Private Set Intersection (PSI) protocol, the service provider will first obtain L S With L i The intersection of i , and then after waiting for time T, the service provider will inform all workers who have executed the PSI protocol with it during this period of time of the set intersection result. Finally, if the intersection I i If the number of labels is greater than K, it means that the worker has enough suitable training data and can be selected as a federation member. The thresholds T and K in this process can be preset by the service provider. At the end of the protocol, the service provider will obtain a set P of all selected workers. The elements in the set are the identity information of the workers selected as federation members. i Outside of the intersection, no training-related data will be leaked.

[0058] After the privacy-preserving participant screening protocol is completed, the service provider will upload the set P to the chain and generate a random vector rv M , zv i , and With random seed i , where rv M ←PRG(len,seed S ) is used to mask the global model and will be divided into R+1 random vectors And zv i and With random seed i It will be sent to the federation member i (i.e. worker) in the set P to mask the gradients uploaded by him. The specific steps include:

[0059] zv i ←PRG(len,seed S ) as the additive secret sharing of 0 (a vector whose elements are all 0), where len represents the length of the gradient or the number of elements in the gradient; seed S represents the secret random seed used by the service provider to generate random vectors. is a short random vector that can be set arbitrarily, but it is not recommended to be too large. In this example, n=2 is set; thus, the service provider can calculate:

[0060]

[0061] That is to say The element at each position in is l i remove The corresponding element in the , so it satisfies ⊙ represents the Hadamard product, which is the element-by-element multiplication of two vectors; 1 represents a vector whose elements are all 1; l i represents a random vector about the federation member numbered i kind The product of the elements at the same position in is also The least common multiple of all elements in , and l i >0.

[0062] Finally, the service provider will send zv i , With random seed i Given to the federation members in set P to mask the gradients they upload.

[0063] Step 3: Based on the established federation, jointly train the task target model.

[0064] That is, during the task execution phase, each federation member first confirms that it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached. The specific steps include:

[0065] Federation member i first retrieves the set P and the initial global model M published by the service provider on the chain 0 , and checks to confirm that its identity information is in the set P; then it jointly trains the global model with other federation members under the scheduling of the service provider: In the rth (r>0) round of training, the service provider first publishes the global model M to all federation members in P r-1 ; Then, the service provider trains the model M locally r-1 And get the gradient Similarly, federation member i obtains the gradient And send it to the service provider; at the same time, the service provider uses the random seed seed i Will Randomly arrange into vectors of the same length as the gradient Each federation member i also uses a random seed i Will be random Arranged as vectors of equal length to the gradient That is, respectively from and Select len ​​elements from to form a random vector of the same length as the gradient and The element at the pth position is:

[0066]

[0067] in, Represents a random selection of n-dimensional vectors An element of ; s = (PRG (1, seed i )%2)*1+(PRG(1,seed i )%2-1)*1 means randomly selecting a positive or negative sign. Since the secret random seed used is the same, rv←PRG(num,seed) means inputting a secret random seed seed and the number of random numbers num, and returning a vector rv containing num random positive integers.

[0068] Then federator i computes the gradient with random vector masking:

[0069]

[0070] as well as Under the private key sk i Signature And send To the service provider, the service provider can calculate Issue and verify signature σ←Sign(sk, m) means inputting the private key sk and the message m, and returning the signature σ.

[0071] Finally, the service provider executes a robust aggregation algorithm to calculate the aggregate gradient when the signature verification of the federation member fails or the vector inner product Service Provider Order otherwise At the same time, set the set of federation members P r ,like Then the federation member i∈P r , the service provider computes the aggregate gradient And update the global model M r =M r-1 -η·ag r , where |P r | indicates P r At the same time, the service provider will package the records of the current round of training:

[0072]

[0073] in:

[0074] ;trcd r Represents the record of the rth round of training; if r<R, continue to the next round of training; if r=R, end the training and the service provider obtains the model M.

[0075] Step 4: After completing the joint training, settle the joint training task.

[0076] That is, during the settlement phase of the task, the service provider will create a training record that contains random numbers and does not leak privacy. At the same time, the contribution of each federation member to the task will be evaluated and uploaded to the chain along with the training record. The smart contract will distribute the bounty provided by the service provider to the federation members based on the contribution. At this time, customers and federation members can retrieve the training record and audit the correctness of the training process and bounty distribution. The specific steps include:

[0077] After the model training is completed, the service provider calculates the contribution of each federation member i (i∈P):

[0078]

[0079] And randomly select the ratio rt i , let rt i ·l i =rto, calculate the ratio of federation members k (k∈P):

[0080] rt k =rt i ·l i / l k ,

[0081] Among them, rto represents a random number; rt i It represents the multiple of li of rto with respect to federation member number i, or the multiple of rto and l i The ratio of i represents a random vector about the federation member numbered i and The product of the elements at the same position in is also The least common multiple of all elements in , and l i >0, i and k are the numbers of different federation members.

[0082] The service provider then packages the training record TRCD and uploads it to the chain together with the contribution of the federation members in P, where:

[0083] TRCD=(trcd 0 ,…,trcd R , M-rv M , rt k , …), k∈P,

[0084] Among them, rt k represents the l of rto with respect to the federation member numbered k i multiples of.

[0085] Smart contract transfers CS from the service provider’s accountk B’s bounty is transferred to K’s account.

[0086] Finally, customers and federation members who accept the service provider's model inference service can retrieve the training records on the chain. They can verify whether the service provider has correctly calculated the contribution and detected the wrong gradient, that is:

[0087]

[0088] Because l i >0, so if It can be explained is the error gradient and and:

[0089]

[0090]

[0091] Therefore, the contribution of federation member i can be verified. If the contribution is calculated correctly, then:

[0092]

[0093] Among them, cs i Indicates the total contribution of the federation member numbered i to the model training task; Indicates the contribution of the federation member numbered i to the round of training; Represents the contribution calculated by the federation member based on the training records; by comparing whether these two values ​​are equal, we can know whether the service provider has correctly evaluated the contribution.

[0094] At this point, the client can also verify the set P of each round of training r Included are the federation members that uploaded the correct gradients, so the masked aggregate gradients can be calculated from them:

[0095]

[0096] Using the masked aggregate gradients, the initial global model can be calculated:

[0097]

[0098] Among them, ag r is the aggregated gradient obtained by the service provider executing the aggregation algorithm in the rth round of training; It indicates that the customer has restored the initial global model locally by using the training records, and compared it with the initial global model M used for training. 0 Compare whether they are equal to verify whether the training process is correct.

[0099] Then, we can verify that before training begins, the service provider M 0 Verify the signature At this point, the audit of the joint model training process is completed.

[0100] Embodiment 2

[0101] This embodiment also provides a high-credibility joint model training system based on blockchain, including: a generation module, a screening module, a training module and a settlement module; wherein the generation module is used to generate a key pair for workers and service providers to sign based on blockchain nodes; the screening module is used to perform a federation member screening protocol based on the key pair to form a federation; the training module is used to perform high-credibility joint training on the task target model based on the formed federation; the settlement module is used to settle the joint training task after the joint training is completed.

[0102] The workflow of the generation module includes:

[0103] Confirm whether the worker and service provider have registered the blockchain node. If not, register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk S )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

[0104] The workflow of the screening module includes: executing the federation member screening protocol on service providers and workers willing to accept tasks, screening workers as federation members to form a federation; then, the service provider generates a random number for concealing privacy and distributes it to the federation members. At the same time, the service provider publishes the federation information on the chain.

[0105] The workflow of the training module includes: each federation member first confirms whether it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached.

[0106] The workflow of the settlement module includes: the service provider will generate training records that are masked with random numbers and do not leak privacy, and at the same time evaluate the contribution of each federation member to the task and upload it to the chain together with the training records. The smart contract will distribute the bounty provided by the service provider to the federation members based on the contribution.

[0107] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A high-trust joint model training method based on blockchain, characterized in that the steps include: Based on the blockchain nodes, a key pair is generated for signing by the worker and the service provider. The service provider is a service provider that attempts to make a profit by providing model inference and prediction services without leaking the model, but cannot train a model that can be used for the service alone due to insufficient training data. The service provider is willing to pay a bounty to hire other data owners to train the model. The service provider includes: cloud servers. The worker is a data owner, which is a device with data collection and processing functions, including: smartphones and sensors. The data held is personal and private, and the worker is willing to participate in model training without sharing the data and on the premise of profitability. Based on the key pair, a federation member screening protocol is performed on the service provider and the workers who are willing to accept the task, and the workers are screened as federation members to form a federation; the steps include: in the preprocessing stage of the task, the service provider and the workers who are willing to accept the task perform a federation member screening protocol, select workers with suitable training data as federation members to form a federation, then the service provider generates enough random numbers for concealing privacy and distributes them to the federation members, and at the same time, the service provider publishes the federation information on the chain; first, after the worker retrieves the model training task on the blockchain, if he chooses to accept it, he will perform a privacy-preserving federation member screening protocol with the service provider: Assume that the training data label set of the worker i participating in the protocol is L i , the service provider holds the label set L of the training data required by the model S , the service provider and the worker first execute a PSI agreement, the service provider will first obtain L S With L i The intersection of i , and then after waiting for time T, the service provider will inform all workers who have executed the PSI protocol with it during this period of time of the set intersection result. Finally, if the intersection I i If the number of labels is greater than K, it means that the worker has enough suitable training data and can be selected as a federation member. The thresholds T and K in this process are preset by the service provider. At the end of the protocol, the service provider will obtain a set P of all selected workers. The elements in the set are the identity information of the workers selected as federation members. After the privacy-preserving participant screening protocol is completed, the service provider will upload the set P to the chain and generate a random vector rv M , zv i , and With random seed i , where rv M ←PRG(len,seed S ) is used to mask the global model and will be divided into R+1 random vectors And zv i and With random seed i It will be sent to federation member i in set P to cover the gradient uploaded by him. The specific steps include: zv i ←PRG(len,seed S ) as the zero-additive secret sharing, where len represents the length of the gradient or the number of elements in the gradient; seed S represents the secret random seed used by the service provider to generate the random vector; and is a short random vector, n=2; the service provider will calculate: That is to say The element at each position in is l i remove The elements in the corresponding position in , so it satisfies ⊙ represents the Hadamard product, which is the element-by-element multiplication of two vectors; 1 represents a vector whose elements are all 1; l i represents a random vector about the federation member numbered i and The product of the elements at the same position in is also The least common multiple of all elements in , and l i >0; Finally, the service provider will send zv i , With random seed i To the federated members in set P to cover the gradients uploaded by them; Based on the formed federation, the task target model is jointly trained with high credibility; the method of the joint training includes: each federation member first confirms whether it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached; the steps of training include: Federated member i first retrieves the set P and the initial global model M0 published on the chain by the service provider, and checks to confirm that its identity information is in the set P; then it jointly trains the global model with other federated members under the scheduling of the service provider: In the rth (r>0) round of training, the service provider first publishes the global model M0 to all federated members in P. r-1 ; Then, the service provider trains the model M locally r-1 And get the gradient Similarly, federation member i obtains the gradient And send it to the service provider; at the same time, the service provider uses the random seed seed i Will Randomly arrange into vectors of the same length as the gradient Each federation member i also uses a random seed i Will be random Arranged as vectors of equal length to the gradient That is, respectively from and Select len ​​elements from to form a random vector of the same length as the gradient and The element at the pth position is: in, Represents a random selection of n-dimensional vectors An element of ; s = (PRG (1, seed i )%2)*1+(PRG(1,seed i )%2-1)*1 means randomly selecting a positive or negative sign. Since the secret random seed used is the same, rv←PRG(nmm,seed) means inputting the secret random seed seed and the number of random numbers num, and returning a vector rv containing num random positive integers; Then federator i computes the gradient with random vector masking: as well as Under the private key sk i Signature And send To the service provider, the service provider can calculate Issue and verify signature σ←Sign(sk, m) means inputting private key sk and message m, and returning signature σ; Finally, the service provider executes a robust aggregation algorithm to calculate the aggregate gradient when the signature verification of the federation member fails or the vector inner product Service Provider Order otherwise At the same time, set the set of federation members P r ,like Then the federation member i∈P r , the service provider computes the aggregate gradient And update the global model M r =M r-1 -η·ag r , where |P r | indicates P r At the same time, the service provider will package the records of the current round of training: in: i ∈ P, j ∈ P r ; trcd r represents the record of the r-th round of training; if r < R, continue with the next round of training, and if r = R, end the training and the service provider obtains the model M; After completing the joint training, the joint training task is settled; the method for settling the joint training task includes: the service provider generates a training record that contains a random number mask and does not disclose privacy, and at the same time evaluates the contribution of each federation member to the task and uploads it to the chain together with the training record. The smart contract will distribute the bounty provided by the service provider to the federation members based on the contribution.

2. The high-trust joint model training method based on blockchain according to claim 1 is characterized in that: The method for generating the key pair includes: Confirm whether the worker and service provider have registered the blockchain node. If not, register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk S )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

3. The high-trust joint model training method based on blockchain according to claim 1 is characterized in that: After the federation is formed, the service provider generates random numbers for privacy protection and distributes them to the federation members. At the same time, the service provider publishes the federation information on the chain.

4. A high-trust joint model training system based on blockchain, the system is used to implement the method described in any one of claims 1-3, characterized in that: include: Generation module, screening module, training module and settlement module; The generation module is used to generate a key pair for signing by the worker and the service provider based on the blockchain node; The screening module is used to perform a federation member screening protocol based on the key pair to form a federation; The training module is used to perform high-confidence joint training on the task target model based on the formed federation; The settlement module is used to settle the joint training task after the joint training is completed.

5. The high-trust joint model training system based on blockchain according to claim 4 is characterized in that: The workflow of the generation module includes: Confirm whether the worker and service provider have registered the blockchain node. If not, register. The worker numbered i generates a public-private key pair (pk i ,sk i )←KeyGen(sp), the service provider generates a public-private key pair (pk S ,sk S )←KeyGen(sp), each publishes the public key in the blockchain network; where (pk, sk)←KeyGen(sp) represents the input of security parameter sp and the output of a pair of public and private keys.

6. The high-trust joint model training system based on blockchain according to claim 4 is characterized in that: The workflow of the screening module includes: executing the federation member screening protocol on the service provider and the workers willing to accept the task, screening the workers as federation members to form a federation; after that, the service provider generates a random number for concealing privacy and distributes it to the federation members, and at the same time, the service provider publishes the federation information on the chain.

7. The high-trust joint model training system based on blockchain according to claim 6 is characterized in that: The workflow of the training module includes: each federation member first confirms whether it is in the federation based on the published federation information, and then conducts multiple rounds of joint model training on the initial global model until the number of training rounds specified in the model training task is reached.

8. The blockchain-based high-trust joint model training system according to claim 4, characterized in that: The workflow of the settlement module includes: the service provider generates training records that are masked with random numbers and do not leak privacy, and at the same time evaluates the contribution of each federation member to the task and uploads it to the chain together with the training records. The smart contract distributes the bounty provided by the service provider to the federation members based on the contribution.