A data interaction system and decentralized edge model training and verification method

By introducing a verifiable computing layer into the edge computing system, using blockchain technology and the computing power of edge nodes, it realizes effective verification of outsourcing computing tasks, solves the trust problem and waste of computing resources, and realizes efficient circulation and effectiveness verification of data in edge networks.

CN114546636BActive Publication Date: 2025-04-04BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111666577.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-04-04
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing edge computing cannot effectively verify the results of outsourcing computing tasks, resulting in trust problems and waste of computing resources.

Method used

The accuracy verification of task results is achieved by introducing a verifiable computing layer composed of edge nodes with computing and verification capabilities. The system includes a physical network layer, an off-chain storage layer, a blockchain edge layer and a verifiable computing layer. Through these levels of interaction, it realizes efficient circulation of data in the edge network and effective verification of results.

Benefits of technology

It solves the problem that the outsourcing results of edge computing cannot be effectively verified, and realizes efficient circulation of data in edge networks and simple and efficient validity verification of edge data, reducing verification time and improving verification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546636B_ABST
    Figure CN114546636B_ABST
Patent Text Reader

Abstract

The present application provides a data interaction system and a decentralized edge model training and verification method, wherein the data interaction system includes: a physical network layer, which is composed of edge devices of data producers, and is used to collect and store data produced by edge devices, and upload the data to the off-chain storage layer; an off-chain storage layer, which is composed of nodes with storage resources, and is used to receive data from the physical network layer, and generate a data summary based on the received data, and upload the data summary to the blockchain edge layer; a blockchain edge layer, which is composed of a blockchain network composed of edge nodes, and is used for data sharing; a verifiable computing layer, which is used to verify the accuracy of task results. The above scheme solves the existing problem of being unable to effectively verify the results of edge computing outsourcing, realizes the efficient circulation of data in the edge network, and achieves the technical effect of simply and efficiently verifying the validity of edge data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and in particular relates to a data interaction system and a decentralized edge model training and verification method. Background Art

[0002] With the advent of the Internet of Everything era, the amount of data has exploded. In order to solve the problem of excessive network overhead in the cloud center, computing and storage capabilities are delegated to edge devices at the edge. However, due to limited conditions, many edge devices have to outsource computing tasks to third parties, which makes it difficult for edge nodes to trust the training results from third parties, and requires a large amount of overhead to verify the training results, which is an overhead that edge devices cannot afford.

[0003] The emergence of blockchain technology has established an environment for edge computing that does not require trust for interaction. However, it still cannot solve the problem of outsourced verification results. Because of data outsourcing, most nodes in the network still need to perform repeated verification, which will result in a waste of computing resources. Summary of the invention

[0004] The purpose of this application is to provide a data interaction system and a decentralized edge model training and verification method to solve the technical problem that the existing edge computing cannot verify the validity of the results.

[0005] In one aspect, a data interaction system is provided, comprising:

[0006] The physical network layer, which is composed of edge devices of data producers, is used to collect and store data produced by edge devices and upload the data to the off-chain storage layer;

[0007] The off-chain storage layer, which is composed of nodes with storage resources, is used to receive data from the physical network layer, generate data summaries based on the received data, and upload the data summaries to the blockchain edge layer;

[0008] The blockchain edge layer consists of a blockchain network composed of edge nodes for data sharing;

[0009] The verifiable computing layer, located above the blockchain edge layer, is composed of edge nodes with computing and verification capabilities, and is used to verify the accuracy of task results.

[0010] In one embodiment, the verifiable computation layer includes:

[0011] The task distribution node is composed of the client that initiates the computing task, and is used to initiate the computing task and store the computing task in the off-chain storage layer;

[0012] A task solving node, composed of an edge device, is used to solve the computing task by executing model training to obtain a first training result;

[0013] A task verification node, composed of an edge device, is used to execute the computing task and obtain a second training result;

[0014] The task arbitration node is used to perform result arbitration according to the first training result and the second training result.

[0015] In one embodiment, the verifiable computing layer further includes:

[0016] The task jury node is used to receive the first training result, the second training result, receive the intermediate data returned by the task arbitration node, and verify the intermediate data according to the first training result and the second training result.

[0017] On the other hand, a decentralized edge model training and verification method applied to the above-mentioned data interaction system is provided, comprising:

[0018] The verification computing layer selects a task solving node in response to a task request issued by the task distribution node, and executes the computing task through the selected task solving node to obtain a first training result;

[0019] Execute the computing task through a randomly selected task verification node to obtain a second training result;

[0020] Submitting the first training result and the second training result to a task arbitration node;

[0021] The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result.

[0022] In one embodiment, the task request carries: the data source of the task, the calculation method of the task, and the settlement result required for the task.

[0023] In one embodiment, the first training result is obtained by executing the computing task through the selected task solving node, including:

[0024] The task solving node obtains the model to be trained and the training data according to the mapping address;

[0025] The task solving node performs model training locally to generate a first training result;

[0026] The first training result is stored in the off-chain storage layer, and the mapping address and the summary of each round of training results are submitted to all nodes of the verification computing layer.

[0027] In one embodiment, the task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result, including:

[0028] The task arbitration node compares the first training result with the second training result round by round to determine a termination round with the same training results;

[0029] The determined termination round is used as the breakpoint;

[0030] Get the expected number of training rounds;

[0031] The accuracy of the first training result is determined according to the breakpoint and the expected training rounds.

[0032] In one embodiment, after the determined termination round is used as a breakpoint, the method further includes:

[0033] Sending the termination round as an intermediate result to the task jury node;

[0034] The task jury node verifies the intermediate data according to the first training result and the second training result.

[0035] In one embodiment, the task solving node performs model training locally, and generating a first training result includes:

[0036] The task solving node performs training according to the training rounds in the task request;

[0037] An incentive resource is added to the training result generated at the end of the last training round, wherein the incentive resource is used to transfer to the task verification node when the second training result differs from the first training result only in the result of the last training round.

[0038] In one embodiment, the above method further comprises:

[0039] The task distribution node pledges two resource amounts, the task solution node pledges one resource amount, and the task verification node pledges one resource amount;

[0040] Using the first training result and the second training result, determine the termination round with the same result as the breakpoint;

[0041] The cutoff point is half of the expected training rounds;

[0042] According to the proportional relationship between the breakpoint and the demarcation point, resources are allocated to the task solving node and the task verifying node.

[0043] On the other hand, a computer-readable storage medium is provided, on which computer instructions are stored, and the instructions implement the steps of the above method when executed.

[0044] The data interaction system and decentralized edge model training and verification method provided in this application introduce a verifiable computing layer composed of edge nodes with computing and verification capabilities to verify the accuracy of task results, thereby solving the existing problem of being unable to effectively verify the results of edge computing outsourcing, realizing efficient flow of data in the edge network, and achieving the technical effect of simply and efficiently verifying the validity of edge data. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 It is a schematic diagram of the architecture of the data interaction system provided by this application;

[0047] Figure 2 It is a schematic diagram of the model structure of an embodiment of the verifiable computing layer provided by the present application;

[0048] Figure 3 This is a method flow chart of an embodiment of the decentralized edge model training and verification method provided by this application. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0050] The following problems exist in existing edge computing:

[0051] 1) Trust issues caused by random parameters submitted by third-party malicious nodes during edge model outsourcing;

[0052] 2) The problem of low verification efficiency during edge model outsourcing.

[0053] In this example, a decentralized edge model training method is proposed, so that edge nodes with limited resources can safely outsource computing tasks to other nodes, and receive a verifiable edge computing task result under the premise of being able to identify malicious edge nodes. An interaction model for on-chain and off-chain data is provided, which realizes the efficient circulation of data in the edge network through four-layer data interaction of physical network layer, blockchain edge layer, verifiable computing layer and off-chain storage layer. Furthermore, a model training verification algorithm based on verifiable random functions is proposed. Through the data interaction of Honor arbitrator, Solver solver, Verifier verifier and Juror juror, the verification node can verify the validity of the result without re-executing the artificial intelligence model, which improves the verification efficiency of the verification node. Furthermore, an incentive model is designed to define the rights and obligations of participants in the network, restrict network resource consumers from consuming network resources without limit, and encourage network resource providers and network result verifiers to actively participate in network consensus, so as to better configure network resources. It can effectively reduce the verification time while basically maintaining the accuracy of the model in both the presence and absence of malicious nodes, thereby proving the scalability of the proposed algorithm.

[0054] Specifically, Figure 1 As shown, a data interaction system is provided, which may include:

[0055] The physical network layer 101 is composed of edge devices of data producers, which is used to collect and store data produced by edge devices and upload the data to the off-chain storage layer;

[0056] The off-chain storage layer 102 is composed of nodes with storage resources, which are used to receive data from the physical network layer, generate data summaries based on the received data, and upload the data summaries to the blockchain edge layer;

[0057] The blockchain edge layer 103 is composed of a blockchain network consisting of edge nodes for data sharing;

[0058] The verifiable computing layer 104 is located above the blockchain edge layer and is composed of edge nodes with computing and verification capabilities, and is used to verify the accuracy of task results.

[0059] That is, by introducing a verifiable computing layer composed of edge nodes with computing and verification capabilities to verify the accuracy of task results, the existing problem of being unable to effectively verify the results of edge computing outsourcing can be solved, and efficient data circulation in the edge network can be achieved, achieving the technical effect of simply and efficiently verifying the validity of edge data.

[0060] like Figure 2As shown, the above-mentioned verifiable computing layer can be composed of the following nodes:

[0061] The task distribution node is composed of the client that initiates the computing task, and is used to initiate the computing task and store the computing task in the off-chain storage layer;

[0062] A task solving node, composed of an edge device, is used to solve the computing task by executing model training to obtain a first training result;

[0063] A task verification node, composed of an edge device, is used to execute the computing task and obtain a second training result;

[0064] A task arbitration node, used for performing result arbitration according to the first training result and the second training result;

[0065] The task jury node is used to receive the first training result, the second training result, receive the intermediate data returned by the task arbitration node, and verify the intermediate data according to the first training result and the second training result.

[0066] That is, a model training and verification algorithm based on verifiable random functions is proposed. Through the data interaction among the Honor arbitrator, Solver, Verifier, and Juror, the verification node can verify the validity of the result without re-executing the artificial intelligence model, thereby improving the verification efficiency of the verification node.

[0067] Specifically, in this example, a decentralized edge model training and verification method is provided, such as Figure 3 As shown, the following steps may be included:

[0068] Step 301: the verification computing layer selects a task solving node in response to a task request issued by a task distribution node, and executes the computing task through the selected task solving node to obtain a first training result;

[0069] Among them, the task request may carry, but is not limited to: the data source of the task, the calculation method of the task, and the settlement result required for the task. Specifically, the selected task solution node executes the calculation task to obtain the first training result, including: the task solution node obtains the model to be trained and the training data according to the mapping address; the task solution node performs model training locally to generate the first training result; the first training result is stored in the off-chain storage layer, and the mapping address and the summary of each round of training results are submitted to all nodes of the verification calculation layer.

[0070] Among them, the task solving node can sequentially select an edge node through a polling algorithm, and the selected edge node executes the model training.

[0071] Step 302: Execute the computing task through a randomly selected task verification node to obtain a second training result;

[0072] For the task verification node, it can be randomly selected. For example, the verifiable computing layer can select other edge training nodes as task verification nodes based on the verifiable random function. Only when the generated random number is less than the threshold value predetermined by the verifiable computing layer, can the node be used as a task verification node. Among them, the predetermined threshold value can be generated according to the private key of the task arbitration node, and then the accuracy of the result is verified by the task arbitration node. However, in the process of selecting the task verification node, there may be the following three situations: 1) Only one edge node has a random number less than the threshold, in which case the node is the task verification node; 2) No edge node has a random number less than the threshold, in which case the network will select an edge node as the task verification node for this time through a polling algorithm; 3) When the random numbers of multiple edge nodes are less than the threshold, the first edge node that sends the verification result to the task arbitration node becomes the task verification node for the task.

[0073] Step 303: Submitting the first training result and the second training result to a task arbitration node;

[0074] For the task arbitration node, when the task distribution node submits the task to the blockchain network consensus, the master node generated by the consensus algorithm is used as the task arbitration node. The task arbitration node has a veto power over the training results of the task computing node and the task verification node. Therefore, the task arbitration node needs to be elected through the consensus mechanism to prevent cheating. For example, in the BFT algorithm, the task arbitration node can be the master node; in the Satoshi algorithm, the task arbitration node can be a miner with the right to record accounts. In this case, the accounting node generated by the consensus algorithm is used as the task arbitration node.

[0075] Step 304: The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result.

[0076] Specifically, the task arbitration node can compare the first training result with the second training result round by round, determine the termination round with the same training results; use the determined termination round as a breakpoint; obtain the expected training round; and determine the accuracy of the first training result based on the breakpoint and the expected training round. For example: the task arbitration node receives the mapping address and task summary returned by the task solution node and the task verification node, first compares the task summary to locate the checkpoint (breakpoint), and then executes a training round from the checkpoint to determine the obtained result. The worst case is that the task solution node and the task verification node are all malicious nodes and submit different randomly generated task summaries. At this time, the checkpoint is 0, the arbitrator only executes the result of epoch=1, and the task distributor only harvests the result of one epoch.

[0077] During implementation, a task jury node can be introduced to assist the task arbitration node. After the determined termination round is used as a breakpoint, the termination round can be sent to the task jury node as an intermediate result; the task jury node verifies the intermediate data based on the first training result and the second training result.

[0078] In order to incentivize the verification node, the task solving node may provide some incentive resources. For example, the task solving node performs model training locally, and generating a first training result may include: the task solving node performs training according to the training rounds in the task request; and adds incentive resources to the training result generated at the end of the last training round, wherein the incentive resources are used to transfer the second training result to the task verification node when the second training result differs from the first training result only in the result of the last training round.

[0079] In order to incentivize all nodes in the network, a breakpoint-based edge node reputation incentive model can be adopted. For example, the task distribution node pledges two resources, the task solving node pledges one resource, and the task verification node pledges one resource. The first training result and the second training result are used to determine the termination round with the same result as the breakpoint; half of the expected training rounds is used as the dividing point; and resources are allocated to the task solving node and the task verification node according to the proportional relationship between the breakpoint and the dividing point.

[0080] The above method is described below in conjunction with a specific embodiment. However, it should be noted that this specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.

[0081] In this example, a system model is provided that can be divided into the following four layers according to the data flow: physical network layer, blockchain edge layer, verifiable computing layer and off-chain storage layer. Among them, the physical network layer is used for data production, the blockchain edge layer is used for data sharing, the verifiable computing layer is used for model training, and the off-chain storage layer is used for data storage.

[0082] 1) Physical network layer: This layer is composed of edge devices (i.e., edge terminal devices) that are data producers. Its function is to collect and store data produced by edge devices. Due to the limited computing and storage capabilities of edge devices, they first upload edge data (data generated by edge devices can be used as edge data) to the off-chain storage layer. The off-chain storage layer generates a data summary and then uploads it to the blockchain edge layer for the next step of data training and sharing.

[0083] 2) Blockchain edge layer: This layer consists of a blockchain network composed of edge training nodes. Edge training nodes are composed of edge nodes with strong computing power to perform resource-consuming computing tasks. In the following, edge training nodes are referred to as edge nodes. The blockchain edge layer uses the immutable and traceable characteristics of blockchain to support data sharing of untrusted edge nodes.

[0084] 3) Verifiable computing layer: This layer is built on the edge layer of the blockchain and consists of edge nodes with computing and verification capabilities. In the verifiable computing layer, the roles of edge nodes are divided into Giver, Solver, Verifier, Honor, and Juror, and their main function is to verify the effectiveness of the decentralized model training mechanism.

[0085] 4) Off-chain storage layer: In order to reduce the impact of storing large amounts of data on the efficiency of blockchain consensus, in this example, the off-chain storage layer consensus is used to expand the storage capacity of the blockchain, exchanging space for time, so that a large amount of data can flow between the blockchain and edge nodes. This layer is composed of edge nodes, cloud servers and other nodes with storage resources, which participate in data storage by consuming resources to obtain rewards.

[0086] The consensus model is divided into three parts according to the different locations of data interaction, namely blockchain edge layer consensus, verifiable computing layer consensus and off-chain storage layer consensus. The blockchain edge layer consensus is used for data sharing, the verifiable computing layer consensus is used for computing power sharing, and the off-chain storage layer consensus is used for storage sharing.

[0087] 1) Blockchain edge layer consensus: The openness of edge computing tasks means that edge nodes can join or exit the edge network at will, and it is difficult for edge nodes in different trust domains to interact with each other. Therefore, in this case, blockchain is used to achieve low-cost and efficient flow of edge data between untrusted edge nodes. The blockchain edge layer consensus consists of edge nodes, which have accounting and data sharing capabilities and can participate in the consensus process in the blockchain network.

[0088] 2) Verifiable computing layer consensus: In order to reduce the waste of computing resources and other issues, in this example, the verifiable computing layer consensus is used to verify the effectiveness of the decentralized model training mechanism to make full use of computing resources. The verifiable computing layer consensus selects Solver to perform computing tasks and Verifier to perform verification tasks. The results of Verifier are submitted to Honor as the results of the verifiable computing layer. Honor compares the accuracy of the results and gives a checkpoint. Finally, Juror verifies the correctness of the checkpoint. The Honor here can be selected by the blockchain edge layer consensus, so the probability of Honor becoming a malicious node is determined by the consensus algorithm adopted by the blockchain edge layer consensus.

[0089] 3) Off-chain storage layer consensus: The consensus algorithm implementation solutions for the off-chain storage layer include IPFS (peer-to-peer distributed file system protocol) without an incentive layer and FileCoin and Crust with an incentive layer. They use technologies such as Merkle DAG to store and verify data to prevent data from being tampered with off-chain.

[0090] Verify the model, divide the nodes into five roles according to the type of tasks processed, such as Figure 2 As shown, they can be task distributors (corresponding to the above-mentioned task distribution nodes), task solvers (corresponding to the above-mentioned task solution nodes), task verifiers (corresponding to the above-mentioned task verification nodes), task arbitrators (corresponding to the above-mentioned task arbitration nodes) and task jurors (corresponding to the above-mentioned task jury nodes).

[0091] 1) Task distributor: It is the edge blockchain client that initiates the computing task proposal. This node expects to use the computing power of other nodes to solve the computing task. The task distributor first stores the computing task in the off-chain storage layer, and submits the returned mapping address as the transaction content to the consensus in the edge blockchain to realize task information sharing.

[0092] 2) Task solvers and task verifiers: Task solvers and task verifiers obtain the model and training data according to the mapping address, then perform model training locally, store the training results in the off-chain storage layer, and submit the returned mapping address and the summary of each round of training results to all network nodes, including the task arbitrator, waiting for arbitration.

[0093] 3) Task arbitrator: The task arbitrator receives the mapping address and task summary returned by the task solver and task verifier. It first compares the task summary to locate the checkpoint (breakpoint), and then executes an epoch (training round) from the checkpoint to determine the obtained result. The worst case is that the task solver and task verifier are all malicious nodes and submit different randomly generated task summaries. At this time, the checkpoint is 0, the arbitrator only executes the result of epoch=1, and the task distributor only harvests the result of one epoch.

[0094] 4) Task juror: The task juror receives the mapping address and task summary returned by the task solver and task verifier, and receives the checkpoint and corresponding results from the task arbitrator, and quickly verifies the checkpoint by comparing the task summary.

[0095] The verifiable model training mechanism can include the following steps:

[0096] S1: Initialization: The verifiable computing layer needs to interact with the blockchain edge layer, off-chain storage layer, and physical network layer.

[0097] Therefore, G i (Publisher),S j (Solver),V k (verifier),H m (Arbitrator), Jn (Juror) selects security parameters as input and outputs a public-private key pair (sk b ,pk b ) is used for the blockchain edge layer, (sk s ,pk s ) for verifiable computing networks, (sk v ,pk v ) is used for the off-chain storage layer, where sk represents the public key, pk represents the private key, and the subscript represents the role (for example: publisher g, solver s, verifier v, etc.).

[0098] S2: Distribute computing tasks: G i The computing tasks to be solved are stored in the off-chain storage layer, and the address that uniquely maps the computing task is submitted to the verifiable computing layer to participate in the consensus in order to share the tasks to be solved.

[0099] Dataset D t The loss function can be expressed as:

[0100] F t (w) = f(h(w,x),y)

[0101] Among them, f(h(w,x),y) is the loss function of each epoch. Each edge model is based on w t (r-1) and D t Train locally t (r), as shown in the following formula:

[0102]

[0103] Among them, η represents the learning rate.

[0104] S3: Allocate computing tasks: S corresponding to the task j An edge node is selected sequentially through the polling algorithm, and the selected edge node performs model training. j The method is not random, resulting in S j can be predicted by other nodes. However, S j When solving the task, computing resources are consumed, and the result needs to go through a completely random V k Verification, when the verification results are inconsistent, H m Therefore, the bias introduced by the round-robin algorithm has no impact on the process, which ultimately aims to solve the computational task.

[0105] S j =E p (sequence, height)mod|S n |

[0106]

[0107] S4: Confirm the task arbitrator: G i When submitting a task to the blockchain network consensus, the master node generated by the consensus algorithm is H m .H m For S j and V k The result has a veto power, so H m It needs to be elected through a consensus mechanism to prevent cheating. m is the master node; in Satoshi-like algorithms, H m A miner who has the right to record accounts. In this example, the accounting node generated by the consensus algorithm is used as the task arbitrator of this task.

[0108]

[0109] S5: Determine the task verifier: The verifiable computing layer selects other edge training nodes as V according to the verifiable random function kOnly when the generated random number is less than the threshold value preset by the verifiable computing layer, the node can be used as a verifier. The preset threshold value can be calculated based on H m The private key is generated and then m Verify the accuracy of the results. However, there may be three situations in the process of selecting a verifier: 1) Only one edge node’s random number is less than the threshold, in which case the node is the verifier; 2) No edge node’s random number is less than the threshold, in which case the network will select an edge node as the verifier through a polling algorithm; 3) When the random numbers of multiple edge nodes are less than the threshold, the first edge node that sends the verification result to the arbitrator becomes the verifier of the task.

[0110] In the process of determining the task validator, since the edge node generates a random number locally, other nodes cannot know the validator of the current round unless they make the random number public themselves, thereby improving the randomness of the election.

[0111]

[0112] S6: Mission Verification: V k Obtain the address mapping model and data from the off-chain storage layer, execute the task locally, save the summary of the task results for each epoch, broadcast it to other nodes, and wait for H m and J n Verify. All contents in the computing task are the same, including: input_set, loss_reduce, output_set, seed, param_set, etc. In general, as long as S j and V k It is not a malicious node, the results of both are the same, which may lead to V k No motivation for S j To encourage V k The enthusiasm of S j You can add an Easter Egg (w egg ), let V k There is an incentive to find illegal nodes in the network. j Generate a random summary at the summary of the last round result, as long as V k and S j Normally execute computing tasks, V k With S j All results except the last round are the same, and they can get corresponding incentives.

[0113]

[0114] S7: Task Arbitration: Hm The following three operations need to be performed: First, if there are multiple V k , then H m Determine the first sent result and pass the verifiable random function V k For effective V k ; Secondly, if there is no V in the verifiable computing layer k Since the nodes in the verifiable computing layer are in a distributed environment and use different timestamp servers, the local clocks of the nodes are different. Therefore, a timeout that takes into account the network delay needs to be set so that H m Knowing that there is no V in the current slot k In this example, the method of first identifying and then executing training is adopted, that is, in the process of distributing tasks to the blockchain consensus, V k You can show your identity. If there is no V during timeout k , then H m Select V according to the polling algorithm k ; Finally, if V k With S j If the calculation results of H are inconsistent, m Execute the code of the epoch at the checkpoint to reduce the waste of verification resources. m The result of arbitration needs to be broadcast to other J in the network. n , by J n Verify the validity of the checkpoint. Since the behavior of checking the checkpoint is very simple, it only needs to compare the summary of the results under each epoch, without consuming a lot of resources. Therefore, this method can meet the principle of the design to meet the difficult problem of being verifiable in a simple way. m Send the arbitrated model parameters to the chain for centralized storage, and call back the optimized data mapping address to G i , this calculation task is completed.

[0115] According to the above work flow, J in the network n The possible benefits of skipping the model training verification mechanism based on verifiable random functions are:

[0116] Adv(p)=T p -T d

[0117] Among them, T d is the cost of violating the consensus protocol, T d It can be a random value to submit, or the result of each upload is a constant. Based on this, the benefits that the node may obtain in each computing task are:

[0118]

[0119] Among them, p j Indicates the model training verification mechanism based on verifiable random functions that needs to be executed in each epoch of each computing task, which should satisfy:

[0120]

[0121] Among them, ∈ depends on the consensus algorithm adopted by the blockchain network, network status, etc.

[0122] Edge node incentive model:

[0123] Although malicious nodes can be detected through the above methods, in order to increase the enthusiasm of nodes to participate in network consensus, it is necessary to design an incentive model to reward good nodes and punish malicious nodes.

[0124] G i We hope to use the resources of edge nodes to solve computing tasks, but there are also G i Malicious consumption of edge node resources, therefore, G i The right to publish tasks is restricted. Therefore, in this example, the task distributor needs to consume certain resources to publish tasks. i First, the task is published, and the nodes willing to receive the computing task form the verifiable computing layer of the task and execute the computing task.

[0125] In this example, a checkpoint-based edge node reputation incentive model is used. For example, after 100 rounds of training, if A and B have different results in the 51st round, then the checkpoint is 50 and the epoch is 100. Since it is assumed in this example that malicious nodes cannot communicate with each other, it is difficult for the random results they generate to be completely consistent. Therefore, it is reasonable to use checkpoints to measure the contribution of nodes. i ,S j ,V k You can stake 2s, s, and s respectively to participate in the contribution. The incentive model is based on As the watershed, when the checkpoint exceeds The node is considered worthy of reward. j or V k The same, the node can get s, the reward amount of another node is given according to the ratio of checkpoint to epoch, G i The amount of pledged is used as reward S j and V kThe fund pool; when the checkpoint does not exceed The node is not considered worthy of reward, and the checkpoint and S j or V k Similarly, the reward amount of this node is given according to the ratio of checkpoint to epoch. The reward of another node is 0 and the staked s is confiscated and compensated to G i .H m The incentive of adding s to the overall incentive model is R h =s. Specifically, the reward can be determined according to the following formula:

[0126]

[0127] Among them, Rs represents the reward obtained by the task solver, e represents epoch, c represents checkpoint, w and b represent training results, subscripts represent roles, ∨ represents union, and ∧ represents intersection.

[0128]

[0129]

[0130] In the above example, in order to solve the problem of third-party malicious nodes submitting erroneous results and low verification efficiency caused by outsourced computing tasks of edge devices, a decentralized model training and verification method based on blockchain is proposed. Data transmission is realized through the interaction of blockchain layer, physical network layer, verifiable computing layer and off-chain storage layer. An efficient model training and verification mechanism based on verifiable random functions is proposed to identify malicious nodes and solve the problem of low verification efficiency. Finally, an incentive model is proposed to increase the enthusiasm of edge nodes to participate in computing.

[0131] The embodiments of the present application also provide a specific implementation of an electronic device that can implement all the steps in the decentralized edge model training and verification method in the above embodiments, and the electronic device specifically includes the following contents: a processor, a memory, a communication interface, and a bus; wherein the processor, the memory, and the communication interface communicate with each other through the bus; the processor is used to call the computer program in the memory, and when the processor executes the computer program, all the steps in the decentralized edge model training and verification method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0132] Step 1: The verification computing layer responds to the task request issued by the task distribution node, selects a task solution node, executes the computing task through the selected task solution node, and obtains a first training result;

[0133] Step 2: Execute the computing task through a randomly selected task verification node to obtain a second training result;

[0134] Step 3: Submitting the first training result and the second training result to the task arbitration node;

[0135] Step 4: The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result.

[0136] From the above description, it can be seen that the embodiment of the present application introduces a verifiable computing layer composed of edge nodes with computing and verification capabilities to verify the accuracy of task results, thereby solving the existing problem of being unable to effectively verify the results of edge computing outsourcing, achieving efficient flow of data in the edge network, and achieving the technical effect of simply and efficiently verifying the validity of edge data.

[0137] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the decentralized edge model training and verification method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the decentralized edge model training and verification method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0138] Step 1: The verification computing layer responds to the task request issued by the task distribution node, selects a task solution node, executes the computing task through the selected task solution node, and obtains a first training result;

[0139] Step 2: Execute the computing task through a randomly selected task verification node to obtain a second training result;

[0140] Step 3: Submitting the first training result and the second training result to the task arbitration node;

[0141] Step 4: The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result.

[0142] From the above description, it can be seen that the embodiment of the present application introduces a verifiable computing layer composed of edge nodes with computing and verification capabilities to verify the accuracy of task results, thereby solving the existing problem of being unable to effectively verify the results of edge computing outsourcing, achieving efficient flow of data in the edge network, and achieving the technical effect of simply and efficiently verifying the validity of edge data.

