A data processing method, device, and computer-readable storage medium
By filtering and aggregating sub-model parameters provided by user nodes in an edge computing environment, generating and broadcasting the central model parameters, the training sample acquisition problem is solved, and decision-making accuracy and security is improved. It is suitable for task offload decisions in an edge computing environment.
Patent Information
- Application Number
- CN202110527921.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-14
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-05-14
AI Technical Summary
When determining target computing resources in an edge computing environment, the problem of training neural network models requires a large number of training samples, which leads to high time cost and difficulty in obtaining user privacy data, which affects decision-making accuracy.
By obtaining the sub-model parameters provided by multiple user nodes, performing model decision quality evaluation, filtering out the target sub-model parameters that meet the consensus conditions, performing aggregation processing to generate central model parameters, and broadcasting them to user nodes through blockchain consensus to ensure the legitimacy and security of the model decision model.
It improves the generation speed and decision accuracy of task decision model, reduces the need for training samples, and enhances the security and stability of data processing.
Smart Images

Figure CN115348022B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a data processing method, device, and computer-readable storage medium. Background Art
[0002] In recent years, the popularization of various Internet of Things (IoT) devices has brought great convenience to people's lives. However, due to the limited computing power of mobile devices, for computationally intensive programs such as face recognition and augmented reality, their processing speed often fails to meet the daily needs of users. To prevent mobile devices from generating high latency and high power consumption due to running a large number of computations, mobile devices often need to rely on cloud servers to assist in calculations during daily operations. For example, local tasks are offloaded to cloud servers for execution, thereby reducing waiting time and extending battery life.
[0003] Compared with traditional cloud computing, edge computing in the edge environment is a new type of computing paradigm that utilizes computing resources near IoT devices (including edge servers and cloud servers) to provide services to users in a timely manner. In the edge environment, the first step in implementing task offloading is to determine the target computing resources, that is, the computing resources that run the tasks offloaded by mobile devices.
[0004] The current task offloading decision-making scheme for determining target computing resources can be an intelligent task offloading decision algorithm based on deep learning. Such algorithms can facilitate the generation of task offloading decisions, but they require training a neural network model. To ensure the decision-making accuracy of the neural network model, it is necessary to provide training samples with good enough quality and sufficient quantity during the training phase. However, training the neural network model based on a large number of training samples will have the problem of a long training time, that is, there is a defect of high time cost. In addition, the training samples of the task offloading decision-making scheme are usually obtained from the user side, and the behavioral data on the user side often involves user privacy issues, which makes it difficult to obtain a sufficient number of training samples, thereby making it impossible to ensure the decision-making accuracy of the neural network model. Summary of the Invention
[0005] The embodiments of this application provide a data processing method, device, and computer-readable storage medium, which can not only save the time cost of data processing but also improve the decision-making accuracy of the task decision model.
[0006] On the one hand, the embodiments of this application provide a data processing method, including:
[0007] Obtain N target information chains; N is a positive integer; each of the N target information chains includes sub-model parameters; the N sub-model parameters are respectively provided by N user nodes;
[0008] Perform model decision quality assessment on the N sub-model parameters respectively, and determine the sub-model parameters whose quality assessment results meet the model consensus conditions as the target sub-model parameters; the total number of the target sub-model parameters is less than or equal to N;
[0009] Perform aggregation processing on the target sub-model parameters to obtain central model parameters, and perform model decision quality assessment on the central model parameters to obtain the target quality assessment result;
[0010] Generate a target block according to the central model parameters and the target quality assessment result. When the target block passes the blockchain consensus, broadcast the target block to N user nodes respectively, so that each user node verifies the legitimacy of the target block according to the target quality assessment result respectively. When the result of the legitimacy verification indicates that the target block is a legal block, obtain a task decision model including the central model parameters; the task decision model is used to decide the nodes for executing tasks.
[0011] On the one hand, an embodiment of the present application provides a data processing device, including:
[0012] A first acquisition module, configured to acquire N target information chains; N is a positive integer; each of the N target information chains includes sub-model parameters; the N sub-model parameters are respectively provided by N user nodes;
[0013] A first evaluation module, configured to perform model decision quality assessment on the N sub-model parameters respectively, and determine the sub-model parameters whose quality assessment results meet the model consensus conditions as the target sub-model parameters; the total number of the target sub-model parameters is less than or equal to N;
[0014] A second evaluation module, configured to perform aggregation processing on the target sub-model parameters to obtain central model parameters, and perform model decision quality assessment on the central model parameters to obtain the target quality assessment result;
[0015] A block generation module, configured to generate a target block according to the central model parameters and the target quality assessment result. When the target block passes the blockchain consensus, broadcast the target block to N user nodes respectively, so that each user node verifies the legitimacy of the target block according to the target quality assessment result respectively. When the result of the legitimacy verification indicates that the target block is a legal block, obtain a task decision model including the central model parameters; the task decision model is used to decide the nodes for executing tasks.
[0016] Among them, the N sub-model parameters include sub-model parameter D i , where i is a positive integer and i is less than or equal to N;
[0017] The first evaluation module includes:
[0018] A first acquisition unit, configured to acquire a simulation task, and acquire the one including sub-model parameter Di Task decision sub-model M i ;
[0019] The second acquisition unit is used to input the simulation task into the task decision sub-model M i and obtain the task decision node for the simulation task output by the task decision sub-model M i ;
[0020] The third acquisition unit is used to obtain the task decision loss and obtain the task environment information according to the task decision node and the simulation task;
[0021] The evaluation model unit is used to evaluate the model decision quality of the sub-model parameter D i according to the task decision loss and the task environment information, and obtain the quality evaluation result corresponding to the sub-model parameter D i ;
[0022] Among them, the task decision loss includes the task decision delay loss and the task decision energy consumption loss; the task environment information includes the task information and the environment information; the task information is the basic information of the simulation task; the environment information is used to represent the basic information of the task decision node;
[0023] The evaluation model unit includes:
[0024] The first processing sub-unit is used to perform normalization processing on the task decision delay loss to obtain the unitized task decision delay loss;
[0025] The first processing sub-unit is also used to perform normalization processing on the task decision energy consumption loss to obtain the unitized task decision energy consumption loss;
[0026] The second processing sub-unit is used to perform weighted summation processing on the unitized task decision delay loss and the unitized task decision energy consumption loss to obtain the unitized task decision loss;
[0027] The third processing sub-unit is used to perform normalization processing on the task information to obtain the unitized task information;
[0028] The third processing sub-unit is also used to perform normalization processing on the environment information to obtain the unitized environment information;
[0029] The fourth processing sub-unit is used to perform summation processing on the unitized task information and the unitized environment information to obtain the unitized task environment information;
[0030] The first evaluation sub-unit is used to evaluate the model decision quality of the sub-model parameter D i according to the unitized task decision loss and the unitized task environment information.
[0031] Among them, the data processing device further includes:
[0032] The first evaluation module is further configured to obtain N quality evaluation results, compare the N quality evaluation results with the quality evaluation result threshold respectively, and obtain N comparison results; the N comparison results include comparison result G j , where j is a positive integer and j is less than or equal to N; comparison result G j includes a first comparison result or a second comparison result; the first comparison result is used to represent that the quality evaluation result corresponding to comparison result G j is less than the quality evaluation result threshold; the second comparison result is used to represent that the quality evaluation result corresponding to comparison result G j is equal to or greater than the quality evaluation result threshold;
[0033] The first determination module is configured to, if comparison result G j is the second comparison result, determine that the quality evaluation result corresponding to comparison result G j meets the model consensus condition;
[0034] The first determination module is further configured to, if comparison result G j is the first comparison result, determine that the quality evaluation result corresponding to comparison result G j does not meet the model consensus condition, and delete the sub-model parameters whose quality evaluation results do not meet the model consensus condition.
[0035] Among them, the target sub-model parameters include A target sub-model parameters, where A is a positive integer and A is less than or equal to N;
[0036] The second evaluation module includes:
[0037] The first summation unit is configured to obtain the sub-number of training samples corresponding to each of the A target sub-model parameters, sum the A sub-numbers of training samples, and obtain the total number of training samples; the A target sub-model parameters include target sub-model parameter Z t , and the A sub-numbers of training samples include the sub-number of training samples Y t corresponding to target sub-model parameter Z t ; t is a positive integer and t is less than or equal to A;
[0038] The fourth acquisition unit is configured to acquire the operator result of target sub-model parameter Z t and the sub-number of training samples Y t ;
[0039] The second summation unit is configured to sum the operator results corresponding to each of the A target sub-model parameters to obtain the total operation result, and determine the central model parameter according to the total operation result and the total number of training samples.
[0040] Among them, the block generation module includes:
[0041] The first generation unit is used to obtain the iteration number corresponding to the central model parameters, and generate a target block according to the iteration number, the central model parameters, and the target quality evaluation result;
[0042] The second generation unit is used to obtain the first digital digest of the target block, encrypt the first digital digest according to the private key, and obtain the first digital signature;
[0043] The second generation unit is also used to add the first digital signature to the target block; the first digital signature is used to indicate that N user nodes perform a source legality verification on the target block.
[0044] Among them, the data processing device further includes:
[0045] The first acquisition module is also used to acquire C information chains to be verified; C is a positive integer and C is greater than or equal to N; each of the C information chains to be verified includes sub-model parameters; the C sub-model parameters are respectively provided by C user nodes; the N user nodes belong to the C user nodes; the N sub-model parameters belong to the C sub-model parameters;
[0046] The second determination module is used to verify each of the C information chains to be verified, and determine the information chain to be verified that meets the quality evaluation conditions as the target information chain.
[0047] Among them, each of the C information chains to be verified includes an iteration number to be verified;
[0048] The second determination module includes:
[0049] The first verification unit is used to verify each of the C information chains to be verified according to the C iteration numbers to be verified, and add the information chain to be verified whose iteration number to be verified is equal to the legal iteration number to the set of information chains to be verified; the total number of information chains to be verified in the set of information chains to be verified is less than or equal to C, and the total number of information chains to be verified in the set of information chains to be verified is equal to or greater than N; the information chains to be verified in the set of information chains to be verified also include a second digital signature;
[0050] The second verification unit is used to verify the information chains to be verified in the set of information chains to be verified according to the second digital signature, and determine the information chain to be verified that meets the quality evaluation conditions as the target information chain.
[0051] Among them, the set of information chains to be verified includes the information chain to be verified F x , x is a positive integer, and x is less than or equal to the total number of information chains to be verified in the set of information chains to be verified; the second digital signature includes the information chain to be verified F xThe second digital signature J in x ;
[0052] The second verification unit includes:
[0053] The first acquisition subunit is used to decrypt the second digital signature J according to the public key associated with the information chain F to be verified x and obtain the second digital digest; x
[0054] The second acquisition subunit is used to obtain the data to be verified in the information chain F to be verified; the data to be verified includes the legal iteration times and the sub-model parameters of the information chain F to be verified x x ;
[0055] The second acquisition subunit is further used to obtain the third digital digest of the data to be verified, and compare the second digital digest with the third digital digest;
[0056] The first determination subunit is used to determine that the verification result of the information chain F to be verified meets the quality assessment condition if the second digital digest is the same as the third digital digest; x
[0057] The second determination subunit is used to determine that the verification result of the information chain F to be verified does not meet the quality assessment condition if the second digital digest is different from the third digital digest, and delete the information chain to be verified whose verification result does not meet the quality assessment condition. x
[0058] Among them, the block generation module includes:
[0059] The first broadcast unit is used to broadcast the target block in the blockchain consensus network, so that the central node in the blockchain consensus network conducts consensus on the target block according to the central model parameters and the target quality assessment result;
[0060] The second broadcast unit is used to broadcast the target block to the nodes in the blockchain network when the target block passes the blockchain consensus and the block to be consensus broadcast by the central node has not passed the blockchain consensus; the blockchain network includes the blockchain consensus network; the nodes in the blockchain network include N user nodes and the central node; the central node is used to delete the block to be consensus and conduct bookkeeping processing on the target block when the target block passes the blockchain consensus.
[0061] Among them, the block generation module further includes:
[0062] The fifth acquisition unit is used to obtain the first quality assessment result in the block to be consensus when the target block passes the blockchain consensus and the block to be consensus passes the blockchain consensus;
[0063] The fifth acquisition unit is further configured to compare the first quality assessment result with the target quality assessment result;
[0064] The second broadcast unit is further configured to, if the first quality assessment result is greater than the target quality assessment result, determine the block to be consensus as the block to be chained, perform accounting processing on the block to be chained, delete the target block, and broadcast the block to be chained to the nodes in the blockchain network respectively;
[0065] The second broadcast unit is further configured to, if the first quality assessment result is equal to or less than the target quality assessment result, broadcast the target block to the nodes in the blockchain network respectively.
[0066] Among them, the block generation module further includes:
[0067] The sixth acquisition unit is configured to perform blockchain consensus on the block to be consensus when the target block fails blockchain consensus and the block to be consensus broadcast by the central node is acquired; the block to be consensus is generated by the central node according to H sub-model parameters, and the H sub-model parameters are different from the N sub-model parameters; the H sub-model parameters are provided by H user nodes respectively, the H user nodes communicate with the central node, and the H user nodes are different from the N user nodes; H is a positive integer;
[0068] The second broadcast unit is further configured to, if the target block still fails blockchain consensus when the block to be consensus passes blockchain consensus, determine the block to be consensus as the block to be chained, perform accounting processing on the block to be chained, delete the target block, and broadcast the block to be chained to the nodes in the blockchain network respectively.
[0069] Among them, the sixth acquisition unit includes:
[0070] The third acquisition subunit is configured to acquire the to-be-consensus central model parameters and the first quality assessment result in the block to be consensus;
[0071] The second evaluation subunit is configured to perform model decision quality assessment on the to-be-consensus central model parameters to obtain a second quality assessment result;
[0072] The third determination subunit is configured to determine the difference between the first quality assessment result and the second quality assessment result, and compare the difference with the difference threshold;
[0073] The third determination subunit is further configured to, if the difference is less than or equal to the difference threshold, the consensus result for the block to be consensus is consensus passed;
[0074] The third determination subunit is further configured to, if the difference is greater than the difference threshold, the consensus result for the block to be consensus is consensus failed.
[0075] On the one hand, the present application provides a computer device, including: a processor, a memory, and a network interface;
[0076] The above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface. Among them, the above-mentioned network interface is used to provide data communication functions, the above-mentioned memory is used to store computer programs, and the above-mentioned processor is used to call the above-mentioned computer programs so that the computer device executes the method in the embodiment of the present application.
[0077] On the one hand, the embodiment of the present application provides a computer-readable storage medium. A computer program is stored in the above-mentioned computer-readable storage medium, and the above-mentioned computer program is suitable for being loaded and executed by a processor to execute the method in the embodiment of the present application.
[0078] On the one hand, the embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the embodiment of the present application.
[0079] In the embodiment of the present application, the sub-model parameters respectively provided by N user nodes are regarded as N transactions. For the task offloading decision scenario, the consensus process is designed to perform model decision quality evaluation on the N sub-model parameters respectively, that is, to evaluate the task offloading decision levels corresponding to the N sub-model parameters respectively; further, the sub-model parameters whose quality evaluation results meet the model consensus conditions are determined as target sub-model parameters, which is equivalent to retaining the sub-model parameters with high task offloading decision levels and eliminating the sub-model parameters with low task offloading decision levels; further, the target sub-model parameters respectively provided by different user nodes are aggregated to obtain the central model parameters. Since the task offloading decision levels corresponding to the target sub-model parameters are relatively high, the aggregated central model parameters not only include the characteristics of the target sub-model parameters, but also have high-level The task offloading capability is flat; further, the model decision quality evaluation is performed on the central model parameters to obtain the target quality evaluation result, and the target block is generated according to the central model parameters and the target quality evaluation result. When the target block passes the blockchain consensus, the target block is broadcast to N user nodes respectively, that is, the central model parameters are decentralized to the user nodes in the form of blocks, so that before each user node performs accounting processing on the target block, the legitimacy of the target block can be verified by the target quality evaluation result. When the result of the legitimacy verification indicates that the target block is a legal block, the user node obtains the task decision model including the central model parameters. Obviously, the task decision model generated by the present application can include model features corresponding to the sub-model parameters provided by different user nodes respectively, and has a high level of task offloading decision-making level. To sum up, by having different user nodes provide sub-model parameters respectively (that is, sub-model parameters are trained in parallel by different user nodes), the generation speed of the task decision model can be accelerated, which can save the time cost of data processing. Moreover, the present application does not need to directly obtain the training samples in each user node, thereby avoiding the problem of difficulty in obtaining training samples. Multiple sub-model parameters come from the training samples, so the decision accuracy of the task decision model can be guaranteed. By screening the sub-model parameters and obtaining the target sub-model parameters, the decision accuracy of the task decision model is further improved. In addition, through the target block, the central model parameters can be prevented from being stolen and tampered with, thereby improving the security of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] 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 of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0081] Figure 1aIt is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0082] Figure 1b It is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0083] Figure 2a It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0084] Figure 2b It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0085] Figure 2c It is a schematic diagram of the architecture of a task decision model provided by an embodiment of the present application;
[0086] Figure 3 It is a flowchart of a data processing method provided by an embodiment of the present application;
[0087] Figure 4a It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0088] Figure 4b It is a flowchart of a data processing method provided by an embodiment of the present application;
[0089] Figure 5 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0090] Figure 6 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0091] Figure 7 It is a flowchart of a data processing method provided by an embodiment of the present application;
[0092] Figure 8 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0093] Figure 9 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0094] Figure 10 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0095] Figure 11 It is a schematic diagram of a data processing scenario provided by an embodiment of the present application;
[0096] Figure 13 It is a schematic diagram of the structure of a data processing device provided by an embodiment of the present application;
[0097] Figure 14It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0098] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0099] For ease of understanding, some terms are briefly explained as follows:
[0100] 1. Blockchain: Narrowly, a blockchain is a chain-like data structure with blocks as the basic unit. In a block, a digital digest is used to verify the transaction history obtained previously, which is suitable for the requirements of anti-tampering and scalability in a distributed ledger scenario; Broadly, a blockchain also refers to the distributed ledger technology implemented by the blockchain structure, including distributed consensus, privacy and security protection, peer-to-peer communication technology, network protocol, smart contract, etc. The goal of a blockchain is to implement a distributed data record ledger that only allows addition and does not allow deletion. The basic structure at the bottom of the ledger is a linear linked list. The linked list is composed of "blocks" connected in series. The hash value of the previous block is recorded in the subsequent block. Whether each block (and the transactions in the block) is legal can be quickly verified by calculating the hash value. If a node in the network proposes to add a new block, the consensus mechanism must reach a consensus on the block for confirmation.
[0101] 2. Block: It is a data packet carrying transaction data on a blockchain network and is a data structure marked with a timestamp and the hash value corresponding to the previous block. A block is verified by the consensus mechanism of the network and the transactions in the block are confirmed. A block includes a block header and a block body. The block header can record the meta-information of the current block, including the current version number, the hash value corresponding to the previous block, the timestamp, the random number, the hash value of the Merkle root, etc. The block body can record the detailed data generated within a period of time, including all the transaction records or other information verified in the current block and generated during the block creation process, which can be understood as a form of the ledger.
[0102] 2. Hash Value: Also known as a feature value or information feature value, a hash value is generated by converting input data of any length into a cipher through a hash algorithm and producing a fixed output. The original input data cannot be retrieved by decrypting the hash value, and it is a one-way encryption function. In a blockchain, each block (except the initial block) contains the hash value of the previous block, and the previous block is called the parent block of the current block. The hash value is a potential core foundation and the most important aspect in blockchain technology. It preserves the authenticity of recording and viewing data, as well as the integrity of the blockchain as a whole.
[0103] 3. Blockchain Node: The blockchain network classifies blockchain nodes into consensus nodes (which can also be called core nodes and full nodes), and synchronization nodes (which can include data nodes and light nodes). Among them, consensus nodes are responsible for the consensus operations of the entire blockchain network; synchronization nodes are responsible for synchronizing the ledger information of consensus nodes, that is, synchronizing the latest block data.
[0104] 4. Asymmetric Signature: This algorithm includes two keys, a public key (abbreviated as public key, public key) and a private key (abbreviated as private key, private key). The public key and the private key are a pair. If the data is signed with the private key, only the corresponding public key can be used to verify the signature. Because the signature process and the signature verification process use two different keys respectively, this algorithm is called asymmetric signature. The basic process of realizing confidential information exchange by asymmetric signature can be: Party A generates a pair of keys and makes the public key public. When Party A needs to send information to other parties (Party B), it uses its own private key to sign the confidential information and then sends it to Party B; Party B then uses Party A's public key to verify the signed information.
[0105] 5. Federated Machine Learning: Also known as federated learning, joint learning, and coalition learning. Federated machine learning is a machine learning framework that can effectively help multiple institutions use data and perform machine learning modeling while meeting the requirements of user privacy protection, data security, and government regulations. As a distributed machine learning paradigm, federated learning can effectively solve the data silo problem, enabling participating parties to jointly model without sharing data, and technically breaking the data silo, thereby protecting user privacy as much as possible.
[0106] 6. Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling machines to have the functions of perception, reasoning, and decision-making.
[0107] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0108] 7. Deep reinforcement learning combines the perception ability of deep learning and the decision-making ability of reinforcement learning, and can directly control according to the input data. It is an artificial intelligence method that is closer to the human thinking mode.
[0109] 8. Edge computing is a new type of computing paradigm that uses computing resources near Internet of Things devices to provide services in a timely manner. Edge systems are often connected to the Internet of Things, cloud centers, and complement traditional cloud computing. Edge computing can also be understood as a decentralized computing architecture. In this architecture, the operations of application programs, data, and services are moved from the network center node to the edge nodes logically on the network for processing. Or rather, edge computing decomposes the large services that were originally completely processed by the center node into smaller and more manageable parts and distributes them to the edge nodes for processing.
[0110] 9. Task offloading refers to the process of transferring the tasks of user terminals to edge servers or cloud servers closer to the user terminals in an edge environment that includes a cloud (cloud server), edge servers, and user terminals, in order to meet the user's requirements for performance, latency, and energy consumption.
[0111] The solution provided in the embodiments of this application combines technologies such as machine learning and deep learning in artificial intelligence and blockchain technology, and is specifically described through the following embodiments.
[0112] Please refer to Figure 1a , Figure 1a which is a schematic diagram of the system architecture provided in the embodiments of this application. As Figure 1aAs shown in the figure, the schematic diagram of the system architecture may include a cloud server cluster 10a, an edge server cluster 10b, and a user terminal cluster. Among them, the cloud server cluster 10a may include cloud servers 101a, …, 102a. It can be understood that the above cloud server cluster 10a may include one or more cloud servers, and the number of cloud servers will not be limited here. Among them, the edge server cluster 10b may include edge servers 101b, 102b, …, 103b. It can be understood that the above edge server cluster 10b may include one or more edge servers, and the number of edge servers will not be limited here. Among them, the user terminal cluster may include user terminals 101c, 102c, …, 103c. It can be understood that the above user terminal cluster may include one or more user terminals, and the number of user terminals will not be limited here.
[0113] Among them, there may be communication connections between the user terminal clusters. For example, there is a communication connection between user terminal 101c and user terminal 102c, and there is a communication connection between user terminal 102c and user terminal 103c. Any user terminal in the user terminal cluster may have a communication connection with any edge server in the edge server cluster 10b. For example, there is a communication connection between user terminal 101c and edge server 101b, there is a communication connection between user terminal 102c and edge server 102b, and there is a communication connection between user terminal 103c and edge server 102b. Any user terminal in the user terminal cluster may have a communication connection with any cloud server in the cloud server cluster 10a. For example, there is a communication connection between user terminal 101c and cloud server 101a, there is a communication connection between user terminal 102c and cloud server 101a, and there is a communication connection between user terminal 103c and cloud server 102a.
[0114] Among them, there may be communication connections between the edge server clusters. For example, there is a communication connection between edge server 101b and edge server 102b, and there is a communication connection between edge server 101b and edge server 103b. Any edge server in the edge server cluster 10b may have a communication connection with any cloud server in the cloud server cluster 10a. For example, there is a communication connection between edge server 101b and cloud server 101a, there is a communication connection between edge server 103b and cloud server 102a, and there is a communication connection between edge server 102b and cloud server 101a.
[0115] Among them, there may be communication connections between the cloud server clusters. For example, there is a communication connection between cloud server 101a and cloud server 102a.
[0116] It is understandable that the above communication connection is not limited to the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, or can also be connected through other connection methods, and the present application does not limit this here.
[0117] It should be noted that the cloud servers in the above cloud server cluster 10a (such as Figure 1a the exemplified cloud servers 101a,..., cloud servers 102a), the edge servers in the edge server cluster 10b (such as Figure 1b the exemplified edge servers 101b, edge servers 102b,..., edge servers 103b), and the user terminals in the user terminal cluster (such as Figure 1a the exemplified user terminals 101c, user terminals 102c,..., user terminals 103c) can all be blockchain nodes in the blockchain network. Please refer to Figure 1b together with Figure 1b which is a schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1a The system architecture in Figure 1b may include Figure 1b the blockchain network 10 in Figure 1a As shown in Figure 1b the edge servers in the edge server cluster 10b in Figure 1b and the user terminals in the user terminal cluster are used as light nodes, such as the exemplified edge servers 101b and edge servers 102b, and the user terminals 101c and user terminals 103c. The consensus network 10d can also be called the core network, and the nodes in the consensus network 10d can be called full nodes. The full nodes have full data. In the embodiments of the present application, the cloud servers in the cloud server cluster are used as full nodes, such as the exemplified cloud servers 101a, cloud servers 102a, cloud servers 103a, and cloud servers 104a. The synchronization network 10e and the consensus network 10d are in different network environments. Generally speaking, the synchronization network 10e is in a public network, while the consensus network 10d is in a private network, and the two interact through a routing boundary.
[0118] It can be understood that the above synchronization network 10e may include one or more light nodes, and the number of light nodes will not be limited here. The above consensus network 10d may include one or more full nodes, and the number of full nodes will not be limited here.
[0119] Each blockchain node (including the light nodes in the synchronization network 10e and the full nodes in the consensus network 10d) can receive data sent from the outside world during normal operation, perform block chain-on processing based on the received data, and can also send data to the outside world. To ensure data intercommunication between each blockchain node, there may be a data connection between each blockchain node, and this data connection can be implemented through the above communication connection function.
[0120] It can be understood that data or blocks can be transmitted between blockchain nodes through the above data connection. The data connection between blockchain nodes can be based on node identifiers. For each blockchain node in the blockchain network 10, there is a corresponding node identifier, and each of the above blockchain nodes can store the node identifiers of other blockchain nodes that are connected to itself, so as to broadcast the obtained data or generated blocks to other blockchain nodes according to the node identifiers of other blockchain nodes in the future. For example, the user terminal 101c (light node) can maintain a node identifier list, and this node identifier list stores the node names and node identifiers of other blockchain nodes. As shown in Table 1:
[0121] Table 1
[0122] Node Name Node ID Cloud Server 102a 117.114.151.174 Cloud Server 103a 117.116.189.145 … … Cloud Server 104a 119.123.789.258 Edge Server 101b 117.114.151.183 Edge Server 102b 117.116.189.125 User Terminal 103c 119.250.485.362 User Terminal 101c 119.123.789.369
[0123] Among them, the node identifier can be the Internet Protocol (IP) address for interconnection between networks and any other information that can be used to identify the blockchain nodes in the blockchain network 10. Table 1 only uses the IP address as an example for illustration.
[0124] The user terminal 101c can send a data processing request (which can include service offloading and data transmission) to the edge server 101b through the node identifier 117.114.151.183, and the edge server 101b can know that this data processing request is sent by the user terminal 101c through the node identifier 119.123.789.369; similarly, the user terminal 101c can send transaction data A to the cloud server 103a through the node identifier 117.116.189.145, and the cloud server 103a can know that this transaction data A is sent by the user terminal 101c through the node identifier 119.123.789.369. The communication connections between other blockchain nodes are the same, so they will not be elaborated one by one.
[0125] Among them, Figure 1b the cloud servers 101a, …, cloud servers 102a, cloud servers 103a, …, cloud servers 104a, edge servers 101b, edge servers 102b, user terminals 103c, …, user terminals 101c may include mobile phones, tablet computers, laptop computers, palmtop computers, smart speakers, mobile internet devices (MIDs), POS (Point Of Sales) machines, wearable devices (such as smart watches, smart bracelets, etc.).
[0126] It can be understood that the data processing method provided by the embodiments of the present application can be executed by a computer device, and the computer device includes but is not limited to full nodes (cloud servers) or light nodes (user terminals and edge servers). The above servers (including cloud servers and edge servers) can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, and can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The above user terminals can be smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc., but are not limited thereto. The user terminals and the servers (including cloud servers and edge servers) can be directly or indirectly connected through wired or wireless communication methods, and the present application does not make any restrictions here.
[0127] Further, please refer to Figure 2a , Figure 2a which is a schematic diagram of a data processing scenario provided by the embodiments of the present application. The embodiments of the present application train an initial task decision model through a distributed learning algorithm to obtain a trained task decision model (for making decisions on the computing resources required to offload tasks). Suppose 5 user terminals respectively train the initial task decision model locally according to local training data, as Figure 2aAs shown, the user terminal 101c uses 10 local training data to train the initial task decision model 201a locally, the user terminal 102c uses 15 local training data to train the initial task decision model 202a locally, the user terminal 103c uses 20 local training data to train the initial task decision model 203a locally, the user terminal 104c uses 15 local training data to train the initial task decision model 204a locally, and the user terminal 105c uses 20 local training data to train the initial task decision model 205a locally. It can be understood that since the training data corresponding to each user terminal is different, the model parameters in the same initial task decision model will be different. The above initial task decision model can represent an unconverged model or a model whose number of iterations is not equal to the preset number of iterations, that is, an untrained model.
[0128] Among them, the user terminal 101c, the user terminal 102c, the user terminal 103c, the user terminal 104c, and the user terminal 105c can be Figure 1a user terminals in the user terminal cluster in Figure 1b and can also be light nodes in the synchronization network 10e in
[0129] Each user terminal can preset the target number of iterations in advance. For example, the target number of iterations is equal to 50, 100, or 150. It can also preset a trigger mechanism. For example, the local sub-model parameters are obtained every 50 iterations. The embodiments of the present application do not limit the setting method for obtaining the sub-model parameters, which can be set according to the actual application scenario.
[0130] Please refer to Figure 2a, when the number of iterations is equal to 50, the user terminal 101c obtains the sub-model parameters of the initial task decision model 201a, and generates an information chain 201b according to the sub-model parameters of the initial task decision model 201a; when the number of iterations is equal to 50, the user terminal 102c obtains the sub-model parameters of the initial task decision model 202a, and generates an information chain 202b according to the sub-model parameters of the initial task decision model 202a; when the number of iterations is equal to 50, the user terminal 103c obtains the sub-model parameters of the initial task decision model 203a, and generates an information chain 203b according to the sub-model parameters of the initial task decision model 203a; when the number of iterations is equal to 50, the user terminal 104c obtains the sub-model parameters of the initial task decision model 204a, and generates an information chain 204b according to the sub-model parameters of the initial task decision model 204a; when the number of iterations is equal to 49, the user terminal 105c obtains the sub-model parameters of the initial task decision model 205a, and generates an information chain 205b according to the sub-model parameters of the initial task decision model 205a. It can be understood that the above sub-model parameters may include all the parameters in an initial task decision model.
[0131] In the embodiment of the present application, only the example that the user terminal 101c generates an information chain 201b including the sub-model parameters of the initial task decision model 201a is taken. The process of other user terminals generating local information chains can refer to the following description. The user terminal 101c can obtain a timestamp, which can represent the timestamp when the initial task decision model 201a iterates to 50 times, and can represent the timestamp for obtaining the sub-model parameters of the initial task decision model 201a. The meaning of the timestamp is not limited here and can be set according to the actual application scenario. The user terminal 101c can obtain the public key in its own public-private key pair. Using the hash algorithm, it can obtain the public key hash of its own public key. The public key hash, the sub-model parameters of the initial task decision model 201a, the number of iterations (i.e., 50 times), and the timestamp are determined as the data to be signed. It can be understood that the data to be signed may include the above data or other data, and can be set according to the actual application scenario. The embodiment of the present application does not limit this. The user terminal 101c obtains the digital digest of the data to be signed, encrypts the digital digest according to the private key in its own public-private key to obtain a digital signature; the user terminal 101c generates an information chain 201a according to the digital signature, the public key hash, the sub-model parameters of the initial task decision model 201a, the number of iterations (i.e., 50 times), and the timestamp.
[0132] The task offloading scenario in the present application can be applied in an edge environment. Therefore, the information chain transmitted when training the initial task decision model can be transmitted to the cloud server through the edge server in the edge environment. Please refer to Figure 2a, the user terminal 101c transmits the information chain 201b to the edge server 101b. After receiving the information chain 201b, the edge server 101b can verify the signature of the information chain 201b. First, it obtains the data to be verified carried in the information chain 201b, then obtains the digital digest corresponding to the data to be verified, decrypts the digital signature in the information chain 201b using the public key of the user terminal 101c to obtain the digital digest corresponding to the digital signature, and compares the digital digest corresponding to the digital signature with the digital digest corresponding to the data to be verified. If the two are the same, the signature verification passes. The passing of the signature verification can indicate that the information chain 201b has not been tampered with, and the data to be verified carried in the information chain 201b is equivalent to the data to be verified described above; if the two are different, the signature verification fails. The failure of the signature verification can indicate that the information chain 201b has been tampered with. At this time, the data to be verified carried in the information chain 201b is not equivalent to the data to be verified described above; the failure of the signature verification can also indicate that the user terminal transmitting the information chain 201b is not the user terminal 101c, that is, during the transmission of the information chain 201b by the user terminal 101c, it is stolen by an illegal node, and the illegal node uses its own private key to sign the data in the information chain 201b again.
[0133] If the signature verification fails, the edge server 101b discards the information chain 201b; if the signature verification passes, the edge server 101b uploads the information chain 201b to the cloud server, such as Figure 2a the cloud server 101a shown in the example. It can be understood that after the information chain is generated, it will be uploaded to the edge server or the cloud server. If it is uploaded to the edge server, in order to reduce communication consumption, it is generally sufficient to upload it to the edge server with the highest communication intensity once. When there is a network fluctuation and the cloud server cannot be connected, the edge server can transfer it to other edge servers, and the other edge servers still perform the signature verification process. After the signature verification passes, the information chain 201b is transferred to the cloud server.
[0134] Among them, the edge server 101b, the edge server 102b described below, and the edge server 103b can be Figure 1a the edge servers in the edge server cluster 10b in Figure 1b similarly, they can be the light nodes in the synchronization network 10e in Figure 1a The cloud server 101a can be Figure 1b the cloud servers in the cloud server cluster 10a in Figure 2a similarly, they can be the full nodes in the consensus network 10d in
[0135] Please refer to Figure 2a, the user terminal 102c transmits the information chain 202b to the cloud server 101a. After receiving the information chain 202b, the cloud server 101a verifies the signature of the information chain 202b; the user terminal 103c transmits the information chain 203b to the edge server 101b. After the signature verification by the edge server 101b is passed, due to network fluctuations, the edge server 101b cannot connect to the cloud server, so it is passed to the edge server 102b. After receiving the information chain 203b, the edge server 102b verifies the signature of the information chain 203b; the user terminal 104c transmits the information chain 204b to the edge server 102b. After receiving the information chain 204b, the edge server 102b verifies the signature of the information chain 204b; the user terminal 105c transmits the information chain 205b to the edge server 103b. After receiving the information chain 205b, the edge server 103b verifies the signature of the information chain 205b; for the signature verification processes involved above, please refer to the description of the signature verification process for the information chain 201b above, and details will not be repeated here.
[0136] Please refer to again Figure 2a , the signature verification result of the edge server 101b for the information chain 201b is that the signature verification is passed, and it is transmitted to the cloud server 101a; the signature verification result of the edge server 102b for the information chain 202b is that the signature verification is passed, and it is transmitted to the cloud server 101a; the signature verification result of the edge server 102b for the information chain 204b is that the signature verification fails, so the information chain 204b is deleted; among them, before executing the signature verification process, the edge server and the cloud server can also compare the iteration number in the information chain with the legal iteration number. For example, the edge server 103b compares the iteration number (i.e., 49) in the information chain 205b with the legal iteration number (i.e., 50). Obviously, the two are different. At this time, it can be determined that the information chain 205b is an illegal information chain, so the edge server 103b can directly discard the information chain 205b without verifying its signature, that is, delete it.
[0137] In summary, the cloud server 101a obtains three information chains to be verified, namely the information chain 201a provided by the user terminal 101c, the information chain 202a provided by the user terminal 102c, and the information chain 203a provided by the user terminal 103c. Subsequently, the cloud server 101a performs verification processing on the three information chains to be verified, determines the information chains to be verified whose verification results meet the quality assessment conditions as target information chains, then performs model decision quality assessment on the sub-model parameters in the target information chains, and the cloud server 101a determines the sub-model parameters whose quality assessment results meet the model consensus conditions as target sub-model parameters; performs aggregation processing on the target sub-model parameters to obtain central model parameters, performs model decision quality assessment on the central model parameters to obtain target quality assessment results; the cloud server 101a generates a target block according to the central model parameters and the target quality assessment results, and when the target block passes the blockchain consensus, broadcasts the target block to the blockchain nodes in the blockchain network (equivalent to Figure 1b the blockchain network 10 in Figure 2a ), and the blockchain nodes may include
[0138] the user terminals 101c, 102c, 103c, 104c, 105c, the edge servers 101b, 102b, and 103b as exemplified. Each blockchain node respectively performs legality verification on the target block according to the target quality assessment result, and when the result of the legality verification indicates that the target block is a legal block, obtains a task decision model containing the central model parameters. It can be understood that when the task decision model has not converged or the current number of iterations has not reached the maximum number of iterations, the task decision model can be the task decision model trained by each user terminal next; in addition, when the task decision model has converged or the current number of iterations has reached the maximum number of iterations, the task decision model can represent the trained task decision model. At this time, each user terminal can make a decision on the target computing resources for task offloading according to the task decision model, such as an edge server or a cloud server. Figure 3 and Figure 7 the descriptions in the corresponding embodiments respectively. The description is not elaborated here for the time being.
[0139] The scenario to which this application applies can be an edge computing environment with user terminals (such as intelligent devices like Internet of Things devices, mobile phones, drone swarms, driverless vehicles, etc.), edge nodes (such as base stations, edge servers close to user terminals, etc.), and cloud nodes (such as large servers, cloud centers, etc.). In this environment, the computing tasks generated by user terminals are offloaded to edge nodes or cloud nodes to relieve the computing pressure on user terminals. This application is applicable to various application environments that can embed edge computing, such as intelligent Internet of Things, drone swarms, and driverless driving.
[0140] Different from existing edge offloading solutions, in the embodiments of this application, the task offloading decision algorithm is placed in the user terminal to enhance the anti-network-fluctuation ability of the task decision model, distributed algorithms such as federated learning are introduced to increase the training speed of the model, and blockchain is introduced as the information transfer format to improve the security and efficiency of information transmission. Please also refer to Figure 2b , Figure 2b FIG. is a schematic diagram of a data processing scenario provided by an embodiment of this application. As Figure 2b shown, the user terminal 101c locally obtains the trained task decision model 20d. When the user terminal 101c obtains the task 20e and the computing amount of the task 20e is large, if the user terminal 101c executes the task 20e locally, high latency and high power consumption will occur. At this time, the user terminal 101c can use the task decision model 20d to decide the target server for executing the task 20e in the edge environment 20f. As Figure 2b shown, the edge environment 20f may include edge servers 101b, 102b,..., cloud servers 101a, and cloud servers 102a.
[0141] Please refer to Figure 2b again. According to the task decision model 20d, the user terminal 101c determines that the target server is the cloud server 101a. Therefore, the user terminal 101c can offload the task 20e to the cloud server 101a, that is, the cloud server 101a executes the task 20e.
[0142] To improve the anti-network-fluctuation ability of the task decision model, in the embodiments of this application, the task offloading decision algorithm of the model is placed in the user terminal, which can prevent the situation that the offloading decision server (i.e., the server installed with the task offloading decision algorithm) cannot be connected due to a sudden network disconnection. The task decision model in this application adopts the deep reinforcement learning algorithm. Among them, the deep reinforcement learning algorithm is a reinforcement learning algorithm based on the value function that uses a deep neural network. Please also refer to Figure 2c , Figure 2c FIG. is a schematic diagram of the architecture of a task decision model provided by an embodiment of this application. As Figure 2cAs shown, the architecture first views the task as a Markov process, regarding the network model, latency model, energy consumption model, and economic model in the actual situation as the states in the task decision model. Then, it constructs the reward function and offloading actions in reinforcement learning, and performs reinforcement learning iterations on the weight parameters through the optimization objective to learn the optimal offloading scheme for the user's computing tasks in different environments. Figure 2c It presents an improved deep reinforcement learning algorithm - the deep parallel task decision model learning algorithm. To enhance the training speed of the model and the effectiveness of the decision-making results, this algorithm searches for the optimal reward function and offloading actions by paralleling several neural networks with the same structure but different parameters (i.e., the task decision model), thereby improving the decision-making ability of the overall model.
[0143] The update and iteration method of the task offloading decision algorithm (which can be understood as the task decision model) adopts the reinforcement learning algorithm of off-policy temporal difference learning. In reinforcement learning, the estimation method of the value function is formula (1):
[0144] Q(s,a)←Q(s,a)+α(r+γmax a′ Q(s′,a′)-Q(s,a)) (1)
[0145] It is equivalent to directly letting Q(s,a) estimate the optimal state value function Q * (s,a), and Q * (s,a) is equivalent to Q(s,a) on the left side of formula (1).
[0146] Among them, s represents the current state, a represents the current action, s′ represents the next state, which can also be understood as the updated state, a′ represents the next action, which can also be understood as the updated action, r represents the reward, γ represents the weight parameter, and Q(s,a) represents the value function.
[0147] The following briefly introduces Figure 2c the process in Figure 2c The task flow in Figure 2a is equivalent to the workflow. When contact 1 touches the first and second contacts on the left side (i.e., the two upper contacts), the task flow can represent test data. At this time, contact 2 touches the test contact; when contact 1 touches the two lower contacts on the left side (i.e., the second and third contacts), the task flow can represent training data. At this time, contact 2 touches the training contact. The process of the user terminal training x task decision models is the same as the process of the user terminal 101c training the task decision model 201a in Figure 2cThe exemplified task decision models 1, 2, ..., x can obtain x decision results, such as Figure 2c the exemplified decision results 1, 2, …, x, and the user terminal can determine the optimal decision result from the x decision results. Among them, the task flow can be regarded as the current state in deep reinforcement learning, and the next state (i.e., the new state) can be generated according to the decision result.
[0148] It can be understood that the task decision model can be any kind of deep neural network model, and the embodiments of the present application do not limit the task decision model. It can be understood that the distributed learning algorithm in the embodiments of the present application can be a federated learning algorithm.
[0149] Comprehensively Figure 2a - Figure 2c , the present application mainly constructs a new intelligent task offloading framework to cope with task offloading decisions in the edge environment. For the task offloading decision algorithm, the present application adopts an intelligent algorithm based on deep reinforcement learning. Different from other intelligent algorithms, the biggest innovation of the present application is to introduce blockchain and federated learning to improve the security and efficiency in the training and transmission processes of the task offloading decision algorithm (equivalent to the task decision model described above). The parameters in federated learning (such as sub-model parameters and central model parameters) are uploaded and downloaded in the form of blockchain, which not only ensures the non-modifiability in the parameter transfer process, but also ensures the effective filtering of garbage parameters (i.e., illegal parameters) when aggregating the target sub-model parameters by innovating a new consensus algorithm (i.e., the method of evaluating the model decision quality for sub-model parameters), further ensuring the efficiency and stability of the entire training process.
[0150] Further, please refer to Figure 3 , Figure 3 which is a schematic flowchart of a data processing method provided by an embodiment of the present application. This data processing method can be executed by a computer device. In the embodiments of the present application, taking the computer device as the central node as an example, the central node can be Figure 1a any one of the cloud servers in Figure 1b equivalent to any one of the full nodes in Figure 3 . As shown in
[0151] Step S101, obtain N target information chains; N is a positive integer; all N target information chains include sub-model parameters; the N sub-model parameters are respectively provided by N user nodes.
[0152] Specifically, in the embodiments of the present application, assume N = 3, that is, the central node obtains 3 target information chains, and the user nodes corresponding to the 3 target information chains can be Figure 1aThe user terminals in the user terminal cluster are equivalent to Figure 1b the light nodes (blockchain nodes corresponding to user terminals) in the synchronization network 10e in Figure 4a . Figure 4a FIG. is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As Figure 4a shown, the user node 401c provides a target information chain 401b, the target information chain 401b includes sub-model parameters D1, the user node 402c provides a target information chain 402b, the target information chain 402b includes sub-model parameters D2, and the user node 403c provides a target information chain 403b, the target information chain 403b includes sub-model parameters D3.
[0153] It can be understood that in the edge caching environment, through the federated learning algorithm, each user node can train a task decision model locally. After training the model a certain number of times, the sub-model parameters are transmitted to the central node. Among them, the user node can first transmit the sub-model parameters to the edge node, and then transmit them to the central node through the edge node (such as Figure 4a the central node 40a shown in the example), or directly transmit the sub-model parameters to the central node. The embodiment of the present application does not limit this, and the transmission route can be determined according to the actual application scenario. The edge node can be Figure 1a the edge servers in the edge server cluster 10b in Figure 1b the light nodes (blockchain nodes corresponding to edge servers) in the synchronization network 10e in.
[0154] Step S102: Perform model decision quality evaluation on N sub-model parameters respectively, and determine the sub-model parameters whose quality evaluation results meet the model consensus condition as target sub-model parameters; the total number of target sub-model parameters is less than or equal to N.
[0155] Specifically, the N sub-model parameters include sub-model parameters D i , where i is a positive integer and i is less than or equal to N; obtain a simulation task, and obtain a task decision sub-model M i including sub-model parameters D i ; input the simulation task into the task decision sub-model M i , and obtain the task decision node for the simulation task output by the task decision sub-model M i ; according to the task decision node and the simulation task, obtain the task decision loss and obtain the task environment information; according to the task decision loss and the task environment information, perform model decision quality evaluation on the sub-model parameters D i , and obtain the quality evaluation result corresponding to the sub-model parameters D i .
[0156] The task decision loss includes the task decision delay loss and the task decision energy consumption loss; the task environment information includes the task information and the environment information; the task information is used to represent the basic information of the simulation task; the environment information is used to represent the basic information of the task decision node; among them, according to the task decision loss and the task environment information, the sub-model parameter D i The specific process of evaluating the model decision quality can include: normalizing the task decision delay loss to obtain the unitized task decision delay loss; normalizing the task decision energy consumption loss to obtain the unitized task decision energy consumption loss; performing a weighted summation on the unitized task decision delay loss and the unitized task decision energy consumption loss to obtain the unitized task decision loss; normalizing the task information to obtain the unitized task information; normalizing the environment information to obtain the unitized environment information; performing a summation on the unitized task information and the unitized environment information to obtain the unitized task environment information; according to the unitized task decision loss and the unitized task environment information, the sub-model parameter D i is evaluated for model decision quality.
[0157] The central node inputs 1 sub-model parameter into the local model, randomly generates a task, makes a decision on the randomly generated task according to the local model, and can evaluate the offloading level of the sub-model parameter according to the decision result. This step only takes the evaluation of the model decision quality of the sub-model parameter D1 as an example. The specific process of evaluating the model decision quality of other sub-model parameters can be seen in the following description and will not be elaborated one by one. Please refer to Figure 4a , the central node 40a obtains the simulation task, obtains the task decision sub-model M1 containing the sub-model parameter D1, and inputs the simulation task into the task decision sub-model M1, and can obtain the task decision node for the simulation task output by the task decision sub-model M1, such as Figure 4a shown in the example of the edge node 401d. It can be understood that the edge node 401d can be Figure 1a the edge server in
[0158] The central node 40a obtains the basic information of the simulation task. The basic information can include the amount of computation required when the simulation task is executed, and information such as the task size of the simulation task itself, and uses the basic information of the simulation task as the task information; the central node 40a obtains the basic information of the task decision node. The task basic information can include the communication information between the user node 401c and the edge server 401a, and the computing power of the edge server 401a, etc., and uses the basic information of the task decision node as the environment information. It can be understood that the task information and the environment information can be set according to the actual application scenario, and the content of the task environment information in the embodiments of the present application is not limited.
[0159] It can be understood that the central node 40a does not actually offload the simulation task to the edge server 401a, nor does it prompt the user terminal 401c to offload the simulation task to the edge server 401a. The central node 40a only simulates the offloading process of the user node 401c offloading the simulation task to the edge node 401d according to the environmental information and task information, and simulates the execution process of the edge node 401d executing the simulation task. It may also include simulating the process of the edge node 401d returning the execution result, so as to calculate the task decision loss generated by the task offloading. Among them, the task decision loss includes the task decision delay loss and the task decision energy consumption loss. The task decision delay loss may include the time when the task decision sub-model M1 decides the edge node 401d in the edge environment, may include the time for transmitting data (which may include the simulation task and the task execution result) between the edge node 401d and the user node 401c, and may include the time for the edge node 401d to execute the simulation task. The task decision energy consumption loss may include the energy consumption generated when the task decision sub-model M1 decides the edge node 401d in the edge environment, may include the energy consumption generated by transmitting data (which may include the simulation task and the task execution result) between the edge node 401d and the user node 401c, and may include the energy consumption generated by the edge node 401d executing the simulation task. It can be understood that the above task decision delay loss and task decision energy consumption loss can be set according to the actual application scenario, and the embodiments of the present application do not limit this.
[0160] Different evaluation indicators often have different dimensions and dimension units, and such a situation will affect the results of data analysis. In order to eliminate the dimensional influence between indicators, data normalization processing needs to be performed to solve the comparability between data indicators. After the original data is processed by data normalization, each indicator is at the same order of magnitude and is suitable for comprehensive comparison and evaluation. Obviously, the dimensions corresponding to the above task decision delay loss and task decision energy consumption loss are different. The dimension of the task decision delay loss is time, while the dimension of the task decision energy consumption loss is not time. Therefore, before performing the weighted summation processing on the two, it is necessary to perform normalization processing on the task decision delay loss and the task decision energy consumption loss respectively. Similarly, the dimensions corresponding to the task information and the environmental information are also different, so it is also necessary to perform normalization processing on the task information and the environmental information respectively.
[0161] Please refer to Figure 4b , Figure 4b which is a schematic flowchart of a data processing method provided by the embodiments of the present application. As Figure 4bAs shown, the central node first normalizes the task decision delay loss, task decision energy consumption loss, task information, and environmental information respectively, and then can correspondingly obtain the unitized task decision delay loss, unitized task decision energy consumption loss, unitized task information, and unitized environmental information; the central node performs a weighted summation on the unitized task decision delay loss and the unitized task decision energy consumption loss to obtain the unitized task decision loss; performs a summation on the unitized task information and the unitized environmental information to obtain the unitized task environmental information; the central node can use formula (2),
[0162]
[0163] calculate the unitized task decision loss and the unitized task environmental information, that is, evaluate the model decision quality of the sub-model parameter D1, and then the quality evaluation result corresponding to the sub-model parameter D1 can be obtained. In formula (2), A represents the unitized task decision delay loss, B represents the unitized task decision energy consumption loss, C represents the unitized task information, D represents the unitized environmental information, and E represents the quality evaluation result. This quality evaluation result is similar to a score, that is, score the sub-model parameter D1 according to the task offloading level of the sub-model parameter D1.
[0164] The central node can be regarded as a full node in the blockchain network and has the consensus permission. In the embodiments of the present application, each user node is regarded as a light node, and the information chain it provides can be regarded as a transaction. For the task offloading decision scenario, the embodiments of the present application provide a new consensus algorithm according to formula (2), that is, evaluate the model decision quality of the sub-model parameter, and determine the consensus result according to the quality evaluation result. Among them, for the process of determining the target sub-model parameter according to the quality evaluation result corresponding to the sub-model parameter, please refer to the description of step S202 in the corresponding embodiment below Figure 7 and will not be elaborated here.
[0165] Step S103, perform an aggregation process on the target sub-model parameter to obtain the central model parameter, and perform a model decision quality evaluation on the central model parameter to obtain the target quality evaluation result.
[0166] Specifically, the target sub-model parameter includes A target sub-model parameters, A is a positive integer and A is less than or equal to N; obtain the number of training sample subsets corresponding to the A target sub-model parameters respectively, sum the A numbers of training sample subsets to obtain the total number of training samples; the A target sub-model parameters include the target sub-model parameter Z t and the A numbers of training sample subsets include the number of training sample subsets Y t corresponding to the target sub-model parameter Z t; t is a positive integer and t is less than or equal to A; obtaining the target sub-model parameter Z t and the number of training sample subsets Y t of the operator result; summing the operator results corresponding to the A target sub-model parameters respectively to obtain the total operation result, and determining the central model parameter according to the total operation result and the total number of training samples
[0167] It can be understood that the central node can aggregate the sub-model parameters provided by different user nodes respectively, so as to learn the data features in the training data corresponding to each user node respectively. Assuming that the number of target sub-model parameters is 3, please refer to Figure 5 , Figure 5 is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As Figure 5 shown, the central node 40a obtains 3 target sub-model parameters, namely the target sub-model parameter Z1, the target sub-model parameter Z2, and the target sub-model parameter Z3. The central node 40a obtains the number of training sample subsets corresponding to each target sub-model parameter respectively, and the number of training sample subsets can be equivalent to Figure 2a the training data shown in the example. In Figure 5 , the number of training sample subsets Y1 corresponding to the target sub-model parameter Z1 is equal to 10, the number of training sample subsets Y2 corresponding to the target sub-model parameter Z2 is equal to 15, and the number of training sample subsets Y3 corresponding to the target sub-model parameter Z3 is equal to 20
[0168] The central node 40a sums the 3 numbers of training sample subsets to obtain the total number of training samples, obtains the operator result of the target sub-model parameter Z1 and the number of training sample subsets Y1, obtains the operator result of the target sub-model parameter Z2 and the number of training sample subsets Y2, obtains the operator result of the target sub-model parameter Z3 and the number of training sample subsets Y3, sums the operator results corresponding to the 3 target sub-model parameters respectively to obtain the total operation result. The central node 40a can determine the central model parameter according to the total operation result and the total number of training samples (schematically shown as 45 in the embodiment of the present application). The central node 40a can use formula (3),
[0169]
[0170] operates on the target sub-model parameter Z1, the target sub-model parameter Z2, the target sub-model parameter Z3, the 3 numbers of training sample subsets, and the total number of training samples to obtain the central model parameter, where K in formula (3) is equal to A schematically shown in the embodiment of the present application, that is, equal to 3, n i represents the number of the i-th training sample subset, such as 10, 15, and 20 schematically shown in the embodiment of the present application, ω iIt is equal to the i-th target sub-model parameter illustrated in the embodiment of the present application, such as the target sub-model parameter Z1, the target sub-model parameter Z2, and the target sub-model parameter Z3 illustrated in the embodiment of the present application.
[0171] It is worth noting that formula (3) is an aggregation algorithm illustrated in the embodiment of the present application. In actual application, other aggregation algorithms can be selected according to the scenario.
[0172] Among them, the process of performing model decision quality assessment on the central model parameters to obtain the target quality assessment result can be referred to the description of performing model decision quality assessment on the sub-model parameter D1 in step S102 above to obtain the quality assessment result corresponding to the sub-model parameter D1, which will not be repeated here.
[0173] After obtaining the target quality assessment result, the central node 40a can allow other central nodes and light nodes in the blockchain network to reach a consensus on the target block based on the target quality assessment result. This consensus method can avoid a lot of computing power, increase the speed of parameter (including central model parameters) transmission, and will not be cracked or even attacked by brute force, so as to adapt to parameter transmission in harsh environments.
[0174] Step S104, generate a target block according to the central model parameters and the target quality assessment result. When the target block passes the blockchain consensus, broadcast the target block to N user nodes respectively, so that each user node verifies the legitimacy of the target block according to the target quality assessment result. When the result of the legitimacy verification indicates that the target block is a legal block, obtain a task decision model containing the central model parameters; the task decision model is used to decide the node that executes the task.
[0175] Specifically, the number of iterations corresponding to the central model parameters is obtained, and a target block is generated according to the number of iterations, the central model parameters, and the target quality assessment result; a first digital summary of the target block is obtained, and the first digital summary is encrypted according to a private key to obtain a first digital signature; the first digital signature is added to the target block; the first digital signature is used to instruct N user nodes to verify the source of the target block.
[0176] In a feasible implementation, through step S102, the central node in the blockchain consensus network that first calculates the quality assessment result corresponding to the sub-model parameter obtained by itself will serve as the leading central node, and the leading central node will serve as the block-generating node to generate the target block (at this time, the target block can be equivalent to the on-chain block). Figure 6The central node 60a therein (equivalent to the central node 40a described above) is the central node that first calculates the quality evaluation result corresponding to the target sub-model parameters it obtains. At this time, other central nodes can continue to calculate the quality evaluation results corresponding to the target sub-model parameters they obtain.
[0177] The central node 60a can generate a target block according to the central model parameters and the target quality evaluation result. For the specific process, please also refer to Figure 6 , Figure 6 which is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As Figure 6 shown, the central node 60a obtains the iteration number corresponding to the central model parameters. This iteration number is equal to the legal iteration number and is also equal to the iteration number corresponding to each target sub-model parameter. According to the iteration number, the central model parameters, and the target quality evaluation result, the central node 60a can generate a target block 60d.
[0178] Each blockchain node in the blockchain network has a pair of key pairs (which can also be called public-private key pairs). Each pair of key pairs has a public key (Public Key) and a private key (Private Key). The private key can be a hexadecimal string obtained by performing a hash algorithm operation on a randomly generated digital string. The public key can be generated from the private key through the elliptic curve encryption algorithm. Since the elliptic curve encryption algorithm is a one-way function, the public key can be generated from the private key, but the private key cannot be deduced from the public key. Therefore, the public key can be made public, but the private key needs to be hidden.
[0179] A digital signature is an anti-forgery string composed of a digital digest and asymmetric encryption technology. The sending node shortens the transaction information into a fixed-length string through the digital digest technology, and then encrypts the digital digest with the private key to form a digital signature, and then sends the digital signature to the receiving node. The receiving node can verify that the information is sent by the sending node through the digital signature and the public key of the sending node.
[0180] An embodiment of the present application draws on the key pair and digital signature technologies. Please also refer to Figure 6 , the central node 60a can obtain the first digital digest 60b of the target block 60d through the digital digest technology, encrypt the first digital digest 60b with its own private key 60c to obtain the first digital signature 60e, and add the first digital signature 60e to the target block 60d; the first digital signature 60e is used to instruct each user node to perform a source legality verification signature on the target block.
[0181] Please also refer to Figure 6, the block header in the target block 60d may include a previous hash (i.e., the parent block hash), may include a first digital digest 60b, and may also include a timestamp; the block body of the target block 60d may include the public key of the central node 60a, a first digital signature 60e, the number of legitimate iterations, the target quality assessment result, and the central model parameters. The embodiments of the present application do not limit the data in the target block 60d, and can be set according to the actual application scenario.
[0182] After the central node 60a generates the target block 60d, it first broadcasts the target block 60d to the central nodes in the blockchain consensus network (which can be equivalent to Figure 1b all the nodes in the consensus network 10d in Figure 1b ), so that other central nodes perform blockchain consensus on the target block 60d. If the target block fails the blockchain consensus, the blockchain consensus network performs blockchain consensus on the blocks generated by other central nodes (the data generated by this block is different from the data in the target block 60d because it comes from different user nodes). When the target block 60d passes the blockchain consensus, other central nodes can suspend calculating the quality assessment results corresponding to the target sub-model parameters they obtained, or can also discard the target sub-model parameters they obtained. The central node 60a and other central nodes in the blockchain consensus network can both broadcast the target block 60d to the blockchain network. Here, it is mainly to let the light nodes in the blockchain network (which can be equivalent to
[0183] the light nodes in the synchronization network 10e in Figure 7 ) synchronize the target block 60d. Subsequently, the user nodes can obtain the central model parameters in the target block 60d, and then can obtain a task decision model including the central model parameters, or it can also be understood as updating the local sub-model parameters to the central model parameters.
[0184] So far, one round of federated machine learning is completed. During this period, the blockchain has also completed a process of "collecting information - competing for leadership - producing blocks - broadcasting blocks". By innovatively embedding the blockchain into federated learning, the task decision model will greatly improve the ability to resist harsh environments and enhance the stability and security of task offloading.
[0185] For other feasible implementation manners of determining the block to be chained, please refer to the description in step S208 in the embodiments corresponding to Figure 7 below, and the description will not be elaborated here for the time being.
[0186] In an embodiment of the present application, the sub-model parameters respectively provided by N user nodes are regarded as N transactions. For the task offloading decision scenario, the consensus process is designed to perform model decision quality evaluation on the N sub-model parameters respectively, that is, to evaluate the task offloading decision levels corresponding to the N sub-model parameters respectively; further, the sub-model parameters whose quality evaluation results meet the model consensus conditions are determined as target sub-model parameters, which is equivalent to retaining the sub-model parameters with high task offloading decision levels and eliminating the sub-model parameters with low task offloading decision levels; further, the target sub-model parameters respectively provided by different user nodes are aggregated to obtain central model parameters. Since the task offloading decision levels corresponding to the target sub-model parameters are all high, the aggregated central model parameters not only include the characteristics of the target sub-model parameters, but also have high levels of task offloading capability; further, a model decision quality assessment is performed on the central model parameters to obtain a target quality assessment result, a target block is generated according to the central model parameters and the target quality assessment result, and when the target block passes the blockchain consensus, the target block is broadcast to N user nodes respectively, that is, the central model parameters are decentralized to the user nodes in the form of blocks, so that before each user node performs accounting processing on the target block, the legitimacy of the target block can be verified by the target quality assessment result. When the result of the legitimacy verification indicates that the target block is a legal block, the user node obtains the task decision model including the central model parameters. Obviously, the task decision model generated by the present application can include model features corresponding to the sub-model parameters provided by different user nodes respectively, and has a high level of task offloading decision-making level. To sum up, by having different user nodes provide sub-model parameters respectively (that is, sub-model parameters are trained in parallel by different user nodes), the generation speed of the task decision model can be accelerated, which can save the time cost of data processing. Moreover, the present application does not need to directly obtain the training samples in each user node, thereby avoiding the problem of difficulty in obtaining training samples. Multiple sub-model parameters come from the training samples, so the decision accuracy of the task decision model can be guaranteed. By screening the sub-model parameters and obtaining the target sub-model parameters, the decision accuracy of the task decision model is further improved. In addition, through the target block, the central model parameters can be prevented from being stolen and tampered with, thereby improving the security of data processing.
[0187] For further information, see Figure 7 , Figure 7 is a flow chart of a data processing method provided in an embodiment of the present application. The data processing method can be executed by a computer device. In the embodiment of the present application, the computer device is used as a central node as an example. The central node can be Figure 1a Any cloud server in Figure 1b Any full node in ). Figure 7 As shown, the data processing process may include the following steps.
[0188] Step S201: Obtain C information chains to be verified; C is a positive integer and C is greater than or equal to N; each of the C information chains to be verified includes sub-model parameters; the C sub-model parameters are respectively provided by C user nodes; the N user nodes belong to the C user nodes; the N sub-model parameters belong to the C sub-model parameters.
[0189] Since deep reinforcement learning requires the use of neural networks, which leads to a large amount of computation for training the model and places great pressure on user nodes, a distributed training method - federated learning - is introduced in the embodiments of this application. Federated learning is a machine learning framework that can effectively help multiple institutions perform data usage and machine learning model building while meeting the requirements of user privacy protection, data security, and government regulations. As a distributed machine learning paradigm, federated learning can effectively solve the data silo problem, enabling participating parties to jointly build models without sharing data, and technically breaking data silos, thereby protecting user privacy as much as possible. In the embodiments of this application, the process of federated machine learning can be as follows: multiple user nodes independently train the service offloading decision algorithm locally. After training a certain number of times, each user node uploads the network parameters (i.e., sub-model parameters) in its local neural network to the edge node, or directly uploads them to the central node. For the specific process above, please refer to the description above Figure 2a and will not be elaborated here. Among them, the numbers of the edge node and the central node are not limited respectively and can be set according to the actual application scenario.
[0190] In the embodiments of this application, assume C = 5, that is, the central node obtains 5 information chains to be verified. The user nodes corresponding to the 5 information chains to be verified can be Figure 1a the user terminals in the user terminal cluster in Figure 1b and are equivalent to the light nodes (the blockchain nodes corresponding to the user terminals) in the synchronization network 10e in Figure 8 . Figure 8 FIG. Figure 8As shown, the central node 80a obtains the information chains to be verified provided by 5 user nodes respectively. Among them, the user node 401c provides the information chain 801b to be verified, and the information chain 801b to be verified contains the sub-model parameter D1. The user node 402c provides the information chain 802b to be verified, and the information chain 802b to be verified contains the sub-model parameter D2. The user node 403c provides the information chain 803b to be verified, and the information chain 803b to be verified contains the sub-model parameter D3. The user node 404c provides the information chain 804b to be verified, and the information chain 804b to be verified contains the sub-model parameter D4. The user node 405c provides the information chain 805b to be verified, and the information chain 805b to be verified contains the sub-model parameter D5.
[0191] Step S202: Verify each of the C information chains to be verified, and determine the information chains to be verified whose verification results meet the quality assessment conditions as the target information chains.
[0192] Specifically, each of the C information chains to be verified includes the number of verification iterations to be verified. According to the C numbers of verification iterations to be verified, each of the C information chains to be verified is verified, and the information chains to be verified whose numbers of verification iterations to be verified are equal to the legal number of iterations are added to the set of information chains to be verified. The total number of information chains to be verified in the set of information chains to be verified is less than or equal to C, and the total number of information chains to be verified in the set of information chains to be verified is equal to or greater than N. The information chains to be verified in the set of information chains to be verified also include the second digital signature. According to the second digital signature, the information chains to be verified in the set of information chains to be verified are verified, and the information chains to be verified whose verification results meet the quality assessment conditions are determined as the target information chains.
[0193] Among them, the set of information chains to be verified includes the information chain F to be verified x , where x is a positive integer and x is less than or equal to the total number of information chains to be verified in the set of information chains to be verified; the second digital signature includes the second digital signature J in the information chain F to be verified x . The specific process of verifying the information chains to be verified in the set of information chains to be verified according to the second digital signature may include: decrypting the second digital signature J according to the public key associated with the information chain F to be verified x to obtain the second digital digest; obtaining the data to be verified in the information chain F to be verified x ; the data to be verified includes the legal number of iterations and the sub-model parameters of the information chain F to be verified x ; obtaining the third digital digest of the data to be verified, and comparing the second digital digest with the third digital digest; if the second digital digest is the same as the third digital digest, it is determined that the information chain F to be verified x meets the quality assessment conditions. x ; obtaining the third digital digest of the data to be verified, and comparing the second digital digest with the third digital digest; if the second digital digest is the same as the third digital digest, it is determined that the information chain F to be verified xThe verification result meets the quality assessment conditions; if the second digital digest is different from the third digital digest, it is determined that the information chain F to be verified x The verification result does not meet the quality assessment conditions, and the information chain to be verified whose verification result does not meet the quality assessment conditions is deleted.
[0194] Please refer to Figure 8 , the process of the central node 80a verifying 5 information chains to be verified can include two steps. The first step is to determine whether the number of iterations to be verified in each information chain to be verified is equal to the legal number of iterations, and obtain the number of iterations to be verified in each information chain to be verified. Among them, the information chain 801b to be verified contains the number of iterations to be verified, such as Figure 8 The number of iterations 200 shown in the example, the information chain 802b to be verified contains the number of iterations to be verified, such as Figure 8 The number of iterations 200 shown in the example, the information chain 803b to be verified contains the number of iterations to be verified, such as Figure 8 The number of iterations 200 shown in the example, the information chain 804b to be verified contains the number of iterations to be verified, such as Figure 8 The number of iterations 200 shown in the example, the information chain 805b to be verified contains the number of iterations to be verified, such as Figure 8 The number of iterations 199 shown in the example. Assuming that the legal number of iterations is 200, by comparing the number of iterations to be verified and the legal number of iterations, it can be known that the information chain 805b to be verified is an illegal information chain. At this time, the central node 80a can discard the information chain 805b to be verified and add the information chains to be verified whose number of iterations to be verified meets the legal number of iterations to the set of information chains to be verified, such as Figure 8 shown, the set of information chains to be verified can include the information chain 801b to be verified (equivalent to the information chain F1 to be verified), the information chain 802b to be verified (equivalent to the information chain F2 to be verified), the information chain 803b to be verified (equivalent to the information chain F3 to be verified), and the information chain 804b to be verified (equivalent to the information chain F4 to be verified).
[0195] The second step of the central node 80a verifying the information chain to be verified is to verify the information chain to be verified according to the second digital signature in the information chain to be verified, which can also be understood as verifying the signature of the information chain to be verified. Such as Figure 8 shown, the information chain 801b to be verified contains the second digital signature J1, the information chain 802b to be verified contains the second digital signature J2, the information chain 803b to be verified contains the second digital signature J3, the information chain 804b to be verified contains the second digital signature J3, and the information chain 804b to be verified contains the second digital signature J4.
[0196] This step only describes the process of verifying the signature of the information chain 801b to be verified as an example. The specific process of verifying the signatures of other information chains to be verified can be referred to the following description and will not be elaborated one by one. Please refer to again Figure 8 The central node 80a obtains the public key of the user node 401c (equivalent to the public key associated with the information chain F1 to be verified), decrypts the second digital signature J1 according to the public key of the user node 401c, and obtains the second digital digest 801c. The central node 80a obtains the data to be verified in the information chain 801b to be verified. The data to be verified may include the legal iteration number and the sub-model parameters D1 of the information chain 801b to be verified. It can be understood that the data to be verified can be set according to the actual application scenario, and the data composition of the data to be verified in the embodiments of the present application is not limited.
[0197] The central node 80a obtains the third digital digest 802c of the data to be verified, and compares the second digital digest 801c with the third digital digest 802c. As Figure 8 shown, if the second digital digest 801c is the same as the third digital digest 802c, it is determined that the verification result of the information chain 801b to be verified meets the quality assessment condition, and the central node 80a can determine the information chain 801b to be verified as the target information chain; if the second digital digest 801c is different from the third digital digest 802c, it is determined that the verification result of the information chain 801b to be verified does not meet the quality assessment condition. At this time, the central node 80a can delete the information chain 801b to be verified.
[0198] Step S203, obtain N target information chains; N is a positive integer; each of the N target information chains includes sub-model parameters; the N sub-model parameters are provided by N user nodes respectively.
[0199] Step S204, perform model decision quality assessment on the N sub-model parameters respectively, obtain N quality assessment results, compare the N quality assessment results with the quality assessment result threshold respectively, and obtain N comparison results; the N comparison results include comparison result G j , where j is a positive integer and j is less than or equal to N; the comparison result G j includes a first comparison result or a second comparison result; the first comparison result is used to indicate that the quality assessment result corresponding to the comparison result G j is less than the quality assessment result threshold; the second comparison result is used to indicate that the quality assessment result corresponding to the comparison result G j is equal to or greater than the quality assessment result threshold.
[0200] Step S205, if the comparison result G j is the second comparison result, it is determined that the quality assessment result corresponding to the comparison result G j meets the model consensus condition; if the comparison result Gj If it is the first comparison result, then determine the comparison result G j The corresponding quality evaluation result does not meet the model consensus condition, and delete the sub-model parameters whose quality evaluation results do not meet the model consensus condition.
[0201] Specifically, although the introduction of federated learning makes the training of the task decision model more efficient, there are risks in the parameter transmission process of federated learning. In addition, compared with traditional distributed training, federated learning can enable 100,000 user nodes to perform parameter training and aggregation simultaneously. Then, two problems will inevitably be encountered in the edge environment: 1) How to prevent the updated parameters (i.e., the central model parameters) from being tampered with during the download process; 2) How to identify the garbage parameters maliciously uploaded by untrusted nodes.
[0202] Therefore, the embodiment of this application introduces a secure and efficient data structure - blockchain. As a new data structure, the data or information stored in it has characteristics such as "non-forgeable", "traceable throughout the process", "traceable", "open and transparent", and "collectively maintained". Based on these characteristics, blockchain technology has laid a solid "trust" foundation and created a reliable "cooperation" mechanism, which is extremely suitable for use in federated learning in a harsh environment.
[0203] For the specific process of step S203 and the model decision quality evaluation of N sub-model parameters respectively, reference can be made to the description of steps S101 - S102 in the corresponding embodiment above. Figure 3 The description will not be repeated here.
[0204] Assume N = 3, please refer to Figure 9 The central node 90b obtains 3 quality evaluation results, namely the quality evaluation result 901a corresponding to the sub-model parameter D1, the quality evaluation result 902a corresponding to the sub-model parameter D2, and the quality evaluation result 903a corresponding to the sub-model parameter D3. It can be understood that the quality evaluation result can be a score, that is, the level of decision task offloading of the sub-model parameter. Generally speaking, if the quality evaluation result 903a is 90 points, the central node 90b can determine that the decision level of the sub-model parameter D3 is very good. If the quality evaluation result 902a is 40 points, the central node 90b can determine that the decision level of the sub-model parameter D2 is very poor.
[0205] The central node 90b compares the three quality assessment results with the quality assessment result threshold 90a respectively, and three comparison results can be obtained. In this step, only the comparison result G1 corresponding to the sub-model parameter D1 is used as an example for description, and the description of other comparison results G2 can be referred to the following description. The comparison result G1 includes a first comparison result or a second comparison result. The first comparison result is used to represent that the quality assessment result 901a corresponding to the comparison result G1 is less than the quality assessment result threshold 90a; the second comparison result is used to represent that the quality assessment result 901a corresponding to the comparison result G1 is equal to or greater than the quality assessment result threshold 90a. Assuming that the quality assessment result threshold 90a is 80, if the quality assessment result 901a is less than 80, it is determined that the comparison result G1 is the first comparison result. At this time, the central node 90b can determine that the quality assessment result 901a does not meet the model consensus condition; if the quality assessment result 901a is equal to or greater than 80, it is determined that the comparison result G1 is the second comparison result. At this time, it can be determined that the quality assessment result 901a meets the model consensus condition.
[0206] Step S206, determine the sub-model parameters whose quality assessment results meet the model consensus condition as the target sub-model parameters; the total number of the target sub-model parameters is less than or equal to N.
[0207] Specifically, combined with Figure 3 and steps S201 - S205, it can be seen that the central node will eliminate the sub-model parameters with failed signature verification, low unit revenue value (i.e., poor quality assessment results), and inconsistent number of iterations, ensuring that the collected sub-model parameters are all true and valid, thereby being able to prevent untrusted users from maliciously uploading garbage parameters and ensuring the successful execution of the aggregation algorithm for the target sub-model parameters in step S207.
[0208] Step S207, perform an aggregation process on the target sub-model parameters to obtain central model parameters, and perform a model decision quality assessment on the central model parameters to obtain a target quality assessment result.
[0209] Specifically, for the specific process of step S207, reference can be made to the description of step S103 in the corresponding embodiment above Figure 3 and the specific process of performing a model decision quality assessment on the central model parameters is similar to the specific process of performing a model decision quality assessment on N sub-model parameters respectively in step S102 in the corresponding embodiment above Figure 3 so it will not be elaborated here. Please refer to the description of step S102 in the corresponding embodiment above Figure 3 for details.
[0210] Step S208: Generate a target block based on the central model parameters and the target quality assessment result. When the target block passes the blockchain consensus, broadcast the target block to N user nodes respectively, so that each user node verifies the legality of the target block according to the target quality assessment result. When the result of the legality verification indicates that the target block is a legal block, obtain a task decision model containing the central model parameters; the task decision model is used to decide the nodes for executing tasks.
[0211] Specifically, for the specific process of generating the target block, refer to the description of step S104 in the corresponding embodiment above, which will not be elaborated here. Figure 3 in the corresponding embodiment, the leading central node is the central node that first calculates the quality assessment result corresponding to the sub-model parameters it obtains. In this step, other feasible implementation schemes for determining the leading central node are described.
[0212] Figure 3 After generating the target block, the central node will broadcast the target block in the blockchain consensus network, so that the central nodes in the blockchain consensus network conduct consensus on the target block according to the central model parameters and the target quality assessment result. Please refer to
[0213] together with, Figure 10 , Figure 10 which is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As Figure 10 shown, the blockchain consensus network 90d may include a central node 903h and a central node 902h. The process of the central node 903h and the central node 902h conducting blockchain consensus on the target block 90c can be referred to the process of the central node 90b conducting blockchain consensus on the block to be consensus in the following text, and will not be elaborated here for the time being.
[0214] If the target block 90c has passed the blockchain consensus and the central node 90b has not received the block to be consensus sent by other central nodes, at this time, the central node 90b can be used as the leading central node, and the target block 90c can be used as the block to be chained for chaining processing. The central node 902h and the central node 903h can respectively delete the local information chain and conduct accounting processing on the block to be chained.
[0215] When the target block fails to pass the blockchain consensus and the to-be-consensus block broadcast by the central node is obtained, perform blockchain consensus on the to-be-consensus block; the to-be-consensus block is generated by the central node according to H sub-model parameters, and the H sub-model parameters are different from the N sub-model parameters; the H sub-model parameters are provided by H user nodes respectively, the H user nodes communicate with the central node, and the H user nodes are different from the N user nodes; H is a positive integer; if the target block still fails to pass the blockchain consensus when the to-be-consensus block passes the blockchain consensus, then determine the to-be-consensus block as the on-chain block, perform bookkeeping processing on the on-chain block, delete the target block, and broadcast the on-chain block to the nodes in the blockchain network respectively.
[0216] Among them, the specific process of performing blockchain consensus on the to-be-consensus block may include: obtaining the to-be-consensus central model parameters and the first quality evaluation result in the to-be-consensus block; performing model decision quality evaluation on the to-be-consensus central model parameters to obtain the second quality evaluation result; determining the difference between the first quality evaluation result and the second quality evaluation result, and comparing the difference with the difference threshold; if the difference is less than or equal to the difference threshold, the consensus result for the to-be-consensus block is consensus passed; if the difference is greater than the difference threshold, the consensus result for the to-be-consensus block is consensus failed.
[0217] Please refer to again Figure 10, when the target block 90c fails to pass the blockchain consensus and the center node 90b obtains the block 90e to be consensus from the broadcast of the central node 903h, the center node 90b needs to perform blockchain consensus on the block 90e to be consensus. The specific process can be as follows: The center node 90b obtains the center model parameters 901f to be consensus and the first quality evaluation result 902f in the block 90e to be consensus. Among them, the target sub-model parameters corresponding to the center model parameters 901f to be consensus are not equivalent to the target sub-model parameters corresponding to the center model parameters. Assuming that there are 10,000 user nodes independently training the model, 10,000 information chains to be verified can be provided. The 10,000 information chains to be verified include 9,500 target information chains. Among them, 5,000 target information chains are transmitted to the center node 90b, and 4,500 target information chains are transmitted to the center node 903h. Since federated learning is different from traditional distributed learning and has strong robustness to independently and identically distributed samples, even if some parameters are not uploaded to the same central node, it still does not affect the subsequent aggregation of the target sub-model parameters. For example, the 9,500 target information chains shown above are transmitted to two central nodes. In fact, the center model parameters in the block on the chain are either generated according to the 5,000 target information chains obtained by the center node 90b (at this time, the center node 903h can delete the 4,500 target information chains it obtained), or generated according to the 4,500 target information chains obtained by the center node 903h (at this time, the center node 90b can delete the 5,000 target information chains it obtained).
[0218] Please refer to again Figure 10 , the center node 90b performs model decision quality evaluation on the center model parameters 901f to be consensus, obtains the second quality evaluation result 903f, determines the difference between the first quality evaluation result 902f and the second quality evaluation result 903f, and compares the difference with the difference threshold. If the difference is less than or equal to the difference threshold, the consensus result of the center node 90b for the block 90e to be consensus is consensus passed; if the difference is greater than the difference threshold, the consensus result for the block 90e to be consensus is consensus failed. Assume that the first quality evaluation result 902f is 80 and the second quality evaluation result 903f is 90. Obviously, since the first quality evaluation result 902f is worse than the second quality evaluation result 903f, the consensus result of the center node 90b for the block 90e to be consensus is consensus passed. Assume that the first quality evaluation result 902f is 90 and the second quality evaluation result 903f is 80. At this time, the first quality evaluation result 902f is better than the second quality evaluation result 903f, and the difference between the two is 10. If the difference threshold is greater than or equal to 10, the consensus result of the center node 90b for the block 90e to be consensus is consensus passed. If the difference threshold is less than 10, the consensus result of the center node 90b for the block 90e to be consensus is consensus failed.
[0219] In addition to comparing the first quality assessment result 902f with the second quality assessment result 903f to determine the consensus result for the block to be consensus 90e, the blockchain consensus network 90d can also set a quality assessment result threshold (which can be equivalent to the quality assessment result threshold described above). For example, if the quality assessment result threshold is 60, then when the second quality assessment result 903f is greater than or equal to 60, the central node 90b can determine that the consensus result for the block to be consensus 90e is consensus passed. If the second quality assessment result 903f is less than 60, it can be determined that the consensus result for the block to be consensus 90e is consensus failed.
[0220] By using the method of performing model decision quality assessment on parameters (which can include the parameters of the center model to be consensus and the center model parameters), the present application can prevent malicious tampering of parameters by illegal nodes. When someone attempts to construct a false parameter and wants to include it in the blockchain for broadcasting, the lower end (which can include the edge end and the user end) will verify the parameter after receiving the blockchain. If the verification result (such as the above-mentioned second quality assessment result 903f) is outside the specified quality assessment result threshold range, the false parameter will be detected. If it is within the range, it proves that the constructed false parameter is still valid, and the fraud will not have a negative impact on the task decision model, thus preventing the situation of parameter tampering from the perspective of game theory.
[0221] If the target block has not passed the blockchain consensus when the block to be consensus passes the blockchain consensus, at this time, the blockchain consensus network will generate the central node of the block to be consensus as the leading central node. For example Figure 10 the central node 903h shown in Figure 10 will determine the block to be consensus as the block to be uploaded to the chain. Then
[0222] the central node 90b in Figure 10 will perform bookkeeping processing on the block to be uploaded to the chain (i.e., the block 90e to be uploaded to the chain) and delete the target block 90c. Subsequently, the block to be uploaded to the chain will be broadcast to the nodes in the blockchain network respectively.
[0223] When the target block passes blockchain consensus and the block to be consensus passes blockchain consensus, obtain the first quality assessment result in the block to be consensus; compare the first quality assessment result with the target quality assessment result; if the first quality assessment result is greater than the target quality assessment result, determine the block to be consensus as the block to be added to the chain, perform bookkeeping processing on the block to be added to the chain, delete the target block, and broadcast the block to be added to the chain to the nodes in the blockchain network respectively; if the first quality assessment result is equal to or less than the target quality assessment result, broadcast the target block to the nodes in the blockchain network respectively.
[0224] Assume that there are two blocks that have passed blockchain consensus in the blockchain consensus network. Please refer to Figure 11 , Figure 11 which is a schematic diagram of a data processing scenario provided by an embodiment of the present application. As Figure 11 shown, both the target block 90c and the block to be consensus 90e have passed blockchain consensus. To avoid blockchain forking, it is necessary to determine the block to be added to the chain among the target block 90c and the block to be consensus 90e. The determination process can be as follows: The central node 90b obtains the quality assessment results included in the two blocks respectively. Combining Figure 10 with the description in, the target block 90c includes the target quality assessment result 904f, and the block to be consensus 90e includes the first quality assessment result 902f. The central node 90b compares the target quality assessment result 904f and the first quality assessment result 902f. As Figure 11 shown, the comparison result 90i is obtained. If the comparison result 90i is that the target quality assessment result 904f is equal to or greater than the first quality assessment result 902f, the blockchain consensus network 90d determines the central node 90b as the leading central node and determines the target block 90c as the block to be added to the chain; if the comparison result 90i is that the target quality assessment result 904f is less than the first quality assessment result 902f, the blockchain consensus network 90d determines the central node 903h as the leading central node and determines the block to be consensus 90e as the block to be added to the chain.
[0225] Considering the total latency time and total energy consumption of all user nodes, how to dynamically determine the offloading method for each task to minimize the total waiting time and total energy consumption of all user nodes is the key to the cooperation between edge computing and cloud computing. With the maturity of edge computing technology, the method of offloading tasks to the edge has been applied in more and more fields. However, different from the stable urban environment, in harsh environments such as navigation, edge resources are more scarce and the reliability requirements are higher, which poses higher requirements for edge computing technology. Specifically, it is manifested as follows: 1) In a stable environment, there are many edge nodes and rich communication resources, while in a harsh environment, edge nodes are scarce and communication resources are scarce; 2) In a stable environment, there is less interference, while in a harsh environment, there are untrusted nodes and even the possibility of being maliciously attacked; 3) In a harsh environment, the network structure is unstable and there is a possibility that nodes suddenly disconnect; 4) In a stable environment, emphasis is placed on improving resource utilization efficiency and task offloading decision-making effects, while in a harsh environment, more attention needs to be paid to reliability and security. Therefore, how to make the edge offloading system capable of having a certain ability to resist harsh environments is becoming the key to the development of edge computing.
[0226] Combined with Figure 3 and Figure 7 the content in the corresponding embodiments, please refer to Figure 12 , Figure 12 is a schematic architecture diagram of a task offloading decision framework provided by an embodiment of the present application. As Figure 12 shown, the task offloading decision framework can include a user side - an edge side - a cloud side, and the three can be interconnected. The tasks of the user side (i.e., user nodes) can be offloaded to multiple edge servers or cloud servers.
[0227] As Figure 12 shown, after a task is generated, the user side transmits its task information to the task offloading decision algorithm (equivalent to the task decision model) located at the user side. After the task offloading decision algorithm determines the decision, the task is offloaded according to the decision to obtain an offloading result. At the same time, since the task offloading decision algorithm uses a neural network, in order to improve the training speed of the neural network at the user side, the present application introduces federated learning. Then, every other training time, the user side uploads the neural network parameters (i.e., sub-model parameters) to the edge server. The edge server aggregates the obtained sub-model parameters to the cloud server. The cloud server performs aggregation processing on the sub-model parameters, and then distributes the aggregated parameters (i.e., central model parameters) to the user side. According to the central model parameters, the user side updates the locally generated sub-model parameters. In order to ensure that the central model parameters will not be tampered with during the parameter update process, the present application introduces a blockchain-based data structure and ensures the security and efficiency of the parameter transfer process by creating a new consensus algorithm.
[0228] By introducing blockchain into federated learning, the security and stability of the central model parameter transmission process are ensured. In addition, the task offloading decision algorithm in the embodiment of the present application allows two mutually untrusted nodes to transmit information securely when disconnected from the trusted node.
[0229] In an embodiment of the present application, the sub-model parameters respectively provided by N user nodes are regarded as N transactions. For the task offloading decision scenario, the consensus process is designed to perform model decision quality evaluation on the N sub-model parameters respectively, that is, to evaluate the task offloading decision levels corresponding to the N sub-model parameters respectively; further, the sub-model parameters whose quality evaluation results meet the model consensus conditions are determined as target sub-model parameters, which is equivalent to retaining the sub-model parameters with high task offloading decision levels and eliminating the sub-model parameters with low task offloading decision levels; further, the target sub-model parameters respectively provided by different user nodes are aggregated to obtain central model parameters. Since the task offloading decision levels corresponding to the target sub-model parameters are all high, the aggregated central model parameters not only include the characteristics of the target sub-model parameters, but also have high levels of task offloading capability; further, a model decision quality assessment is performed on the central model parameters to obtain a target quality assessment result, a target block is generated according to the central model parameters and the target quality assessment result, and when the target block passes the blockchain consensus, the target block is broadcast to N user nodes respectively, that is, the central model parameters are decentralized to the user nodes in the form of blocks, so that before each user node performs accounting processing on the target block, the legitimacy of the target block can be verified by the target quality assessment result. When the result of the legitimacy verification indicates that the target block is a legal block, the user node obtains the task decision model including the central model parameters. Obviously, the task decision model generated by the present application can include model features corresponding to the sub-model parameters provided by different user nodes respectively, and has a high level of task offloading decision-making level. To sum up, by having different user nodes provide sub-model parameters respectively (that is, sub-model parameters are trained in parallel by different user nodes), the generation speed of the task decision model can be accelerated, which can save the time cost of data processing. Moreover, the present application does not need to directly obtain the training samples in each user node, thereby avoiding the problem of difficulty in obtaining training samples. Multiple sub-model parameters come from the training samples, so the decision accuracy of the task decision model can be guaranteed. By screening the sub-model parameters and obtaining the target sub-model parameters, the decision accuracy of the task decision model is further improved. In addition, through the target block, the central model parameters can be prevented from being stolen and tampered with, thereby improving the security of data processing.
[0230] For further information, see Figure 13 , Figure 13It is a schematic structural diagram of a data processing device provided by an embodiment of the present application. The above data processing device may be a computer program (including program code) running on a computer device. For example, the data processing device is an application software; the device may be used to execute corresponding steps in the method provided by the embodiment of the present application. As Figure 13 shown, the data processing device 1 may include: a first acquisition module 11, a first evaluation module 12, a second evaluation module 13, and a generation block module 14.
[0231] The first acquisition module 11 is configured to acquire N target information chains; N is a positive integer; each of the N target information chains includes sub-model parameters; the N sub-model parameters are respectively provided by N user nodes;
[0232] The first evaluation module 12 is configured to respectively perform model decision quality evaluation on the N sub-model parameters, and determine the sub-model parameters whose quality evaluation results meet the model consensus condition as target sub-model parameters; the total number of target sub-model parameters is less than or equal to N;
[0233] The second evaluation module 13 is configured to perform aggregation processing on the target sub-model parameters to obtain central model parameters, and perform model decision quality evaluation on the central model parameters to obtain a target quality evaluation result;
[0234] The generation block module 14 is configured to generate a target block according to the central model parameters and the target quality evaluation result. When the target block passes the blockchain consensus, broadcast the target block to the N user nodes respectively, so that each user node respectively performs legality verification on the target block according to the target quality evaluation result. When the result of the legality verification indicates that the target block is a legal block, obtain a task decision model including the central model parameters; the task decision model is used to decide the node for executing the task.
[0235] Among them, for the specific function implementation manners of the first acquisition module 11, the first evaluation module 12, the second evaluation module 13, and the generation block module 14, reference may be made to steps S101 - S104 in the corresponding embodiments above, which will not be elaborated here. Figure 3
[0236] Figure 13 Please refer to , the N sub-model parameters include sub-model parameter D i , i is a positive integer, and i is less than or equal to N;
[0237] The first evaluation module 12 may include: a first acquisition unit 121, a second acquisition unit 122, a third acquisition unit 123, and an evaluation model unit 124.
[0238] The first acquisition unit 121 is configured to acquire a simulation task, and acquire the one including sub-model parameter Di Task decision sub-model M i ;
[0239] The second acquisition unit 122 is configured to input the simulation task into the task decision sub-model M i , and obtain the task decision node for the simulation task output by the task decision sub-model M i ;
[0240] The third acquisition unit 123 is configured to obtain the task decision loss and obtain the task environment information according to the task decision node and the simulation task;
[0241] The evaluation model unit 124 is configured to perform model decision quality evaluation on the sub-model parameter D according to the task decision loss and the task environment information, and obtain the quality evaluation result corresponding to the sub-model parameter D i ; i ;
[0242] Among them, the specific functional implementation manners of the first acquisition unit 121, the second acquisition unit 122, the third acquisition unit 123, and the evaluation model unit 124 can refer to step S102 in the corresponding embodiment above, and will not be elaborated here. Figure 3 ;
[0243] Please refer to again Figure 13 , the task decision loss includes the task decision delay loss and the task decision energy consumption loss; the task environment information includes the task information and the environment information; the task information is used to characterize the basic information of the simulation task; the environment information is used to characterize the basic information of the task decision node;
[0244] The evaluation model unit 124 may include: a first processing subunit 1241, a second processing subunit 1242, a third processing subunit 1243, a fourth processing subunit 1244, and a first evaluation subunit 1245.
[0245] The first processing subunit 1241 is configured to perform normalization processing on the task decision delay loss to obtain the unitized task decision delay loss;
[0246] The first processing subunit 1241 is further configured to perform normalization processing on the task decision energy consumption loss to obtain the unitized task decision energy consumption loss;
[0247] The second processing subunit 1242 is configured to perform weighted summation processing on the unitized task decision delay loss and the unitized task decision energy consumption loss to obtain the unitized task decision loss;
[0248] The third processing subunit 1243 is configured to perform normalization processing on the task information to obtain the unitized task information;
[0249] The third processing subunit 1243 is further configured to normalize the environmental information to obtain the normalized environmental information;
[0250] The fourth processing subunit 1244 is configured to perform a summation process on the normalized task information and the normalized environmental information to obtain the normalized task-environment information;
[0251] The first evaluation subunit 1245 is configured to evaluate the decision-making quality of the sub-model parameters D according to the normalized task decision loss and the normalized task-environment information. i For model decision-making quality assessment.
[0252] Among them, the specific functional implementation manners of the first processing subunit 1241, the second processing subunit 1242, the third processing subunit 1243, the fourth processing subunit 1244, and the first evaluation subunit 1245 can refer to step S102 in the above Figure 3 corresponding embodiment and will not be elaborated here.
[0253] Please refer again to Figure 13 , the data processing device 1 may further include: a first determination module 15.
[0254] The first evaluation module 12 is further configured to obtain N quality evaluation results, compare the N quality evaluation results with the quality evaluation result threshold respectively to obtain N comparison results; the N comparison results include comparison result G j , where j is a positive integer and j is less than or equal to N; the comparison result G j includes a first comparison result or a second comparison result; the first comparison result is used to indicate that the quality evaluation result corresponding to the comparison result G j is less than the quality evaluation result threshold; the second comparison result is used to indicate that the quality evaluation result corresponding to the comparison result G j is equal to or greater than the quality evaluation result threshold;
[0255] The first determination module 15 is configured to, if the comparison result G j is the second comparison result, determine that the quality evaluation result corresponding to the comparison result G j meets the model consensus condition;
[0256] The first determination module 15 is further configured to, if the comparison result G j is the first comparison result, determine that the quality evaluation result corresponding to the comparison result G j does not meet the model consensus condition, and delete the sub-model parameters whose quality evaluation results do not meet the model consensus condition.
[0257] Among them, the specific functional implementation manners of the first evaluation module 12 and the first determination module 15 can refer to the above Figure 7Steps S204 - S205 in the corresponding embodiment are not elaborated here.
[0258] Please refer again to Figure 13 , the target sub - model parameters include A target sub - model parameters, where A is a positive integer and A is less than or equal to N;
[0259] The second evaluation module 13 may include: a first summing unit 131, a fourth obtaining unit 132, and a second summing unit 133.
[0260] The first summing unit 131 is used to obtain the sub - quantities of training samples corresponding to the A target sub - model parameters respectively, sum the A sub - quantities of training samples to obtain the total quantity of training samples; the A target sub - model parameters include the target sub - model parameter Z t , the A sub - quantities of training samples include the sub - quantity of training samples Y t corresponding to the target sub - model parameter Z t ; t is a positive integer and t is less than or equal to A;
[0261] The fourth obtaining unit 132 is used to obtain the operator result of the target sub - model parameter Z t and the sub - quantity of training samples Y t ;
[0262] The second summing unit 133 is used to sum the operator results corresponding to the A target sub - model parameters respectively to obtain the total operator result, and determine the central model parameter according to the total operator result and the total quantity of training samples.
[0263] Among them, the specific functional implementation manners of the first summing unit 131, the fourth obtaining unit 132, and the second summing unit 133 can refer to step S103 in the above Figure 3 corresponding embodiment, which is not elaborated here.
[0264] Please refer again to Figure 13 , the generating block module 14 may include: a first generating unit 141, a second generating unit 142, and a second generating unit 143.
[0265] The first generating unit 141 is used to obtain the iteration number corresponding to the central model parameter, and generate a target block according to the iteration number, the central model parameter, and the target quality evaluation result;
[0266] The second generating unit 142 is used to obtain the first digital digest of the target block, encrypt the first digital digest according to the private key to obtain the first digital signature;
[0267] The second generating unit 143 is further used to add the first digital signature to the target block; the first digital signature is used to indicate that N user nodes perform a source - legality verification signature on the target block.
[0268] Among them, for the specific functional implementation manners of the first generation unit 141, the second generation unit 142, and the third generation unit 143, reference may be made to step S104 in the corresponding embodiment above, which will not be elaborated here. Figure 3 Corresponding to step S104 in the corresponding embodiment, it will not be elaborated here.
[0269] Please refer to Figure 13 , the data processing device 1 may further include: a second determination module 16.
[0270] The first acquisition module 11 is further configured to acquire C information chains to be verified; C is a positive integer and C is greater than or equal to N; each of the C information chains to be verified includes sub-model parameters; the C sub-model parameters are respectively provided by C user nodes; N user nodes belong to the C user nodes; the N sub-model parameters belong to the C sub-model parameters;
[0271] The second determination module 16 is configured to verify each of the C information chains to be verified, and determine the information chains to be verified whose verification results meet the quality assessment conditions as target information chains.
[0272] Among them, for the specific functional implementation manners of the first acquisition module 11 and the second determination module 16, reference may be made to steps S201 - S202 in the corresponding embodiment above, which will not be elaborated here. Figure 7 Corresponding to steps S201 - S202 in the corresponding embodiment, it will not be elaborated here.
[0273] Please refer to Figure 13 , each of the C information chains to be verified includes the number of iterations to be verified;
[0274] The second determination module 16 may include: a first verification unit 161 and a second verification unit 162.
[0275] The first verification unit 161 is configured to verify each of the C information chains to be verified according to the C numbers of iterations to be verified, and add the information chains to be verified whose numbers of iterations to be verified are equal to the legal number of iterations to the set of information chains to be verified; the total number of the information chains to be verified in the set of information chains to be verified is less than or equal to C, and the total number of the information chains to be verified in the set of information chains to be verified is equal to or greater than N; the information chains to be verified in the set of information chains to be verified further include a second digital signature;
[0276] The second verification unit 162 is configured to verify the information chains to be verified in the set of information chains to be verified according to the second digital signature, and determine the information chains to be verified whose verification results meet the quality assessment conditions as target information chains.
[0277] Among them, for the specific functional implementation manners of the first verification unit 161 and the second verification unit 162, reference may be made to step S202 in the corresponding embodiment above, which will not be elaborated here. Figure 7 Corresponding to step S202 in the corresponding embodiment, it will not be elaborated here.
[0278] Please refer to again Figure 13 The information chain set to be verified includes the information chain F to be verified x where x is a positive integer and x is less than or equal to the total number of information chains to be verified in the information chain set to be verified; the second digital signature includes the second digital signature J in the information chain F to be verified x x ;
[0279] The second verification unit 162 may include: a first acquisition subunit 1621, a second acquisition subunit 1622, a first determination subunit 1623, and a second determination subunit 1624
[0280] The first acquisition subunit 1621 is configured to decrypt the second digital signature J according to the public key associated with the information chain F to be verified x and obtain a second digital digest x ;
[0281] The second acquisition subunit 1622 is configured to acquire the data to be verified in the information chain F to be verified; the data to be verified includes the legal iteration times and the sub-model parameters of the information chain F to be verified x x ;
[0282] The second acquisition subunit is further configured to acquire a third digital digest of the data to be verified, and compare the second digital digest with the third digital digest
[0283] The first determination subunit 1623 is configured to determine that the verification result of the information chain F to be verified meets the quality assessment condition if the second digital digest is the same as the third digital digest x ;
[0284] The second determination subunit 1624 is configured to determine that the verification result of the information chain F to be verified does not meet the quality assessment condition if the second digital digest is different from the third digital digest, and delete the information chain to be verified whose verification result does not meet the quality assessment condition x
[0285] Among them, the specific functional implementation manners of the first acquisition subunit 1621, the second acquisition subunit 1622, the first determination subunit 1623, and the second determination subunit 1624 may refer to step S202 in the corresponding embodiment above Figure 7 and will not be elaborated here
[0286] Please refer to again Figure 13 The block generation module 14 may include: a first broadcast unit 143 and a second broadcast unit 144
[0287] The first broadcasting unit 143 is configured to broadcast a target block in the blockchain consensus network, so that the central node in the blockchain consensus network conducts consensus on the target block according to the central model parameters and the target quality assessment result;
[0288] The second broadcasting unit 144 is configured to, when the target block passes the blockchain consensus and the block to be consensus broadcast by the central node has not passed the blockchain consensus yet, broadcast the target block to the nodes in the blockchain network respectively; the blockchain network includes the blockchain consensus network; the nodes in the blockchain network include N user nodes and the central node; the central node is configured to delete the block to be consensus and conduct bookkeeping processing on the target block when the target block passes the blockchain consensus.
[0289] Among them, for the specific functional implementation manners of the first broadcasting unit 143 and the second broadcasting unit 144, reference can be made to step S208 in the corresponding Figure 7 embodiment, which will not be elaborated here.
[0290] Please refer to Figure 13 again. The block generation module 14 may further include: a fifth acquisition unit 145.
[0291] The fifth acquisition unit 145 is configured to acquire the first quality assessment result in the block to be consensus when the target block passes the blockchain consensus and the block to be consensus passes the blockchain consensus;
[0292] The fifth acquisition unit 145 is further configured to compare the first quality assessment result with the target quality assessment result;
[0293] The second broadcasting unit 144 is further configured to, if the first quality assessment result is greater than the target quality assessment result, determine the block to be consensus as the block to be uploaded to the chain, conduct bookkeeping processing on the block to be uploaded to the chain, delete the target block, and broadcast the block to be uploaded to the chain to the nodes in the blockchain network respectively;
[0294] The second broadcasting unit 144 is further configured to, if the first quality assessment result is equal to or less than the target quality assessment result, broadcast the target block to the nodes in the blockchain network respectively.
[0295] Among them, for the specific functional implementation manners of the second broadcasting unit 144 and the fifth acquisition unit 145, reference can be made to step S208 in the corresponding Figure 7 embodiment, which will not be elaborated here.
[0296] Please refer to Figure 13 again. The block generation module 14 may further include: a sixth acquisition unit 146.
[0297] A sixth acquisition unit 146 is configured to perform blockchain consensus on a block to be consensus when the target block fails blockchain consensus and a block to be consensus broadcast by the central node is acquired; the block to be consensus is generated by the central node according to H sub-model parameters, and the H sub-model parameters are different from the N sub-model parameters; the H sub-model parameters are respectively provided by H user nodes, the H user nodes communicate with the central node, and the H user nodes are different from the N user nodes; H is a positive integer.
[0298] The second broadcast unit 144 is further configured to, if the target block still fails blockchain consensus when the block to be consensus passes blockchain consensus, determine the block to be consensus as the block to be uploaded, perform accounting processing on the block to be uploaded, delete the target block, and broadcast the block to be uploaded to the nodes in the blockchain network respectively.
[0299] Among them, the specific functional implementation manners of the second broadcast unit 144 and the sixth acquisition unit 146 can refer to step S208 in the corresponding Figure 7 embodiment, which will not be elaborated here.
[0300] Please refer to Figure 13 again, the sixth acquisition unit 146 may include: a third acquisition subunit 1461, a second evaluation subunit 1462, and a third determination subunit 1463.
[0301] The third acquisition subunit 1461 is configured to acquire the center model parameters to be consensus and the first quality evaluation result in the block to be consensus;
[0302] The second evaluation subunit 1462 is configured to perform model decision quality evaluation on the center model parameters to be consensus to obtain a second quality evaluation result;
[0303] The third determination subunit 1463 is configured to determine the difference between the first quality evaluation result and the second quality evaluation result, and compare the difference with a difference threshold;
[0304] The third determination subunit 1463 is further configured to, if the difference is less than or equal to the difference threshold, the consensus result for the block to be consensus is consensus passed;
[0305] The third determination subunit 1463 is further configured to, if the difference is greater than the difference threshold, the consensus result for the block to be consensus is consensus failed.
[0306] Among them, the specific functional implementation manners of the third acquisition subunit 1461, the second evaluation subunit 1462, and the third determination subunit 1463 can refer to step S208 in the corresponding Figure 7 embodiment, which will not be elaborated here.
[0307] In the embodiments of the present application, the sub-model parameters respectively provided by N user nodes are regarded as N transactions. For the task offloading decision scenario, the consensus process is designed to evaluate the model decision quality of the N sub-model parameters respectively, that is, to evaluate the task offloading decision levels corresponding to the N sub-model parameters respectively; further, the sub-model parameters whose quality evaluation results meet the model consensus conditions are determined as the target sub-model parameters, which is equivalent to retaining the sub-model parameters with high task offloading decision levels and eliminating the sub-model parameters with low task offloading decision levels; further, the target sub-model parameters respectively provided by different user nodes are aggregated to obtain the central model parameters. Since the task offloading decision levels corresponding to the target sub-model parameters are all high, the aggregated central model parameters not only include the characteristics of the target sub-model parameters, but also have a high level of task offloading ability; further, the model decision quality of the central model parameters is evaluated to obtain the target quality evaluation result, and a target block is generated according to the central model parameters and the target quality evaluation result. When the target block passes the blockchain consensus, the target block is broadcast to the N user nodes respectively, that is, the central model parameters are distributed to the user nodes in the form of blocks, so that before each user node performs bookkeeping processing on the target block, the target block can be verified for legality through the target quality evaluation result. When the result of the legality verification indicates that the target block is a legal block, the user node obtains the task decision model including the central model parameters. Obviously, the task decision model generated by the present application can include the model characteristics corresponding to the sub-model parameters respectively provided by different user nodes and has a high level of task offloading decision level. In summary, by respectively providing sub-model parameters by different user nodes (that is, training sub-model parameters in parallel by different user nodes), the generation speed of the task decision model can be accelerated, the time cost of data processing can be saved, and the present application does not need to directly obtain the training samples in each user node, thereby avoiding the problem of difficult acquisition of training samples. And since multiple sub-model parameters come from training samples, the decision accuracy of the task decision model can be guaranteed. By screening the sub-model parameters to obtain the target sub-model parameters, the decision accuracy of the task decision model is further improved; in addition, through the target block, the central model parameters can be prevented from being stolen and tampered with, thereby improving the security of data processing.
[0308] Further, please refer to Figure 14 , Figure 14 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 14 shown, the computer device 1000 may be the above Figure 3For the full - scale nodes in the corresponding embodiments, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI - FI interface). The memory 1005 may be a high - speed RAM memory or a non - volatile memory, such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located far from the aforementioned processor 1001. As Figure 14 shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0309] In Figure 14 the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for users; and the processor 1001 can be used to call the device control application program stored in the memory 1005 to implement:
[0310] Obtain N target information chains; N is a positive integer; each of the N target information chains includes sub - model parameters; the N sub - model parameters are respectively provided by N user nodes;
[0311] Respectively perform model decision quality evaluation on the N sub - model parameters, and determine the sub - model parameters whose quality evaluation results meet the model consensus condition as target sub - model parameters; the total number of target sub - model parameters is less than or equal to N;
[0312] Perform aggregation processing on the target sub - model parameters to obtain central model parameters, and perform model decision quality evaluation on the central model parameters to obtain a target quality evaluation result;
[0313] Generate a target block according to the central model parameters and the target quality evaluation result. When the target block passes the blockchain consensus, broadcast the target block to the N user nodes respectively, so that each user node respectively verifies the legitimacy of the target block according to the target quality evaluation result. When the result of the legitimacy verification indicates that the target block is a legal block, obtain a task decision model containing the central model parameters; the task decision model is used to decide the nodes for executing tasks.
[0314] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the foregoing Figure 3 、Figure 4b and Figure 7 the description of the data processing method in the corresponding embodiment can also execute the foregoing Figure 13 the description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated either.
[0315] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, they implement Figure 3 , Figure 4b and Figure 7 the data processing methods provided by each step in Figure 3 , Figure 4b and Figure 7 The implementation manners provided by each step will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated either.
[0316] The above computer-readable storage medium may be the data processing device provided in any of the foregoing embodiments or the internal storage unit of the above computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store the data that has been output or will be output.
[0317] The embodiment of the present application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions. The computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device can execute the description of the data processing method in the corresponding embodiments of the foregoing Figure 3 , Figure 4b and Figure 7 will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated either.
[0318] In the description, claims, and accompanying drawings of the embodiments of the present application, terms such as "first" and "second" are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally further include steps or modules not listed, or may optionally further include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0319] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0320] The methods and related apparatuses provided by the embodiments of the present application are described with reference to the method flowcharts and / or structural schematic diagrams provided by the embodiments of the present application. Specifically, each process and / or block of the method flowchart and / or structural schematic diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one process or multiple processes of the flowchart and / or one block or multiple blocks of the structural schematic diagram. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in one process or multiple processes of the flowchart and / or one block or multiple blocks of the structural schematic diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process or multiple processes of the flowchart and / or one block or multiple blocks of the structural schematic diagram.
[0321] The above disclosure is only the preferred embodiment of the present application. Of course, the scope of rights of the present application cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A data processing method, characterized in that, Including: Obtain N target information chains; N is a positive integer; each of the N target information chains includes sub-model parameters; The N sub-model parameters are respectively provided by N user nodes; the N sub-model parameters include sub-model parameter D i , where i is a positive integer and i is less than or equal to N; Obtain a simulation task and obtain the task decision sub-model M that includes the sub-model parameter D i i ; Input the simulation task into the task decision sub-model M i to obtain the task decision node for the simulation task output by the task decision sub-model M i By simulating the decision-making process among the user nodes, the task decision node, and the simulation tasks, obtain a task decision loss for characterizing the time consumption and energy consumption; Obtain task environment information; The task environment information includes task information and environment information; The task information is used to characterize the corresponding computing amount and task size of the simulation task; the environment information is used to characterize the communication information and computing power of the edge server indicated by the task decision node; Based on the task decision loss and the task environment information, the sub-model parameters D i are evaluated for model decision quality to obtain the quality evaluation result corresponding to the sub-model parameters D i ; Determine the sub-model parameters whose quality evaluation results meet the model consensus condition among the quality evaluation results corresponding to the N sub-model parameters as the target sub-model parameters; the total number of the target sub-model parameters is less than or equal to N; Perform an aggregation process on the target sub-model parameters to obtain a central model parameter, and perform a model decision quality evaluation on the central model parameter to obtain a target quality evaluation result; Generate a target block according to the central model parameter and the target quality evaluation result. When the target block passes the blockchain consensus, broadcast the target block to the N user nodes respectively, so that each user node verifies the legality of the target block according to the target quality evaluation result. When the result of the legality verification indicates that the target block is a legal block, obtain a task decision model including the central model parameter; the task decision model is used to decide the node for executing the task.
2. The method according to claim 1, characterized in that, The task decision loss includes a task decision delay loss and a task decision energy consumption loss; Based on the task decision loss and the task environment information, for the sub-model parameter D i perform model decision quality evaluation, including: Perform a normalization process on the task decision delay loss to obtain a unitized task decision delay loss; Perform a normalization process on the task decision energy consumption loss to obtain a unitized task decision energy consumption loss; Perform a weighted summation process on the unitized task decision delay loss and the unitized task decision energy consumption loss to obtain a unitized task decision loss; Perform a normalization process on the task information to obtain a unitized task information; Perform a normalization process on the environment information to obtain a unitized environment information; Perform a summation process on the unitized task information and the unitized environment information to obtain a unitized task environment information; Based on the unitized task decision loss and the unitized task environment information, the sub-model parameters D i are evaluated for model decision quality.
3. The method according to claim 1, wherein The method further includes: Obtain N quality assessment results, and compare the N quality assessment results with a quality assessment result threshold respectively to obtain N comparison results; the N comparison results include comparison result G j , where j is a positive integer and j is less than or equal to N; the comparison result G j includes a first comparison result or a second comparison result; the first comparison result is used to represent that the quality assessment result corresponding to the comparison result G j is less than the quality assessment result threshold; the second comparison result is used to represent that the quality assessment result corresponding to the comparison result G j is equal to or greater than the quality assessment result threshold; If the comparison result G j is the second comparison result, it is determined that the quality evaluation result corresponding to the comparison result G j meets the model consensus condition; If the comparison result G j is the first comparison result, it is determined that the quality evaluation result corresponding to the comparison result G j does not meet the model consensus condition, and the sub-model parameters with quality evaluation results not meeting the model consensus condition are deleted.
4. The method according to claim 1, wherein The target sub-model parameters include A target sub-model parameters, A is a positive integer and A is less than or equal to N; The performing an aggregation process on the target sub-model parameters to obtain a central model parameter includes: Obtain the number of training sample subsets corresponding to the A target sub-model parameters respectively, sum up the A numbers of training sample subsets to obtain the total number of training samples; the A target sub-model parameters include the target sub-model parameter Z t , the A numbers of training sample subsets include the target sub-model parameter Z t The corresponding number of training sample subsets Y t ; t is a positive integer and t is less than or equal to A; Obtain the target sub-model parameter Z t and the number of training sample subsets Y t for the operator result; Sum the operator results corresponding to the A target sub-model parameters respectively to obtain a total operation result, and determine the central model parameter according to the total operation result and the total number of training samples.
5. The method according to claim 1, characterized in that The generating a target block according to the central model parameter and the target quality evaluation result includes: Obtain the iteration number corresponding to the central model parameter, and generate the target block according to the iteration number, the central model parameter, and the target quality evaluation result; Obtain the first digital digest of the target block, and encrypt the first digital digest according to the private key to obtain the first digital signature; Add the first digital signature to the target block; the first digital signature is used to indicate that the N user nodes perform a source legality signature verification on the target block.
6. The method according to claim 1, wherein The method further includes: Obtain C information chains to be verified; C is a positive integer and C is greater than or equal to N; each of the C information chains to be verified includes sub-model parameters; the C sub-model parameters are respectively provided by C user nodes; the N user nodes belong to the C user nodes; the N sub-model parameters belong to the C sub-model parameters; Verify each of the C information chains to be verified, and determine the information chain to be verified whose verification result meets the quality assessment condition as the target information chain.
7. The method according to claim 6, characterized in that, Each of the C information chains to be verified includes the number of iterations to be verified; The step of verifying each of the C information chains to be verified and determining the information chain to be verified whose verification result meets the quality assessment condition as the target information chain includes: Verify each of the C information chains to be verified according to the C numbers of iterations to be verified, and add the information chain to be verified whose number of iterations to be verified is equal to the legal number of iterations to the set of information chains to be verified; the total number of information chains to be verified in the set of information chains to be verified is less than or equal to C, and the total number of information chains to be verified in the set of information chains to be verified is greater than or equal to N; the information chains to be verified in the set of information chains to be verified further include a second digital signature; Verify the information chains to be verified in the set of information chains to be verified according to the second digital signature, and determine the information chain to be verified whose verification result meets the quality assessment condition as the target information chain.
8. The method according to claim 7, wherein The information chain set to be verified includes the information chain F to be verified x , where x is a positive integer and x is less than or equal to the total number of information chains to be verified in the information chain set to be verified; the second digital signature includes the second digital signature J x in the information chain F x ; The step of verifying the information chains to be verified in the set of information chains to be verified according to the second digital signature includes: According to the public key associated with the information chain F to be verified x decrypt the second digital signature J x to obtain a second digital digest; Obtain the information chain F to be verified x the data to be verified therein; the data to be verified includes the legal iteration times and the sub-model parameters of the information chain F x ; Obtain the third digital digest of the data to be verified, and compare the second digital digest with the third digital digest; If the second digital digest is the same as the third digital digest, it is determined that the verification result of the information chain F to be verified x meets the quality assessment conditions; If the second digital digest is different from the third digital digest, determine that the verification result of the information chain F to be verified x does not meet the quality assessment conditions, and delete the information chain to be verified whose verification result does not meet the quality assessment conditions.
9. The method according to claim 1, characterized in that, When the target block passes blockchain consensus, broadcast the target block to the N user nodes respectively, including: Broadcast the target block in the blockchain consensus network, so that the central node in the blockchain consensus network performs consensus on the target block according to the central model parameters and the target quality assessment result; When the target block passes blockchain consensus and the block to be consensus broadcast by the central node has not passed blockchain consensus yet, broadcast the target block to the nodes in the blockchain network; the blockchain network includes the blockchain consensus network; the nodes in the blockchain network include the N user nodes and the central node; the central node is used to delete the block to be consensus and perform bookkeeping processing on the target block when the target block passes blockchain consensus.
10. The method according to claim 9, wherein The method further includes: When the target block passes blockchain consensus and the block to be consensus passes blockchain consensus, obtain the first quality assessment result in the block to be consensus; Compare the first quality assessment result with the target quality assessment result; If the first quality assessment result is greater than the target quality assessment result, the block to be consensus-determined is determined as the block to be uploaded to the blockchain, accounting processing is performed on the block to be uploaded to the blockchain, the target block is deleted, and the block to be uploaded to the blockchain is broadcast to the nodes in the blockchain network respectively; If the first quality assessment result is equal to or less than the target quality assessment result, the target block is broadcast to the nodes in the blockchain network respectively.
11. The method according to claim 9, wherein, The method further includes: When the target block fails blockchain consensus and the block to be consensus-determined broadcast by the central node is obtained, blockchain consensus is performed on the block to be consensus-determined; the block to be consensus-determined is generated by the central node according to H sub-model parameters, and the H sub-model parameters are different from the N sub-model parameters; the H sub-model parameters are provided by H user nodes respectively, the H user nodes communicate with the central node, and the H user nodes are different from the N user nodes; H is a positive integer; If the target block still fails blockchain consensus when the block to be consensus-determined passes blockchain consensus, the block to be consensus-determined is determined as the block to be uploaded to the blockchain, accounting processing is performed on the block to be uploaded to the blockchain, the target block is deleted, and the block to be uploaded to the blockchain is broadcast to the nodes in the blockchain network respectively.
12. The method according to claim 11, wherein Performing blockchain consensus on the block to be consensus-determined includes: Obtaining the center model parameters to be consensus-determined and the first quality assessment result in the block to be consensus-determined; Performing model decision quality assessment on the center model parameters to be consensus-determined to obtain a second quality assessment result; Determining the difference between the first quality assessment result and the second quality assessment result, and comparing the difference with a difference threshold; If the difference is less than or equal to the difference threshold, the consensus result for the block to be consensus-determined is consensus passed; If the difference is greater than the difference threshold, the consensus result for the block to be consensus-determined is consensus failed.
13. A computer device, characterized in that, including: A processor, a memory, and a network interface; The processor is connected to the memory and the network interface. Among them, the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and the computer program is suitable for being loaded and executed by the processor so that the computer device with the processor executes the method according to any one of claims 1-12.
Citation Information
Patent Citations
Marine Internet of Things data security sharing method under edge computing framework based on federated learning and block chain technology
CN112348204A