A Method and System for Selecting Aggregation Nodes for Federated Learning

By dynamically evaluating the aggregation nodes in the federated learning system and selecting appropriate aggregation nodes using task-related parameters and credit ratings, the problems of inflexible node selection and insufficient security in traditional methods are solved, thereby improving the stability and security of the system.

CN123123435APending Publication Date: 2026-11-17ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510636315.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Traditional federated learning aggregation node selection mechanisms lack flexibility and adaptability, are susceptible to single points of failure or malicious node attacks, leading to degraded model performance and data leakage, and lack comprehensive evaluation of node reputation and performance.

Method used

This paper proposes a method for selecting aggregation nodes in federated learning. By obtaining task-related parameters of each aggregation node, such as historical performance, credit score and network latency, the method dynamically evaluates and selects suitable aggregation nodes. This includes weighted calculation based on credit rating, direct credit score, objective credit score and indirect credit score, and model aggregation combined with homomorphic encryption algorithm.

Benefits of technology

It improves the stability, security, and learning efficiency of the federated learning system, effectively identifies and eliminates malicious nodes, and ensures the rapid convergence and accuracy of the global model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123435A_ABST
    Figure CN123123435A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for selecting aggregation nodes in federated learning. The method includes: for any round of model aggregation in a target federated learning task, if the global model corresponding to the current model aggregation task has not converged, obtaining task-related parameters for each aggregation node. These task-related parameters are parameters related to the aggregation node executing completed model aggregation tasks and / or parameters related to each client node corresponding to the aggregation node executing historical model training tasks. The completed model aggregation tasks include historical model aggregation tasks and the current model aggregation task. Based on the task-related parameters, a target aggregation node is selected from the aggregation nodes to execute the next round of model aggregation tasks. This invention can dynamically select a suitable target aggregation node to execute the next round of model aggregation tasks, thereby improving the stability, security, and learning efficiency of the federated learning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for selecting aggregation nodes for federated learning. Background Technology

[0002] With the rapid development of artificial intelligence and big data technologies, federated learning, as a distributed machine learning framework, has been widely applied in various fields, especially in scenarios with high data privacy protection requirements, where it has become an important solution. Federated learning enables multiple data owners to collaboratively train machine learning models without directly sharing data. However, in the federated learning process, effectively selecting aggregation nodes and ensuring the credibility and security of the aggregation results are key issues for achieving efficient operation of the federated learning system.

[0003] Traditional federated learning aggregation node selection mechanisms typically rely on fixed rules, a fixed central aggregation server, or a pre-defined model. These mechanisms lack flexibility and adaptability, and are susceptible to single points of failure or central server corruption, leading to problems such as model performance degradation or data leakage. Therefore, an effective solution is urgently needed to address these issues. Summary of the Invention

[0004] To address the aforementioned problems, this invention provides a method and system for selecting aggregation nodes in federated learning.

[0005] This invention provides a method for selecting aggregation nodes in federated learning, comprising: For any round of model aggregation task in the target federated learning task, if the global model corresponding to the current model aggregation task has not converged, the task-related parameters corresponding to each aggregation node are obtained. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to each client node corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task. Based on the task-related parameters, select the target aggregation node from each aggregation node to execute the next round of model aggregation task.

[0006] According to the aggregation node selection method for federated learning provided by the present invention, the step of selecting the target aggregation node for performing the next round of model aggregation task from the aggregation nodes based on the task-related parameters includes at least one of the following: When the task-related parameters include historical performance parameters of the aggregate node in the completed model aggregation task, calculate the first matching degree between each historical performance parameter and the next round of model aggregation task, and determine the aggregate node corresponding to the historical performance parameter with the highest first matching degree as the target aggregate node for executing the next round of model aggregation task; When the task-related parameters include the historical performance parameters, reputation and network latency parameters of the aggregated node in the completed model aggregation task, based on the trained aggregated node prediction model, the historical performance parameters, reputation and network latency parameters corresponding to each aggregated node are processed respectively, and the target aggregated node for executing the next round of model aggregation task is selected from the aggregated nodes; When the task-related parameters include the historical performance parameters of the aggregated nodes in the completed model aggregation tasks, a trusted third party is invoked to evaluate the reputation of each aggregated node based on the historical performance parameters of each aggregated node, and the aggregated node with the highest reputation is determined as the target aggregated node to execute the next round of model aggregation tasks. When the task-related parameters include the first credit rating value of the aggregate node that has completed the model aggregation task, for each aggregate node, the sum of the first credit rating values ​​corresponding to the aggregate node is calculated, and the aggregate node with the highest sum of the first credit rating values ​​is determined as the target aggregate node for executing the next round of model aggregation task; When the task-related parameters include the second credit rating values ​​of each client node corresponding to the aggregation node for executing the historical model training task, a weighted sum of the second credit rating values ​​corresponding to each aggregation node is calculated for each aggregation node; the aggregation node with the highest weighted sum is determined as the target aggregation node for executing the next round of model aggregation task.

[0007] This invention also provides an aggregation node selection system for federated learning, comprising: The acquisition module is configured to acquire task-related parameters for each aggregation node when the global model corresponding to the current model aggregation task has not converged, for any round of model aggregation task in the target federated learning task. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to the client nodes corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task. The selection module is configured to select the target aggregation node from the aggregation nodes to perform the next round of model aggregation task based on the task-related parameters.

[0008] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aggregation node selection method for federated learning as described above.

[0009] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aggregation node selection method for federated learning as described above.

[0010] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aggregation node selection method for federated learning as described above.

[0011] The present invention provides a method and system for selecting aggregation nodes for federated learning. For any round of model aggregation in a target federated learning task, when the global model corresponding to the current model aggregation task has not converged, the method obtains task-related parameters for each aggregation node. These task-related parameters include parameters related to the aggregation node's execution of completed model aggregation tasks and / or parameters related to the client nodes corresponding to the aggregation node's execution of historical model training tasks. The completed model aggregation tasks include historical model aggregation tasks and the current model aggregation task. Based on these task-related parameters, the method selects a target aggregation node from among the aggregation nodes to execute the next round of model aggregation tasks. By dynamically evaluating aggregation nodes through these task-related parameters, and then selecting a suitable aggregation node to execute the next round of model aggregation tasks, the method improves the stability, security, and learning efficiency of the federated learning system. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the architecture of the federated learning system provided by the present invention; Figure 2 This is a flowchart illustrating the aggregation node selection method for federated learning provided by the present invention.

[0014] Figure 3 This is a schematic diagram of the aggregation node selection system for federated learning provided by the present invention.

[0015] Figure 4This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0017] The following is combined Figures 1-4 This invention describes a method and system for selecting aggregation nodes for federated learning.

[0018] First, a brief description of the relevant content involved in this invention will be given.

[0019] Federated learning (FL) is a distributed machine learning method that trains models without directly exchanging data; that is, it collaboratively trains a global model without requiring multiple participants to leave their local data. This approach is particularly suitable for data privacy-sensitive scenarios, such as healthcare, finance, and the Internet of Things (IoT).

