Background
With the continuous development of intelligent transportation technology, data generated by traffic sensing equipment and a control system becomes larger, so that the capacity requirement on data calculation processing is increased continuously. To address such demands, cloud computing technology is certainly considered, and the advantage of the technology is that a centralized cloud server provides ultra-strong computing power and computing resources. However, in the intelligent transportation system, when processing these tasks which are computing intensive and delay sensitive, the edge computing has a great potential because the requirement for delay is higher, and the edge computing has the characteristic that the computing power of the front-end device is closer to the elimination of delay. It is the increasing demand that has prompted the development of mobile/multiple access edge computing (MEC) technology. Under the wave of the rise of the 5G technology, the application, service and content can be locally, closely and distributively deployed by the mobile/multi-access edge computing technology, so that the service requirements of the 5G network in technical scenes of high heat capacity, low power consumption, large connection, low time delay, high reliability and the like are met. In the field of traffic control, a large number of AI algorithms are applied to image or video analysis, and the AI algorithms have higher requirements on GPU and other computing resources, so that the computation and offloading algorithm with the shortest time delay needs to be researched.
The computation unloading is one of the key technologies of the edge computation, and means that the front-end sensing equipment constrained by resources completely or partially unloads computation-intensive tasks to edge computing nodes with sufficient resources, so that the defects of the front-end equipment in the aspects of resource storage, computation performance, energy efficiency and the like are mainly solved. The computation offloading technique can directly perform data analysis (image analysis or video analysis) on the edge computation node close to the camera, which not only reduces the pressure of the core network, but also reduces the time delay caused by transmission. The computation offload mainly comprises two problems of offload decision and resource allocation. In terms of unloading decision, in order to reduce time delay, Mao et al propose a dynamic unloading (low-complexity adaptive based dynamic computing offloading, LODCO) algorithm based on Lyapunov optimization, and experimental results show that the algorithm can shorten the running time by 64%. The optimal unloading scheme aiming at reducing time delay and proposed by Zhang et al provides a layered mobile edge computing deployment architecture, and a multi-user unloading scheme is solved by adopting a Stackelberg game theory method. For resource allocation, the method can be divided into single-node allocation and multi-node allocation, and if the computing task is inseparable or can be divided but the divided parts are linked, the unloading task needs to be unloaded to the same edge computing node in the case; while for a computing task that can be split but where there is no connection to the split part, it can be offloaded to multiple edge computing nodes. Wang et al propose an interference management scheme that reduces the delay by 40% by allocating communication resources and calculating the resource allocation scheme under the condition of minimizing interference. At present, research results on computational offloading are more, but computational offloading schemes for intelligent traffic management are still few.
More importantly, for traffic control, the total latency should be as small as possible, but since the computational resources on the edge compute nodes are limited, if multiple tasks are offloaded to the same edge compute node, the communication or computational load of the whole system is unbalanced.
In a word, the existing research aiming at computation offloading focuses on how to reduce time delay, neglects the limitation of resources, and makes the computation offloading algorithm not applicable in the intelligent transportation field.
Disclosure of Invention
The invention provides a traffic data-oriented end edge collaborative computing unloading method, aiming at solving the problem that an algorithm for computing unloading in the prior art is not suitable for the field of intelligent traffic.
The technical scheme adopted by the invention for solving the technical problems is as follows: a traffic data-oriented end edge collaborative computing unloading method has the technical scheme that: firstly, establishing a system model for communication time delay and calculation time delay; then, establishing a system utility function with time delay and resources as constraint conditions; and finally, an optimization strategy is designed to balance the two strategies.
The traffic data-oriented end edge collaborative computing unloading method comprises the following steps:
1) constructing a communication time delay and calculating a time delay model:
101) defining related parameters, and preparing calculation, specifically: dividing the urban space into M regions according to the proximity of roads, deploying an edge computing node in each region, and defining an edge computing node set as M ═ {1, …, M };
assuming that there are n camera devices requesting the computing service, each computing task is represented as
Wherein d is
iIndicating the size of the input data of the ith calculation task, c
iIndicating the number of computing resources, T, required for the ith task
i maxRepresents the maximum delay allowed for task completion;
assuming that each task can select an edge compute node to execute, the edge compute node selects the policy variable xij1 representsIs DiTasks are executed on the jth edge compute server, xijIf 0, the task is not executed on the jth edge computing server;
102) constructing a communication time delay calculation model;
2) balancing delay and resources:
the system utility function is adopted to balance between resources and time delay: u shape
i(x
ij,f
ij)=α log(1+β-T
i) (ii) a Wherein, alpha is a satisfaction parameter, and the larger alpha is, the higher satisfaction is; β is used to normalize satisfaction to a non-negative parameter; the utility function of the entire system can be written as:
T
iprocessing the total time delay for the task;
optimizing a policy function: definition x ═ { xijSelecting a strategy vector for the edge computing node; f ═ fijIf it is a calculation resource vector, the system optimization function is:
the first condition ensures that the task processing time cannot exceed the allowed maximum time delay; conditions II and III ensure that each task can only run on one edge computing node or when the task runs on a camera; the conditions of the fourth and fifth restrict that the sum of the computing resources required by all tasks on the same edge computing node cannot exceed the sum of the computing resources of the edge computing node.
The step 102) of constructing the communication delay calculation model specifically comprises the following steps:
1021) for wireless communication, assume that the ith camera device requests a computation task from the jth edge compute node, h
ijRepresenting the channel gain, p
ijRepresenting the transmission power, the achievable rate can then be expressed as:
wherein, P
noiseRepresenting the noise power, B representing the system bandwidth, the communication time is:
1022) for wired communication: suppose that the ith camera equipment requests a computing task from the jth edge computing node, and the time for sending and receiving the packet by the camera equipment is TwiredThen, the communication time is: t isij com=Twired/2;
1023) Calculating a time system model: assume that the total computational resource of the jth edge compute node is denoted F
j,f
ijRepresenting the computational resource allocated to the ith task, the computational resource allocation needs to satisfy the constraint
Then the task computation time of the ith task at the jth edge node is:
1024) when computing is offloadedAnd (3) performing interval calculation: task DiThe total time required to offload to the jth edge compute node is:
1025) local computation time system model: if the task is executed in the camera device without computational offloading, the total time is the time the computational task is processed locally:
wherein f is
iRepresenting computing resources of a camera device;
1026) calculating the total time delay of communication: task processing total delay:
the invention has the beneficial effects that: in the invention, the calculation resources and the time delay are comprehensively considered in the calculation unloading process, and an optimization function is designed to obtain the balance between the calculation resources and the time delay. Firstly, establishing a total time delay system model according to a communication time system model, an edge side calculation time system model and a local calculation time system model; then, comprehensively considering the balance of resource allocation, and designing a system utility function; and finally, researching a system optimization strategy to complete the design of the calculation unloading algorithm. Aiming at the characteristics of the application of the intelligent transportation industry, the invention gives consideration to resource allocation and time delay in the design process, and the performance of the invention is superior to that of the traditional algorithm.
Detailed Description
The present application is further described below with reference to the accompanying drawings.
The overall frame diagram of the invention is shown in fig. 1, and is mainly divided into a front-end sensing device, i.e. a camera device integrated with an AI algorithm, and an edge computing server. The n camera devices send computing tasks to the m edge computing nodes arranged nearby the n camera devices through a wired network, 5G or WIFI6 or other communication technologies.
Firstly, establishing a system model for communication time delay and calculation time delay; then, establishing a system utility function with time delay and resources as constraint conditions; and finally, an optimization strategy is designed to balance the two strategies. The following further describes embodiments of the present invention with reference to specific examples:
the flow chart of the present invention is shown in FIG. 2, execute and edge execute; and then, carrying out unloading decision, handing the calculation task to the control layer, and carrying out the unloading decision by an actuator of the control layer, wherein when the calculation task can be completed in the camera equipment, the calculation unloading is not required to be directly executed in the camera equipment, and when the calculation task cannot be completed in the camera equipment, the calculation unloading is required to be executed in the edge calculation node.
Specifically, the method comprises the following steps:
1) firstly, relevant parameter definition is carried out:
definition 1: the urban space is divided into M regions according to the proximity of roads, and each region is provided with one edge computing node, so that the edge computing node set can be defined as M ═ {1, …, M }.
Definition 2: assuming that there are n camera devices requesting computing services, each computing task may be represented as a triplet
Wherein d is
iIndicating the size of the input data of the ith calculation task, c
iIndicating the number of computing resources, T, required for the ith task
i maxRepresenting the maximum delay allowed for task completion.
Definition 3: assuming that each task can select an edge compute node to execute, the edge compute node selects the policy variable x
ij1 is represented by D
iTasks are executed on the jth edge compute server, x
ijAnd 0 indicates that the task is not executed on the jth edge computing server. In particular, when the computation task is not unloaded, the image is takenWhen executing on the head device, let j equal 0, select policy variable x
i01, otherwise x
i00. For task D
iIn other words, the constraint condition needs to be satisfied
2) And (3) time delay calculation:
the communication delay of the intelligent transportation system comprises wireless communication delay and wired communication delay. The network communication modes mainly comprise wired communication, 5G communication technology, WIFI6 and the like. The invention will be explained in terms of the calculation of the time delay related to the invention in two communication modes, namely wireless communication and wired communication.
Wireless communication time calculation model: suppose that the ith camera device requests a computation task from the jth edge compute node, hijRepresenting the channel gain, pijRepresenting the transmission power, the achievable rate can then be expressed as:
wherein, PnoiseRepresenting the noise power and B the system bandwidth.
The communication time can be expressed as:
wired communication time calculation model: supposing that the ith camera equipment requests a computing task to the jth edge computing node, the ith camera equipment and the jth edge computing node are connected in a wired mode, a heartbeat packet is sent from the camera equipment to the edge computing node, then the edge computing node replies a heartbeat packet, and the time for sending and receiving the packet by the camera equipment is recorded as TwiredThen, the communication time is:
Tij com=Twired/2 (3)
calculating a time system model: an edge compute node may execute oneA computing task may also be performed in multiple computing tasks. When executing a computing task, the computing resources need to meet the latency requirements of all computing tasks. Assume that the total computational resource of the jth edge compute node is denoted F
j,f
ijRepresenting the computational resource allocated to the ith task, the computational resource allocation needs to satisfy the constraint
Then the task computation time of the ith task at the jth edge node is:
calculating unloading time: task DiThe total time required to offload to the jth edge compute node is:
local computation time system model: if the task is executed in the camera device without computational offloading, the total time is the time the computational task is processed locally:
wherein f isiRepresenting the computational resources of the camera device.
Calculating the total time delay of communication: according to definition 3, the task can be selected to be unloaded to the edge computing node for computing, and can also be computed in the camera device, and the total time delay of task processing can be obtained by formula (5) and formula (6):
3) and (3) optimizing the strategy: for traffic control, the total latency should be as small as possible, but since the computing resources on the edge computing nodes are limited, if multiple tasks are offloaded to the same edge computing node, the communication or computing load of the entire system is unbalanced.
The invention adopts a System utility function (System utility function) to balance between resources and time delay, as shown in a formula (8):
Ui(xij,fij)=αlog(1+β-Ti) (8)
wherein, alpha is a satisfaction parameter, and the larger alpha is, the higher satisfaction is; β is used to normalize satisfaction to a non-negative parameter. The utility function of the entire system can be written as:
optimizing a policy function: definition x ═ { xijSelecting a strategy vector for the edge computing node; f ═ fijThe calculation resource vector is adopted, and the system optimization function is shown in formula (9).
The first condition ensures that the task processing time cannot exceed the allowed maximum time delay; conditions two and three ensure that each task can only run on one edge compute node (when j > 0) or camera (when j equals 0); the conditions of the fourth and fifth restrict that the sum of the computing resources required by all tasks on the same edge computing node cannot exceed the sum of the computing resources of the edge computing node.
Specific example I: when the front-end camera needs to process tasks with small calculation amount, such as how many vehicles, the vehicle driving diagram captured by the camera equipment does not need to be unloaded to the edge calculation node for execution, and only needs to run in the camera equipment, and the running time is the local processing time:
c
irepresenting the number of computing resources required for the ith task, f
iRepresenting the computational resources of the camera device.
When processing tasks with large calculation amount, such as identifying license plates and vehicle colors, the calculation tasks need to be unloaded to the edge calculation nodes for execution, and only the total time delay of the unloading calculation under the condition of wired communication is explained here. Suppose that the ith camera equipment at the intersection requests a computing task from the jth edge computing node, and the communication time is
Wherein T is
wiredAnd sending and receiving the total time of the return signals of the edge computing nodes for the camera equipment.
Calculating unloading time: the task calculation time of the ith task at the jth edge node is as follows:
wherein f is
ijIndicating the computing resource allocated to the ith task, then computing task D
iThe total time required to offload to the jth edge compute node is:
calculating the total time delay of wired communication:
for the traffic control system, it is better to control the total delay to be smaller, but because the computing resources on the edge computing nodes are limited, if a plurality of tasks are offloaded to the same edge computing node, the communication or computing load of the whole system is unbalanced. Therefore, the utility function of the design system is balanced between resources and time delay, and the formula is U
i(x
ij,f
ij)=αlog(1+β-T
i) Wherein, alpha is a satisfaction parameter, and the larger alpha is, the higher satisfaction is; β is used to normalize satisfaction to a non-negative parameter. The utility function of the entire system can be written as:
furthermore, the optimization policy function: definition x ═ { xijSelecting a strategy vector for the edge computing node; f ═ fijIs a calculation resource vector, and the system optimization function is
The first condition ensures that the task processing time cannot exceed the allowed maximum time delay; conditions two and three ensure that each task can only run on one edge compute node (when j > 0) or front-end device (when j equals 0); the conditions of the fourth and fifth restrict that the sum of the computing resources required by all tasks on the same edge computing node cannot exceed the sum of the computing resources of the edge computing node.
In short, due to the shortage of computing resources of the front-end device, the traditional method is to unload the computing task to the edge computing node for running, and provide service for the applications such as traffic control with limited time delay through the cooperation of end-edge. From a traffic control perspective, it is desirable to study computational offload with the goal of reducing latency. However, the AI algorithm has higher requirements for the GPU and other computing resources, and balancing between the time delay and the computing resources is a key to the computation offload.
The method is different from the traditional algorithm, and firstly, a system model is established for communication time delay and calculation time delay; then, establishing a system utility function with time delay and resources as constraint conditions; and finally, an optimization strategy is designed to balance the two strategies. The computation offload process balances between latency and computational resources.
The invention has been described only according to specific examples, and in the method for performing edge-edge collaborative computation offloading on traffic data such as traffic flow, a certain amount of edge computation nodes are deployed according to the proximity of a road, and when a camera device at an intersection cannot process a task with an excessively large computation amount, the computation task is offloaded onto the edge computation nodes through edge-edge collaborative computation to perform computation, thereby solving the problem of time delay in traffic control.