CN116702880A - Federal learning system and method based on DAG block chain - Google Patents

Federal learning system and method based on DAG block chain Download PDF

Info

Publication number
CN116702880A
CN116702880A CN202310518516.4A CN202310518516A CN116702880A CN 116702880 A CN116702880 A CN 116702880A CN 202310518516 A CN202310518516 A CN 202310518516A CN 116702880 A CN116702880 A CN 116702880A
Authority
CN
China
Prior art keywords
dag
edge server
layer
block
blocks
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.)
Pending
Application number
CN202310518516.4A
Other languages
Chinese (zh)
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.)
Tianjin University
Original Assignee
Tianjin University
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 Tianjin University filed Critical Tianjin University
Priority to CN202310518516.4A priority Critical patent/CN116702880A/en
Publication of CN116702880A publication Critical patent/CN116702880A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/098Distributed learning, e.g. federated learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Signal Processing (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a federation learning system based on a DAG block chain, which comprises a cloud service layer, an edge server layer and a mobile device layer. The invention also relates to a federal learning method based on the DAG block chain. In the invention, in the federation learning based on the DAG blockchain, a client can participate in the federation learning by actively releasing and storing the blocks of the machine learning model according to own requirements, so that the transition from passive participation to active participation in the traditional federation learning is realized; the nodes in the client and other blockchain networks only store partial DAG account books instead of full DAG account books, so that the data reliability is ensured and the storage resource consumption of the nodes is reduced; the DAG block chain is fused with the federation learning system, so that the federation learning system which can actively participate by a user is realized, and the problem of single-point failure is effectively solved; by enabling the mobile device layer and the edge server layer to only store part of the DAG ledger, the storage consumption of nodes in the DAG blockchain network is reduced.

Description

Federal learning system and method based on DAG block chain
Technical Field
The invention belongs to the technical field of machine learning in a distributed environment, and particularly relates to a federal learning system and method based on DAG block chains.
Background
With the time-free information collection and increasingly enhanced computing power of mobile devices such as smart phones, notebook computers and tablet computers, the rapid development of edge intelligence has changed business and services in many aspects of modern life. In order to effectively utilize the data generated on these mobile devices to provide better services to users, artificial intelligence techniques such as machine learning have been widely used to implement more intelligent applications. With the increase of personal data and the improvement of data privacy protection requirements, a centralized machine learning method cannot adapt to model training based on mobile device data.
The advent of federal learning has motivated the development of marginal intelligence. Federal learning is an emerging, distributed machine learning paradigm that generally relies on multiple clients (e.g., intelligent mobile devices, internet of things devices, or different organizations) and a central server to train a machine learning model, where each time a central server selects several clients as participants, the central server aggregates the model uploaded by these client trains into a global model and sends it to the next selected clients to advance the training process. Federal learning maintains the dispersibility of training data in the training process, and original data held by a client cannot leave a local storage medium, so that the data privacy of the client is ensured to a great extent compared with centralized machine learning.
There are still some problems with current federal learning systems. First, the client needs to trust the model aggregate results of the central server, which is impractical for federal learning systems exposed to public network environments. Second, once the central server is attacked, the reliance of the entire federal learning system on the central server model aggregation functionality will result in a crash of the system. Finally, mobile networks have high scalability, and if the number of devices in the network reaches millions, the central server is likely to reach a performance bottleneck and cannot smoothly aggregate models, thereby causing delays in the whole federal learning system. Therefore, there is an urgent need for a decentralised federal learning scheme that does not rely on a central server to address the security and scalability issues.
Blockchains as a distributed ledger technique can provide an effective solution for decentralised federal learning. Blockchains have demonstrated strong security and reliability in numerous digital cryptocurrency systems. The blockchain is a linked list of hash value connection blocks calculated by miners under the control of a consensus mechanism, such as a workload certification mechanism. The blockchain can make federal learning get rid of dependence on a central server, so that the risk of single-point faults is reduced, and cryptographic methods such as digital signature and the like can make the blockchain permanently store historical data in a tamper-proof manner, and data update on the blockchain can be traced by means of the blockchain in a transparent manner, so that each client-side behavior participating in federal learning is under public supervision, and the robustness of federal learning is improved. Blockchains based on directed acyclic graph (Directed Acyclic Graph, DAG) data structures are a relatively novel paradigm of blockchains compared to conventional blockchains that maintain one backbone. Current blockchain entries based on DAG structures are IOTA, byte snowball, helera, etc. In the DAG blockchain, the blocks are not packed and uploaded by miners, and each node in the DAG blockchain can directly upload the blocks to a network relatively, and the blocks are permanently recorded on the DAG ledger after verification, so that less resources are consumed.
The traditional blockchain and the DAG blockchain can be used for constructing the decentralised federation study, and the difference between the traditional blockchain and the DAG blockchain mainly has two points from the current research: (1) whether a global model can appear in the federal learning process. In traditional blockchain-based federal learning, the central server is typically replaced with a blockchain, and global model aggregation work in traditional federal learning, which is responsible for by the central server, is undertaken by miners and intelligent contracts. In federation learning based on DAG blockchain, each client performs local model aggregation according to unconfirmed blocks (tips) in a DAG account book selected by the client during federation learning, and performs model training on the basis, so that the probability that the client participating in federation learning performs training on the basis of the same model is low. (2) The manner in which clients participate in federal learning is different, depending on whether a global model exists. In federal learning based on traditional blockchains, the client still participates in federal learning in a waiting selected manner, which is limited by the pattern in federal learning that requires computation of the global model. In the federation learning based on the DAG blockchain, a global model aggregation process is not needed, so that part of clients selected by the blockchain are not needed to participate in the federation learning, and the clients can actively participate in the federation learning according to the DAG ledger state and own requirements.
Thus, DAG blockchains are advantageous over traditional blockchains if the decentralized federal learning application is deployed in a mobile network. First, the DAG blockchain requires less additional resources to share by the client, which allows the client to use more resources for training of the machine learning model, which is advantageous for resource-limited mobile devices. Secondly, the client side can actively participate in federation learning at any time in federation learning based on the DAG blockchain, which is friendly to mobile equipment which is difficult to be online for a long time. Finally, unreliable clients in traditional federal learning may result in insufficient data of the global model aggregated once, that is, the situation that the selected clients are offline or cannot complete tasks in time in the training process may occur, which ultimately affects the model training effect.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a federation learning system and method based on a DAG block chain, wherein in federation learning based on the DAG block chain, a client can participate in federation learning by actively releasing and storing blocks of a machine learning model according to own requirements, so that the transition from passive participation to active participation in the traditional federation learning is realized; and the client and other nodes in the blockchain network only store partial DAG account books instead of full DAG account books, so that the storage resource consumption of the nodes is reduced while the data reliability is ensured.
The invention solves the technical problems by the following technical proposal:
a DAG blockchain-based federal learning system, characterized by: the cloud service layer, the edge server layer and the mobile device layer are included;
cloud service layer: the method comprises the steps of issuing a federal learning task, selecting a machine learning model, defining training parameters, issuing a training script, initializing model weights, distributing task incentives, creating a DAG account book creation block, formulating a tip selection algorithm, monitoring a federal learning process, and pricing and selling a federal learning global model;
edge server layer: storing and forwarding message data of a cloud service layer to a mobile device layer, forwarding DAG blocks issued by devices in the mobile device layer, and redundantly storing DAG account books to process data synchronization requirements of the devices in the mobile device layer;
mobile device layer: the method comprises the steps of training a federal learning model, releasing DAG blocks, maintaining a DAG ledger, obtaining an incentive from a cloud service layer, enabling DAG block chains maintained by clients in a mobile device layer to belong to public chains, enabling the clients to participate in the federal learning model training on the basis of understanding federal learning tasks released by the cloud service layer, performing model training on a local data set according to parameters and models specified by the generated blocks, packing the local models into the DAG blocks each time and uploading the DAG blocks to a nearby edge server, selecting from two modes of synchronization from adjacent clients and synchronization directly from the nearby edge server when the clients need to synchronize data, and jointly and redundantly storing the complete DAG ledger by the clients of the mobile device layer so as to prevent the loss of the edge server layer and the cloud service layer.
A DAG blockchain-based federal learning method, characterized by: the learning method comprises the following steps:
1) The cloud service layer issues federal learning tasks and an originating block containing necessary data to the edge server layer;
2) The mobile equipment layer is used as a client to download a plurality of DAG blocks containing machine learning models from an edge server layer or other mobile equipment, and calculates local models according to the downloaded models;
3) After the client performs model training on the basis of the local data, the model data are packed into DAG blocks;
4) The client uploads the DAG block to a nearby edge server layer;
5) The edge server layer broadcasts the received DAG blocks in an edge server layer network;
6) The edge server layer uploads the DAG block to the cloud service layer;
7) The cloud service layer monitors the federation learning process, namely the DAG account book expansion process, according to the DAG blocks uploaded by the edge server layer, and selects a proper time to finish the federation learning task, and after the task is finished, the cloud service layer needs to distribute incentives to clients participating in the federation learning task by taking the DAG account book as a basis.
After performing block storage value calculation according to the DAG ledger state, the edge server layer in the step 4) achieves consensus on redundant storage of low-value block data according to a consensus algorithm based on a Verifiable Random Function (VRF), the verifiable random function takes a private key sk and a random seed as input, outputs a pseudo random number rand and a proof of the pseudo random number, and anyone can verify the correctness of the pseudo random number rand by using a public key pk and the proof corresponding to the private key sk, wherein the consensus algorithm comprises the steps of:
s1, according to a set random seed, an edge server in a alliance chain uses VRF to obtain a pseudo-random number rand and a proof through calculation, and then the edge server of which the pseudo-random number rand meets a system set threshold value broadcasts the pseudo-random number rand and the proof, so that a co-edge server layer is obtained to exit or join into a consensus group according to the pseudo-random number rand, and the number of the edge server layers in the consensus group is kept to be k+m;
s2, each edge server layer in the consensus group puts forward an unprocessed low-value block proposal, the least one of the proposals with the number of the low-value blocks higher than a set threshold is selected, the threshold is used for preventing the edge server layer from causing adverse effects on the consensus result due to high-value blocks in DAG account books caused by network congestion or delay, then the proposed edge servers divide the low-value blocks into k original data blocks and then encode the k+m encoded data blocks, and a data allocation scheme is provided, generally one edge server in the consensus group stores one encoded data block, then the script for encoding the original data is sent to each edge server, other edge servers selectively store the encoded data blocks according to the data allocation scheme and the encoding script, and the final data allocation mode depends on the performance of the edge servers;
s3, the edge server encoding the original data in the consensus group packages the result of the step S2 into a alliance chain block, broadcasts the alliance chain block into an alliance chain network, and the edge server layer receiving the alliance chain block can remove the block body data of the low-value block stored locally according to the original data Merkle tree in the block body and marks the block as the processed low-value block.
The invention has the advantages and beneficial effects that:
1. according to the federation learning system and method based on the DAG block chain, in federation learning based on the DAG block chain, a client can participate in federation learning by actively releasing and storing blocks of a machine learning model according to own requirements, so that the transition from passive participation to active participation in traditional federation learning is realized; the client and other nodes in the blockchain network only store partial DAG account books instead of full DAG account books, so that the storage resource consumption of the nodes is reduced while the data reliability is ensured.
2. The invention fuses the DAG block chain and the federation learning system, realizes the federation learning system which can actively participate by a user, and effectively solves the problem of single-point failure.
3. According to the invention, the mobile equipment layer and the edge server layer only store part of DAG account books, so that the storage consumption of nodes in the DAG blockchain network is reduced.
4. The invention designs a alliance chain and a consensus algorithm to ensure that the edge server achieves consensus on storing old redundant DAG account book data, thereby realizing system autonomy to a certain extent.
Drawings
FIG. 1 is a system frame diagram of the present invention;
FIG. 2 is a schematic diagram of a client of the present invention participating in federal learning;
FIG. 3 is a schematic diagram of a mobile device layer (client) storage optimization strategy of the present invention;
FIG. 4 is a diagram of a federated chain data model of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are intended to be illustrative only and not limiting in any way.
The system framework in the present invention is shown in fig. 1, and first, three role functions are described in detail as follows:
cloud service layer: the method comprises the steps of issuing a federal learning task, selecting a machine learning model, defining training parameters, issuing a training script, initializing model weights, distributing task incentives, creating a DAG account book creation block, formulating a tip selection algorithm, monitoring a federal learning process, and pricing and selling a federal learning global model.
Edge server layer: and storing and forwarding message data of the cloud service layer to the mobile equipment layer, forwarding DAG blocks issued by equipment in the mobile equipment layer, and redundantly storing DAG account books to process the data synchronization requirements of the equipment in the mobile equipment layer. The edge server layer mainly takes on the task of storing DAG account books and serves the mobile device layer. By redundantly storing the DAG ledger on multiple edge servers, situations that devices in the mobile device layer cannot synchronize data from adjacent clients can be avoided, and therefore the availability of the DAG ledger data is ensured.
Mobile device layer: the federal learning model is trained, a DAG block is issued, a DAG ledger is maintained, and excitation is acquired from a cloud service layer. The DAG blockchain maintained by the clients in the mobile device layer belongs to a public chain. The client participates in federal learning model training on the basis of understanding federal learning tasks issued by the cloud service layer, performs model training on a local data set according to parameters and models specified by the generation block, and packages the local model into a DAG block each time and uploads the DAG block to a nearby edge server. When a client needs to synchronize data, it can choose between synchronizing from neighboring clients and synchronizing directly from a nearby edge server. The clients of the mobile device layer together redundantly store the complete DAG ledger to prevent the edge server layer from losing with the cloud service layer data.
According to fig. 2, a method of federation learning based on DAG blockchain, a complete federation learning task process comprises the following seven steps, wherein steps (2) - (6) need to be performed multiple times:
(1) The cloud service layer issues federal learning tasks and creative blocks containing necessary data to the edge servers.
(2) The mobile device as a client downloads a number of DAG blocks containing machine learning models from an edge server or other mobile device and calculates a local model from the downloaded models.
(3) And after the client performs model training on the basis of the local data, packaging the model data into DAG blocks.
(4) The client uploads the DAG block to a nearby edge server.
(5) The edge server broadcasts the received DAG blocks within the edge server layer network.
(6) The edge server uploads the DAG block to the cloud server.
(7) The cloud service layer monitors the federation learning process, namely the DAG ledger expansion process, according to the DAG blocks uploaded by the edge server, and selects a proper time to finish the federation learning task, and after the task is finished, the cloud service layer needs to distribute excitation to clients participating in the federation learning task by taking the DAG ledger as a basis.
The node storage optimization strategy is divided into two parts, namely mobile equipment (client) storage optimization and edge server storage optimization. The storage optimization strategy on the mobile device is shown in fig. 3, the client only stores the block uploaded by the client and the block directly connected with the uploaded block, and the number of times that a single block is stored is the sum of the ingress and egress of the block in the DAG ledger from the whole mobile device layer, so that each block is stored on at least two clients, and the mobile device layer can be ensured to store the complete DAG ledger redundantly. The edge server divides the blocks into high-value blocks and low-value blocks by calculating the storage value of the DAG blocks, adopts a multi-copy storage strategy for the high-value blocks to ensure the availability of data, adopts a redundancy storage strategy based on erasure codes for the low-value blocks, executes a designed consensus algorithm based on verifiable random functions (Verifiable Random Function, VRF), takes a alliance chain as an index to achieve consensus of the encoded low-value block data, and a alliance chain data model is shown in figure 4.
After the edge server calculates the block storage value according to the DAG account state, the edge server needs to achieve consensus on redundant storage of low-value block data according to a designed consensus algorithm based on VRF, the VRF can take a private key sk and a random seed as input, output a pseudo-random number rand and a proof of the pseudo-random number, and anyone can verify the correctness of the pseudo-random number rand by using a public key pk and the proof corresponding to the private key sk, wherein the consensus algorithm comprises the following three steps:
(1) According to the random seed set by the system, the edge servers in the alliance chain use VRF to obtain the pseudo-random number rand and proof by calculation, then the edge servers with the pseudo-random number rand meeting the set threshold value of the system broadcast the pseudo-random number rand and proof, so that a common edge server is obtained to exit or join the common identification group according to the size of the pseudo-random number rand, and the number of the edge servers in the common identification group is kept to be k+m.
(2) Each edge server in the consensus group presents an unprocessed low-value block proposal, selects the least one of the proposals with the number of the low-value blocks higher than a set threshold value, the threshold value is used for preventing the edge servers from causing bad influence on the consensus result due to network congestion or delay, the edge servers (if a plurality of edge servers present the same proposal, the edge servers with the largest pseudo random number rand order execute) divide the low-value blocks into k original data blocks and encode the k original data blocks into k+m encoded data blocks, and a data distribution scheme is presented, wherein one edge server in one consensus group stores one encoded data block, then scripts for encoding the original data are sent to each edge server, and other edge servers selectively store the encoded data blocks according to the data distribution scheme and the encoding scripts. It should be noted that, the final data allocation manner depends on the performance of the edge servers, if the edge servers have a strong computing power, the method described above is used, and if the edge servers have a large bandwidth but a general computing power, the proposed edge servers can be made to directly send the encoded data blocks to the edge servers in the group.
(3) The edge server encoding the original data in the consensus group packages the result in step (2) into the alliance chain block as shown in fig. 4, and broadcasts the alliance chain block into the alliance chain network, and the edge server receiving the alliance chain block can remove the block body data of the low-value block stored locally according to the original data Merkle tree in the block body and marks the block as the processed low-value block.
The alliance chain block data model is shown in fig. 4, and besides the necessary block header information, the block body stores a stored Merkle tree and an original data Merkle tree, wherein the transaction in the stored Merkle tree contains the relevant storage information of the coded data block, and the original data Merkle tree contains the relevant information of the original DAG block. The storage Merkle tree ensures that when not more than m coded data blocks are lost, the edge server can acquire the coded data from accurate positions and decode the coded data to obtain original data, and the original data Merkle tree ensures that when the edge server receives a synchronous low-value block request, the edge server can quickly find the storage position of the block in cooperation with the storage Merkle tree and respond to the data synchronous request. The role of the federation chain is to build an index for the encoded data blocks, which are stored in different edge servers by means of under-chain storage.
Although the embodiments of the present invention and the accompanying drawings have been disclosed for illustrative purposes, those skilled in the art will appreciate that: various substitutions, changes and modifications are possible without departing from the spirit and scope of the invention and the appended claims, and therefore the scope of the invention is not limited to the embodiments and the disclosure of the drawings.

Claims (3)

1. A DAG blockchain-based federal learning system, characterized by: the cloud service layer, the edge server layer and the mobile device layer are included;
cloud service layer: the method comprises the steps of issuing a federal learning task, selecting a machine learning model, defining training parameters, issuing a training script, initializing model weights, distributing task incentives, creating a DAG account book creation block, formulating a tip selection algorithm, monitoring a federal learning process, and pricing and selling a federal learning global model;
edge server layer: storing and forwarding message data of a cloud service layer to a mobile device layer, forwarding DAG blocks issued by devices in the mobile device layer, and redundantly storing DAG account books to process data synchronization requirements of the devices in the mobile device layer;
mobile device layer: the method comprises the steps of training a federal learning model, releasing DAG blocks, maintaining a DAG ledger, obtaining an incentive from a cloud service layer, enabling DAG block chains maintained by clients in a mobile device layer to belong to public chains, enabling the clients to participate in the federal learning model training on the basis of understanding federal learning tasks released by the cloud service layer, performing model training on a local data set according to parameters and models specified by the generated blocks, packing the local models into the DAG blocks each time and uploading the DAG blocks to a nearby edge server, selecting from two modes of synchronization from adjacent clients and synchronization directly from the nearby edge server when the clients need to synchronize data, and jointly and redundantly storing the complete DAG ledger by the clients of the mobile device layer so as to prevent the loss of the edge server layer and the cloud service layer.
2. A DAG blockchain-based federation learning method in accordance with claim 1, wherein: the learning method comprises the following steps:
1) The cloud service layer issues federal learning tasks and an originating block containing necessary data to the edge server layer;
2) The mobile equipment layer is used as a client to download a plurality of DAG blocks containing machine learning models from an edge server layer or other mobile equipment, and calculates local models according to the downloaded models;
3) After the client performs model training on the basis of the local data, the model data are packed into DAG blocks;
4) The client uploads the DAG block to a nearby edge server layer;
5) The edge server layer broadcasts the received DAG blocks in an edge server layer network;
6) The edge server layer uploads the DAG block to the cloud service layer;
7) The cloud service layer monitors the federation learning process, namely the DAG account book expansion process, according to the DAG blocks uploaded by the edge server layer, and selects a proper time to finish the federation learning task, and after the task is finished, the cloud service layer needs to distribute incentives to clients participating in the federation learning task by taking the DAG account book as a basis.
3. The DAG blockchain-based federation learning method of claim 2, wherein: after performing block storage value calculation according to the DAG ledger state, the edge server layer in step 4) achieves consensus on redundant storage of low-value block data according to a consensus algorithm based on a Verifiable Random Function (VRF), the verifiable random function takes a private key sk and a random seed as inputs, outputs a pseudo random number rand and a proof of the pseudo random number, and anyone can verify correctness of the pseudo random number rand by using a public key pk and the proof corresponding to the private key sk, wherein the consensus algorithm comprises the following steps:
s1, according to a set random seed, an edge server in a alliance chain uses VRF to obtain a pseudo-random number rand and a proof through calculation, and then the edge server of which the pseudo-random number rand meets a system set threshold value broadcasts the pseudo-random number rand and the proof, so that a co-edge server layer is obtained to exit or join into a consensus group according to the pseudo-random number rand, and the number of the edge server layers in the consensus group is kept to be k+m;
s2, each edge server layer in the consensus group puts forward an unprocessed low-value block proposal, the least one of the proposals with the number of the low-value blocks higher than a set threshold is selected, the threshold is used for preventing the edge server layer from causing adverse effects on the consensus result due to high-value blocks in DAG account books caused by network congestion or delay, then the proposed edge servers divide the low-value blocks into k original data blocks and then encode the k+m encoded data blocks, and a data allocation scheme is provided, generally one edge server in the consensus group stores one encoded data block, then the script for encoding the original data is sent to each edge server, other edge servers selectively store the encoded data blocks according to the data allocation scheme and the encoding script, and the final data allocation mode depends on the performance of the edge servers;
s3, the edge server encoding the original data in the consensus group packages the result of the step S2 into a alliance chain block, broadcasts the alliance chain block into an alliance chain network, and the edge server layer receiving the alliance chain block can remove the block body data of the low-value block stored locally according to the original data Merkle tree in the block body and marks the block as the processed low-value block.
CN202310518516.4A 2023-05-10 2023-05-10 Federal learning system and method based on DAG block chain Pending CN116702880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310518516.4A CN116702880A (en) 2023-05-10 2023-05-10 Federal learning system and method based on DAG block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310518516.4A CN116702880A (en) 2023-05-10 2023-05-10 Federal learning system and method based on DAG block chain

Publications (1)

Publication Number Publication Date
CN116702880A true CN116702880A (en) 2023-09-05

Family

ID=87842348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310518516.4A Pending CN116702880A (en) 2023-05-10 2023-05-10 Federal learning system and method based on DAG block chain

Country Status (1)

Country Link
CN (1) CN116702880A (en)

Similar Documents

Publication Publication Date Title
CN113204787B (en) Block chain-based federated learning privacy protection method, system, device and medium
CN110046894B (en) Erasure code-based block chain establishing method capable of reconstructing groups
CN111625593B (en) Block chain-based data processing method and device and computer equipment
CN111311414A (en) Block chain multi-party consensus method based on consistent hash algorithm
WO2023016090A1 (en) Data processing method and apparatus for blockchain network, computer device, computer readable storage medium, and computer program product
CN109885264A (en) A kind of the logic sharding method and its system of block chain node
CN110298754B (en) Consensus method applied to block chain
CN109087111A (en) Common recognition verification method, digging mine machine and block catenary system based on block chain
Zoican et al. Blockchain and consensus algorithms in internet of things
CN111523150B (en) Document editing method, device and system based on block chain
CN112329051A (en) Safe and efficient consensus mechanism implementation method and system
CN114338040B (en) Block chain node grouping multi-chain three-time consensus method
CN112417001B (en) Data processing method based on block chain network and related equipment
CN109241754A (en) A kind of cloud file data de-duplication method based on block chain
CN109087105A (en) For digging the Hash Search method of mine, digging mine machine and block catenary system
CN112532389B (en) Smart power grid lightweight privacy protection data aggregation method based on block chain
CN111858105A (en) Personal archive permission chain management system and method based on improved multi-layer PBFT
CN111798234B (en) Lightweight block chain system and construction method
CN116366673A (en) Data analysis and sharing method oriented to management of power grid information machine room
Xi et al. [Retracted] A Comprehensive Survey on Sharding in Blockchains
CN116595094A (en) Federal learning incentive method, device, equipment and storage medium based on block chain
CN114116899A (en) Block chain-based satellite cluster distributed data secure storage method
CN110730241B (en) Global scale oriented blockchain infrastructure
CN109255614A (en) Digging mine method and device, digging mine machine and block catenary system based on block chain
CN101873345A (en) Integrated block switching P2P shared-file system and method for motivating seed-providing for other nodes thereof

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