Decentralized federated learning method and system oriented to computing power network
By combining blockchain and federated learning in the computing power network, the problems of data heterogeneity, unreasonable incentive mechanism design and lack of reliability of node selection mechanism are solved, and the effects of data fairness and long-term participation of nodes are achieved, and the generality of the model and the stability of the system are improved.
Patent Information
- Application Number
- CN202411601913.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
The existing technology cannot effectively deal with data diversity and heterogeneity in computing power networks, resulting in poor model training effects, unreasonable incentive mechanism design, affecting the long-term participation enthusiasm of nodes, lack of reliability and dynamic adaptability of node selection mechanisms, affecting the stability and data quality of model training.
By combining blockchain with federated learning, it provides a transparent and trustworthy environment, leveraging blockchain's decentralized consensus mechanism and an immutable distributed ledger to achieve transparency and impartiality in data contributions and model parameter updates. Weighted aggregation algorithm based on data fairness is adopted, combined with dynamic multi-dimensional incentive mechanisms and node selection mechanisms with comprehensive reputation and data quality, to ensure data fairness and long-term participation enthusiasm of nodes.
It improves the flexibility of data processing in the computing power network and the generality of the model, ensures the fairness of data and the long-term participation of nodes, enhances the effectiveness and robustness of the model, and improves the stability and sustainability of the system.
Smart Images

Figure CN119558426A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of federated learning, and in particular, relates to a decentralized federated learning method and system for a computing power network. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of information technology, the demand for massive data and complex computing tasks is growing. The traditional centralized computing model faces many challenges, such as computing resource bottlenecks, insufficient data privacy protection, and high latency and high cost of data transmission. These challenges have prompted the emergence of new computing architectures. As a decentralized computing model, the computing network achieves resource sharing and efficient utilization through the collaborative work of multiple nodes. This architecture not only improves computing power, but also enhances the resilience and security of the system. However, with the increasing prominence of data privacy and security issues, the traditional centralized data processing method is no longer applicable.
[0004] In this context, federated learning came into being. This is an innovative distributed machine learning method that allows multiple participants to collaboratively train a global model without sharing data. Each participant trains on local data and only sends model parameters to a central server or other participants for aggregation. This distributed machine learning method complements the computing power network and makes full use of the computing resources and data advantages of all parties. Although this method has significant advantages in protecting data privacy, the effect of federated learning may not be ideal due to the large differences in data volume, quality, and computing power among the participants. In this case, the imbalance of the computing power network further amplifies the data unfairness in federated learning.
[0005] Data fairness is a core issue in federated learning. In a computing network environment, the data of nodes are of various types, quantities, and quality, resulting in a very prominent problem of data heterogeneity. Participants with low-quality or small amounts of data may contribute less to the global model, or even be ignored, resulting in bias in the model. Conversely, participants with higher data quality may have too much influence on the model, resulting in overfitting of the model to these data sets. Traditional federated learning methods generally assume that the data distribution of each node is similar, but in practical applications, this assumption is difficult to hold. Therefore, simple model aggregation methods (such as averaging or fixed weights) will lead to poor model training results due to uneven data distribution. In addition, nodes with stronger computing power will also have an advantage in the system because they can participate in model updates more frequently, further exacerbating the unfairness of data use. Therefore, existing federated learning methods cannot effectively cope with the diversity and heterogeneity of data in computing networks, resulting in limited overall performance of the model.
[0006] In addition, due to the large number of nodes in the computing network and their wide distribution, the stability and credibility of the nodes vary significantly. The existing node selection mechanism often relies on simple rules or historical contributions, and lacks a comprehensive evaluation of the real-time quality, credibility, and data validity of the nodes. As a result, the system may select some unsuitable nodes, making it difficult to ensure the data quality during the model training process. Due to the lack of an effective credibility mechanism, some nodes may have malicious behaviors, such as providing low-quality data or inaccurate calculation results, which in turn affects the accuracy and stability of the global model. The introduction of blockchain technology provides new possibilities for this. Using the transparency and immutability of blockchain to record the historical contributions, data quality, and behavioral norms of each participant can significantly improve the reliability and dynamic adaptability of the node selection mechanism.
[0007] Finally, blockchain can also be used to build decentralized incentive mechanisms. However, existing incentive mechanisms often only consider the computing resources or participation times of nodes, while ignoring the quality and freshness of data. Such a distribution method can easily lead to unfair incentives for low-quality nodes, which will dampen the enthusiasm of high-quality data providers. Studies have shown that many existing incentive mechanisms lack long-term considerations, making it difficult for nodes to maintain long-term contributions after short-term participation, which in turn affects the stability and sustainability of the system.
[0008] Therefore, the existing technology still has the following problems in the application of computing power network and federated learning: (1) The ability to process data heterogeneity is limited, resulting in poor model training results; (2) The incentive mechanism is not designed reasonably, affecting the long-term participation enthusiasm of nodes; (3) The node selection mechanism lacks reliability and dynamic adaptability, affecting the stability of model training and data quality. Summary of the invention
[0009] In order to address the deficiencies of the prior art, the present invention provides a decentralized federated learning method, system, electronic device, computer-readable storage medium and computer program product for a computing power network. The present invention achieves the goal of ensuring the availability of the federated learning model and the enthusiasm of node training while improving the versatility of the model and the fairness of data.
[0010] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0011] In a first aspect, the present invention provides a decentralized federated learning method for a computing power network, comprising:
[0012] After the computing nodes in the computing network are registered on the blockchain network, the model demanders in the computing network upload the federated learning tasks to the blockchain network for broadcasting, and other computing nodes respond to the federated learning tasks broadcast by the blockchain network; the responded computing nodes are screened according to their reputation and data scores, and the screened computing nodes are used as computing nodes;
[0013] After the initial model sent by the model demander is trained locally by the computing node, the trained local model is uploaded to the blockchain network for verification. The blockchain network sends the verified local model to the model demander.
[0014] The model demander uses a weighted aggregation algorithm based on data fairness to aggregate the local models received in the current round and use the aggregation results to update the global model; if the updated global model meets the requirements of the federated learning task, the global model will be stored in the blockchain, and rewards will be distributed to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model will be used as the initial model for the next round of training of the computing nodes for iterative training.
[0015] In a second aspect, the present invention provides a decentralized federated learning system for a computing power network, comprising:
[0016] The node registration and federated learning task response module is configured as follows: after the computing power nodes in the computing power network register on the blockchain network, the model demander in the computing power network uploads the federated learning task to the blockchain network for broadcasting, and other computing power nodes respond to the federated learning task broadcasted by the blockchain network; the computing power nodes that have responded are screened according to their reputation points and data points, and the screened computing power nodes are used as computing nodes;
[0017] The local model training module is configured as follows: after the initial model sent by the model demander is trained locally by the computing node, the trained local model is uploaded to the blockchain network for verification, and the blockchain network sends the verified local model to the model demander;
[0018] The global model update module is configured as follows: the model demander uses a weighted aggregation algorithm based on data fairness to aggregate the local models received in the current round and use the aggregation results to update the global model; if the updated global model meets the requirements of the federated learning task, the global model is stored in the blockchain, and rewards are distributed to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model is used as the initial model for the next round of training of the computing nodes for iterative training.
[0019] In a third aspect, the present invention provides an electronic device;
[0020] An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned decentralized federated learning method for a computing power network.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium;
[0022] A computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps of the above-mentioned decentralized federated learning method for a computing power network.
[0023] In a fifth aspect, the present invention provides a computer program product;
[0024] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned decentralized federated learning method for a computing power network.
[0025] One or more of the above technical solutions have the following beneficial effects:
[0026] (1) The present invention combines blockchain with federated learning in the context of a computing power network, providing a transparent and trustworthy environment for federated learning. In a computing power network, the diversity and redundancy of node data may lead to an increase in the complexity of data processing. Through the decentralized consensus mechanism and tamper-proof distributed ledger of the blockchain, the data contribution of each node and the model parameter update process become transparent and fair. Blockchain smart contracts can dynamically manage the data quality and computing power resource allocation of each node, avoiding data monopoly and inequality in traditional centralized systems. Combined with the weighted aggregation algorithm of federated learning, the present invention can dynamically adjust according to the validity and contribution of node data to ensure data fairness. This integrated architecture not only improves the flexibility of data processing in the computing power network, but also provides a more robust and scalable solution for cross-domain collaborative computing.
[0027] (2) The present invention combines a dynamic multi-dimensional incentive mechanism with federated learning. Compared with federated learning using other incentive mechanisms, the present invention distributes rewards based on cosine similarity, the freshness of the data set, and the amount of data. Cosine similarity can accurately measure the similarity of the models provided by the nodes, the freshness of the data ensures the sensitivity of the model to the latest information, and the amount of data measures the contribution scale of each node. Through this sophisticated incentive mechanism, the system can effectively encourage participants to provide high-quality and timely data while ensuring fair distribution of incentive rewards.
[0028] (3) The present invention uses a node selection mechanism that integrates reputation and data quality. Compared with other existing node selection mechanisms, this mechanism ensures that the data provided by the selected node is not only sufficient in quantity, but also meets the standards in terms of quality and timeliness by comprehensively evaluating the size of the node's data set, its newness, and its reputation score. This comprehensive evaluation method helps to improve the representativeness and accuracy of the training data, thereby enhancing the effectiveness and robustness of the model. Secondly, by introducing reputation scores, the mechanism can identify and prioritize reliable nodes, reducing model training deviations caused by node dishonesty or provision of low-quality data. This not only improves the stability of the model, but also enhances the system's ability to supervise node behavior.
[0029] (4) The present invention uses a weighted aggregation algorithm based on data fairness to effectively enhance the performance of the global model. Newer and more reliable data sets and more trusted nodes are given higher weights in model updates, ensuring the model's rapid adaptability to new information and improving the overall generalization ability of the model. This mechanism not only ensures the priority use of high-quality data, but also reduces the negative impact that old data may have on the model, making the global model more accurate and effective.
[0030] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0032] Figure 1 This is a flow chart of a method according to an embodiment of the present invention.
[0033] Figure 2 This is a functional diagram of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0035] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0037] Terminology explanation:
[0038] (1) Computing network refers to the formation of a highly coordinated and virtualized computing platform by connecting and integrating distributed computing resources (such as servers, workstations, cloud computing resources, edge devices, etc.) through a network. The network aims to integrate decentralized computing power, storage resources, and data resources to provide users with on-demand and elastically scalable computing services.
[0039] (2) Federated learning is a distributed machine learning framework that allows multiple participants (such as different devices, organizations, or edge nodes) to collaboratively train a global model without sharing the original data. Each participant uses its own data to train the model locally and only uploads the model parameters or gradients to the central server or coordination node. These updates are then aggregated in the global model. In this way, federated learning effectively protects the data privacy of each participant and avoids the risk of data being centrally stored or transmitted during the training process.
[0040] (3) Blockchain is a decentralized distributed ledger technology that records data in consecutive blocks and uses encryption technology to ensure the security and immutability of data. Each block contains a set of transactions or data records and is linked to the previous block through encrypted hashes to form a chain structure, hence the name "blockchain".
[0041] (4) Cosine similarity is a method to measure the similarity between the directions of two vectors. It calculates the cosine value of the angle between the two vectors and is usually used to calculate text similarity or similarity in vector space models.
[0042] (5) Euclidean distance is a metric used to calculate the straight-line distance between two points. It can be used to measure the similarity or difference between points and is widely used in various fields such as machine learning, image processing, and pattern recognition.
[0043] (6) Data fairness mainly refers to the degree to which the data contributions of each participating node are treated equally, that is, whether the influence of the data of different nodes in the final aggregation result can reflect its actual value and quality, rather than favoring the data of certain nodes due to a single factor (such as large data volume).
[0044] Embodiment 1
[0045] like Figure 1 , Figure 2 As shown, this embodiment discloses a decentralized federated learning method for a computing power network, including:
[0046] Step 1: Deploy multiple smart contracts on the blockchain network, establish a federated learning blockchain network of the computing power network and register nodes; the model demander in the computing power network uploads the federated learning task to the blockchain network for broadcasting, and other computing power nodes in the computing power network respond to the federated learning task; the computing power network calls the model training smart contract, screens the responding computing power nodes according to the node selection mechanism based on comprehensive reputation and data quality, and uses the screened computing power nodes as computing nodes to participate in training;
[0047] Step 2: The computing nodes in the computing network start training after receiving the initial model sent by the model demander. After the training is completed, the local model is sent to the blockchain network;
[0048] Step 3: After receiving the local model, the blockchain network calls the model verification smart contract to verify the local model, stores the hash value and related information of the local model, and then updates the reputation score of the computing node;
[0049] Step 4: The model demander in the computing power network uses a weighted aggregation algorithm based on data fairness to aggregate the received local models, and uses the aggregation results to update the global model; after the model demander and the blockchain jointly calculate the contribution points of the computing power nodes and write them into the new block; determine whether the updated global model meets the requirements of the federated learning task. If the updated global model meets the requirements of the federated learning task, the relevant information is stored in the blockchain, and the blockchain distributes rewards to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model is used as the initial model for the next round of training.
[0050] In step 1, a blockchain-based federated learning task framework is constructed under the computing network, including:
[0051] Step 101: Blockchain initialization: The computing network establishes a federated learning blockchain network and deploys smart contracts through the distributed ledger platform, and executes corresponding tasks by calling smart contracts;
[0052] Among them, the deployed smart contracts include: a registration smart contract for executing node registration tasks, a model training smart contract for executing model training tasks, and a model verification smart contract for executing model verification tasks.
[0053] Step 102: Registering nodes: The computing nodes in the computing network register as blockchain nodes in the blockchain network and submit metadata of their data sets (data volume V, data type DType, and the length of time A from when the data was generated to now).
[0054] Step 103: Attribute vector generation: After successful registration, the registration smart contract will generate a vector containing node id, IP address, and reputation score Rs for each node r. r 、Data points r And the attribute vector of the token quantity Token and the credit score Rs r Initialized to 100, the number of tokens Token is initialized to 0. Finally, the initial data score Ds is calculated based on the metadata submitted by the blockchain node r ;Ds r The calculation formula is as follows:
[0055]
[0056] Where V max is the maximum amount of data expected in the computing network, 0 <w V , w A <1, and w V +w A =1.
[0057] Step 104: The model demander (any node that has been registered on the blockchain) calls the model training smart contract and publishes the detailed information of the federated learning task (task ID, maximum number of iterations, target accuracy, required data type and total reward for completing the task, etc.) to the blockchain to form a new block.
[0058] Step 105: Model training task broadcast: The blockchain network broadcasts the transaction information of the task to all computing nodes; each computing node can obtain detailed information about the task and evaluate whether it is capable of performing the task.
[0059] Step 106: Node response: The computing nodes that are interested and have the execution capability will submit a response transaction to the blockchain network, indicating their willingness to take on the federated learning task.
[0060] Step 107: Computing node selection: The computing network calls the model training smart contract on the blockchain to achieve the reputation score Rs based on the responded computing node r. r and data pointsr To measure its calculation score S r , and select the first n computing power nodes as computing nodes to execute the task.
[0061] Calculation Score r The formula is as follows:
[0062]
[0063] Where α is the weight coefficient, 0<α<1; β and δ are nonlinear parameters, 1≤β, δ≤2; γ is the adjustment parameter, 0.5<γ<2.
[0064] In step 2, the local model training process includes:
[0065] Step 201: The computing node k (the selected computing node) receives the initial model w sent by the model demander t-1 After that, the federated learning task begins, using its local data and computing resources to train the model.
[0066] Step 202: After the training of computing node k is completed, the local model trained in round t is Send to the blockchain network.
[0067] In step 3, the local model validation process includes:
[0068] The blockchain calls the model verification smart contract to receive the local model parameters Verify; determine whether the local model is qualified by calculating the Euclidean distance between the two local model parameters, store the relevant information of the local model, and update the reputation score Rs of the computing node.
[0069] Step 301: Calculate the Euclidean distance as: Calculate the current round of local model by calling the model verification smart contract and the previous global model w t-1 The Euclidean distance between:
[0070]
[0071] In the formula, is the parameter vector of the current local model, is the parameter vector of the previous global model, and n is the dimension of the parameter vector.
[0072] Step 302: Model qualification judgment: A threshold is set in the model verification smart contract ∈ (usually set between 1 and 10. If the data heterogeneity in the computing network is large, ∈ may be set larger to allow for greater errors). If it is less than or equal to ∈, the local model is considered to have passed the verification, i.e., qualified; otherwise, it is unqualified.
[0073] Step 303: Model parameter information storage: The blockchain sends the qualified model parameters to the model demander and stores the hash value and basic information of the model parameters in a new block.
[0074] Step 304: Reputation score update: Update the reputation score Rs of the computing node k according to the Euclidean distance k The update formula is as follows:
[0075]
[0076] In the formula, is the reputation score of node k in the previous round, that is, the current reputation score; α is an adjustment factor, 0<α<0.1.
[0077] In step 4, the updating process of the global model includes:
[0078] When the model demander receives a certain number of model parameters, a weighted aggregation algorithm based on data fairness is used to aggregate local model parameters, and the aggregated parameters are used to update the global model; specifically, the following steps are performed:
[0079] Step 401: Calculate DF parameters: The model demander calculates the reputation score Rs of node k k and data points k To calculate the parameter DF of the weighted aggregation algorithm k The formula is as follows:
[0080]
[0081] In the formula, Rs k is the reputation score of computing node k; Ds k is the data score of computing node k; α is a hyperparameter that adjusts the influence of reputation score, 1<α<2; n is the number of received local model parameters. The calculation of data score includes the newness of the data, avoiding the bias of relying solely on the amount of data; the addition of reputation score ensures that the model will not be affected too much by malicious or negative nodes, thus ensuring data fairness.
[0082] Step 402: Global model aggregation: The model demander aggregates the global model w of the previous round t-1 The weighted aggregation is performed with the local model parameters uploaded by n clients, which can be expressed as:
[0083]
[0084] Step 403: Calculate contribution points: After successful aggregation, the model demander calculates the local model parameters and the aggregated global model parameters w t The blockchain is divided into Ds according to the cosine similarity and data. k To evaluate the contribution score CF of computing node k k , and write the contribution points into the new block. Contribution points CF k The calculation formula is as follows:
[0085]
[0086] Step 404: New model verification: If the aggregated global model does not meet the accuracy requirements of the model demander, the new global model will be sent to the blockchain, which will forward it to the computing nodes participating in the training as the initial model for the next round of training and proceed to step 8 for a new round of iterative learning; if the aggregated global model meets the requirements of the model demander, the relevant information on the completion of the training will be sent to the blockchain network.
[0087] Step 405: When the blockchain receives the training completion information, it writes the information into a new block, triggering the reward distribution smart contract to sort the contribution points of all computing nodes. The top 10% share 40% of the total reward, and the computing nodes ranked 10%-30%, 30%-60%, and 60%-100% share 30%, 20%, and 10% of the total reward respectively.
[0088] Embodiment 2
[0089] This embodiment discloses a decentralized federated learning system for a computing power network, including:
[0090] The node registration and federated learning task response module is configured as follows: after the computing power nodes in the computing power network register on the blockchain network, the model demander in the computing power network uploads the federated learning task to the blockchain network for broadcasting, and other computing power nodes respond to the federated learning task broadcasted by the blockchain network; the computing power nodes that have responded are screened according to their reputation points and data points, and the screened computing power nodes are used as computing nodes;
[0091] The local model training module is configured as follows: after the initial model sent by the model demander is trained locally by the computing node, the trained local model is uploaded to the blockchain network for verification, and the blockchain network sends the verified local model to the model demander;
[0092] The global model update module is configured as follows: the model demander uses a weighted aggregation algorithm based on data fairness to aggregate the local models received in the current round and use the aggregation results to update the global model; if the updated global model meets the requirements of the federated learning task, the global model is stored in the blockchain, and rewards are distributed to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model is used as the initial model for the next round of training of the computing nodes for iterative training.
[0093] It should be noted that the above modules correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Embodiment 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0094] Embodiment 3
[0095] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned decentralized federated learning method for a computing power network are completed.
[0096] Embodiment 4
[0097] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned decentralized federated learning method for a computing power network are completed.
[0098] Embodiment 5
[0099] Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned decentralized federated learning method for a computing power network.
[0100] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0104] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A decentralized federated learning method for computing power networks, characterized in that: include: After the computing nodes in the computing network register on the blockchain network, the model demanders in the computing network upload the federated learning tasks to the blockchain network for broadcasting, and other computing nodes respond to the federated learning tasks broadcasted by the blockchain network; Filter the responded computing nodes according to their reputation and data scores, and use the filtered computing nodes as computing nodes; After the initial model sent by the model demander is trained locally by the computing node, the trained local model is uploaded to the blockchain network for verification. The blockchain network sends the verified local model to the model demander. The model demander uses a weighted aggregation algorithm based on data fairness to aggregate the local models received in the current round and use the aggregation results to update the global model; if the updated global model meets the requirements of the federated learning task, the global model will be stored in the blockchain, and rewards will be distributed to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model will be used as the initial model for the next round of training of the computing nodes for iterative training.
2. A decentralized federated learning method for computing power network as claimed in claim 1, characterized in that: Before registering a node, it also includes: deploying multiple smart contracts on the blockchain network and executing corresponding tasks by calling smart contracts; The smart contracts include a registration smart contract for executing node registration tasks, a model training smart contract for executing model training tasks, and a model verification smart contract for executing model verification tasks.
3. A decentralized federated learning method for computing power network as claimed in claim 1, characterized in that: The model demander is any computing power node in the computing power network that has been registered on the blockchain network.
4. A decentralized federated learning method for computing power network as claimed in claim 1, characterized in that: The trained local model is uploaded to the blockchain network for verification, including: The Euclidean distance between two local models is calculated, and the qualification of the local model is verified by judging whether the Euclidean distance reaches the set threshold.
5. A decentralized federated learning method for computing power network as claimed in claim 1, characterized in that: The weighted aggregation algorithm based on data fairness includes: calculating the aggregation weight according to the reputation score and data score of the computing node.
6. A decentralized federated learning method for computing power network as claimed in claim 1, characterized in that: The method of distributing rewards to computing nodes according to a dynamic multi-dimensional incentive mechanism includes distributing rewards according to cosine similarity, the newness of the data set, and the amount of data.
7. A decentralized federated learning system for computing power networks, characterized in that: include: The node registration and federated learning task response module is configured as follows: after the computing power nodes in the computing power network register on the blockchain network, the model demander in the computing power network uploads the federated learning task to the blockchain network for broadcasting, and other computing power nodes respond to the federated learning task broadcasted by the blockchain network; Filter the responded computing nodes according to their reputation and data scores, and use the filtered computing nodes as computing nodes; The local model training module is configured as follows: after the initial model sent by the model demander is trained locally by the computing node, the trained local model is uploaded to the blockchain network for verification, and the blockchain network sends the verified local model to the model demander; The global model update module is configured as follows: the model demander uses a weighted aggregation algorithm based on data fairness to aggregate the local models received in the current round and use the aggregation results to update the global model; if the updated global model meets the requirements of the federated learning task, the global model is stored in the blockchain, and rewards are distributed to the computing nodes according to the dynamic multi-dimensional incentive mechanism; otherwise, the updated global model is used as the initial model for the next round of training of the computing nodes for iterative training.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of a decentralized federated learning method for a computing power network as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of a decentralized federated learning method for a computing power network as described in any one of claims 1-6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of a decentralized federated learning method for a computing power network as described in any one of claims 1-6 are implemented.
Citation Information
Cited By
Federal game vulnerability detection method, device and equipment based on privacy protection
CN120455092A
Edge computing task collaborative processing method based on federated learning
CN122633416A
Edge computing task collaborative processing method based on federated learning
CN122633416B