CN113992360A - Block chain cross-chain-based federated learning method and equipment - Google Patents

Block chain cross-chain-based federated learning method and equipment Download PDF

Info

Publication number
CN113992360A
CN113992360A CN202111167021.9A CN202111167021A CN113992360A CN 113992360 A CN113992360 A CN 113992360A CN 202111167021 A CN202111167021 A CN 202111167021A CN 113992360 A CN113992360 A CN 113992360A
Authority
CN
China
Prior art keywords
model
chain
node
cross
aggregation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111167021.9A
Other languages
Chinese (zh)
Other versions
CN113992360B (en
Inventor
陈嘉俊
臧铖
郭东升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yiqiyin Hangzhou Technology Co ltd
China Zheshang Bank Co Ltd
Original Assignee
Yiqiyin Hangzhou Technology Co ltd
China Zheshang Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yiqiyin Hangzhou Technology Co ltd, China Zheshang Bank Co Ltd filed Critical Yiqiyin Hangzhou Technology Co ltd
Priority to CN202111167021.9A priority Critical patent/CN113992360B/en
Publication of CN113992360A publication Critical patent/CN113992360A/en
Application granted granted Critical
Publication of CN113992360B publication Critical patent/CN113992360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem

Abstract

The invention discloses a block chain cross-chain-based federal learning method and equipment.A single block chain network utilizes local data to train a federal learning model, and sends model parameters to a model aggregation intelligent contract through privacy transaction, so that the aggregation of model parameters of different nodes in a single chain is realized, and the synchronization of the model parameters at each node is carried out; the model aggregation intelligent contract sends the latest model parameters to a cross-chain network through cross-chain privacy transaction to realize model synchronization among different chains; in the whole process, data of a single network node and data of cross-chain network nodes are not exchanged, model parameters of each node are not leaked through a privacy transaction mode, the data privacy safety is guaranteed, training of different node data of different block chain networks on a federal learning model is realized, a training data set is enlarged, and the accuracy of the model is improved. And an integral mechanism is adopted to improve the enthusiasm of each member contribution data training model and further improve the model training effect.

Description

Block chain cross-chain-based federated learning method and equipment
Technical Field
The invention relates to the technical field of block chains, in particular to a block chain cross-chain-based federal learning method and equipment.
Background
Federated learning enables individual participating institutions to collaboratively train machine learning models without directly exchanging raw data. For enterprises or organizations with insufficient data volume, the data volume can be combined, a better model can be obtained, original data are not exposed, and mutual benefits and win-win can be realized. In the existing engineering technology, the cooperative training of each organization depends on a centralized third-party cooperative node to realize control, aggregation and key management. The existing centralization method has the following defects:
1. the cooperative node will continuously obtain the information uploaded by all other organizations. And a curious cooperative node can deduce important information related to the original data of each organization through the information, such as category label distribution, and therefore the privacy of the data can be leaked. They do not want to expose these privacy to the institutions involved in the training.
2. When the cooperative node fails, the whole system crashes and cannot continue to operate. Due to the single point of failure of the centralized cooperative node, the federal learning of each organization is forcibly terminated, and the cooperative training cannot be continued.
Therefore, the federal learning method in the prior art has the problems of privacy risk and single point of failure.
Although the current federal learning method based on the block chain solves part of privacy problems and single-point failure problems, the federal learning needs a large amount of data to realize accurate prediction, and for large-scale data, the existing block chain-based processing capacity is usually insufficient, and barriers cannot be completely broken for different data sets.
Disclosure of Invention
The invention aims to provide a block chain cross-chain based federal learning method and equipment aiming at the defects of the prior art.
In order to achieve the purpose, the invention has the following technical scheme:
the invention provides a block chain cross-chain-based federal learning method on the one hand, which comprises the following steps:
in a single block chain network, a federal learning model is deployed on block chain nodes, local node data is used for carrying out federal learning model training, and model parameters are sent to a federal learning model aggregation intelligent contract through privacy transaction; the model aggregation intelligent contract aggregates model parameters, synchronizes the latest model parameters to each node, and completes model synchronization;
when the single-chain model is synchronously completed, the model aggregation intelligent contract sends the latest model parameters to a cross-chain network through cross-chain privacy transaction; analyzing the transaction by the destination chain to obtain the latest model parameters, and synchronizing the latest model parameters to each node in the chain by a model aggregation intelligent contract to realize the model synchronization among different chains.
Further, the federal learning model is trained as follows:
(1) initializing model parameters by a local node; initializing a model aggregation intelligent contract, acquiring a public key of each node, and starting model training;
(2) each intra-chain node utilizes local data to carry out local training on the federal learning model, encrypts model parameters by utilizing a contract public key and sends the model parameters to a model aggregation intelligent contract in a transaction mode;
(3) after receiving the model update parameters of each node, the model aggregation intelligent contract decrypts by using a contract private key, performs aggregation operation after obtaining the model parameters of each node, encrypts the latest model parameters by using a butt node public key, sends the latest model parameters to each training node, decrypts by using the private key of each node, obtains the latest model parameters, and updates the training model.
Further, the main functions of the model aggregation intelligent contract include: the aggregation and synchronization of the parameters of the training model in the block chain and the aggregation and synchronization of the parameters of the training model between different block chains are realized; the contract method adopts an encryption mode to ensure that data among all nodes is not leaked in the aggregation and synchronization process.
Further, the initialization process of the model aggregation intelligent contract comprises the following steps: initializing parameters, and acquiring a public key of a node in a block chain and a cross-chain public key for private transmission; after the initialization is completed, the contract is started.
Further, the aggregation process of the model aggregation intelligent contract comprises the following steps: the model parameters are aggregated through a model aggregation intelligent contract, the intelligent contract is operated on each block chain node, the aggregation process is commonly identified through the nodes, decentralized is achieved, and data privacy protection is achieved through encryption; and carrying out aggregation operation on the model aggregation intelligent contract when the aggregation condition is met, otherwise, continuously receiving node model parameter data to obtain the latest model parameters.
Further, the synchronous flow of the model aggregation intelligent contract comprises: in the block chain, the model aggregation intelligent contract utilizes a target node public key to encrypt and transmit data and sends the data to a target node, and after the target node receives the data, the target node decrypts the data by utilizing a private key of the target node to obtain the latest model parameter and updates the training model of the local node; and for the cross-link, the model aggregation intelligent contract utilizes a target link public key to encrypt and transmit data, transmits the encrypted data to a target link through a cross-link network, decrypts by utilizing a cross-link private key after the target link receives the data to obtain the latest model parameter, and synchronizes the latest model parameter to each node in the link through the model aggregation intelligent contract.
Further, the functions of the model aggregation intelligent contract further comprise: recording the data contribution of each member in the block chain and the data contribution of the cross-chain organization, integrating, and writing an account book; through an integral excitation mechanism, each organization member is excited to actively contribute to a data training model, and the model training precision is improved.
Further, judging the contribution degree of each member to the model according to the integral condition of each member, and managing the federal learning system; when the integral of a certain member is lower than a threshold value, the member is considered to have low contribution degree, and in a period, the member is considered to be deleted and organized or the authority of the member to contribute to a training model is limited; the member with higher score can be used as a governing member to participate in the operation of the management system.
Further, the cross-chain network is used for model synchronization of a federal learning model among different chains, and data privacy is ensured in a form of privacy cross-chain transaction;
the cross-chain network comprises cross-chain communication agent nodes and a cross-chain communication bus; each cross-chain party has at least one agent node, each agent node can be connected with any node in the chain, and the chains are communicated and interacted through a cross-chain communication bus;
when the chain is in communication interconnection, a cross-chain certificate management module on an agent node firstly signs a certificate and then registers, wherein the registration information comprises chain member identity information, current chain authority, intelligent contract authority and contract method authority;
when the models need to be synchronized, cross-chain privacy transaction is initiated, after the interior of the chain is identified, a sending interface of the agent node transmits cross-chain information to the agent node of the destination chain, and then the cross-chain information is transmitted to the destination chain to perform related operation.
Another aspect of the present invention provides a computer apparatus, comprising: a memory and a processor; the memory having stored thereon a computer program executable by the processor; and when the computer program is run by the processor, executing the steps of the block chain cross-chain based federated learning method.
The invention has the beneficial effects that:
according to the method, local data are utilized to conduct federal learning model training in a single block chain network, model parameters are sent to a model aggregation intelligent contract through privacy transaction, aggregation of different node model parameters in a single chain is achieved, and synchronization of the model parameters in each node in the single chain is conducted; the model aggregation intelligent contract sends the latest model parameters to a cross-chain network through cross-chain privacy transaction to realize model synchronization among different chains; data of a single network node and nodes of a cross-chain network are not exchanged in the whole process, model parameters of each node are not leaked through a privacy transaction mode, the privacy and safety of the data are guaranteed, training of different node data of different block chain networks on a federal learning model is realized, based on a cross-chain federal learning framework, barriers of different industries are broken through, the throughput of the whole training system is improved, the training data set is expanded, the integration of longitudinal federal learning and transverse federal learning is realized, and the accuracy of the model is improved. And an integral mechanism is adopted to improve the enthusiasm of each member contribution data training model and further improve the model training effect.
Drawings
Fig. 1 is an overall architecture diagram of a block chain-based cross-chain federated learning method provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of Federal learning model training provided by an embodiment of the present invention;
FIG. 3 is a flow diagram illustrating initialization of a model aggregation intelligence contract according to an embodiment of the present invention;
FIG. 4 is an aggregation flow diagram of a model aggregation intelligence contract provided by an embodiment of the present invention;
FIG. 5 is a flow chart illustrating synchronization of model aggregation intelligence contracts provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an incentive mechanism of a model aggregation intelligence contract according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a design of a federal learning governance model provided in an embodiment of the present invention;
fig. 8 is a block chain cross-chain flowchart provided in the embodiment of the present invention.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The block chain cross-chain based federated learning method provided by the invention has the overall architecture as shown in figure 1, and mainly comprises a block chain underlying network, a federated learning model aggregation intelligent contract and a cross-chain network.
In a single blockchain network, a federal learning model is deployed on blockchain nodes, data are obtained for training, and training model parameters are sent to a federal learning model aggregation intelligent contract through privacy transaction, so that aggregation of model parameters of different nodes in a single chain is achieved, synchronization of the model parameters at each node is carried out, and local model training of each node in the single chain under the premise that data are not exchanged is achieved.
The privacy cross-chain transaction is sent to the intelligent contract of the federal learning model aggregation through the cross-chain network, the training of the data of different chains on the model is realized, in the whole process, data of a single network node and the cross-chain network node are not exchanged, the model parameters of each node are not leaked through the block chain privacy transaction mode, the training of different node data of different block chain networks on the federal learning model is realized while the data privacy safety is ensured, the training data set is enlarged, and the accuracy of the model is improved.
Furthermore, an integral mechanism is adopted, the enthusiasm of each member for contributing a data training model is improved, the model training effect is better, and the scheme is particularly suitable for scenes with large cluster scale and high requirements on data privacy.
The specific design of each part is described in detail below.
First, federal learning model training
As shown in fig. 2, data of local nodes are used for federal learning model training, model parameters are generated, the model parameters are sent to a federal learning model aggregation intelligent contract through privacy transaction, the model aggregation intelligent contract aggregates the model parameters, and the latest model parameters are synchronized to each node, so that a round of model synchronization is completed. For cross-chain synchronization, when each round of model synchronization of a single chain is finished, cross-chain privacy transactions are sent to other chains to perform model synchronization among different chains.
The model aggregates the contribution degrees of all members in the intelligent contract record block chain, integrates, records the contribution degree of the cross-chain organization aiming at the cross-chain, integrates, writes in an account book, and realizes permanent record.
Generally, the samples in a single chain belong to horizontal federal learning, that is, the combination of the samples is suitable for scenes in which the participants have the same business state but different clients, that is, the features overlap more, and the users overlap less, for example, in different areas, the businesses have similar business (similar features) but the users have different businesses (different samples). The cross-chain model synchronization is suitable for longitudinal federal learning, namely combination of features, and is suitable for scenes with more users overlapping and less features overlapping, such as business superman and banks in the same region, wherein the users that they reach are residents in the region (the same sample) but different in business (different features). Through the block chain based cross-chain training with the incentive mechanism, the risk of single-point failure and the risk of data privacy are prevented in a decentralized mode, meanwhile, the training data set is expanded, and the training effect is improved.
The main steps of the federal learning model training are as follows:
1. initializing model parameters by a local node; initializing a model aggregation intelligent contract, acquiring a public key of each node for private transmission, and starting model training;
2. each intra-chain node utilizes local data to carry out local training on the federal learning model, records the latest model parameters, encrypts the model parameters by utilizing a public key of a model aggregation intelligent contract and uploads the encrypted model parameters to the model aggregation intelligent contract;
3. after the model aggregation intelligent contract receives the model updating parameters of each node, the private key of the intelligent contract is used for decryption to realize private transmission, after the model parameters of each node are obtained, the model aggregation intelligent contract carries out integral updating and carries out aggregation operation, the latest model parameters are encrypted by the public key of the butt joint node and are sent to each training node, each node is used for decryption by the private key of the node, the latest model parameters are obtained, and the training model is updated.
The model parameters mainly comprise an aggregation process and a synchronization process and are divided into two modes of block chain internal mode and cross chain mode:
(1) polymerization process
In a new round of training, the nodes use local data to carry out model training, model parameters are encrypted by adopting a public key of an intelligent contract and are sent to a model aggregation intelligent contract in a transaction mode, the intelligent contract decrypts the transaction by adopting a private key of the intelligent contract to obtain the model parameters, the model parameters of other organization nodes are also uploaded to the model aggregation intelligent contract in the encrypted transaction mode, and after the intelligent contract receives the model parameters of the chain members, the integration is updated, the aggregation operation is carried out, the latest model parameters are obtained, and the aggregation operation is completed.
(2) Synchronous flow
And after the model aggregation intelligent contract finishes an aggregation process, synchronizing the latest model parameters to each node in the block chain, encrypting the latest model parameters by adopting the public key of the node and sending the latest model parameters to the node by the intelligent contract, decrypting by using the private key of the node to obtain the latest model parameters, and updating the training model.
The model aggregation intelligent contract sends the latest model parameters to a cross-chain network through cross-chain transaction, and after receiving the parameter updating transaction, the target chain analyzes and updates the training model, updates the integral of the cross-chain network, and synchronizes the model parameters to each node in the self chain.
Model aggregation intelligent contract
The main functions of the model aggregation intelligent contract include: and aggregation and synchronization of training model parameters in the block chain, aggregation and synchronization of training model parameters among different block chains, and integration of contribution degrees of all members are realized. The contract method adopts an encryption mode to ensure that data among all nodes is not leaked in the aggregation and synchronization process. The method mainly comprises the following steps:
init: initializing contracts, and acquiring public key information of each organization member and certificate information of a cross-link network;
QueryParam: inquiring the model parameters;
QueryIntegral: inquiring member points of each organization;
SyncFederatedmodel: synchronizing parameters of a joint learning model in the same chain;
SyncCrossFederatedModel: synchronizing cross-chain federated learning model parameters;
ConvergeFederatedModel: aggregating parameters of the same-chain interior linkage learning model;
ConvergeCrossFederatedModel: aggregating cross-chain federated learning model parameters.
2.1 model aggregation Intelligent contract initialization flow design
The contract initialization is used for initializing parameters, acquiring a public key of a node in a block chain and a cross-chain public key for private transmission, specifically encrypting the transmitted information by using the public key of a target node and then sending the encrypted information to the target node, so that only the target node can acquire a plaintext of the transmitted information, after receiving the information, the target node decrypts the encrypted information by using its own private key to obtain the transmitted information, and similarly, the cross-chain transmission adopts the cross-chain public key to encrypt the transmitted information and uses the target chain private key to decrypt the cross-chain information, thereby realizing the privacy protection of the transmitted data. And after the initialization is completed, starting the model aggregation intelligent contract. The design flow is shown in fig. 3.
2.2 polymerization scheme design
The model parameters are aggregated through a model aggregation intelligent contract, and as the intelligent contract runs on each block chain node, the aggregation process is realized through node consensus, decentralized is realized, and data privacy protection is realized through encryption. As shown in fig. 4, the main process includes: the nodes use local data to train the model and update the model parameters, the model parameters are encrypted by using a public key of a model aggregation intelligent contract and are sent to the model aggregation intelligent contract, the intelligent contract is decrypted by using a private key of the intelligent contract to obtain the model parameters, other nodes are similar, aggregation operation is carried out when aggregation conditions are met, otherwise, the model parameter data of the nodes are continuously received to obtain the latest model parameters, contribution integral of an organization member is updated, and finally the model parameters are synchronized to nodes in a block chain and a cross-chain network.
2.3 synchronous flow design
And when the intelligent contract for model aggregation finishes aggregation and acquires the latest model parameters, performing model parameter synchronization operation, and synchronizing the parameters to the nodes in the block chain and the cross-chain network. As shown in fig. 5, the main process includes: in the block chain, the model aggregation intelligent contract utilizes a target node public key to encrypt and transmit data and sends the data to a target node, and the target node decrypts the data by using a private key of the target node after receiving the data to obtain the latest model parameters and updates the training model of the local node; and aiming at the cross-chain, the model aggregation intelligent contract utilizes a target chain public key to encrypt and transmit data, the encrypted data is transmitted to the target chain through the cross-chain, the target chain receives the data and then uses a cross-chain private key to decrypt and obtain the latest model parameters, and the latest model parameters are synchronized to each node in the chain through the model aggregation intelligent contract.
2.4 excitation mechanism design
The method is used for training the model for exciting active contribution data of each organization member, designing an excitation mechanism, integrating contribution degree of the node by the model aggregation intelligent dating when the node uploads model parameters, and integrating the cross-link network if the node contributes the model parameters. The integral of each organization member is used for treating the whole system. The design flow is shown in fig. 6.
Three, federal learning governing model
The block chain-crossing-based federated learning method with the incentive mechanism provided by the invention not only solves the problems of decentralization and single-point failure prevention, adopts a chain-crossing multi-center architecture, has stronger processing capability, higher throughput rate, more flexibility and strong expansibility, but also designs the integral incentive mechanism based on the data contribution degree by utilizing the contract, can better stimulate the participating members to contribute to data training, and improve the precision of model training. According to the integral condition of the member, the contribution degree of the member to the model can be seen to control the whole federal learning system, for example, when the integral of a certain member is lower than a threshold value, the contribution degree of the member is considered to be low, and in a period, the member is considered to be deleted from an organization or limited in the authority of the member to contribute to the training model; the member with higher credit can be used as a governing member, has greater authority, and can participate in the operation of the management system, such as endorsement of transaction and the like. And the closed-loop management of the whole system is realized through an integral mechanism. The model design is shown in fig. 7.
Four, cross-chain network design
The method is mainly used for model synchronization of the federal learning model between different chains, ensures data privacy through a privacy cross-chain transaction mode, gets through data barriers between different chains, achieves larger-scale data model training on the premise of ensuring data non-exchange, and improves training accuracy.
The cross-chain network mainly comprises a communication agent node cross, certificate management and a cross-chain communication bus cross. Each cross-chain party has at least one cross-chain communication agent node cross, each cross can be connected with any node in the chain, and the chains are communicated and interacted through a cross communication bus cross.
cross is a proxy node for communication between chains, which can be connected with all nodes in the chain to provide a certain fault tolerance capability. When the chain is in communication interconnection, firstly, a cross-chain certificate management module on the cross agent signs a certificate, then registration is carried out, the registration information comprises chain member identity information, the authority of the current chain, intelligent contract authority, contract method authority and the like, and the authority can be flexibly controlled according to the registration information to realize data security protection; when the models need to be synchronized, privacy cross-chain transaction is initiated, after the interior of the chain is identified, a cross-chain message is transmitted to the cross-chain message of the destination chain by a cross-chain transmission interface and then transmitted to the destination chain for relevant operation, and TLS encryption is adopted in the communication process, so that the information transmission safety can be ensured. The chain interconnection communication for which cross is responsible includes chain registration, authority management and control, message signing, transaction routing, signature verification, transaction existence verification and the like.
The main process of crossing chains among block chains is shown in fig. 8, and includes the following steps:
1. certificate issuance
The cross-chain certificate management module issues a certificate and a public and private key pair to the cross-chain communication agent node for cross-chain identity verification, and meanwhile, a message digest signature is verified, so that cross-chain authority management is achieved and communication safety is guaranteed.
2. Chain registration
The source chain can carry out cross-chain registration to the destination chain, the cross-chain registration mainly comprises identity information, authority information, a verification rule and the like of the source chain, after the registration is successful, a verification engine of the destination chain can generate the verification rule of the chain, and the legality of the cross-chain transaction is verified according to the verification rule.
3. Authority and validation rule management
The authority management mainly carries out authority management and control of inter-chain communication through registration information, and the method has high customizability and flexibility.
Validation rules are used by a validation engine to validate presence and validity for cross-chain transactions. When the source chain registers to the destination chain, the cross of the destination chain deploys and registers corresponding verification rules, and records the identity information of the registration chain into the registry. The identity of the chain can be verified during cross-chain communication, the verification rule of the corresponding chain is matched to verify the existence and the validity of the transaction, and the related transaction is executed after the verification is passed.
4. Inspection phase
The checking work of the cross-chain transaction comprises the following steps: whether the source chain generating the cross-chain transaction is registered or not, wherein the registration information comprises identity information, source chain information, verification rules and whether related rights exist or not.
5. Verification phase
And the cross-chain transaction passing the check enters a verification stage, the verification stage is executed by a verification engine, a verification rule is matched in a registry of a destination chain through the source chain identity information of the transaction, and then the transaction authority information, the verification information (existence and validity), the verification rule and the cross-chain transaction are input into the verification engine and then verified. After the verification is passed, the transaction will enter the execution phase.
6. Execution phase
And after the cross-chain transaction passes the verification, the execution stage is entered, and the transaction validity and transaction existence certification can be designed in the execution stage.
7. Result return
The destination chain constructs the execution structure and the execution state information into return information and sends the return information to the source chain.
In one embodiment, a computer device is provided, which includes a memory and a processor, where the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to execute the steps in the block chain cross-chain based federal learning method in the embodiments described above.
In one embodiment, a storage medium storing computer-readable instructions is provided, which when executed by one or more processors, cause the one or more processors to perform the steps in the block chain based cross-chain federated learning method in the embodiments described above. The storage medium may be a nonvolatile storage medium.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (10)

1. A block chain cross-chain based federated learning method is characterized by comprising the following steps:
in a single block chain network, a federal learning model is deployed on block chain nodes, local node data is used for carrying out federal learning model training, and model parameters are sent to a federal learning model aggregation intelligent contract through privacy transaction; the model aggregation intelligent contract aggregates model parameters, synchronizes the latest model parameters to each node, and completes model synchronization;
when the single-chain model is synchronously completed, the model aggregation intelligent contract sends the latest model parameters to a cross-chain network through cross-chain privacy transaction; analyzing the transaction by the destination chain to obtain the latest model parameters, and synchronizing the latest model parameters to each node in the chain by a model aggregation intelligent contract to realize the model synchronization among different chains.
2. The federal learning method for block chain-based interlinkage as claimed in claim 1, wherein the federal learning model is trained by the following steps:
(1) initializing model parameters by a local node; initializing a model aggregation intelligent contract, acquiring a public key of each node, and starting model training;
(2) each intra-chain node utilizes local data to carry out local training on the federal learning model, encrypts model parameters by utilizing a contract public key and sends the model parameters to a model aggregation intelligent contract in a transaction mode;
(3) after receiving the model update parameters of each node, the model aggregation intelligent contract decrypts by using a contract private key, performs aggregation operation after obtaining the model parameters of each node, encrypts the latest model parameters by using a butt node public key, sends the latest model parameters to each training node, decrypts by using the private key of each node, obtains the latest model parameters, and updates the training model.
3. The block chain cross-chain based federal learning method as claimed in claim 1, wherein the main functions of the model aggregation intelligent contract comprise: the aggregation and synchronization of the parameters of the training model in the block chain and the aggregation and synchronization of the parameters of the training model between different block chains are realized; the contract method adopts an encryption mode to ensure that data among all nodes is not leaked in the aggregation and synchronization process.
4. The method according to claim 1, wherein the initialization process of the model aggregation intelligent contract comprises: initializing parameters, and acquiring a public key of a node in a block chain and a cross-chain public key for private transmission; after the initialization is completed, the contract is started.
5. The method according to claim 1, wherein the aggregation process of the model aggregation intelligent contract comprises: the model parameters are aggregated through a model aggregation intelligent contract, the intelligent contract is operated on each block chain node, the aggregation process is commonly identified through the nodes, decentralized is achieved, and data privacy protection is achieved through encryption; and carrying out aggregation operation on the model aggregation intelligent contract when the aggregation condition is met, otherwise, continuously receiving node model parameter data to obtain the latest model parameters.
6. The method according to claim 1, wherein the synchronous flow of the model aggregation intelligent contract comprises: in the block chain, the model aggregation intelligent contract utilizes a target node public key to encrypt and transmit data and sends the data to a target node, and after the target node receives the data, the target node decrypts the data by utilizing a private key of the target node to obtain the latest model parameter and updates the training model of the local node; and for the cross-link, the model aggregation intelligent contract utilizes a target link public key to encrypt and transmit data, transmits the encrypted data to a target link through a cross-link network, decrypts by utilizing a cross-link private key after the target link receives the data to obtain the latest model parameter, and synchronizes the latest model parameter to each node in the link through the model aggregation intelligent contract.
7. The block chain cross-chain based federal learning method as claimed in claim 1, wherein the functions of the model aggregation intelligent contract further comprise: recording the data contribution of each member in the block chain and the data contribution of the cross-chain organization, integrating, and writing an account book; through an integral excitation mechanism, each organization member is excited to actively contribute to a data training model, and the model training precision is improved.
8. The federal learning method based on block chain interlinkage of claim 7, wherein the contribution degree of each member to the model is judged according to the integral condition of each member, and the treatment of the federal learning system is carried out; when the integral of a certain member is lower than a threshold value, the member is considered to have low contribution degree, and in a period, the member is considered to be deleted and organized or the authority of the member to contribute to a training model is limited; the member with higher score can be used as a governing member to participate in the operation of the management system.
9. The federal learning method as claimed in claim 1, wherein the cross-chain network is used for model synchronization of the federal learning model between different chains, and data privacy is ensured through a form of privacy cross-chain transaction;
the cross-chain network comprises cross-chain communication agent nodes and a cross-chain communication bus; each cross-chain party has at least one agent node, each agent node can be connected with any node in the chain, and the chains are communicated and interacted through a cross-chain communication bus;
when the chain is in communication interconnection, a cross-chain certificate management module on an agent node firstly signs a certificate and then registers, wherein the registration information comprises chain member identity information, current chain authority, intelligent contract authority and contract method authority;
when the models need to be synchronized, cross-chain privacy transaction is initiated, after the interior of the chain is identified, a sending interface of the agent node transmits cross-chain information to the agent node of the destination chain, and then the cross-chain information is transmitted to the destination chain to perform related operation.
10. A computer device, comprising: a memory and a processor; the memory having stored thereon a computer program executable by the processor; the processor, when executing the computer program, performs the method of any of claims 1 to 9.
CN202111167021.9A 2021-10-01 2021-10-01 Federal learning method and equipment based on block chain crossing Active CN113992360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111167021.9A CN113992360B (en) 2021-10-01 2021-10-01 Federal learning method and equipment based on block chain crossing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111167021.9A CN113992360B (en) 2021-10-01 2021-10-01 Federal learning method and equipment based on block chain crossing

Publications (2)

Publication Number Publication Date
CN113992360A true CN113992360A (en) 2022-01-28
CN113992360B CN113992360B (en) 2024-01-30

Family

ID=79737611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111167021.9A Active CN113992360B (en) 2021-10-01 2021-10-01 Federal learning method and equipment based on block chain crossing

Country Status (1)

Country Link
CN (1) CN113992360B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372581A (en) * 2022-02-25 2022-04-19 中国人民解放军国防科技大学 Block chain-based federal learning method and device and computer equipment
CN114598707A (en) * 2022-03-22 2022-06-07 中山大学 Coalition chain supervisory systems
CN114692098A (en) * 2022-06-01 2022-07-01 中国海洋大学 Intelligent software behavior control method based on block chain and federal learning
CN115238065A (en) * 2022-09-22 2022-10-25 太极计算机股份有限公司 Intelligent document recommendation method based on federal learning
CN115329385A (en) * 2022-10-11 2022-11-11 北京理工大学 Model training method and device based on block chain cross-chain privacy protection
CN115834581A (en) * 2022-11-17 2023-03-21 中国联合网络通信集团有限公司 Block chain based networking method and device, block chain node and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190334716A1 (en) * 2018-04-27 2019-10-31 The University Of Akron Blockchain-empowered crowdsourced computing system
CN111539731A (en) * 2020-06-19 2020-08-14 支付宝(杭州)信息技术有限公司 Block chain-based federal learning method and device and electronic equipment
CN112861152A (en) * 2021-02-08 2021-05-28 北京航空航天大学 Federal learning incentive method and system based on permit chain
CN113408746A (en) * 2021-06-22 2021-09-17 深圳大学 Block chain-based distributed federal learning method and device and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190334716A1 (en) * 2018-04-27 2019-10-31 The University Of Akron Blockchain-empowered crowdsourced computing system
CN111539731A (en) * 2020-06-19 2020-08-14 支付宝(杭州)信息技术有限公司 Block chain-based federal learning method and device and electronic equipment
CN112861152A (en) * 2021-02-08 2021-05-28 北京航空航天大学 Federal learning incentive method and system based on permit chain
CN113408746A (en) * 2021-06-22 2021-09-17 深圳大学 Block chain-based distributed federal learning method and device and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蔡亮 等: "基于双层协同的联盟区块链隐私数据保护方法", 软件学报, no. 08 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114372581A (en) * 2022-02-25 2022-04-19 中国人民解放军国防科技大学 Block chain-based federal learning method and device and computer equipment
CN114372581B (en) * 2022-02-25 2024-03-19 中国人民解放军国防科技大学 Federal learning method and device based on block chain and computer equipment
CN114598707A (en) * 2022-03-22 2022-06-07 中山大学 Coalition chain supervisory systems
CN114598707B (en) * 2022-03-22 2023-05-30 中山大学 Alliance chain supervision system
CN114692098A (en) * 2022-06-01 2022-07-01 中国海洋大学 Intelligent software behavior control method based on block chain and federal learning
CN114692098B (en) * 2022-06-01 2022-08-26 中国海洋大学 Intelligent software behavior control method based on block chain and federal learning
CN115238065A (en) * 2022-09-22 2022-10-25 太极计算机股份有限公司 Intelligent document recommendation method based on federal learning
CN115329385A (en) * 2022-10-11 2022-11-11 北京理工大学 Model training method and device based on block chain cross-chain privacy protection
CN115329385B (en) * 2022-10-11 2022-12-16 北京理工大学 Model training method and device based on block chain cross-chain privacy protection
CN115834581A (en) * 2022-11-17 2023-03-21 中国联合网络通信集团有限公司 Block chain based networking method and device, block chain node and storage medium
CN115834581B (en) * 2022-11-17 2024-04-16 中国联合网络通信集团有限公司 Block chain-based networking method and device, block chain node and storage medium

Also Published As

Publication number Publication date
CN113992360B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN113992360A (en) Block chain cross-chain-based federated learning method and equipment
CN107231351B (en) Electronic certificate management method and related equipment
CN108616539B (en) A kind of method and system of block chain transaction record access
CN110348830B (en) Block chain-based network system, authentication method, equipment and storage medium
CN107911216B (en) Block chain transaction privacy protection method and system
US10848315B2 (en) Contract agreement method, agreement verification method, contract agreement system, agreement verification device, contract agreement device, contract agreement program and agreement verification program
CN112686668B (en) Alliance chain crossing system and method
CN110535648B (en) Electronic certificate generation and verification and key control method, device, system and medium
Sharma et al. Blockchain-based internet of vehicles (IoV): an efficient secure ad hoc vehicular networking architecture
CN110288480B (en) Private transaction method and device for blockchain
CN111125779A (en) Block chain-based federal learning method and device
CN109377198A (en) A kind of signing system known together in many ways based on alliance's chain
CN112688786B (en) Evidence construction and real-name identity authentication method based on block chain
AU2019204713A1 (en) Transferring digital tickets based on blockchain networks
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN112270597A (en) Business processing and credit evaluation model training method, device, equipment and medium
CN113328997B (en) Alliance chain crossing system and method
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN110599163B (en) Transaction record outsourcing method facing block chain transaction supervision
CN112733174A (en) Authentication management method and system of block chain system and electronic equipment
AU2019380381A1 (en) Smart logistics management using blockchain
CN114240439B (en) Cross-chain transaction rollback method and device based on threshold signature and double-hash chain mode
CN114362993B (en) Block chain assisted Internet of vehicles security authentication method
CN112862487A (en) Digital certificate authentication method, equipment and storage medium
CN112804354A (en) Method and device for data transmission across chains, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant