A blockchain-based federated learning method and system

By adopting multiple consensus node parallel training and homomorphic encryption algorithms in blockchain federated learning, the problems of inefficient and insufficient security in the existing technology are solved, equal participation and efficient gradient calculation are achieved, and training is improved Safety and efficiency of the process.

CN114418134BActive Publication Date: 2024-12-31GRG BANKING EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210068502.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2024-12-31
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

The existing blockchain federated learning method has problems such as violating the principle of equality, inefficiency and insufficient security, especially the repeated serial encryption and decryption gradient information on the consensus node, which depends on the calculation of the previous node, and the initial consensus node Improper selection may lead to failure in model training or information leakage.

Method used

Multiple consensus nodes are trained in parallel, each node calculates and sends the first gradient value to the coordination end, and the coordination end performs aggregation processing and distributes the second gradient value. Each node updates the parameters based on equality and is encrypted by a homomorphic encryption algorithm. Transfer data to ensure data security. Each node splits and synthesizes the first gradient value to generate new gradient values ​​to improve training efficiency and safety.

Benefits of technology

It significantly saves training time, ensures that all nodes participate equally in computing, improves the safety of the training process, does not rely on the honesty of the initial node, and improves the efficiency and security of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418134B_ABST
    Figure CN114418134B_ABST
Patent Text Reader

Abstract

The present invention relates to an intelligent network model, and in particular to a blockchain-based federated learning method and system. A blockchain-based federated learning method, comprising: a plurality of consensus nodes train a federated model according to sample data, obtain corresponding first gradient values ​​respectively and send them to a coordination end; the coordination end aggregates the received plurality of first gradient values, obtains a second gradient value and distributes it to each of the consensus nodes, so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value; determines whether the updated federated model meets the termination condition, if so, terminates the training, otherwise, performs training again. Compared with the traditional serial federated learning method, it can significantly save time. Furthermore, each consensus node has equal records and calculations, does not rely on the honesty of the initial node, and can improve the security of the training process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an intelligent network model, and in particular to a blockchain-based federated learning method and system. Background Art

[0002] In the traditional horizontal federation model, the central server sends the initial model to each participant, the participants train the model with their own data sets, and send the weight updates in the model to the central server. The central server aggregates the models received from the participants to update, and sends the aggregated model updates to the participants again. The whole process will be repeated until the model converges and reaches the preset maximum number of iterations or the maximum training time.

[0003] In the blockchain system, all nodes participate equally in data recording, and the on-chain data is open and transparent to all nodes, and has the characteristics of traceability. In addition, the distributed storage mechanism backs up the data multiple times, which can avoid data loss caused by single point failure, thereby ensuring data security. Since federated learning has the characteristics of distributed and local computing, it has many similarities with the decentralized and distributed computing characteristics of blockchain, and its integration with blockchain is a major technological trend. In the federated scenario on the blockchain, there are few learning methods. The patent document with the best disclosure as CN 112801307 A discloses a federated learning method on the blockchain. The main scheme is "the first consensus node trains the federated model, obtains the gradient value, and sends it to the blockchain system after encryption; starting from the second consensus node, the consensus node obtains the gradient value of the previous consensus node in a preset order and decrypts it, adds the decrypted gradient value to the gradient value obtained by training the federated model by this node, and then encrypts it again and sends it to the blockchain, until the last consensus node sends the latest encrypted gradient value to the blockchain; the first consensus node decrypts the encrypted gradient value sent by the last consensus node to the blockchain, obtains the final gradient value, and sends it to the blockchain". This scheme has the following shortcomings:

[0004] 1) Violation of the equality principle. In the joint modeling on the blockchain, the initial consensus node has the gradient aggregation information of all nodes, which does not conform to the equality principle of blockchain and federated learning. A small number of nodes have a lot of information.

[0005] 2) Inefficiency. Gradient information is encrypted and decrypted repeatedly and serially on consensus nodes. The gradient calculation on one node depends on the calculation on the previous node, which does not fully utilize the interconnectivity of blockchain.

[0006] 3) Low security. The initial consensus node selection is random. If it is not selected properly, such as dishonest participants, it may lead to model training failure or information leakage.

[0007] These problems will bring serious application limitations in practice. Summary of the invention

[0008] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a blockchain-based federated learning method and system to solve the technical problems mentioned in the background technology.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] In one aspect, the present invention provides a blockchain-based federated learning method, comprising:

[0011] Multiple consensus nodes train the federated model based on sample data, obtain the corresponding first gradient values ​​and send them to the coordination end;

[0012] The coordination end aggregates the received multiple first gradient values ​​to obtain a second gradient value and distributes the second gradient value to each of the consensus nodes, so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value;

[0013] Determine whether the updated federated model meets the termination conditions. If so, terminate the training; otherwise, train again.

[0014] Preferably, after respectively obtaining the first gradient value, the plurality of consensus nodes further perform the following operations:

[0015] Each of the consensus nodes performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each of the consensus nodes retains one of the gradient sub-values ​​and sends the remaining gradient sub-values ​​to other consensus nodes respectively; the predetermined number is less than or equal to the number of consensus nodes;

[0016] Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value.

[0017] Preferably, when the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between a consensus node and a coordination terminal, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein,

[0018] Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.

[0019] Preferably, before training, each participant in federated learning is registered as a node on the blockchain system; the node includes a coordination end and at least one consensus node; wherein the coordination end establishes a smart contract containing initial information of the federated model; and all the consensus nodes obtain the initial information of the federated model from the coordination end.

[0020] Preferably, after terminating the training, the method further comprises:

[0021] Each consensus node fine-tunes the parameters of its own federation model to obtain the corresponding personalized federation model.

[0022] Preferably, the federated model is a parameter model optimized based on gradient information or Hessian matrix information.

[0023] Preferably, it also includes:

[0024] Transfer learning: Transfer learning is performed with the model parameters of the federated model at the coordination end as the source domain and the model parameters of the local model of the consensus node as the target domain, where the difference in the distribution of the source domain and the target domain is designed in the objective function used for transfer learning.

[0025] On the other hand, the present invention provides a blockchain-based federated learning system, comprising:

[0026] Multiple consensus nodes are used to train the federated model according to the sample data, obtain the corresponding first gradient values ​​and send them to the coordination end;

[0027] The coordination end is used to aggregate the multiple first gradient values ​​received to obtain a second gradient value and distribute it to each of the consensus nodes; so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value, and determines whether the updated federated model meets the termination condition, if so, terminates the training, otherwise, conducts training again.

[0028] Preferably, after respectively obtaining the first gradient value, the plurality of consensus nodes further perform the following operations:

[0029] Each of the consensus nodes performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each of the consensus nodes retains one of the gradient sub-values ​​and sends the remaining gradient sub-values ​​to other consensus nodes respectively; the predetermined number is less than or equal to the number of consensus nodes;

[0030] Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value

[0031] Preferably, when the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between a consensus node and a coordination terminal, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein,

[0032] Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.

[0033] Compared with the prior art, the blockchain-based federated learning method and system provided by the present invention has the following beneficial effects:

[0034] Using the blockchain-based federated learning method provided by the present invention, after training, each consensus node sends the first gradient value to the coordination end in parallel. The coordination end aggregates the first gradient value and distributes the second gradient value. Then, each node uses the second gradient value to optimize the federated model. Compared with the traditional serial federated learning method, it can save time significantly. Moreover, each consensus node has equal records and calculations, which does not depend on the honesty of the initial node, and can improve the security of the training process. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of the blockchain-based federated learning method provided by the present invention.

[0036] Figure 2 It is a flowchart of an embodiment of the blockchain-based federated learning method provided by the present invention.

[0037] Figure 3 It is a structural block diagram of the blockchain-based federated learning system provided by the present invention.

[0038] Figure 4 It is a schematic diagram of the implementation of the federated learning method applied in the blockchain-based federated learning system provided by the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0040] Those skilled in the art will appreciate that the foregoing general description and the following detailed description are exemplary and illustrative of specific embodiments of the present invention and are not intended to limit the present invention.

[0041] The terms "comprises," "includes," or any other variations thereof herein are intended to cover a non-exclusive inclusion, such that a process or method that includes a list of steps includes not only those steps but may include other steps not expressly listed or inherent to such process or method. Similarly, a reference to one or more devices or subsystems, elements or structures or components preceded by "comprises ... an" does not, without more limitations, exclude the presence of other devices or other subsystems or other elements or other structures or other components or other devices or other subsystems or other elements or other structures or other components. Throughout the specification, appearances of the phrases "in one embodiment," "in another embodiment," and similar language may, but do not necessarily, all refer to the same embodiment.

[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0043] See also Figure 1-Figure 4 The present invention provides a blockchain-based federated learning method, comprising:

[0044] Multiple consensus nodes train the federated model according to the sample data, obtain the corresponding first gradient values ​​respectively and send them to the coordination end; specifically, the consensus nodes are each participating end or participating device for reference training of the federated model, and technicians in this field can train the federated model on each consensus node according to actual needs, and finally obtain the first gradient value. Preferably, the initial parameters of the federated model on the multiple consensus nodes are provided by the coordination end.

[0045] Furthermore, as a preferred solution, in this embodiment, the initial information of the federated model in the consensus node is provided by the coordination end. Specifically, each participant of the federated learning is registered as a node on the blockchain system, including a coordination end node and at least one consensus node; the coordination end node establishes a smart contract; the smart contract contains the initial information of the federated model; all consensus nodes obtain the initial information of the federated model in the coordination end node; the initial information contains the characteristic parameters used to train the federated model.

[0046] Further, as a preferred solution, in this embodiment, the federated model is a parameter model optimized based on gradient information or Hessian matrix information.

[0047] The coordination end aggregates the received multiple first gradient values to obtain a second gradient value and distributes it to each consensus node, so that each consensus node updates the parameters of the federated model based on the second gradient value; specifically, each consensus node sends its own first gradient value to the coordination end for gradient aggregation, that is, an addition operation, so that the second gradient value obtained by the coordination end has the gradient information of multiple consensus nodes, thus ensuring the effect of federated learning.

[0048] Determine whether the updated federated model meets the termination condition. If so, terminate the training; if not, perform the training again. Specifically, the termination condition is that the number of training times reaches a predetermined number or the federated model reaches a predetermined operating effect.

[0049] Using the blockchain-based federated learning method provided by the present invention, after training, each consensus node sends the first gradient value to the coordination end in parallel. The coordination end aggregates the obtained first gradient values, obtains a second gradient value for distribution, and then each node uses the second gradient value to optimize the federated model. Compared with the traditional serial federated learning method, it can significantly save time. Moreover, each consensus node records and calculates equally and does not depend on the honesty of the initial node, which can improve the security during training.

[0050] Further, as a preferred solution, in this embodiment, after each of the multiple consensus nodes obtains the first gradient value, the following operations are further performed:

[0051] Each consensus node performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each consensus node retains one of the gradient sub-values and sends the remaining gradient sub-values to other consensus nodes respectively; the predetermined number is less than or equal to the number of consensus nodes; specifically, the first gradient value of each consensus node is split and shared externally, and the number of splits can be the number of consensus nodes or less than the number of consensus nodes, that is, m consensus nodes (m < n) can be randomly selected for secret sharing. For example Figure 4 As shown, nodes 1-4 each send the corresponding gradient sub-value to other nodes; preferably, each time the splitting and sharing is performed, the predetermined number of values in each consensus node is the same; further, the predetermined number of each consensus node can be flexibly set, that is, the predetermined numbers between different consensus nodes can be different.

[0052] Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value. That is, multiple consensus nodes will send the obtained new first gradient value to the coordination end for processing. Each of the consensus nodes ensures the consistency of the gradient calculation results by dividing and re-aggregating the gradient value. Specifically, each consensus node is set to perform a data synthesis operation as long as it receives a gradient sub-value to obtain the second gradient value. In this way, no matter how many of its own predetermined numbers are, a final and accurate second gradient value can be generated. The synthesis operation is preferably an addition operation on the gradient sub-values. The specific processing process can be set by technicians in this field according to actual needs.

[0053] In this embodiment, the first gradient value is split first and sent to other predetermined number of consensus nodes respectively, that is, a round of gradient value sharing is first performed between each other. First, the training efficiency of the federated model can be significantly improved and the training time can be shortened. If there are n consensus nodes and the predetermined number of splits each time is also n, each training can save a total of n-1*T time (T is the unit time of encryption and decryption).

[0054] Further, as a preferred solution, in this embodiment, when the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between the consensus node and the coordination end, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein,

[0055] Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.

[0056] Further, as a preferred solution, in this embodiment, the homomorphic encryption algorithm is one of the Paillier algorithm and an asymmetric algorithm with additive homomorphic properties. The homomorphic encryption algorithm is not limited to the Paillier algorithm, and all asymmetric algorithms with additive homomorphic properties can be used as cryptographic algorithms for gradient transmission on nodes.

[0057] Furthermore, as a preferred solution, in this embodiment, before training, each participant of federated learning is registered as a node on the blockchain system; the node includes a coordination end and at least one consensus node; wherein the coordination end establishes a smart contract containing the initial information of the federated model; and all the consensus nodes obtain the initial information of the federated model from the coordination end. That is, the initial information of the federated model in the consensus node is provided by the coordination end, ensuring the commonality of the initial information of the federated model.

[0058] The following is an example of federated learning of the scorecard model on the bank alliance chain. The implementation process is as follows:

[0059] 1) On the alliance chain formed by n banks, the bank nodes train the federated model based on the sample data on the nodes to obtain the corresponding first gradient value. The gradient calculation of each bank is independent and not affected by each other;

[0060] 2) Each bank randomly divides its first gradient value into n parts, and obtains:

[0061] g=g1+g2+……+g m ,m≤n; where g is the first gradient value; g i (i=1, 2, ..., m) is the gradient sub-value.

[0062] 3) Each bank retains one of the gradient sub-values, and the remaining gradient sub-values ​​are encrypted with the public keys of the other participating banks and sent to the corresponding banks. Correspondingly, each bank will receive the gradient sub-values ​​of other participating banks encrypted with its own public key. Here, the homomorphic encryption algorithm is used to add up all the transmitted gradient values ​​and then decrypt them with its own private key:

[0063] g new =Dec(Enc(g1)+Enc(g2)+……+Enc(g j ));

[0064] Among them, g new is the new first gradient value; g i (i=1, 2, ..., j) is the received gradient sub-value; Dec represents decryption, and Enc represents encryption.

[0065] 4) The first gradient value that each bank currently has is contributed by all participating banks. Each bank sends its first gradient value to the coordination end for gradient aggregation to obtain the second gradient value. Because the gradient is summed, the gradient segmentation and reaggregation of each bank ensures the consistency of the gradient calculation results.

[0066] 5) After the coordination end aggregates the gradients, it encrypts the gradient information according to the public key of each bank and sends it to each bank to update the parameters of the model on the node.

[0067] Repeat steps 1) to 5) until the termination condition is met.

[0068] In some embodiments, the specific implementation is not limited to the bank's scoring card model federated learning tasks, but also includes federated learning tasks with blockchain properties. The specific application process is the same and will not be repeated.

[0069] Further, as a preferred solution, in this embodiment, after the training is terminated, the following steps are further included:

[0070] Each consensus node fine-tunes the parameters of its own federated model to obtain the corresponding personalized federated model. Specifically, the model parameters of the consensus node are uploaded to the coordination end, which aggregates the model parameters received from each consensus point. After the number of iterations reaches the preset conditions, the trained model parameters are sent to each consensus node, and each consensus node fine-tunes the model parameters to obtain the model on the consensus node. After fine-tuning, the models on each consensus node may be different, and a federated model that can adapt to local data can be obtained.

[0071] Furthermore, as a preferred solution, in this embodiment, it also includes:

[0072] Transfer learning: The model parameters of the federated model at the coordination end are used as the source domain, and the model parameters of the local model at the consensus node are used as the target domain for transfer learning. The difference in the distribution of the source domain and the target domain is designed in the objective function used for transfer learning. It is ensured that the federated model obtained by each consensus node is based on the federated model at the coordination end, while ensuring its own personalization and agreeing on the running effect.

[0073] It can also include horizontal learning components in hybrid federations.

[0074] See also Figure 3-Figure 4 The present invention also provides a blockchain-based federated learning system, comprising:

[0075] Multiple consensus nodes are used to train the federated model according to the sample data, obtain the corresponding first gradient values ​​and send them to the coordination end;

[0076] The coordination end is used to aggregate the multiple first gradient values ​​received to obtain a second gradient value and distribute it to each of the consensus nodes; so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value, and determines whether the updated federated model meets the termination condition, if so, terminates the training, otherwise, conducts training again.

[0077] Further, as a preferred solution, in this embodiment, after the plurality of consensus nodes respectively obtain the first gradient value, they further perform the following operations:

[0078] Each of the consensus nodes performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each of the consensus nodes retains one of the gradient sub-values ​​and sends the remaining gradient sub-values ​​to other consensus nodes respectively; the predetermined number is less than or equal to the number of consensus nodes;

[0079] Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value.

[0080] Further, as a preferred solution, in this embodiment, when the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between the consensus node and the coordination end, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein,

[0081] Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.

[0082] Furthermore, as a preferred solution, in this embodiment, the homomorphic encryption algorithm is a Paillier algorithm or an asymmetric algorithm with additive homomorphic properties.

[0083] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the protection scope of the claims attached to the present invention.

Claims

1. A blockchain-based federated learning method, characterized in that: include: Multiple consensus nodes train the federated model based on sample data, obtain the corresponding first gradient values ​​and send them to the coordination end; The consensus node is a bank node; The coordination end aggregates the received multiple first gradient values ​​to obtain a second gradient value and distributes the second gradient value to each of the consensus nodes, so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value; Determine whether the updated federated model meets the termination condition. If yes, terminate the training. If no, train again. After obtaining the first gradient value respectively, the plurality of consensus nodes further perform the following operations: Each of the consensus nodes performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each of the consensus nodes retains one of the gradient sub-values, and sends the remaining gradient sub-values ​​to other consensus nodes respectively; The predetermined number is less than or equal to the number of consensus nodes; Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value; When the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between a consensus node and a coordination terminal, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein, Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.

2. The blockchain-based federated learning method according to claim 1, characterized in that: Before training, each participant of federated learning is registered as a node on the blockchain system; the node includes a coordination end and at least one consensus node; wherein the coordination end establishes a smart contract containing initial information of the federated model; and all the consensus nodes obtain the initial information of the federated model from the coordination end.

3. The blockchain-based federated learning method according to claim 1, characterized in that: After the training is terminated, it also includes: Each consensus node fine-tunes the parameters of its own federation model to obtain the corresponding personalized federation model.

4. The blockchain-based federated learning method according to claim 1, characterized in that: The federated model is a parameter model optimized based on gradient information or Hessian matrix information.

5. The blockchain-based federated learning method according to claim 1, characterized in that: Also includes: Transfer learning: Transfer learning is performed with the model parameters of the federated model at the coordination end as the source domain and the model parameters of the local model of the consensus node as the target domain, where the difference in the distribution of the source domain and the target domain is designed in the objective function used for transfer learning.

6. A blockchain-based federated learning system, characterized in that: include: Multiple consensus nodes are used to train the federated model according to the sample data, obtain the corresponding first gradient values ​​and send them to the coordination end; The consensus node is a bank node; A coordination end, configured to aggregate the received plurality of the first gradient values ​​to obtain a second gradient value and distribute the second gradient value to each of the consensus nodes; so that each of the consensus nodes updates the parameters of the federated model based on the second gradient value, and determines whether the updated federated model satisfies the termination condition, and if so, terminates the training, and if not, performs training again; After obtaining the first gradient value respectively, the plurality of consensus nodes further perform the following operations: Each of the consensus nodes performs a splitting operation on the first gradient value to obtain a predetermined number of gradient sub-values; each of the consensus nodes retains one of the gradient sub-values, and sends the remaining gradient sub-values ​​to other consensus nodes respectively; The predetermined number is less than or equal to the number of consensus nodes; Each of the consensus nodes performs a synthesis operation on the retained and received gradient sub-values ​​to generate a third gradient value as a new first gradient value; When the gradient sub-values ​​are transmitted between consensus nodes, and when the first gradient value or the second gradient value is transmitted between a consensus node and a coordination terminal, the transmitted data is encrypted using a homomorphic encryption algorithm; wherein, Each consensus node and coordination end stores the public keys of other nodes for encryption and the private keys of the current node for decryption. When sending data to a certain node, the public key of the corresponding node is used to encrypt the data. When receiving data sent by other nodes, the private key of the current node is used to decrypt the data.