[0143] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0145] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0146] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0147] Although the present specification embodiment provides the method operation steps as described in the embodiment or flow chart, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way in the order of execution of many steps, and does not represent a unique execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel (such as a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment) according to the method shown in the embodiment or the accompanying drawings. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements.

[0148] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0149] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0151] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0153] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0154] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0155] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0156] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0157] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0158] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0159] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.

Claims

1. A data interaction system, characterized in that: include: The physical network layer, which is composed of edge devices of data producers, is used to collect and store data produced by edge devices and upload the data to the off-chain storage layer; The off-chain storage layer, which is composed of nodes with storage resources, is used to receive data from the physical network layer, generate data summaries based on the received data, and upload the data summaries to the blockchain edge layer; The blockchain edge layer consists of a blockchain network composed of edge nodes for data sharing; The verifiable computing layer, located above the blockchain edge layer, is composed of edge nodes with computing and verification capabilities, and is used to verify the accuracy of task results; Wherein, the verifiable computing layer includes: The task distribution node is composed of the client that initiates the computing task, and is used to initiate the computing task, store the computing task in the off-chain storage layer, and share the mapping address; A task solving node, composed of an edge device, is used to obtain a model to be trained and training data according to a mapping address, and solve the computing task by performing model training to obtain a first training result; A task verification node, composed of an edge device, is used to obtain a model to be trained and training data according to a mapping address, and execute the computing task through model training to obtain a second training result; A task arbitration node is used to perform result arbitration based on the first training result and the second training result; wherein the first training result and the second training result both include a mapping address and a task summary, and the task summary is used to locate a breakpoint, so that the task arbitration node can determine the obtained result by executing a training round.

2. The system according to claim 1, characterized in that The verifiable computing layer also includes: The task jury node is used to receive the first training result, the second training result, receive the intermediate data returned by the task arbitration node, and verify the intermediate data according to the first training result and the second training result.

3. A decentralized edge model training and verification method for a data interaction system according to any one of claims 1 to 2, characterized in that: include: The verification computing layer selects a task solving node in response to a task request issued by the task distribution node, and executes the computing task through the selected task solving node to obtain a first training result; Execute the computing task through a randomly selected task verification node to obtain a second training result; Submitting the first training result and the second training result to a task arbitration node; The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result.

4. The method according to claim 3, characterized in that The task request carries: the data source of the task, the calculation method of the task, and the settlement result required for the task.

5. The method according to claim 3, characterized in that: The computing task is executed by the selected task solving node to obtain the first training result, including: The task solving node obtains the model to be trained and the training data according to the mapping address; The task solving node performs model training locally to generate a first training result; The first training result is stored in the off-chain storage layer, and the mapping address and the summary of each round of training results are submitted to all nodes of the verification computing layer.

6. The method according to claim 3, characterized in that The task arbitration node compares the first training result with the second training result to determine the accuracy of the first training result, including: The task arbitration node compares the first training result with the second training result round by round to determine a termination round with the same training results; The determined termination round is used as the breakpoint; Get the expected number of training rounds; The accuracy of the first training result is determined according to the breakpoint and the expected training rounds.

7. The method according to claim 6, characterized in that After the determined termination round is taken as the breakpoint, it also includes: Sending the termination round as an intermediate result to the task jury node; The task jury node verifies the intermediate data according to the first training result and the second training result.

8. The method according to claim 3, characterized in that The task solving node performs model training locally, and generates a first training result including: The task solving node performs training according to the training rounds in the task request; An incentive resource is added to the training result generated at the end of the last training round, wherein the incentive resource is used to transfer to the task verification node when the second training result differs from the first training result only in the result of the last training round.

9. The method according to claim 3, characterized in that: Also includes: The task distribution node pledges two resource amounts, the task solution node pledges one resource amount, and the task verification node pledges one resource amount; Using the first training result and the second training result, determine the termination round with the same result as the breakpoint; The cutoff point is half of the expected training rounds; According to the proportional relationship between the breakpoint and the demarcation point, resources are allocated to the task solving node and the task verifying node.

10. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions, when executed, implement the steps of the method according to any one of claims 3 to 9.

Citation Information

Patent Citations

  • An Internet of Things authentication method and device based on a block chain

    CN109714173A

  • Artificial intelligence training method and device based on block chain and storage medium

    CN111858752A