CN112783662A - CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain - Google Patents

CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain Download PDF

Info

Publication number
CN112783662A
CN112783662A CN202110186724.XA CN202110186724A CN112783662A CN 112783662 A CN112783662 A CN 112783662A CN 202110186724 A CN202110186724 A CN 202110186724A CN 112783662 A CN112783662 A CN 112783662A
Authority
CN
China
Prior art keywords
sensing
edge node
cluster
edge
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110186724.XA
Other languages
Chinese (zh)
Inventor
刘建华
沈士根
吴宗大
方朝曦
李琪
方曙琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Shaoxing
Original Assignee
University of Shaoxing
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Shaoxing filed Critical University of Shaoxing
Priority to CN202110186724.XA priority Critical patent/CN112783662A/en
Publication of CN112783662A publication Critical patent/CN112783662A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a CPU resource credible sharing system in sensing edge cloud task unloading of an integrated block chain, which comprises: the edge node quotes to the cluster head node to achieve an intelligent contract of the calculation task unloading service and provide the calculation task unloading service; the cluster head node is used for offering price for the sensing equipment according to the CPU resource unit price provided by the edge node, collecting the offer action of the sensing equipment and the CPU credibility voting reward fed back by the sensing equipment, and selecting the credible edge node by adopting a reinforcement learning algorithm to achieve an intelligent contract and unload a calculation task; the edge node and the cluster head node are provided with a block chain used for storing the intelligent contract. The invention provides a novel sensing edge cloud core networking architecture to save energy consumption of sensing equipment. In the framework, a block chain is designed to realize the transaction process of the CPU resource of the credible shared edge node when the calculation task of the sensing equipment cluster is unloaded.

Description

CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain
Technical Field
The invention belongs to the technical field of Internet of things, and particularly relates to a CPU resource trusted sharing system in sensing edge cloud task unloading of an integrated block chain.
Background
The CPU of the sensing equipment consumes a large amount of energy resources for processing calculation tasks and safety protection, in order to save energy consumption of the sensing equipment, the novel sensing edge cloud framework unloads the calculation tasks to edge nodes for processing, the CPU resources of the edge nodes are utilized for processing the calculation tasks with high energy consumption, and a safety verification algorithm with low energy consumption can be processed by the CPU of the sensing equipment. The edge node can directly access the sensing equipment through wireless to perform application control in the aspect of a service layer, on the other hand, the computing processing and the security verification in the CPU of the sensing equipment are separated, namely the sensing equipment does not need to process computing tasks, the tasks needing to be processed are directly unloaded to the edge node to be executed, and the CPU of the sensing equipment only performs data collection and security verification. The energy consumption of the sensing edge cloud system is greatly reduced, and the reliability and the safety of the unloading of the computing task are improved. However, trust management of nodes is complicated due to the distributed nature of the sensing devices. Secondly, when a large number of sensing devices unload the CPU resources of the shared edge nodes in the process of the computation task, malicious attacks cause the unloading amount of the computation task to dynamically change and be difficult to estimate, which causes unbalanced CPU resource allocation and even results in failed unloading of the computation task. Therefore, in the sensing edge cloud, designing an efficient edge CPU sharing mechanism becomes a challenging problem. Meanwhile, the sharing of the edge CPUs also faces the problem of un-credibility of some nodes, and a malicious edge node may return an inaccurate result or prolong the calculation time.
The sensing edge cloud system provides various computing resource services for the Internet of things and the sensing network. Compared with the traditional sensing cloud system, the sensing edge cloud system enables the sensing equipment and the cloud computing service to realize low-delay seamless intelligent interaction. Sensing devices typically require a large amount of energy resources to process both computational tasks and security verification, which causes the CPU load of the sensing device to increase. Offloading the computational tasks to edge nodes is an effective solution to reduce the CPU load of the sensing devices, which is also referred to as a core networking architecture. In the sensing edge cloud core networking architecture, CPU resources are deployed on edge nodes close to sensing equipment, and computing tasks of the sensing equipment are processed by the CPUs of the edge nodes, so that the plurality of sensing equipment can share the CPU resources of the edge nodes at the same time. When the sensing equipment requests CPU resources from the edge node, the control right of the edge node CPU is obtained, so that the calculation task can be unloaded to the edge node with low time delay and efficiently executed, and the energy consumption of the sensing equipment is reduced.
Although the sensing edge cloud core networking architecture is an efficient technology for saving energy consumption of sensing equipment, deploying the sensing edge cloud core networking architecture with the CPU sharing capability faces a huge challenge: (1) due to the limited CPU resources of the edge node, the edge node may not provide the CPU resources of the task processing for all the sensing devices. (2) Due to the existence of a large number of sensing devices, the malicious sensing devices are easy to launch DDoS attack, and the CPU resource shared by the sensing device clusters formed by the sensing devices is damaged. (3) As edge nodes are deployed in untrusted third party environments, some edge nodes may be controlled by malicious attackers, causing the edge nodes to perform untrusted actions, such as: consuming CPU resources or extending the training duration of the computational task and returning results with lower training accuracy or incorrect. (4) The interaction between the sensing equipment and the edge node does not need the supervision of a third party, and an incentive mechanism does not standardize the credible cooperation process of the two parties. From the above, the performance of the sensing edge system will be greatly affected by the CPU processing capacity constraint of the edge node, the CPU resource characteristics of the sensing device cluster sharing edge node, and the untrusted security threats from between the edge node and the sensing cloud.
The sensing edge cloud core networking architecture provides an efficient solution for sharing edge node CPU resources and saving energy consumption of sensing equipment. Based on the edge architecture, Songfan Li and the like propose a core Networking architecture for wireless sensor nodes, in the architecture, in order to save the energy consumption of the sensor nodes, a CPU for processing tasks on the wireless sensor nodes is removed, the wireless sensor nodes are directly networked with the edge nodes through a wireless chip, and the CPU of the edge nodes is used for finishing the task processing on the sensor nodes (Internet-of-microprocessors: Direct Radio-to-Bus Communication with SPI backscattering, proceedings of the 26th Annual International Conference on Mobile Computing and Networking,2020, pp.1-14.). However, this architecture does not design a corresponding trusted CPU resource sharing mechanism. Xu, etc. establishes a credible Edge cache sharing mechanism through the interactive historical information of the Mobile user and the Edge node, and uses a block chain to verify whether the cache content is legal, thereby maximizing the utility of the Mobile user and the Edge node, although the mechanism optimizes the cache allocation by using a price mechanism, the price mechanism is not considered to inhibit attackers (Block chain-Based trust Edge Caching Scheme for Mobile Cyber-Physical System. IEEE Internet of Things Journal, vol.7, No.2, pp.1098-1110, Feb.2020). Lee et al, in order to meet the low latency requirement of data Analysis of the Internet of Things devices, manage the computing resources of the mobile edge device based on a Market model designed by Game theory, and design a price mechanism to maximize the Game utility, but the model and mechanism do not solve the problem of trusted interaction between the Internet of Things devices and the edge nodes (Market Analysis of Distributed Learning Resource Management for Internet of Things: A Game-theoretical approach. IEEE Internet of Things Journal, vol.7, No.9, pp.8430-8439, Sept.2020).
These prior art research schemes also suffer from the following deficiencies:
(1) in order to save energy consumption of the sensing node, although the proposed core networking architecture completely removes a CPU module on the sensing node, this will make a trusted authentication mechanism impossible to implement on the sensing node, resulting in the security problem of the sensing node.
(2) Although the proposed solution combines the blockchain technology to verify the credible interactive process between the edge node and the mobile user, the resource unit price is not dynamically adjusted in the calculation task unloading process of the attacked sensing device to adapt to the change of the attack environment, and a large amount of dynamic unloading characteristics of the calculation task are not considered.
The proposed solution, although a price mechanism is designed to maximize the utility of the game participants, does not design a corresponding computing task processing resource trusted sharing scheme for the attacked dynamic computing task unloading execution environment between the sensing device cluster and the edge node under the sensing edge cloud core networking architecture.
Disclosure of Invention
The invention designs a credible edge CPU sharing scheme based on a block chain and a dynamic price mechanism. In order to utilize the CPU resources of the edge nodes as much as possible and suppress attacks from the sensing devices, the edge CPU scheduling mechanism combines the intelligent contract conditions of the block chain and the dynamic unit price adjustment to efficiently cooperate and process the calculation tasks unloaded by the sensing devices. Therefore, the calculation tasks unloaded by the sensing equipment can be quickly processed by the edge node, and the energy consumption of the sensing equipment is saved. In order to share the CPU resource of the edge node, a plurality of sensing devices form a sensing device cluster, and the cluster head node unloads tasks to the edge node, so that the energy consumption of cluster member nodes is reduced. In addition, the edge node is selected for the sensing equipment in a trusted mode, and a trust management mechanism shared by an edge CPU is designed, so that the unloading safety of the computing task is ensured, and the unloading service quality of the computing task is improved. In the trust mechanism, the trust degree of the cluster head node and the edge node of the sensing equipment is evaluated through unloading history interactive information of the cluster head node and the edge node. Meanwhile, the block chain is used for distributively recording the calculation task unloading transaction information between the edge node and the cluster head node of the sensing equipment. During the transaction, the CPU resource unit price of the edge node and the payment cost of the sensing equipment are recorded in the block through the intelligent contract, and only the transaction meeting the intelligent contract condition is a legal transaction. Therefore, the invention provides a trusted sharing method of CPU resources under a sensing edge cloud core networking architecture, which is a trusted method for sharing the edge CPU of sensing equipment based on a long-short term memory network (LSTM) and Q-learning, and improves the quality of service for unloading the trusted computing task of the sensing equipment.
According to one aspect of the invention, a trusted CPU resource sharing system in sensing edge cloud task unloading of an integrated block chain is provided, which comprises edge nodes and cluster head nodes;
the edge node is used for providing calculation task unloading service for the sensing equipment, adjusting the unit price of the CPU resource according to the principle that the unit price of the CPU resource is higher when the predicted unloading task amount is larger, and providing the CPU resource unit price to the cluster head node to achieve an intelligent contract of the calculation task unloading service;
the cluster head node is used for offering the sensing equipment according to the CPU resource unit price provided by the edge node and collecting the offer action { p) of the sensing equipmento,tThe method comprises the steps of (1) voting and rewarding the credibility of an edge node CPU fed back by sensing equipment, and selecting a credible edge node by adopting a reinforcement learning algorithm according to the bid of the sensing equipment and the credibility voting and rewarding of the edge node CPU to achieve an intelligent contract and unload a computing task;
the edge node and the cluster head node are provided with a block chain for storing the intelligent contract; the intelligent contract comprises: size D of computing task signed by private keys of edge node and cluster head node of both parties of smart contractjThe price of the edge node, the training duration, and the contract generation timestamp. When the intelligent contract is executed, injecting a preset number of bit coins into edge nodes and cluster head nodes of both parties of the contract respectively, and if any one of the parties does not comply with the intelligent contract, deducting the bit coins injected in advance in respective blocks by the intelligent contract agent so as to punish malicious behaviors of the two parties; if both parties abide by the intelligent contract, the intelligent contract agent returns the bitcoin injected in the block after deducting the return of the use of the CPU resource.
Preferably, in the system for truthfully sharing CPU resources in task offloading of the sensing edge cloud of the integrated block chain, the edge node uses a recurrent neural network to determine the current offload amount of the computation task according to the ith in the current offload amount sequence of the computation task provided by the cluster head node
Figure BDA0002943322740000051
Calculating the size of the corresponding predicted workload shedding amount
Figure BDA0002943322740000052
Preferably, CPU resources in the sensing edge cloud task unloading of the integrated block chain are trustedSharing system of said current calculation task offload amount size
Figure BDA0002943322740000053
The calculation is as follows:
Figure BDA0002943322740000054
wherein beta represents the task unload density calculated by all the sensing devices,
Figure BDA0002943322740000055
Figure BDA0002943322740000056
the number of the sensing devices unloading the computation tasks in the sensing device cluster j is represented, wherein ∈ {0,1, 2.,. mu (t) }, μ (t) is the number of the computation tasks unloaded by the sensing devices in the sensing device cluster j at time t, and λ is the unloading rate.
Preferably, in the system for trusted sharing of CPU resources in task offloading of the sensing edge cloud of the integrated block chain, the memory block of the recurrent neural network includes an input layer, a control layer, a neural network, and an output layer.
The input layer is used for inputting the unloading amount of the ith calculation task
Figure BDA0002943322740000057
Long term memory of ct-1And short term memory ht-1
The control layer includes three control gates:
Figure BDA0002943322740000058
and
Figure BDA0002943322740000059
the following logics were respectively employed:
Figure BDA0002943322740000061
Figure BDA0002943322740000062
Figure BDA0002943322740000063
wherein, sigma represents a sigmoid activation function, and the function value is mapped into an interval from 0 to 1;
Figure BDA0002943322740000064
Wi T,
Figure BDA0002943322740000065
representing a weight; bf,bi,bcRepresents a bias; tanh represents the activation function, and the mapping data is in the range of-1 to 1.
The output layer is used for outputting the size of the unloading amount of the ith predicted calculation task
Figure BDA0002943322740000066
The calculation is as follows:
Figure BDA0002943322740000067
wherein the content of the first and second substances,
Figure BDA0002943322740000068
represents a weight, boRepresents a bias;
the updating method of the long-term memory comprises the following steps:
Figure BDA0002943322740000069
short-term memory is obtained as follows: sequence of the size of the workload to be calculated
Figure BDA00029433227400000610
As short term memory, i.e.
Figure BDA00029433227400000611
Preferably, in the CPU resource trusted sharing system in the sensing edge cloud task offloading of the integrated block chain, the recurrent neural network is trained to obtain the network weight in the time interval T according to the following method
Figure BDA00029433227400000612
Wi T,
Figure BDA00029433227400000613
And bias bf,bi,bc,bo
Initializing network weights and biases; at each time T within the time interval T, the following is performed:
selecting the size of the unloading capacity of the first calculation task
Figure BDA00029433227400000614
Input, computing output h using forward propagationtAnd calculating a loss function
Figure BDA00029433227400000615
Back-propagation adjusts the weight and bias parameters, where L represents the calculation task offload amount sequence length,
Figure BDA00029433227400000617
representing the actual calculation task capacity size,
Figure BDA00029433227400000616
indicating the predicted size of the workload shedding of the computational tasks.
Preferably, in the system for trustfully sharing CPU resources in the sensing edge cloud task offloading of the integrated block chain, the unit price of the CPU resources is adjusted according to a principle that the unit price of the CPU resources is higher when the predicted offloading task amount is larger, and the adjusted unit price of the CPU resources is preferably calculated by using the following formula
Figure BDA0002943322740000071
Figure BDA0002943322740000072
Wherein p isiThe current CPU resource unit price for the edge node i,
Figure BDA0002943322740000073
and xi represents the maximum capacity of the CPU of the edge node i, and is a weight parameter between the preset CPU price and the maximum capacity.
Preferably, in the CPU resource trusted sharing system in the sensing edge cloud task offloading of the integrated block chain, the cluster head node selects a trusted edge node by using a sensing device cluster learning model based on Q-learning.
Preferably, in the system for trustful sharing of CPU resources in the task offloading of the sensing edge cloud of the integrated block chain, a sensing device cluster learning model based on Q-learning is as follows:
Figure BDA0002943322740000074
wherein S represents the state space of the sensing equipment cluster sharing edge node CPU; a is a space of motion,
Figure BDA0002943322740000075
at={p1,t,p2,t,...,po,t,...,pM,tin which p iso,tA bid representing a gap t purchase edge node CPU resource by each sensing device o at the time of the bid; t isnRepresents the maximum number of bid slots; y is the delivery probability,
Figure BDA0002943322740000076
m represents the number of the sensing devices in the sensing device cluster, namely the number of Q-learning agents;
Figure BDA0002943322740000077
represents the reward generated by the sensing device o;
Figure BDA0002943322740000078
represents the reward generated by the cluster of sensing devices j;
the cluster head node acts a according to the bidding time gap t of each sensing device in the sensing device clustertWhether each sensing device purchases the CPU resource of the edge node of the time slot quotation or not, the weighted average value of the quotation is used as the unit price of the CPU resource, and the state-action Q function of the cluster head node is adopted to calculate the state stAnd then adopting the Q value of the unit price of the CPU resource to maximize the Q value so as to maximize the local average reward of each sensing device, and determining the action strategy pi epsilon R according to the bidding adopted by the sensing device at the moment|S|×|A|Choosing a trusted edge node to achieve an intelligent contract, with pi representing in state stThe probability of the cluster of sensor devices taking an offer action is dropped.
The state-action Q function of the cluster head node is:
Figure BDA0002943322740000081
the Q value update function is as follows:
Figure BDA0002943322740000082
the optimal strategy of the cluster head node is to select the edge node with the maximum Q value, namely
Figure BDA0002943322740000083
Action of time atOptimal strategy pi of cluster head node*(at) Expressed as:
Figure BDA0002943322740000084
preferably, in the system for trusted sharing of CPU resources in task offloading of sensing edge cloud of the integrated block chain, the reward generated by the sensing device o of the sensing device cluster
Figure BDA0002943322740000085
The calculation is as follows:
Figure BDA0002943322740000086
wherein eta is12Is a weight parameter, r, of the performance and confidence evaluation of the offloading execution of the training task1 o(n) offloading the performance reward performed for the training task of the sensing device o,
Figure BDA0002943322740000087
reward for the trustworthiness of the edge node to accomplish offloading of computing tasks:
Figure BDA0002943322740000088
Figure BDA0002943322740000089
wherein, κiThe larger the training duration parameter representing the edge node i, the larger r1 oThe smaller (n), ωiAnd representing the training precision parameter of the edge node i, and n represents the number of the current computing tasks.
Preferably, the system for trustfully sharing CPU resources in the task offloading of the sensing edge cloud of the integrated block chain maximizes the local average reward of each sensing device, specifically:
Figure BDA0002943322740000091
wherein, Επ[·]Representing bid action strategy in a cluster of sensing devices under piThe status of all sensing devices-the expectation of an action pair.
In general, compared with the prior art, the above technical solution contemplated by the present invention can achieve the following beneficial effects:
the invention provides a novel sensing edge cloud core networking architecture to save energy consumption of sensing equipment. In the framework, a block chain is designed to realize the transaction process of the CPU resource of the credible shared edge node when the calculation task of the sensing equipment cluster is unloaded. The behavior of double transactions is constrained using intelligent contract conditions and the results of computing task processing are examined.
In order to process the dynamic change characteristic of the workload of the computing task under the attack of the sensing edge cloud core networking architecture, the invention provides a low-complexity LSTM algorithm to predict the workload of the computing task of the sensing equipment cluster, and dynamically adjusted CPU resource unit price is output through the predicted workload of the computing task, so that the utility of the edge node is maximized.
In order to maximize the utility of the sensing equipment cluster, the invention formalizes a reward function based on the combination of training precision, duration and credibility voting, and provides a sensing equipment cluster bid optimization algorithm based on voting reward Q-learning.
Drawings
FIG. 1 is a schematic structural diagram of a trusted CPU resource sharing system in task offloading of a sensing edge cloud of an integrated block chain according to the present invention;
FIG. 2 is a schematic diagram of a sensing edge cloud core networking security architecture;
FIG. 3 is a schematic diagram of a sensor device cluster trusted shared CPU resource framework based on smart contract dynamic pricing;
fig. 4 is a schematic diagram of a computing task load shedding prediction network structure based on three-layer LSTM.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
A system for trusted sharing of CPU resources in task offloading of a sensing edge cloud of an integrated block chain, as shown in fig. 1, includes: an edge node and a cluster head node;
the edge node is used for providing calculation task unloading service for the sensing equipment, adjusting the unit price of the CPU resource according to the principle that the unit price of the CPU resource is higher when the predicted unloading task amount is larger, and providing the CPU resource unit price to the cluster head node to achieve an intelligent contract of the calculation task unloading service;
the edge node adopts a circulating neural network to take the ith in the current calculation task unloading capacity sequence provided by the cluster head node as the current unloading capacity of the calculation task
Figure BDA0002943322740000101
Calculating the size of the corresponding predicted workload shedding amount
Figure BDA0002943322740000102
The current calculation task unloading amount
Figure BDA0002943322740000103
The calculation is as follows:
Figure BDA0002943322740000104
wherein beta represents the task unload density calculated by all the sensing devices,
Figure BDA0002943322740000105
Figure BDA0002943322740000106
the number of sensing devices for unloading calculation tasks in the sensing device cluster j is represented and provided by a cluster head node, wherein epsilon is {0,1, 2.,. mu (t) }, and mu (t) is the number of calculation tasks unloaded by the sensing devices in the sensing device cluster j at the time t,λ is the unload rate.
The memory block of the recurrent neural network comprises an input layer, a control layer, a neural network and an output layer.
The input layer is used for inputting the unloading amount of the ith calculation task
Figure BDA0002943322740000107
Long term memory of ct-1And short term memory ht-1
The control layer includes three control gates:
Figure BDA0002943322740000108
and
Figure BDA0002943322740000109
the following logics were respectively employed:
Figure BDA0002943322740000111
Figure BDA0002943322740000112
Figure BDA0002943322740000113
wherein, sigma represents a sigmoid activation function, and the function value is mapped into an interval from 0 to 1;
Figure BDA0002943322740000114
Wi T,
Figure BDA0002943322740000115
representing a weight; bf,bi,bcRepresents a bias; tanh represents the activation function, and the mapping data is in the range of-1 to 1.
The output layer is used for outputting the size of the unloading amount of the ith predicted calculation task
Figure BDA0002943322740000116
The calculation is as follows:
Figure BDA0002943322740000117
wherein the content of the first and second substances,
Figure BDA0002943322740000118
represents a weight, boIndicating the bias.
The updating method of the long-term memory comprises the following steps:
Figure BDA0002943322740000119
short-term memory is obtained as follows: sequence of the size of the workload to be calculated
Figure BDA00029433227400001110
As short term memory, i.e.
Figure BDA00029433227400001111
The recurrent neural network is trained to obtain network weights in the following method in a time interval T
Figure BDA00029433227400001112
Wi T,
Figure BDA00029433227400001113
And bias bf,bi,bc,bo
Initializing network weights and biases; at each time T within the time interval T, the following is performed:
selecting the size of the unloading capacity of the first calculation task
Figure BDA00029433227400001114
Input, computing output h using forward propagationtAnd calculating a loss function
Figure BDA00029433227400001115
Back-propagation adjusts the weight and bias parameters, where L represents the calculation task offload amount sequence length,
Figure BDA00029433227400001118
representing the actual calculation task capacity size,
Figure BDA00029433227400001116
indicating the predicted size of the workload shedding of the computational tasks.
The CPU resource unit price is adjusted according to the principle that the CPU resource unit price is higher when the predicted unloading task amount is larger, and the adjusted CPU resource unit price is preferably calculated by adopting the following formula
Figure BDA00029433227400001117
Figure BDA0002943322740000121
Wherein p isiThe current CPU resource unit price for the edge node i,
Figure BDA0002943322740000122
and xi represents the maximum capacity of the CPU of the edge node i, and is a weight parameter between the preset CPU price and the maximum capacity.
The cluster head node is used for offering the sensing equipment according to the CPU resource unit price provided by the edge node and collecting the offer action { p) of the sensing equipmento,tThe method comprises the steps of (1) voting and rewarding the credibility of an edge node CPU fed back by sensing equipment, and selecting a credible edge node by adopting a reinforcement learning algorithm according to the bid of the sensing equipment and the credibility voting and rewarding of the edge node CPU to achieve an intelligent contract and unload a computing task;
the cluster head node selects a credible edge node by adopting a sensing equipment cluster learning model based on Q-learning, and the specific method comprises the following steps:
the sensing equipment cluster learning model based on Q-learning is as follows:
Figure BDA0002943322740000123
wherein S represents the state space of the sensing equipment cluster sharing edge node CPU; a is a space of motion,
Figure BDA0002943322740000124
at={p1,t,p2,t,...,po,t,...,pM,tin which p iso,tA bid representing that a sensing device o in the sensing device cluster purchases the CPU resource of the edge node at a bidding time interval t; t isnRepresents the maximum number of bid slots; y is the delivery probability,
Figure BDA0002943322740000125
m represents the number of the sensing devices in the sensing device cluster, namely the number of Q-learning agents;
Figure BDA0002943322740000126
represents the reward generated by the cluster of sensing devices j, wherein the reward generated by the sensing device o in the cluster of sensing devices
Figure BDA0002943322740000127
The calculation is as follows:
Figure BDA0002943322740000128
wherein eta is12Is a weight parameter, r, of the performance and confidence evaluation of the offloading execution of the training task1 o(n) offloading the performance reward performed for the training task of the sensing device o,
Figure BDA0002943322740000129
reward for the trustworthiness of the edge node to accomplish offloading of computing tasks:
Figure BDA0002943322740000131
Figure BDA0002943322740000132
wherein, κiThe larger the training duration parameter representing the edge node i, the larger r1 oThe smaller (n), ωiAnd representing the training precision parameter of the edge node i, and n represents the number of the current computing tasks.
The cluster head node performs action a according to the interval t when the sensing equipment cluster bidstWhether each sensing device purchases the CPU resource of the edge node of the time slot quotation or not, the weighted average value of the quotation is used as the unit price of the CPU resource, and the state-action Q function of the cluster head node is adopted to calculate the state stAnd then adopting the Q value of the unit price of the CPU resource to maximize the Q value so as to maximize the local average reward of each sensing device, and determining the action strategy pi epsilon R according to the bidding adopted by the sensing device at the moment|S|×|A|Choosing a trusted edge node to achieve an intelligent contract, with pi representing in state stThe probability of the cluster of sensor devices taking an offer action is dropped.
The local average reward of each sensing device is maximized, specifically:
Figure BDA0002943322740000133
wherein, Επ[·]Representing the expectation of state-action pairs for all sensing devices in the cluster of sensing devices under the bid action policy pi.
The state-action Q function of the cluster head node is:
Figure BDA0002943322740000134
the Q value update function is as follows:
Figure BDA0002943322740000135
the optimal strategy of the cluster head node is to select the edge node with the maximum Q value, namely
Figure BDA0002943322740000136
Action of time atOptimal strategy pi of cluster head node*(at) Expressed as:
Figure BDA0002943322740000137
the edge node and the cluster head node are provided with a block chain for storing the intelligent contract; the intelligent contract comprises: size D of computing task signed by private keys of edge node and cluster head node of both parties of smart contractjThe price of the edge node, the training duration, and the contract generation timestamp. When the intelligent contract is executed, injecting a preset number of bit coins into edge nodes and cluster head nodes of both parties of the contract respectively, and if any one of the parties does not comply with the intelligent contract, deducting the bit coins injected in advance in respective blocks by the intelligent contract agent so as to punish malicious behaviors of the two parties; if both parties abide by the intelligent contract, the intelligent contract agent returns the bitcoin injected in the block after deducting the return of the use of the CPU resource.
The following are examples:
the sensing edge cloud core networking security architecture is composed of two parts, namely sensing equipment and an edge node, as shown in fig. 2: three CPUs are deployed in the edge node, and the edge node is networked with the sensing equipment through the wireless chip and provides calculation task unloading service for the sensing equipment. A CPU is deployed in the sensing device and used for running lightweight security verification. Therefore, the sensing equipment only carries out data collection and lightweight safety verification, and the calculation task is processed by the edge node, so that the energy consumption of the sensing equipment is effectively saved. On the framework, a plurality of sensing devices form a sensing device cluster and share the CPU resource of the edge node.
A system for credibly sharing CPU resources in task unloading of a sensing edge cloud of an integrated block chain is disclosed, as shown in FIG. 1, a sensing edge cloud cluster topology based on a core networking architecture is composed of sensing equipment, a sensing equipment cluster and edge nodes. The edge nodes are provided with a plurality of CPUs (central processing units) to provide task processing service for the sensing equipment, and when the sensing equipment unloads the computing tasks to the edge nodes to share CPU processing resources, the processing time of the edge nodes is in direct proportion to the unloading amount of the computing tasks of the sensing equipment cluster. In the sensing edge cloud, in order to increase the reliability and the safety of the network, sensing equipment usually forms a cluster topology, data and CPU resources of edge nodes are shared, sensing equipment cluster members select a cluster head node to initiate a shared CPU request to the edge nodes, and the interaction times between the sensing equipment and the edge nodes are obviously reduced by the sharing mode.
In a sensing edge cloud, the set of edge nodes is e ═ 1, 2.. I.,. I }, and the CPU processing capacity of each edge node is
Figure BDA0002943322740000141
In order to realize the trusted uninstallation of the computing task, the invention considers a malicious edge node, which can initiate an attack on the uninstalled computing task, such as: consuming CPU resources, extending the training time of the task, etc. A cluster of sensing devices may be denoted as v ═ 1, 2. At time t, the number of sensing devices in the sensing device cluster is M, and the sensing device cluster has a high CPU requirement in order to process a calculation task.
The CPU resource of the edge node shared by the sensing equipment cluster has three advantages: (1) in the same sensing equipment cluster, the sensing equipment shares the cost of purchasing edge CPU resources together, so that the sensing equipment cluster members obtain more shared CPU resources with the minimum cost. (2) In a cluster topology environment, a sensing device cluster head node and an edge node are used for interaction to request CPU resources, so that the interaction times of the sensing device and the edge node are reduced, and the message amount in the cluster topology is effectively saved. (3) The cluster head node of the sensing equipment unloads the computing task of the cluster member to the edge node, the sensing equipment cluster member is not required to be directly unloaded to the edge node, the trust state of the edge node is only required to be verified through the cluster head node of the sensing equipment, and the CPU resource consumption of the cluster member for safety verification is reduced.
In order to inhibit malicious attacks on the sensing equipment cluster and perform edge node credibility evaluation and trust update, the invention provides a credible shared CPU resource framework of the sensing equipment cluster based on intelligent contract dynamic price, which is shown in FIG. 3. In the framework, the LSTM network and Q-learning are integrated into the framework. The sensing equipment based on the LSTM calculates a task unloading capacity sensing method to process the task amount dynamically unloaded when being attacked. And processing the credible state of the edge node based on the Q-learning edge node credible condition learning method. In order to realize the dynamic sensing of the workload capacity of the sensing equipment cluster, the workload capacity of the sensing equipment is periodically processed through the LSTM network, and then the LSTM weight is updated according to the prediction result. After training is finished, the calculation task unloading amount of the sensing equipment cluster is obtained in a prediction and inference stage, the dynamic unit price of the edge node CPU resource is obtained, and malicious attack behaviors of the sensing equipment cluster head node are restrained. The sensing equipment cluster head node evaluates and updates the credibility of the edge node by using Q-learning, evaluates the credibility of the edge node by using whether the intelligent contract condition is met, and obtains the dynamic unit price for purchasing CPU resources at the same time, thereby achieving the purpose of maximizing the utility of the sensing equipment cluster.
The edge node is used for providing calculation task unloading service for the sensing equipment, adjusting the unit price of the CPU resource according to the principle that the unit price of the CPU resource is higher when the predicted unloading task amount is larger, and providing the CPU resource unit price to the cluster head node to achieve an intelligent contract of the calculation task unloading service;
in order to increase the utilization rate of the CPU and balance the computation load of the CPU of the edge node, the sensing equipment cluster must provide a certain bitcoin for the shared CPU resource service provided by the edge node as a reward. Thus, each edge node decides its unit price for the CPU resource sharing service and maximizes its utility. The utility of the edge node is represented as:
Figure BDA0002943322740000161
wherein, thetaiIt is each computational task that consumes the computational cost of the CPU.
Figure BDA0002943322740000162
Where φ represents the Joule coefficient corresponding to one unit of energy, EiIs the energy consumed by the CPU to process a computational task, fiIs the number of CPU cycles.
Figure BDA0002943322740000163
Is the capacity requirement of the sensing device for the CPU resources in the edge nodes. p is a radical ofiIs the unit price of CPU resource used by the current sensing equipment computing task.
When the demand of all the sensing devices on the capacity of the shared CPU resource is high, in order to prevent the failure of the calculation task, inhibit malicious nodes from sharing the CPU resource and ensure a credible calculation result, the unit price of the edge node is raised. When the sensing equipment has low demand on the capacity of the shared CPU resource, the edge node reduces the unit price of the shared CPU resource, so that the utilization rate of the edge node on the CPU resource is improved. In order to optimize the unit price of CPU resources, the edge node estimates the total calculation task unloading capacity of each sensing equipment cluster, but because the calculation task load of the edge node dynamically changes along with time, in order to estimate the calculation task unloading capacity of the future sensing equipment cluster, the invention considers the calculation task unloading capacity v of each sensing equipment o in the sensing equipment cluster jj,oFor a poisson distribution, the unloading rate is λ, so the probability of each sensing device unloading a computational task to a single edge node is:
Figure BDA0002943322740000164
where, e ═ 0,1, 2.,. mu (t) }, and μ (t) is the number of computational tasks offloaded by the sensing devices in the cluster j of sensing devices at time t. Beta represents all sensing devices calculating the task unload density. Then, the current calculation task unloading capacity can be calculated according to the formula as follows:
Figure BDA0002943322740000171
wherein the content of the first and second substances,
Figure BDA0002943322740000172
Figure BDA0002943322740000173
and the number of the sensing devices for unloading the calculation task in the sensing device cluster j is represented.
The edge node adopts a circulating neural network to calculate the current unloading amount of the first calculation task in the current calculation task unloading amount sequence provided by the cluster head node
Figure BDA0002943322740000174
Calculating the predicted calculation task unloading amount of the first calculation task
Figure BDA0002943322740000175
Because the LSTM can memorize a long calculation task unloading sequence, the sequence information of calculation task unloading in the sensing equipment cluster can be modeled. At the same time, the LSTM adjusts the flow of a large amount of information in the memory block by controlling the state of the gate to remove or add information to the memory block. The invention designs three layers of LSTM memory blocks to predict the calculation task unloading amount. As shown in fig. 4, the white block diagram shows one LSTM memory structure, and Ce1 ═ Ce2 ═ Ce3 shows that the three memory blocks have the same structure. The input current calculation task unloading amount is
Figure BDA0002943322740000176
The sequence of the size of the workload of the calculation predicted by the output is Yt l. Long term memory of ctShort term memory of htThe three control gates are represented as follows:
Figure BDA0002943322740000177
Figure BDA0002943322740000178
Figure BDA0002943322740000179
wherein, sigma represents sigmoid activation function, and the function value is mapped to an interval of 0 to 1.
Figure BDA00029433227400001710
Wi T,
Figure BDA00029433227400001711
Representing the weight. bf,bi,bcIndicating the bias. tanh represents the activation function, and the mapping data is in the range of-1 to 1.
Memory block state from ct-1To ctThe update process of (2) is as follows:
(1) by
Figure BDA00029433227400001712
Filtering the information of the unloading capacity of the calculation tasks which are not wanted to be reserved; (2) and adding the information of the unloading amount of the currently newly added calculation task. The updated task unloading capacity memory information in the memory block is obtained as follows:
Figure BDA00029433227400001713
and finally, obtaining output information for calculating the task unloading amount as follows:
Figure BDA0002943322740000181
wherein the content of the first and second substances,
Figure BDA0002943322740000182
is a weight, boIs an offset. Thus, can obtainPredicted output value is
Figure BDA0002943322740000183
For the edge node i, the input calculation task unloading capacity sequence is
Figure BDA0002943322740000184
The predicted value of the calculated task unloading amount is obtained as
Figure BDA0002943322740000185
The three-layer LSTM-based prediction model can be written as:
Figure BDA0002943322740000186
the loss function of the LSTM network is:
Figure BDA0002943322740000187
wherein, L represents the calculation task unloading amount sequence length. Y ist lRepresenting the actual calculation task unloading amount. Predicted calculation task unloading amount size
Figure BDA0002943322740000188
The weights and bias parameters in the LSTM network are updated using a random gradient descent method for the loss function. Inputting the unloading amount of the current calculation task after training the LSTM network
Figure BDA0002943322740000189
Obtaining a predicted workload shed size
Figure BDA00029433227400001810
And dynamically adjusting the unit price of the CPU resource of the edge node according to the predicted calculation task unloading amount.
Calculation task unloading capacity prediction and CPU resource dynamic price optimization (algorithm 1) based on LSTM, comprising:
the first stage is as follows: training LSTM networks
Figure BDA00029433227400001811
And a second stage: predicting computational task offload size
Figure BDA00029433227400001812
Figure BDA0002943322740000191
The optimal CPU resource price when the edge node is maximally used is obtained by the algorithm
Figure BDA0002943322740000192
Wherein the content of the first and second substances,
Figure BDA0002943322740000193
indicating the maximum CPU capacity of the edge node i. ξ is the weight parameter between the CPU price and the maximum capacity.
Because the sensing equipment unloads a large amount of computing tasks to the edge nodes through the cluster head nodes in the continuous time slots, an attacker initiates DDoS attacks to the edge nodes through the unloading time slots, and CPU time and resources of the edge nodes are wasted. At this time, the attacked edge node uses the calculation task unloading amount prediction and the CPU dynamic price mechanism in the algorithm 1 to suppress the attack of the malicious attacker, thereby reducing the waste of the CPU resources. When the edge node predicts that the calculation task unloading capacity is high, the edge node modifies the unit price of the CPU resource in the intelligent contract, dynamically raises the unit price, effectively reduces the load of the CPU of the edge node, and simultaneously relieves the influence of an attacker on the sharing of the CPU resource of the edge node by the sensing equipment cluster.
The cluster head node is used for offering the sensing equipment according to the CPU resource unit price provided by the edge node and collecting the offer action { p) of the sensing equipmento,t}、And the marginal node CPU credibility voting reward fed back by the sensing equipment adopts a reinforcement learning algorithm to select a credible marginal node according to the bid of the sensing equipment and the marginal node CPU credibility voting reward so as to achieve an intelligent contract and unload a computing task;
in a sensing edge cloud core networking architecture, part of edge nodes may be malicious, attacks on the unloading process and results of computing tasks can be developed, and training time is prolonged, inaccurate training precision is returned, and the like. In order to avoid the quality of service reduction of sensor cluster computing task unloading caused by malicious edge nodes, a credible mechanism is required to be designed to provide reliable and safe shared CPU resource service for the sensor cluster and ensure the reliability and training precision of the execution of the sensor cluster unloaded computing task. According to the interaction between the cluster head node and the edge node of the sensing equipment, the sensing equipment feeds back and evaluates the CPU resource service provided by the edge node through voting. If the CPU shared resource service provided by the edge node is authentic, the sensing equipment cluster records and updates the benefit obtained from the edge node. The CPU resource price after the dynamic adjustment of the edge node has certain influence on the bidding and purchasing of the CPU resource of the edge node of the sensing equipment cluster. For the edge nodes with lower CPU prices, the sensing device cluster can easily obtain CPU resources, but an attacker can use the price advantage to attack the sensing device cluster, delay the calculation task time and return inaccurate results. Therefore, in order to maximize the utility of the sensing device cluster, ensure reliable computation task offloading and improve the reliability of the computation result, the sensing device bids on the CPU resources of the edge nodes by voting on the edge nodes and evaluates the gains obtained by bidding, so as to select the reliable edge nodes to offload the computation task, and the utility of the sensing device cluster j is determined by the gains and the cost obtained by the sensing device cluster j, which can be expressed as follows:
uj=Γ(Dj)-Ω(pj,Dj)
wherein, gamma (D)j) Representing the size of a computing task of a sensing equipment cluster as DjThe satisfaction degree of the training result returned by the edge node is obtained; omega (p)j,Dj) Representing a cost function of the sensing device. Is composed ofThe utility of the sensing equipment cluster is maximized, and the sensing equipment cluster adopts the optimal price to obtain the credible CPU resource.
And the cluster head node selects a credible edge node by adopting a sensing equipment cluster learning model based on Q-learning.
The sensing equipment cluster learning model based on Q-learning is defined as follows:
Figure BDA0002943322740000201
the method comprises the following steps that S represents a state space of a sensing equipment cluster sharing edge node CPU, wherein the state space comprises a credible state and an incredible state; a is the action space, A ═ at},
Figure BDA0002943322740000202
Wherein p iso,tA bid representing a gap t purchase edge node CPU resource by each sensing device o at the time of the bid; t isnRepresents the maximum number of bid slots; y is the delivery probability,
Figure BDA0002943322740000203
m represents the number of the sensing devices in the sensing device cluster, namely the number of Q-learning agents;
Figure BDA0002943322740000204
represents the reward generated by the cluster of sensing devices j, wherein the reward generated by the sensing device o in the cluster of sensing devices
Figure BDA0002943322740000211
The calculation is as follows:
Figure BDA0002943322740000212
wherein eta is12Is a weight parameter, r, of the performance and confidence evaluation of the offloading execution of the training task1 o(n) offloading the performance reward performed for the training task of the sensing device o,
Figure BDA0002943322740000213
reward for the trustworthiness of the edge node to accomplish offloading of computing tasks:
Figure BDA0002943322740000214
Figure BDA0002943322740000215
wherein, κiThe larger the training duration parameter representing the edge node i, the larger r1 oThe smaller (n), ωiAnd representing the training precision parameter of the edge node i, and n represents the number of the current computing tasks.
In the system, each sensing device determines its own bid, and the working process is as follows: (1) all sensing devices observe the state stE.g. S. (2) Each sensing device votes according to history in state stNext, take a bidding action at. (3) The system state space is passed to the next state st+1E.g. S, with a transfer probability of
Figure BDA0002943322740000216
If the sensing equipment cluster does not obtain the CPU resource of the edge node, the bidding is continued. If the sensing equipment cluster obtains the CPU resource of the edge node, after a period of time, obtaining the training precision and duration provided by the CPU of the edge node and generating a credibility voting reward
Figure BDA0002943322740000217
Therefore, the reward function is divided into two parts, one part is the performance of training task unloading execution, and the other part is the credibility evaluation of the edge node for completing the calculation task unloading, and the credibility evaluation is represented by a voting value.
The cluster head node acts a according to the bidding time gap t of each sensing device in the sensing device clustertI.e. whether the respective sensing device has purchased it or notThe CPU resource of the edge node of the slot quotation takes the weighted average value of the quotation as the unit price of the CPU resource and adopts the state-action Q function of the cluster head node to calculate the state stAnd then adopting the Q value of the unit price of the CPU resource to maximize the Q value so as to maximize the local average reward of each sensing device, and determining the action strategy pi epsilon R according to the bidding adopted by the sensing device at the moment|S|×|A|Choosing a trusted edge node to achieve an intelligent contract, with pi representing in state stThe probability of the cluster of sensor devices taking an offer action is dropped.
The local average reward of each sensing device is maximized, specifically:
Figure BDA0002943322740000221
wherein, Επ[·]Representing the expectation of state-action pairs for all sensing devices in the cluster of sensing devices under the bid action policy pi.
The state-action Q function of the cluster head node is:
Figure BDA0002943322740000222
the Q value update function is as follows:
Figure BDA0002943322740000223
the optimal strategy of the cluster head node is to select the edge node with the maximum Q value, namely
Figure BDA0002943322740000224
Action of time atOptimal strategy pi of cluster head node*(at) Expressed as:
Figure BDA0002943322740000225
the optimal bid optimization (algorithm 2) of the CPU resource of the edge node shared by the sensing equipment cluster based on Q-learning comprises the following steps:
Figure BDA0002943322740000226
the optimal strategy pi of the sensing equipment cluster can be obtained by the algorithm 2*(at) And actions
Figure BDA0002943322740000227
And the best bid
Figure BDA0002943322740000228
At this time, the sensing equipment cluster obtains the maximum utility, and the sensing equipment is ensured to obtain the credible CPU resource of the edge node.
In the sensing equipment cluster, the cluster member nodes firstly unload the calculation tasks to the cluster head nodes, then the cluster head nodes unload the calculation tasks to the edge nodes, and the calculation task unloading set of the cluster member nodes is DTj={DTj,1,DTj,2,...,DTj,o,...,DTv,M}. Wherein, DTj,oThe method includes the steps that the calculation task unloading amount of a sensing device o in a sensing device cluster j is represented, and the total calculation task size is as follows:
Figure BDA0002943322740000231
during the unloading of the computing task, the credible transaction information of the edge node and the cluster head node of the sensing equipment needs to be respectively determined. In order to record and restrict the transaction process of the edge node and the sensing equipment cluster head node, a block chain is arranged between the edge node and the sensing equipment cluster head node, transaction information is stored in the sensing equipment block chain, the sensing equipment cluster head node is responsible for creating new block storage and calculation task unloading transaction information, meanwhile, after receiving information returned by the edge node, a calculation result is verified, and then the calculation result is issued to a sensing equipment cluster member. The process of verifying the calculation result is as follows: and triggering an intelligent contract to judge whether the calculation task unloading transaction meets contract conditions or not when the edge node returns, and recording the contract conditions in a block of the cluster head node of the sensing equipment if the contract conditions are met.
The edge node and the cluster head node are provided with a block chain for storing the intelligent contract; the intelligent contract comprises: size D of computing task signed by private keys of edge node and cluster head node of both parties of smart contractjThe price of the edge node, the training duration, and the contract generation timestamp. When the intelligent contract is executed, injecting a preset number of bit coins into edge nodes and cluster head nodes of both parties of the contract respectively, and if any one of the parties does not comply with the intelligent contract, deducting the bit coins injected in advance in respective blocks by the intelligent contract agent so as to punish malicious behaviors of the two parties; if both parties abide by the intelligent contract, the intelligent contract agent returns the bitcoin injected in the block after deducting the return of the use of the CPU resource.
In the invention, the intelligent contract is a procedural protocol used for restricting the cooperative negotiation process between the edge node and the sensing equipment cluster head node. Under the condition that no third-party node participates, the credible conditions of the transactions of the CPU resource shared by the two parties are predefined by the intelligent contract, and the credible shared CPU price of the edge node and the cluster head node of the sensing equipment is automatically and dynamically adjusted. The negotiation process of the intelligent contract comprises three phases: negotiation, deployment, and transaction.
And (3) negotiation: the sensing equipment cluster head node interacts with the edge node, and the intelligent contract is negotiated to restrict the sharing of the edge node
A CPU resource. The intelligent contract contains entries of: size of computing task DjPrice of edge node, training duration, contract generation timestamp. After the intelligent contract is negotiated, in order to ensure the contract security, the edge node and the cluster head node of the sensing equipment respectively use the private key to sign.
A deployment phase: after the edge node and the sensing equipment cluster head node negotiate the intelligent contract, the contract is respectively deployed into the block chain and contract addresses are issued, after the calculation task is unloaded, the edge node and the sensing equipment cluster head node respectively access the intelligent contract addresses, and whether the two parties abide by the intelligent contract is verified. This effectively prevents untrusted behavior of both parties.
Shared CPU resource transaction stage: after the intelligent contracts are deployed to the blockchain, the edge nodes and the sensing equipment estimate the calculation task unloading amount. Before the sensing equipment cluster head node requests CPU resources, the edge node and the sensing equipment cluster head node respectively inject certain bit coins into the blocks. In order to prevent an illegal sensing equipment cluster head node from repeatedly unloading a calculation task, the edge node generates a token sharing CPU resources, the edge node sends a message containing the serial number of the CPU containing signature information and the token to the sensing equipment cluster head node, after the sensing equipment cluster head node verifies the message, a calculation task unloading transaction is generated, and the transaction is sent to an intelligent contract address and is bound with an intelligent contract. Meanwhile, the edge node and the sensing equipment cluster head node record the transaction to the block chain. And finally, starting the transaction process of the intelligent contract agent monitoring edge node and the sensing equipment cluster head node. If either party is not in compliance with the intelligent contract, the intelligent contract agent deducts the pre-injected bitcoins in the respective block to penalize its malicious behavior. If both parties abide by the intelligent contract, the intelligent contract agent returns the bitcoin injected in the block after deducting the return of the use of the CPU resource.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A CPU resource trusted sharing system in sensing edge cloud task unloading of an integrated block chain is characterized by comprising edge nodes and cluster head nodes;
the edge node is used for providing calculation task unloading service for the sensing equipment, adjusting the unit price of the CPU resource according to the principle that the unit price of the CPU resource is higher when the predicted unloading task amount is larger, and providing the CPU resource unit price to the cluster head node to achieve an intelligent contract of the calculation task unloading service;
the cluster head node is used for providing a CPU according to the edge nodeResource unit price is quoted for the sensing equipment and the bidding action of the sensing equipment is collected { p }o,tThe method comprises the steps of (1) voting and rewarding the credibility of an edge node CPU fed back by sensing equipment, and selecting a credible edge node by adopting a reinforcement learning algorithm according to the bid of the sensing equipment and the credibility voting and rewarding of the edge node CPU to achieve an intelligent contract and unload a computing task;
the edge node and the cluster head node are provided with a block chain for storing the intelligent contract; the intelligent contract comprises: size D of computing task signed by private keys of edge node and cluster head node of both parties of smart contractjThe price of the edge node, the training duration, and the contract generation timestamp. When the intelligent contract is executed, injecting a preset number of bit coins into edge nodes and cluster head nodes of both parties of the contract respectively, and if any one of the parties does not comply with the intelligent contract, deducting the bit coins injected in advance in respective blocks by the intelligent contract agent so as to punish malicious behaviors of the two parties; if both parties abide by the intelligent contract, the intelligent contract agent returns the bitcoin injected in the block after deducting the return of the use of the CPU resource.
2. The system of claim 1, wherein the edge nodes employ a recurrent neural network to determine, as the current offload size, the ith in a current sequence of offload sizes of computing tasks provided by cluster head nodes
Figure FDA0002943322730000011
Calculating the size of the corresponding predicted workload shedding amount
Figure FDA0002943322730000012
3. The system of claim 2, wherein the current amount of computing task offload is of a size that is trusted to share CPU resources in sensory edge cloud task offload for a chain of integrated blocks
Figure FDA0002943322730000013
The calculation is as follows:
Figure FDA0002943322730000021
wherein beta represents the task unload density calculated by all the sensing devices,
Figure FDA0002943322730000022
Figure FDA0002943322730000023
the number of the sensing devices unloading the computation tasks in the sensing device cluster j is represented, wherein ∈ {0,1, 2.,. mu (t) }, μ (t) is the number of the computation tasks unloaded by the sensing devices in the sensing device cluster j at time t, and λ is the unloading rate.
4. The system of claim 2, wherein the memory block of the recurrent neural network comprises an input layer, a control layer, a neural network, and an output layer.
The input layer is used for inputting the unloading amount of the ith calculation task
Figure FDA0002943322730000024
Long term memory of ct-1And short term memory ht-1
The control layer includes three control gates:
Figure FDA0002943322730000025
and
Figure FDA0002943322730000026
the following logics were respectively employed:
Figure FDA0002943322730000027
Figure FDA0002943322730000028
Figure FDA0002943322730000029
wherein, sigma represents a sigmoid activation function, and the function value is mapped into an interval from 0 to 1;
Figure FDA00029433227300000210
Wi T,
Figure FDA00029433227300000211
representing a weight; bf,bi,bcRepresents a bias; tanh represents the activation function, and the mapping data is in the range of-1 to 1.
The output layer is used for outputting the size of the unloading amount of the ith predicted calculation task
Figure FDA00029433227300000212
The calculation is as follows:
Figure FDA00029433227300000213
wherein the content of the first and second substances,
Figure FDA00029433227300000214
represents a weight, boRepresents a bias;
the updating method of the long-term memory comprises the following steps:
Figure FDA00029433227300000215
short term memoryMemory is obtained according to the following method: sequence of the size of the workload to be calculated
Figure FDA00029433227300000216
As short term memory, i.e.
Figure FDA00029433227300000217
5. The system of claim 4, wherein the recurrent neural network is trained to obtain network weights within a time interval T according to the following method
Figure FDA0002943322730000031
Wi T,
Figure FDA0002943322730000032
And bias bf,bi,bc,bo
Initializing network weights and biases; at each time T within the time interval T, the following is performed:
selecting the size of the unloading capacity of the first calculation task
Figure FDA0002943322730000033
Input, computing output h using forward propagationtAnd calculating a loss function
Figure FDA0002943322730000034
Back propagation tuning weights and bias parameters, where L represents the calculation task offload amount sequence length, Yt lRepresenting the actual calculation task capacity size,
Figure FDA0002943322730000035
indicating the predicted size of the workload shedding of the computational tasks.
6. The system according to claim 1, wherein the unit price of the CPU resource is adjusted according to a principle that the unit price of the CPU resource is higher when the predicted unloading task amount is larger, and preferably, the adjusted unit price of the CPU resource is calculated by using the following formula
Figure FDA0002943322730000036
Figure FDA0002943322730000037
Wherein p isiThe current CPU resource unit price for the edge node i,
Figure FDA0002943322730000038
and xi represents the maximum capacity of the CPU of the edge node i, and is a weight parameter between the preset CPU price and the maximum capacity.
7. The system of claim 1, wherein the cluster head node selects a trusted edge node using a Q-learning-based sensing device cluster learning model.
8. The system of claim 1, wherein the Q-learning-based sensing device cluster learning model is:
Figure FDA0002943322730000039
wherein S represents the state space of the sensing equipment cluster sharing edge node CPU; a is a space of motion,
Figure FDA0002943322730000041
at={p1,t,p2,t,...,po,t,...,pM,tin which p iso,tA bid representing a gap t purchase edge node CPU resource by each sensing device o at the time of the bid; t isnRepresents the maximum number of bid slots; y is the delivery probability,
Figure FDA0002943322730000042
m represents the number of the sensing devices in the sensing device cluster, namely the number of Q-learning agents;
Figure FDA0002943322730000043
represents the reward generated by the sensing device o;
Figure FDA0002943322730000044
represents the reward generated by the cluster of sensing devices j;
the cluster head node acts a according to the bidding time gap t of each sensing device in the sensing device clustertWhether each sensing device purchases the CPU resource of the edge node of the time slot quotation or not, the weighted average value of the quotation is used as the unit price of the CPU resource, and the state-action Q function of the cluster head node is adopted to calculate the state stAnd then adopting the Q value of the unit price of the CPU resource to maximize the Q value so as to maximize the local average reward of each sensing device, and determining the action strategy pi epsilon R according to the bidding adopted by the sensing device at the moment|S|×|A|Choosing a trusted edge node to achieve an intelligent contract, with pi representing in state stThe probability of the cluster of sensor devices taking an offer action is dropped.
The state-action Q function of the cluster head node is:
Figure FDA0002943322730000045
the Q value update function is as follows:
Figure FDA0002943322730000046
the optimal strategy of the cluster head node is to select the edge node with the maximum Q value, namely
Figure FDA0002943322730000047
Action of time atOptimal strategy pi of cluster head node*(at) Expressed as:
Figure FDA0002943322730000048
9. the system of claim 8, wherein a cluster of sensor devices in the cluster of sensor devices generates rewards for a trusted sharing of CPU resources during a sensory edge cloud task offload
Figure FDA0002943322730000049
The calculation is as follows:
Figure FDA0002943322730000051
wherein eta is12Is a weight parameter, r, of the performance and confidence evaluation of the offloading execution of the training task1 o(n) offloading the performance reward performed for the training task of the sensing device o,
Figure FDA0002943322730000052
reward for the trustworthiness of the edge node to accomplish offloading of computing tasks:
Figure FDA0002943322730000053
Figure FDA0002943322730000054
wherein, κiThe larger the training duration parameter representing the edge node i, the larger r1 oThe smaller (n), ωiAnd representing the training precision parameter of the edge node i, and n represents the number of the current computing tasks.
10. The system of claim 8, wherein the maximizing of the local average reward per sensing device is specifically:
Figure FDA0002943322730000055
wherein, Επ[·]Representing the expectation of state-action pairs for all sensing devices in the cluster of sensing devices under the bid action policy pi.
CN202110186724.XA 2021-02-18 2021-02-18 CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain Pending CN112783662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110186724.XA CN112783662A (en) 2021-02-18 2021-02-18 CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110186724.XA CN112783662A (en) 2021-02-18 2021-02-18 CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain

Publications (1)

Publication Number Publication Date
CN112783662A true CN112783662A (en) 2021-05-11

Family

ID=75761520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110186724.XA Pending CN112783662A (en) 2021-02-18 2021-02-18 CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain

Country Status (1)

Country Link
CN (1) CN112783662A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114790A (en) * 2021-06-10 2021-07-13 武汉研众科技有限公司 Load balancing method and system based on block chain and edge calculation
CN113382073A (en) * 2021-06-08 2021-09-10 重庆邮电大学 Monitoring system and method for edge nodes in cloud edge-side industrial control system
CN113590328A (en) * 2021-08-02 2021-11-02 重庆大学 Block chain-based edge computing service interaction method and system
CN114661378A (en) * 2022-03-31 2022-06-24 华南理工大学 Meta-universe multi-dimensional computing power unloading scheme based on encryption computing block chain
CN114661378B (en) * 2022-03-31 2024-06-25 华南理工大学 Meta universe multidimensional computing power unloading scheme based on encryption computing block chain

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100131644A1 (en) * 2008-11-21 2010-05-27 Electronics And Telecommunications Research Institute Resource allocation method in wireless network
US20190020657A1 (en) * 2017-07-13 2019-01-17 Dell Products, Lp Method and apparatus for optimizing mobile edge computing for nomadic computing capabilities as a service
US20190319861A1 (en) * 2018-04-13 2019-10-17 The Curators Of The University Of Missouri Method and system for secure resource management utilizing blockchain and smart contracts
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
CN110418416A (en) * 2019-07-26 2019-11-05 东南大学 Resource allocation methods based on multiple agent intensified learning in mobile edge calculations system
US20200366950A1 (en) * 2019-05-14 2020-11-19 At&T Intellectual Property I, L.P. System and method for managing dynamic pricing of media content through blockchain
CN112202928A (en) * 2020-11-16 2021-01-08 绍兴文理学院 Credible unloading cooperative node selection system and method for sensing edge cloud block chain network
US20210021431A1 (en) * 2020-09-25 2021-01-21 Intel Corporation Methods, apparatus and systems to share compute resources among edge compute nodes using an overlay manager

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100131644A1 (en) * 2008-11-21 2010-05-27 Electronics And Telecommunications Research Institute Resource allocation method in wireless network
US20190020657A1 (en) * 2017-07-13 2019-01-17 Dell Products, Lp Method and apparatus for optimizing mobile edge computing for nomadic computing capabilities as a service
US20190319861A1 (en) * 2018-04-13 2019-10-17 The Curators Of The University Of Missouri Method and system for secure resource management utilizing blockchain and smart contracts
US20200366950A1 (en) * 2019-05-14 2020-11-19 At&T Intellectual Property I, L.P. System and method for managing dynamic pricing of media content through blockchain
CN110417872A (en) * 2019-07-08 2019-11-05 深圳供电局有限公司 A kind of edge network resource allocation methods towards mobile block chain
CN110418416A (en) * 2019-07-26 2019-11-05 东南大学 Resource allocation methods based on multiple agent intensified learning in mobile edge calculations system
US20210021431A1 (en) * 2020-09-25 2021-01-21 Intel Corporation Methods, apparatus and systems to share compute resources among edge compute nodes using an overlay manager
CN112202928A (en) * 2020-11-16 2021-01-08 绍兴文理学院 Credible unloading cooperative node selection system and method for sensing edge cloud block chain network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIANHUA LIU等: "A Bayesian Q-Learning Game for Dependable Task Offloading Against DDoS Attacks in Sensor Edge Cloud", IEEE *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113382073A (en) * 2021-06-08 2021-09-10 重庆邮电大学 Monitoring system and method for edge nodes in cloud edge-side industrial control system
CN113114790A (en) * 2021-06-10 2021-07-13 武汉研众科技有限公司 Load balancing method and system based on block chain and edge calculation
CN113114790B (en) * 2021-06-10 2021-09-14 武汉研众科技有限公司 Load balancing method and system based on block chain and edge calculation
CN113590328A (en) * 2021-08-02 2021-11-02 重庆大学 Block chain-based edge computing service interaction method and system
CN113590328B (en) * 2021-08-02 2023-06-27 重庆大学 Edge computing service interaction method and system based on block chain
CN114661378A (en) * 2022-03-31 2022-06-24 华南理工大学 Meta-universe multi-dimensional computing power unloading scheme based on encryption computing block chain
CN114661378B (en) * 2022-03-31 2024-06-25 华南理工大学 Meta universe multidimensional computing power unloading scheme based on encryption computing block chain

Similar Documents

Publication Publication Date Title
Huang et al. FedParking: A federated learning based parking space estimation with parked vehicle assisted edge computing
CN112783662A (en) CPU resource trusted sharing system in sensing edge cloud task unloading of integrated block chain
He et al. QoE-based task offloading with deep reinforcement learning in edge-enabled Internet of Vehicles
CN113992676B (en) Incentive method and system for layered federal learning under terminal edge cloud architecture and complete information
CN111262940B (en) Vehicle-mounted edge computing application caching method, device and system
CN112202928A (en) Credible unloading cooperative node selection system and method for sensing edge cloud block chain network
Li et al. Blockchain-based data trading in edge-cloud computing environment
CN111262944B (en) Method and system for hierarchical task offloading in heterogeneous mobile edge computing network
Heidari et al. A green, secure, and deep intelligent method for dynamic IoT-edge-cloud offloading scenarios
Kong et al. A reliable and efficient task offloading strategy based on multifeedback trust mechanism for IoT edge computing
Tang et al. Dependent task offloading for multiple jobs in edge computing
CN116669111A (en) Mobile edge computing task unloading method based on blockchain
Wu et al. Optimal deploying IoT services on the fog computing: A metaheuristic-based multi-objective approach
Xiao et al. Deep reinforcement learning for optimal resource allocation in blockchain-based IoV secure systems
Li et al. DQN-enabled content caching and quantum ant colony-based computation offloading in MEC
Zhang et al. A dynamic resource overbooking mechanism in fog computing
Qin et al. User‐Edge Collaborative Resource Allocation and Offloading Strategy in Edge Computing
Li et al. Computation offloading and service allocation in mobile edge computing
Aslani et al. A token-based incentive mechanism for video streaming applications in peer-to-peer networks
Cui et al. A secure and decentralized DLaaS platform for edge resource scheduling against adversarial attacks
Anh et al. Joint time scheduling and transaction fee selection in blockchain-based RF-powered backscatter cognitive radio network
Gao et al. Deep reinforcement learning based node pairing scheme in edge-chain for IoT applications
Liu et al. Edge data caching with consumer-centric service prediction in resilient industry 5.0
Hosseinpour et al. Quality of experience aware computation offloading in MEC-enabled blockchain-based IoT networks
Qi et al. STFM: a blockchain sharding algorithm based on trust field model for heterogeneous Internet of Things

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination