Blockchain-based distributed training method, apparatus, device, and medium
By using blockchain to store identity information and perform two-way verification in distributed training, the security threats of distributed training nodes are resolved, enabling efficient and secure model training and aggregation.
Patent Information
- Application Number
- CN202511127523.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-08-12
AI Technical Summary
The diversification of distributed training nodes poses a security threat to model training. Malicious nodes may disrupt the model aggregation process and affect the quality of parameter convergence.
Blockchain technology is used to store the digital identity information of aggregation nodes and training nodes, and two-way authentication is used to ensure the security of target training nodes. Multi-party secure computation and federated averaging algorithms are used to aggregate model parameters.
This improves the efficiency and security of model training, ensures the quality of the target model, and prevents malicious nodes from disrupting model parameter aggregation.
Smart Images

Figure CN120811917B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to joint training techniques, and in particular to a blockchain-based distributed training method, apparatus, device, and medium. Background Technology
[0002] With the exponential growth of parameters in large AI models (e.g., trillions of parameters) and the surge in training datasets, distributed training technology has become a core solution supporting large model training. This technology significantly improves training efficiency by breaking down computational tasks into heterogeneous node clusters for collaborative execution. Currently, distributed training nodes exhibit diverse characteristics, no longer limited to centralized computing power devices in intelligent computing centers (such as GPU / TPU clusters), but also incorporating distributed computing resources from edge-side intelligent terminals (such as mobile devices), forming a comprehensive computing power collaboration system. However, the diversity and complexity of training entities pose a significant threat to model training security; malicious nodes may disrupt the model aggregation process, affecting the overall parameter convergence quality. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this disclosure provide a blockchain-based distributed training method, apparatus, device, and medium.
[0004] One aspect of this disclosure provides a blockchain-based distributed training method applied to a blockchain network, the blockchain network including an aggregation node and multiple training nodes. The method includes: the aggregation node determining multiple training tasks and multiple candidate nodes based on a model to be trained and a training dataset; for each candidate node, the aggregation node and the candidate node performing two-way authentication based on the digital identity information of the aggregation node and the digital identity information of the candidate node stored in the blockchain; in response to the two-way authentication between the candidate node and the aggregation node, determining the candidate node as a target training node; the aggregation node assigning training tasks to each target training node; each target training node performing model training based on the corresponding training task to obtain training results corresponding to each target training node, the training results including model parameters from each round of iterative training; and the aggregation node aggregating the model parameters in each training result to obtain a target model.
[0005] Another aspect of this disclosure provides a blockchain-based distributed training device applied to a blockchain network, the blockchain network including an aggregation node and multiple training nodes. The device includes: a task generation module, used by the aggregation node to determine multiple training tasks based on a model to be trained and a training dataset, and to determine multiple candidate nodes; an authentication module, used for two-way authentication between the aggregation node and the candidate node based on digital identity information of the aggregation node and the candidate node stored in the blockchain; a node determination module, used to determine the candidate node as a target training node in response to the two-way authentication between the candidate node and the aggregation node; a task allocation module, used by the aggregation node to allocate training tasks to each target training node; a joint training module, used by each target training node to train a model based on the corresponding training task, obtaining training results corresponding to each target training node, the training results including model parameters from each round of iterative training; and an aggregation module, used by the aggregation node to aggregate the model parameters in each training result to obtain a target model.
[0006] In another aspect of this disclosure, an electronic device is provided, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the method described above.
[0007] In another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0008] In this embodiment, the aggregation node splits the task of training the model into multiple training tasks, which are then jointly trained by multiple target training nodes, thereby improving the training efficiency of the model. Furthermore, this embodiment uses blockchain technology to store the digital identity information of the aggregation node and multiple training nodes, ensuring the reliability of data identity. Simultaneously, during each training task execution, two-way identity verification is performed between the aggregation node and the candidate nodes participating in the training task, ensuring the security and reliability of the target training nodes participating in model training. This prevents malicious nodes from disrupting model parameter aggregation and improves the quality of the obtained target model.
[0009] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0010] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0011] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0012] Figure 1 A flowchart illustrating the blockchain-based distributed training method in an embodiment of this disclosure is shown.
[0013] Figure 2 A flowchart illustrating step S110 in an embodiment of this disclosure is shown;
[0014] Figure 3 A flowchart illustrating step S140 in an embodiment of this disclosure is shown;
[0015] Figure 4 A schematic diagram of a blockchain network in an embodiment of this disclosure is shown;
[0016] Figure 5 A schematic diagram of the distributed training architecture in an embodiment of this disclosure is shown;
[0017] Figure 6 A schematic diagram illustrating the digital identity authentication process in an embodiment of this disclosure is shown;
[0018] Figure 7 This is a schematic diagram of the structure of a blockchain-based distributed training device provided in an exemplary embodiment of this disclosure;
[0019] Figure 8 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed herein. Detailed Implementation
[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0021] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0022] It should also be understood that in the embodiments disclosed herein, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.
[0023] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.
[0024] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.
[0025] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0026] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0027] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0028] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0029] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0030] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0031] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0032] In a narrow sense, blockchain technology can be defined as a chain-like data structure that combines data blocks sequentially in chronological order, creating a distributed ledger that is cryptographically guaranteed to be immutable and unforgeable. In a broader sense, blockchain technology can utilize a chain-like data structure to verify and store data, node consensus algorithms to generate and update data, cryptographic methods to ensure the security of data transmission and access, and smart contracts composed of automated script code. A node in a blockchain network typically refers to a computer connected to the blockchain network; that is, any computer connected to the blockchain network (including mobile phones, servers, etc.) is called a node.
[0033] Figure 1 This diagram illustrates a flowchart of a blockchain-based distributed training method according to an embodiment of this disclosure. This embodiment can be applied to blockchain networks, such as... Figure 1 As shown, the blockchain-based distributed training method in this embodiment includes the following steps:
[0034] In step S100, the aggregation node determines multiple training tasks and multiple candidate nodes based on the model to be trained and the training dataset.
[0035] The blockchain network comprises an aggregation node and multiple training nodes. Communication connections exist between the aggregation node and the multiple training nodes. The model to be trained can be a deep learning model, such as a Generative Pre-trained Transformer (GPT). The training dataset can include multiple training data sets. These training data can be, for example, audio data, image data, or text data with annotation information.
[0036] In one implementation, a training task may include a portion of the training data in the training dataset. The training task may also include a portion of the initial model parameters of the model to be trained and / or a portion of the model to be trained. In one example, the training dataset can be split to obtain multiple training tasks, each including a portion of the training data in the training dataset. In another example, differential privacy techniques can be used to add noise to the initial model parameters of the model to be trained. For example, Laplacian noise, Gaussian noise, etc., can be added to the initial model parameters. The noisy initial model parameters and the training dataset can then be split to obtain multiple training tasks, each including a portion of the noisy initial model parameters and a portion of the training data in the training dataset. In yet another example, the noisy initial model parameters, the training dataset, and the model to be trained can be split to obtain multiple training tasks, each including a portion of the noisy initial model parameters, a portion of the training data in the training dataset, and a portion of the model to be trained. When splitting the model to be trained, it can be split according to functional layers, for example, the model to be trained can be split into attention layers (partial model to be trained), convolutional layers (partial model to be trained), etc.
[0037] Aggregator nodes can assign a task identifier (ID) to each training task. They can then encrypt each training task using the private key from their first-node key pair and store the encrypted tasks in the InterPlanetary File System (IPFS). The task identifier, hash values of each training task, hash values of the model to be trained, hash values of the training data, and the storage addresses of each training task in IPFS can be stored in the blockchain via a pre-defined smart contract. The first-node key pair can include a public key and a private key. The public key is used to verify signatures generated by the private key, decrypt files encrypted with the private key, and encrypt data; the private key is used to decrypt files encrypted with the public key, and encrypt and sign data. The first-node key pair can be generated using, for example, the SM2 national cryptographic algorithm, symmetric encryption algorithms, asymmetric encryption algorithms, or the Ed25519 algorithm.
[0038] In one implementation, multiple candidate nodes can be selected from multiple training nodes based on the computing power and / or communication capabilities of the training nodes, with the number of candidate nodes matching the number of training tasks.
[0039] Step S110: For each candidate node, the aggregation node and the candidate node perform two-way identity verification based on the digital identity information of the aggregation node and the digital identity information of the candidate node stored in the blockchain.
[0040] Two-way authentication can be understood as the aggregation node verifying the digital identity of the candidate node, and the candidate node verifying the digital identity of the aggregation node. The digital identity can, for example, be a distributed digital identity (DID).
[0041] The digital identity information of an aggregation node may include its verifiable credential (VC) and DID identifier, while the digital identity information of a candidate node may include its verifiable credential. For example, the digital identity information of an aggregation node may include: its node identifier (DID), its address, and its computing power. Similarly, the digital identity information of a candidate node may include: its node identifier (DID), its address, and its computing power.
[0042] For example, the candidate node transmits its data identity information to the aggregator node, and the aggregator node sends its digital identity information to the candidate node. On the aggregator node, the hash value of the candidate node's digital identity information is obtained from the blockchain, and the hash value of the received candidate node's digital identity information is calculated. The hash value obtained from the blockchain is compared with the calculated hash value. If they match, the candidate node is determined to be authenticated; otherwise, the candidate node is determined to be unauthenticated. Similarly, on the candidate node, the hash value of the aggregator node's digital identity information is obtained from the blockchain, and the hash value of the received aggregator node's digital identity information is calculated. The hash value obtained from the blockchain is compared with the calculated hash value. If they match, the aggregator node is determined to be authenticated; otherwise, the aggregator node is determined to be unauthenticated. When both the aggregator node's and the candidate node's identities are verified, it is determined that the candidate node and the aggregator node have achieved two-way authentication. When the aggregator node's identity fails verification and / or the candidate node's identity fails verification, it is determined that the candidate node and the aggregator node have not achieved two-way authentication.
[0043] Step S120: In response to the candidate node and the aggregation node passing two-way authentication, the candidate node is determined as the target training node.
[0044] The number of target training nodes determined by the aggregation node is the same as the number of training tasks.
[0045] In one implementation, if the candidate node and the aggregation node fail to pass two-way authentication, the candidate node is discarded, and a new candidate node can be selected from multiple training nodes, and then two-way authentication can be performed with the aggregation node.
[0046] In step S130, the aggregation node assigns training tasks to each target training node.
[0047] In this process, the aggregation node can assign a training task to each target training node. For example, the aggregation node can use a consistent hashing algorithm to assign a training task to each target training node.
[0048] In one implementation, the aggregator node sends the storage address of the training task assigned to each target training node in IPFS to that target training node. Each target training node can download its corresponding training task from IPFS and obtain the public key from the first node key pair of the aggregator node in the blockchain, and use the public key to decrypt the training task.
[0049] In step S140, each target training node performs model training based on the corresponding training task to obtain the training results corresponding to each target training node.
[0050] The training results include the model parameters from each round of iterative training.
[0051] In one implementation, each target training node also generates training process information. This information may include: training data volume, training duration, gradient update amount, gradient validity coefficients, node signature, and timestamp. The node signature is obtained by signing preset information using the private key from the target training node's second node key pair. The training process information can be encrypted using Advanced Encryption Standard Galois / CounterMode (AES-GCM) to obtain an encrypted log of the target training node, which is then written to the blockchain. The second node key pair may include a public key and a private key. The public key is used to verify the signature generated by the private key, decrypt files encrypted with the private key, and encrypt data; the private key is used to decrypt files encrypted with the public key, and encrypt and sign data. The second node key pair may be generated using, for example, the SM2 national cryptographic algorithm, a symmetric encryption algorithm, an asymmetric encryption algorithm, or the Ed25519 algorithm.
[0052] The gradient effectiveness coefficient is a concept in optimization algorithm theory (especially the conjugate gradient method and its variants). It measures the quality of the search direction chosen by the algorithm at the current iteration point relative to the steepest descent direction (the negative gradient direction). The gradient effectiveness coefficient can be: It is defined as the search direction of the current iteration point k. With the negative gradient direction (in Is the objective function in The square of the cosine of the angle between the gradients at that point. This represents the gradient effectiveness coefficient.
[0053] Step S150: The aggregation node aggregates the model parameters in each training result to obtain the target model.
[0054] Each aggregation node can obtain the training results of each target training node. Then, based on the model parameters of each round of iterative training in each training result, the model parameters are aggregated using Secure Multi-Party Computation (MPC) and Federated Averaging Algorithm (FedAvg) to obtain global model parameters. The global model parameters are then deployed to the model to be trained to obtain the target model. The hash value of the target model can be written to the blockchain for notarization.
[0055] In this embodiment, the aggregation node splits the task of training the model into multiple training tasks, which are then jointly trained by multiple target training nodes, thereby improving the training efficiency of the model. Furthermore, this embodiment uses blockchain technology to store the digital identity information of the aggregation node and multiple training nodes, ensuring the reliability of data identity. Simultaneously, during each training task execution, two-way identity verification is performed between the aggregation node and the candidate nodes participating in the training task, ensuring the security and reliability of the target training nodes participating in model training. This prevents malicious nodes from disrupting model parameter aggregation and improves the quality of the obtained target model.
[0056] In some alternative implementations, in this embodiment of the disclosure, step S100 may include: the aggregation node filters a number of candidate nodes for training tasks from multiple training nodes based on the performance information and blacklist of each training node.
[0057] The performance information for each training node may include: historical training completion evaluation information, computing power information, and communication capability information. The blacklist includes the node identifier of at least one training node. The historical training completion evaluation information of the training node may include the score for completing the training task. The computing power information may include the computing power score. The communication capability information includes the communication score. Each training node has a node identifier. The node identifiers in the blacklist can be determined based on historical training completion evaluation information, computing power information, and communication capability information. For example, the node identifiers of training nodes whose historical training completion evaluation information, computing power information, and communication capability information do not meet the requirements can be recorded in the blacklist. The node identifiers of malicious training nodes can also be stored in the blacklist.
[0058] In one implementation, performance information may include a performance score. The higher the computing power, historical training completion evaluation, and communication capabilities of a training node, the higher its performance score; that is, a higher performance score indicates that the training node performs better and can complete the training task more effectively.
[0059] For example, training nodes in the blacklist can be excluded from multiple training nodes, and then the remaining training nodes can be sorted according to performance information. The top n training nodes in the sorted list can be selected as candidate nodes, where n is the number of training tasks.
[0060] Figure 2 A flowchart illustrating step S110 in an embodiment of this disclosure is shown. In some alternative embodiments, such as Figure 2 As shown, step S110 of this embodiment includes the following steps:
[0061] In step S111, the aggregation node obtains the temporary call key and assigns the first temporary key pair and the second temporary key pair from the temporary call key to the aggregation node and the candidate node, respectively.
[0062] The aggregation node can generate temporary keys using temporary session key generation algorithms such as the Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES) algorithm. The temporary keys can include: a first temporary key pair and a second temporary key pair. The first temporary key pair can include a public key and a private key; the private key is used to encrypt data, and the public key is used to decrypt data encrypted with the private key. The second temporary key pair can also include a public key and a private key; the private key is used to encrypt data, and the public key is used to decrypt data encrypted with the private key.
[0063] The aggregator node assigns a first temporary key pair to the aggregator node and a second temporary key pair to the candidate node; the aggregator node can store the public key in the first temporary key pair and the public key in the second temporary key pair into the blockchain.
[0064] In step S112, the aggregation node uses the public key in the second temporary key pair to decrypt the second encrypted verification information to obtain the verification information of the candidate node, and performs identity verification on the candidate node based on the verification information of the candidate node.
[0065] The second encrypted verification information is obtained by the candidate node encrypting its verification information using the private key in the second temporary key pair.
[0066] In one implementation, the candidate node can generate its own verification information, then encrypt the verification information using the private key in the second key pair to obtain second encrypted verification information. The candidate node then sends the second encrypted verification information to the aggregation node. The aggregation node receives the second encrypted verification information and can then obtain the public key in the second temporary key pair from the blockchain. The aggregation node uses the public key in the second temporary key pair to decrypt the second encrypted verification information to obtain the candidate node's verification information.
[0067] In step S113, the candidate node uses the public key in the first temporary key pair to decrypt the first encrypted verification information to obtain the verification information of the aggregation node, and performs identity verification on the aggregation node based on the verification information of the aggregation node.
[0068] The first encrypted verification information is obtained by the aggregation node encrypting the verification information of the aggregation node using the private key in the first temporary key pair.
[0069] In one implementation, the aggregating node can generate its own verification information, then encrypt the verification information using the private key in the first key pair to obtain first encrypted verification information. The aggregating node then sends the first encrypted verification information to the candidate node. The candidate node receives the first encrypted verification information and can then obtain the public key in the first temporary key pair from the blockchain. The candidate node uses the public key in the first temporary key pair to decrypt the first encrypted verification information to obtain the aggregating node's verification information.
[0070] Step S114: In response to the fact that both the candidate node and the aggregation node have passed authentication, determine that the candidate node and the aggregation node have passed two-way authentication.
[0071] In one implementation, when the candidate node fails authentication and / or the aggregate node fails authentication, it is determined that the candidate node and the aggregate node have failed two-way authentication.
[0072] In some optional implementations, in this embodiment of the disclosure, authenticating the candidate node based on the verification information of the candidate node may include: verifying the digital identity information and signature information of the candidate node, and determining that the candidate node has passed authentication when both the digital identity information and signature information of the candidate node have passed verification.
[0073] The verification information of the candidate node includes: random information, as well as the candidate node's digital identity information, signature information and node identifier. The signature information of the candidate node is obtained by signing the private key in the candidate node's second node key pair.
[0074] Accordingly, in this embodiment of the disclosure, verifying the identity of the aggregation node based on the verification information of the aggregation node may include: verifying the digital identity information and signature information of the aggregation node, and determining that the aggregation node has passed the identity verification when both the digital identity information and signature information of the aggregation node have passed the verification.
[0075] The verification information of the aggregation node may include: random information, as well as the aggregation node's digital identity information, signature information and node identifier. The signature information of the aggregation node is obtained by signing the private key in the first node key pair of the aggregation node.
[0076] In one implementation, the digital identity information of the candidate node can be the verifiable credentials of the candidate node, and the node identifier of the candidate node can be a DID identifier; the digital identity information of the aggregation node can be the verifiable credentials of the aggregation node, and the node identifier of the aggregation node can be a DID identifier.
[0077] At the aggregation node: a random number (random information) is generated, and the preset information is signed using the private key in the first node key pair to obtain the signature information of the aggregation node. The verification information of the aggregation node is composed of the random number, the node identifier of the aggregation node, and the signature information. Then, the verification information of the aggregation node is encrypted using the private key in the first temporary key pair to obtain the first encrypted verification information. The first encrypted verification information is then transmitted to the candidate node.
[0078] At the candidate node: It receives the first encrypted verification information, retrieves the public key from the first temporary key pair in the blockchain, decrypts the first encrypted verification information using the public key, obtains the verification information of the aggregation node, retrieves the hash value of the public key from the first node key pair and the verifiable credential (digital identity information) of the aggregation node from the blockchain based on the node identifier of the aggregation node, performs signature verification on the signature information of the aggregation node using the public key from the first node key pair, calculates the hash value of the received digital identity information of the aggregation node, and compares the hash value obtained from the blockchain with the calculated hash value. If they match, the digital identity information is verified; otherwise, the digital identity information fails verification.
[0079] When both the signature information and the digital identity information pass signature verification, it is determined that the aggregation node's digital identity information and signature information have both passed verification, thus confirming the aggregation node's identity. Then, the private key from the second node key pair is used to sign the preset information, obtaining the candidate node's signature information. The candidate node's verification information is composed of a random number, the candidate node's node identifier, and the signature information. This verification information is then encrypted using the private key from the second temporary key pair, yielding second encrypted verification information, which is transmitted to the aggregation node. Conversely, if the signature information fails signature verification and / or the digital identity information fails verification, it is determined that the aggregation node's digital identity information and signature information have both failed verification, thus confirming the aggregation node's identity.
[0080] At the aggregation node: It receives the second encrypted verification information, retrieves the public key from the second temporary key pair in the blockchain, decrypts the second encrypted verification information using the public key from the second temporary key pair to obtain the verification information of the candidate node, retrieves the hash value of the public key from the second node key pair and the verifiable credential (digital identity information) of the aggregation node from the blockchain based on the node identifier of the candidate node, performs signature verification on the signature information of the aggregation node using the public key from the second node key pair, calculates the hash value of the received digital identity information of the candidate node, and compares whether the hash value obtained from the blockchain and the calculated hash value are consistent. If they are consistent, the digital identity information is determined to be verified. If both the signature information and the digital identity information are verified, the candidate node's digital identity information and signature information are both verified, and the candidate node is determined to be authenticated. If the signature information fails signature verification and / or the digital identity information fails verification, the candidate node's digital identity information and signature information fail verification, and the aggregation node is determined to be unauthenticated.
[0081] In some optional implementations, in this embodiment of the disclosure, after the candidate node and the aggregation node pass two-way authentication, the process may further include: each target training node sending a network trust certificate to the aggregation node; the aggregation node verifying the network trust certificates of each target training node; and upon successful verification of the network trust certificates of each target training node, each target training node initiating model training based on the corresponding training task.
[0082] Among them, network trust proof is used to prove the trustworthiness of the network environment of the target training node. Network trust proof can, for example, use Trusted Execution Environment (TEE) remote proof, which can use Intel SGXEnclave reports.
[0083] In one implementation, each target training node can pre-store the hash value of the network trusted proof in the blockchain. The aggregation node can obtain the hash value of the network trusted proof of the target training node from the blockchain and compare the hash value of the network trusted proof obtained from the blockchain with the hash value of the received network trusted proof. If they match, the network trusted proof is determined to have passed verification; otherwise, the network trusted proof is determined to have failed verification.
[0084] Figure 3 A flowchart illustrating step S140 in an embodiment of this disclosure is shown. In some alternative embodiments, such as Figure 3 As shown, step S140 of this embodiment includes the following steps:
[0085] Step S141: For each target training node, the target training node performs model training based on the training task corresponding to the target training node to obtain training results and training process information.
[0086] Each target training node obtains its corresponding training task from IPFS, then retrieves the public key from the first node key pair in the blockchain, and uses the public key to decrypt the training task.
[0087] Step S142: Generate verification information and signature training results for the training results, store the verification information and training process information in the blockchain, and send the training results and signature training results to the aggregation node.
[0088] Specifically, the target training node calculates the hash value of the training result and uses the hash value as the verification information of the training result. It then signs the training result using the private key in the second node key pair of the target training node to obtain a signed training result. The target training node sends the training result and the signed training result to the aggregation node and writes the verification information of the training result into the blockchain for storage.
[0089] In some optional implementations, step S150 in this embodiment of the present disclosure may include: performing anti-tamper verification on the training result based on the verification information of the training result in the blockchain, and performing signature verification on the signed training result; in response to each training result passing the anti-tamper verification and each signed training result passing the signature verification, the aggregation section aggregates each model parameter.
[0090] In one implementation, for each training result, the aggregation node can obtain the verification information of the target training node's training result and the public key from the second node key pair from the blockchain based on the node identifier of the target training node corresponding to that training node. The verification information of the training result may include the hash value of the training result. The aggregation node compares the received hash value of the training result with the verification information of the training result (anti-tamper verification). If they match, the training result is determined to have passed the anti-tamper verification; if they do not match, the training result is determined to have failed the anti-tamper verification. The public key from the second node key pair is then used to verify the signature of the training result.
[0091] In some alternative implementations, step S150 in this embodiment may further include: determining whether there is a sudden increase in loss or whether the model parameters have converged based on the model parameters of each iteration; and in response to the existence of a sudden increase in loss or the model parameters not converging, retraining the untrained model by the aggregation node and multiple training nodes.
[0092] In one implementation, the aggregation node calculates the rate of change of the global loss function based on the model parameters from each training iteration, as included in the training results. If the rate of change is lower than a preset threshold (e.g., 0.001%) for three consecutive iterations, the model parameters are considered converged; otherwise, if there are no three consecutive iterations with a rate of change lower than the preset threshold, the model parameters are considered not converged. A sudden increase in loss refers to the phenomenon where, during distributed training, the loss function value of the global model (the model to be trained) suddenly and significantly increases after a certain round of communication aggregation (e.g., from a steadily decreasing 0.5 to 5.0 or higher).
[0093] If the model parameters fail to converge or there is a sudden increase in loss, steps S100-S150 are re-executed. When retraining the model to be trained, the aggregation node can restart training based on the latest parameters, and the smart contract prioritizes assigning tasks to nodes with high contribution. When there is a sudden increase in loss, historical parameter snapshot data (training process information) of each target training node can be loaded from the blockchain, and low-credit nodes can be excluded before retraining.
[0094] In some alternative implementations, in the disclosed embodiments, the training process information includes: the amount of training data, the training duration, and the gradient effectiveness coefficient.
[0095] Accordingly, in the disclosed embodiments, after step S150, the method may further include: for each target training node, determining the contribution value of the target training node based on the amount of training data, training duration, and gradient effectiveness coefficient.
[0096] In one implementation, the aggregation node can obtain the training process information of each target training node from the blockchain. For each target training node, the data volume, training duration, and gradient effectiveness coefficient are obtained from the training process information of that target training node, and then the contribution value of that target training node is calculated using formula (1).
[0097] Contribution value = Training data volume × Training duration × Gradient effectiveness coefficient Formula (1)
[0098] Aggregator nodes can write the contribution values of each target training node into the blockchain for notarization, and can also determine the rewards for each target training node based on the contribution values of each target training node and the correspondence between contribution values and rewards in the contribution distribution scheme.
[0099] In some alternative implementations, the blockchain network in this disclosure further includes: model building nodes and data providing nodes. Model building nodes are used to build the model to be trained, and data providing nodes are used to provide the training dataset. A communication connection exists between the model building nodes and the data providing nodes.
[0100] Correspondingly, the model building node creates the model to be trained and sends the model to be trained and the training dataset obtained from the data providing node to the aggregation node.
[0101] For example, Figure 4 A schematic diagram of a blockchain network in an embodiment of this disclosure is shown. Figure 5 A schematic diagram of the distributed training architecture in an embodiment of this disclosure is shown. Figure 6 A schematic diagram of the digital identity authentication process in an embodiment of this disclosure is shown.
[0102] like Figures 4-6 As shown, a blockchain network may include: data provider nodes, model building nodes, aggregation nodes, and multiple training nodes. The model building nodes communicate with both the data provider nodes and the aggregation nodes, while the aggregation nodes also communicate with and connect to multiple training nodes.
[0103] When all participants in the joint training of the model to be trained (data provider nodes, model building nodes, aggregation nodes, and multiple training nodes) first connect to the blockchain network, each participant registers its identity with the certificate authority. Specifically, the certificate authority generates a unique DID (node identifier) for each participant based on the W3C (World Wide Web Consortium) standard, and generates a public-private key pair for the node using the Ed25519 algorithm. This pair consists of the first public-private key pair for the aggregation node and the second public-private key pair for the training node, generating verifiable credentials (digital identity information) for the participant. Each participant encrypts and stores the private key from the node key pair in its own digital wallet, constructing a self-managed identity (SSI). Participants then perform DID self-registration: each participant binds its DID identifier to the public key from its node public-private key pair and writes it into a DID document. The hash value of the DID document is then written into the blockchain. The DID document may also include: the storage address of the DID document in IPFS, the hash value of the digital identity information, and TEE (Trusted Evidence for the Network), etc. Certificate issuers can also write the hash value of their own DID documents into the blockchain for DID self-registration.
[0104] The data provider node generates a training dataset and sends it to the model building node. The model building node generates a model to be trained and transmits the training dataset and the model to be trained to the aggregation node.
[0105] The aggregation node generates n training tasks, stores them in IPFS, and writes their hash values to the blockchain for notarization. The aggregation node selects n candidate nodes, and performs two-way authentication with each candidate node. After successful two-way authentication, each candidate node is designated as the target training node. The storage address of each training task in IPFS is sent to the corresponding target training node. Each target training node retrieves the corresponding training task from IPFS, then trains the model based on the training task, obtaining the training result and training process information. The hash value (verification information) of the training result and the training process information are stored in the blockchain. The training result is signed using the private key in the target training node's second node key pair to obtain a signed training result, which is then sent to the aggregation node. For each training node, the aggregation node performs anti-tamper verification on the training result based on the verification information of the training result in the blockchain, and performs signature verification on the signed training result. When all training results pass the anti-tamper verification and all signed training results pass the signature verification, the aggregation node aggregates the model parameters to obtain the global model parameters, and deploys the global model parameters to the model to be trained to obtain the target model.
[0106] Aggregator nodes can use a Threshold Signature Scheme (TSS) to sign global model parameters using the private key from the first node's key pair and the private key from the model building nodes' key pair, and then store the signature in IPFS. The target model can be encapsulated as an on-chain Application Programming Interface (API), which can be called via its own DID or authorized offline with encrypted encryption. The aggregation node generates an immutable copyright certificate for the target model based on the target model's hash value, a list of DID identifiers (node identifiers) for each target training node, and the contribution value of each target training node, and writes this copyright certificate to the blockchain for notarization.
[0107] Figure 7 This is a schematic diagram of the structure of a blockchain-based distributed training device provided in an exemplary embodiment of this disclosure. Figure 7 As shown, the apparatus of this embodiment can be applied to a blockchain network, which includes aggregation nodes and multiple training nodes. The apparatus may include:
[0108] The task generation module 200 is used to aggregate nodes to determine multiple training tasks based on the model to be trained and the training dataset, and to determine multiple candidate nodes;
[0109] The authentication module 210 is used to perform two-way authentication between the aggregate node and the candidate node based on the digital identity information of the aggregate node and the digital identity information of the candidate node stored in the blockchain for each candidate node.
[0110] The node determination module 220 is configured to determine the candidate node as the target training node in response to the candidate node and the aggregate node passing two-way authentication.
[0111] Task allocation module 230 is used for the aggregation node to allocate training tasks to each target training node respectively;
[0112] The joint training module 240 is used for each target training node to train the model based on the corresponding training task, and to obtain the training results corresponding to each target training node. The training results include the model parameters of each round of iterative training.
[0113] The aggregation module 250 is used by the aggregation node to aggregate the model parameters in each training result to obtain the target model.
[0114] In some possible implementations of this disclosure, in embodiments of this disclosure, the aggregation node determines the plurality of candidate nodes, further configured to:
[0115] The aggregation node filters candidate nodes for a number of training tasks from the multiple training nodes based on the performance information and blacklist of each training node. The performance information includes the historical training evaluation information, computing power information and communication capability information of the training node. The blacklist includes the node identifier of at least one training node.
[0116] In some possible implementations of this disclosure, in this embodiment, the authentication module 210 is used for the aggregation node to obtain a temporary call key, and to allocate a first temporary key pair and a second temporary key pair from the temporary call key to the aggregation node and the candidate node respectively; the aggregation node uses the public key in the second temporary key pair to decrypt the second encrypted verification information to obtain the verification information of the candidate node, and authenticates the candidate node based on the verification information of the candidate node, wherein the second encrypted verification information is obtained by the candidate node encrypting the verification information of the candidate node using the private key in the second temporary key pair; the candidate node uses the public key in the first temporary key pair to decrypt the first encrypted verification information to obtain the verification information of the aggregation node, and authenticates the aggregation node based on the verification information of the aggregation node, wherein the first encrypted verification information is obtained by the aggregation node encrypting the verification information of the aggregation node using the private key in the first temporary key pair; in response to both the candidate node and the aggregation node passing authentication, it is determined that the candidate node and the aggregation node have passed two-way authentication.
[0117] In some possible implementations of this disclosure, in this embodiment, the verification information of the candidate node includes random information, as well as the candidate node's digital identity information, signature information, and node identifier. The signature information of the candidate node is obtained by signing with the private key in the candidate node's second node key pair. The verification information of the aggregate node includes the random information, as well as the aggregate node's digital identity information, signature information, and node identifier. The signature information of the aggregate node is obtained by signing with the private key in the aggregate node's first node key pair.
[0118] The step of verifying the candidate node based on the verification information of the candidate node is further used to: verify the digital identity information and signature information of the candidate node, and determine that the candidate node has passed the verification when the digital identity information and signature information of the candidate node have passed the verification;
[0119] The step of verifying the identity of the aggregation node based on the verification information of the aggregation node is further used to: verify the digital identity information and signature information of the aggregation node, and determine that the aggregation node has passed the identity verification when the digital identity information and signature information of the aggregation node have passed the verification.
[0120] In some possible implementations of this disclosure, the apparatus further includes:
[0121] The first data transmission module is used for each target training node to send a network trust certificate to the aggregation node;
[0122] The network trusted environment verification module is used by the aggregation node to verify the network trusted proof of each target training node, and when the network trusted proof of each target training node passes the verification, each target training node starts the operation of model training based on the corresponding training task.
[0123] In some possible implementations of this disclosure, the joint training module 240 in this embodiment is specifically used to train the model for each target training node based on the training task corresponding to the target training node, obtain the training result and training process information; generate verification information and signed training result of the training result, store the verification information and the training process information in the blockchain, and send the training result and signed training result to the aggregation node.
[0124] In some possible implementations of this disclosure, the aggregation module 250 in this embodiment is specifically used to perform anti-tamper verification on the training results based on the verification information of the training results in the blockchain, and to perform signature verification on the signed training results; in response to each training result passing anti-tamper verification and each signed training result passing signature verification, the aggregation node aggregates each model parameter.
[0125] In some possible implementations of this disclosure, the apparatus further includes:
[0126] The first model verification module is used to determine whether there is a sudden increase in loss or whether the model parameters have converged based on the model parameters of each iteration.
[0127] The second model verification module is used to retrain the model to be trained by the aggregation node and the multiple training nodes in response to a sudden increase in loss or failure of model parameters to converge.
[0128] In some possible implementations of this disclosure, the training process information includes the amount of training data, training duration, and gradient effectiveness coefficients. The apparatus further includes:
[0129] The contribution determination module is used to determine the contribution value of each target training node based on the amount of training data, the training duration, and the gradient effectiveness coefficient.
[0130] In some possible implementations of this disclosure, the blockchain network in the embodiments of this disclosure further includes model building nodes and data providing nodes, and the apparatus further includes:
[0131] The second data transmission module is used by the model building node to create the model to be trained and to send the model to be trained and the training dataset obtained from the data providing node to the aggregation node.
[0132] The blockchain-based distributed training device disclosed herein corresponds to the blockchain-based distributed training method disclosed above, and the relevant contents can be referred to each other, which will not be repeated here.
[0133] The beneficial technical effects of the exemplary embodiments of the blockchain-based distributed training device disclosed herein can be found in the corresponding beneficial technical effects of the exemplary method section described above, and will not be repeated here.
[0134] In addition, this disclosure also provides an electronic device, including:
[0135] Memory, used to store computer programs;
[0136] A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the blockchain-based distributed training method described in any of the above embodiments of this disclosure.
[0137] Figure 8 This is a schematic diagram illustrating the structure of an application embodiment of the electronic device disclosed herein. Below, reference is made to… Figure 8 This describes an electronic device according to embodiments of the present disclosure. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.
[0138] like Figure 8 As shown, the electronic device includes one or more processors and memory.
[0139] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.
[0140] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processor may execute the program instructions to implement the blockchain-based distributed training methods and / or other desired functions described in the various embodiments of this disclosure above.
[0141] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0142] In addition, the input device may include, for example, a keyboard, a mouse, etc.
[0143] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0144] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0145] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based distributed training methods according to various embodiments of this disclosure as described in the foregoing sections of this specification.
[0146] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0147] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based distributed training method according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0148] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0149] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0150] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0151] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0152] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0153] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0154] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.
[0155] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0156] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A blockchain-based distributed training method, characterized in that, Applied to a blockchain network, which includes aggregation nodes and multiple training nodes, the method includes: The aggregation node determines multiple training tasks and multiple candidate nodes based on the model to be trained and the training dataset, including: excluding training nodes in the blacklist from the multiple training nodes based on node identifiers in the blacklist; sorting the remaining training nodes based on their performance information; and determining the top n training nodes from the remaining training nodes as candidate nodes. The performance information of the training nodes includes the historical training completion evaluation information, computing power information, and communication capability information of the training nodes, where n is the number of training tasks. For each candidate node, the aggregation node and the candidate node perform two-way identity verification based on the digital identity information of the aggregation node and the digital identity information of the candidate node stored in the blockchain; In response to the candidate node and the aggregation node passing two-way authentication, the candidate node is determined as the target training node; The aggregation node assigns training tasks to each target training node respectively; Each target training node trains the model based on the corresponding training task to obtain the training result corresponding to each target training node. The training result includes the model parameters of each round of iterative training. The aggregation node aggregates the model parameters from each training result to obtain the target model.
2. The method according to claim 1, characterized in that, The aggregation node determines the plurality of candidate nodes, including: The aggregation node selects a number of candidate nodes for training tasks from among the multiple training nodes based on the performance information and blacklist of each training node.
3. The method according to claim 1, characterized in that, The aggregation node and the candidate node perform two-way identity verification based on the digital identity information of the aggregation node and the candidate node stored in the blockchain, including: The aggregation node obtains the temporary call key, and assigns the first temporary key pair and the second temporary key pair from the temporary call key to the aggregation node and the candidate node, respectively; The aggregation node uses the public key in the second temporary key pair to decrypt the second encrypted verification information to obtain the verification information of the candidate node, and performs identity verification on the candidate node based on the verification information of the candidate node. The second encrypted verification information is obtained by the candidate node encrypting the verification information of the candidate node using the private key in the second temporary key pair. The candidate node uses the public key in the first temporary key pair to decrypt the first encrypted verification information to obtain the verification information of the aggregate node, and performs identity verification on the aggregate node based on the verification information of the aggregate node. The first encrypted verification information is obtained by the aggregate node encrypting the verification information of the aggregate node using the private key in the first temporary key pair. In response to the fact that both the candidate node and the aggregation node have passed authentication, it is determined that the candidate node and the aggregation node have passed two-way authentication.
4. The method according to claim 3, characterized in that, The verification information of the candidate node includes random information, as well as the candidate node's digital identity information, signature information, and node identifier. The signature information of the candidate node is obtained by signing the private key in the candidate node's second node key pair. The verification information of the aggregation node includes the random information, as well as the digital identity information, signature information and node identifier of the aggregation node. The signature information of the aggregation node is obtained by signing the private key in the first node key pair of the aggregation node. The authentication of the candidate node based on the verification information of the candidate node includes: The digital identity information and signature information of the candidate node are verified, and if the digital identity information and signature information of the candidate node pass the verification, the candidate node is determined to have passed the identity verification. The authentication of the aggregation node based on the verification information of the aggregation node includes: The digital identity information and signature information of the aggregation node are verified, and if the digital identity information and signature information of the aggregation node pass the verification, it is determined that the aggregation node has passed the identity verification.
5. The method according to any one of claims 1-4, characterized in that, Also includes: Each target training node sends a network trust certificate to the aggregation node; The aggregation node verifies the network trust proof of each target training node, and when the network trust proof of each target training node passes the verification, each target training node initiates the operation of model training based on the corresponding training task.
6. The method according to claim 1, characterized in that, Each target training node performs model training based on a corresponding training task, including: For each target training node, the target training node performs model training based on the training task corresponding to the target training node to obtain the training results and training process information; Generate verification information and signature training results for the training results, store the verification information and training process information in the blockchain, and send the training results and signature training results to the aggregation node.
7. The method according to claim 6, characterized in that, The aggregation node aggregates the model parameters from each training result, including: Based on the verification information of the training results in the blockchain, the training results are subjected to anti-tampering verification, and the signature training results are subjected to signature verification. In response to the fact that all training results have passed the anti-tampering verification and all signed training results have passed the signature verification, the aggregation node aggregates the parameters of each model.
8. The method according to claim 7, characterized in that, The method further includes: Based on the model parameters of each iteration, determine whether there is a sudden increase in loss or whether the model parameters have converged; In response to a sudden increase in loss or failure of model parameters to converge, the aggregation node and the multiple training nodes jointly retrain the model to be trained.
9. The method according to claim 8, characterized in that, The training process information includes the amount of training data, training duration, and gradient effectiveness coefficients; the method further includes: For each target training node, the contribution value of the target training node is determined based on the amount of training data, the training duration, and the gradient effectiveness coefficient.
10. The method according to claim 1, characterized in that, The blockchain network also includes model building nodes and data providing nodes, and the method further includes: The model building node creates the model to be trained and sends the model to be trained and the training dataset obtained from the data providing node to the aggregation node.
11. A blockchain-based distributed training device, characterized in that, Applied to a blockchain network, the blockchain network including aggregation nodes and multiple training nodes, the device includes: The task generation module is used to aggregate nodes to determine multiple training tasks based on the model to be trained and the training dataset, and to determine multiple candidate nodes, including: excluding training nodes in the blacklist from the multiple training nodes based on node identifiers in the blacklist; sorting the remaining training nodes based on their performance information; and determining the top n training nodes from the remaining training nodes as candidate nodes. The performance information of the training nodes includes the historical training completion evaluation information, computing power information, and communication capability information of the training nodes, where n is the number of training tasks. An identity verification module is used to perform two-way identity verification between the aggregate node and the candidate node based on the digital identity information of the aggregate node and the digital identity information of the candidate node stored in the blockchain. A node determination module is used to determine the candidate node as the target training node in response to the two-way authentication between the candidate node and the aggregate node; The task allocation module is used by the aggregation node to allocate training tasks to each target training node respectively; The joint training module is used for each target training node to train the model based on the corresponding training task, and to obtain the training results corresponding to each target training node. The training results include the model parameters of each round of iterative training. The aggregation module is used by the aggregation node to aggregate the model parameters in each training result to obtain the target model.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory, wherein when the computer program is executed, it implements the method described in any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-10.
Citation Information
Patent Citations
Federal learning method and system based on block chain and trusted execution environment
CN113837761A
Target detection model training method and device, electronic equipment and storage medium
CN117876894A
Model distributed training method based on blockchain node trust management
CN120012168A