Decentralized federated learning methods, systems and related equipment

By using blockchain technology in federated learning, participants are divided into ordinary nodes and committee nodes, which solves the problem that central point servers are prone to single point failures, and improves the accuracy and robustness of model training.

CN118982064BActive Publication Date: 2025-03-11HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411473105.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-03-11
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

In the existing federated learning technology, data aggregation is performed by a fixed center point server, which is prone to single point failure problems, affecting the accuracy of model training.

Method used

By adding participants to the blockchain and dividing participants into ordinary nodes and committee nodes, data aggregation is performed based on blockchain, and committee nodes are not fixed and updated according to contribution scores and time window algorithms.

Benefits of technology

It reduces the single point failure problem caused by fixed center point servers, and improves the accuracy and robustness of model training in federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982064B_ABST
    Figure CN118982064B_ABST
Patent Text Reader

Abstract

The present application discloses a decentralized federated learning method, system and related equipment, which relates to the field of computer technology, including: organizers and participants of federated learning join the blockchain; the organizer divides the participants into ordinary nodes and committee nodes; each node obtains the configuration information of the federated learning task and the global model to be trained based on the blockchain and updates the local model to obtain the local model after the previous round of training; the ordinary node trains the local model after the previous round of training to obtain the local training model of the current round and uploads it to the blockchain; the committee node obtains the local training model through the blockchain to determine the contribution score of the ordinary node and the global model after the current round of training, and determines the contribution score corresponding to the committee node; in response to triggering the committee node update event, the organizer re-divides the node identity. In this way, it is conducive to improving the accuracy of model training in the federated learning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a decentralized federated learning method, system, and related equipment. Background Art

[0002] In order to solve the problem of data security, federated learning, as an emerging data sharing and analysis method, has attracted widespread attention. Federated learning can achieve model training and knowledge sharing among multiple participants while protecting data privacy.

[0003] In the related art, in the process of federated learning, data is usually aggregated by a fixed central point server, which has a serious centralization problem. The problem with the related art is that the central server is prone to single point failure, which is not conducive to improving the accuracy of model training.

[0004] Therefore, relevant technologies still need to be improved and developed. Summary of the invention

[0005] The main purpose of this application is to provide a decentralized federated learning method, system and related equipment, aiming to solve the technical problem in the related technology that when data is aggregated by a fixed central point server, a single point failure problem is prone to occur in the central point server, which is not conducive to improving the accuracy of model training.

[0006] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a decentralized federated learning method, wherein the decentralized federated learning method includes:

[0007] The participants of federated learning join the blockchain, where the above participants include an organizer and multiple participants;

[0008] The above organizer divides the participants in the above blockchain into ordinary nodes and committee nodes;

[0009] The ordinary node and the committee node respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the blockchain, and perform local model updates based on the global model to be trained to obtain the local model after the previous round of training is completed;

[0010] The ordinary node performs model training on the local model after the previous round of training according to the local data of the node and the federated learning task configuration information, obtains the local training model of the current round, and uploads the local training model to the blockchain;

[0011] The committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed;

[0012] In response to triggering a committee node update event, the organizer re-executes the step of dividing the participants in the blockchain into ordinary nodes and committee nodes to obtain updated ordinary nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities.

[0013] Optionally, the organizer divides the participants in the blockchain into ordinary nodes and committee nodes, including:

[0014] The above organizer obtains the target number of nodes;

[0015] If the participants in the above blockchain have corresponding contribution scores, the above organizer will select the target number of participants from all participants in the above blockchain as committee nodes according to the corresponding contribution scores of each of the above participants, and treat the other participants as ordinary nodes.

[0016] Optionally, the above method further includes:

[0017] If a participant in the above blockchain does not have a corresponding contribution score, the above organizer randomly selects a target number of participants from all participants in the above blockchain as committee nodes, and treats other participants as ordinary nodes.

[0018] Optionally, the contribution score corresponding to the above participant is the contribution score of the above participant in the current round;

[0019] Alternatively, the contribution score corresponding to the above-mentioned participant is a cumulative contribution score determined based on the contribution score of the above-mentioned participant in the current round and the contribution score of the previous round.

[0020] Optionally, the committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed, including:

[0021] The committee node obtains the local training model corresponding to the common node through the blockchain, and determines the contribution score of the common node in the current round according to the model accuracy of the local training model obtained;

[0022] The committee nodes weight the local training models corresponding to the common nodes according to the contribution scores of the common nodes in the current round, so as to obtain the global model after the current round of training is completed;

[0023] The committee node determines the contribution score of the committee node in the current round according to the model accuracy of the global model after the current round of training is completed.

[0024] Optionally, the above method further includes:

[0025] The above-mentioned committee node uploads the global model after the completion of the above-mentioned current round of training, the contribution score of the above-mentioned ordinary node in the current round and the contribution score of the above-mentioned committee node in the current round to the above-mentioned blockchain, and uses the global model after the completion of the above-mentioned current round of training as the global model to be trained in the next round.

[0026] Optionally, the above method further includes:

[0027] When the time for executing federated learning in the above blockchain reaches a preset time window threshold, or when a node update signal triggered by a target object is received, the above committee node update event is triggered.

[0028] A second aspect of the present application provides a decentralized federated learning system, wherein the decentralized federated learning system includes:

[0029] A participant control module is used to control the participants of federated learning to join the blockchain, wherein the above participants include an organizer and multiple participants;

[0030] A node division module, used to divide the participants in the above blockchain into ordinary nodes and committee nodes through the above organizer;

[0031] A node control module, used to control the above-mentioned common nodes and the above-mentioned committee nodes to respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the above-mentioned blockchain, and to update the local model based on the above-mentioned global model to be trained, so as to obtain the local model after the previous round of training is completed;

[0032] A model training module is used to control the above-mentioned common node to perform model training on the local model after the previous round of training according to the node local data and the above-mentioned federated learning task configuration information, obtain the local training model of the current round, and upload the above-mentioned local training model to the above-mentioned blockchain;

[0033] A model aggregation module, used to control the committee node to obtain the local training model through the blockchain, determine the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determine the contribution score corresponding to the committee node according to the global model after the current round of training is completed;

[0034] An update trigger module is used to trigger the node division module to re-execute the step of the organizer dividing the participants in the blockchain into ordinary nodes and committee nodes in response to a triggering committee node update event, so as to obtain updated ordinary nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities.

[0035] The third aspect of the present application provides an intelligent terminal, which includes a memory, a processor, and a decentralized federated learning program stored in the memory and executable on the processor. When the decentralized federated learning program is executed by the processor, it implements any step of the decentralized federated learning method.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium, on which a decentralized federated learning program is stored. When the decentralized federated learning program is executed by a processor, the decentralized federated learning program implements any step of the decentralized federated learning method.

[0037] As can be seen from the above, the method in the present application includes: the participants of federated learning join the blockchain, wherein the participants include an organizer and multiple participants; the organizer divides the participants in the blockchain into ordinary nodes and committee nodes; the ordinary nodes and the committee nodes respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the blockchain, and perform local model updates based on the global model to be trained to obtain the local model after the previous round of training; the ordinary nodes perform model training on the local model after the previous round of training based on the node local data and the federated learning task configuration information to obtain the local training model of the current round, and update the local model based on the global model to be trained to obtain the local model after the previous round of training; The local training model is uploaded to the above-mentioned blockchain; the above-mentioned committee node obtains the above-mentioned local training model through the above-mentioned blockchain, determines the contribution score corresponding to the above-mentioned ordinary node and the global model after the current round of training is completed according to the above-mentioned local training model, and determines the contribution score corresponding to the above-mentioned committee node according to the global model after the current round of training is completed; in response to triggering the committee node update event, re-execute the step of the above-mentioned organizer dividing the participants in the above-mentioned blockchain into ordinary nodes and committee nodes to obtain updated ordinary nodes and updated committee nodes, wherein the division of the above-mentioned participants is based on the contribution scores corresponding to the above-mentioned participants, or the above-mentioned participants are randomly divided into identities.

[0038] Compared with the prior art, the present application scheme performs federated learning based on blockchain and aggregates data based on committee nodes in blockchain. However, committee nodes are not fixed. When a committee node update event is triggered, the corresponding ordinary nodes and committee nodes will be updated. In this way, the impact of single point failure problems when using a fixed central point server for data aggregation can be reduced, which is conducive to improving the accuracy of model training in federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a flowchart of a decentralized federated learning method provided in an embodiment of the present application;

[0041] Figure 2 It is a schematic diagram of the structure of a decentralized federated learning system provided in an embodiment of the present application;

[0042] Figure 3It is a schematic diagram of component modules of a decentralized federated learning system provided in an embodiment of the present application;

[0043] Figure 4 It is a block diagram of the internal structure principle of a smart terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0046] Federated learning enables model training and knowledge sharing among multiple participants while protecting data privacy. The simplest federated learning architecture is one in which a central server is responsible for coordinating model training, while multiple clients (nodes) each train models on local data and send model updates to the server. The server aggregates these updates to build a global model. However, as the number of users increases, this reliance on a central server will have corresponding problems, namely, the central server is prone to single point failure, and the harm of failure will continue to increase as the scale of federated participants increases.

[0047] Specifically, traditional federated learning has serious centralization, lack of incentive mechanism and low robustness. Blockchain, as a decentralized and unchangeable distributed ledger technology, can make up for the above shortcomings of federated learning. In one application scenario, federated learning can be carried out based on blockchain, and the leadership role of the central server in traditional federated learning can be replaced by the consensus mechanism between nodes. The fairness problem in federated learning can be solved by designing a reasonable incentive mechanism, and more data owners can be encouraged to participate in the training process of federated learning. At the same time, the immutability of blockchain also supports the implementation of algorithms to solve the problem of toxic attacks to a certain extent. However, complex mechanisms may introduce new communication and storage overhead.

[0048] In another application scenario, when federated learning is conducted based on blockchain, the consensus mechanisms of Proof of Work (PoW) and Proof of Stake (PoS) are adopted. However, the PoW mechanism consumes too much energy, and the PoS mechanism may lead to the centralization of rights and interests, increasing the risk of manipulating the network, thus affecting the fairness and decentralization of federated learning.

[0049] At the same time, current federated learning incentive mechanisms usually use complex technologies such as Shapley values, auction mechanisms, reinforcement learning, custom algorithms, etc., which may bring huge computing costs and communication overheads.

[0050] In order to solve at least one of the above-mentioned technical problems, the present application provides a decentralized federated learning method, system and related equipment. Compared with the prior art, the present application performs federated learning based on blockchain and performs data aggregation based on committee nodes in blockchain. The committee nodes are not fixed. When the committee node update event is triggered, the corresponding ordinary nodes and committee nodes will be updated. In this way, the impact of single point failure problems when using a fixed central point server for data aggregation can be reduced, which is conducive to improving the accuracy of model training in federated learning.

[0051] Specifically, in one application scenario, the decentralized federated learning method provided by the present application can be deployed in each participant of the federated learning (i.e., the corresponding nodes in the blockchain), so that each participant of the federated learning can adaptively determine the steps to be performed according to the corresponding decentralized federated learning method and its own node identity, thereby completing the federated learning process. In another application scenario, the decentralized federated learning method provided by the present application can be deployed in an additional control device, which controls each participant of the federated learning to perform the corresponding steps, thereby completing the federated learning process, but no specific limitation is made here.

[0052] like Figure 1 As shown, the embodiment of the present application provides a decentralized federated learning method. Specifically, the method includes the following steps:

[0053] Step S100: Participants of federated learning join the blockchain, wherein the participants include an organizer and multiple participants.

[0054] The participants of federated learning are the devices that participate in federated learning, the organizer is the initiator of federated learning, and the participants are the devices that specifically execute the federated learning process. The organizer can be pre-specified by the user and is not specifically limited here.

[0055] It should be noted that in the embodiment of the present application, the blockchain adopts a consortium chain, that is, the decentralized federated learning method described above is specifically executed based on the consortium chain, but this is not a specific limitation. In actual use, a public chain or a private chain can also be selected based on specific scenarios and actual needs.

[0056] Figure 2 This is a schematic diagram of a decentralized federated learning system structure provided in an embodiment of the present application. Specifically, it can be based on Figure 2 The decentralized federated learning system shown in the figure executes the decentralized federated learning method in the embodiment of the present application, and the steps executed by each entity in the system and the direction of related data flow can refer to Figure 2 .

[0057] like Figure 2 As shown, the organizer in the system is mainly responsible for the initialization of the federated learning task, including distributing the model structure, configuration information (hyperparameters) and other materials required for training to the blockchain and to each node participating in the federated learning task. In addition, the organizer is also responsible for the registration of the nodes on the chain, that is, the identity authentication of the nodes participating in federated learning on the blockchain. It should be noted that in the embodiment of the present application, all clients in the blockchain are clients participating in federated learning for the purpose of illustration, but not as a specific limitation.

[0058] Blockchain Figure 2 The consortium chain (specifically the consortium chain) serves as a carrier of rules and storage in the system, providing process guidance for the entire federated learning process. Through the coordination of smart contracts, all parties involved in federated learning can change the process of interacting with the central server to interacting with the blockchain. At the same time, the blockchain can provide stubs for training data, which can prevent nodes from doing evil to a certain extent. In addition, the blockchain's incentive mechanism can distribute rewards according to the rules, encouraging participants to better join the federated learning.

[0059] In the embodiment of the present application, node roles are assigned to the participants of federated learning to interact with the blockchain, and different nodes have different responsibilities. In the embodiment of the present application, in order to prevent the Byzantine problem between nodes, the node roles can be rotated or updated in other ways according to rules. Specifically, the nodes corresponding to the participants can be divided into ordinary nodes and committee nodes. The responsibility of ordinary nodes is to complete the local training tasks of federated learning and have the opportunity to become committee nodes. The committee node can evaluate the updated model (i.e., the model trained by the ordinary node) according to the rules, and select the preferred local model for aggregation. Similarly, the committee node will also be updated and may be updated to an ordinary node.

[0060] Smart contracts contain the logic and rules for data interaction on the chain during the federated learning process, and can control the upload and download of model parameters. At the same time, through the embodiment of incentive mechanisms in smart contracts, participants in federated learning can obtain better benefits (incentives).

[0061] In one application scenario, the core of the incentive mechanism is the time window algorithm, the core idea of ​​which is to establish a reward scheme based on the performance of each participant in the most recent activity time. Under the measurement of the time window algorithm, ordinary nodes and committee nodes will be assigned different numbers of "points" in each round of training tasks according to their performance. After a certain round of window period, nodes will also rotate between ordinary nodes and committee nodes according to the accumulated value of points. By measuring the performance of participants through the time window algorithm, nodes can be encouraged to participate in training tasks more actively, which is conducive to improving model performance and diversity.

[0062] In the embodiment of the present application, in the process of the participants of federated learning joining the blockchain, it is necessary to complete the registration and preparation of the federated learning node on the chain, that is, to complete the registration of the node. Specifically, the new node submits an application to the organizer to join the alliance chain, providing identity information and digital certificates. The organizer verifies the identity of the new node to ensure that it belongs to a legitimate institution within the alliance. The new node that passes the verification is assigned as an ordinary node by the organizer and has the right to participate in federated learning. The organizer submits the information of the new node to the alliance chain, and other nodes confirm the information of the new node. After reaching a consensus, the new node officially joins the alliance. The new node negotiates the communication protocol and data privacy rules with the organizer to prepare for subsequent training.

[0063] It should be noted that the organizer will classify all new nodes as ordinary nodes during the registration phase, and then divide the node identities according to the number of all nodes that have completed registration, so as to better realize the division of node identities and reduce unnecessary data processing.

[0064] Step S200: The organizer divides the participants in the blockchain into ordinary nodes and committee nodes.

[0065] In the embodiment of the present application, the organizer divides the node identities of each participant node in the blockchain that has been registered. It should be noted that in one application scenario, before the first round of training, the organizer can randomly select some nodes from all registered ordinary nodes as initial committee members. In the next training round, when the committee node needs to be updated, the node identity can be updated according to the contribution score of each node.

[0066] Specifically, the organizer divides the participants in the blockchain into ordinary nodes and committee nodes, including: the organizer obtains a target number of nodes; if the participants in the blockchain have corresponding contribution scores, the organizer selects the target number of participants from all participants in the blockchain as committee nodes according to the corresponding contribution scores of the participants, and selects other participants as ordinary nodes.

[0067] Furthermore, the method also includes: if a participant in the blockchain does not have a corresponding contribution score, the organizer randomly selects a target number of participants from all participants in the blockchain as committee nodes, and treats other participants as ordinary nodes.

[0068] Among them, the contribution score corresponding to the above-mentioned participant is the contribution score of the above-mentioned participant in the current round; or, the contribution score corresponding to the above-mentioned participant is the cumulative contribution score determined based on the contribution score of the above-mentioned participant in the current round and the contribution scores of historical rounds.

[0069] In one application scenario, the accuracy and training effect of model training in the federated learning process are further improved based on the time window algorithm. The above time window algorithm consists of three components: time-based node contribution score calculation, model weighted aggregation based on contribution score, and committee update strategy based on time window. The core idea of ​​the time window algorithm is to dynamically adjust the weight and role of the node in federated learning according to the real-time performance of the node and the historical contribution within the time window, so as to improve the efficiency and robustness of the federated learning of the entire system. Among them, the corresponding time window length can be dynamically adjusted according to actual needs to obtain better training results.

[0070] It should be noted that before the first round of training, the committee nodes need to be determined once. At this time, each node does not have a corresponding contribution score, so the committee nodes can be randomly selected from all participants (i.e. all nodes). In the subsequent federated learning process, the committee node update event can be triggered regularly. At this time, each node has a corresponding contribution score. Therefore, based on the contribution score, the committee nodes can be selected and determined in descending order of contribution scores.

[0071] It should be further explained that when updating the committee node based on the contribution score, the contribution score used may include only the contribution score of the current round to reduce the amount of data calculation and improve the processing speed; or it may include the cumulative contribution score determined based on the contribution of the current round and the contribution score of the historical rounds to obtain a better contribution score judgment effect and improve the judgment accuracy. Among them, the contribution score of the above-mentioned historical rounds may include the contribution score of all rounds from the first round of training to the current round; or it may only include the contribution score within the current time window (i.e., from the last update of the committee node to the current round). On this basis, after each committee node update, the contribution score used by each node can be cleared to reduce the occupation of data storage space.

[0072] Furthermore, the above target number of nodes may be pre-specified by the user or adjusted according to actual needs, or may be determined based on the number of nodes in federated learning.

[0073] In the embodiment of the present application, the target number of nodes is determined according to the number of nodes of federated learning. Specifically, as shown in the following formula (1):

[0074] (1);

[0075] in, Represents the number of target nodes, Represents the number of federated learning nodes, It is a control factor that can be pre-set and adjusted according to the needs of the system to ensure that the number of committee nodes is within a reasonable range. It is the lower limit of the number of committee nodes, which can also be pre-set and adjusted according to system requirements. The specific value is not limited here.

[0076] The node contribution score is used to measure the performance of each node in each training round. The node contribution score of each round can be used as a measure of the aggregation weight when the model is aggregated. The accumulated node contribution score can be used as a reference value for the replacement of ordinary nodes and committee nodes.

[0077] In step S300, the ordinary node and the committee node respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the blockchain, and perform local model updates based on the global model to be trained to obtain the local model after the previous round of training is completed.

[0078] It should be noted that the organizer can complete the interactive preparation of federated learning parameters and models and other information on the chain before training during the model distribution phase. Specifically, before the first round of training begins, the organizer uploads the initial global model and federated learning task configuration information to the alliance chain. During training, all nodes synchronize the federated learning task configuration information and the global model to be trained from the alliance chain, and initialize the local model according to the federated learning task configuration information to prepare for training.

[0079] Among them, if the current round is the first round, the global model to be trained in the current round is the initial global model uploaded by the organizer. If the current round is not the first round, the global model to be trained in the current round is the global model after the previous round of training is completed.

[0080] The above-mentioned federated learning task configuration information may include model type, training hyperparameters (such as learning rate, optimizer, etc.), total global training round data volume, number of nodes participating in training, evaluation method (method for evaluating the local model of each training node), node selection method (method for selecting training nodes participating in global training from all ordinary nodes), etc., and may also include other information, which is not specifically limited here.

[0081] It should be noted that at the beginning of each round of training, both ordinary nodes and committee nodes need to obtain the global model to be trained in the current round through the blockchain, but the federated learning task configuration information can be obtained based on actual needs.

[0082] In one application scenario, in the initial training round, each node obtains the corresponding federated learning task configuration information through the blockchain, and there is no need to obtain the corresponding federated learning task configuration information in subsequent rounds, so as to reduce the amount of data interaction and improve processing efficiency. In another application scenario, at the beginning of each training round, each node obtains the corresponding federated learning task configuration information through the blockchain. In this way, the federated learning task configuration information can be adjusted in real time according to actual needs to obtain better training results, and it can also avoid the adverse effects of node local information errors on the model training process, thereby improving the accuracy of model training.

[0083] In step S400, the ordinary node performs model training on the local model after the previous round of training according to the node local data and the federated learning task configuration information, obtains the local training model of the current round, and uploads the local training model to the blockchain.

[0084] Specifically, ordinary nodes perform model training based on local data sets of the nodes, perform a specified number of local iterations according to the federated learning task configuration information, obtain the local training model of the current round, and upload the local training model to the blockchain, so as to send the corresponding local training model to the committee node through the blockchain for model aggregation.

[0085] In step S500, the committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the common node according to the local training model and the global model after the current round of training is completed, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed.

[0086] In one application scenario, each committee node obtains all local training models, and processes all local training models to improve the accuracy of model training. In an embodiment of the present application, in order to reduce unnecessary repeated data processing and improve data processing efficiency, the local training models of each ordinary node are evenly and randomly distributed to each committee node. It should be noted that a total aggregation node can also be randomly selected from the committee nodes. The total aggregation node can participate in the aggregation of local training models for ordinary nodes, or it may not participate in the aggregation of local models for ordinary nodes, which is not specifically limited here. The total aggregation node can be used to determine the contribution score corresponding to each committee node.

[0087] Specifically, the committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed, including:

[0088] The committee node obtains the local training model corresponding to the common node through the blockchain, and determines the contribution score of the common node in the current round according to the model accuracy of the local training model obtained;

[0089] The committee nodes weight the local training models corresponding to the common nodes according to the contribution scores of the common nodes in the current round, so as to obtain the global model after the current round of training is completed;

[0090] The committee node determines the contribution score of the committee node in the current round according to the model accuracy of the global model after the current round of training is completed.

[0091] Specifically, the committee node evaluates the model accuracy of the local training model of the corresponding ordinary node in the current round on the validation set it holds, and then determines the corresponding contribution score. The contribution score can be used for the replacement of committee members in the subsequent training process, the screening of local training models trained by ordinary nodes, and the calculation of weights during model aggregation.

[0092] Specifically, the contribution score of an ordinary node is calculated as shown in the following formula (2):

[0093] (2);

[0094] in, It is A common node in The contribution score of the round, It is A common node in The model accuracy of the wheel, It is a preset minimum accuracy threshold, and its specific value can be set and adjusted according to actual needs. represents the natural exponential function, It is a parameter that controls the time decay rate, and its specific value can be set and adjusted according to actual needs. It is The last active round of ordinary nodes, Representative The round interval between the current round and the last active round of a common node.

[0095] In one application scenario, the active rounds represent that the common node is selected in the model aggregation stage. In the embodiment of the present application, the model aggregation stage does not necessarily select the local training models corresponding to all common nodes for model aggregation, but selects the local training models corresponding to the top-ranked common nodes for model aggregation based on the contribution score, so each common node is not active in every round of training. The number of selected common nodes can be specified and adjusted through the federated learning task configuration information.

[0096] In another application scenario, the active rounds represent the rounds in which the ordinary node participates in federated learning, and it does not necessarily need to be selected. In this case, each node does not necessarily participate in model training in every round. For example, if the node was a committee node in the previous round, it did not participate in model training in the previous round, that is, it was inactive.

[0097] After the committee node calculates and determines the corresponding contribution score of each ordinary node, it selects the model according to the contribution score to aggregate the global model of the current round. Specifically, after each ordinary node has trained the local training model locally, it uploads the updated local training model to the alliance chain. The committee node downloads the local training models from the alliance chain, evaluates these models, and selects the models with the highest contribution for aggregation of the global model. The committee node performs weighted averaging on the selected local training models to generate a new global model, where the corresponding weighted value is determined according to the contribution score corresponding to the ordinary node to which the local training model belongs. For example, the contribution score can be directly used as the corresponding weight value, or it can be used as the corresponding weight value after normalization.

[0098] In one application scenario, each committee node performs weighted aggregation on the selected local training models obtained by itself, and then the total aggregation node aggregates the aggregation results of each committee node to obtain the final global model after the current round of training is completed.

[0099] Furthermore, the contribution score of the committee node is calculated as shown in the following formula (3):

[0100] (3);

[0101] in, It is The committee node is The contribution score of the round, Representative in the The model accuracy of the global model after the round of training is completed. In an application scenario, the model accuracy of the model can be calculated by any committee node or by the total aggregation node, but it is not specifically limited. It is a parameter that controls the time decay rate, and its specific value can be set and adjusted according to actual needs. Representative The difference between the local gradient of the committee node and the final global gradient, the larger the difference, the The worse the work quality of each committee node. The representative takes the opposite number of the difference, ensuring that nodes with high work quality have high scores, perfect work quality has a score of 1, and poor work quality will be close to 0. The final contribution score of a committee node is the product of the global model accuracy and its work quality score. In this way, the contribution score corresponding to the committee node can be determined by taking into account both the final model quality and the node's own work level. Among them, the global final model quality is the key to judging the work of the committee, and the work quality of each node is evaluated, including the accuracy of gradient aggregation. The comprehensive score combines these two factors to reasonably motivate the committee nodes to do their best to complete their work and prevent free-riding, thereby maintaining the work efficiency of the entire committee and the global model quality.

[0102] Furthermore, the above method also includes: the above committee node uploads the global model after the completion of the current round of training, the contribution score of the above ordinary node in the current round and the contribution score of the above committee node in the current round to the above blockchain, and uses the global model after the completion of the current round of training as the global model to be trained in the next round.

[0103] Specifically, the global model to be trained is replaced with the global model after the current round of training, and the committee node packages the new global model (i.e. the global model trained in the current round) and the contribution scores of each node and submits them to the alliance chain. All nodes synchronize the new global model (as the global model to be trained in the next round) and the contribution scores from the alliance chain to prepare for the next round of training. Furthermore, the committee node is re-elected every few rounds.

[0104] In the model aggregation stage, the committee node selects the one with the highest contribution score. The local training models corresponding to the common nodes are aggregated. The value of can be set and adjusted according to actual needs. In the embodiment of the present application, , that is, the number of selected ordinary nodes is greater than the number of committee nodes. During the aggregation process, a committee node is randomly selected as the total aggregation node. The total aggregation node collects the gradients of other committee nodes and performs weighted average aggregation on the collected gradients to obtain the global model. Specifically, there is the following formula (4):

[0105] (4);

[0106] in, Represents the weight of the local model participating in this round of model aggregation; Represents a normal node No. The growth value of the wheel; Represents a normal node No. The growth value of the wheel; Represents the number of federated learning nodes; is a control factor that can be pre-set and adjusted according to the needs of the system. Used to control the correlation between growth value and aggregate gradient, and its default value is 1. Update the model based on the global gradient to obtain a new global model (i.e. The global model after the first round of training is completed) and its model accuracy is evaluated on the validation set V , the total aggregation node is based on the accuracy of the model, and the corresponding first node of each committee node is calculated by the above formula (3). The contribution score of the round.

[0107] Furthermore, the committee node (or total aggregation node) will Upload to the blockchain so that all nodes can obtain the complete , and as the next round (i.e. The initial model to be trained (round).

[0108] It should be noted that the training rounds of the global model can be pre-specified, or the training can be stopped when the model accuracy of the global model reaches a preset accuracy threshold. Other conditions for stopping training can also be set, which are not specifically limited here.

[0109] Step S600, in response to triggering a committee node update event, re-execute the step of the organizer dividing the participants in the blockchain into ordinary nodes and committee nodes to obtain updated ordinary nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities.

[0110] In this way, the one with the highest cumulative contribution score is selected. nodes as new committee nodes, and the rest The nodes are treated as ordinary nodes and a new round of training is started. The specific identity division steps can be referred to the above description and will not be repeated here. Furthermore, the above method also includes: when the time for executing federated learning in the above blockchain reaches a preset time window threshold, or when a node update signal triggered by a target object is received, the above committee node update event is triggered.

[0111] In the embodiment of the present application, the time for executing federated learning reaches the preset time window threshold as an example for specific description, but it is not a specific limitation. It should be noted that the time window threshold can be preset and adjusted according to actual needs. In the actual application process, the committee node update event can also be triggered when the global training round of executing federated learning reaches the preset round threshold; or the user can input a node update signal according to actual needs to trigger the committee node update event.

[0112] As can be seen from the above, in the decentralized federated learning method provided by the embodiment of the present application, federated learning is performed based on blockchain, and data aggregation is performed based on committee nodes in the blockchain, and the committee nodes are not fixed. When a committee node update event is triggered, the corresponding ordinary nodes and committee nodes will be updated. In this way, the impact of single point failure problems when using a fixed central point server for data aggregation can be reduced, which is conducive to improving the accuracy of model training in federated learning.

[0113] The embodiment of this application is based on the decentralized committee mechanism of blockchain-based federated learning, and achieves maximum collective utility with minimum energy consumption by designing a more flexible, universal, and sophisticated committee organizational structure and a more reasonable gradient evaluation and screening system. At the same time, on the basis of decentralization, a federated learning incentive mechanism scheme based on a time window to measure the node contribution evaluation system is designed to encourage nodes to honestly and actively participate in the tasks of federated learning, so as to promote the effective implementation and sustainable development of federated learning.

[0114] Blockchain technology has the characteristics of decentralization, immutability, and openness and transparency. In the embodiments of this application, the transparency and security of the federated learning process are guaranteed based on blockchain technology, and smart contracts are set up to ensure the automated execution of the federated learning process. The incentive mechanism design based on the time window algorithm makes the quality of model training higher. It provides a solution to the single point failure problem of federated learning, and on this basis, through the design of rules and processes, the performance of federated learning is improved. At the same time, the design of the time window algorithm can motivate the participants of federated learning to actively participate in the training and improve the timeliness of model training data.

[0115] It should be noted that the decentralized federated learning method provided in the embodiment of the present application can be applied to different technical fields to realize the training of models required for different technical fields. For example, it can be applied to the field of medical data processing technology. On the basis of protecting the patient's privacy data, data from different sources are summarized and analyzed to improve the accuracy of relevant data analysis and prediction. It can be applied to the field of financial technology. Through decentralized federated learning, the prediction accuracy of the model can be improved without disclosing customer privacy information. It can be applied to the field of smart home or Internet of Things technology to realize federated learning between devices, thereby improving the intelligence and user experience of smart home systems or Internet of Things systems. It can also be applied to the field of intelligent transportation technology to realize federated learning between different vehicles and transportation facilities, and improve the intelligence and efficiency of the transportation system.

[0116] Specifically, based on the decentralized federated learning method provided in the embodiment of the present application, model training between multiple participants can be realized to improve the accuracy and efficiency of the model. Data sharing and knowledge sharing can also be realized, and data sharing and knowledge sharing between multiple participants can be realized under the premise of protecting data privacy. Decision support can also be realized, and decentralized federated learning can be used to provide users with more accurate and efficient decision support. It can also be used to optimize existing algorithms to improve the efficiency and accuracy of the algorithms.

[0117] It should be noted that the model trained in the embodiments of the present application may be a linear regression model (LinearRegression Model), a convolutional neural network (CNN), a recurrent neural network (RNN), a decision tree model (Decision Tree Model), a support vector machine (SVM), etc.

[0118] In the embodiments of the present application, the processing of the above-mentioned partial models is taken as an example for specific description, but it is not a specific limitation.

[0119] Specifically, when processing the convolutional neural network, it is based on the following steps:

[0120] Step 1: Model initialization and task allocation. In the blockchain-based federated learning system, the organizer will first publish the initial structure and configuration information of the CNN model in the consortium chain. The configuration information includes the number of CNN layers, the size of the convolution kernel, the type of activation function (such as ReLU or Sigmoid), the optimizer (such as Adam or SGD), the learning rate and other parameters. Each participant node (ordinary node and committee node) obtains the structure and initial parameters of the CNN model through the blockchain and prepares for local training.

[0121] Step 2: Local training. Each common node uses its own private data to train the CNN model locally. The training data can be image data (such as handwritten numbers, photographed images, etc.). Each common node updates the weight parameters of the CNN based on the characteristics of the local data and generates an updated local model. For example, a common node may perform multiple iterations of training on the convolution layer based on its local data set to reduce the training error and then update the convolution kernel parameters of the CNN.

[0122] Step 3: Upload the model to the blockchain. After the ordinary node completes local training, it uploads the updated CNN model to the blockchain. Other nodes (especially committee nodes) can obtain these updated models through the blockchain.

[0123] Step 4: Committee node aggregation model: The committee node obtains the local CNN models uploaded by all ordinary nodes from the blockchain, and calculates the aggregated global CNN model based on the contribution scores of each ordinary node. The committee node determines the contribution score of each node based on the model accuracy provided by the ordinary node, and performs a weighted average of each model to generate a new global CNN model. The committee node uploads the aggregated global model to the blockchain for the next round of training.

[0124] Step 5: Committee node update. When a committee node update event is triggered (for example, a preset time window or training round is reached), the organizer re-divides ordinary nodes and committee nodes, selects new committee nodes based on the contribution score or randomly, and continues the next round of model training and aggregation.

[0125] When processing the linear regression model, the steps are as follows:

[0126] Step 1: Model initialization and task assignment. The organizer publishes the initial parameters of the linear regression model (such as weight vectors and bias terms) to the blockchain and distributes the configuration information to each participating node. The linear regression model has a relatively simple structure and a small number of parameters, which is suitable for processing some data sets with strong linear relationships (such as price prediction, etc.). Each ordinary node and committee node obtains the initial linear regression model parameters from the blockchain and prepares for local training.

[0127] Step 2: Local training: Each common node performs local training on the linear regression model based on a local data set (such as a price data set or a sales data set). The goal of the training is to adjust the weights and bias terms of the model by minimizing the loss function (such as the mean square error). Each common node calculates new weights and bias terms based on the characteristics of the local data set to generate a locally updated linear regression model.

[0128] Step 3: Upload the model to the blockchain. Ordinary nodes upload the updated linear regression model to the blockchain for committee nodes to aggregate the model.

[0129] Step 4: Committee node aggregation model: The committee node obtains the linear regression model uploaded by the ordinary node from the blockchain, and calculates the weighted average global linear regression model based on the contribution score of the ordinary node. The committee node calculates the contribution score of each ordinary node based on its model accuracy, and weights its model to generate a new global linear regression model.

[0130] Step 5, committee node update. After the committee node update event is triggered, the organizer re-divides the nodes in the blockchain, selects new committee nodes, and continues to process the linear regression model.

[0131] In one application scenario, when processing a decision tree model, the system distributes the initial structure of the decision tree (such as the depth of the tree, splitting criteria, etc.) to each participating node. Each ordinary node trains the decision tree model based on the local data set, generates a local decision tree and uploads it to the blockchain. The committee node aggregates the decision trees of each ordinary node and generates a global decision tree model using weighted voting or other methods.

[0132] In another application scenario, when processing the SVM model, the system first distributes the initial parameters of the model (such as kernel function type, penalty factor, etc.) to each participating node. Each ordinary node optimizes the hyperplane based on the local data set and updates the model parameters. The committee node aggregates and generates a new global hyperplane model based on the contribution scores of the ordinary nodes.

[0133] In this way, based on the decentralized federated learning method provided in the embodiment of the present application, through blockchain technology, each node can train the model based on local data while protecting data privacy, and generate a global model through committee node aggregation.

[0134] like Figure 3 As shown in , corresponding to the above-mentioned decentralized federated learning method, the embodiment of the present application further provides a decentralized federated learning system, and the above-mentioned decentralized federated learning system includes:

[0135] A participant control module 310 is used to control the participants of federated learning to join the blockchain, wherein the participants include an organizer and multiple participants;

[0136] A node division module 320, used to divide the participants in the above blockchain into ordinary nodes and committee nodes through the above organizer;

[0137] The node control module 330 is used to control the above-mentioned common nodes and the above-mentioned committee nodes to respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the above-mentioned blockchain, and to update the local model based on the above-mentioned global model to be trained to obtain the local model after the previous round of training is completed;

[0138] The model training module 340 is used to control the common node to perform model training on the local model after the previous round of training according to the node local data and the federated learning task configuration information, obtain the local training model of the current round, and upload the local training model to the blockchain;

[0139] The model aggregation module 350 is used to control the committee node to obtain the local training model through the blockchain, determine the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determine the contribution score corresponding to the committee node according to the global model after the current round of training is completed;

[0140] The update trigger module 360 ​​is used to trigger the node division module 320 to re-execute the step of the organizer dividing the participants in the blockchain into ordinary nodes and committee nodes in response to triggering the committee node update event, so as to obtain updated ordinary nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities.

[0141] In this way, federated learning is performed based on blockchain, and data aggregation is performed based on committee nodes in the blockchain. However, committee nodes are not fixed, and when a committee node update event is triggered, the corresponding ordinary nodes and committee nodes will be updated. In this way, the impact of single point failure problems when using a fixed central point server for data aggregation can be reduced, which is conducive to improving the accuracy of model training in federated learning.

[0142] It should be noted that the specific structure and implementation method of the above-mentioned decentralized federated learning system and its various modules or units can refer to the corresponding description in the above-mentioned method embodiment, and will not be repeated here.

[0143] It should be noted that the division method of each module of the above-mentioned decentralized federated learning system is not unique and is not specifically limited here.

[0144] Based on the above embodiments, the present application also provides a smart terminal, whose principle block diagram can be as follows: Figure 4 As shown. The above-mentioned intelligent terminal includes a processor, a memory, a network interface and a display screen connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a decentralized federated learning program. The internal memory provides an environment for the operation of the operating system and the decentralized federated learning program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the decentralized federated learning program is executed by the processor, the steps of any of the above-mentioned decentralized federated learning methods are implemented. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.

[0145] Those skilled in the art will understand that Figure 4The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the smart terminal to which the solution of the present application is applied. The specific smart terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0146] In one embodiment, a smart terminal is provided, which includes a memory, a processor, and a decentralized federated learning program stored in the memory and executable on the processor. When the decentralized federated learning program is executed by the processor, the steps of any one of the decentralized federated learning methods provided in the embodiments of the present application are implemented.

[0147] An embodiment of the present application also provides a computer-readable storage medium, on which a decentralized federated learning program is stored. When the decentralized federated learning program is executed by a processor, the steps of any one of the decentralized federated learning methods provided in the embodiment of the present application are implemented.

[0148] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0149] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0150] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0151] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0152] In the embodiments provided in the present application, it should be understood that the disclosed system / terminal device and method can be implemented in other ways. For example, the system / terminal device embodiments described above are only schematic, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0153] If the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0154] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A decentralized federated learning method, characterized in that: The method comprises: Participants of federated learning join the blockchain, wherein the participants include an organizer and multiple participants; The organizer divides the participants in the blockchain into ordinary nodes and committee nodes; The common node and the committee node respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the blockchain, and perform local model update based on the global model to be trained to obtain the local model after the previous round of training is completed; The common node performs model training on the local model after the previous round of training according to the node local data and the federated learning task configuration information, obtains the local training model of the current round, and uploads the local training model to the blockchain; The committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the ordinary node according to the local training model and the global model after the current round of training is completed, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed; In response to triggering a committee node update event, re-execute the step of the organizer dividing the participants in the blockchain into common nodes and committee nodes to obtain updated common nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities; The organizer divides the participants in the blockchain into ordinary nodes and committee nodes, including: the organizer obtains a target number of nodes; if the participants in the blockchain have corresponding contribution scores, the organizer selects the target number of participants from all participants in the blockchain as committee nodes according to the corresponding contribution scores of the participants, and selects the other participants as ordinary nodes; The organizer determines the target number of nodes based on the number of nodes in federated learning by the following formula: ; is the target node number, is the number of federated learning nodes, is the preset control factor, The preset lower limit of the number of committee nodes; The committee node obtains the local training model through the blockchain, determines the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determines the contribution score corresponding to the committee node according to the global model after the current round of training is completed, including: The committee node obtains the local training model corresponding to the common node through the blockchain, and determines the contribution score of the common node in the current round according to the model accuracy of the local training model obtained; The committee node weights the local training model corresponding to the common node according to the contribution score of the common node in the current round, so as to obtain the global model after the current round of training is completed; The committee node determines the contribution score of the committee node in the current round according to the model accuracy of the global model after the current round of training is completed.

