Federal learning excitation method and system based on two-stage commitment and block chain
By employing an incentive approach based on two-phase commitment and blockchain, the problems of dishonest server reward distribution and uneven client data distribution are addressed, achieving transparency and adaptability of the incentive mechanism and improving the model performance and client engagement of federated learning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEBEI UNIVERSITY
- Filing Date
- 2026-01-28
- Publication Date
- 2026-04-28
AI Technical Summary
In existing federated learning technologies, server dishonesty in distributing rewards and uneven distribution of client data lead to a decline in model performance. Furthermore, incentive schemes are difficult to adapt to dynamic changes in clients, resulting in decreased participation and model performance.
An incentive approach based on two-phase commitment and blockchain is adopted. Through reputation assessment, contribution assessment and two-phase commitment reward verification, the transparency and fairness of reward distribution are ensured, the data distribution balance and contribution of clients are evaluated, and dynamic changes of clients are adapted.
This improves the robustness and convergence speed of the global model, enhances the fairness and credibility of the incentive mechanism, attracts more high-quality clients to participate, and maintains system stability.
Smart Images

Figure CN121940404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of federated learning and blockchain technology, and in particular to a federated learning incentive method and system based on two-phase commitment and blockchain. Background Technology
[0002] This invention relates to the fields of federated learning and blockchain technology, specifically an incentive method for federated learning. Federated learning is a distributed machine learning paradigm proposed by Google in 2017 to address the "data silo" problem between data sharing and privacy security. In FL, multiple clients collaboratively train a global model without sharing the original data, ensuring both training efficiency and protecting the data privacy of all parties. It has already been applied in various fields such as finance, healthcare, and the Internet of Things. The performance of FL largely depends on a sufficient number of clients participating and the high-quality local updates they provide. However, in real-world scenarios, client participation in training consumes computational and communication resources and may face security risks such as poisoning attacks, which reduces the enthusiasm of clients to participate in federated training. Therefore, how to design an effective incentive mechanism to attract and ensure the participation of high-quality clients has become a widely concerned issue in the field of federated learning.
[0003] Chinese patent CN116595094A discloses a blockchain-based federated learning incentive method, apparatus, and device. This method determines the training contributions of participating devices based on blockchain main chain smart contracts and formulates incentive schemes accordingly, thereby improving the reliability of federated learning incentives and the security of incentive funds. This technology enhances the credibility of participating devices in the allocation of incentive rewards to a certain extent.
[0004] Chinese patent CN114491615A discloses a blockchain-based method for a fair incentive mechanism in asynchronous vertical federated learning. This method proposes to use blockchain to deploy vertical federated learning tasks and to achieve fair incentives by storing training information of participants through blockchain, thus providing a certain degree of fairness considerations under the vertical federated learning structure.
[0005] First, most technical solutions focus on using blockchain to record participant contributions or evaluating contributions based on metrics such as gradients and data scale, without fully considering the impact of dynamic changes in participant performance at different training stages on long-term incentive strategies. Second, existing contribution evaluation methods often rely on static or simple metrics, making it difficult to comprehensively capture the impact of multi-dimensional factors such as participant data distribution characteristics, training quality, and behavioral dynamics on the overall performance of the federated learning system. Furthermore, existing patented technologies rarely address how to adjust incentive strategies based on participants' personalized data characteristics and behavioral patterns in the design of personalized incentive schemes, making it difficult to effectively solve the problems of incentive fairness and contribution evaluation in non-independent, identically distributed scenarios in federated learning. Summary of the Invention
[0006] This invention proposes a federated learning incentive method and system based on two-phase commitment and blockchain, addressing shortcomings in existing technologies such as dishonest reward distribution by servers, performance degradation due to uneven client data distribution, and difficulty in adapting incentive schemes to dynamic client joining and leaving. Specifically, this invention aims to prevent dishonest behavior by servers during reward allocation, ensuring transparency and verifiability of the incentive process for all parties; effectively assess and utilize contribution differences under non-independent and identically distributed client data to enhance the robustness of the global model; and maintain the stability and effectiveness of the incentive mechanism even with dynamic changes in participating nodes in federated learning.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A federated learning incentive method based on two-phase commitment and blockchain includes the following steps: Reputation assessment steps: Based on the deviation of the client's uploaded model update from the global update direction in each round, the client's interaction behavior is divided into three cases: positive interaction, negative interaction, and uncertain interaction. The client's reputation value is calculated using a Bayesian inference method based on subjective logic, and a time decay mechanism is introduced to weaken the impact of long-term interactions on reputation. Contribution assessment and model aggregation steps: The balance of local data distribution on the client is quantified by defining the Federated Data Distribution Balance Index (FDD-EM), and its contribution is comprehensively evaluated in combination with the amount of data on the client. The greater the contribution of the client, the higher its weight is given in this round of model aggregation. Two-stage commitment reward verification steps: A two-stage commitment scheme is adopted to ensure the authenticity of reward distribution. In the first stage, the smart contract calculates the expected reward value that the client should receive based on their contribution. i,1 The task issuer uses the client's public key to encrypt the expected reward using the RSA encryption algorithm, generating reward ciphertext C. i,1 and the corresponding hash value h i,1 And submit it to the blockchain for storage; in the second stage, the client uses its own private key to decrypt C. i,1 Receive actual reward value i,2 And calculate its hash value h i,2 Then compare the rewards. i,1 with reward i,2 Whether they are consistent and h i,1 with h i,2 Are they equal?
[0008] Furthermore, the reputation assessment steps specifically include: Calculate the cosine similarity between the client's local update direction and the global update direction, for client U.i Local model update vector in the t-th round of training The local model obtained from training round t Compared with the global model obtained in the previous round The difference, global model update vector The global model obtained from training round t. Compared with the global model obtained in the previous round The difference; When client U i The local model update vector satisfies When this occurs, it is considered a positive interaction; if If a local update fails to reach the target location due to a communication failure, it is considered a negative interaction.
[0009] Furthermore, the calculation formula for the Federal Data Distribution Balance Index (FDD-EM) is as follows: in For client U i The number of samples of category c in the local dataset, where C is the total number of categories in the dataset. For client U i The amount of data, This is a smoothing factor.
[0010] Furthermore, the client U i Contribution value The calculation formula is: ,in This is a smoothing factor.
[0011] Furthermore, the pre-configuration of RSA parameters in the two-stage commitment reward verification step includes: The task issuer pre-selects large prime numbers p and q randomly, ensuring p ≠ q, calculates the modulus n = p × q and φ(n) = (p-1)(q-1), and determines the public key e. i Client U i Determine the private key d i and publish the public key e i .
[0012] Furthermore, the two-stage commitment reward verification step also includes a reward arbitration sub-step: If the reward verification process fails, client U i Constructing controversial messages Submitting to the blockchain triggers reward arbitration, and the smart contract re-decrypts C. i,1 Verification will be conducted, and if it is confirmed that the reward has been tampered with, the task issuer's deposit will be forfeited.
[0013] Furthermore, the time decay mechanism introduces a time decay factor λ∈(0,1) to reduce the impact of historical interactions with clients who have not participated for a long time on the current reputation and to increase the impact weight of recent interactions.
[0014] Furthermore, the subjective logic-based Bayesian inference method is used to mitigate the impact of uncertain interactions on reputation, enabling reputation values to more accurately reflect client behavior.
[0015] Furthermore, the method, during model aggregation, considers contribution values... Calculate the aggregate weight of each honest client to highlight the impact of high-contribution clients on the global model.
[0016] A federated learning incentive system for implementing the above method includes: Task issuer: The party that initiates the federated learning task, responsible for allocating training tasks and rewards, interacting with smart contracts on the blockchain, and submitting reward commitments and initial deposits; Multiple client devices: including the data owner participating in federated learning training, each client has a local training module, communication module and key management unit, and holds a pair of RSA keys; Blockchain network and smart contracts: Smart contracts are deployed using consortium blockchains or private blockchains to record reward commitments and perform fair verification. The smart contract code contains the rule logic for reward calculation and verification.
[0017] The positive effects of this invention are: Preventing dishonest reward distribution: By introducing blockchain and a two-stage commitment mechanism, it is ensured that the server cannot deduct the client's deserved reward without being detected, thus guaranteeing the openness, transparency and fairness of the incentive process and maintaining the trust of all parties involved. Improve global model quality and robustness: Malicious or low-quality model updates are filtered out through a reputation evaluation mechanism, reducing the negative impact of malicious clients on training. At the same time, the contribution evaluation based on data distribution balance and data volume fully considers the imbalance of client data, making model aggregation more reliable and stable, and significantly improving the convergence speed and accuracy of the global model. Incentivizing high-quality client participation: This invention allocates rewards based on client contribution and reputation, with high-contribution and honest clients receiving greater rewards. The fairness and credibility of the incentive mechanism enhance the enthusiasm of excellent clients to participate in federated learning. Experimental results show that even when the server maliciously deducts rewards, this scheme can still attract significantly more clients to participate in training than existing schemes, and achieves better performance in model accuracy. Adapting to dynamic participation scenarios: In this scheme, the client's reputation value is dynamically updated over time, and the influence of old interactions gradually decays. This allows the system to quickly adjust its trust and contribution assessment of clients regardless of whether they join or leave midway, maintaining the incentive mechanism's adaptability to changes in participants and the stability of the FL system. Even when the number of participating clients changes dynamically or the degree of data heterogeneity increases, this invention can still maintain high model performance and convergence stability. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the TPCBFL frame in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the model update vector in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1 Combination Figure 1-2 As shown, a federated learning incentive method based on two-phase commitment and blockchain includes the following steps: Reputation assessment steps: Based on the deviation of the client's uploaded model update from the global update direction in each round, the client's interaction behavior is divided into three cases: positive interaction, negative interaction, and uncertain interaction. The client's reputation value is calculated using a Bayesian inference method based on subjective logic, and a time decay mechanism is introduced to weaken the impact of long-term interactions on reputation. Contribution assessment and model aggregation steps: The balance of local data distribution on the client is quantified by defining the Federated Data Distribution Balance Index (FDD-EM), and its contribution is comprehensively evaluated in combination with the amount of data on the client. The greater the contribution of the client, the higher its weight is given in this round of model aggregation. Two-stage commitment reward verification steps: A two-stage commitment scheme is adopted to ensure the authenticity of reward distribution. In the first stage, the smart contract calculates the expected reward value that the client should receive based on their contribution. i,1 The task issuer uses the client's public key to encrypt the expected reward using the RSA encryption algorithm, generating reward ciphertext C. i,1 and the corresponding hash value h i,1 And submit it to the blockchain for storage; in the second stage, the client uses its own private key to decrypt C. i,1 Receive actual reward value i,2And calculate its hash value h i,2 Then compare the rewards. i,1 with reward i,2 Whether they are consistent and h i,1 with h i,2 Are they equal?
[0021] The reputation assessment steps specifically include: calculating the cosine similarity between the client's local update direction and the global update direction, and the client U i Local model update vector in the t-th round of training The local model obtained from training round t Compared with the global model obtained in the previous round The difference, global model update vector The global model obtained from training round t. Compared with the global model obtained in the previous round The difference; When client U i The local model update vector satisfies When this occurs, it is considered a positive interaction; if If a local update fails to reach the target location due to a communication failure, it is considered a negative interaction.
[0022] The formula for calculating the Federal Data Distribution Balance Index (FDD-EM) is as follows: in For client U i The number of samples of category c in the local dataset, where C is the total number of categories in the dataset. For client U i The amount of data, This is a smoothing factor.
[0023] The client U i Contribution value The calculation formula is: ,in This is a smoothing factor.
[0024] The pre-configuration of RSA parameters in the two-stage commitment reward verification step includes: the task issuer pre-selects large prime numbers p and q, satisfying p≠q, calculates the modulus n=p×q and φ(n)=(p-1)(q-1), and determines the public key e. i Client U i Determine the private key d i and publish the public key e iThe two-stage commitment reward verification step also includes a reward arbitration sub-step: if the reward verification process fails, the client U... i Constructing controversial messages Submitting to the blockchain triggers reward arbitration, and the smart contract re-decrypts C. i,1 Verification will be conducted, and if it is confirmed that the reward has been tampered with, the task issuer's deposit will be forfeited.
[0025] The time decay mechanism introduces a time decay factor λ∈(0,1) to reduce the impact of historical interactions with clients who have not participated for a long time on the current reputation, and to increase the weight of recent interactions. The Bayesian inference method based on subjective logic is used to weaken the impact of uncertain interactions on reputation, enabling the reputation value to more accurately reflect client behavior. This method, during model aggregation, considers contribution values... Calculate the aggregate weight of each honest client to highlight the impact of high-contribution clients on the global model.
[0026] Specifically, this embodiment proposes a federated learning incentive scheme based on "two-stage commitment + blockchain," abbreviated as TPCBFL. This scheme comprises three core modules: reputation assessment, contribution assessment and model aggregation, and two-stage commitment reward verification. First, in the reputation assessment module, client interaction behavior is categorized into three types—positive, negative, and uncertain—based on the deviation of each round of client-uploaded model updates from the global update direction. Then, a Bayesian inference method based on subjective logic is used to calculate the client's reputation value, and a time decay mechanism is introduced to weaken the impact of long-term interactions on reputation, thereby more timely and accurately assessing client honesty and filtering out malicious model updates. Next, in the contribution assessment and model aggregation module, the "Federated Data Distribution Equilibrium Metric" (FDD-EM) metric is defined to quantify the balance of the client's local data distribution, and its contribution is comprehensively evaluated in conjunction with the client's data volume. The greater the client's contribution, the higher its weight is assigned in this round of model aggregation, thus making the model aggregation process more equitable and effective in utilizing high-quality data. Finally, in the reward verification module of the two-phase commitment, a two-phase commitment scheme is adopted to ensure the authenticity of the reward distribution: In the first phase, the smart contract calculates the expected reward value that the client should receive based on the client's contribution. i,1 The task publisher (server) uses the client's public key to encrypt the expected reward using the RSA encryption algorithm, generating reward ciphertext C. i,1 and the corresponding hash value h i,1 They then submit these commitments as pledges to the blockchain for safekeeping; in the second phase, the client uses its own private key to decrypt C. i,1 Receive actual reward value i,2And calculate its hash value h i,2 Then compare the rewards. i,1 with reward i,2 Whether they are consistent and h i,1 with h i,2 The verification process checks for equality. If the results are inconsistent, it indicates that the server has deducted rewards, and the smart contract will automatically arbitrate and penalize the task publisher (e.g., forfeiting their pre-submitted deposit). If the verification passes, the client receives the reward they are entitled to. This design leverages the immutability and verifiability of blockchain technology to ensure the integrity and verifiability of the reward distribution process, effectively preventing dishonest behavior by the server. The overall framework of this technical solution is as follows: Figure 1 As shown, it includes the above three functional modules and their interaction flow.
[0027] The specific process of this federated learning incentive method based on two-phase commitment and blockchain is as follows: (1) Interactive behavior determination and reputation calculation method based on subjective logic To reduce the impact of poisoning attacks on the federated training process, S11 of this invention, based on the client's behavior during the training process, assigns time intervals of t to the client. y The interaction behavior within the system is divided into positive interaction, negative interaction, and uncertain interaction, and the client's reputation is calculated based on Bayesian theory of subjective logic.
[0028] S12 is used to determine positive and negative interactions. This invention calculates the cosine similarity between the client's local update direction and the global update direction. Client U i Local model update vector in the t-th round of training The local model obtained from training round t Compared with the global model obtained in the previous round The difference is used to represent the update direction of the local model. Global model update vector. The global model obtained from training round t. Compared with the global model obtained in the previous round The difference is used to indicate the convergence direction of the global model in this round.
[0029] like Figure 2 As shown, when client U i The local model update vector satisfies At that time, it was believed that U i If the local update is reliable, then its current training behavior is considered a positive interaction. Similarly, if If a local update fails to reach the destination due to communication failures (such as timeouts or packet loss), it is considered a negative interaction.
[0030] To adapt to training scenarios where the number of clients changes dynamically, this invention introduces a time decay factor λ∈(0,1) in S13 to reduce the impact of historical interactions with clients who have not participated for a long time on the current reputation and to increase the weight of recent interactions.
[0031] S14 In order to make the reputation value more accurately reflect the client's behavior, the present invention adopts Bayesian inference based on subjective logic to weaken the impact of uncertain interactions on reputation.
[0032] (2) Client contribution evaluation and model aggregation method In federated learning scenarios, clients typically exhibit data heterogeneity, resulting in varying data volumes and distributions across clients. To avoid solely measuring contribution by data volume while ignoring the impact of class imbalance, this invention comprehensively considers both client data volume and class distribution balance during contribution evaluation, achieving a more comprehensive contribution assessment of heterogeneous clients. This invention defines client U. i Data distribution balance index FDD-EM i The calculation formula is as follows: ,in For client U i The number of samples of category c in the local dataset, where C is the total number of categories in the dataset (taking a ten-class dataset as an example, C is 10). For client U i Data volume ( ), This is a smoothing factor (to prevent the denominator from being 0).
[0033] Furthermore, this invention defines client U i Contribution value In the contribution value calculation, the data volume is large and FDD-EM i Smaller clients are assessed as having a higher contribution, calculated as follows: Where ε2 is a smoothing factor (to prevent the denominator from being 0).
[0034] Based on the above contribution evaluation results, S22, this invention determines an aggregation weight for each honest client and completes model aggregation accordingly. Unlike methods that allocate aggregation weights solely based on data volume, this invention uses contribution values... Calculate the aggregate weight of each honest client to highlight the impact of high-contribution clients on the global model.
[0035] (3) Reward verification method based on two-stage commitment To ensure the integrity and verifiability of the reward distribution process, this invention provides a reward verification method based on two-stage commitment, which uses smart contracts and RSA asymmetric encryption to realize the storage and verification of reward commitments.
[0036] S31 RSA parameter pre-configuration. The task publisher pre-selects large prime numbers p and q (usually 1024 bits or more), ensuring p ≠ q, calculates the modulus n = p × q and φ(n) = (p-1)(q-1), and determines the public key e. i (satisfying 1 < e) i <φ(n), and e i (Coprime with φ(n)). Client U i Determine the private key d i (d) i For e i The modular inverse of modulo φ(n), and the public key e. i .
[0037] The S32 smart contract calculates the expected reward. The smart contract determines the expected reward for each honest client based on their contribution and the task publisher's reward budget B. i,1 Construct the reward message Reward_Message=( Submit to the blockchain.
[0038] S33 generates a cryptographic commitment. The task issuer calculates the expected reward ciphertext C for each client. i,1 and expected reward hash value h i,1 Construct a cryptographic commitment Commit_Record=( ),in , is the signature of the task issuer.
[0039] S34 blockchain notarization. The task issuer will provide encrypted commitments. Submit to the blockchain for evidence storage.
[0040] S35 decryption promise. Client U i Obtaining crypto commitments from the blockchain ), verify signature If the signature verification passes, the expected reward ciphertext will be decrypted. Receive the actual reward value i,2 Then calculate the actual reward hash value. .
[0041] S36 Reward Verification. The client verifies the expected reward value. i,1 Compared with the actual reward value i,2 Expected reward hash value h i,1 Compared with the actual reward hash value hi,2 Are they equal?
[0042] S37 Reward Arbitration. If the reward verification process fails, client U... i Constructing controversial messages Submitting to the blockchain triggers reward arbitration. The smart contract then re-decrypts C. i,1 Verification will be conducted. If it is confirmed that the reward has been tampered with, the task issuer's deposit will be forfeited.
[0043] Example 2 Combination Figure 1-2 As shown, based on Example 1, this embodiment can be widely applied to scenarios requiring distributed collaborative training while protecting data privacy. It incentivizes participants to actively contribute local data and computing power to train shared models. For example, in industries with data silos, such as finance and healthcare, different institutions can use the mechanism of this invention to achieve joint model training without disclosing original data and receive fair reward distribution based on each party's contribution, thereby increasing participation and model performance. This invention is also applicable in industrial IoT or edge computing environments, incentivizing dispersed devices or nodes to participate in federated learning tasks, ensuring data providers receive reliable returns, and promoting the application of federated learning in large-scale heterogeneous network environments.
[0044] This embodiment proposes a federated learning incentive system to implement the federated learning incentive method based on two-phase commitment and blockchain in Embodiment 1, including: Task issuer: The party that initiates the federated learning task, responsible for allocating training tasks and rewards, interacting with smart contracts on the blockchain, and submitting reward commitments and initial deposits; Multiple client devices: including the data owner participating in federated learning training, each client has a local training module, communication module and key management unit, and holds a pair of RSA keys; Blockchain network and smart contracts: Smart contracts are deployed using consortium blockchains or private blockchains to record reward commitments and perform fair verification. The smart contract code contains the rule logic for reward calculation and verification.
[0045] Specifically, the system described above comprises three parts: a task publisher, multiple client devices, and a blockchain network. Figure 1 As shown.
[0046] Task publisher (server): The party that initiates the federated learning task, responsible for allocating training tasks and rewards. The task publisher is also responsible for interacting with smart contracts on the blockchain: submitting reward commitments (ciphertext and hash) and initial deposits, calling smart contract functions to complete reward calculations and arbitration logic, etc.
[0047] Client devices: These include multiple data owners participating in federated learning training. Each client consists of a terminal with certain computing and storage capabilities (e.g., a server, personal computing device, or IoT device). Each client contains a local training module (performing model training and update calculations), a communication module (responsible for interacting with the server / blockchain to upload model parameters, download the global model, and commit rewards), and a key management unit for secure incentive interaction. Each client holds a pair of RSA keys (the public key is publicly shared with the task issuer for encrypting commitments, and the private key is kept for decryption and verification), ensuring the security and reliability of the reward verification process. When a client receives new global model parameters, it uses its local dataset to continue the next round of training and generate updates. During the reward distribution phase, the client retrieves its reward commitment data from the blockchain and uses its private key to perform decryption and verification operations, uploading the results to the blockchain (only necessary when dishonest behavior is detected). Through this process, the client participates in model training while ensuring its own rewards are realized according to its contribution.
[0048] Blockchain Network and Smart Contracts: As a decentralized distributed ledger, blockchain is used in this invention to record reward commitments and execute fair verification. Preferably, a consortium blockchain or private blockchain is used to deploy smart contracts, achieving higher performance and controllability. The smart contract is pre-deployed, containing coded rules and logic for reward calculation and verification: including automatically calculating the expected rewards for each client based on parameters submitted by the task publisher; receiving and storing the encrypted reward commitment value and hash submitted by the task publisher; comparing the commitment with the actual value when the client submits the verification result; determining whether fraudulent behavior exists and executing corresponding actions (e.g., transferring the task publisher's deposit to the victimized client or adding it to the prize pool). The immutability of the blockchain ensures that the commitment data cannot be modified afterward, and its publicly verifiable nature provides a monitoring mechanism for all participants. Once the smart contract detects improper behavior by the server, it can automatically complete arbitration and punishment without third-party intervention, significantly improving the credibility and fairness of the incentive mechanism.
[0049] The above-described embodiments are detailed and specific, illustrating preferred embodiments of the present invention. They are only used to illustrate the technical ideas and features of the present invention, with the aim of enabling those skilled in the art to understand the content of the present invention and implement it accordingly. However, they are not limited to the present invention, and the patent scope of the present invention cannot be limited by this embodiment alone. That is, any equivalent changes or modifications made to the spirit disclosed in the present invention, without departing from the structure of the present invention, such as local improvements within the system and modifications or transformations between subsystems, are still within the patent scope of the present invention.
Claims
1. A federated learning incentive method based on two-phase commitment and blockchain, characterized in that, Includes the following steps: Reputation assessment steps: Based on the deviation of the client's uploaded model update from the global update direction in each round, the client's interaction behavior is divided into three cases: positive interaction, negative interaction, and uncertain interaction. The client's reputation value is calculated using a Bayesian inference method based on subjective logic, and a time decay mechanism is introduced to weaken the impact of long-term interactions on reputation. Contribution assessment and model aggregation steps: The balance of local data distribution on the client is quantified by defining the Federated Data Distribution Balance Index (FDD-EM), and its contribution is comprehensively evaluated in combination with the amount of data on the client. The greater the contribution of the client, the higher its weight is given in this round of model aggregation. Two-stage commitment reward verification steps: A two-stage commitment scheme is adopted to ensure the authenticity of reward distribution. In the first stage, the smart contract calculates the expected reward value that the client should receive based on their contribution. i,1 The task issuer uses the client's public key to encrypt the expected reward using the RSA encryption algorithm, generating reward ciphertext C. i,1 and the corresponding hash value h i,1 And submit it to the blockchain for storage; in the second stage, the client uses its own private key to decrypt C. i,1 Receive actual reward value i,2 And calculate its hash value h i,2 Then compare the rewards. i,1 with reward i,2 Whether they are consistent and h i,1 with h i,2 Are they equal? 2. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The reputation assessment steps specifically include: Calculate the cosine similarity between the client's local update direction and the global update direction, for client U. i Local model update vector in the t-th round of training The local model obtained from training round t Compared with the global model obtained in the previous round The difference, global model update vector The global model obtained from training round t. Compared with the global model obtained in the previous round The difference; When client U i The local model update vector satisfies When this occurs, it is considered a positive interaction; if If a local update fails to reach the target location due to a communication failure, it is considered a negative interaction.
3. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The formula for calculating the Federal Data Distribution Balance Index (FDD-EM) is as follows: in For client U i The number of samples of category c in the local dataset, where C is the total number of categories in the dataset. For client U i The amount of data, This is a smoothing factor.
4. The federated learning incentive method based on two-phase commitment and blockchain according to claim 3, characterized in that, The client U i Contribution value The calculation formula is: ,in This is a smoothing factor.
5. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The pre-configuration of RSA parameters in the two-stage commitment reward verification step includes: The task issuer pre-selects large prime numbers p and q randomly, ensuring p ≠ q, calculates the modulus n = p × q and φ(n) = (p-1)(q-1), and determines the public key e. i Client U i Determine the private key d i and publish the public key e i .
6. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The two-stage commitment reward verification step also includes a reward arbitration sub-step: If the reward verification process fails, client U i Constructing controversial messages Submitting to the blockchain triggers reward arbitration, and the smart contract re-decrypts C. i,1 Verification will be conducted, and if it is confirmed that the reward has been tampered with, the task issuer's deposit will be forfeited.
7. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The time decay mechanism introduces a time decay factor λ∈(0,1) to reduce the impact of historical interactions with clients who have not participated for a long time on the current reputation and to increase the weight of recent interactions.
8. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The subjective logic-based Bayesian inference method is used to reduce the impact of uncertain interactions on reputation, so that reputation values can more accurately reflect client behavior.
9. The federated learning incentive method based on two-phase commitment and blockchain according to claim 1, characterized in that, The method, during model aggregation, considers contribution values. Calculate the aggregate weight of each honest client to highlight the impact of high-contribution clients on the global model.
10. A federated learning incentive system for implementing the method according to any one of claims 1-9, characterized in that, include: Task issuer: The party that initiates the federated learning task, responsible for allocating training tasks and rewards, interacting with smart contracts on the blockchain, and submitting reward commitments and initial deposits; Multiple client devices: including the data owner participating in federated learning training, each client has a local training module, communication module and key management unit, and holds a pair of RSA keys; Blockchain network and smart contracts: Smart contracts are deployed using consortium blockchains or private blockchains to record reward commitments and perform fair verification. The smart contract code contains the rule logic for reward calculation and verification.
Citation Information
Patent Citations
Asynchronous longitudinal federated learning fair incentive mechanism method based on block chain
CN114491615A
Federal learning excitation method and device based on block chain, equipment and storage medium
CN116595094A