[0020] In traditional centralized learning, all data needs to be uploaded to a central server for processing and training. Federated learning, however, is different. It allows multiple data holders (such as smartphones, medical devices, etc.) to collaboratively train a shared global model while maintaining local data storage and privacy protection. Specifically, the core process of federated learning is as follows: Model initialization: The central server initializes a global model and sends it to all participating clients (i.e., data holders). Local training: Each client trains the model locally using its own data. The client calculates gradients or updates the model locally without uploading the raw data to the server. Model update and aggregation: Each client sends its locally computed model updates (such as gradients, weights, etc.) to the central server. The central server merges the model updates from each client using an aggregation algorithm (such as weighted average) to obtain an improved version of the global model. Model synchronization: The central server sends the updated global model back to the client, and the client continues to use the new global model for the next round of local training.

[0021] Repeated process: This process usually continues for multiple rounds until the model converges or reaches the predetermined training objective.

[0022] Bilinear mapping: Consider two multiplicative cyclic groups and Their order is ,in It is a large prime number. Let it be... This is a generator. This leads to the mapping function. The definition of has the following properties: (1) Bilinear: for any element The following equation holds true. ,in, greater than zero and less than Integers; (2) Non-degenerate: Existence , making ; (3) Computability: For all It can be calculated efficiently. The value of .

[0023] Aggregator Node (Parameter Server, PS): The central node responsible for aggregating the local models of client nodes and updating the global model, i.e., proxy servers (PSs).

[0024] Client nodes: Distributed devices or systems participating in federated learning, i.e., data owners (DOs), are responsible for training local models based on local data.

[0025] Task Publisher (TP): A separate entity used to verify the trustworthiness of aggregate nodes.

[0026] Direct Credit Score: A credit score directly assessed by the client node based on the performance of the aggregation node.

[0027] Objective Credit Score: A credit score objectively assessed by the task publisher based on the performance of this aggregation node; Indirect Credit Score: A credit score indirectly assessed by other task assigners based on the past performance of this aggregation node.

[0028] Smart Contract: An automated program deployed on a blockchain that calculates and broadcasts the credit value of nodes.

[0029] Additive homomorphic encryption is an encryption scheme that allows addition operations to be performed on encrypted data without first decrypting the data. Even though the data is encrypted, users can perform certain calculations and obtain the encrypted result, which can then be decrypted to get the correct result.

[0030] Specifically, if there are two data points and They are encrypted as follows: and Additive homomorphic encryption allows the following operations to be performed: in This represents an addition operation within an encryption process, and the encrypted data remains encrypted. When this encrypted data is decrypted, the original data is obtained. The result.

[0031] Existing federated learning aggregation node selection mechanisms have the following shortcomings: fixed node selection methods lack flexibility and cannot adapt to dynamic network environments, making them prone to performance degradation due to single-point failures or attacks by malicious nodes; random node selection methods do not consider node reputation and performance, which may lead to low-quality or malicious nodes being selected as aggregation nodes, affecting model convergence and accuracy; and there is a general lack of dynamic evaluation mechanisms for aggregation nodes, which cannot fully and comprehensively consider the actual situation of aggregation nodes and comprehensively evaluate their credit value.

[0032] The aggregation node selection method for federated learning provided in this embodiment of the invention is applied to the following federated learning system. See also... Figure 1 , Figure 1 This is a schematic diagram of the architecture of the federated learning system provided by the present invention.

[0033] A federated learning system can be simplified into multiple entities, including a Key Generation Center (KGC), a Blockchain System (BCS), a Task Publisher (TP), a Cloud Service Provider (SP), Proxy Servers (PSs), Data Owners (DOs), and Model Users (MUs).

[0034] The Key Generation Center (KGC) is a fully trusted entity. The KGC manages the system's public parameters pp and master key mk, and distributes private keys sk and public keys pk to every other entity in the federated learning system, primarily to data owners (DOs) and proxy servers (PSs).

[0035] The Task Publisher (TP) initiates the model training task. In the initial stage, it distributes the model to be trained to the proxy server (PSs). Simultaneously, the TP retrieves the aggregated ciphertext of the model completed by the proxy server (PSs) from the Blockchain System (BCS), verifies the signature, decrypts the ciphertext, and evaluates the aggregation node (proxy server). PS k The ability, honesty, and credibility of the model. Throughout the model training process, TP cannot directly obtain the local model plaintext of individual DOs.

[0036] Data owners (DOs) are participants in federated learning, using their local data to jointly train the model published by the TP. After encrypting and signing the trained local model, the DOs cache the model in the blockchain system; simultaneously, the DOs broadcast transactions that update their local model on the blockchain system. For DOs with limited storage resources, they only need to store the blocks relevant to themselves, while information about other blocks can be obtained by querying other nodes.

[0037] Cloud service providers (CSPs) are semi-trusted organizations that provide computing and storage services for storing the final model of federated learning.

[0038] The proxy server (PSs), delegated by the TP, is responsible for overseeing the FL task. First, the PSs formulates fine-grained participation policies, selecting and rewarding participating DOs. Then, the PSs aggregates and updates the FL model parameters for iterative training. The PSs generates corresponding hashes for the aggregated model ciphertexts and publishes them on the InterPlanetary File System (IPFS) of the blockchain system. The PSs performs relay and aggregation tasks between the TP and DOs. First, it collects the local model ciphertexts of all DOs within the region and performs batch signature verification. After successful verification, the PSs aggregates these ciphertexts. The aggregated ciphertexts generate digital signatures and are stored in the IPFS of the blockchain system. Finally, the PSs uploads the hash proof returned by IPFS to the blockchain system. ,in Indicates the first One aggregation node, This represents the total number of proxy servers.

[0039] Blockchain systems (BCS), as a decentralized and distributed storage architecture, possess core functionalities such as decentralization, security, and transparency. They include the decentralized storage structure IPFS, a broadcast mechanism, and smart contracts (SC). By publishing various transaction types within the blockchain system, such as local model updates, aggregation, global model training, and reputation assessment transactions, the blockchain system ensures that model training activities are publicly broadcast, transparently synchronized, and tamper-proof. This mechanism provides security for global model training in FL and prevents data tampering.

[0040] Model users (Mus) are those who train models. On one hand, Mus can search for and utilize pre-trained models stored in CSPs. On the other hand, Mus are limited to searching for and using models that align with their area of ​​expertise.

[0041] The processing flow of the federated learning system is as follows: After the TP (Transformer Module) issues a training task to the PSs (Power Supply Module), the federated learning task begins. The federated learning task includes: 1. System initialization; 2. Key distribution; 3. Local model upload; 4. Model training and distribution; 5. Local model training and model encryption and signing. Local model training can include training on multiple DOs (Distributed Objects), which can be at least one of surveillance cameras, smartphones, and base stations. After multiple iterations of the federated learning task, the PSs obtains the final model and uploads it to the TP; the TP then uploads the final model to the SP (Power Supply Module) for final storage. Afterwards, the MUs (Model Modules) performs model search through the SP, and once a suitable model is found, it is used through the SP.

[0042] Specifically, in a smart security IoT environment, video surveillance IoT devices (such as surveillance cameras and sensors) accumulate a large amount of sensitive data locally. This data is used by the devices as Devices (DOs) to participate in federated learning. Industry regulatory bodies, acting as Trustees (TPs), train industry-specific security decision-making models based on the local data from the DOs, aiming to provide data-driven decision support for security professionals (DUs) within the industry. Client nodes or local devices (DOs) participate in federated learning, encrypting the trained local model and uploading it to the aggregation node (PSs) with the highest credit value. The aggregation node aggregates the model ciphertext using a homomorphic encryption algorithm and feeds it back to the DOs, iterating the training until the model converges. Finally, the encrypted model is transmitted to the TP via the PSs. The TP decrypts the model ciphertext, tests the model, assigns a credit value to the PSs, verifies the model, and encrypts and uploads the verified model to the CSP storage, ensuring data privacy and security.

[0043] Furthermore, the training models stored in the CSP can be queried and used through a searchable encryption mechanism. Specifically, law enforcement personnel, acting as DUs (Demand Users), input industry-related terminology and keywords. The CSP performs encrypted search calculations and returns qualified training models to the DUs, ultimately supporting decision-making and early warning functions. This solution achieves efficient and secure industry decision support through the cloud, combining distributed learning and encryption technologies without compromising local data privacy.

[0044] It should be noted that during the initialization phase of the federated learning system, the Key Generation Center (KGC) generates the master key mk and public parameters pp to ensure the security and reliability of the encryption process. The KGC selects random numbers. a and It is secretly stored as the master key and calculated. The key generation process is as follows: , in, It is a multiplicative cyclic group. For generators, , For randomly selected values, the hash function H Map values ​​to superior, mk This is the system master key. These are common parameters.

[0045] KGC is an aggregation node. PS k and data owners DO u Generate key pairs. First, KGC generates key pairs for each aggregation node. PS k Randomly generate private key It is a public key. Then, for DO u Generate private key Its public key Next, the KGC trusted channel sends the private key to the corresponding entity and broadcasts the public keys of each entity to the system.

[0046] Figure 2 This is a flowchart illustrating the aggregation node selection method for federated learning provided by the present invention, as shown below. Figure 2 As shown, the method includes steps 201 and 202.

[0047] Step 201: For any round of model aggregation task in the target federated learning task, if the global model corresponding to the current model aggregation task has not converged, obtain the task-related parameters corresponding to each aggregation node. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to each client node corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task.

[0048] Specifically, the target federated learning task refers to the task of training a target model based on federated learning. The target model can be a medical model, in which case the local data used by the client node is medical data; the target model can be a financial prediction model, in which case the local data used by the client node is financial data; the target model can be an internet prediction model, in which case the local data used by the client node is internet data. This invention does not limit this. The model aggregation task refers to the task of aggregating at least one local model to obtain a global model. The historical model training task refers to the task of training a local model using local data.

[0049] In practical applications, performing a target federated learning task requires multiple iterations, each including model training and model aggregation tasks. After the current iteration (i.e., after the current model aggregation task) is completed, it's necessary to determine if the aggregated global model has converged. If it has converged, the target federated learning task is complete, and this global model is the final target model. If it hasn't converged, the next iteration (the next model aggregation task) needs to be executed. At this point, the target aggregation for the next model aggregation task needs to be selected.

[0050] To select the target aggregation for the next round of model aggregation, we can first obtain the task-related parameters for each aggregation node. These task-related parameters refer to the parameters for performing the federated learning task, such as historical performance and credit score. These parameters can be those used by the aggregation node for performing the model aggregation task, or those used by the downstream client nodes for performing the model training task.

[0051] Step 202: Based on the task-related parameters, select the target aggregation node from each aggregation node to execute the next round of model aggregation task.

[0052] Based on the obtained task-related parameters, the task-related parameters of each aggregation node are further analyzed to select the target aggregation node that is most suitable for executing the next round of model aggregation tasks.

[0053] The present invention provides a method for selecting aggregation nodes for federated learning. For any round of model aggregation in a target federated learning task, when the global model corresponding to the current model aggregation task has not converged, the method obtains task-related parameters for each aggregation node. These task-related parameters include parameters related to the aggregation node's execution of completed model aggregation tasks and / or parameters related to the client nodes corresponding to the aggregation node's execution of historical model training tasks. The completed model aggregation tasks include historical model aggregation tasks and the current model aggregation task. Based on these task-related parameters, a target aggregation node is selected from among the aggregation nodes to execute the next round of model aggregation tasks. By dynamically evaluating aggregation nodes through these task-related parameters, and then selecting a suitable aggregation node to execute the next round of model aggregation tasks, the stability, security, and learning efficiency of the federated learning system are improved.

[0054] Optionally, selecting the target aggregation node for executing the next round of model aggregation task from among the aggregation nodes based on the task-related parameters includes: When the task-related parameters include the first credit rating value of the aggregate node that has completed the model aggregation task, for each aggregate node, the sum of the first credit rating values ​​corresponding to the aggregate node is calculated, and the aggregate node with the highest sum of the first credit rating values ​​is determined as the target aggregate node for executing the next round of model aggregation task; In practical applications, aggregation nodes can be selected based on their credit rating, that is, the most suitable aggregation node is selected based on the credit rating value (first credit rating value) of the aggregation node in the completed model aggregation tasks: for each aggregation node, the first credit rating value of the aggregation node under each completed model aggregation task is summed to obtain the sum of the first credit rating values ​​of the aggregation node; then the aggregation node with the highest sum of first credit rating values ​​can be used as the target aggregation node for executing the next round of model aggregation tasks.

[0055] This invention, through the introduction of a dynamic selection method based on credit rating values, effectively identifies and eliminates malicious aggregation nodes, reduces their interference with model training results, and improves the reliability of federated learning. Malicious nodes cannot affect the global model by uploading incorrect or tampered model updates, thereby enhancing the attack resistance and security of the federated learning system.

[0056] Optionally, when the task-related parameters include the first credit rating value of the completed model aggregation task performed by the aggregation node, obtaining the task-related parameters corresponding to each aggregation node includes: If the aggregation node is the current aggregation node executing the current model aggregation task, the following steps are performed: Obtain the client node corresponding to the aggregation node, and evaluate the aggregation node's direct credit value for the current model aggregation task; Obtain the target trusted task publisher corresponding to the target federated learning task, and evaluate the objective credit value of the aggregation node for the current model aggregation task; Obtain the indirect credit value of the aggregation node as evaluated by other trusted task publishers besides the target trusted task publisher; The weights of the direct credit value, the objective credit value, and the indirect credit value are obtained respectively; Based on the indirect credit value, the objective credit value, the indirect credit value, and the weights corresponding to each credit value, a weighted calculation is performed to obtain the first credit rating value for the aggregation node to perform the current model aggregation task.

[0057] Specifically, the sum of the weights of the direct credit score, objective credit score, and indirect credit score is 1.

[0058] In practical applications, to ensure the reliability of the first credit rating, it can be obtained from three aspects: direct credit rating, objective credit rating, and indirect credit rating.

[0059] Set the current model aggregation task as the first Round model aggregation task, in the first round After the round-model aggregation task is completed: each client node downstream of the current aggregation node evaluates the current aggregation node and obtains a direct credit value; the Trusted Task Publisher (TP) evaluates the current aggregation node's first round of aggregation. The round-aggregation model task is used to score and obtain an objective credit score.

[0060] Furthermore, the current aggregation node may have participated in federated learning tasks published by other trusted task publishers. Therefore, other trusted task publishers can conduct credit assessments on the current aggregation node, thus obtaining the indirect credit value of the current aggregation node based on the credit assessments conducted by other trusted task publishers.

[0061] The acquisition of direct credit value, objective credit value and indirect credit value can be carried out in a set order. The acquisition order of direct credit value, objective credit value and indirect credit value in this invention is only an example.

[0062] After obtaining the direct credit value, objective credit value, and indirect credit value, the first credit rating value for the aggregation node to perform the current model aggregation task can be determined based on the direct credit value, objective credit value, and indirect credit value.

[0063] For example, determining the first credit rating of the aggregation node for performing the current model aggregation task based on direct credit value, objective credit value, and indirect credit value can be achieved by: obtaining the weights of each of the direct credit value, objective credit value, and indirect credit value, and then calculating the weighted sum of the direct credit value, objective credit value, and indirect credit value to obtain the first credit rating of the aggregation node for performing the current model aggregation task, as shown in the following formula: .

[0064] in, The highest credit rating. , and These are direct credit score, objective credit score, and indirect credit score. , and These are the weights for direct credit score, objective credit score, and indirect credit score, respectively.

[0065] It should be noted that when an aggregation node is not the current aggregation node executing the current model aggregation task, the first credit rating value obtained for the aggregation node executing the current model aggregation task is 0 or empty. In other words, for each aggregation node, the first credit rating value for that aggregation node when it is not executing the model aggregation task is 0 or empty.

[0066] In federated learning systems, malicious aggregation nodes may affect the quality of the global model by uploading incorrect or tampered model updates. Traditional aggregation node selection methods lack consideration for the reputation of aggregation nodes, easily leading to malicious nodes being incorrectly selected. Based on three types of credit scores for aggregation nodes—those of data owners (DOs), the task publisher (TP), and other task publishers (TPs)—a credit-based dynamic aggregation node selection method is designed. This method can effectively identify and exclude malicious aggregation nodes, improving the reliability and security of the system. Specifically, this embodiment of the invention uses a comprehensive credit scoring mechanism to dynamically select aggregation nodes: by dynamically selecting aggregation nodes through direct credit scoring, objective credit scoring, and indirect credit scoring, it ensures that the most reliable aggregation nodes are selected using the most comprehensive and objective mechanism, ensuring the rapid convergence and accuracy of the global model.

[0067] Furthermore, in the federated learning system, the selection of aggregation nodes in this embodiment of the invention not only considers the node's historical performance but also its current creditworthiness, while introducing an objective evaluation based on the aggregation results. Through the credit assessment algorithm of this invention, multiple factors such as direct credit scoring, objective credit scoring, and indirect credit scoring can be integrated to achieve dynamic and flexible selection of aggregation nodes, thereby improving the training effect and convergence speed of the global model.

[0068] Optionally, obtaining the direct credit value of the client node corresponding to the aggregation node for the current model aggregation task, and evaluating the aggregation node, includes: For each client node corresponding to the aggregation node, obtain the sub-direct credit value of the client node in evaluating the aggregation node for the current model aggregation task; The client node accumulates the sub-direct credit values ​​evaluated by the client node for the current model aggregation task and the model aggregation tasks of each previous round to obtain the cumulative credit value corresponding to the aggregation node. Calculate the average of the cumulative credit values ​​of all client nodes that evaluate the aggregation node, and obtain the direct credit value of the client node corresponding to the aggregation node for the current model aggregation task.

[0069] In practical applications, in the first After the wheel model aggregation task is completed, the client node DO u For aggregation node PS k The global model was evaluated and tested, and... PS k A vote will be held. Among them, ,and Indicates the first u One client node, This represents the total number of downstream client nodes of the aggregation node. In the voting results: the number of positive reviews is recorded as... The number of negative reviews is recorded as ,in If the aggregated global model is in DO u If the preset convergence time and accuracy threshold are reached during training or testing, an aggregation node is assigned. PS k Positive feedback is acceptable; otherwise, it is considered negative feedback.

[0070] Client node DO u In the The round is an aggregation node PS k Assigned direct credit value It can be used Calculated.

[0071] Furthermore, the direct credit values ​​of the sub-nodes can be summed to obtain the cumulative credit value corresponding to the aggregation node. ,Right now DO u right PS kThe cumulative credit score.

[0072] Because there are N client nodes downstream of the aggregation node DO u To receive a credit score, the global credit score, also known as the direct credit score, can be calculated as follows: .

[0073] .

[0074] Optionally, the sub-direct credit values ​​evaluated by each client node for the current model aggregation task are summed to obtain the cumulative credit value corresponding to the aggregation node: Obtain the time factor; Based on the time factor, the sub-direct credit values ​​evaluated by the client node for the current model aggregation task and the model aggregation tasks of each previous round are summed to obtain the cumulative credit value corresponding to the aggregation node.

[0075] In practical applications, considering aggregation nodes PS k The reliability of aggregation in round t-1 does not guarantee its reliability in the current round t; therefore, a time factor can be embedded. and weighting coefficients The direct credit scores of the sub-subsidiaries are accumulated. That is, when the accumulation reaches round t, DO u right PS k Cumulative credit score for: .

[0076] Among them, time factor , This refers to the step size or unit of time.

[0077] Optionally, obtaining the objective credit value of the target trusted task publisher corresponding to the target federated learning task for evaluating the aggregation node for the current model aggregation task includes: Obtain the target trusted task publisher corresponding to the target federated learning task, and evaluate the sub-objective credit value of the aggregation node for the current model aggregation task and the model aggregation tasks in previous rounds, as well as the trust level of the target trusted task publisher for the aggregation node. Based on the current model aggregation task and the sub-objective credit values ​​and trust levels under the model aggregation tasks in previous rounds, calculate the objective credit value of the target trusted task publisher for evaluating the aggregation node corresponding to the target federated learning task.

[0078] In practical applications, in the first After the round model aggregation task is completed, the target trusted task publisher (TP) sends a message to the aggregation node. PS k The global model of the t-th round of aggregation is scored to obtain the sub-objective credit value, and the target trusted task publisher (TP) evaluates the aggregation node. PS k Trust level.

[0079] Furthermore, the objective credit value is determined based on the sub-objective credit values ​​and trust levels under the current model aggregation task and previous rounds of model aggregation tasks. This ensures the accuracy and efficiency of obtaining the objective credit value.

[0080] Optionally, the step of calculating the objective credit value of the target trusted task publisher for evaluating the aggregation node based on the sub-objective credit value and the trust level under the current model aggregation task and the model aggregation tasks in previous rounds includes: For each round of model aggregation tasks in the current model aggregation task and all previous rounds of model aggregation tasks, calculate the first product of the sub-objective credit value and the trust level under the model aggregation task; Calculate the first cumulative sum of the first product and the second cumulative sum of the trust level under the current model aggregation task and the model aggregation tasks in each previous round; The ratio of the first sum to the second sum is determined as the objective credit value by which the trusted task publisher of the target federated learning task evaluates the aggregation node.

[0081] Specifically, the objective credit score of the target trusted task issuer for evaluating the aggregation node can be calculated using the following formula. : .

[0082] in, For the objective credit value, For TP pair PS k The trust level is indicated by a number, such as 1 for complete trust, 0.5 for partial trust, and 0 for no trust.

[0083] This can improve the reliability of objective credit scores.

[0084] Optionally, obtaining the indirect credit value of the aggregation node from other trusted task publishers besides the target trusted task publisher includes: For each of the other trusted task publishers, obtain the historical objective credit value of the aggregation node in the process of the aggregation node performing other historical federated learning tasks, as well as the trust level of the target trusted task publisher towards the other trusted task publishers. Based on the historical objective credit values ​​of the aggregate node evaluated by the other trusted task publishers, and the trust level corresponding to each of the other trusted task publishers, the indirect credit values ​​of the aggregate node evaluated by other trusted task publishers besides the target trusted task publisher are calculated.

[0085] In practical applications, PS k May have participated in multiple trusted task publishers TP s The global model training, i.e., the federated learning task, therefore involves multiple other trusted task publishers. TP y Both are correct. PS k A credit assessment was conducted. To more accurately reflect... PS k The reputation value, here we consider in addition to the target trusted task issuer. TP x Other trusted task publishers TP y Feedback information is used to indicate PS k Indirect reputation value.

[0086] Specifically, for each other trusted task publisher TP y Get the aggregation node PS k In the process of performing other historical federated learning tasks, other trusted task issuers TP y For this aggregation node PS k Historical objective credit score for evaluation and other trusted task publishers TP y For this aggregation node PS k Trust level ; Furthermore, based on each TP y right PS k Historical objective credit score for evaluation and each TP y right PS k Trust level Calculate indirect credit score This ensures the accuracy and efficiency of obtaining indirect credit scores.

[0087] Optionally, the step of calculating the indirect credit value of the aggregate node based on the historical objective credit values ​​of the other trusted task publishers' evaluations of the aggregate node, and the trust level corresponding to each of the other trusted task publishers, includes: For each of the other trusted task publishers, calculate the second product of the historical objective credit value of the other trusted task publisher's evaluation of the aggregation node and the trust level corresponding to the other trusted task publisher; Calculate the third sum of all second products, and the fourth sum of all credit scores; The ratio of the third sum to the fourth sum is determined as the indirect credit value for the aggregation node evaluated by other trusted task publishers besides the target trusted task publisher.

[0088] Specifically, the indirect credit score of the aggregation node, as evaluated by other trusted task publishers, can be calculated using the following formula. : .

[0089] in, for PS k From other trusted task publishers TP y The total number of times historical objective credit values ​​were received. It is a trusted task publisher. TP x For other trusted task publishers TP y Trust level.

[0090] For example: Target Trusted Task Publisher TP x For other trusted task publishers TP y Trust level, adjust rating weights : This indicates complete trust; This indicates partial trust. This indicates distrust.

[0091] Optionally, obtaining the weights of the direct credit score, the objective credit score, and the indirect credit score respectively includes: Obtain the network latency parameters and node load parameters of the aggregation node, the priority of the target federated learning task, and the first maximum threshold corresponding to the network latency parameters and the second maximum threshold corresponding to the node load parameters; determine the weight of the direct credit value based on the network latency parameters, the node load parameters, the priority, the first maximum threshold, and the second maximum threshold; The historical attack frequency of the aggregation node, the priority of the target federated learning task, and the third maximum threshold corresponding to the historical attack frequency are obtained. Based on the historical attack frequency, the priority, and the third maximum threshold, the weight of the objective credit value is determined. Obtain the network latency parameters and node load parameters of the aggregation node, as well as the first minimum threshold corresponding to the network latency parameters and the second minimum threshold corresponding to the node load parameters; determine the weight of the indirect credit value based on the network latency parameters, the node load parameters, the first minimum threshold, and the second minimum threshold.

[0092] In practical applications, for federated learning tasks with low security requirements but high real-time requirements, the weight of direct credit scoring increases when network latency is low and node load is light. Therefore, the weight of direct credit score can be obtained using the following formula: .

[0093] in, This is a network latency parameter. For node load parameters, and These are the maximum thresholds for network latency and node load, namely the first maximum threshold and the second maximum threshold. and To adjust the coefficients and control the sensitivity of weight changes. The higher the priority of a federated learning task, the higher its security requirements. The larger.

[0094] For tasks requiring high security, the trust and security requirements of the aggregation nodes are more important for the trusted task publisher. Therefore, the weight of the objective credit value can be obtained through the following formula: .

[0095] in, This is the maximum threshold for historical attack frequency, i.e., the third maximum threshold. Historical attack frequency; This is the adjustment coefficient.

[0096] When the aggregation node performs unstablely or the network environment is poor, the indirect credit value can integrate feedback from multiple other trusted task publishers, enhancing the accuracy of aggregation node selection. Therefore, the weight of the indirect credit value can be obtained through the following formula: .

[0097] in, and These are the minimum thresholds for network latency and node load parameters, respectively, namely the first minimum threshold and the second minimum threshold. and This is the adjustment coefficient.

[0098] Optionally, after selecting the target aggregation node to execute the next round of model aggregation task from among the aggregation nodes according to the task-related parameters, the target aggregation node executes the next round of model aggregation task, which further includes: The unconverged global model is used as the initial model and distributed to each target client node corresponding to the target aggregation node through the target aggregation node; Each of the target client nodes is invoked to train the initial model based on its own local data, thereby obtaining a local model; Each of the target client nodes is invoked to encrypt the local model based on its own encryption key and homomorphic encryption algorithm to obtain the local model ciphertext, and then the data owner signs it. Through the target aggregation node, the data owner signature of each target client node is verified in batches; If the data owner's signature batch verification passes, the target aggregation node is invoked to aggregate the local model ciphertext of each target client node using the encryption properties of the homomorphic encryption algorithm, to obtain the global model ciphertext, and then the proxy server signature is performed. The signature of the proxy server of the target aggregation node is verified by the target trusted task publisher of the target federated learning task. If the proxy server signature verification is successful, the target trusted task publisher is invoked to decrypt the global model ciphertext based on the decryption key and the homomorphic encryption algorithm to obtain the global model; Calculate the first credit rating value of the target aggregation node; Determine whether the currently obtained global model has converged; If convergence is not achieved, for each aggregation node, the sum of the first credit rating values ​​corresponding to the aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task. The target federated learning task is then executed until the global model converges.

[0099] In practical applications, once the target aggregation node is determined, it is necessary to call the target aggregation node to execute the next round of model aggregation tasks: take the unconverged global model as the initial model, and distribute it to each target client node corresponding to the target aggregation node through the target aggregation node.

[0100] Assuming the target aggregation node PS k There are multiple data owners downstream. DO u (Target client node). DO u Utilizing local sensitive data (local data) to perform model training tasks, that is, training a non-converged global model (initial model) and obtaining a local model. .

[0101] To achieve lightweight encryption and computation, DO u Choose a homomorphic encryption algorithm and encryption key. ck, Encrypted local model Then the local model ciphertext is obtained. Encryption key ck The local model ciphertext is shared with the target task publisher TP via a trusted channel. The encryption process is as follows: .at the same time, DO u Embed the current time T and calculate the hash value of the timestamp. Further calculate the data owner's signature. This involves signing the data owner's name. After model training, encryption, and signing are completed, DO u The system broadcasts relevant transaction information. Simultaneously, each... DO u Will and Upload to the target aggregation node PS k .

[0102] When the target aggregation node PS k Discover this region in the blockchain system DO u When the local model updates transactions, it retrieves all data from IPFS. DO u The local model ciphertext. PS k use DO u The public key is used to verify the signature, ensuring the validity of the ciphertext. To improve computational efficiency, PS k By batch verifying the signatures of multiple data owners, finally... PS k Aggregate all the ciphertext and sign it using your own private key on the proxy server.

[0103] For example, in order to improve verification efficiency, PS k Perform batch verification of data owner signatures. That is, if the following formula holds true, all data owner signatures pass verification, proving the local model is valid. Otherwise, invalid signatures exist.

[0104] .

[0105] in, for PS k use DO u The public key, N is DO u Quantity, These are the parameters in the common parameters pp.

[0106] If all data owners' signatures are verified, PS k Once all DO u of , PS k It will utilize the properties of homomorphic encryption to... The global model ciphertext is obtained by using an aggregation algorithm. The aggregation result is as follows: Where N is DO u Quantity, This is the global model ciphertext.

[0107] at the same time, PS k Embed the current time T and calculate the hash value of the timestamp. Then calculate the proxy server signature. This involves performing proxy server signing. After completing model aggregation and proxy server signing, PS k Broadcast relevant transaction information within the system. Simultaneously, PS k Will and Uploaded to the model publisher TP.

[0108] It should be noted that the signature correctness verification is performed during the aggregation model phase: PS k The proof of the signature verification's correctness is as follows: .

[0109] The target feasible task issuer TP received PS k After the model aggregates transactions, batch signature verification is first performed to ensure the legitimacy of the ciphertext. Then, TP uses the decryption key ck to decrypt the aggregated ciphertext (global model ciphertext), obtaining all... PS k The plaintext model of the node's current aggregation, i.e., the global model.

[0110] For example, in order to improve verification efficiency, TP right Perform batch verification. That is, if the following formula is true, then all... If the verification passes, the model is proven to be valid. Otherwise, an invalid signature exists.

[0111] .

[0112] If the proxy server signature verification passes, TP chooses to use the private key ck of the homomorphic encryption algorithm to decrypt the global model ciphertext, and then uses the resulting global model, i.e. ,in, This is a global model for plaintext.

[0113] It should be noted that the correctness verification of the global model stage signature is as follows: The proof of the correctness of the TP signature verification is as follows: .

[0114] After completing the aggregation of the current round, the method for calculating the first credit rating value described above is invoked to calculate the first credit rating value of the target aggregation node.

[0115] Determine the current global model If convergence occurs, the objective federated learning task is complete, and the global model is... Used as global model storage.

[0116] If convergence fails, the target aggregation node is dynamically selected. That is, for each aggregation node, the sum of the first credit ratings corresponding to the aggregation node is calculated, and the aggregation node with the highest sum of the first credit ratings is determined as the target aggregation node for the next round of model aggregation task. The target federated learning task continues to be executed until the global model converges.

[0117] This invention incorporates digital signatures and homomorphic encryption mechanisms into key steps such as local model training, aggregation node model aggregation, and global model generation. This ensures data privacy and the authenticity and integrity of the model. The system only allows further operations after signature verification confirms the model has not been tampered with and its source is reliable, thus preventing malicious tampering and forgery and ensuring model legitimacy. This mechanism, combined with the decentralized nature of blockchain, enhances the system's security, transparency, and immutability. In other words, this invention ensures the correctness, integrity, and verifiability of model updates and model interaction transmission, preventing data tampering, damage, forgery, and leakage.

[0118] Optionally, after calculating the first credit rating value of the target aggregation node, the method further includes: Update the first credit rating value to the blockchain via a smart contract; For each aggregation node, the sum of the first credit rating values ​​corresponding to that aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task, until the global model converges, including: Through the smart contract, for each aggregation node, the sum of the first credit rating values ​​corresponding to the aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task.

[0119] In traditional credit assessment mechanisms, node credit scores can be manipulated or tampered with by certain factors. This invention, by incorporating blockchain technology, ensures the immutability and transparency of credit score data for all nodes. Furthermore, by dynamically selecting aggregation nodes through smart contracts, it enhances the fairness and security of the federated learning system, guaranteeing the impartiality and credibility of the entire federated learning process.

[0120] In practical applications, after calculating the first credit rating value of the target aggregation node by calling the above method, the first credit rating value can be updated to the blockchain system through a smart contract.

[0121] In the global model If convergence fails, the smart contract selects the aggregation node with the highest total credit score (the sum of the first credit ratings) as the target aggregation node to execute the next round of model aggregation task.

[0122] It should be noted that when performing the first round of model aggregation task, if the first credit rating value of each aggregation node is empty, all aggregation nodes can be used as target aggregation nodes to perform the first round of model aggregation task simultaneously. In this way, after the first round of model aggregation task ends and the first credit rating values ​​of each aggregation node are different, the aggregation node with the highest sum of first credit rating values ​​can be determined as the target aggregation node for performing the second round of model aggregation task.

[0123] In the first round of model aggregation, if the first credit rating of each aggregation node is empty, we can set the first credit rating of each aggregation node to infinity. Then, we can randomly select an aggregation node as the target aggregation node to execute the first round of model aggregation. After the first round of model aggregation, the aggregation node with the highest sum of first credit ratings can be determined as the target aggregation node for the second round of model aggregation. This allows us to traverse each aggregation node as many times as possible to execute the model aggregation task.

[0124] Optionally, selecting the target aggregation node for executing the next round of model aggregation task from among the aggregation nodes based on the task-related parameters includes: When the task-related parameters include historical performance parameters of the aggregate node in the completed model aggregation task, calculate the first matching degree between each historical performance parameter and the next round of model aggregation task, and determine the aggregate node corresponding to the historical performance parameter with the highest first matching degree as the target aggregate node for executing the next round of model aggregation task; In practical applications, aggregation nodes can be selected based on historical performance: the most suitable aggregation node can be selected by relying on the performance of the aggregation node in the past training (historical performance parameters) without introducing a credit scoring mechanism: calculate the first matching degree between the historical performance parameters of each aggregation node and the next round of model aggregation task, and then use the aggregation node corresponding to the highest first matching degree as the target aggregation node for executing the next round of model aggregation task.

[0125] The embodiments of the present invention simplify the process, improve the selection efficiency of aggregation nodes, and thus improve the execution efficiency of the target federated learning task.

[0126] Optionally, selecting the target aggregation node for executing the next round of model aggregation task from among the aggregation nodes based on the task-related parameters includes: When the task-related parameters include the historical performance parameters, reputation and network latency parameters of the completed model aggregation task executed by the aggregation node, based on the trained aggregation node prediction model, the historical performance parameters, reputation and network latency parameters corresponding to each aggregation node are processed respectively, and the target aggregation node for executing the next round of model aggregation task is selected from the aggregation nodes.

[0127] In practical applications, aggregation nodes can be selected using machine learning algorithms: a machine learning model (a trained aggregation node prediction model) is used to comprehensively evaluate factors such as the reputation (e.g., reputation score), historical performance (historical performance parameters), and network latency (network latency parameters) of each aggregation node, and then predicts the most suitable aggregation node from among all aggregation nodes, which is the target aggregation node for executing the next round of model aggregation tasks. In this way, the selection of aggregation nodes can be dynamically adjusted.

[0128] Optionally, selecting the target aggregation node for executing the next round of model aggregation task from among the aggregation nodes based on the task-related parameters includes: When the task-related parameters include historical performance parameters of the aggregated nodes in the completed model aggregation tasks, a trusted third party is invoked to evaluate the reputation of each aggregated node based on the historical performance parameters, and the aggregated node with the highest reputation is determined as the target aggregated node for executing the next round of model aggregation tasks.

[0129] Specifically, a trusted third party can be a centralized credit assessment platform, such as a key generation center (KGC).

[0130] In practical applications, a centralized credit assessment platform can be used to select aggregation nodes. This platform, operated by a centralized entity (such as a key generation center, KGC), evaluates the reputation (credit score) of each aggregation node based on its historical performance parameters and dynamically selects the most suitable node. For example, the aggregation node with the highest reputation score is chosen as the target node for the next round of model aggregation tasks. This reduces reliance on blockchain and offers certain advantages of decentralization.

[0131] Optionally, selecting the target aggregation node for executing the next round of model aggregation task from among the aggregation nodes based on the task-related parameters includes: When the task-related parameters include the second credit rating values ​​of each client node corresponding to the aggregation node for executing the historical model training task, a weighted sum of the second credit rating values ​​corresponding to each aggregation node is calculated for each aggregation node; the aggregation node with the highest weighted sum is determined as the target aggregation node for executing the next round of model aggregation task.

[0132] In practical applications, the credit evaluation object can be shifted from the aggregation node (proxy server PSs) to the client node (data owner DOs). That is, credit scoring can be performed directly on each DO participating in federated learning: the second credit evaluation values ​​of each client node downstream of each aggregation node are weighted and summed to obtain a weighted sum, and the aggregation node corresponding to the highest weighted sum is used as the target aggregation node for executing the next round of model aggregation task.

[0133] Thus, credit evaluation is not limited to aggregation nodes, but can be extended to data owners, comprehensively considering their performance across multiple training rounds, data quality, and whether they have engaged in malicious behavior. This can, to some extent, mitigate the impact of malicious or low-quality data sources on the global model.

[0134] For example, in a federated learning system containing 50 client nodes and 5 aggregation nodes, the aggregation node selection method for federated learning provided by this invention is used to select the target aggregation node. Experimental results show that the aggregation node selection method for federated learning provided by this invention can effectively filter low-quality or malicious nodes, significantly improving the convergence speed and accuracy of the global model.

[0135] For example, the aggregation node selection method for federated learning provided by this invention is applied to a medical scenario to train a disease prediction model using patient data. By dynamically selecting high-credit target aggregation nodes, accurate and efficient model training is achieved while protecting data privacy.

[0136] The aggregation node selection method for federated learning provided by this invention can improve the security and reliability of federated learning systems. By introducing a credit-based dynamic aggregation node selection method, the federated learning system can effectively identify and exclude malicious aggregation nodes, reduce the interference of malicious aggregation nodes on model training results, and improve the reliability of the federated learning system. Malicious nodes cannot affect the global model by uploading incorrect or tampered model updates, thereby improving the system's resistance to attacks and security.

[0137] The aggregation node selection method for federated learning provided by this invention can improve the global model training effect and convergence speed. The selection of aggregation nodes not only depends on historical performance but also considers the current node's reputation status, incorporating a time forgetting factor while taking into account past credit conditions, and dynamically adjusting based on multi-faceted evaluations (direct credit value, objective credit value, and indirect credit value). This allows for a more comprehensive, objective, rational, and intelligent selection of high-quality aggregation nodes, improving model training effect and convergence speed, avoiding the impact of low-quality or unstable aggregation nodes on training results, and ensuring the efficiency of federated learning.

[0138] The aggregation node selection method for federated learning provided by this invention enhances the transparency and fairness of credit assessment: Blockchain technology ensures that node reputation score data is tamper-proof and transparent. All credit values ​​(direct credit value, objective credit value, and indirect credit value) can be publicly verified on the blockchain, preventing manipulation of credit values ​​and thus improving the fairness and trustworthiness of the system. Simultaneously, signature and signature verification mechanisms are embedded in key aspects of model interaction. Furthermore, the transparency of aggregation node selection through smart contracts helps improve the trust among system participants.

[0139] The following describes the aggregation node selection system for federated learning provided by this invention. The aggregation node selection system for federated learning described below can be referred to in correspondence with the aggregation node selection method for federated learning described above.

[0140] Figure 3 This is a schematic diagram of the aggregation node selection system for federated learning provided by the present invention, as shown below. Figure 3 As shown, the system includes: The acquisition module 301 is configured to acquire task-related parameters corresponding to each aggregation node for any round of model aggregation task in the target federated learning task, when the global model corresponding to the current model aggregation task has not converged. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to the client nodes corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task. Selection module 302 is configured to select a target aggregation node from the aggregation nodes to perform the next round of model aggregation task based on the task-related parameters.

[0141] It should be noted that this aggregation node selection system for federated learning, as a software unit, is also applied to the aforementioned federated learning system.

[0142] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440. The processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions stored in the memory 430 to execute the aggregation node selection method for federated learning provided by the aforementioned methods.

[0143] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the aggregation node selection method for federated learning provided by the above methods.

[0145] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the aggregation node selection method for federated learning provided by the methods described above.

[0146] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0147] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for selecting aggregation nodes in federated learning, characterized in that, include: For any round of model aggregation task in the target federated learning task, if the global model corresponding to the current model aggregation task has not converged, the task-related parameters corresponding to each aggregation node are obtained. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to each client node corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task. Based on the task-related parameters, select the target aggregation node from each aggregation node to execute the next round of model aggregation task.

2. The aggregation node selection method for federated learning according to claim 1, characterized in that, The step of selecting the target aggregation node to perform the next round of model aggregation task from each of the aggregation nodes according to the task-related parameters includes at least one of the following: When the task-related parameters include historical performance parameters of the aggregate node in the completed model aggregation task, calculate the first matching degree between each historical performance parameter and the next round of model aggregation task, and determine the aggregate node corresponding to the historical performance parameter with the highest first matching degree as the target aggregate node for executing the next round of model aggregation task; When the task-related parameters include the historical performance parameters, reputation and network latency parameters of the aggregated node in the completed model aggregation task, based on the trained aggregated node prediction model, the historical performance parameters, reputation and network latency parameters corresponding to each aggregated node are processed respectively, and the target aggregated node for executing the next round of model aggregation task is selected from the aggregated nodes; When the task-related parameters include the historical performance parameters of the aggregated nodes in the completed model aggregation tasks, a trusted third party is invoked to evaluate the reputation of each aggregated node based on the historical performance parameters of each aggregated node, and the aggregated node with the highest reputation is determined as the target aggregated node to execute the next round of model aggregation tasks. When the task-related parameters include the first credit rating value of the aggregate node that has completed the model aggregation task, for each aggregate node, the sum of the first credit rating values ​​corresponding to the aggregate node is calculated, and the aggregate node with the highest sum of the first credit rating values ​​is determined as the target aggregate node for executing the next round of model aggregation task; When the task-related parameters include the second credit rating values ​​of each client node corresponding to the aggregation node for executing the historical model training task, a weighted sum of the second credit rating values ​​corresponding to each aggregation node is calculated for each aggregation node; the aggregation node with the highest weighted sum is determined as the target aggregation node for executing the next round of model aggregation task.

3. The aggregation node selection method for federated learning according to claim 2, characterized in that, When the task-related parameters include the first credit rating value of the completed model aggregation task performed by the aggregation node, obtaining the task-related parameters corresponding to each aggregation node includes: If the aggregation node is the current aggregation node executing the current model aggregation task, the following steps are performed: Obtain the client node corresponding to the aggregation node, and evaluate the aggregation node's direct credit value for the current model aggregation task; Obtain the target trusted task publisher corresponding to the target federated learning task, and evaluate the objective credit value of the aggregation node for the current model aggregation task; Obtain the indirect credit value of the aggregation node as evaluated by other trusted task publishers besides the target trusted task publisher; The weights of the direct credit value, the objective credit value, and the indirect credit value are obtained respectively; Based on the indirect credit value, the objective credit value, the indirect credit value, and the weights corresponding to each credit value, a weighted calculation is performed to obtain the first credit rating value for the aggregation node to perform the current model aggregation task.

4. The aggregation node selection method for federated learning according to claim 3, characterized in that, The step of obtaining the client node corresponding to the aggregation node and evaluating the aggregation node for the current model aggregation task includes: For each client node corresponding to the aggregation node, obtain the sub-direct credit value of the client node in evaluating the aggregation node for the current model aggregation task; The client node accumulates the sub-direct credit values ​​evaluated by the client node for the current model aggregation task and the model aggregation tasks of each previous round to obtain the cumulative credit value corresponding to the aggregation node. Calculate the average of the cumulative credit values ​​of all client nodes that evaluate the aggregation node, and obtain the direct credit value of the client node corresponding to the aggregation node for the current model aggregation task.

5. The aggregation node selection method for federated learning according to claim 3, characterized in that, The step of obtaining the objective credit value of the target trusted task publisher corresponding to the target federated learning task for evaluating the aggregation node for the current model aggregation task includes: Obtain the target trusted task publisher corresponding to the target federated learning task, and evaluate the sub-objective credit value of the aggregation node for the current model aggregation task and the model aggregation tasks in previous rounds, as well as the trust level of the target trusted task publisher for the aggregation node. Based on the current model aggregation task and the sub-objective credit values ​​and trust levels under the model aggregation tasks in previous rounds, calculate the objective credit value of the target trusted task publisher for evaluating the aggregation node corresponding to the target federated learning task.

6. The aggregation node selection method for federated learning according to claim 3, characterized in that, The process of obtaining indirect credit values ​​from trusted task publishers other than the target trusted task publisher, evaluating the aggregation node, includes: For each of the other trusted task publishers, obtain the historical objective credit value of the aggregation node in the process of the aggregation node performing other historical federated learning tasks, as well as the trust level of the target trusted task publisher towards the other trusted task publishers. Based on the historical objective credit values ​​of the aggregate node evaluated by the other trusted task publishers, and the trust level corresponding to each of the other trusted task publishers, the indirect credit values ​​of the aggregate node evaluated by other trusted task publishers besides the target trusted task publisher are calculated.

7. The aggregation node selection method for federated learning according to claim 3, characterized in that, The step of obtaining the weights for the direct credit score, the objective credit score, and the indirect credit score respectively includes: Obtain the network latency parameters and node load parameters of the aggregation node, the priority of the target federated learning task, and the first maximum threshold corresponding to the network latency parameters and the second maximum threshold corresponding to the node load parameters; determine the weight of the direct credit value based on the network latency parameters, the node load parameters, the priority, the first maximum threshold, and the second maximum threshold; The historical attack frequency of the aggregation node, the priority of the target federated learning task, and the third maximum threshold corresponding to the historical attack frequency are obtained. Based on the historical attack frequency, the priority, and the third maximum threshold, the weight of the objective credit value is determined. Obtain the network latency parameters and node load parameters of the aggregation node, as well as the first minimum threshold corresponding to the network latency parameters and the second minimum threshold corresponding to the node load parameters; determine the weight of the indirect credit value based on the network latency parameters, the node load parameters, the first minimum threshold, and the second minimum threshold.

8. The aggregation node selection method for federated learning according to any one of claims 1-7, characterized in that, After selecting the target aggregation node for the next round of model aggregation task from the aggregation nodes based on the task-related parameters, the method further includes: The unconverged global model is used as the initial model and distributed to each target client node corresponding to the target aggregation node through the target aggregation node; Each of the target client nodes is invoked to train the initial model based on its own local data, thereby obtaining a local model; Each of the target client nodes is invoked to encrypt the local model based on its own encryption key and homomorphic encryption algorithm to obtain the local model ciphertext, and then the data owner signs it. Through the target aggregation node, the data owner signature of each target client node is verified in batches; If the data owner's signature batch verification passes, the target aggregation node is invoked to aggregate the local model ciphertext of each target client node using the encryption properties of the homomorphic encryption algorithm, to obtain the global model ciphertext, and then the proxy server signature is performed. The signature of the proxy server of the target aggregation node is verified by the target trusted task publisher of the target federated learning task. If the proxy server signature verification is successful, the target trusted task publisher is invoked to decrypt the global model ciphertext based on the decryption key and the homomorphic encryption algorithm to obtain the global model; Calculate the first credit rating value of the target aggregation node; Determine whether the currently obtained global model has converged; If convergence is not achieved, for each aggregation node, the sum of the first credit rating values ​​corresponding to the aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task. The target federated learning task is then executed until the global model converges.

9. The aggregation node selection method for federated learning according to claim 8, characterized in that, After calculating the first credit rating value of the target aggregation node, the method further includes: Update the first credit rating value to the blockchain via a smart contract; For each aggregation node, the sum of the first credit rating values ​​corresponding to that aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task, until the global model converges, including: Through the smart contract, for each aggregation node, the sum of the first credit rating values ​​corresponding to the aggregation node is calculated, and the aggregation node with the highest sum of the first credit rating values ​​is determined as the target aggregation node for executing the next round of model aggregation task.

10. An aggregation node selection system for federated learning, characterized in that, include: The acquisition module is configured to acquire task-related parameters for each aggregation node when the global model corresponding to the current model aggregation task has not converged, for any round of model aggregation task in the target federated learning task. The task-related parameters are the parameters related to the aggregation node executing the completed model aggregation task and / or the parameters related to the client nodes corresponding to the aggregation node executing the historical model training task. The completed model aggregation task includes the historical model aggregation task and the current model aggregation task. The selection module is configured to select the target aggregation node from the aggregation nodes to perform the next round of model aggregation task based on the task-related parameters.