A method and system for offloading edge computing tasks based on Lyapunov
By adopting the task offload method based on Lyapunov in the edge computing system, the task and energy queue are built, and the dynamic adjustment is used to make use of Lyapunov optimization technology, the problems of insufficient energy consumption management and inconsistent resource allocation in the existing technology are solved, and efficient and sustainable task offloading and system performance improvement are achieved.
Patent Information
- Application Number
- CN202411554548.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The existing edge computing task offloading methods are insufficient in energy consumption management, and the limited battery capacity of IoT devices is not fully considered, resulting in rapid depletion of equipment power, affecting system stability and service continuity; at the same time, while paying attention to task queue stability, most methods ignore energy queue management, failing to effectively improve the coordination efficiency of equipment energy collection and task processing; in addition, existing methods lack dynamic optimization in the resource allocation process, and cannot flexibly adjust according to real-time network status, resulting in inconsistent resource allocation and task requirements, affecting the overall efficiency and response speed of edge computing systems.
The edge computing task unloading method based on Lyapunov is adopted to obtain the task arrival amount and energy collection through IoT devices, and a task buffer queue and battery energy queue are constructed. Combined with Lyapunov's optimization method, the task size, energy, CPU frequency and other parameters are dynamically adjusted to achieve the optimal unloading decision.
It effectively improves the sustainability and system stability of task offloading, realizes the overall efficiency optimization of equipment energy collection and task processing, and ensures efficient utilization of resources and improves system performance.
Smart Images

