Blockchain-based edge computing systems and methods

CN117395247BActive Publication Date: 2026-06-19CHINA MOBILE GROUP ZHEJIANG +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE GROUP ZHEJIANG
Filing Date
2022-06-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, edge node training sample data is limited, resulting in low continuous learning efficiency and accuracy. The synchronization efficiency between cloud and edge models is also low, and version inconsistencies are prone to occur.

Method used

A blockchain-based edge computing system is adopted to achieve distributed continuous learning across edge nodes through the blockchain network. Blockchain smart contracts are used to automatically optimize and synchronize model parameters. Computation smart contracts and model smart contracts are integrated to achieve continuous optimization and automated management of the model.

Benefits of technology

It increases the amount and efficiency of sample data for continuous learning, ensures the accuracy and consistency of learning, reduces human operation and maintenance costs, avoids model version inconsistencies and resource waste, and improves the stability and timeliness of inference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117395247B_ABST
    Figure CN117395247B_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain-based edge computing system and method. The system includes: a cloud center for accepting computing requests initiated by clients and returning the computing results to the clients; a computing application layer for responding to computing requests using a polling algorithm and determining whether the deep learning model used for computing needs optimization; a consensus node layer for forming a consensus on the computing results based on the blockchain network and producing blocks, and obtaining the parameters required for deep learning model optimization based on the block production results; and a ledger node layer for continuously optimizing computing tasks and deep learning models according to preset computing smart contracts and model smart contracts. Through the above methods, this invention achieves the standardization and continuous optimization of computing models across edge nodes, significantly reduces the amount of interaction between edge nodes and the cloud, greatly improves computing efficiency, timeliness, and stability, and has strong practicality and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet and communication convergence technology, and specifically to a blockchain-based edge computing system and method. Background Technology

[0002] As artificial intelligence (AI) technology is applied across various industries, the development of related applications is attracting increasing attention, and the use of AI technology in edge computing scenarios is becoming more and more common. Traditionally, AI models are trained in the cloud, and the trained neural network is a static entity that, after simple processing, is distributed to the edge for computational inference tasks. Continuous learning transforms the traditional deep learning model into a dynamically optimized one; that is, the model deployed at the edge, in addition to performing computational inference tasks, continuously adjusts and optimizes the model based on the computational or inference results. Figure 6 The edge computing architecture diagram shows that: a basic deep learning model is obtained by training on existing data in the cloud; this basic deep learning model is distributed to edge nodes 1 to N for inference tasks, such as face recognition; each edge node continuously learns by combining its own inference task situation with the acquired data, that is, it continuously optimizes the local deep learning model of the edge node and performs new inference tasks based on the optimized model; every period T, the latest models (parameters) of edge nodes 1 to N are aggregated to the cloud for integration, that is, the basic model is adjusted by comparing the model parameters of each edge node to obtain a new version of the basic model. The model adjustment process is described in [reference needed]. Figure 7 As shown; then repeat the steps above.

[0003] The existing technical solutions have the following drawbacks: (1) The training sample data of a single edge node is relatively simple, and each edge node learns continuously based on its own sample data, resulting in slow performance improvement; (2) The data of each edge node is independent, and the model of a single node cannot be directly synchronized with other nodes after optimization. It needs to be synchronized with other edge nodes through the cloud, and the efficiency and accuracy of continuous learning cannot be guaranteed; (3) The cloud pushes the model to the edge generally adopts the traditional C / S architecture. When there are many edge nodes and the model is large, the cloud pushes the model to the edge in a long time, with low efficiency and easy inconsistencies in the model versions of each edge. Therefore, it is urgent to design a new solution to solve the above technical problems. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a blockchain-based edge computing system and method that overcomes or at least partially solves the above problems.

[0005] According to one aspect of the present invention, a blockchain-based edge computing system is provided, the system comprising:

[0006] The cloud center is used to accept computing requests initiated by clients, and when computing results are obtained through interaction with edge nodes, it returns the computing results to the clients.

[0007] The computation application layer is used to respond to the computation request through a polling algorithm and determine whether the deep learning model used for computation needs to be optimized.

[0008] The consensus node layer is used to form a consensus on the computation results and produce blocks based on the blockchain network. When it is necessary to optimize the deep learning model, the parameters required for the optimization of the deep learning model are obtained based on the block production results.

[0009] The ledger node layer is used to continuously optimize the computing tasks and the deep learning model according to the preset computing smart contracts and model smart contracts. The computing smart contracts and model smart contracts are the deep learning model contractualized and deployed in the blockchain network.

[0010] Optionally, the cloud center is also used for:

[0011] Responsible for training and distributing the deep learning model.

[0012] Optionally, the consensus node layer is further used for:

[0013] The computation request is sent to the elected master node, which endorses the transaction, and each slave node performs a simulated transaction and verifies it according to the endorsement algorithm.

[0014] If the endorsement algorithm verification is successful, then the block generation algorithm verification will be performed.

[0015] If the block generation algorithm verification is successful, then block generation is confirmed;

[0016] Upon confirmation of block production, the optimization results of the model parameters corresponding to the edge node are obtained, which facilitates writing the parameter optimization results into the blockchain ledger.

[0017] The transaction refers to a single execution of the computation request on the blockchain network.

[0018] Optionally, the endorsement algorithm includes:

[0019] Determine if n = r > 0? n+1:n

[0020] In the above function, n represents the number of endorsements passed, r represents the calculation result, r>0 means the calculation was successful and the endorsement is valid, in which case the number of endorsement passed nodes is incremented by 1, otherwise it remains unchanged;

[0021] Compare the number of nodes \(n\) that pass the endorsement with the first threshold \(s\). If \(n > s\), the endorsement is successful. If \(n < s\), the endorsement fails this time.

[0022] Optionally, the block generation algorithm includes:

[0023] Summation

[0024] In this function, \(n\) represents the number of nodes, and \(x\) n represents the endorsement result of the \(n\)th node, and \(x\) n being 1 indicates that the endorsement passes, and \(x\) n being -1 indicates that the endorsement fails;

[0025] If the result value of the above summation is greater than 0, the transaction generates a block; otherwise, it does not generate a block.

[0026] Optionally, the computing smart contract is used for:

[0027] When an edge node executes a computing task, record the computing object and computing result of this computing task on the blockchain ledger and synchronize them to other edge nodes. Each operation of an edge node on the ledger is regarded as a transaction, and the processing rules of the transaction are the same as those in the consensus.

[0028] Judge whether the current computing task is the same as the historical computing task. Compare the difference between object A in the current computing task and the computing object \(i\) (\(i = 1\sim N\), \(N\) is the total number of historical tasks) of the historical task. If the difference between object A and object \(K\) (\(0 < K < N + 1\)) is less than the second threshold \(m\), it is determined that object A is the same as object K, and it is determined that the computing task to which object A belongs is the same as the task to which object K belongs;

[0029] For the same computing task, the computing application skips execution, directly copies the historical computing result and returns; otherwise, enter the computing application process, record the computing result, and synchronize it to other edge nodes.

[0030] Optionally, the model smart contract is used for:

[0031] Vote to elect the master node, and the remaining edge nodes are slave nodes; after deploying the deep learning model on the edge nodes, when an edge node executes a computing task, the counter is incremented by 1. When the count value of the edge node reaches the preset value \(T\), the counter is cleared and an election vote is initiated. The voting election is implemented based on the Raft protocol, that is, the edge node that initiates the vote earliest in the order of timestamps is elected as the master node, and the remaining edge nodes are slave nodes;

[0032] The master node reads the blockchain's computational data ledger, obtains the full computational data, and divides it according to time t. Data with timestamps less than t is assigned to dataset D, and data with timestamps greater than t is assigned to dataset D'. The master node reads the blockchain's model parameter ledger, obtains the latest model M and parameter set P in the model parameter ledger, preprocesses the model parameter set using the EWC algorithm, and then trains a new model M' based on model M and dataset D'.

[0033] The model M' on the master node is synchronized to each slave node via a P2P network.

[0034] Optionally, the accounting node layer is also used for:

[0035] The sample dataset in the blockchain network is stored and used for training or computation of each edge node.

[0036] According to another aspect of the present invention, a blockchain-based edge computing method is provided, the method comprising:

[0037] Accept computation requests initiated by clients, and when computation results are obtained through interaction with edge nodes, return the computation results to the clients;

[0038] Used to respond to the computation request using a polling algorithm, and to determine whether the deep learning model used for computation needs to be optimized;

[0039] Consensus on computation results is formed and blocks are generated based on the blockchain network. When it is necessary to optimize the deep learning model, the parameters required for optimization of the deep learning model are obtained based on the results of the generated blocks.

[0040] Based on preset computational smart contracts and model smart contracts, continuous optimization of computational tasks and the deep learning model is achieved. The computational smart contracts and model smart contracts are the contractualized deep learning model deployed in the blockchain network.

[0041] According to another aspect of the present invention, a computer storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform operations corresponding to the blockchain-based edge computing method described above.

[0042] The blockchain-based edge computing system proposed according to this invention enables continuous learning based on deep learning model parameter updates. Firstly, based on blockchain smart contract technology, it realizes a distributed continuous learning network across edge nodes. This distributed network aggregates and integrates data collected from N edge nodes, increasing the amount of sample data required for continuous learning and ensuring its efficiency, accuracy, and consistency. Secondly, the system supports statistical analysis of historical computational inference tasks. For similar or identical computational inference objectives, it can directly provide calculation results by referring to historical tasks, avoiding wasted computational inference resources. Thirdly, based on a P2P network, the system automates model synchronization among edge nodes, eliminating the need for manual adjustment of model parameters and repeated cloud-to-edge model distribution and synchronization. This effectively reduces manpower maintenance costs, minimizes human intervention, and ensures the stability of continuous learning.

[0043] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0044] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0045] Figure 1 A schematic diagram of the structure of a blockchain-based edge computing system provided in an embodiment of the present invention is shown;

[0046] Figure 2 This invention illustrates a flowchart of transaction endorsement and transaction block creation in the consensus node layer according to an embodiment of the present invention;

[0047] Figure 3 This invention illustrates a flowchart of executing computational tasks in a computational smart contract according to an embodiment of the present invention;

[0048] Figure 4 This invention provides a flowchart illustrating the generation of a new model in a smart contract according to an embodiment of the present invention.

[0049] Figure 5 A flowchart of a blockchain-based edge computing method provided by an embodiment of the present invention is shown;

[0050] Figure 6 A structural diagram of an edge computing framework in the prior art is shown;

[0051] Figure 7 A flowchart illustrating the adjustment of model parameters in the prior art is shown. Detailed Implementation

[0052] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0053] Figure 1 A schematic diagram of a blockchain-based edge computing system according to one embodiment of the present invention is shown. This structure can be applied to Internet of Things (IoT) structures or mobile communication-based edge computing network structures. Figure 1 As shown, the system includes a cloud center, an edge computing network, and a blockchain network. The edge computing network includes multiple edge computing devices such as computers or servers. Each edge computing device mainly performs edge computing (inference) based on deep learning models, including but not limited to image recognition such as facial recognition, speech recognition, and text recognition, as well as other computational or inference tasks.

[0054] This invention deploys distributed nodes in the blockchain network to the edge nodes that perform continuous learning. By leveraging the ledger data sharing feature of each blockchain node, the amount of data available to each edge node is increased, improving the accuracy of inference results. This reduces the interaction between the cloud and the nodes, thus improving the quality of inference. At the same time, blockchain smart contracts are used to automatically optimize the continuous learning model, reducing human maintenance costs and improving the efficiency and accuracy of continuous learning.

[0055] It should be noted that the blockchain-based edge computing system is implemented according to the following physical structure and functional layering, but is not limited to the above-mentioned division of structure and function. Other similar structures and functions are also within the protection scope of this invention.

[0056] First, the cloud center, as the top-level module, can be used to accept computing requests initiated by clients, and when computing results are obtained through interaction with edge nodes, it returns the computing results to the client.

[0057] The computing application layer is equipped with a deep learning model. Computational or inference tasks are performed based on this model, and the model is continuously learned and optimized based on the computational or inference results. Specifically, a polling algorithm can be used to respond to computational requests and determine whether it is necessary to execute the optimized deep learning model for computation.

[0058] As one improvement, the inference computing application in this embodiment is no longer repeatedly deployed on edge nodes. The computing application is clustered and provided to the cloud center for call through a polling algorithm. The number of connections between the cloud center and the computing application is reduced to N to 1, which speeds up the inference efficiency.

[0059] The consensus node layer is used to form a consensus on the computation results based on the blockchain network and produce blocks. When it is necessary to optimize the deep learning model, it obtains the parameters required for the optimization of the deep learning model based on the block production results and is responsible for interacting with the ledger node layer.

[0060] The ledger node layer is responsible for the installation and deployment of computation smart contracts and model smart contracts. Each edge node runs one inference smart contract and one model smart contract. Specifically, it can be configured to continuously optimize and manage computational tasks and the deep learning model based on preset computation smart contracts and model smart contracts. These computation smart contracts and model smart contracts are the contractualized versions of the deep learning model deployed within the blockchain network.

[0061] The consensus node layer and the ledger node layer both belong to the edge computing function category and are used to control and manage edge computing. The functions they are responsible for can be reconfigured as needed.

[0062] Therefore, this invention discloses an edge continuous learning network based on blockchain. Based on blockchain smart contracts and a distributed ledger, it statistically analyzes historical inference tasks and directly provides inference results for the same inference objective, avoiding waste of inference resources and improving inference efficiency. The smart contract technology, which enables real-time sharing of edge node inference data, breaks down edge inference silos and effectively solves the small sample problem in edge inference. It also increases the amount of sample data required for subsequent model training, ensuring the efficiency and accuracy of continuous learning. The smart contract technology, which automatically triggers continuous learning model training and real-time synchronization of edge node model parameters, achieves automated updates and synchronization of edge node models, avoiding the risk of human intervention and reducing problems such as data inconsistency, low timeliness, and high network bandwidth requirements caused by pushing models from the cloud to the edge, greatly ensuring the stability and timeliness of continuous learning.

[0063] In one or more preferred embodiments, the cloud center is also used to: in the initial stage, be responsible for the centralized training of the deep learning model and distribute the trained deep learning model to each edge computing node.

[0064] In one or more embodiments, see Figure 2As shown, the consensus node layer is used to: send the computing request to the elected main leader node, the main node endorses the transaction, and each slave follower node simulates the transaction and verifies it according to the endorsement algorithm; if the endorsement algorithm verification is successful, further perform the block generation algorithm verification; if the block generation algorithm verification is successful, confirm the block generation; in the case of confirming the block generation, obtain the model parameter optimization result corresponding to the edge node, so as to facilitate writing the parameter optimization result into the blockchain ledger. Otherwise, this model parameter optimization request is rejected, that is, the model parameters remain unchanged.

[0065] It should be noted that the above transaction refers to one run of the computing request in the blockchain network.

[0066] Among them, the endorsement algorithm includes: based on the n=r>0?n+1:n function, in this function, n represents the number of endorsements passed, r represents the calculation result, r>0 represents successful calculation and valid endorsement, at this time the number of nodes passing the endorsement is incremented by 1, otherwise it remains unchanged.

[0067] Compare the number of nodes n passing the endorsement with the first threshold s. If n>s, the endorsement is successful; if n<s, the endorsement fails this time.

[0068] After the above transaction endorsement is passed, the next step is to generate a transaction block. The specific algorithm is: sum

[0069]

[0070] In this function, n indicates the number of nodes, and x n indicates the endorsement result of the nth node, and x n being 1 indicates that the endorsement is passed, and x n being -1 indicates that the endorsement fails;

[0071] If the result value of the above sum is greater than 0, the transaction block is generated; otherwise, no block is generated.

[0072] In one or some embodiments, the computing smart contract is used to: when an edge node executes a computing task, record the computing object and computing result of the computing task onto the blockchain ledger and synchronize it to other edge nodes. Each operation of the ledger by each edge node is regarded as a transaction, and the processing rules of the transaction are the same as those of the transaction in the consensus.

[0073] See Figure 3As shown, then determine whether the current computing task is the same as the historical computing tasks. Compare the difference between object A in the current computing task and the historical task computing object i (i = 1 to N, where N is the total number of historical tasks). If the difference between object A and object K (0 < K < N + 1) is less than the second threshold m, it is determined that object A is the same as object K, and it is determined that the computing task to which object A belongs is the same as the task to which object K belongs.

[0074] For the same computing task, the computing application skips execution, directly copies the historical computing result and returns; otherwise, it enters the computing application process, records the computing result, and synchronizes it to other edge nodes.

[0075] In one embodiment, as shown in Figure 4 The model smart contract is used for: voting to elect the main leader node, and the remaining edge nodes are follower nodes; after the deep learning model is deployed on the edge nodes, when an edge node executes a computing task, the counter is incremented by 1. When the count value of the edge node reaches the preset value T, the counter is cleared and an election vote is initiated. The voting election is implemented based on the Raft protocol, that is, in the order of time stamps, the edge node that initiates the vote earliest is elected as the main leader node, and the remaining edge nodes are follower nodes.

[0076] The main node reads the computing data ledger of the blockchain, obtains all computing data and divides it according to time t. The data with a time stamp less than t is classified into dataset D, and the data with a time stamp greater than t is classified into dataset D'; the main node reads the model parameter ledger of the blockchain, obtains the latest model M and parameter set P in the model parameter ledger, and preprocesses the model parameter set through the EWC algorithm. Then, based on model M and dataset D', a new model M' is trained. Among them, the EWC (Elastic Weight Consolidation) algorithm is the plastic weight consolidation algorithm, and its principle is: considering that EWC allows the network to effectively embed more functions in a network with a fixed capacity, we may ask whether it assigns completely independent parts of the network to each task, or whether it uses the capacity more efficiently through shared representations. To evaluate this, by calculating the overlap between the respective Fisher information matrices of the computing tasks, it is determined whether each task depends on the same set of weights. A smaller overlap means that the two tasks depend on different sets of weights (that is, EWC assigns the weights of the network to different tasks), and a larger overlap indicates that both tasks use the weights (that is, EWC allows shared representations).

[0077] Then, the model M' on the main node is synchronized to each follower node through the P2P network, and the update of the model can be achieved.

[0078] In a preferred embodiment, the ledger node layer is further configured to: store sample datasets in the blockchain network, the sample datasets being used for training or computation of each edge node.

[0079] Unlike traditional solutions, sample data is no longer stored separately on each edge node. Instead, leveraging the characteristics of blockchain's distributed ledger, all edge nodes use the same sample data, which greatly increases the sample data capacity and enhances the feasibility and accuracy of the inference results.

[0080] In summary, the blockchain-based edge computing system disclosed in the above embodiments of the present invention, considering actual production needs, creatively realizes a blockchain-based edge continuous learning network. By aggregating data from all edge nodes within the network, it overcomes the limitations of single-node data in traditional solutions, significantly reduces the amount of interaction between edge nodes and the cloud, and greatly improves inference efficiency. Simultaneously, the automatic adjustment of algorithm model parameters based on blockchain smart contracts greatly enhances the automation of continuous learning, effectively reduces manual operations, lowers human resource costs, and avoids the risks associated with human intervention. Furthermore, the use of blockchain smart contracts avoids repeated inference of the same objective, reduces waste of inference resources, and improves the timeliness and stability of inference, demonstrating strong practicality and scalability.

[0081] Figure 5 A flowchart illustrating an embodiment of the blockchain-based edge computing method of the present invention is shown, which is applied to the aforementioned edge computing system. Figure 5 As shown, the method includes the following steps:

[0082] Step 510: Accept the computation request initiated by the client, and when the computation result is obtained by interacting with the edge node, return the computation result to the client;

[0083] Step 520: Response to the computation request using a polling algorithm, and determine whether the deep learning model used for computation needs to be optimized;

[0084] Step 530: Based on the blockchain network, a consensus on the calculation results is formed and a block is produced. When it is necessary to optimize the deep learning model, the parameters required for the optimization of the deep learning model are obtained based on the block production results.

[0085] Step 540: Based on the preset computation smart contract and model smart contract, continuously optimize the computation task and the deep learning model. The computation smart contract and the model smart contract are the contractualized deep learning model deployed in the blockchain network.

[0086] In one or some preferred embodiments, step 510 further includes: centrally training the deep learning models and distributing the trained deep learning models to each edge computing node.

[0087] In one or some embodiments, step 530 includes: sending the computing request to the elected master node, the master node endorsing the transaction, and each slave node performing a simulated transaction and verifying according to the endorsement algorithm; if the endorsement algorithm verification is successful, further performing the block generation algorithm verification; if the block generation algorithm verification is successful, confirming the block generation; in the case of confirming the block generation, obtaining the model parameter optimization result corresponding to the edge node, so as to facilitate writing the parameter optimization result into the blockchain ledger. Otherwise, this model parameter optimization request is rejected, that is, the model parameters remain unchanged.

[0088] Among them, the endorsement algorithm includes: based on the function n = r>0? n + 1 : n, in the above function, n represents the number of endorsements passed, r represents the calculation result, r>0 represents the calculation is successful and the endorsement is valid, at this time the number of endorsement passing nodes is incremented by 1, otherwise it remains unchanged.

[0089] Compare the number of nodes n with the first threshold s that have passed the endorsement. If n>s, the endorsement is successful; if n<s, this endorsement fails.

[0090] After the above transaction endorsement is passed, the next step is to perform transaction block generation. The specific algorithm is as follows: In this function, n indicates the number of nodes, and x n indicates the endorsement result of the nth node, and x n being 1 indicates that the endorsement is passed, and x n being -1 indicates that the endorsement is not passed.

[0091] If the result value of the above summation is greater than 0, the transaction generates a block; otherwise, it does not generate a block.

[0092] In one or some embodiments, step 540 further includes: when an edge node executes a computing task, recording the computing object and computing result of the computing task on the blockchain ledger and synchronizing them to other edge nodes, where each operation of each edge node on the ledger is regarded as a transaction, and the processing rules of the transaction are the same as those of the transaction in the consensus.

[0093] Then determine whether the current computing task is the same as the historical computing task, and compare the difference between object A in the current computing task and the historical task computing object i (i = 1 to N, N is the total number of historical tasks). If the difference between object A and object K (0<K<N + 1) is less than the second threshold m, it is determined that object A is the same as object K, and it is determined that the computing task to which object A belongs is the same as the task to which object K belongs.

[0094] For the same computing task, the computing application skips execution, directly copies the historical computing results and returns; otherwise, it enters the computing application process, records the computing results and synchronizes them to other edge nodes.

[0095] In one embodiment, step 540 further includes: electing a master leader node by voting, and then the remaining edge nodes become slave follower nodes; after the deep learning model is deployed on the edge nodes, when an edge node performs a computing task, a counter is incremented by 1; when the edge node count reaches a preset value T, the counter is cleared and an election vote is initiated. The election is based on the Raft protocol, that is, according to the timestamp order, the edge node that initiates the vote earliest is elected as the master leader node, and the remaining edge nodes become slave follower nodes.

[0096] The master node reads the blockchain's computational data ledger, obtains the full computational data, and splits it according to time t. Data with timestamps less than t is assigned to dataset D, and data with timestamps greater than t is assigned to dataset D'. The master node also reads the blockchain's model parameter ledger, obtains the latest model M and parameter set P from the ledger, preprocesses the model parameter set using the EWC algorithm, and then trains a new model M' based on model M and dataset D'. The EWC (Elastic Weight Consolidation) algorithm works as follows: Considering that EWC allows the network to effectively embed more features in a network with a fixed capacity, we might ask whether it assigns completely independent parts of the network to each task, or whether it uses capacity more efficiently by sharing representations. To evaluate this, the overlap between the computational tasks' respective Fisher information matrices is used to determine whether each task depends on the same weight set. Smaller overlap means that the two tasks depend on different weight sets (i.e., EWC assigns network weights to different tasks), while larger overlap means that both tasks use weights (i.e., EWC allows shared representations).

[0097] Then, the model M' on the master node is synchronized to each slave node through a P2P network, thus realizing the model update.

[0098] In a preferred embodiment, step 540 further includes: storing a sample dataset in the blockchain network, the sample dataset being used for training or computation of each edge node.

[0099] In summary, the blockchain-based edge computing method disclosed in the above embodiments of the present invention can creatively realize a blockchain-based edge continuous learning network by considering actual production needs. By aggregating data from all edge nodes within the network, it overcomes the limitations of single-node data in traditional solutions, significantly reduces the amount of interaction between edge nodes and the cloud, and greatly improves inference efficiency. Simultaneously, the automatic adjustment of algorithm model parameters based on blockchain smart contracts greatly enhances the automation of continuous learning, effectively reduces manual operations, lowers human resource costs, and avoids the risks associated with human intervention. Furthermore, the use of blockchain smart contracts avoids repeated inference of the same objective, reduces waste of inference resources, and improves the timeliness and stability of inference, demonstrating strong practicality and scalability.

[0100] This invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute the blockchain-based edge computing method in any of the above method embodiments.

[0101] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0102] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0103] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0104] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0105] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0106] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0107] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A blockchain-based edge computing system, the system comprising: A cloud center, configured to receive a computing request initiated by a client, and when obtaining a computing result through interaction with an edge node, return the computing result to the client; A computing application layer, configured to perform a computing response to the computing request through a polling algorithm and determine whether it is necessary to optimize a deep learning model for computing; A consensus node layer, configured to form a consensus on the computing result based on a blockchain network and generate a block. When it is necessary to optimize the deep learning model, obtain the parameters required for optimizing the deep learning model according to the result of the generated block; An accounting node layer, configured to continuously optimize computing tasks and the deep learning model according to preset computing smart contracts and model smart contracts. The computing smart contracts and the model smart contracts are deployed in the blockchain network after the deep learning model is contractually defined; The computing smart contract is used for: When an edge node executes a computing task, record the computing object and the computing result of the computing task on the blockchain ledger and synchronize them to other edge nodes. Each operation of an edge node on the ledger is regarded as a transaction, and the processing rules of the transaction are the same as those in the consensus; Judge whether the current computing task is the same as the historical computing tasks, compare the difference between object A in the current computing task and historical task computing object i, where i = 1~N, and N is the total number of historical tasks. If the difference between object A and object K is less than the second threshold m, where 0 < K < N + 1, then it is determined that object A is the same as object K, and it is determined that the computing task to which object A belongs is the same as the task to which object K belongs; For the same computing task, the computing application skips execution, directly copies the historical computing result and returns it; Otherwise, enter the computing application process, record the computing result, and synchronize it to other edge nodes; The model smart contract is used for: Vote to elect a master node, and the remaining edge nodes are slave nodes; after deploying the deep learning model on the edge nodes, when an edge node executes a computing task, the counter is incremented by 1. When the count value of the edge node reaches the preset value T, the counter is cleared and an election vote is initiated. According to the time stamp order, the edge node that initiates the vote earliest is elected as the master node, and the remaining edge nodes are slave nodes; The master node reads the computing data ledger of the blockchain, obtains all computing data and divides it according to time t. The data with a time stamp less than t is classified into dataset D, and the data with a time stamp greater than t is classified into dataset D'; the master node reads the model parameter ledger of the blockchain, obtains the latest model M and parameter set P in the model parameter ledger, preprocesses the model parameter set through the EWC algorithm, and then trains based on model M and dataset D' to obtain a new model M'; Synchronize the model M' on the master node to each slave node through the P2P network.

2. The system of claim 1, wherein, The cloud center is further used for: Responsible for the training and distribution of the deep learning model.

3. The system of claim 1, wherein, The consensus node layer is further used for: Send the computing request to the elected master node. The master node endorses the transaction, and each slave node performs a simulated transaction and verifies it according to the endorsement algorithm; If the endorsement algorithm verification is successful, further verify the block generation algorithm; If the block generation algorithm verification is successful, confirm the block generation; In the case of confirming the block generation, obtain the model parameter optimization result corresponding to the edge node, so as to facilitate writing the parameter optimization result into the blockchain ledger; Wherein, the transaction refers to one run of the computing request in the blockchain network.

4. The system of claim 3, wherein, The endorsement algorithm includes: determining , In this function, n represents the number of endorsements passed, r represents the calculation result, r>0 indicates that the calculation is successful and the endorsement is valid. At this time, the number of endorsing nodes is incremented by 1, otherwise it remains unchanged; Compare the number of endorsing nodes n with the first threshold s. If n>s, the endorsement is successful. If n<s, the endorsement fails this time.

5. The system of claim 3, wherein, The block generation algorithm includes: Summation , In this function, n represents the number of nodes, and x n This indicates the endorsement result of the nth node, x n A value of 1 indicates that the endorsement has been approved, x n A value of -1 indicates that the endorsement was not approved; If the result value of the above summation is greater than 0, the transaction is blocked, otherwise it is not blocked.

6. The system of claim 1, wherein, The accounting node layer is also used for: Storing the sample data set in the blockchain network, and the sample data set is used for training or calculation of each edge node.

7. A blockchain-based edge computing method, the method includes: Accept a computing request initiated by a client, and when the computing result is obtained by interacting with an edge node, return the computing result to the client; Used to perform a computing response to the computing request through a polling algorithm and determine whether it is necessary to optimize the deep learning model for computing; Form a consensus on the computing result based on the blockchain network and generate a block. When it is necessary to optimize the deep learning model, obtain the parameters required for optimizing the deep learning model according to the result of block generation; According to the preset computing smart contract and model smart contract, realize the continuous optimization of the computing task and the deep learning model. The computing smart contract and the model smart contract are deployed in the blockchain network after the deep learning model is contractually based; The computing smart contract is used for: When an edge node executes a computing task, record the computing object and computing result of the computing task on the blockchain ledger and synchronize it to other edge nodes. Each operation of each edge node on the ledger is regarded as a transaction, and the processing rules of the transaction are the same as those in the consensus; Judge whether the current computing task is the same as the historical computing task, compare the difference between object A in the current computing task and historical task computing object i, i = 1~N, N is the total number of historical tasks. If the difference between object A and object K is less than the second threshold m, 0<K<N+1, then it is determined that object A is the same as object K, and it is determined that the computing task to which object A belongs is the same as the task to which object K belongs; For the same computing task, the computing application skips execution, directly copies the historical computing result and returns it; Otherwise, enter the computing application process, record the computing result and synchronize it to other edge nodes; The model smart contract is used for: If a master node is elected by voting, the remaining edge nodes become slave nodes. After the deep learning model is deployed on the edge nodes, when an edge node performs a computing task, the counter is incremented by 1. When the edge node's counter value reaches a preset value T, the counter is reset to zero and an election vote is initiated. According to the timestamp order, the edge node that initiated the vote earliest is elected as the master node, and the remaining edge nodes become slave nodes. The master node reads the blockchain's computational data ledger, obtains the full computational data, and divides it according to time t. Data with timestamps less than t is assigned to dataset D, and data with timestamps greater than t is assigned to dataset D'. The master node reads the blockchain's model parameter ledger, obtains the latest model M and parameter set P in the model parameter ledger, preprocesses the model parameter set using the EWC algorithm, and then trains a new model M' based on model M and dataset D'. The model M' on the master node is synchronized to each slave node via a P2P network.

8. A computer storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the method of claim 7.