CN113992360B - Federal learning method and equipment based on block chain crossing - Google Patents

Federal learning method and equipment based on block chain crossing Download PDF

Info

Publication number
CN113992360B
CN113992360B CN202111167021.9A CN202111167021A CN113992360B CN 113992360 B CN113992360 B CN 113992360B CN 202111167021 A CN202111167021 A CN 202111167021A CN 113992360 B CN113992360 B CN 113992360B
Authority
CN
China
Prior art keywords
model
chain
cross
node
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.)
Active
Application number
CN202111167021.9A
Other languages
Chinese (zh)
Other versions
CN113992360A (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

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 federation learning method and equipment based on blockchain cross-chain, which are characterized in that local data is utilized in a single blockchain network to carry out federation learning model training, model parameters are sent to a model aggregation intelligent contract through privacy transaction, aggregation of model parameters of different nodes in the single chain is realized, and synchronization of the model parameters in each node is carried out; the model aggregation intelligent contract sends the latest model parameters to the cross-link network through the cross-link privacy transaction, so that model synchronization among different links is realized; in the whole process, data of a single network node and data of a cross-chain network node are not exchanged, model parameters of each node are not revealed in a privacy transaction mode, data privacy safety is guaranteed, meanwhile, training of different node data of different blockchain networks on a federal learning model is achieved, a trained data set is enlarged, and accuracy of the model is improved. And the integrating mechanism is adopted to improve the enthusiasm of the data training model contributed by each member, and further improve the model training effect.

Description

Federal learning method and equipment based on block chain crossing
Technical Field
The invention relates to the technical field of blockchain, in particular to a federation learning method and equipment based on blockchain cross-chain.
Background
Federal learning enables individual participating institutions to cooperatively train machine learning models without directly exchanging raw data. For enterprises or institutions with insufficient data volume, the enterprises or institutions can be combined to obtain a better model without exposing the original data, so that mutual benefits and win-win are realized. In the existing engineering technology, collaborative training of each organization depends on a centralized third party collaborative node to realize control, aggregation and key management. The existing centralization method has the following defects:
1. the cooperating nodes will continuously obtain information uploaded by all other institutions. A curious collaboration node can infer important information related to the original data of each organization, such as category label distribution, so that the data privacy is revealed. For institutions involved in training, they do not want to expose these privacy.
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 collaboration node, federal learning by each organization may be forced to terminate and co-training may not continue.
Thus, federal learning methods in the prior art have problems with privacy risks and single point of failure.
Current blockchain-based federal learning methods, while solving a portion of the privacy problem and single point of failure problem, require a large amount of data to achieve accurate predictions, for large-scale data, existing blockchain-based processing capabilities are often inadequate, and barriers cannot be fully broken for different datasets.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art and provides a federal learning method and equipment based on block chain crossing.
In order to achieve the above purpose, the invention has the following technical scheme:
in one aspect, the invention provides a federation learning method based on blockchain cross-chain, comprising the following steps:
in a single blockchain network, a federation learning model is deployed on blockchain nodes, local node data is utilized to train the federation learning model, and model parameters are sent to a federation learning model aggregation intelligent contract through privacy transaction; the model aggregation intelligent contract aggregates the model parameters and synchronizes the latest model parameters to each node to complete the model synchronization;
when the single-chain model is synchronously completed, the model aggregation intelligent contract sends the latest model parameters to the cross-chain network through the cross-chain privacy transaction; and analyzing the transaction by the target chain to obtain the latest model parameters, and synchronizing the latest model parameters to each node in the chain through the model aggregation intelligent contract to realize the model synchronization among different chains.
Further, the training steps of the federal learning model are as follows:
(1) Initializing model parameters by a local node; initializing a model aggregation intelligent contract, acquiring public keys of all nodes, and starting model training;
(2) Each in-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 the model update parameters by using a contract private key, obtains the model parameters of each node, performs aggregation operation, encrypts the latest model parameters by using a public key of a butt joint node, sends the latest model parameters to each training node, decrypts the latest model parameters by using a private key of each node, and updates the training model.
Further, the main functions of the model aggregation intelligent contract include: the method comprises the steps of realizing training model parameter aggregation and synchronization in a block chain and training model parameter aggregation and synchronization among different block chains; 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 to obtain a node public key and a cross-chain public key in a block chain for private transmission; after the initialization is completed, the contract is started.
Further, the aggregation flow of the model aggregation intelligent contract comprises: the model parameters are aggregated through model aggregation intelligent contracts, each block chain node is provided with intelligent contract operation, the aggregation process is realized through node consensus, the decentralization is realized, and the data privacy protection is realized through encryption; and the model aggregation intelligent contract performs aggregation operation when the aggregation condition is met, otherwise, the node model parameter data is continuously received, and the latest model parameters are obtained.
Further, the synchronization process of the model aggregation intelligent contract comprises the following steps: in the block chain, the model aggregation intelligent contract encrypts transmission data by using a public key of a destination node and sends the transmission data to the destination node, and after receiving the data, the destination node decrypts the data by using a private key of the destination node to obtain the latest model parameters and updates a training model of the local node; for the cross-link, the model aggregation intelligent contract encrypts transmission data by using a destination link public key, transmits the encrypted data to a destination link through a cross-link network, decrypts the received data by using a cross-link private key to obtain the latest model parameters, and synchronizes the latest model parameters to all nodes in the link through the model aggregation intelligent contract.
Further, the functions of the model aggregation intelligent contract further include: recording the data contribution degree of each member in the blockchain and the data contribution degree of the cross-chain organization, integrating, and writing into an account book; and through an integral excitation mechanism, each organization member is excited to actively contribute to data training model, and model training precision is improved.
Further, judging the contribution degree of the members to the model according to the integral condition of each member, and treating the federal learning system; when the score of a member is lower than a threshold value, the contribution degree of the member is considered to be low, and in one period, the member is considered to delete the organization or limit the authority of the contribution training model; the higher scoring member may be a governance member, participating in the operation of the management system.
Further, the cross-chain network is used for model synchronization of the federation learning model among different chains, and data privacy is ensured through a privacy cross-chain transaction form;
the cross-link network comprises a cross-link communication proxy node and a cross-link communication bus; each party crossing the chain is provided with at least one proxy node, each proxy 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 chains are in communication interconnection, firstly, a cross-chain certificate management module on the proxy node issues a certificate, and then registration is carried out, wherein the registration information comprises chain membership information, current chain authority, intelligent contract authority and contract method authority;
when the models need to be synchronized, a cross-link privacy transaction is initiated, after the inside of the link is commonly known, a sending interface of the proxy node transmits the cross-link information to the proxy node of the destination link, and then the cross-link information is transmitted to the destination link to perform related operations.
Another aspect of the present invention provides a computer device comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; and when the processor runs the computer program, executing the steps of the federation learning method based on the blockchain cross-chain.
The beneficial effects of the invention are as follows:
according to the invention, federal learning model training is performed in a single blockchain network by utilizing local data, model parameters are sent to a model aggregation intelligent contract through privacy transaction, aggregation of model parameters of different nodes in the single chain is realized, and synchronization of model parameters in each node in the single chain is performed; the model aggregation intelligent contract sends the latest model parameters to the cross-link network through the cross-link privacy transaction, so that model synchronization among different links is realized; in the whole process, single network node and cross-chain network node data are not exchanged, model parameters of each node are not revealed in a privacy transaction mode, data privacy safety is guaranteed, meanwhile, training of different node data of different blockchain networks on a federal learning model is achieved, barriers of different industries are opened based on a cross-chain federal learning architecture, throughput of the whole training system is improved, a training data set is enlarged, fusion of longitudinal federal learning and transverse federal learning is achieved, and accuracy of the model is improved. And the integrating mechanism is adopted to improve the enthusiasm of the data training model contributed by each member, and further improve the model training effect.
Drawings
FIG. 1 is a block chain cross-chain based overall architecture diagram of a federal learning method provided by an embodiment of the present invention;
FIG. 2 is a schematic illustration of federal learning model training provided in an embodiment of the present invention;
FIG. 3 is a flow chart of model aggregated intelligent contract initialization provided by an embodiment of the present invention;
FIG. 4 is an aggregation flow chart of a model aggregated intelligent contract provided by an embodiment of the present invention;
FIG. 5 is a synchronous flow chart of a model aggregated intelligent contract provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an incentive mechanism of a model aggregated intelligent contract provided by an embodiment of the present invention;
FIG. 7 is a schematic diagram of a federal learning governance model design provided in an embodiment of the present invention;
FIG. 8 is a block chain cross-chain flow chart provided by an embodiment of the present invention.
Detailed Description
For a better understanding of the technical solutions of the present application, embodiments of the present application are described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, based on the embodiments herein, which would be apparent to one of ordinary skill in the art without making any inventive effort, are intended to be within the scope of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in 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 overall architecture of the federation learning method based on the blockchain cross-chain is shown in fig. 1, and mainly comprises a blockchain bottom network, a federation 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 acquired for training, training model parameters are transmitted to a federal learning model aggregation intelligent contract through privacy transactions, aggregation of model parameters of different nodes in the single chain is achieved, synchronization of model parameters at all nodes is achieved, and local model training of all nodes in the single chain under the premise that data are not exchanged is achieved.
The intelligent contracts are aggregated by sending privacy cross-link transactions to the federal learning model through the cross-link network, so that training of the model by data of different links is realized, in the whole process, single network nodes and cross-link network node data are not exchanged, model parameters of each node are not revealed in a block-link privacy transaction mode, the training of the federal learning model by different node data of different block-link networks is realized while the data privacy safety is ensured, the training data set is enlarged, and the accuracy of the model is improved.
Furthermore, by adopting an integral mechanism, the enthusiasm of each member for data contribution training models is improved, so that the model training effect is better, and the scheme is particularly suitable for scenes with larger cluster scale and higher data privacy requirements.
The specific designs of the parts are described in detail below.
1. Federal learning model training
As shown in fig. 2, the data of the local nodes are utilized to perform federal learning model training, model parameters are generated, the model parameters are sent to federal learning model aggregation intelligent contracts through privacy transactions, the model aggregation intelligent contracts aggregate the model parameters, and the latest model parameters are synchronized to all the nodes to complete a round of model synchronization. For cross-chain synchronization, when each round of model synchronization of a single chain is completed, the cross-chain privacy transaction is sent to other chains to perform model synchronization among different chains.
The model aggregates the contribution degree of each member in the intelligent contract record blockchain, integrates, records the contribution degree of the cross-chain organization aiming at the cross-chain, integrates, and writes into an account book to realize permanent recording.
Generally, samples in a single chain belong to horizontal federal learning, namely, the combination of the samples, and are suitable for scenes in which the participators have the same business state but different touch clients, namely, the features overlap more and the users overlap less, such as banks in different areas, and the businesses of the users are similar (the features are similar), but the users are different (the samples are different). The cross-chain model synchronization is suitable for longitudinal federal learning, namely the combination of features, and is suitable for scenes with more user overlaps and less feature overlaps, such as business superelevation and banks in the same area, and users touched by the business superelevation and the banking are residents (samples are the same) in the area, but the business is different (features are different). Through training based on the block chain crossing and with an excitation mechanism, not only are the single-point fault risk and the data privacy risk prevented by decentralization ensured, but also the training data set is enlarged, 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 in-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 the public key of the model aggregation intelligent contract, and then uploads the model parameters to the model aggregation intelligent contract;
3. after receiving the model updating parameters of each node, the model aggregation intelligent contract decrypts by adopting the private key of the intelligent contract to realize private transmission, after obtaining the model parameters of each node, the model aggregation intelligent contract performs integral updating and aggregation operation, encrypts the latest model parameters by adopting the public key of the butt joint node, sends the latest model parameters to each training node, and each node decrypts by adopting the private key of the node to obtain the latest model parameters and updates the training model.
The model parameters mainly comprise an aggregation process and a synchronization process, and are divided into two modes of intra-block chain and inter-chain:
(1) Polymerization process
In a new training round, the node performs model training by using local data, encrypts model parameters by adopting a public key of an intelligent contract, sends the model parameters to a model aggregation intelligent contract in a transaction mode, decrypts the transaction by adopting a private key of the intelligent contract, acquires the model parameters, uploads the model parameters of other organization nodes to the model aggregation intelligent contract in an encryption transaction mode, and performs integral updating and aggregation operation after the intelligent contract receives the model parameters of the chain members to obtain the latest model parameters to finish the aggregation operation.
(2) Synchronous flow
After the model aggregation intelligent contract completes the aggregation flow, the latest model parameters are synchronized to all nodes in the blockchain, the intelligent contract encrypts the latest model parameters by adopting the public key of the nodes and sends the latest model parameters to the nodes, and the nodes decrypt the latest model parameters by utilizing the private key of the nodes to update the training model.
The model aggregation intelligent contract sends the latest model parameters to the cross-link network through the cross-link transaction, the target link analyzes and updates the training model after receiving the parameter updating transaction, the integral of the cross-link network is updated, and the model parameters are synchronized to each node in the own link.
2. Model syndication smart contracts
The main functions of the model syndication intelligence contract include: and the aggregation and synchronization of training model parameters in the blockchain and the aggregation and synchronization of training model parameters among different blockchains are realized, and the contribution degree of each member is integrated. 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-chain network;
QueryParam: inquiring model parameters;
QueryIntegral: querying the integral of each organization member;
SyncFederatedModel: synchronizing the learning model parameters of the same chain of inline bangs;
SyncCrossFederatedModel: synchronizing cross-chain federal learning model parameters;
convergeFederate model: aggregating the learning model parameters of the same chain of inline bangs;
convergecross Federate model: aggregating cross-chain federal learning model parameters.
2.1 model aggregated Intelligent contract initialization flow design
The contract initialization can initialize parameters, obtain a public key of a node in a blockchain and a public key of a cross-chain for private transmission, specifically encrypt transfer information by using a public key of a destination node and then send the transfer information to the destination node, so that only the destination node can obtain a plaintext of the transfer information, after receiving a message, the destination node can obtain the transfer information by decrypting by using a private key of the destination node, and similarly, the cross-chain transmission adopts the cross-chain public key to encrypt the transfer information, and uses the destination chain private key to decrypt the cross-chain information, thereby realizing privacy protection of the transfer data. After the initialization is completed, the model aggregation intelligent contract is started. The design flow is shown in fig. 3.
2.2 polymerization Process design
The model parameters are aggregated through the model aggregation intelligent contracts, and as each block chain node is provided with the intelligent contracts to operate, the aggregation process is realized through node consensus, the decentralization is realized, and the data privacy protection is realized through encryption. As shown in fig. 4, the main flow includes: the nodes utilize local data to carry out model training and update model parameters, encrypt the model parameters by utilizing a public key of a model aggregation intelligent contract and send the model parameters to the model aggregation intelligent contract, the intelligent contract decrypts the model parameters by utilizing a private key of the intelligent contract to obtain the model parameters, other nodes are similar, aggregation operation is carried out after the aggregation conditions are met, otherwise, the model parameter data of the nodes are continuously received to obtain the latest model parameters, contribution degree integral of organization members is updated, and finally the model parameters are synchronized to nodes in a block chain and a cross-chain network.
2.3 synchronous Process design
And after the model aggregation intelligent contracts complete aggregation and the latest model parameters are acquired, performing model parameter synchronization operation, and synchronizing the parameters to nodes in the block chain and the cross-chain network. As shown in fig. 5, the main flow includes: in the block chain, the model aggregation intelligent contract encrypts transmission data by using a public key of a destination node and sends the transmission data to the destination node, and after receiving the data, the destination node decrypts the data by using a private key of the destination node to obtain the latest model parameters and updates a training model of a local node; for the cross-link, the model aggregation intelligent contract encrypts transmission data by using a destination link public key, the encrypted data is transmitted to a destination link through the cross-link, the destination link receives the data, then decrypts the data by using a cross-link private key to obtain the latest model parameters, and the latest model parameters are synchronized to all nodes in the link through the model aggregation intelligent contract.
2.4 excitation mechanism design
The invention designs an excitation mechanism for exciting positive contribution data of each organization member to train a model, and when a node uploads a model parameter, the model aggregates intelligent combination time to integrate contribution degree of the node, and also if the contribution data is the contribution model parameter of a cross-link network, the contribution degree of the node is integrated on the cross-link network. The integration of each organization member is used to administer the whole system. The design flow is shown in fig. 6.
3. Federal learning governance model
The federal learning method with the excitation mechanism based on the blockchain cross-chain not only solves the problems of decentralization and single-point fault prevention, adopts a cross-chain multi-center architecture, has stronger processing capacity, higher throughput rate, more flexibility and strong expansibility, but also utilizes contracts to design an integral excitation mechanism based on data contribution degree, can better excite participating member contribution data training, and improves the accuracy of model training. According to the integral condition of the member, the contribution degree of the member to the model can be seen to treat 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 one period, the member is considered to be deleted or the authority of the member to contribute to training the model is considered to be limited; the member with higher points can be taken as a governance member, has greater authority, and can participate in the operation of the management system, such as endorsement of a transaction. And closed-loop management of the whole system is realized through an integral mechanism. The model design is shown in fig. 7.
4. Cross-chain network design
The method is mainly used for model synchronization of the federal learning model among different chains, ensures data privacy through a privacy cross-chain transaction mode, opens up data barriers among different chains, realizes model training of larger-scale data on the premise of ensuring data non-exchange, and improves training accuracy.
The cross-link network mainly comprises a communication proxy node cross-link, certificate management and a cross-link communication bus cross-link. Each party of the cross-chain has at least one cross-chain communication agent node, each cross-chain agent node can be connected with any node in the chain, and the chains are communicated and interacted through a cross-chain communication bus.
Cross-sagent is a proxy node for communication between chains, and can be connected with all nodes in the chains to provide certain fault tolerance. When the chains are in communication interconnection, a cross-chain certificate management module on the cross-linking agent firstly issues certificates, then registers, and the registration information comprises chain membership information, current chain authority, intelligent contract authority, contract method authority and the like, and authority management and control can be flexibly carried out according to the registration information, so that data security protection is realized; when the models need to be synchronized, privacy cross-link transaction is initiated, after the inside of the links is commonly known, a cross-link message is transmitted to the cross-link by a transmission interface of the cross-link message and then transmitted to the target link for related operation, and the communication process adopts TLS encryption, so that the safety of information transmission can be ensured. The interlink communication responsible for the cross-sagent comprises chain registration, authority management and control, message signature, transaction routing, signature verification, transaction existence verification and the like.
The main flow of cross-chain between blockchains is shown in fig. 8, comprising 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 proxy node for cross-chain identity verification, and meanwhile, the signature of the message abstract is verified, so that the cross-chain authority management is achieved, and the communication safety is ensured.
2. Chain registration
The source chain performs cross-chain registration to the destination chain, and mainly comprises identity information, authority information, verification rules and the like of the source chain, after the registration is successful, a verification engine of the destination chain generates verification rules for the chain, and then the validity of the cross-chain transaction is verified according to the verification rules.
3. Rights and validation rule management
Rights management is mainly rights management and control of inter-chain communication through registration information, and has high customization and flexibility.
The validation rules are used by the validation engine to validate the presence and validity of cross-chain transactions. When the source chain registers to the destination chain, the cross-point of the destination chain deploys and registers corresponding verification rules, and records the identity information of the registration chain into the registration table. The identity of the chain can be verified during the 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 stage
The checking work of the cross-chain transaction includes: whether the source chain that generated the cross-chain transaction has been registered, the registration information including identity information, source chain information, validation rules, and whether there is associated authority.
5. Verification stage
Checking that the cross-chain transaction passes enters a verification stage, the verification stage is executed by a verification engine, verification rules are matched in a registry of a destination chain through source chain identity information of the transaction, and then transaction authority information, verification information (existence and validity), the verification rules and the cross-chain transaction are input into the verification engine to be verified. After verification is passed, the transaction will enter the execution phase.
6. Execution phase
The cross-chain transaction enters an execution stage after passing verification, and the execution stage can design the validity and existence of the transaction.
7. Result return
The destination chain constructs the execution structure and execution state information into return information that is sent to the source chain.
In one embodiment, a computer device is provided that includes a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps in the blockchain cross-chain based federal learning method of the embodiments described above.
In one embodiment, a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps in the blockchain cross-chain based federal learning method of the embodiments described above is presented. Wherein the storage medium may be a non-volatile storage medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (7)

1. A blockchain-based cross-chain federation learning method, comprising:
in a single blockchain network, a federation learning model is deployed on blockchain nodes, local node data is utilized to train the federation learning model, and model parameters are sent to a federation learning model aggregation intelligent contract through privacy transaction; the model aggregation intelligent contract aggregates the model parameters and synchronizes the latest model parameters to each node to complete the model synchronization;
the training steps of the federal learning model are as follows:
(1) Initializing model parameters by a local node; initializing a model aggregation intelligent contract, acquiring public keys of all nodes, and starting model training; the initialization flow of the model aggregation intelligent contract comprises the following steps: initializing parameters to obtain a node public key and a cross-chain public key in a block chain for private transmission; starting the contract after the initialization is completed;
(2) Each in-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 model updating parameters of each node are decrypted by the model aggregation intelligent contract, model parameters of each node are obtained, aggregation operation is carried out, then the latest model parameters are encrypted by the public key of the butt joint node and sent to each training node, each node decrypts by the private key of each node, the latest model parameters are obtained, and the training model is updated;
when the single-chain model is synchronously completed, the model aggregation intelligent contract sends the latest model parameters to the cross-chain network through the cross-chain privacy transaction; the target chain analyzes and trades to obtain the latest model parameters, and synchronizes the latest model parameters to each node in the chain through a model aggregation intelligent contract, so that model synchronization among different chains is realized;
the synchronization process of the model aggregation intelligent contract comprises the following steps: in the block chain, the model aggregation intelligent contract encrypts transmission data by using a public key of a destination node and sends the transmission data to the destination node, and after receiving the data, the destination node decrypts the data by using a private key of the destination node to obtain the latest model parameters and updates a training model of the local node; for the cross-link, the model aggregation intelligent contract encrypts transmission data by using a destination link public key, transmits the encrypted data to a destination link through a cross-link network, decrypts the received data by using a cross-link private key to obtain the latest model parameters, and synchronizes the latest model parameters to all nodes in the link through the model aggregation intelligent contract.
2. The blockchain-based cross-chain federation learning method of claim 1, wherein the main functions of the model syndication intelligence contract include: the method comprises the steps of realizing training model parameter aggregation and synchronization in a block chain and training model parameter aggregation and synchronization among different block chains; the contract method adopts an encryption mode to ensure that data among all nodes is not leaked in the aggregation and synchronization process.
3. The blockchain-based cross-chain federation learning method of claim 1, wherein the model aggregating the aggregated flow of intelligent contracts comprises: the model parameters are aggregated through model aggregation intelligent contracts, each block chain node is provided with intelligent contract operation, the aggregation process is realized through node consensus, the decentralization is realized, and the data privacy protection is realized through encryption; and the model aggregation intelligent contract performs aggregation operation when the aggregation condition is met, otherwise, the node model parameter data is continuously received, and the latest model parameters are obtained.
4. The blockchain-based cross-chain federation learning method of claim 1, wherein the functions of the model syndication intelligence contract further comprise: recording the data contribution degree of each member in the blockchain and the data contribution degree of the cross-chain organization, integrating, and writing into an account book; and through an integral excitation mechanism, each organization member is excited to actively contribute to data training model, and model training precision is improved.
5. The federation learning method based on blockchain cross-chain according to claim 4, wherein the contribution degree of the members to the model is judged according to the integral condition of each member, and the federation learning system is managed; when the score of a member is lower than a threshold value, the contribution degree of the member is considered to be low, and in one period, the member is considered to delete the organization or limit the authority of the contribution training model; the higher scoring member may be a governance member, participating in the operation of the management system.
6. The blockchain-based cross-chain federation learning method according to claim 1, wherein the cross-chain network is used for model synchronization of federation learning models among different chains, and data privacy is ensured through a privacy cross-chain transaction form;
the cross-link network comprises a cross-link communication proxy node and a cross-link communication bus; each cross-chain party is provided with at least one proxy node, each proxy node can be connected with any node in the chain to which the proxy node belongs, and the chains are communicated and interacted through a cross-chain communication bus;
when the chains are in communication interconnection, firstly, a cross-chain certificate management module on the proxy node issues a certificate, and then registration is carried out, wherein the registration information comprises chain membership information, current chain authority, intelligent contract authority and contract method authority;
when the models need to be synchronized, a cross-link privacy transaction is initiated, after the inside of the link is commonly known, a sending interface of the proxy node transmits the cross-link information to the proxy node of the destination link, and then the cross-link information is transmitted to the destination link to perform related operations.
7. A computer device, comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; the processor, when running the computer program, performs the method of any one of claims 1 to 6.
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 CN113992360A (en) 2022-01-28
CN113992360B true 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)