Figure CN119485491B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing technology, and more specifically, relates to a Lyapunov-based edge computing task offloading method and system. Background Art
[0002] In the digital age, the rapid development of the Internet of Things, the rise of 5G communication technology, and the widespread popularity of smart devices have led to an exponential growth in data volume. This trend not only puts higher demands on energy efficiency, but also poses severe challenges to data processing capabilities and real-time performance. In this context, mobile edge computing has emerged as a new computing architecture. By deploying computing resources near the data source close to the user, it significantly shortens the physical distance between the user and the computing resources, thereby greatly improving the efficiency and response speed of the system. With this distributed architecture, mobile edge computing effectively reduces the network bandwidth load and further optimizes the user experience. With the continuous expansion of IoT applications, mobile edge computing technology has gradually become one of the core technologies to promote the development of an intelligent society. At the same time, task offloading, as the core mechanism of mobile edge computing, has received widespread attention. By offloading computing tasks from IoT devices to edge servers for processing, task offloading effectively alleviates the computing pressure of devices and extends the service life of devices.
[0003] Existing edge computing task offloading methods mainly include: the first is an offloading method based on static heuristics. This type of method decides whether to offload tasks to edge servers based on predefined heuristic rules (such as task size, device computing power, etc.); the second is an offloading method based on task queue stability optimization. This type of method determines the offloading and execution of tasks based on the length and processing speed of the task queue, and allocates computing resources; the third is an offloading method based on static resource allocation and simple optimization algorithms. This type of method statically determines the task offloading strategy and resource allocation scheme based on the initial state of the device and network; the fourth is an offloading method based on a single-objective optimization algorithm. This type of method designs task offloading and resource allocation based on specific optimization goals (such as minimizing energy consumption, maximizing energy efficiency, etc.), and usually uses mathematical optimization techniques (such as linear programming, gradient descent, etc.) to achieve the optimization goals.
[0004] However, the current edge computing task offloading methods have some non-negligible defects:
[0005] First, existing static heuristic-based offloading methods usually perform offloading operations based on fixed rules such as task size and device computing power, while ignoring the dynamic changes in device battery capacity. This will cause IoT devices to quickly run out of power when processing high-energy consumption tasks, and the devices will not be able to continue running, thus affecting system stability and service continuity.
[0006] Second, although the existing offloading methods based on task queue stability optimization take into account the stability of the task queue, they often ignore the management of the energy queue, and therefore cannot simultaneously optimize the overall efficiency of the device’s energy collection and task processing;
[0007] Third, the existing offloading methods based on static resource allocation and simple optimization algorithms only perform static or simple optimization when allocating resources, but cannot be dynamically adjusted according to the network status. This leads to a mismatch between resource allocation and task requirements, and further leads to waste or excessive use of bandwidth and computing resources, affecting the overall efficiency and response speed of the edge computing system.
[0008] Fourth, most of the existing offloading methods based on single-objective optimization algorithms only focus on the optimization of a single objective, while ignoring other factors. This will cause IoT devices to be unable to fully balance performance and efficiency when facing a complex and changeable operating environment. Summary of the invention
[0009] In response to the above defects or improvement needs of the prior art, the present invention provides a Lyapunov-based edge computing task offloading method and system, which aims to solve the technical problems of insufficient energy consumption management in the existing computing task offloading methods and failure to fully consider the limited battery capacity of IoT devices, resulting in rapid depletion of device power, thereby affecting system stability and service continuity, as well as the technical problems of most current offloading methods, while paying attention to the stability of task queues, ignoring energy queue management, and failing to effectively improve the coordinated efficiency of device energy collection and task processing, and the technical problems of the existing computing task offloading methods lacking dynamic optimization in the resource allocation process and being unable to flexibly adjust according to the real-time network status, resulting in incoordination between resource allocation and task requirements, thereby causing waste or excessive occupation of bandwidth and computing resources, affecting the overall efficiency and response speed of the edge computing system.
[0010] To achieve the above object, according to one aspect of the present invention, a Lyapunov-based edge computing task offloading method is provided, comprising the following steps:
[0011] (1) The i-th IoT device obtains the number of tasks arriving at time t At the same time, the built-in energy harvesting EH device can obtain energy at time t from the surrounding environment Where i represents the serial number of the IoT device in the edge computing system, and i∈[1,..., the total number of IoT devices in the edge computing system].
[0012] (2) The i-th IoT device obtains the energy consumption of the task to be processed at time t based on the parameters of the task to be processed and its own parameters.
[0013] (3) The energy consumption of the task to be processed by the ith IoT device at time t obtained in step (2) Get the utility of the task to be processed by the i-th IoT device at time t and profit The profits of all IoT devices in the edge computing system at time t Integrate to get the overall profit P of the edge computing system at time t t , and obtain the optimization target P1 of the edge computing system based on the overall profit.
[0014] (4) The number of tasks that the i-th IoT device has reached at time t according to step (1) and the energy collected And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Construct the task buffer queue of the i-th IoT device at time t and battery energy queue
[0015] (5) The task buffer queue at time t obtained by the i-th IoT device according to step (4) and battery energy queue Construct the virtual task queue of the i-th IoT device at time t respectively and Virtual Energy Queue
[0016] (6) The i-th IoT device adds the virtual task queue at time t obtained in step (5) and Virtual Energy Queue Perform weighted summation to obtain the mixed queue of the i-th IoT device at time t And according to the mixed queue and the optimization target of the edge computing system obtained in step (3), the Lyapunov optimization method is used to obtain the final optimization target.
[0017] (7) The task size of the task to be processed by the ith IoT device at time t according to the final optimization target P3 obtained in step (6) Collecting Energy CPU frequency Transmit power and sub-bandwidth Perform iterative processing to obtain the optimal offloading decision for the i-th IoT device at time t
[0018] (8) The edge computing system obtains the optimal offloading decision of the i-th IoT device at time t based on step (7) Offload tasks to the IoT device.
[0019] (9) The i-th IoT device determines whether the current time t reaches T. If so, the process ends; otherwise, t=t+1 is set and the process returns to step (2).
[0020] Preferably, the parameters of the tasks to be processed by the i-th IoT device include the task size of the tasks to be processed by the i-th IoT device at time t: And the CPU cycle frequency M required for the i-th IoT device to process 1 bit of data; the parameters of the i-th IoT device itself include the capacitance switching coefficient k of the i-th IoT device, the CPU frequency at time t And the transmission power at time t
[0021] Step (2) is as follows: first, the ith IoT device obtains the local computing energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. (The subscript l in the mathematical notation indicates that the task to be processed is calculated locally on the IoT device and has no substantial physical meaning):
[0022]
[0023] Then, the i-th IoT device obtains the unloading energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. (The subscript s in the mathematical notation indicates that the task to be processed is offloaded to the edge server for calculation and has no substantial physical meaning):
[0024]
[0025] in represents the transmission rate of the pending tasks of the ith IoT device on the wireless channel at time t. According to Shannon's theorem, in is the sub-bandwidth allocated to the i-th IoT device at time t, is the channel gain of the IoT device at time t and obeys exponential distribution, and σ is the background noise of the wireless channel.
[0026] Finally, the i-th IoT device calculates the energy consumption of the local computing of the IoT device at time t And the unloading energy consumption of the IoT device at time t Get the energy consumption of the IoT device to calculate the task to be processed at time t
[0027]
[0028] in is the pending task offloading decision, and there is That is, the pending task of the i-th IoT device can only choose one computing mode at time t. This means that the task to be processed is calculated locally on the IoT device; This means that the pending tasks are offloaded to the edge server for calculation.
[0029] Preferably, step (3) is specifically,
[0030] First, the i-th IoT device calculates the task size of the task to be processed at time t. Get the utility of the IoT device calculating the task to be processed at time t
[0031]
[0032] Then, the i-th IoT device calculates the energy consumption of the task to be processed based on the time t obtained in step (2) Get the profit of the task to be processed by the i-th IoT device at time t The calculation formula is as follows:
[0033]
[0034] Where λ is an adjustable weight parameter, and its value is preferably set to 3×10 3 , which is used to adjust utility and energy consumption to the same order of magnitude to achieve a balance between the two.
[0035] Then, the profits of all IoT devices in the edge computing system that calculate the tasks to be processed are summed to obtain the overall profit P of the edge computing system at time t. t :
[0036]
[0037] Finally, the overall profit P of the edge computing system at time t is t Take the average value over the entire time range to obtain the optimization target P1 of the edge computing system:
[0038]
[0039]
[0040] Where T represents the number of time slices in which the edge computing system runs, and its value is preferably 100, and n represents the total number of IoT devices in the edge computing system; the C1 constraint indicates that the unloading of pending tasks adopts a binary decision method; the C2 constraint indicates that the number of tasks arriving is limited; the C3 constraint indicates that the task size of the pending tasks at the current moment cannot exceed the amount of tasks that can be processed in the task buffer queue; the C4 constraint indicates that the energy consumption must be a non-negative value and cannot exceed the remaining battery energy of the IoT device at the current moment; the C5 constraint indicates that the discharge amount of the battery is bounded; the C6 constraint indicates that the energy collection capability of the EH device is limited, that is, the collected energy must not exceed the preset maximum value; the C7 and C8 constraints indicate that the CPU frequency and transmission power of the IoT device have clear upper and lower limits; the C9 constraint indicates that the sub-bandwidth allocated to the IoT device is subject to the minimum bandwidth threshold w min and total bandwidth resources, where w min Ensure that each IoT device can obtain a certain amount of bandwidth resources to meet its communication needs; the C10 constraint indicates that the bandwidth usage of all IoT devices in the edge computing system cannot exceed the available bandwidth resources of the channel.
[0041] Preferably, step (4) is specifically,
[0042] First, according to the task arrival quantity of the i-th IoT device at time t obtained in step (1), Get the task buffer queue of the IoT device at time t+1
[0043]
[0044] Then, the task buffer queue of the i-th IoT device at time t is obtained by the following formula: (in ):
[0045] Then, according to the energy of the i-th IoT device at time t obtained in step (1), And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Get the battery energy queue of the i-th IoT device at time t+1
[0046]
[0047] Similar to the update of the task buffer queue, the battery energy queue at the current moment depends on the battery energy queue at the previous moment, the collected energy, and the energy consumption of the tasks to be processed.
[0048] Finally, the battery energy queue of the i-th IoT device at time t is obtained by the following formula: (in ):
[0049]
[0050] Preferably, step (5) comprises the following sub-steps:
[0051] (5-1) According to the task buffer queue of the i-th IoT device at time t obtained in step (4), obtain the virtual task queue of the IoT device at time t
[0052]
[0053] in is the virtual task queue of the ith IoT device at time t-1, φ is the length threshold of the task buffer queue of each IoT device at each moment;
[0054] (5-2) Calculate the energy consumption of the task to be processed at time t of the i-th IoT device obtained in step (2) As well as the related constraints in the optimization objective obtained in step (3), the energy disturbance parameter θ of the i-th IoT device is obtained:
[0055]
[0056] Where K is a control parameter, and its value range is 0 to +∞, preferably 2×10 -9 ; E min is the minimum energy consumption limit of the i-th IoT device at time t; is the estimated maximum energy consumption demand of the ith IoT device at time t, which is obtained by the following formula:
[0057]
[0058] Where E max is the maximum energy consumption limit of the ith IoT device at time t, where f max is the maximum CPU frequency allowed for the i-th IoT device, p max is the maximum transmission power allowed for the i-th IoT device, and τ is the length of a time slice.
[0059] (5-3) The battery energy queue of the i-th IoT device at time t obtained according to step (4) and the energy disturbance parameter of the i-th IoT device obtained in step (5-2), and obtain the virtual energy queue of the i-th IoT device at time t
[0060]
[0061] in
[0062] Preferably, step (6) comprises the following sub-steps:
[0063] (6-1) According to the virtual task queue and virtual energy queue of the i-th IoT device at time t obtained in step (5), obtain the mixed queue of the i-th IoT device at time t
[0064]
[0065] Wherein x1 and x2 are weight coefficients and satisfy x1+x2=1, preferably, x1=x2=0.5.
[0066] (6-2) According to the mixed queue of the i-th IoT device at time t obtained in step (6-1), obtain the Lyapunov function of the mixed queue of the edge computing system at time t:
[0067]
[0068] Among them, L(R t ) is a scalar measure of the mixed queue backlog at time t in the edge computing system.
[0069] (6-3) According to the Lyapunov function of the mixed queue of the edge computing system at time t obtained in step (6-2), the Lyapunov drift function of the edge computing system at time t is obtained:
[0070]
[0071] in represents the expected value of the random variable x.
[0072] (6-4) According to the Lyapunov drift function of the edge computing system at time t obtained in step (6-3), the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t is obtained:
[0073]
[0074] Where R t is the mixed queue of the edge computing system at time t; V>0, which is the weighted parameter of drift plus penalty in the Lyapunov optimization framework, B, C, D are constants, and:
[0075]
[0076] (6-5) Minimize the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t obtained in step (6-4) to obtain the Lyapunov optimization target P2 of the edge computing system:
[0077]
[0078] (6-6) The Lyapunov optimization target P2 of the edge computing system at time t obtained in step (6-5) is further refined to the minimization problem of a single IoT device to obtain the final optimization target P3 of the edge computing system:
[0079]
[0080] Preferably, step (7) comprises the following sub-steps:
[0081] (7-1) According to the constraints in the optimization target P1 of the edge computing system obtained in step (3), randomly initialize the task size of the task to be processed by the i-th IoT device at time t Collecting Energy CPU frequency Transmit power and sub-bandwidth As the current solution of the i-th IoT device at time t, it initializes the temperature parameter Tem in the simulated annealing algorithm.
[0082] (7-2) According to the current solution of the ith IoT device at time t and the final optimization target P3 obtained in step (6), obtain the current function value P31 of the final optimization target P3 of the ith IoT device when the task to be processed at time t is calculated locally, and the current function value P3 of the final optimization target P3 when the task to be processed at time t of the IoT device is offloaded to the edge server for calculation s .
[0083] (7-3) The current function value P31 of the final optimization target P3 obtained by step (7-2) when the task to be processed by the i-th IoT device at time t is calculated locally, and the current function value P3 of the final optimization target P3 when the task to be processed by the IoT device at time t is offloaded to the edge server for calculation s , the simulated annealing algorithm is used to solve the current solution (i.e., the task size of the task to be processed by the i-th IoT device at time t) Collecting Energy CPU frequency Transmit power and sub-bandwidth ) is randomly disturbed to generate a new candidate solution as the current solution of the i-th IoT device at time t, and the exponential annealing formula is used to update the temperature parameter Tem=Tem×a, where a is the attenuation factor, and its value range is usually 0.8 to 0.99, preferably 0.99.
[0084] (7-4) Repeat the above steps (7-2) and (7-3), and perform new disturbances and temperature updates in each iteration until the temperature Tem reaches a level close to 0, thereby obtaining the optimal task size to be processed for the i-th IoT device at time t. Optimal harvesting energy Optimal CPU frequency Optimal transmit power And the optimal sub-bandwidth
[0085] (7-5) According to step (7-4), the optimal task size of the task to be processed by the i-th IoT device at time t is obtained Optimal harvesting energy Optimal CPU frequency Optimal transmit power Optimal sub-bandwidth Get the optimal function value (P31) of the final optimization target P3 of the pending task of the i-th IoT device at time t under local calculation * , and the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation s ) * .
[0086] (7-6) Determine the optimal function value (P31) of the final optimization target P3 of the task to be processed by the i-th IoT device at time t in the local calculation in step (7-5) * Is it less than the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation? s ) * , if yes, then set the optimal offloading decision of the i-th IoT device at time t That is, the pending tasks of the IoT device at time t are calculated locally, and then go to step (8), otherwise the optimal offloading decision of the i-th IoT device at time t is set That is, the pending tasks of the IoT device at time t are offloaded to the edge server for calculation, and then proceed to step (8).
[0087] According to another aspect of the present invention, a Lyapunov-based edge computing task offloading system is provided, comprising:
[0088] The first module is set on the i-th IoT device to obtain the number of tasks arriving at time t. At the same time, the built-in energy harvesting EH device can obtain energy at time t from the surrounding environment Where i represents the serial number of the IoT device in the edge computing system, and i∈[1,..., the total number of IoT devices in the edge computing system].
[0089] The second module is set in the i-th IoT device and is used to obtain the energy consumption of the IoT device calculating the task to be processed at time t according to the parameters of the task to be processed and its own parameters.
[0090] The third module is set in the i-th IoT device and is used to calculate the energy consumption of the task to be processed at time t of the IoT device obtained by the second module. Get the utility of the task to be processed by the i-th IoT device at time t and profit The profits of all IoT devices in the edge computing system at time t Integrate to get the overall profit P of the edge computing system at time t t , and obtain the optimization target P1 of the edge computing system based on the overall profit.
[0091] The fourth module is set in the i-th IoT device, and is used to calculate the task arrival quantity at time t obtained by the first module. and the energy collected And the energy consumption of the IoT device at time t for calculating the task to be processed obtained by the second module Construct the task buffer queue of the i-th IoT device at time t and battery energy queue
[0092] The fifth module is set in the i-th IoT device and is used to buffer the task queue at time t obtained by the fourth module. and battery energy queue Construct the virtual task queue of the i-th IoT device at time t respectively and Virtual Energy Queue
[0093] The sixth module is set in the i-th IoT device and is used to convert the virtual task queue at time t obtained by the fifth module into and Virtual Energy Queue Perform weighted summation to obtain the mixed queue of the i-th IoT device at time t According to the mixed queue and the optimization target of the edge computing system obtained by the third module, the Lyapunov optimization method is used to obtain the final optimization target.
[0094] The seventh module is set in the i-th IoT device, and is used to calculate the task size of the task to be processed at time t of the i-th IoT device according to the final optimization target P3 obtained in the sixth module. Collecting Energy CPU frequency Transmit power and sub-bandwidth Perform iterative processing to obtain the optimal offloading decision for the i-th IoT device at time t
[0095] The eighth module is set in the edge computing system and is used to make the optimal unloading decision of the ith IoT device at time t obtained by the seventh module. Offload tasks to the IoT device.
[0096] The ninth module is set in the i-th IoT device and is used to determine whether the current time t reaches T. If so, the process ends, otherwise t=t+1 is set and the process returns to the second module.
[0097] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0098] (1) Since the present invention adopts step (1), the IoT device maintains the operation of the device by collecting renewable energy such as solar energy, thermal energy and wind energy, thereby reducing the dependence on limited battery resources. By integrating the energy collection mechanism into the system, the sustainability of task offloading and the stability of the system are effectively improved.
[0099] (2) Since the present invention adopts steps (4) to (6), its hybrid queue management strategy integrates virtual battery energy and virtual task queue. While considering the stability of the task queue, it also introduces energy queue management. By introducing Lyapunov optimization technology, the long-term stability of battery energy and task queue is guaranteed, and the overall efficiency optimization of device energy collection and task processing is achieved.
[0100] (3) Since the present invention adopts steps (6) to (7), it monitors network traffic, pending tasks, computing resources and other information in real time, and dynamically and flexibly adjusts bandwidth and resource allocation strategies based on the status information of the current time slice, thereby ensuring efficient use of network resources and improving the overall performance of the system.
[0101] (4) Since the present invention adopts step (3), its profit combines the utility and energy consumption of the system to maximize the overall profit, reflecting the impact of energy use on the device's perceived service quality satisfaction, thereby improving the device user experience quality while reducing system energy consumption, enabling the system to balance performance and efficiency in a changing operating environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] Figure 1 It is a flowchart of the edge computing task offloading method based on Lyapunov of the present invention;
[0103] Figure 2 This is an application environment diagram of the edge computing task offloading method based on Lyapunov of the present invention. DETAILED DESCRIPTION
[0104] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0105] The basic idea of the present invention is that, firstly, by modeling the arrival volume of tasks and energy collection of IoT devices, a task buffer queue and a battery energy queue are constructed, and the energy consumption, utility and overall profit of the tasks are calculated; secondly, a virtual hybrid queue is constructed based on the task buffer queue and the battery energy queue, and the Lyapunov optimization method is used to determine the optimization target; then, based on the optimization target, parameters such as task size, energy, CPU frequency, etc. are dynamically adjusted to obtain the optimal decision; finally, the efficiency of task offloading and the improvement of system performance are achieved under the energy consumption constraint through cyclic iteration.
[0106] like Figure 1 and Figure 2 As shown, the present invention provides an edge computing task offloading method based on Lyapunov, comprising the following steps:
[0107] (1) The i-th IoT device obtains the number of tasks arriving at time t At the same time, it uses its built-in energy harvesting (EH) device to obtain energy at time t from the surrounding environment (such as solar energy, wind energy and other green energy). Where i represents the serial number of the IoT device in the edge computing system, and i∈[1,..., the total number of IoT devices in the edge computing system].
[0108] Preferably, the process of each IoT device generating tasks is independent of each other, that is, the number and mode of tasks generated by one IoT device will not be affected by the situation of tasks generated by other devices. The amount of tasks generated by IoT devices in each time slot is limited, that is, where a max It represents the maximum amount of tasks that the ith IoT device can receive at time t, and its value is preferably 1000 (in bits). The amount of tasks arriving follows a uniform distribution within a certain range, which can be mathematically described as Typically, these IoT devices are heterogeneous, so the amount of tasks generated by different devices in each time slot is May be different.
[0109] In terms of energy harvesting, due to the inherent limitations of devices in capturing ambient energy and converting it into usable electrical energy, the energy collected by the i-th device at time t satisfies where e max Indicates the maximum energy harvesting threshold that the device's EH unit can achieve in a single time slot.
[0110] (2) The i-th IoT device obtains the energy consumption of the task to be processed at time t based on the parameters of the task to be processed and its own parameters.
[0111] Specifically, the parameters of the pending tasks of the ith IoT device include the task size of the pending tasks of the ith IoT device at time t: And the CPU cycle frequency M required for the i-th IoT device to process 1 bit of data; the parameters of the i-th IoT device itself include the capacitance switching coefficient k of the i-th IoT device, the CPU frequency at time t And the transmission power at time t
[0112] Specifically, the i-th IoT device obtains the local computing energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. (The subscript l in the mathematical notation indicates that the task to be processed is calculated locally on the IoT device and has no substantial physical meaning):
[0113]
[0114] Then, the i-th IoT device obtains the unloading energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. (The subscript s in the mathematical notation indicates that the task to be processed is offloaded to the edge server for calculation and has no substantial physical meaning):
[0115]
[0116] in represents the transmission rate of the pending tasks of the ith IoT device on the wireless channel at time t. According to Shannon's theorem, in is the sub-bandwidth allocated to the i-th IoT device at time t, is the channel gain of the IoT device at time t and obeys exponential distribution, and σ is the background noise of the wireless channel.
[0117] Finally, the i-th IoT device calculates the energy consumption of the local computing of the IoT device at time t And the unloading energy consumption of the IoT device at time t Get the energy consumption of the IoT device to calculate the task to be processed at time t
[0118]
[0119] in is the pending task offloading decision, and there is That is, the pending task of the i-th IoT device can only choose one computing mode at time t. This means that the task to be processed is calculated locally on the IoT device; This means that the pending tasks are offloaded to the edge server for calculation.
[0120] (3) The energy consumption of the task to be processed by the ith IoT device at time t obtained in step (2) Get the utility of the task to be processed by the i-th IoT device at time t and profit The profits of all IoT devices in the edge computing system at time t Integrate to get the overall profit P of the edge computing system at time t t , and obtain the optimization target P1 of the edge computing system based on the overall profit.
[0121] Specifically, this step is as follows: first, the i-th IoT device calculates the task size of the task to be processed at time t. Get the utility of the IoT device calculating the task to be processed at time t
[0122]
[0123] The utility It is used to indicate the performance of the edge computing system or the user's satisfaction with the Quality of Service (QoS).
[0124] Then, the i-th IoT device calculates the energy consumption of the task to be processed based on the time t obtained in step (2) Get the profit of the task to be processed by the i-th IoT device at time t The calculation formula is as follows:
[0125]
[0126] Where λ is an adjustable weight parameter, and its value is preferably set to 3×10 3 , which is used to adjust utility and energy consumption to the same order of magnitude to achieve a balance between the two.
[0127] Then, the profits of all IoT devices in the edge computing system that calculate the tasks to be processed are summed to obtain the overall profit P of the edge computing system at time t. t :
[0128]
[0129] Finally, the overall profit P of the edge computing system at time t is t Take the average value over the entire time range to obtain the optimization target P1 of the edge computing system:
[0130]
[0131]
[0132] Where T represents the number of time slices in which the edge computing system runs, and its value is preferably 100, and n represents the total number of IoT devices in the edge computing system; the C1 constraint indicates that the unloading of pending tasks adopts a binary decision method; the C2 constraint indicates that the number of tasks arriving is limited; the C3 constraint indicates that the task size of the pending tasks at the current moment cannot exceed the amount of tasks that can be processed in the task buffer queue; the C4 constraint indicates that the energy consumption must be a non-negative value and cannot exceed the remaining battery energy of the IoT device at the current moment; the C5 constraint indicates that the discharge amount of the battery is bounded; the C6 constraint indicates that the energy collection capability of the EH device is limited, that is, the collected energy must not exceed the preset maximum value; the C7 and C8 constraints indicate that the CPU frequency and transmission power of the IoT device have clear upper and lower limits; the C9 constraint indicates that the sub-bandwidth allocated to the IoT device is subject to the minimum bandwidth threshold w min and total bandwidth resources, where w min Ensure that each IoT device can obtain a certain amount of bandwidth resources to meet its communication needs; the C10 constraint indicates that the bandwidth usage of all IoT devices in the edge computing system cannot exceed the available bandwidth resources of the channel.
[0133] (4) The number of tasks that the i-th IoT device has reached at time t according to step (1) and the energy collected And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Construct the task buffer queue of the i-th IoT device at time t and battery energy queue
[0134] Specifically, this step is as follows: first, according to the task arrival quantity of the i-th IoT device at time t obtained in step (1), Get the task buffer queue of the IoT device at time t+1
[0135]
[0136] This formula indicates that the task buffer queue is updated based on a continuous time series, that is, the task buffer queue at the current moment depends on the task buffer queue at the previous moment, the task arrival amount, and the task size of the tasks to be processed.
[0137] Then, the task buffer queue of the i-th IoT device at time t is obtained by the following formula: (in ):
[0138]
[0139] In order to obtain the task buffer queue of the i-th IoT device at time t, it is necessary to calculate the task buffer queue of the IoT device at time t-1. Task arrival amount and the task size of the pending tasks Perform calculations.
[0140] Then, according to the energy of the i-th IoT device at time t obtained in step (1), And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Get the battery energy queue of the i-th IoT device at time t+1
[0141]
[0142] Similar to the update of the task buffer queue, the battery energy queue at the current moment depends on the battery energy queue at the previous moment, the collected energy, and the energy consumption of the tasks to be processed.
[0143] Finally, the battery energy queue of the i-th IoT device at time t is obtained by the following formula: (in ):
[0144]
[0145] In order to obtain the battery energy queue of the i-th IoT device at time t, it is necessary to calculate the battery energy queue of the IoT device at time t-1. energy And calculate the energy consumption of the tasks to be processed Perform calculations.
[0146] (5) The task buffer queue at time t obtained by the i-th IoT device according to step (4) and battery energy queue Construct the virtual task queue of the i-th IoT device at time t respectively and Virtual Energy Queue
[0147] Preferably, step (5) comprises the following sub-steps:
[0148] (5-1) According to the task buffer queue of the i-th IoT device at time t obtained in step (4), obtain the virtual task queue of the IoT device at time t
[0149]
[0150] in is the virtual task queue of the ith IoT device at time t-1. Similar to the update of the task buffer queue in step (4), the update of the virtual task queue at the current moment is based on a continuous time series. Therefore, in order to obtain the virtual task queue of the ith IoT device at time t, A virtual task queue based on the IoT device at time t-1 is required Calculate; φ is the length threshold of the task buffer queue of each IoT device at each moment, and its value is preferably 10 times the maximum value of the task arrival amount, that is, 1×10 4 .
[0151] The advantage of this sub-step (5-1) is that the virtual task queue can track the deviation between the task buffer queue and the length threshold φ, thereby indirectly regulating the length of the task buffer queue.
[0152] (5-2) Calculate the energy consumption of the task to be processed at time t of the i-th IoT device obtained in step (2) As well as the related constraints in the optimization objective obtained in step (3), the energy disturbance parameter θ of the i-th IoT device is obtained:
[0153]
[0154] Where K is a control parameter, and its value range is 0 to +∞, preferably 2×10 -9 ; E min is the minimum energy consumption limit of the i-th IoT device at time t; is the estimated maximum energy consumption demand of the ith IoT device at time t, which is obtained by the following formula:
[0155]
[0156] Where E max is the maximum energy consumption limit of the ith IoT device at time t, where f max is the maximum CPU frequency allowed for the i-th IoT device, p max is the maximum transmission power allowed for the i-th IoT device, and τ is the length of a time slice.
[0157] (5-3) The battery energy queue of the i-th IoT device at time t obtained according to step (4) and the energy disturbance parameter of the i-th IoT device obtained in step (5-2), and obtain the virtual energy queue of the i-th IoT device at time t
[0158]
[0159] in
[0160] The advantage of the above sub-steps (5-2) to (5-3) is that the construction of the virtual energy queue eliminates the energy causal constraint, so that the unloading decisions between different time slots do not interfere with each other. By stabilizing the virtual energy queue, the battery energy queue can be effectively stabilized near the energy disturbance parameter θ.
[0161] (6) The i-th IoT device adds the virtual task queue at time t obtained in step (5) and Virtual Energy Queue Perform weighted summation to obtain the mixed queue of the i-th IoT device at time t And according to the mixed queue and the optimization target of the edge computing system obtained in step (3), the Lyapunov optimization method is used to obtain the final optimization target.
[0162] Preferably, step (6) comprises the following sub-steps:
[0163] (6-1) According to the virtual task queue and virtual energy queue of the i-th IoT device at time t obtained in step (5), obtain the mixed queue of the i-th IoT device at time t
[0164]
[0165] Wherein x1 and x2 are weight coefficients and satisfy x1+x2=1, preferably, x1=x2=0.5.
[0166] (6-2) According to the mixed queue of the i-th IoT device at time t obtained in step (6-1), obtain the Lyapunov function of the mixed queue of the edge computing system at time t:
[0167]
[0168] Among them, L(R t ) is a scalar measure of the mixed queue backlog at time t in the edge computing system.
[0169] (6-3) According to the Lyapunov function of the mixed queue of the edge computing system at time t obtained in step (6-2), the Lyapunov drift function of the edge computing system at time t is obtained:
[0170]
[0171] in represents the expected value of the random variable x.
[0172] (6-4) According to the Lyapunov drift function of the edge computing system at time t obtained in step (6-3), the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t is obtained:
[0173]
[0174] Where R t is the mixed queue of the edge computing system at time t; V>0, which is the weighted parameter of drift plus penalty in the Lyapunov optimization framework, and is used to balance the stability of the mixed queue and the overall profit of the edge computing system in the Lyapunov optimization framework. By properly adjusting the V value, the trade-off between the stability of the mixed queue and the overall profit of the edge computing system can be flexibly adjusted to achieve the optimal performance. B, C, and D are constants, and:
[0175]
[0176] (6-5) Minimize the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t obtained in step (6-4) to obtain the Lyapunov optimization target P2 of the edge computing system:
[0177]
[0178] (6-6) The Lyapunov optimization target P2 of the edge computing system at time t obtained in step (6-5) is further refined to the minimization problem of a single IoT device to obtain the final optimization target P3 of the edge computing system:
[0179]
[0180] The advantage of this step (6) is that, by introducing the Lyapunov optimization technology, an optimization control method is provided for the edge computing system that does not rely on prior information, thereby effectively improving the performance indicators of the system while maintaining the stability of the network queue.
[0181] (7) The task size of the task to be processed by the ith IoT device at time t according to the final optimization target P3 obtained in step (6) Collecting Energy CPU frequency Transmit power and sub-bandwidth Perform iterative processing to obtain the optimal offloading decision for the i-th IoT device at time t
[0182] Step (7) includes the following sub-steps:
[0183] (7-1) According to the constraints in the optimization target P1 of the edge computing system obtained in step (3), randomly initialize the task size of the task to be processed by the i-th IoT device at time t Collecting Energy CPU frequency Transmit power and sub-bandwidth As the current solution of the i-th IoT device at time t, the temperature parameter Tem in the simulated annealing algorithm is initialized (its value range is 0 to +∞, preferably 100).
[0184] (7-2) According to the current solution of the ith IoT device at time t and the final optimization target P3 obtained in step (6), obtain the current function value P31 of the final optimization target P3 of the ith IoT device when the task to be processed at time t is calculated locally, and the current function value P3 of the final optimization target P3 when the task to be processed at time t of the IoT device is offloaded to the edge server for calculation s .
[0185] (7-3) The current function value P31 of the final optimization target P3 obtained by step (7-2) when the task to be processed by the i-th IoT device at time t is calculated locally, and the current function value P3 of the final optimization target P3 when the task to be processed by the IoT device at time t is offloaded to the edge server for calculation s , the simulated annealing algorithm is used to solve the current solution (i.e., the task size of the task to be processed by the i-th IoT device at time t) Collecting Energy CPU frequency Transmit power and sub-bandwidth ) performs a small-scale random perturbation (the small-scale in the present invention means that the perturbation amount does not exceed a certain proportion of the current solution, and the proportion is preferably 5%) to generate a new candidate solution as the current solution of the i-th IoT device at time t, and uses the exponential annealing formula to update the temperature parameter Tem=Tem×a, where a is the attenuation factor, and its value range is usually 0.8 to 0.99, preferably 0.99.
[0186] (7-4) Repeat the above steps (7-2) and (7-3), and perform new disturbances and temperature updates in each iteration until the temperature Tem reaches a level close to 0, thereby obtaining the optimal task size to be processed for the i-th IoT device at time t. Optimal harvesting energy Optimal CPU frequency Optimal transmit power And the optimal sub-bandwidth
[0187] (7-5) According to step (7-4), the optimal task size of the task to be processed by the i-th IoT device at time t is obtained Optimal harvesting energy Optimal CPU frequency Optimal transmit power Optimal sub-bandwidth Get the optimal function value (P31) of the final optimization target P3 of the pending task of the i-th IoT device at time t under local calculation * , and the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation s ) * .
[0188] (7-6) Determine the optimal function value (P31) of the final optimization target P3 of the task to be processed by the i-th IoT device at time t in the local calculation in step (7-5) *Is it less than the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation? s ) * , if yes, then set the optimal offloading decision of the i-th IoT device at time t That is, the pending tasks of the IoT device at time t are calculated locally, and then go to step (8), otherwise the optimal offloading decision of the i-th IoT device at time t is set That is, the pending tasks of the IoT device at time t are offloaded to the edge server for calculation, and then proceed to step (8).
[0189] (8) The edge computing system obtains the optimal offloading decision of the i-th IoT device at time t based on step (7) Offload tasks to the IoT device.
[0190] (9) The i-th IoT device determines whether the current time t reaches T. If so, the process ends; otherwise, t=t+1 is set and the process returns to step (2).
[0191] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A Lyapunov-based edge computing task offloading method, characterized in that: The following steps are involved: (1) The i-th IoT device obtains the number of tasks arriving at time t At the same time, the built-in energy harvesting EH device can obtain energy at time t from the surrounding environment Where i represents the serial number of the IoT device in the edge computing system, and i∈[1,…, the total number of IoT devices in the edge computing system]; (2) The i-th IoT device obtains the energy consumption of the task to be processed at time t based on the parameters of the task to be processed and its own parameters. (3) The energy consumption of the task to be processed by the ith IoT device at time t obtained in step (2) Get the utility of the task to be processed by the i-th IoT device at time t and profit The profits of all IoT devices in the edge computing system at time t Integrate to get the overall profit P of the edge computing system at time t t , and obtain the optimization target P1 of the edge computing system based on the overall profit; (4) The number of tasks that the i-th IoT device has reached at time t according to step (1) and the energy collected And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Construct the task buffer queue of the i-th IoT device at time t and battery energy queue (5) The task buffer queue at time t obtained by the i-th IoT device according to step (4) and battery energy queue Construct the virtual task queue of the i-th IoT device at time t respectively and Virtual Energy Queue (6) The i-th IoT device adds the virtual task queue at time t obtained in step (5) and Virtual Energy Queue Perform weighted summation to obtain the mixed queue of the i-th IoT device at time t According to the mixed queue and the optimization target of the edge computing system obtained in step (3), the Lyapunov optimization method is used to obtain the final optimization target; (7) The task size of the task to be processed by the ith IoT device at time t according to the final optimization target P3 obtained in step (6) Collecting Energy CPU frequency Transmit power and sub-bandwidth Perform iterative processing to obtain the optimal offloading decision for the i-th IoT device at time t (8) The edge computing system obtains the optimal offloading decision of the i-th IoT device at time t based on step (7) Offloading tasks to the IoT device; (9) The i-th IoT device determines whether the current time t reaches T. If so, the process ends; otherwise, t=t+1 is set and the process returns to step (2).
2. The Lyapunov-based edge computing task offloading method according to claim 1 is characterized in that: The parameters of the pending tasks of the ith IoT device include the task size of the pending tasks of the ith IoT device at time t. And the CPU cycle frequency M required for the i-th IoT device to process 1 bit of data; the parameters of the i-th IoT device itself include the capacitance switching coefficient k of the i-th IoT device, the CPU frequency at time t And the transmission power at time t Step (2) is as follows: first, the ith IoT device obtains the local computing energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. The subscript l in mathematical notation indicates that the task to be processed is calculated locally on the IoT device and has no real physical meaning: Then, the i-th IoT device obtains the unloading energy consumption of the IoT device at time t according to the parameters of the task to be processed and its own parameters. The subscript s in mathematical notation indicates that the task to be processed is offloaded to the edge server for calculation and has no substantial physical meaning: in represents the transmission rate of the pending tasks of the ith IoT device on the wireless channel at time t. According to Shannon's theorem, in is the sub-bandwidth allocated to the i-th IoT device at time t, is the channel gain of the IoT device at time t, and obeys exponential distribution, σ is the background noise of the wireless channel; Finally, the i-th IoT device calculates the energy consumption of the local computing of the IoT device at time t And the unloading energy consumption of the IoT device at time t Get the energy consumption of the IoT device to calculate the task to be processed at time t in is the pending task offloading decision, and there is That is, the pending task of the i-th IoT device can only choose one computing mode at time t. This means that the task to be processed is calculated locally on the IoT device; This means that the pending tasks are offloaded to the edge server for calculation.
3. The Lyapunov-based edge computing task offloading method according to claim 2 is characterized in that: Step (3) is specifically: First, the i-th IoT device calculates the task size of the task to be processed at time t. Get the utility of the IoT device calculating the task to be processed at time t Then, the i-th IoT device calculates the energy consumption of the task to be processed based on the time t obtained in step (2) Get the profit of the task to be processed by the i-th IoT device at time t The calculation formula is as follows: Where λ is an adjustable weight parameter, which is used to adjust the utility and energy consumption to the same order of magnitude to achieve a balance between the two; Then, the profits of all IoT devices in the edge computing system that calculate the tasks to be processed are summed to obtain the overall profit P of the edge computing system at time t. t : Finally, the overall profit P of the edge computing system at time t t Take the average value over the entire time range to obtain the optimization target P1 of the edge computing system: Where T represents the number of time slices in which the edge computing system runs, and n represents the total number of IoT devices in the edge computing system; the C1 constraint indicates that the unloading of pending tasks adopts a binary decision method; the C2 constraint indicates that the number of tasks arriving is limited; the C3 constraint indicates that the size of the pending tasks at the current moment cannot exceed the amount of tasks that can be processed in the task buffer queue; the C4 constraint indicates that the energy consumption must be a non-negative value and cannot exceed the remaining battery energy of the IoT device at the current moment; the C5 constraint indicates that the discharge amount of the battery is bounded; the C6 constraint indicates that the energy collection capability of the EH device is limited, that is, the collected energy must not exceed the preset maximum value; the C7 and C8 constraints indicate that the CPU frequency and transmission power of the IoT device have clear upper and lower limits; The C9 constraint indicates that the sub-bandwidth allocated to IoT devices is subject to the minimum bandwidth threshold w min and total bandwidth resources, where w min Ensure that each IoT device can obtain a certain amount of bandwidth resources to meet its communication needs; the C10 constraint indicates that the bandwidth usage of all IoT devices in the edge computing system cannot exceed the available bandwidth resources of the channel.
4. The Lyapunov-based edge computing task offloading method according to claim 3 is characterized in that: Step (4) is specifically: First, according to the task arrival quantity of the i-th IoT device at time t obtained in step (1), Get the task buffer queue of the IoT device at time t+1 Then, the task buffer queue of the i-th IoT device at time t is obtained by the following formula: in Then, according to the energy of the i-th IoT device at time t obtained in step (1), And the energy consumption of the IoT device at time t for calculating the task to be processed obtained in step (2) Get the battery energy queue of the i-th IoT device at time t+1 Similar to the update of the task buffer queue, the battery energy queue at the current moment depends on the battery energy queue at the previous moment, the collected energy, and the energy consumption of the tasks to be processed; Finally, the battery energy queue of the i-th IoT device at time t is obtained by the following formula: in 5. The Lyapunov-based edge computing task offloading method according to claim 4 is characterized in that: Step (5) includes the following sub-steps: (5-1) According to the task buffer queue of the i-th IoT device at time t obtained in step (4), obtain the virtual task queue of the IoT device at time t in is the virtual task queue of the ith IoT device at time t-1, φ is the length threshold of the task buffer queue of each IoT device at each moment; (5-2) Calculate the energy consumption of the task to be processed at time t of the i-th IoT device obtained in step (2) As well as the related constraints in the optimization objective obtained in step (3), the energy disturbance parameter θ of the i-th IoT device is obtained: Where K is the control parameter, and its value range is from 0 to +∞; E min is the minimum energy consumption limit of the i-th IoT device at time t; is the estimated maximum energy consumption demand of the ith IoT device at time t, which is obtained by the following formula: Where E max is the maximum energy consumption limit of the ith IoT device at time t, where f max is the maximum CPU frequency allowed for the i-th IoT device, p max is the maximum transmission power allowed for the i-th IoT device, and τ is the length of a time slice; (5-3) The battery energy queue of the i-th IoT device at time t obtained according to step (4) and the energy disturbance parameter of the i-th IoT device obtained in step (5-2), and obtain the virtual energy queue of the i-th IoT device at time t in 6. The Lyapunov-based edge computing task offloading method according to claim 5 is characterized in that: Step (6) includes the following sub-steps: (6-1) According to the virtual task queue and virtual energy queue of the i-th IoT device at time t obtained in step (5), obtain the mixed queue of the i-th IoT device at time t Where x1 and x2 are weight coefficients, and satisfy x1+x2=1; (6-2) According to the mixed queue of the i-th IoT device at time t obtained in step (6-1), obtain the Lyapunov function of the mixed queue of the edge computing system at time t: Among them, L(R t ) is a scalar measure of the backlog of the hybrid queue at time t of the edge computing system; (6-3) According to the Lyapunov function of the mixed queue of the edge computing system at time t obtained in step (6-2), the Lyapunov drift function of the edge computing system at time t is obtained: in represents the expected value of the random variable x; (6-4) According to the Lyapunov drift function of the edge computing system at time t obtained in step (6-3), the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t is obtained: Where R t is the mixed queue of the edge computing system at time t; V>0, which is the weighted parameter of drift plus penalty in the Lyapunov optimization framework, B, C, D are constants, and: (6-5) Minimize the upper bound of the Lyapunov drift plus penalty of the mixed queue of the edge computing system at time t obtained in step (6-4) to obtain the Lyapunov optimization target P2 of the edge computing system: (6-6) The Lyapunov optimization target P2 of the edge computing system at time t obtained in step (6-5) is further refined to the minimization problem of a single IoT device to obtain the final optimization target P3 of the edge computing system:
7. The Lyapunov-based edge computing task offloading method according to claim 6 is characterized in that: Step (7) includes the following sub-steps: (7-1) According to the constraints in the optimization target P1 of the edge computing system obtained in step (3), randomly initialize the task size of the task to be processed by the i-th IoT device at time t Collecting Energy CPU frequency Transmit power and sub-bandwidth As the current solution of the i-th IoT device at time t, and initialize the temperature parameter Tem in the simulated annealing algorithm; (7-2) According to the current solution of the ith IoT device at time t and the final optimization target P3 obtained in step (6), obtain the current function value P3 of the final optimization target P3 of the task to be processed by the ith IoT device at time t in the local calculation condition l , and the current function value P3 of the final optimization target P3 when the task to be processed by the IoT device at time t is offloaded to the edge server for calculation s ; (7-3) The current function value P3 of the final optimization target P3 of the task to be processed by the i-th IoT device at time t in the local calculation condition obtained according to step (7-2) l , and the current function value P3 of the final optimization target P3 when the task to be processed by the IoT device at time t is offloaded to the edge server for calculation s , the simulated annealing algorithm is used to randomly perturb the current solution to generate a new candidate solution as the current solution of the i-th IoT device at time t, and the exponential annealing formula is used to update the temperature parameter Tem=Tem×a, where a is the attenuation factor, and its value range is usually 0.8 to 0.99; (7-4) Repeat the above steps (7-2) and (7-3), and perform new disturbances and temperature updates in each iteration until the temperature Tem reaches a level close to 0, thereby obtaining the optimal task size to be processed for the i-th IoT device at time t. Optimal harvesting energy Optimal CPU frequency Optimal transmit power And the optimal sub-bandwidth (7-5) According to step (7-4), the optimal task size of the task to be processed by the i-th IoT device at time t is obtained Optimal harvesting energy Optimal CPU frequency Optimal transmit power Optimal sub-bandwidth Get the optimal function value (P3) of the final optimization target P3 of the pending task of the i-th IoT device at time t under local calculation l ) * , and the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation s ) * ; (7-6) Determine the optimal function value (P3) of the task to be processed by the i-th IoT device at time t in step (7-5) under local calculation to finally optimize the target P3 l ) * Is it less than the optimal function value (P3) of the final optimization target P3 when the pending tasks of the IoT device at time t are offloaded to the edge server for calculation? s ) * , if yes, then set the optimal offloading decision of the i-th IoT device at time t That is, the pending tasks of the IoT device at time t are calculated locally, and then go to step (8), otherwise the optimal offloading decision of the i-th IoT device at time t is set That is, the pending tasks of the IoT device at time t are offloaded to the edge server for calculation, and then proceed to step (8).
8. A Lyapunov-based edge computing task offloading system, characterized in that: include: The first module is set on the i-th IoT device to obtain the number of tasks arriving at time t. At the same time, the built-in energy harvesting EH device can obtain energy at time t from the surrounding environment Where i represents the serial number of the IoT device in the edge computing system, and i∈[1,…, the total number of IoT devices in the edge computing system]; The second module is set in the i-th IoT device and is used to obtain the energy consumption of the IoT device calculating the task to be processed at time t according to the parameters of the task to be processed and its own parameters. The third module is set in the i-th IoT device and is used to calculate the energy consumption of the task to be processed at time t of the IoT device obtained by the second module. Get the utility of the task to be processed by the i-th IoT device at time t and profit The profits of all IoT devices in the edge computing system at time t Integrate to get the overall profit P of the edge computing system at time t t , and obtain the optimization target P1 of the edge computing system based on the overall profit; The fourth module is set in the i-th IoT device, and is used to calculate the task arrival quantity at time t obtained by the first module. and the energy collected And the energy consumption of the IoT device at time t for calculating the task to be processed obtained by the second module Construct the task buffer queue of the i-th IoT device at time t and battery energy queue The fifth module is set in the i-th IoT device and is used to buffer the task queue at time t obtained by the fourth module. and battery energy queue Construct the virtual task queue of the i-th IoT device at time t respectively and Virtual Energy Queue The sixth module is set in the i-th IoT device and is used to convert the virtual task queue at time t obtained by the fifth module into and Virtual Energy Queue Perform weighted summation to obtain the mixed queue of the i-th IoT device at time t According to the mixed queue and the optimization target of the edge computing system obtained by the third module, the Lyapunov optimization method is used to obtain the final optimization target; The seventh module is set in the i-th IoT device, and is used to calculate the task size of the task to be processed at time t of the i-th IoT device according to the final optimization target P3 obtained in the sixth module. Collecting Energy CPU frequency Transmit power and sub-bandwidth Perform iterative processing to obtain the optimal offloading decision for the i-th IoT device at time t The eighth module is set in the edge computing system and is used to make the optimal unloading decision of the ith IoT device at time t obtained by the seventh module. Offloading tasks to the IoT device; The ninth module is set in the i-th IoT device and is used to determine whether the current time t reaches T. If so, the process ends, otherwise t=t+1 is set and the process returns to the second module.
Citation Information
Patent Citations
Lyapunov optimization-based multi-server mobile edge computing unloading method and device
CN109857546A
Calculation unloading and resource allocation method based on Lyapunov optimization
CN115665802A