A credit behavior evidence storage method and system based on blockchain and federated learning
By establishing smart contracts and consensus committee mechanisms on the blockchain, the security and privacy issues of a single central credit system are solved, the non-tampering and privacy protection of cross-platform credit data are achieved, and the credibility and participation of credit data are improved. Positivity.
Patent Information
- Application Number
- CN202210494794.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-05-07
AI Technical Summary
The existing single-center service credit system faces problems such as credit data being easily tampered with, information silos, credit behavior being difficult to trace, multiple parties not trusting each other, credit data being untrustworthy, privacy being easily leaked and security mechanisms lacking. Especially in the field of cross-platform credit, traditional Federated learning has challenges in terms of central server stability and privacy security.
Adopt a credit behavior certification method based on blockchain and federated learning, release federated learning tasks on the blockchain through smart contracts, establish a multi-centered federated learning framework, and use differential privacy protection technology and consensus committee mechanisms to ensure credit data It is tamper-proof and privacy safe, and realizes the storage and incentive mechanism of credit behavior.
It increases the enthusiasm of credit data institutions to participate in multi-party collaborative calculations, solves the problems of malicious nodes poisoning credit models and collecting private information, ensures the non-tampering and privacy security of credit behaviors, and reduces communication costs and supervision difficulty.
Smart Images

Figure CN115082180B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a credit behavior notarization method and system based on blockchain and federated learning. Background Art
[0002] The cross-border integration characteristics of the modern service industry are becoming more and more obvious. The traditional service credit evaluation system can no longer accurately portray the credit of service providers. It is an urgent need to carry out research on the cross-border and cross-platform service credit theory system and key technology of service credit management to enhance the innovation capacity of the service industry. The existing single-center service credit system faces problems such as easy tampering of credit data, information islands, difficulty in tracing credit behavior, lack of mutual trust among multiple parties, unreliable credit data, easy leakage of privacy, and lack of security mechanisms.
[0003] Machine learning and artificial intelligence technologies are developing rapidly and have been applied and implemented in more and more application scenarios. However, with the significant leap in algorithms and computing power, the demand for data scale is greater, and machine learning algorithms are increasingly dependent on large amounts of data. However, the actual situation is that countries are increasing restrictions on data exchange and data privacy protection measures.
[0004] At present, scholars have proposed various privacy protection mechanisms, such as differential privacy protection, homomorphic encryption, secure multi-party computing, etc. However, there is still no recognized best algorithm. Differential privacy protection methods have high privacy and efficiency, but they will affect the accuracy of machine learning algorithms. Although homomorphic encryption has high privacy, it has high computational and storage overhead during the encryption process, low efficiency, and low availability. Secure multi-party computing has high availability, but high communication overhead and low efficiency.
[0005] In the cross-platform credit field, federated learning can realize multi-party joint modeling and calculation without leaving the local data, and has greater application value in privacy protection. However, this does not mean that it can completely defend against external privacy attacks. Traditional federated learning has the following problems: the stability of the central server may be affected by the cloud service provider; the central server may favor certain clients; malicious central servers may poison the model or collect the client's privacy information. Summary of the invention
[0006] The purpose of this invention is to provide a credit behavior notarization method and system based on blockchain and federated learning to solve the above problems.
[0007] The present invention solves the technical problem by adopting the following technical solution:
[0008] A credit behavior evidence storage method based on blockchain and federated learning includes the following steps:
[0009] (1) The task publisher publishes the federated learning task on the blockchain through a smart contract;
[0010] (2) Other nodes in the alliance query the blockchain. When they find a federated computing task they wish to join, they submit an application to the alliance. After the alliance reviews and approves the application, the node is connected.
[0011] (3) Before the formal federated computing task begins, several nodes are randomly selected as members of the consensus committee;
[0012] (4) After the node joins, it first pulls the latest model from the blockchain, uses local data for model update, and uses differential privacy protection technology to add Gaussian noise to the gradient before submitting parameters to prevent inference attacks; then the local model update information is added to the blockchain's update pool;
[0013] (5) When the number of local updates in the update pool reaches a certain number or exceeds a given time, the consensus committee members select a certain number of updates from the update pool, use local data as a validation set to verify the local updates, and score the model updates based on the accuracy of the updated model;
[0014] (6) The smart contract will re-verify the model based on the test set provided by the task initiator. If the verification is successful, points will be awarded to the submitting committee members and local training nodes, and the global model will be updated;
[0015] (7) The smart contract determines whether the updated global model has met the termination condition proposed by the task publisher. If so, the training ends and the task publisher is notified. If not, the next round of iterative training begins.
[0016] (8) Using smart contracts, select several committee members with the highest update scores in the previous round as committee members for the next round of training, and repeat steps (4) to (7) until the stopping condition proposed by the task publisher is met or the points provided by the task publisher are used up.
[0017] Furthermore, before issuing a federated learning task, all nodes that want to use BFL to issue a federated learning task or participate in federated computing must first register on the blockchain.
[0018] Furthermore, before issuing a federated learning task, the task publisher uploads the task introduction, initial model information, parameter weights, necessary configurations, convergence criteria, reward points, and part of the test set and stores them on the blockchain.
[0019] Furthermore, in step (5), if the score is lower than a given threshold, the model update is abandoned.
[0020] Furthermore, in step (6), if the verification fails, the committee members and local training nodes are penalized. When the node score is lower than a certain score, the node’s authority in the current federated computing is revoked.
[0021] A credit behavior evidence system based on blockchain and federated learning, including blockchain layer, SDK layer and application layer;
[0022] The blockchain layer is used as the underlying data storage, built by the Fisco Bcos network, and uses the solidity language to write relevant smart contracts for credit behavior evidence;
[0023] Fisco-SDK serves as a bridge between the application layer and the blockchain layer. The application layer calls smart contracts through the SDK layer to operate the blockchain;
[0024] The application layer is used to implement the entire system function, display information, and store underlying data.
[0025] Furthermore, the Fisco Bcos network includes distributed ledger services, cryptographic algorithms, consensus algorithms, and P2P peer-to-peer distributed networks.
[0026] Furthermore, the application layer includes the data access layer, business logic layer and view layer; the data access layer is used to store the underlying data and support the call access of the business logic layer; the business logic layer is the core component to realize the function of the whole system, which contains the processing logic of each function of the system, mainly receives the user's request and processes it; the view layer is the web interface seen by the system users, which is the main way for users to interact with the system.
[0027] Beneficial effects:
[0028] (1) By establishing a federated learning incentive mechanism and implementing it through blockchain smart contracts, the enthusiasm of credit data institutions to participate in multi-party collaborative computing can be effectively improved.
[0029] (2) Using consortium chains to implement decentralized federated learning can prevent malicious nodes from poisoning the credit model or collecting the client's privacy information.
[0030] (3) The credit behavior in federated learning is stored in the blockchain, which can ensure that the credit behavior cannot be tampered with. At the same time, when there is a poisoning attack, the blockchain can be used to backtrack, find the malicious node and impose corresponding penalties. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The figure is a flow chart of the method of the present invention.
[0032] Figure 2 It is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] refer to Figure 1 The present invention discloses a credit behavior evidence storage method based on blockchain and federated learning, comprising the following steps:
[0035] Step S1: All nodes that want to publish federated learning tasks or participate in federated computing with the help of BFL must first register on the blockchain.
[0036] Step S2: The task publisher publishes the federated learning task on the blockchain through a smart contract. Here, the task publisher will upload the task introduction, initial model information, parameter weights, necessary configuration, convergence criteria, reward points, and part of the test set and store them on the blockchain.
[0037] In step S3, other nodes in the alliance can query on the blockchain. When they find a federated computing task they wish to join, they submit an application to the alliance. After the alliance reviews and approves the application, the node will be connected.
[0038] Step S4: Before the formal federated computing task begins, several nodes are randomly selected as members of the consensus committee.
[0039] Step S5: After the node joins, it first pulls the latest model from the blockchain, uses local data for model update, and uses differential privacy protection technology to add Gaussian noise to the gradient before submitting parameters to prevent inference attacks. Then the local model update information is added to the blockchain update pool.
[0040] Step S6: When the number of local updates in the update pool reaches a certain number or exceeds a given time, the consensus committee members select a certain number of updates from the update pool, use local data as a validation set to verify the local updates, and score the model updates based on the accuracy of the updated model. If the score is lower than a given threshold, the model update is abandoned.
[0041] In step S7, the smart contract will re-verify the model based on the test set provided by the task initiator. If the verification is successful, the submitted committee members and local training nodes will be rewarded with points, and the global model will be updated. If the verification fails, the committee members and local training nodes will be penalized with points. When the node points are lower than a certain score, the node's authority in the current federated computing will be cancelled.
[0042] In step S8, the smart contract judges the updated global model to determine whether the termination condition proposed by the task publisher has been met. If so, the training is terminated and the task publisher is notified; if not, the next round of iterative training is carried out.
[0043] Step S9: Using smart contracts, select several committee members with the highest update scores in the previous round as committee members for the next round of training. Repeat steps S5 to S8 until the stop condition proposed by the task publisher is met or the points provided by the task publisher are used up.
[0044] refer to Figure 2 The present invention also provides a credit behavior evidence storage system based on blockchain and federated learning, including a blockchain layer, an SDK layer and an application layer.
[0045] The blockchain layer is used as the underlying data storage and is built by the Fisco Bcos network, including distributed ledger services, cryptographic algorithms, consensus algorithms, and P2P peer-to-peer distributed networks, and uses the solidity language to write relevant smart contracts for credit behavior evidence.
[0046] Fisco-SDK serves as a bridge between the application layer and the blockchain layer. The application layer calls smart contracts through the SDK layer to operate the blockchain.
[0047] The application layer includes the data access layer, the business logic layer and the view layer. The data access layer mainly stores the underlying data and supports the business logic layer to call and access. Since this system is based on blockchain technology, unlike the traditional data access layer, the data can be divided into two categories according to whether it is on the chain. Conventional data is accessed and modified by calling SQL statements; core data such as model upload records, task release records, and consensus committee scoring are stored in the blockchain and accessed and queried by calling the blockchain's smart contract through the SDK. The business logic layer is the core component that realizes the functions of the entire system. It contains the processing logic of each function of the system. It mainly receives user requests and processes them, including node registration, task release, global model acquisition, local model upload, consensus committee scoring and other functions. The view layer refers to the Web interface seen by system users. It is the main way for users to interact with the system. The view layer can be implemented using languages such as html5, CSS, and JavaScript.
[0048] At the same time, during the operation and maintenance of the platform, corresponding security mechanisms and management measures need to be established to better play the role and function of the system.
[0049] Based on the existing federated learning technology, the present invention introduces blockchain technology. By establishing a multi-center federated learning framework, it can effectively solve the problems of unreliable credit data and low security. By storing all credit behaviors on the blockchain, the credit behavior can be traced and cannot be tampered with.
[0050] The present invention can effectively improve the enthusiasm of credit data institutions to participate in multi-party collaborative computing by establishing a federated learning incentive mechanism and implementing it using blockchain smart contracts. Using alliance chains to implement multi-centralized federated learning can solve the problem of malicious nodes poisoning the credit model or collecting the client's privacy information. The credit behavior in federated learning is stored in the blockchain to ensure that the credit behavior cannot be tampered with. At the same time, when there is a poisoning attack, the blockchain can be used to backtrack, find the malicious node and impose corresponding penalties.
[0051] This invention utilizes the technical characteristics of blockchain technology such as immutability, smart contracts, and consensus mechanisms to improve the privacy and security issues existing in traditional federated learning, construct a privacy protection architecture for secure and auditable data exchange and multi-party secure computing, and protect data privacy and security from multiple angles such as before, during, and after data exchange.
[0052] The present invention establishes an incentive mechanism for cross-platform data interaction and secure computing, and implements it by writing blockchain smart contracts to ensure the openness and transparency of the incentive mechanism, so as to improve the enthusiasm of all parties to participate in training in the federated learning system. The factors considered in the incentive mechanism include: ① the credit of the client node; ② the amount and quality of data provided by the client node; ③ the participation activity of the client node, etc.
[0053] Specifically, when designing the incentive mechanism, a points system is introduced. Nodes need to consume a certain amount of points when pulling the latest global model, and points need to be obtained based on the node's participation and contribution to the global model. After each round of iterative updates is completed, the smart contract will distribute the points reward to the corresponding nodes based on the scores of the updates submitted in this round.
[0054] With the help of alliance chain, multi-center federated learning is built and a consensus committee is established. Specifically, the consensus committee is composed of several nodes with the best performance in the previous round of model iteration, and is responsible for completing the verification and scoring of this round of gradient updates. Such a consensus committee mechanism can solve the problem of single point failure compared to a single-center node, and can reduce communication costs and reduce the difficulty of supervision compared to a fully decentralized node.
[0055] In order to ensure the robustness and security of the blockchain-based federated learning system, it is crucial to establish a security and privacy protection mechanism, which is also the key reason for introducing blockchain technology in the federated learning system. The present invention uses blockchain to store all shared events and computing behaviors, ensuring that the behaviors cannot be tampered with and are auditable. It can also trace back after a malicious attack, check out the malicious node, and punish the client node to a certain extent.
[0056] Specifically, user behaviors include: task publishing, joining federal tasks, uploading local models, consensus committee verification and scoring, new committee elections, and other operations. User behaviors will automatically call the blockchain's smart contract as the operations proceed, package the corresponding behaviors, and submit them to the blockchain after adding a timestamp and the user's signature. After being uploaded to the chain, the behaviors can be guaranteed to be tamper-proof.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A credit behavior certification method based on blockchain and federated learning, characterized in that: The steps include: (1) The task publisher publishes the federated learning task on the blockchain through a smart contract; (2) Other nodes in the alliance query the blockchain. When they find a federated computing task they wish to join, they submit an application to the alliance. After the alliance reviews and approves the application, the node is connected. (3) Before the formal federated computing task begins, several nodes are randomly selected as members of the consensus committee; (4) After the node joins, it first pulls the latest model from the blockchain, uses local data for model update, and uses differential privacy protection technology to add Gaussian noise to the gradient before submitting parameters to prevent inference attacks; then the local model update information is added to the blockchain's update pool; (5) When the number of local updates in the update pool reaches a certain number or exceeds a given time, the consensus committee members select a certain number of updates from the update pool, use local data as a validation set to verify the local updates, and score the model updates based on the accuracy of the updated model; (6) The smart contract will re-verify the model based on the test set provided by the task initiator. If the verification is successful, points will be awarded to the submitted committee members and local training nodes, and the global model will be updated. In step (6), if the verification fails, points will be penalized to the committee members and local training nodes. When the node points are lower than a certain score, the node’s authority in the current federated computing will be revoked. (7) The smart contract determines whether the updated global model has met the termination condition proposed by the task publisher. If so, the training ends and the task publisher is notified. If not, the next round of iterative training begins. (8) Using smart contracts, select several committee members with the highest update scores in the previous round as committee members for the next round of training, and repeat steps (4) to (7) until the stopping condition proposed by the task publisher is met or the points provided by the task publisher are used up.
2. According to claim 1, a credit behavior evidence storage method based on blockchain and federated learning is characterized in that: Before issuing a federated learning task, all nodes that want to use BFL to issue a federated learning task or participate in federated computing must first register on the blockchain.
3. According to claim 2, a credit behavior evidence storage method based on blockchain and federated learning is characterized in that: Before issuing a federated learning task, the task publisher uploads the task introduction, initial model information, parameter weights, necessary configuration, convergence criteria, reward points, and part of the test set and stores them on the blockchain.
4. According to claim 3, a credit behavior evidence storage method based on blockchain and federated learning is characterized in that: In step (5), if the score is lower than the given threshold, the model update is abandoned.
5. A credit behavior evidence system based on blockchain and federated learning, characterized in that: It includes blockchain layer, SDK layer and application layer; among them, The blockchain layer is used as the underlying data storage, built by the Fisco Bcos network, and uses the solidity language to write relevant smart contracts for credit behavior evidence; Fisco-SDK serves as a bridge between the application layer and the blockchain layer. The application layer calls smart contracts through the SDK layer to operate the blockchain; The application layer is used to implement the entire system function, display information, and store underlying data.
6. According to claim 5, a credit behavior evidence storage system based on blockchain and federated learning is characterized in that: The Fisco Bcos network includes distributed ledger services, cryptographic algorithms, consensus algorithms, and P2P peer-to-peer distributed networks.
7. According to claim 5, a credit behavior evidence storage system based on blockchain and federated learning is characterized in that: The application layer includes the data access layer, business logic layer and view layer; the data access layer is used to store the underlying data and support the call access of the business logic layer; the business logic layer is the core component to realize the functions of the whole system, which contains the processing logic of each function of the system, mainly receives the user's request and processes it; the view layer is the web interface seen by the system users, which is the main way for users to interact with the system.
Citation Information
Patent Citations
Trusted federated learning method, system and device based on block chain and medium
CN111966698A
Federated learning defense method based on block chain
CN112434280A
Medical data sharing privacy protection method based on block chain by utilizing federated learning
CN113536382A
Federal learning method and system based on block chain and trusted execution environment
CN113837761A
Model training method for federated learning network, and related device
WO2021120676A1
Cited By
Fair incentive mechanism design method of block chain federated learning system
CN120031161A
