A federated learning optimization method and system based on an incentive mechanism

By using reputation value calculation and fog node auction mechanism, high-quality data clients are incentivized to participate in federated learning, which solves the problems of uneven client performance and long training time, and achieves efficient model training.

CN115204414BActive Publication Date: 2026-06-09GUIZHOU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU UNIV
Filing Date
2022-07-28
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The lack of incentive mechanisms in existing federated learning leads to high-quality data clients being unwilling to participate in training, and uneven client performance results in long training times and numerous rounds.

Method used

We design an incentive-based federated learning optimization method. Through reputation value calculation and auction theory, we incentivize high-quality data clients to participate in training, utilize fog node auction mechanism to improve training efficiency, and design a global gradient aggregation strategy to eliminate low-quality gradients.

Benefits of technology

It effectively incentivizes high-quality data clients to participate in training, solves the problem of uneven client performance, reduces training rounds and time, and improves training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115204414B_ABST
    Figure CN115204414B_ABST
Patent Text Reader

Abstract

The application discloses a federated learning optimization method and system based on an incentive mechanism, establishes a reward mechanism based on a reputation value, encourages training clients with high-quality data and high local data training efficiency to join training, and only those with high-precision local gradients and high training efficiency can obtain high rewards. An auction mechanism is designed based on an auction theory. Training clients auction local training tasks to fog nodes, and the fog nodes train local data to improve local training efficiency, solve the problem of mutual waiting among training clients due to uneven performance, design a global gradient aggregation strategy, increase the weight of high-precision local gradients in global gradients, and eliminate the local gradients of malicious training clients, thereby reducing the number of model training times, and overall solving the technical problems of no scheme to encourage clients with high-quality data to join training, solve the problem of uneven performance of clients, and solve the problem of too many model training rounds and long time from the three aspects of aggregation strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of federated learning optimization technology, and in particular to a federated learning optimization method and system based on an incentive mechanism. Background Technology

[0002] In 2017, Google defined federated learning as a distributed training paradigm in machine learning. It allows model training to be performed by simply passing parameters between models in each round of training, without needing to aggregate data. Due to this advantage, federated learning is now widely used in healthcare, industrial manufacturing, and autonomous driving to address the problems of scattered and private data. While it has many advantages, it also inevitably has some drawbacks.

[0003] First, traditional federated learning assumes that clients voluntarily contribute their data to training. However, due to client self-interest, clients with high-quality data are unwilling to participate in model training, affecting training accuracy and the number of training iterations. To address this issue, researchers have proposed using subjective logic to calculate the reputation score of each client after completing a task, designing an incentive mechanism based on contract theory. This mechanism rewards clients who contribute more, thereby incentivizing those with high-quality data to participate in training. However, the contracts designed by contract theory are pre-defined, and clients can only choose whether to accept the contract, lacking flexibility. Furthermore, the reputation score design based on subjective logic introduces subjective judgment factors. To address the flexibility issues in contract theory-based incentive mechanisms, some researchers have proposed multi-dimensional procurement auction schemes, giving clients more opportunities to submit any combination of resources and expected payments. Others have addressed the subjective judgment factors inherent in using subjective logic models to calculate reputation scores, thereby assessing client reliability and increasing the value of reputation scores within the system.

[0004] Secondly, performance imbalances among clients and the presence of stray machines in the network lead to significant differences in client training times. This results in long intervals between local gradients transmitted by clients reaching the server, causing clients to wait for each other—a common problem in parallel computing. To shorten the waiting time between participants, asynchronous solutions have been proposed. Upon receiving a local gradient from a single client, the global gradient is immediately updated and transmitted to all clients, thus resolving the client waiting problem. However, when the data distribution among clients is inconsistent, the training results will be incorrect. To address this issue, the FedCS protocol has been proposed to filter out low-performance clients, but this solution can overfit the training results from high-performance clients. Furthermore, some have proposed aggregating stale and normal models to accelerate convergence, but this algorithm requires clients to upload both model parameters and gradient parameters in each training round, meaning the amount of data transmitted is twice that of the average gradient algorithm, increasing the time spent on data transmission. To address the issue of performance imbalance among clients without increasing data transmission time, a gradient partial aggregation algorithm has been proposed. In this algorithm, the server aggregates only an appropriate number of local gradients from clients. However, the number of clients to be aggregated varies depending on the training task, requiring additional work to determine the appropriate number of clients to participate in the aggregation.

[0005] Finally, traditional federated learning uses gradient averaging for aggregation, ignoring the contribution of high-precision clients in training, thus increasing the number of training epochs. To address this issue, researchers have proposed using data quality-related parameters as weights for gradient aggregation, increasing the proportion of local gradients from high-quality data in the global gradient.

[0006] However, there is currently no solution to address the technical problems of numerous training rounds and long training times by incentivizing clients with high-quality data to join the training, resolving client performance imbalances, and implementing aggregation strategies. Therefore, this application provides a federated learning optimization method based on an incentive mechanism to solve the aforementioned technical problems. Summary of the Invention

[0007] This application provides a federated learning optimization method and system based on an incentive mechanism, which solves the technical problems of numerous training rounds and long training times by addressing three aspects: incentivizing clients with high-quality data to join the training, resolving the issue of uneven client performance, and implementing aggregation strategies.

[0008] In view of this, the first aspect of this application provides a federated learning optimization method based on an incentive mechanism, the method comprising:

[0009] The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client.

[0010] The training client publishes local training tasks to the fog node network, and each fog node in the fog node network participates in the auction and provides auction information, including frequency, payoff function and single training time of local training data.

[0011] The training client selects the fog node with the lowest bid based on the payment function and the shortest training time on local training data as the winning fog node to perform the local training task.

[0012] The training client sends local training data to the winning fog node, which then trains the local training data and uploads the partial model to the server.

[0013] The server aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node, which then updates the model parameters and performs the next round of training.

[0014] After each training round, the server recalculates the reputation value of the training client according to the preset reputation value calculation rules and stores it in the blockchain;

[0015] After each training round, the training client's reward is calculated based on the reward rules and the training client's reputation value. At the same time, the training client settles the reward for winning the fog node auction.

[0016] Optionally, the resource requirements include the size of the local training data, the data type, the time threshold for local training, and the required training accuracy.

[0017] The local training task task(Gmodel, data_size, sys_time, S) includes the global model Gmodel, the amount of training data data_size, the auction end time sys_time, and the server identifier S.

[0018] Optionally, the training client further includes the following before sending local training data to the winning fog node in the auction:

[0019] The training client encrypts the local training data.

[0020] Optionally, the server aggregates local models to obtain the global gradient as follows:

[0021]

[0022] in, Let be the local gradient of the nth training iteration for client i.

[0023] Optionally, the preset reputation value calculation rules specifically include:

[0024] Accuracy and Reputation Value

[0025]

[0026] in, and curret_task, task x Let h and i represent the current task and task x, respectively, and sim(h,i) represent the similarity between task h and task i. To train client i on the data quality in round n, q min This is the data quality threshold;

[0027]

[0028] H and I represent the sets of clients executing task h and task i, respectively. Γ = H ∩ I represents the set of clients simultaneously executing task h and task i. and These represent the average reputation values ​​of all clients when tasks h and i are executed at time t, respectively. and Let represent the reputation values ​​of client j when performing task h and task i at time t, respectively, satisfying 0 < sim(h,i) < 1.

[0029] Optionally, the preset reputation value calculation rule further includes:

[0030] Time Reputation Value

[0031]

[0032] Among them, satisfying T ex The desired training time.

[0033] Optionally, the preset reputation value calculation rule further includes:

[0034] Total reputation value r_at i r_at i =r_a i *r_t i .

[0035] Optionally, the reward for the training client is specifically:

[0036] r_t minThe minimum time reputation value to tolerate.

[0037] Optionally, the specific details of the training client's settlement and reward for the winning fog node in the auction are as follows:

[0038]

[0039] in:

[0040] P i '(r_at i )=φ*(T ex -T r )*r_at i T ex For the desired training time, T r This represents the total actual training time.

[0041] c i D i The number of CPU cycles required to run one local iteration for the training client.

[0042] A second aspect of this application provides a federated learning optimization system based on an incentive mechanism, the system comprising:

[0043] The task publishing client, a training client network consisting of at least one training client, a fog node network consisting of at least one fog node, and a server;

[0044] The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client.

[0045] The training client publishes local training tasks to the fog node network, and each fog node in the fog node network participates in the auction and provides auction information, including frequency, payoff function and single training time of local training data.

[0046] The training client selects the fog node with the lowest bid based on the payment function and the shortest training time on local training data as the winning fog node to perform the local training task.

[0047] The training client sends local training data to the winning fog node, which then trains the local training data and uploads the partial model to the server.

[0048] The server aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node, which then updates the model parameters and performs the next round of training.

[0049] After each training round, the server recalculates the reputation value of the training client according to the preset reputation value calculation rules and stores it in the blockchain;

[0050] After each training round, the training client's reward is calculated based on the reward rules and the training client's reputation value. At the same time, the training client's reward is settled along with the reward for winning the auction for the fog node.

[0051] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0052] This application provides an incentive-based federated learning optimization method. A reward mechanism based on reputation values ​​incentivizes training clients with high-quality data and efficient local training capabilities to join the training. Only clients with high-precision local gradients and high training efficiency receive high rewards. An auction mechanism based on auction theory is designed, where training clients auction their local training tasks to fog nodes, thus delegating training to fog nodes and improving local training efficiency. This addresses the problem of waiting between training clients due to performance imbalances. A global gradient aggregation strategy is designed to increase the weight of high-precision local gradients in the global gradient, eliminating local gradients from malicious training clients and reducing the number of model training iterations. Overall, this approach addresses the current lack of solutions that incentivize clients with high-quality data to join training, resolve client performance imbalances, and implement aggregation strategies to tackle the technical challenges of numerous training iterations and long training times. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating a federated learning optimization method based on an incentive mechanism, as described in an embodiment of this application.

[0054] Figure 2 This is a system model diagram of a federated learning optimization system based on an incentive mechanism, as described in an embodiment of this application.

[0055] Figure 3 This is a flowchart of the auction process in a federated learning optimization method based on an incentive mechanism, as described in this application. Detailed Implementation

[0056] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0057] This application designs a federated learning optimization method and system based on an incentive mechanism, which solves the technical problems of numerous training rounds and long training times by addressing three aspects: incentivizing clients with high-quality data to join the training, resolving the issue of uneven client performance, and implementing aggregation strategies.

[0058] For easier understanding, please refer to Figure 1 , Figure 1 This is a flowchart illustrating a federated learning optimization method based on an incentive mechanism, as described in an embodiment of this application. Figure 1 As shown, specifically:

[0059] 101. The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client;

[0060] It should be noted that the task publisher uses a task publishing client to publish training tasks to various training clients in the training client network, and simultaneously publishes the reward rules and resource requirements, including:

[0061] Resource requirements include the size and data type of the local training data, the time threshold for local training, and the required training accuracy.

[0062] Training clients can determine whether they can profit from the training task based on their own circumstances and choose whether to sign a contract with the task issuing client. Both parties to the contract can submit a deposit as a guarantee.

[0063] 102. The training client publishes local training tasks to the fog node network, and each fog node in the fog node network participates in the bidding and provides bidding information, including frequency, pay function and single training time of local training data.

[0064] It should be noted that after the training client confirms joining the model training, before the training begins, it publishes the local training task task(Gmodel, data_size, sys_time, S) to the fog node network (including the global model Gmodel, the amount of training data data_size, the auction end time sys_time, and the server identifier S); at the same time, it publishes the auction information b(f,P) that needs to be provided for the fog node jade auction, which includes the frequency and the payment function.

[0065] 103. The training client selects the fog node with the lowest bid based on the payment function and the shortest training time for local training data as the winning fog node to execute the local training task.