2. The decentralized federated learning method according to claim 1, characterized in that: The method further comprises: If a participant in the blockchain does not have a corresponding contribution score, the organizer randomly selects a target number of participants from all participants in the blockchain as committee nodes, and treats other participants as ordinary nodes.

3. The decentralized federated learning method according to claim 1, characterized in that: The contribution score corresponding to the participant is the contribution score of the participant in the current round; Alternatively, the contribution score corresponding to the participant is a cumulative contribution score determined based on the contribution score of the participant in the current round and the contribution scores of the participant in historical rounds.

4. The decentralized federated learning method according to claim 1, characterized in that: The method further comprises: The committee node uploads the global model after the current round of training, the contribution scores of the ordinary nodes in the current round, and the contribution scores of the committee nodes in the current round to the blockchain, and uses the global model after the current round of training as the global model to be trained in the next round.

5. The decentralized federated learning method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the time for executing federated learning in the blockchain reaches a preset time window threshold, or a node update signal triggered by a target object is received, the committee node update event is triggered.

6. A decentralized federated learning system, characterized in that: The system comprises: A participant control module, used to control the participants of federated learning to join the blockchain, wherein the participants include an organizer and multiple participants; A node division module, used to divide the participants in the blockchain into ordinary nodes and committee nodes through the organizer; A node control module, used to control the common node and the committee node to respectively obtain the federated learning task configuration information and the global model to be trained in the current round based on the blockchain, and to update the local model based on the global model to be trained to obtain the local model after the previous round of training is completed; A model training module, used to control the common node to perform model training on the local model after the previous round of training according to the node local data and the federated learning task configuration information, obtain the local training model of the current round, and upload the local training model to the blockchain; A model aggregation module, used to control the committee node to obtain the local training model through the blockchain, determine the contribution score corresponding to the ordinary node and the global model after the current round of training is completed according to the local training model, and determine the contribution score corresponding to the committee node according to the global model after the current round of training is completed; An update trigger module is used for, in response to a triggering committee node update event, triggering the node division module to re-execute the step of the organizer dividing the participants in the blockchain into common nodes and committee nodes to obtain updated common nodes and updated committee nodes, wherein the participants are divided according to the contribution scores corresponding to the participants, or the participants are randomly divided into identities; The node division module is specifically used to control the organizer to perform the following steps: obtain the target number of nodes; if the participants in the blockchain have corresponding contribution scores, the organizer selects the target number of participants from all participants in the blockchain as committee nodes according to the contribution scores corresponding to each participant, and selects other participants as ordinary nodes; The organizer determines the target number of nodes based on the number of nodes in federated learning by the following formula: ; is the target node number, is the number of federated learning nodes, is the preset control factor, The preset lower limit of the number of committee nodes; The decentralized federated learning system is also used to: Control the committee node to obtain the local training model corresponding to the common node through the blockchain, and determine the contribution score of the common node in the current round according to the model accuracy of the local training model obtained; Control the committee node to weight the local training model corresponding to the common node according to the contribution score of the common node in the current round, so as to obtain the global model after the current round of training is completed; The committee node is controlled to determine the contribution score of the committee node in the current round according to the model accuracy of the global model after the current round of training is completed.

7. An intelligent terminal, characterized in that: The intelligent terminal includes a memory, a processor, and a decentralized federated learning program stored in the memory and executable on the processor. When the decentralized federated learning program is executed by the processor, the steps of the decentralized federated learning method as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a decentralized federated learning program, and when the decentralized federated learning program is executed by a processor, the steps of the decentralized federated learning method as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Decentralization federated learning method based on double chains

    CN118228306A