A computation offloading and resource allocation method based on Lyapunov optimization
Through the Lyapunov optimization theory and iterative algorithm, the resource allocation of mobile edge computing system is optimized, and the dynamic cross-zone problem of vehicle-mounted mobile terminals in two-dimensional non-uniform speed random motion scenarios is solved, and more accurate calculation offloading and resource allocation is achieved, reducing system overhead.
Patent Information
- Application Number
- CN202211347119.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The prior art fails to effectively consider the additional overhead caused by dynamic crossing of the vehicle mobile terminal in two-dimensional non-uniform random motion scenarios in mobile edge computing, resulting in large calculation deviations.
The calculation offloading and resource allocation method based on Lyapunov optimization is adopted to establish a weighted and optimization model of total delay, total energy consumption and total task migration overhead, and the offloading decisions, on-board mobile terminal calculation rate and transmission power are optimized to reduce system overhead using Lyapunov theory and iterative algorithm.
By minimizing the total system overhead, the accuracy of calculation and offloading is improved, the energy consumption and delay of the mobile terminal are reduced, and resource allocation is optimized.
Smart Images

Figure CN115665802B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of mobile edge computing technology, and specifically relates to a computation offloading and resource allocation method based on Lyapunov optimization. Background Art
[0002] 5G provides a highly flexible and scalable network technology that connects everything, supporting the Internet of Everything. With the continuous development and improvement of the Internet of Things and wireless communication technologies, a wide range of new mobile applications have emerged, leading to an explosive growth in the number of mobile terminals and a significant consumption of mobile resources. As a key 5G technology, mobile edge computing servers can be considered a new architecture. Compared to mobile cloud computing, mobile edge computing servers offer lower latency and greater computing flexibility for task offloading. Mobile terminal tasks can be offloaded to mobile edge computing servers for processing, reducing computing latency and energy consumption, while effectively improving service quality and user experience.
[0003] In the existing technology, it is difficult to take into account the task migration overhead generated by vehicle-mounted mobile terminals. In complex mobility scenarios, the analysis of such problems is based on the user's one-dimensional random uniform motion or two-dimensional random uniform motion scenario, while real-world users are generally in a two-dimensional non-uniform random motion scenario. At present, the research on edge computing task offloading for the case of multiple mobile terminals and multiple mobile edge computing servers has been relatively complete, and the research on minimizing the average processing delay and processing energy consumption has been relatively complete. However, the additional overhead caused by the dynamic cross-zone movement of mobile terminals has not been considered, resulting in large calculation deviations. Summary of the Invention
[0004] The purpose of the present invention is to solve the problems raised in the background technology and propose a computation offloading and resource allocation method based on Lyapunov optimization.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] The computation offloading and resource allocation method based on Lyapunov optimization proposed in the present invention is applied to a mobile edge computing task offloading system. The mobile edge computing task offloading system includes M vehicle-mounted mobile terminals and N mobile edge computing servers. The computation offloading and resource allocation method based on Lyapunov optimization includes:
[0007] Taking the weighted sum of the total latency, total energy consumption, and total task migration overhead of the mobile edge computing task offloading system as the system overhead, the optimization model is established as follows:
[0008]
[0009] in,
[0010]
[0011]
[0012]
[0013] Among them, E m (t) represents the total energy consumption, q m (t) represents the total task migration cost, T m (t) represents the total delay, C(t) represents the system overhead, Indicates the cost weight factor for zone migration. represents the weight factor of the total delay, Represents the weight factor of total energy consumption, E total Indicates the total power of the vehicle-mounted mobile terminal, E cur (t) represents the current remaining power of the vehicle-mounted mobile terminal, Indicates the percentage of the current remaining power of the vehicle-mounted mobile terminal. C1 indicates that the calculation rate of the vehicle-mounted mobile terminal for the task cannot be greater than its maximum calculation rate. C2 indicates that the computing rate of the mobile edge computing server for the task cannot be greater than its own maximum computing rate C3 indicates that the computing rate of the mobile edge computing server for all tasks in the area cannot be greater than its own maximum computing rate C4 indicates that the total energy consumption cannot be greater than the current remaining power of the vehicle-mounted mobile terminal, and C5 indicates that the total delay cannot be greater than the maximum tolerable delay T of the task. max , C6 means the transmission power of the vehicle-mounted mobile terminal cannot be greater than its own maximum transmission power C7 represents the value range of the offloading decision, and C8 represents the value range of the weight factor of the total delay at different times t∈T={1,2,...,T}.
[0014] Introducing the delay penalty function Φ(t) into the optimization model simplifies the optimization model to:
[0015] П2:
[0016] stC2,C3,C7,C8
[0017] Split П2 according to the time segment to obtain the sub-problems of the optimization model:
[0018] П3:
[0019] stC2,C3,C7,C8
[0020] According to Lyapunov theory, a virtual queue and penalty function are established for energy consumption and Lyapunov's drift upper bound is calculated, converting the sub-problem of the optimization model into:
[0021] Π4:
[0022] stC2,C3,C7,C8
[0023] Among them, Q m (t) represents the energy backlog at time t, and V is a constant positive control parameter that represents the trade-off between system overhead and virtual queues.
[0024] According to ∏4, a mathematical expression of the offloading decision, the calculation rate of the onboard mobile terminal for the task, and the transmission power of the onboard mobile terminal is constructed.
[0025] An initial solution of offloading decision, computing rate of the on-board mobile terminal for the task, transmission power of the on-board mobile terminal and computing rate of the mobile edge computing server for the task is randomly generated. Then, an iterative algorithm is used for iterative calculation, and the system overhead is updated after each iteration until the value of the system overhead converges. The final system overhead is output as the optimal system overhead.
[0026] Preferably, the total delay is expressed as follows:
[0027]
[0028] T m (t)≤T max ≤τ
[0029] in,
[0030]
[0031]
[0032]
[0033]
[0034] H m.n (t) = h m,n (t)g0(d0 / d m,n ) θ
[0035] in, Indicates the execution delay of the vehicle-mounted mobile terminal, represents the execution delay of the mobile edge computing server, represents the transmission delay of the vehicle-mounted mobile terminal offloading the task to the mobile edge computing server, T maxrepresents the maximum tolerable delay of each task, τ represents the working time slot of each mobile edge computing server, and the time slot τ is a time segment at time t, s m (t) represents the unloading decision at time t, and s m (t) = 0 means that all tasks are executed on the vehicle-mounted mobile terminal, s m (t) = 1 means that all tasks are offloaded to the mobile edge computing server for execution, 0 < s m (t) < 1 means that part of the task is executed on the vehicle-mounted mobile terminal, and the other part of the task is executed on the mobile edge computing server, λ m (t) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal at time t, and the unit is bit, c m It indicates the CPU cycles required by the vehicle-mounted mobile terminal to calculate each bit of data, and the unit is cycle / bit, f m (t) represents the calculation rate of the task at time t by the vehicle-mounted mobile terminal, represents the computing rate of the mobile edge computing server for the task, r m,n (t) represents the task transmission rate at time t, represents the transmission power of the vehicle-mounted mobile terminal at time t, I represents the average interference in each area, σ 2 represents the channel background noise, ω represents the channel bandwidth, H m,n (t) represents the channel gain, g0 represents the path loss constant, θ represents the path loss exponent, d0 represents the reference distance, d m,n Indicates the distance from the vehicle-mounted mobile terminal to the mobile edge computing server in the area, h m,n (t) represents the small-scale Rayleigh fading factor between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, and when Indicates that the vehicle-mounted mobile terminal is within the coverage of the mobile edge computing server in the area where it is located. Indicates that the vehicle-mounted mobile terminal is not within the coverage of the mobile edge computing server in the area.
[0036] Preferably, the total cost is expressed as follows:
[0037]
[0038] in,
[0039] When the vehicle-mounted mobile terminal migrates to another area, the following conditions must be met:
[0040] q m (t) = ε
[0041] When the vehicle-mounted mobile terminal does not migrate, the following conditions are met:
[0042] q m (t) = 0
[0043] Among them, ε represents the overhead caused by the regional migration of the vehicle-mounted mobile terminal, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t-1.
[0044] Preferably, a virtual queue and penalty function are established for energy consumption according to Lyapunov theory and the upper bound of Lyapunov's drift is calculated, and the sub-problems of the optimization model are converted to Π4, including:
[0045] Since the energy backlog of the vehicle-mounted mobile terminal is affected by the current remaining power, and the current remaining power depends on the total energy consumption at the previous moment, a virtual queue Q is established based on the Lyapunov theory. m (t) is used to represent the accumulated energy consumption at time t:
[0046] Q m (t+1)=max{Q m (t)+E cur (t)-E m (t),0}
[0047] Among them, Q m (t+1) represents the accumulated energy consumption at time t+1;
[0048] According to Lyapunov theory, the quadratic Lyapunov function at time t is expressed as:
[0049]
[0050] Where L(t) represents the virtual queue Q m (t) is the scalar of the total backlog;
[0051] The difference between the scalar total backlog of the virtual queue at time t+1 and the scalar total backlog of the virtual queue at time t is called the Lyapunov drift ΔL(t) and is expressed as:
[0052] ΔL(t)=L(t+1)-L(t)
[0053] Substituting Lyapunov drift into the drift theorem, it can be expressed as:
[0054]
[0055] Among them, V is a constant positive control parameter, which represents the trade-off between system overhead and virtual queues;
[0056] Substitute the drift theorem into the derivation of energy consumption backlog:
[0057]
[0058] therefore,
[0059]
[0060] and,
[0061]
[0062] Among them, E max Indicates the maximum energy consumption required by the vehicle-mounted mobile terminal to perform tasks in a single time slot;
[0063] B(t)≤B
[0064] and,
[0065]
[0066] The drift theorem is satisfied:
[0067]
[0068] Since B is a constant, formula (1) can be transformed into ∏4.
[0069] Preferably, according to Π4, a mathematical expression of the offloading decision, the calculation rate of the onboard mobile terminal for the task, and the transmission power of the onboard mobile terminal is constructed, including:
[0070] The solution of ∏4 can be regarded as two parts, namely the current remaining power of the vehicle-mounted mobile terminal and the joint solution of the total energy consumption and system overhead, and the current remaining power model ∏ of the vehicle-mounted mobile terminal is established. 4.1 :
[0071] ∏ 4.1 :
[0072] The current remaining power E of the vehicle-mounted mobile terminal cur (t) Satisfy:
[0073]
[0074] in, represents the average value of the maximum energy consumption required by all tasks, and
[0075] The optimal solution for the current remaining power of the vehicle-mounted mobile terminal is for:
[0076]
[0077] Establish total energy consumption and system overhead model 4.2 :
[0078] ∏ 4.2 :
[0079] stC2,C3,C7,C8
[0080] Computation offloading decision: Define the computing rate of the vehicle-mounted mobile terminal for the task, the computing rate of the mobile edge computing server for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the offloading decision in a single time slot τ and set ∏ 4.2 Rewritten as ∏ 4.2.1 :
[0081] ∏ 4.2.1 :
[0082] st
[0083]
[0084] Π 4.2.1 Used in functional form:
[0085]
[0086] Among them, λ m (τ) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal in the time slot τ, f m (τ) represents the computing rate of the vehicle-mounted mobile terminal for the task in the time slot τ, r m,n (τ) represents the task transmission rate in time slot τ, represents the computing rate of the mobile edge computing server for the task in the time slot τ, represents the transmission power of the vehicle-mounted mobile terminal in time slot τ, represents a monotonic function, and its monotonicity depends on VQ m (t) and The positive and negative nature of the uninstall decision s m The value range of (t) can be determined by ∏ 4.2.1 The constraints are obtained:
[0087]
[0088] From this we can get the unloading strategy S m (t):
[0089]
[0090] Calculate the computing rate of the onboard mobile terminal for the task: Define the offloading decision, the computing rate of the mobile edge computing server for the task, and the transmission power of the onboard mobile terminal. Solve the computing rate of the onboard mobile terminal for the task in a single time slot and convert Π 4.2 Rewritten as ∏ 4.2.2 :
[0091] Π 4.2.2 :
[0092] st(1-s m (τ))λ m (τ)c m / f m (t)≤T max
[0093]
[0094]
[0095] Among them, E min It represents the minimum energy consumption required by the vehicle-mounted mobile terminal to perform tasks in a single time slot.
[0096] Π 4.2.2 Expressed in function form:
[0097]
[0098] Among them, s m (τ) represents the unloading decision in time slot τ, function is a quadratic function of , and the opening direction of the function is the same as VQ m (t) is related to its positive or negative value. When VQ m (t) is positive, opening upward, when VQ m (t) is negative, the opening is downward, and f is calculated from the constraints m (t) are as follows:
[0099]
[0100] Then the calculation rate of the vehicle-mounted mobile terminal for the task is f m (t):
[0101]
[0102] Calculate the transmission power of the vehicle-mounted mobile terminal: Define the offloading decision, the calculation rate of the vehicle-mounted mobile terminal for the task, and the calculation rate of the mobile edge computing server for the task. Solve the transmission power of the vehicle-mounted mobile terminal in a single time slot and convert Π 4.2 Rewritten as π 4.2.3 :
[0103]
[0104] Π 4.2.3 Expressed in function form:
[0105]
[0106] Building Helper Functions analyze Monotonicity of a function:
[0107]
[0108] and,
[0109]
[0110] Take the first derivative of the auxiliary function:
[0111]
[0112] make:
[0113]
[0114] right The derivative is:
[0115]
[0116] when hour, when hour, at this time It is a monotonic function, and its monotonicity is determined by VQ m (t) Decision. The value range of is solved, because the constraints contain The form of is difficult to solve directly, so it needs to be discussed in categories, as follows:
[0117] According to the total delay T in formula (2) max The constraints of The lower bound of :
[0118]
[0119] Then solve the second constraint condition in formula (2). hour,
[0120]
[0121] Then the second constraint in formula (2) is:
[0122]
[0123] The transmission power of the vehicle-mounted mobile terminal is
[0124]
[0125] in, These are two values of the transmission power of the vehicle-mounted mobile terminal:
[0126]
[0127]
[0128] Calculate the computing rate of the mobile edge computing server for the task: define the optimal offloading decision, the computing rate of the vehicle-mounted mobile terminal for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the computing rate of the mobile edge computing server for the task in a single time slot and convert ∏ 4.2 Rewritten as π 4.2.4 :
[0129] Π 4.2.4 :
[0130] st
[0131]
[0132] Π 4.2.4 Expressed in function form:
[0133]
[0134] function It is a monotonic function, and its monotonicity is consistent with VQ m (t) relevant.
[0135] According to Π 4.2.4 The constraints of The value range of is:
[0136]
[0137] Then calculate the computing rate of the server for the task
[0138]
[0139] Compared with the prior art, the present invention has the following beneficial effects:
[0140] This method determines the system overhead as the weighted sum of the total latency, total energy consumption, and total task migration overhead of the mobile edge computing task offloading system, and models this. The system overhead minimization problem is then solved using Lyapunov optimization theory. An iterative method is used to calculate the offloading decision, the task computation rate of the onboard mobile terminal, the onboard mobile terminal's transmit power, and the task computation rate of the mobile edge computing server. This results in an optimal system overhead, thereby reducing the total system overhead. This calculation structure is more accurate than existing techniques that fail to account for the additional overhead caused by the mobile terminal's dynamic cross-zone movement. BRIEF DESCRIPTION OF THE DRAWINGS
[0141] Figure 1 This is a module block diagram of the computation offloading and resource allocation method based on Lyapunov optimization of the present invention;
[0142] Figure 2 This is a flow chart of the computation offloading and resource allocation method based on Lyapunov optimization of the present invention. DETAILED DESCRIPTION
[0143] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0144] It should be noted that when a component is referred to as being "connected" to another component, it may be directly connected to the other component or there may be an intermediate component. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0145] like Figure 1-2 As shown, a computation offloading and resource allocation method based on Lyapunov optimization is applied to a mobile edge computing task offloading system. The mobile edge computing task offloading system includes M vehicle-mounted mobile terminals and N mobile edge computing servers. The computation offloading and resource allocation method based on Lyapunov optimization includes:
[0146] It should be noted that if Figure 1As shown, each area has a mobile edge computing server and multiple in-vehicle mobile terminals. Due to the limited computing power of in-vehicle mobile terminals, each in-vehicle mobile terminal can offload all or part of its tasks to the mobile edge computing server in its area for remote execution. Furthermore, the locations of the in-vehicle mobile terminals are randomly distributed and in a state of continuous movement, while the edge computing server is stationary. The in-vehicle mobile terminals remain stationary during each time slot.
[0147] Step S1: Taking the weighted sum of the total latency, total energy consumption, and total task migration overhead of the mobile edge computing task offloading system as the system overhead, an optimization model is established as follows:
[0148]
[0149] in,
[0150]
[0151]
[0152]
[0153] Among them, E m (t) represents the total energy consumption, q m (t) represents the total task migration cost, T m (t) represents the total delay, C(t) represents the system overhead, Indicates the cost weight factor for zone migration. represents the weight factor of the total delay, Represents the weight factor of total energy consumption, E total Indicates the total power of the vehicle-mounted mobile terminal, E cur (t) represents the current remaining power of the vehicle-mounted mobile terminal, Indicates the percentage of the current remaining power of the vehicle-mounted mobile terminal. C1 indicates that the calculation rate of the vehicle-mounted mobile terminal for the task cannot be greater than its maximum calculation rate. C2 indicates that the computing rate of the mobile edge computing server for the task cannot be greater than its own maximum computing rate C3 indicates that the computing rate of the mobile edge computing server for all tasks in the area cannot be greater than its own maximum computing rate C4 indicates that the total energy consumption cannot be greater than the current remaining power of the vehicle-mounted mobile terminal, and C5 indicates that the total delay cannot be greater than the maximum tolerable delay T of the task. max , C6 means the transmission power of the vehicle-mounted mobile terminal cannot be greater than its own maximum transmission power C7 represents the value range of the offloading decision, and C8 represents the value range of the weight factor of the total delay at different times t∈T={1,2,...,T}.
[0154] Specifically, the set of vehicle-mounted mobile terminals M = {1, 2, ..., m., M}, the set of mobile edge computing (MEC) servers N = {1, 2, ..., n.., N}, at different times t∈T = {1, 2, ..., T}, the working time slot of each mobile edge computing server is τ, and the time slot τ is a time segment at time t.
[0155] Each task of the vehicle-mounted mobile terminal is represented by a five-tuple {λ m (t),c m ,T max ,A m (t),B m (t)}, where A m (t) represents the location of the vehicle-mounted mobile terminal at time t, and the coordinates (α m (t),β m (t)) indicates; B m (t) represents the moving direction a of the vehicle-mounted mobile terminal m (t) and moving speed v m (t). And the position of the vehicle-mounted mobile terminal at time t is A m The horizontal and vertical coordinates of (t) can be expressed as:
[0156]
[0157] The tasks of the vehicle-mounted mobile terminal are independent of each other.
[0158] Since the amount of downlink data is much smaller than the amount of uplink data (that is, the amount of data fed back by the mobile edge computing server after processing the task is smaller than the task transmitted to the mobile edge computing server), the delay of the mobile edge computing server transmitting the calculation results to the on-board mobile terminal can be ignored.
[0159] The total delay is expressed as follows:
[0160]
[0161] T m (t)≤T max ≤τ
[0162] in,
[0163]
[0164]
[0165]
[0166]
[0167] H m.n (t) = h m,n (t)g0(d0 / d m,n ) θ
[0168] in, Indicates the execution delay of the vehicle-mounted mobile terminal, represents the execution delay of the mobile edge computing server, represents the transmission delay of the vehicle-mounted mobile terminal offloading the task to the mobile edge computing server, T max represents the maximum tolerable delay of each task, τ represents the working time slot of each mobile edge computing server, and the time slot τ is a time segment at time t, s m (t) represents the unloading decision at time t, and s m (t) = 0 means that all tasks are executed on the vehicle-mounted mobile terminal, s m (t) = 1 means that all tasks are offloaded to the mobile edge computing server for execution, 0 < s m (t) < 1 means that part of the task is executed on the vehicle-mounted mobile terminal, and the other part of the task is executed on the mobile edge computing server, λ m (t) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal at time t, and the unit is bit, c m It indicates the CPU cycles required by the vehicle-mounted mobile terminal to calculate each bit of data, and the unit is cycle / bit, f m (t) represents the calculation rate of the task at time t by the vehicle-mounted mobile terminal, represents the computing rate of the mobile edge computing server for the task, r m,n (t) represents the task transmission rate at time t, represents the transmission power of the vehicle-mounted mobile terminal at time t, I represents the average interference in each area, σ 2 represents the channel background noise, ω represents the channel bandwidth, H m,n (t) represents the channel gain, g0 represents the path loss constant, θ represents the path loss exponent, d0 represents the reference distance, d m,n Indicates the distance from the vehicle-mounted mobile terminal to the mobile edge computing server in the area, h m,n (t) represents the small-scale Rayleigh fading factor between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, and when Indicates that the vehicle-mounted mobile terminal is within the coverage of the mobile edge computing server in the area where it is located. Indicates that the vehicle-mounted mobile terminal is not within the coverage of the mobile edge computing server in the area.
[0169] The total energy consumption is expressed as follows:
[0170]
[0171] in,
[0172]
[0173]
[0174]
[0175] in, represents the execution energy consumption of the vehicle-mounted mobile terminal, represents the transmission energy consumption of the vehicle-mounted mobile terminal offloading tasks to the mobile edge computing server, It represents the power of the vehicle-mounted mobile terminal to perform tasks, and k represents the power traction coefficient.
[0176] The total cost is expressed as follows:
[0177]
[0178] in,
[0179] When the vehicle-mounted mobile terminal migrates to another area, the following conditions must be met:
[0180] q m (t) = ε
[0181] When the vehicle-mounted mobile terminal does not migrate, the following conditions are met:
[0182] q m (t) = 0
[0183] Among them, ε represents the overhead caused by the regional migration of the vehicle-mounted mobile terminal, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t-1.
[0184] Step S2: Introduce the delay penalty function Φ(t) into the optimization model and simplify the optimization model to:
[0185] П2:
[0186] stC2,C3,C7,C8
[0187] When the execution energy consumption of the on-board mobile terminal at time t exceeds the current remaining power of the on-board mobile terminal, or the execution delay of the on-board mobile terminal exceeds the maximum tolerable delay of the task, Φ(t) = +∝; when the execution energy consumption of the on-board mobile terminal at time t does not exceed the current remaining power of the on-board mobile terminal, or the execution delay of the on-board mobile terminal does not exceed the maximum tolerable delay of the task, Φ(t) = 0.
[0188] Step S3: Split П2 according to time segments to obtain sub-problems of the optimization model:
[0189] П3:
[0190] stC2,C3,C7,C8
[0191] Step S4: According to Lyapunov theory, a virtual queue and penalty function are established for energy consumption and Lyapunov's drift upper bound is calculated, converting the sub-problem of the optimization model into:
[0192] Π4:
[0193] stC2,C3,C7,C8
[0194] Among them, Q m (t) represents the energy backlog at time t, and V is a constant positive control parameter that represents the trade-off between system overhead and virtual queues.
[0195] Specifically, since the energy backlog of the on-board mobile terminal is affected by the current remaining power, and the current remaining power depends on the total energy consumption at the previous moment, a virtual queue Q is established based on Lyapunov theory. m (t) is used to represent the accumulated energy consumption at time t:
[0196] Q m (t+1)=max{Q m (t)+E cur (t)-E m (t),0}
[0197] Among them, Q m (t+1) represents the accumulated energy consumption at time t+1;
[0198] According to Lyapunov theory, the quadratic Lyapunov function at time t is expressed as:
[0199]
[0200] Where L(t) represents the virtual queue Q m(t) is the scalar of the total backlog;
[0201] The difference between the scalar total backlog of the virtual queue at time t+1 and the scalar total backlog of the virtual queue at time t is called the Lyapunov drift ΔL(t) and is expressed as:
[0202] ΔL(t)=L(t+1)-L(t)
[0203] Substituting Lyapunov drift into the drift theorem, it can be expressed as:
[0204]
[0205] Among them, V is a constant positive control parameter, which represents the trade-off between system overhead and virtual queues;
[0206] Substitute the drift theorem into the derivation of energy consumption backlog:
[0207]
[0208] therefore,
[0209]
[0210] and,
[0211]
[0212] Among them, E max Indicates the maximum energy consumption required by the vehicle-mounted mobile terminal to perform tasks in a single time slot;
[0213] B(t)≤B
[0214] and,
[0215]
[0216] The drift theorem is satisfied:
[0217]
[0218] Since B is a constant, formula (1) can be transformed into Π4.
[0219] Step S5: Based on Π4, a mathematical expression of the offloading decision, the calculation rate of the vehicle-mounted mobile terminal for the task, and the transmission power of the vehicle-mounted mobile terminal is constructed.
[0220] Specifically, the solution of Π4 can be regarded as two parts, namely the current remaining power of the vehicle-mounted mobile terminal and the joint solution of the total energy consumption and system overhead, to establish the current remaining power model Π of the vehicle-mounted mobile terminal 4.1 :
[0221] П 4.1:
[0222] The current remaining power E of the vehicle-mounted mobile terminal cur (t) Satisfy:
[0223]
[0224] in, represents the average value of the maximum energy consumption required by all tasks, and
[0225] The optimal solution for the current remaining power of the vehicle-mounted mobile terminal is for:
[0226]
[0227] Establish total energy consumption and system overhead model 4.2 :
[0228] ∏ 4.2 :
[0229] stC2,C3,C7,C8
[0230] Computation offloading decision: Define the computing rate of the vehicle-mounted mobile terminal for the task, the computing rate of the mobile edge computing server for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the offloading decision in a single time slot τ and set ∏ 4.2 Rewritten as π 4.2.1 :
[0231] ∏ 4.2.1 :
[0232] st
[0233]
[0234] Π 4.2.1 Used in functional form:
[0235]
[0236] Among them, λ m (τ) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal in the time slot τ, f m (τ) represents the computing rate of the vehicle-mounted mobile terminal for the task in the time slot τ, r m,n (τ) represents the task transmission rate in time slot τ, represents the computing rate of the mobile edge computing server for the task in the time slot τ, represents the transmission power of the vehicle-mounted mobile terminal in time slot τ, represents a monotonic function, and its monotonicity depends on VQ m (t) and The positive and negative nature of the uninstall decision s m The value range of (t) can be determined by ∏ 4.2.1 The constraints are obtained:
[0237]
[0238] From this we can get the unloading strategy S m (t):
[0239]
[0240] Calculate the computing rate of the onboard mobile terminal for the task: Define the offloading decision, the computing rate of the mobile edge computing server for the task, and the transmission power of the onboard mobile terminal. Solve the computing rate of the onboard mobile terminal for the task in a single time slot and convert Π 4.2 Rewritten as ∏ 4.2.2 :
[0241] Π 4.2.2 :
[0242] st(1-s m (τ))λ m (τ)c m / f m (t)≤T max
[0243]
[0244]
[0245] Among them, E min Indicates the minimum energy consumption required for the vehicle-mounted mobile terminal to perform tasks in a single time slot;
[0246] Π 4.2.2 Expressed in function form:
[0247]
[0248] Among them, s m (τ) represents the unloading decision in time slot τ, function is a quadratic function of , and the opening direction of the function is the same as VQ m (t) is related to its positive or negative value. When VQ m (t) is positive, opening upward, when VQ m (t) is negative, the opening is downward, and f is calculated from the constraints m (t) are as follows:
[0249]
[0250] Then the calculation rate of the vehicle-mounted mobile terminal for the task is f m (t):
[0251]
[0252] Calculate the transmission power of the vehicle-mounted mobile terminal: Define the offloading decision, the calculation rate of the vehicle-mounted mobile terminal for the task, and the calculation rate of the mobile edge computing server for the task. Solve the transmission power of the vehicle-mounted mobile terminal in a single time slot and convert П 4.2 Rewritten as π 4.2.3 :
[0253]
[0254] Π 4.2.3 Expressed in function form:
[0255]
[0256] Building Helper Functions analyze Monotonicity of a function:
[0257]
[0258] and,
[0259]
[0260] Take the first derivative of the auxiliary function:
[0261]
[0262] make:
[0263]
[0264] right The derivative is:
[0265]
[0266] when hour, when hour, at this time It is a monotonic function, and its monotonicity is determined by VQ m (t) Decision. The value range of is solved, because the constraints contain The form of is difficult to solve directly, so it needs to be discussed in categories, as follows:
[0267] According to the total delay T in formula (2) max The constraints of The lower bound of :
[0268]
[0269] Then solve the second constraint condition in formula (2). hour,
[0270]
[0271] Then the second constraint in formula (2) is:
[0272]
[0273] The transmission power of the vehicle-mounted mobile terminal is
[0274]
[0275] in, These are two values of the transmission power of the vehicle-mounted mobile terminal:
[0276]
[0277]
[0278] Calculate the computing rate of the mobile edge computing server for the task: define the optimal offloading decision, the computing rate of the vehicle-mounted mobile terminal for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the computing rate of the mobile edge computing server for the task in a single time slot and convert П 4.2 Rewrite as П 4.2.4 :
[0279] Π 4.2.4 :
[0280] st
[0281]
[0282] Π 4.2.4 Expressed in function form:
[0283]
[0284] function It is a monotonic function, and its monotonicity is consistent with VQ m (t) relevant;
[0285] According to П 4.2.4The constraints of The value range of is:
[0286]
[0287] Then calculate the computing rate of the server for the task
[0288]
[0289] Step S6: Randomly generate an initial solution for the offloading decision, the calculation rate of the on-board mobile terminal for the task, the transmission power of the on-board mobile terminal, and the calculation rate of the mobile edge computing server for the task, and then use the iterative algorithm to perform iterative calculations, and update the system overhead after each iteration until the value of the system overhead is in convergence, and output the final system overhead as the optimal system overhead.
[0290] Specifically, Figure 2 As shown, the iterative algorithm in this embodiment is implemented based on Python. The number of vehicle-mounted mobile terminals M, the number of mobile edge computing servers N, the channel bandwidth ω, and the maximum rate at which the vehicle-mounted mobile terminals calculate the task are input into the algorithm. and the maximum rate at which the mobile edge computing server computes the task And the parameters of the five-tuple of tasks, then randomly generate the offloading decision, the calculation rate of the onboard mobile terminal for the task, the transmission power of the onboard mobile terminal and the calculation rate of the mobile edge computing server for the task, and calculate the corresponding system overhead, and the secondary system overhead is the initialization system overhead C old (t), the iterative algorithm iterates the offloading decision, the computing rate of the vehicle-mounted mobile terminal for the task, the transmission power of the vehicle-mounted mobile terminal, and the computing rate of the mobile edge computing server for the task. Each iteration completes the update of the system overhead C new (t), the value of the direct system overhead is in convergence, the iteration ends, and the optimal system overhead is obtained. At this time, the offloading decision, the computing rate of the on-board mobile terminal for the task, the transmission power of the on-board mobile terminal, and the computing rate of the mobile edge computing server for the task are all optimal solutions.
[0291] This method determines the system overhead as the weighted sum of the total latency, total energy consumption, and total task migration overhead of the mobile edge computing task offloading system, and models this. The system overhead minimization problem is then solved using Lyapunov optimization theory. An iterative method is used to calculate the offloading decision, the task computation rate of the onboard mobile terminal, the onboard mobile terminal's transmit power, and the task computation rate of the mobile edge computing server. This results in an optimal system overhead, thereby reducing the total system overhead. This calculation structure is more accurate than existing techniques that fail to account for the additional overhead caused by the mobile terminal's dynamic cross-zone movement.
[0292] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0293] The above-described embodiments merely represent specific and detailed examples of the present application and should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A computation offloading and resource allocation method based on Lyapunov optimization, applied to a mobile edge computing task offloading system, characterized by: The mobile edge computing task offloading system includes M vehicle-mounted mobile terminals and N mobile edge computing servers. The computation offloading and resource allocation method based on Lyapunov optimization includes: Taking the weighted sum of the total latency, total energy consumption, and total task migration overhead of the mobile edge computing task offloading system as the system overhead, the optimization model is established as follows: C4:E m (t)≤E cur (t) C5:T m (t)≤T max ≤τ C7:0≤s m (t)≤1 in, Among them, E m (t) represents the total energy consumption, q m (t) represents the total task migration cost, T m (t) represents the total delay, C(t) represents the system overhead, Indicates the cost weight factor for zone migration. represents the weight factor of the total delay, Represents the weight factor of total energy consumption, E total Indicates the total power of the vehicle-mounted mobile terminal, E cur (t) represents the current remaining power of the vehicle-mounted mobile terminal, Indicates the percentage of the current remaining power of the vehicle-mounted mobile terminal. C1 indicates that the calculation rate of the vehicle-mounted mobile terminal for the task cannot be greater than its maximum calculation rate. C2 indicates that the computing rate of the mobile edge computing server for the task cannot be greater than its own maximum computing rate C3 indicates that the computing rate of the mobile edge computing server for all tasks in the area cannot be greater than its own maximum computing rate C4 indicates that the total energy consumption cannot be greater than the current remaining power of the vehicle-mounted mobile terminal, and C5 indicates that the total delay cannot be greater than the maximum tolerable delay T of the task. max , C6 means the transmission power of the vehicle-mounted mobile terminal cannot be greater than its own maximum transmission power C7 represents the value range of the offloading decision, C8 represents the value range of the weight factor of the total delay, at different times t∈T={1,2,...,T}; Introducing the delay penalty function Φ(t) into the optimization model simplifies the optimization model to: stC2,C3,C7,C8 Split П2 according to the time segment to obtain the sub-problems of the optimization model: stC2,C3,C7,C8 According to Lyapunov theory, a virtual queue and penalty function are established for energy consumption and Lyapunov's drift upper bound is calculated, converting the sub-problem of the optimization model into: stC2,C3,C7,C8 Among them, Q m (t) represents the energy backlog at time t, V is a constant positive control parameter, which represents the trade-off between system overhead and virtual queues; According to П4, mathematical expressions for offloading decision, task calculation rate of the onboard mobile terminal and transmission power of the onboard mobile terminal are constructed; An initial solution of offloading decision, computing rate of the on-board mobile terminal for the task, transmission power of the on-board mobile terminal and computing rate of the mobile edge computing server for the task is randomly generated. Then, an iterative algorithm is used for iterative calculation, and the system overhead is updated after each iteration until the value of the system overhead converges. The final system overhead is output as the optimal system overhead.
2. The method for computation offloading and resource allocation based on Lyapunov optimization according to claim 1, wherein: The total delay is expressed as follows: T m (t)≤T max ≤τ in, H m.n (t)=h m,n (t)g0(d0 / d m,n ) θ in, Indicates the execution delay of the vehicle-mounted mobile terminal, represents the execution delay of the mobile edge computing server, represents the transmission delay of the vehicle-mounted mobile terminal offloading the task to the mobile edge computing server, T max represents the maximum tolerable delay of each task, τ represents the working time slot of each mobile edge computing server, and the time slot τ is a time segment at time t, s m (t) represents the unloading decision at time t, and s m (t) = 0 means that all tasks are executed on the vehicle-mounted mobile terminal, s m (t) = 1 means that all tasks are offloaded to the mobile edge computing server for execution, 0 < s m (t) < 1 means that part of the task is executed on the vehicle-mounted mobile terminal, and the other part of the task is executed on the mobile edge computing server, λ m (t) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal at time t, and the unit is bit, c m It indicates the CPU cycles required by the vehicle-mounted mobile terminal to calculate each bit of data, and the unit is cycle / bit, f m (t) represents the calculation rate of the task at time t by the vehicle-mounted mobile terminal, represents the computing rate of the mobile edge computing server for the task, r m,n (t) represents the task transmission rate at time t, represents the transmission power of the vehicle-mounted mobile terminal at time t, I represents the average interference in each area, σ 2 represents the channel background noise, ω represents the channel bandwidth, H m,n (t) represents the channel gain, g0 represents the path loss constant, θ represents the path loss exponent, d0 represents the reference distance, d m,n Indicates the distance from the vehicle-mounted mobile terminal to the mobile edge computing server in the area, h m,n (t) represents the small-scale Rayleigh fading factor between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area, and when Indicates that the vehicle-mounted mobile terminal is within the coverage of the mobile edge computing server in the area where it is located. Indicates that the vehicle-mounted mobile terminal is not within the coverage of the mobile edge computing server in the area.
3. The method for computation offloading and resource allocation based on Lyapunov optimization according to claim 2, wherein: The total energy consumption is expressed as follows: in, in, represents the execution energy consumption of the vehicle-mounted mobile terminal, represents the transmission energy consumption of the vehicle-mounted mobile terminal offloading tasks to the mobile edge computing server, It represents the power of the vehicle-mounted mobile terminal to perform tasks, and k represents the power traction coefficient.
4. The method for computation offloading and resource allocation based on Lyapunov optimization according to claim 3, wherein: The total task migration cost is expressed as follows: in, When the vehicle-mounted mobile terminal migrates to another area, the following conditions must be met: q m (t)=ε When the vehicle-mounted mobile terminal does not migrate, the following conditions are met: q m (t)=0 Among them, ε represents the overhead caused by the regional migration of the vehicle-mounted mobile terminal, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t, Indicates the connection status between the vehicle-mounted mobile terminal and the mobile edge computing server in the area at time t-1.
5. The method for computation offloading and resource allocation based on Lyapunov optimization according to claim 4, characterized in that: The virtual queue and penalty function are established for energy consumption according to Lyapunov theory and the upper bound of Lyapunov drift is calculated, and the sub-problems of the optimization model are converted into Π4, including: Since the energy backlog of the vehicle-mounted mobile terminal is affected by the current remaining power, and the current remaining power depends on the total energy consumption at the previous moment, a virtual queue Q is established based on the Lyapunov theory. m (t) is used to represent the accumulated energy consumption at time t: Q m (t+1)=max{Q m (t)+E cur (t)-E m (t),0} Among them, Q m (t+1) represents the accumulated energy consumption at time t+1; According to Lyapunov theory, the quadratic Lyapunov function at time t is expressed as: Where L(t) represents the virtual queue Q m (t) is the scalar of the total backlog; The difference between the scalar total backlog of the virtual queue at time t+1 and the scalar total backlog of the virtual queue at time t is called the Lyapunov drift ΔL(t) and is expressed as: ΔL(t)=L(t+1)-L(t) Substituting Lyapunov drift into the drift theorem, it can be expressed as: Among them, V is a constant positive control parameter, which represents the trade-off between system overhead and virtual queues; Substitute the drift theorem into the derivation of energy consumption backlog: therefore, and, Among them, E max Indicates the maximum energy consumption required by the vehicle-mounted mobile terminal to perform tasks in a single time slot; B(t)≤B and, The drift theorem is satisfied: Since B is a constant, formula (1) can be transformed into ∏4.
6. The method for computation offloading and resource allocation based on Lyapunov optimization according to claim 4, characterized in that: According to ∏4, a mathematical expression for the offloading decision, the calculation rate of the onboard mobile terminal for the task, and the transmission power of the onboard mobile terminal is constructed, including: The solution of Π4 can be considered as two parts, namely the current remaining power of the vehicle-mounted mobile terminal and the joint solution of the total energy consumption and system overhead, and the current remaining power model of the vehicle-mounted mobile terminal Π 4.1 : The current remaining power E of the vehicle-mounted mobile terminal cur (t) Satisfy: in, represents the average value of the maximum energy consumption required by all tasks, and The optimal solution for the current remaining power of the vehicle-mounted mobile terminal is for: Establish total energy consumption and system overhead model 4.2 : stC2,C3,C7,C8 Computation offloading decision: Define the computing rate of the vehicle-mounted mobile terminal for the task, the computing rate of the mobile edge computing server for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the offloading decision in a single time slot τ and set ∏ 4.2 Rewritten as ∏ 4.2.1 : Π 4.2.1 Used in functional form: Among them, λ m (τ) represents the amount of computing tasks generated by the vehicle-mounted mobile terminal in the time slot τ, f m (τ) represents the computing rate of the vehicle-mounted mobile terminal for the task in the time slot τ, r m,n (τ) represents the task transmission rate in time slot τ, represents the computing rate of the mobile edge computing server for the task in the time slot τ, represents the transmission power of the vehicle-mounted mobile terminal in time slot τ, represents a monotonic function, and its monotonicity depends on VQ m (t) and The positive and negative nature of the uninstall decision s m The value range of (t) can be obtained by Π 4.2.1 The constraints are obtained: From this we can get the unloading strategy S m (t): Calculate the computing rate of the onboard mobile terminal for the task: Define the offloading decision, the computing rate of the mobile edge computing server for the task, and the transmission power of the onboard mobile terminal. Solve the computing rate of the onboard mobile terminal for the task in a single time slot and convert Π 4.2 Rewritten as π 4.2.2 : st(1-s m (t))l m (t)c m / f m (t)≤T max Among them, E min Indicates the minimum energy consumption required for the vehicle-mounted mobile terminal to perform tasks in a single time slot; Π 4.2.2 Expressed in function form: Among them, s m (τ) represents the unloading decision in time slot τ, function is a quadratic function of , and the opening direction of the function is the same as VQ m (t) is related to its positive or negative value. When VQ m (t) is positive, opening upward, when VQ m (t) is negative, the opening is downward, and f is calculated from the constraints m (t) are as follows: Then the calculation rate of the vehicle-mounted mobile terminal for the task is f m (t): Calculate the transmission power of the vehicle-mounted mobile terminal: Define the offloading decision, the calculation rate of the vehicle-mounted mobile terminal for the task, and the calculation rate of the mobile edge computing server for the task. Solve the transmission power of the vehicle-mounted mobile terminal in a single time slot and convert Π 4.2 Rewritten as π 4.2.3 : Π 4.2.3 Expressed in function form: Building Helper Functions analyze Monotonicity of a function: and, Take the first derivative of the auxiliary function: make: right The derivative is: when hour, when hour, at this time It is a monotonic function, and its monotonicity is determined by VQ m (t) decide; The value range of is solved, because the constraints contain The form of is difficult to solve directly, so it needs to be discussed in categories, as follows: According to the total delay T in formula (2) max The constraints of The lower bound of : Then solve the second constraint condition in formula (2). hour, Then the second constraint in formula (2) is: The transmission power of the vehicle-mounted mobile terminal is in, These are two values of the transmission power of the vehicle-mounted mobile terminal: Calculate the computing rate of the mobile edge computing server for the task: define the optimal offloading decision, the computing rate of the vehicle-mounted mobile terminal for the task, and the transmission power of the vehicle-mounted mobile terminal. Solve the computing rate of the mobile edge computing server for the task in a single time slot and convert П 4.2 Rewrite as П 4.2.4 : Π 4.2.4 Expressed in function form: function It is a monotonic function, and its monotonicity is consistent with VQ m (t) relevant; According to П 4.2.4 The constraints of The value range of is: Then calculate the computing rate of the server for the task
Citation Information
Patent Citations
Multi-server computing unloading method based on Lyapunov optimization
CN113064665A
Edge calculation method for compromising time delay and energy consumption
CN114691362A