Families Citing this family (6)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11063759B2 (en) * 2018-04-27 2021-07-13 The University Of Akron Blockchain-empowered crowdsourced computing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
基于双层协同的联盟区块链隐私数据保护方法;蔡亮 等;软件学报(08);全文 *

Also Published As

Publication number Publication date
CN113992360A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN113992360B (en) Federal learning method and equipment based on block chain crossing
CN108616539B (en) A kind of method and system of block chain transaction record access
CN107911216B (en) Block chain transaction privacy protection method and system
CN107240017B (en) Block chain transaction management system and method
CN111125779A (en) Block chain-based federal learning method and device
CN110288480B (en) Private transaction method and device for blockchain
US20200193292A1 (en) Auditable privacy protection deep learning platform construction method based on block chain incentive mechanism
WO2019174430A1 (en) Block chain data processing method, management terminal, user terminal, conversion device, and medium
CN107682364B (en) A kind of license chain privacy method of commerce
CN109377198A (en) A kind of signing system known together in many ways based on alliance's chain
CN107592293A (en) The means of communication, digital certificate management method, device and electronic equipment between block chain node
CN112000976B (en) Authentication management method, device, medium and electronic equipment for block chain system
CN112270597A (en) Business processing and credit evaluation model training method, device, equipment and medium
AU2019204713A1 (en) Transferring digital tickets based on blockchain networks
CN108418783A (en) A kind of protection method of block chain intelligence contract privacy, medium
CN111324881B (en) Data security sharing system and method fusing Kerberos authentication server and block chain
CN107438002A (en) Electronic equipment and method in system and system based on block chain
CN111461712B (en) Transaction privacy protection and hierarchical supervision in blockchain supply chain financial scenarios
CN113660327A (en) Block chain system, block chain link point adding method and transaction method
Hongmei A cross-border e-commerce approach based on blockchain technology
CN117121037A (en) Method and system for atomic exchange of blockchain assets using temporary key pairs
CN112016954A (en) Resource allocation method and device based on block chain network technology and electronic equipment
Ali et al. Blockchain for IoT-based cyber-physical systems (CPS): applications and challenges
Jia et al. Cross-chain virtual payment channels
CN115705601A (en) Data processing method and device, 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