[0066] It should be noted that you should refer to [link / reference]. Figure 3 Fog nodes that meet the local training requirements will participate in the auction, submitting their bidding information based on the training cost. i (f i ,P i Fog nodes cannot acquire local training tasks with a higher bid, and based on their individual rationality, fog nodes are unlikely to accept training tasks when the benefits are lower than their own training costs. Therefore, the bid price of the winning fog node is unique.

[0067] Each training client selects a fog node to train on its behalf based on the principle of maximizing revenue. The fog node with the highest frequency and lowest bid will become the final winner and be used for local training. The training client calculates its own revenue based on the fog node's bid, as shown in the formula: Utility i =P i (r_a i ,r_t x )-P x .

[0068] At this point, the training client's reputation value is taken from the system's current reputation value for the corresponding training client, and the fog node that maximizes its benefit is selected as the winning fog node to execute the training task. Simultaneously, the winning fog node needs to sign a delegation contract with the client and submit a deposit. This deposit is refunded upon completion of training. If the winning fog node breaches its promise, its deposit will be transferred to the training client to compensate for any losses incurred due to the breach.

[0069] In each training round, the aggregated global gradient is used as a benchmark. The loss function, often used in machine learning as a learning criterion related to optimization problems, is used to solve and evaluate the model by minimizing the loss function, reflecting the quality of the training results. Therefore, the loss function value is used as a measure of model accuracy. The formula for calculating the data quality of training client i in the nth round is:

[0070] To force the training client to use high-quality data in each training round, the reputation value is designed to be affected not only by the data quality of that round but also by the accuracy of its previous training. The more recent the training round, the greater the impact on the reputation value. The reputation value of training client i after the nth training round is:

[0071]

[0072] in, and

[0073] Furthermore, the reputation score of the training client is also affected by the accuracy of the model trained when performing similar tasks, and by the difference between the time taken to perform similar tasks and the time taken to perform the current task. At the end of the nth round of training, the reputation score of the training client is:

[0074]

[0075] have Where currency_task, task x Let represent the current task and task x, respectively. sim(h,i) represents the similarity between task h and task i, measured using the modified cosine function, i.e.:

[0076]

[0077] H and I represent the sets of training clients that execute task h and task i, respectively. Γ = H ∩ I represents the set of training clients that simultaneously execute task h and task i. and Let h and i represent the average reputation values ​​of all trained clients at time t when tasks h and i are executed, respectively. and Let represent the reputation values ​​of client j when performing task h and task i at time t, respectively, satisfying 0 < sim(h,i) < 1.

[0078] To prevent malicious training clients from adding low-quality data in a training epoch and affecting the training results, a precision-reputation value calculation strategy is designed to increase the rate at which the precision-reputation value decreases when the training client uses low-quality data, and slow down the rate at which the precision-reputation value increases when the training client uses high-quality data. A data quality threshold q is set. min The accuracy reputation value related to accuracy is updated as follows:

[0079]

[0080] The time-related time reputation value also takes into account whether the training time of the training client exceeds a threshold t. max To address the inertia issue in training clients, the rate at which time reputation values ​​decrease is increased. Since the expected training time per round varies across different tasks, time-related reputation values ​​do not consider the performance of the training client when performing other tasks, as detailed below:

[0081]

[0082] Among them, satisfying The lower the time reputation value, the shorter the local training time.

[0083] The total reputation score is related to time and precision, and only when r_a i and r_t i The overall reputation score is optimal when all aspects are high; if one aspect has a low reputation score, the overall reputation score will be low. The specific calculation formula is as follows:

[0084] r_at i =r_a i *r_t i .

[0085] 104. The training client sends local training data to the winning fog node, which then trains the local training data and uploads the local model to the server.

[0086] It should be noted that fog nodes, being close to edge devices, are a cloud extension providing computing services at the network edge. Therefore, the communication overhead of the training client transmitting data to the winning fog node is not considered in this paper. The training client selects a high-quality dataset of size `data_size` from its local storage and passes it to the winning fog node. The local training task is then completed by the winning fog node.

[0087] 105. The server aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node. The winning fog node then updates the model parameters and performs the next round of training.

[0088] It should be noted that the server aggregates local model data to obtain the global gradient and passes this global gradient to the winning fog node. The winning fog node then updates its model parameters and begins the next round of training. The global gradient aggregation follows the formula:

[0089] 106. After each training round, the server recalculates the reputation value of the training client according to the preset reputation value calculation rules and stores it in the blockchain;

[0090] 107. After each training round, the training client's reward is calculated based on the reward rules and the training client's reputation value. At the same time, the training client's reward is settled along with the reward for winning the fog node in the auction.

[0091] It should be noted that the task publisher publishes the model and the desired training time T, as well as the desired accuracy.

[0092] The local iteration time for each round is:

[0093]

[0094] The number of CPU cycles required for the training client to run one local iteration is c. i D i .

[0095] The energy consumption for local training is:

[0096]

[0097] From the above two equations, we can obtain:

[0098]

[0099] Based on rational reasoning, a person will only be willing to join the training process if the client's reward is non-negative, therefore the following condition is met:

[0100]

[0101] The training client selects high-quality data for model training, using the model's overall reputation score as the payout metric. The payout function is as follows: As shown in the formula above, the energy consumed by local training is inversely proportional to the square of the training time. Therefore, the payout function is as follows:

[0102]

[0103] in:

[0104] r_t min The minimum time reputation value is set; training clients will receive a reward if their reputation value is higher than this value, and will not receive a reward if their reputation value is lower.

[0105] r_a min A minimum tolerance accuracy reputation value is set; training clients receive rewards only when their reputation value is not lower than this value. Ultimately, high rewards are only granted when a training client's local model achieves high accuracy and inexpensive training time. For a rational training client, training will only commence if the training reward is non-negative.

[0106] Based on the overall performance of the training client, rewards will be given for reducing the number of training epochs and shortening the overall time, as follows:

[0107] P i '(r_at i )=φ*(T ex -T r )*r_at i ;

[0108] Among them, T ex For the desired training time, T r This represents the total actual training time.

[0109] The total reward for training client i is:

[0110]

[0111] Please see Figure 2 This application also provides an incentive-based federated learning optimization system, the system comprising:

[0112] The task publishing client, a training client network consisting of at least one training client 21, a fog node network consisting of at least one fog node 22, and a server 23;

[0113] The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients 21 in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client.

[0114] Training client 21 publishes local training tasks to fog node network, and each fog node 22 in fog node network participates in the auction and provides auction information, including frequency, pay function and single time for training local training data.

[0115] Training client 21 selects the fog node 22 with the lowest bid based on the payment function and the shortest training time for local training data as the winning fog node to perform the local training task;

[0116] The training client 21 sends local training data to the winning fog node, which then trains the local training data and uploads the local model to the server 23.

[0117] Server 23 aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node, which then updates the model parameters and performs the next round of training.

[0118] After each training round, server 23 recalculates the reputation value of training client 21 according to the preset reputation value calculation rules and stores it in blockchain 24;

[0119] After each training round, the reward for training client 21 is calculated based on the reward rules and the reputation value of training client 21. At the same time, training client 21 settles the reward for winning the fog node in the auction.

[0120] This application provides a federated learning optimization method based on an incentive mechanism. A reward mechanism is established based on reputation values ​​to incentivize training clients with high-quality data and efficient local training capabilities to join the training. Only clients with high-precision local gradients and high training efficiency receive high rewards. An auction mechanism is designed based on auction theory, where training clients auction their local training tasks to fog nodes, thus entrusting fog nodes to train their local data and improving local training efficiency. This addresses the problem of waiting between training clients due to performance imbalances. A global gradient aggregation strategy is designed to increase the weight of high-precision local gradients in the global gradient, eliminating local gradients from malicious training clients and reducing the number of model training iterations. Overall, this method solves the current technical problem of numerous and lengthy model training iterations by addressing three aspects: incentivizing clients with high-quality data to join the training, resolving client performance imbalances, and implementing aggregation strategies.

[0121] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0122] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0123] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0124] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0125] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0126] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or 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 this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0128] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application.

Claims

1. A federated learning optimization method based on an incentive mechanism, characterized in that, include: The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client. The training client publishes local training tasks to the fog node network, and each fog node in the fog node network participates in the auction and provides auction information, including frequency, payoff function and single training time of local training data. The training client selects the fog node with the lowest bid based on the payment function and the shortest training time on local training data as the winning fog node to perform the local training task. The training client sends local training data to the winning fog node, which then trains the local training data and uploads the partial model to the server. The server aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node, which then updates the model parameters and performs the next round of training. After each training round, the server recalculates the reputation value of the training client according to the preset reputation value calculation rules and stores it in the blockchain; After each training round, the training client's reward is calculated based on the reward rules and the training client's reputation value. At the same time, the training client's settlement and the reward for winning the fog node in the auction are also calculated. The server aggregates local models to obtain the global gradient as follows: ; in, For training clients The Local gradients during training rounds, For training clients In the Wheel data quality; The preset reputation value calculation rules specifically include: Accuracy and Reputation Value ; ; in, ,and , Representing the current task and the task respectively , Indicates task With the task similarity, For training clients In the Wheel data quality, U represents the data quality threshold, and U represents the task set. This represents the difference between the time taken to execute task x and the time taken to execute the current task. ; and They represent the tasks to be performed. With the task A collection of clients, Indicates simultaneous execution of tasks With the task A collection of clients, and They represent in Execute tasks at all times With the task The average reputation value of all clients at that time. and They represent in Execute tasks at all times With the task Time Training Client Reputation value, satisfying .

2. The federated learning optimization method based on incentive mechanisms according to claim 1, characterized in that, The resource requirements include the size and data type of the local training data, the time threshold for local training, and the required training accuracy. Local training task Including global model Training data volume Auction end time Server identifier .

3. The federated learning optimization method based on incentive mechanisms according to claim 1, characterized in that, Before the training client sends local training data to the winning fog node, it also includes: The training client encrypts the local training data.

4. The federated learning optimization method based on incentive mechanisms according to claim 1, characterized in that, The preset reputation value calculation rules also include: Time Reputation Value ; ; Among them, satisfying , This is a time reference parameter.

5. The federated learning optimization method based on incentive mechanisms according to claim 4, characterized in that, The preset reputation value calculation rules also include: Total Reputation Score , .

6. The federated learning optimization method based on incentive mechanisms according to claim 5, characterized in that, The reward for the training client is as follows: , The minimum time reputation value to tolerate, This represents the parameters used to calculate the reward.

7. The federated learning optimization method based on incentive mechanisms according to claim 6, characterized in that, The specific rewards for the training client settlement and the winning fog node in the auction are as follows: ; in: , For the desired training time, This represents the total actual training time. This represents an additional reward given for reducing the number of training epochs and shortening the overall training time, based on the overall performance of the client. Represents the total reputation score. , This indicates the parameters needed to calculate additional rewards, which are determined by the balancing task issuer based on the remaining gains obtained after training; , The number of CPU cycles required for the training client to run one local iteration. This indicates the energy consumption during local training. This indicates that the training client calculates the effective capacitance coefficient of the chipset. This indicates the CPU cycle frequency of the training client. This represents the time spent by the training client training on dataset D.

8. A federated learning optimization system based on an incentive mechanism, characterized in that, include: The task publishing client, a training client network consisting of at least one training client, a fog node network consisting of at least one fog node, and a server; The task publishing client publishes training tasks, reward rules, and resource requirements to the training client network, enabling training clients in the training client network that can obtain benefits based on the reward rules to sign contracts with the task publishing client. The training client publishes local training tasks to the fog node network, and each fog node in the fog node network participates in the auction and provides auction information, including frequency, payoff function and single training time of local training data. The training client selects the fog node with the lowest bid based on the payment function and the shortest training time on local training data as the winning fog node to perform the local training task. The training client sends local training data to the winning fog node, which then trains the local training data and uploads the partial model to the server. The server aggregates the local models to obtain the global gradient and passes the global gradient to the winning fog node, which then updates the model parameters and performs the next round of training. After each training round, the server recalculates the reputation value of the training client according to the preset reputation value calculation rules and stores it in the blockchain; After each training round, the training client's reward is calculated based on the reward rules and the training client's reputation value. At the same time, the training client's settlement and the reward for winning the fog node in the auction are also calculated. The server aggregates local models to obtain the global gradient as follows: ; in, For training clients The Local gradients during training rounds, For training clients In the Wheel data quality; The preset reputation value calculation rules specifically include: Accuracy and Reputation Value ; ; in, ,and , Representing the current task and the task respectively , Indicates task With the task similarity, For training clients In the Wheel data quality, U represents the data quality threshold, and U represents the task set. This represents the difference between the time taken to execute task x and the time taken to execute the current task. ; and They represent the tasks to be performed. With the task A collection of clients, Indicates simultaneous execution of tasks With the task A collection of clients, and They represent in Execute tasks at all times With the task The average reputation value of all clients at that time. and They represent in Execute tasks at all times With the task Time Training Client Reputation value, satisfying .