A UAV-assisted task offloading and resource allocation method based on service cache

UAV-assisted task offloading and resource allocation are optimized through slack variables, Lagrange multiplier method and Taylor expansion method, which solves the problem of high task offloading and resource allocation delay in mobile edge computing systems and achieves task completion delay And the reduction of energy consumption improves the hit rate of drone cache service.

CN116367234BActive Publication Date: 2024-09-24NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310433665.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2024-09-24
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

In mobile edge computing systems, due to shadow fading and multipath effects, ground communication signals are seriously attenuated, resulting in prolonged UAV-assisted task offloading and resource allocation delays, and existing technologies fail to effectively optimize task offloading decisions, UAV Resource allocation and trajectory planning lead to high computing task completion delays and energy consumption.

Method used

A UAV-assisted task offloading and resource allocation method based on service cache is adopted, and three sub-problems of task offloading decision-making, UAV resource allocation and UAV trajectory are solved through slack variables, Lagrange multiplier method and Taylor expansion method. Decoupling, optimizing task offloading decision-making, UAV resource allocation and trajectory planning, using the pre-built optimization problem that minimizes the total delay of all ground terminal equipment request tasks, optimizing task offloading decision-making, UAV resource allocation and UAV trajectory.

Benefits of technology

It effectively reduces the completion delay and energy consumption of computing tasks, improves the hit rate of drone cache services, reduces the real-time delay and communication cost of obtaining and initializing service applications, and makes full use of the mobility of drones to optimize computing resources. Assignment and drone placement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present invention discloses a method for unmanned aerial vehicle-assisted task offloading and resource allocation based on service cache, which is used in a multi-unmanned aerial vehicle-assisted MEC system, and takes into account service cache and computation offloading, wherein the unmanned aerial vehicle can cache part of the program to execute the computation tasks offloaded by the ground terminal device, and the local terminal device can cache a small amount of program to execute part of the computation tasks; and under the task completion delay requirements of all devices and unmanned aerial vehicles and the limited energy constraints of the unmanned aerial vehicle, an optimization problem of minimizing the total delay of all ground terminal device request tasks is established. This problem is a mixed integer nonlinear programming problem, which is decoupled into three sub-problems: task offloading decision, unmanned aerial vehicle resource allocation, and unmanned aerial vehicle trajectory. The three sub-problems are iteratively solved using slack variables, Lagrange multiplier method, and Taylor expansion method, respectively, to obtain the optimal solutions for task offloading decision, unmanned aerial vehicle resource allocation, and unmanned aerial vehicle trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method for unloading and allocating resources of unmanned aerial vehicle (UAV) assisted tasks based on service cache. Background Art

[0002] With the development of information technology, many intelligent applications are emerging, such as face recognition, interactive games, and virtual reality. These applications are usually computationally intensive and delay-sensitive. The emergence of Mobile Edge Computing (MEC) facilitates the implementation of these computing tasks. In practical applications, due to shadow fading and multipath effects, the signal attenuation of ground communications is serious. Therefore, the MEC system assisted by Unmanned Aerial Vehicle (UAV) is valued for its flexible mobility and low cost. In the mobile edge computing system, edge service cache refers to the pre-storage of programs required to perform computing tasks on the MEC server. When the computing task is offloaded to the MEC server, the server must have the corresponding service program to complete the corresponding computing task. The service cache effectively reduces the real-time delay and communication cost of obtaining and initializing service applications. Summary of the invention

[0003] The purpose of the present invention is to propose a UAV-assisted task offloading and resource allocation method based on service cache. The method targets the interest competition relationship among users in the collaborative computing process. The UAV can cache some programs to execute the computing tasks offloaded by the ground terminal equipment, and the local ground terminal equipment can cache a small amount of programs to execute some computing tasks.

[0004] To achieve the above functions, the present invention designs a method for unmanned aerial vehicle assisted task offloading and resource allocation based on service cache. Under the constraints of the task completion delay requirements of all devices and unmanned aerial vehicles and the limited energy of unmanned aerial vehicles, an optimization problem of minimizing the total delay of all ground terminal equipment request tasks is established. This problem is a mixed integer nonlinear programming problem, which is decoupled into three sub-problems: task offloading decision, unmanned aerial vehicle resource allocation, and unmanned aerial vehicle trajectory. The three sub-problems are iteratively solved using slack variables, Lagrange multiplier method, and Taylor expansion method, respectively, to obtain the optimal solutions for task offloading decision, unmanned aerial vehicle resource allocation, and unmanned aerial vehicle trajectory.

[0005] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:

[0006] In a first aspect, the present invention provides a method for unmanned aerial vehicle assisted task offloading and resource allocation based on service cache, comprising:

[0007] S1. Obtain local popularity based on the historical services required by the ground terminal device, and the drone selects the cached services based on the local popularity to obtain the drone caching solution;

[0008] S2. The ground terminal device caches the service in a random manner to obtain a cache solution for the ground terminal device;

[0009] S3. In response to the task request from the ground terminal device, based on the UAV cache solution and the ground terminal device cache solution, the pre-built total delay optimization problem of minimizing all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory;

[0010] S4. According to the optimized task offloading decision, the task requested by the ground terminal device is calculated on the local terminal device, or the task is offloaded to the corresponding UAV for calculation; the UAV flies according to the optimized UAV trajectory, and the ground terminal device is allocated resources according to the optimized UAV resource allocation.

[0011] In some embodiments, step S4 includes:

[0012] S41. The task requested by the ground terminal device is calculated on the local terminal device;

[0013] S411. If the ground terminal device has cached the required service, directly perform task calculation;

[0014] S412. If the ground terminal device does not cache the required service but the drone caches the service requested by the ground terminal device, then based on the optimized drone trajectory and resource allocation, the corresponding service program is downloaded from the drone to the ground terminal device, and the computing service is directly performed on the ground terminal device;

[0015] S413. If the ground terminal device does not cache the required service and the drone does not cache the service requested by the ground terminal device, use the wireless backhaul link to download the service program from the remote end to the drone through the base station, and based on the optimized drone trajectory and resource allocation, download the corresponding service program from the drone to the ground terminal device, and perform computing services directly on the ground terminal device.

[0016] In some other embodiments, step S4 includes:

[0017] S42. The ground terminal device offloads the task to the corresponding drone for calculation;

[0018] S421. The drone caches the service requested by the ground terminal device, and the drone is directly calculated based on the optimized drone trajectory and resource allocation;

[0019] S422. If the service requested by the ground terminal device is not cached on the drone, the service program is downloaded from the remote end to the drone via the base station using the wireless backhaul link, and the calculation is performed on the drone based on the optimized drone trajectory and resource allocation.

[0020] In some embodiments, step S1 includes:

[0021] S11. The access method between the ground terminal equipment and the drone adopts the closest distance access. When the ground terminal equipment is within the coverage of the drone, the nearest drone will provide services. Suppose M k The number of ground terminal devices serving UAV k;

[0022] S12. The probability that ground terminal device m requests service s is p ms , then the request probability matrix P of all ground terminal devices is:

[0023]

[0024] S13. Based on the request probability p of the ground terminal device m for service s ms , get local popularity

[0025]

[0026] S14. Since there is no coupling relationship between the content deployments of drones, in order to improve the hit rate of the drone cache service, the service programs with higher local popularity are cached in the drone.

[0027] In some embodiments, in step S3, minimizing the total delay optimization problem P1 of all ground terminal device request tasks includes:

[0028]

[0029]

[0030]

[0031]

[0032]

[0033]

[0034]

[0035]

[0036]

[0037]

[0038]

[0039] Among them, C1 is the delay limit, T m is the total delay of completing the task requested by the ground terminal device m, K = {1, 2, ..., K} and M = {1, 2, ..., M} are the sets of UAVs and ground terminal devices respectively, B = (b m,k ∈{0,1}:m∈M,k∈K) is the set sum of whether the ground terminal device m is connected to the drone k, F=(f k,m :m∈M,k∈K) is the sum of the computing capabilities of UAV k to ground terminal device m, C=(c m,k ∈{0,1}:m∈M,k∈K) represents the sum of whether the computing task of the ground terminal device m is offloaded to the UAV, Q=(Q k :k∈K) is the horizontal position coordinate of UAV k; is the maximum task delay of the ground terminal device m, represents any mathematical symbol; C2 is the user's energy consumption limit, E m is the total energy consumption of the ground terminal device m, is the maximum energy consumption of the ground terminal device m; C3 is the energy consumption limit of the UAV, E k is the total energy consumption of UAV k, is the maximum energy consumption of the UAV; C4 is the resource limit allocated to the UAV, f k,m is the computing power of UAV k to ground terminal device m, is the maximum computing capacity of UAV k; C5 is the causal constraint, that is, the ground terminal equipment can only choose to offload the calculation after it is connected to the UAV, c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV, 1 means offloading, 0 means not offloading; b m,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; C6 stipulates that a ground terminal device can only connect to one drone; C7 is the maximum number of ground terminal devices that can be connected to the drone, is the maximum number of connected ground terminal devices; C8 is the maximum distance limit between drones, and the horizontal position coordinate of drone k is Q k =(x k ,y k ), Q l is the horizontal position coordinate of UAV l, d m is the maximum distance between drones; C9 stipulates that ground terminal equipment can access drones only when they are within the maximum range of drones. k,mis the distance between the ground terminal device m and the drone k, is the maximum communication range of the drone; C10 indicates c m,k ,a k,s ,b m,k ,e m,s is a binary variable, a k,s ∈{0,1} indicates whether drone k caches service s, 1 indicates caching, 0 indicates no caching, e m,s ∈{0,1} indicates whether the ground terminal device m caches the service s, 1 indicates caching, and 0 indicates no caching.

[0040] In some embodiments, a method for constructing an optimization problem for minimizing the total delay of all ground terminal device request tasks includes:

[0041] Due to the coverage problem of the base station, the ground terminal devices in the area cannot communicate directly with the base station BS; the base station is connected to the cloud center through a wired optical fiber link, and the drone communicates with the base station through a wireless backhaul link; assuming that the front-end and backhaul links operate on different frequency bands, the wireless backhaul link capacity of each drone to the base station BS is R b For the front-end link, the ground terminal equipment within the coverage of each drone adopts orthogonal frequency division multiple access, and the bandwidth is evenly divided among multiple ground terminal equipment. Assuming that the total uplink / downlink communication bandwidth is B, the two-way wireless communication spectrum bandwidth from drone k to ground terminal equipment is B / |M k |, where M k The total number of users served by drone k;

[0042] The horizontal position coordinate of drone k is Q k =(x k ,y k ), the height is fixed, and the horizontal position coordinate of the ground terminal equipment m is Q m =(x m ,y m ), then the distance between the ground terminal device m and the drone k is The channel gain between the ground terminal device m and the drone k is h0 is the channel gain at the reference distance d0=1, and H is the flight height of each unmanned aerial vehicle. Assuming that the two-way channel gain between the ground terminal device m and the drone k is the same, the uplink and downlink rates between the ground terminal device m and the drone k are

[0043]

[0044] Among them, p m is the transmission power of the ground terminal device m, p kis the transmission power allocated by UAV k to the ground terminal device m, and N0 is the noise power of the receiver;

[0045] The local calculation time is The energy consumption of local computing by ground terminal equipment is Among them, κ is a coefficient that depends on the chip structure, f m is the computing power of the ground terminal equipment, C m The number of CPU cycles required for computing tasks in ground terminal equipment;

[0046] The ground terminal device chooses to offload the task to the drone for calculation. The time for uploading the task to the drone is The energy consumption of task upload is The task calculation time is The energy consumption of task calculation is Among them, l m is the size of the input data of the ground terminal device m, f k,m is the computing power of UAV k for ground terminal device m. If the maximum computing power of UAV k is but

[0047] When local computing is selected but the ground terminal device does not cache the corresponding service, the download time of the ground terminal device downloading the corresponding service from the drone is Among them, c s is the size of the service s program; the energy consumption of UAV k sending service s to ground terminal device m is

[0048] If the drone does not have the service program corresponding to the task requested by the user, it needs to download the corresponding service from the remote through the base station. The time to download the service is

[0049] If the ground terminal device m chooses local calculation, the total delay of local calculation is for:

[0050]

[0051] Among them, b m,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; e m,s ∈{0,1} indicates whether the ground terminal device m caches service s, 1 indicates caching, and 0 indicates no caching;

[0052] The task is to calculate the total energy consumption locally at the ground terminal device m for:

[0053]

[0054] The total time that the computing task of the ground terminal device m is executed on the drone k for:

[0055]

[0056] where a k,s ∈{0,1} indicates whether drone k caches service s, 1 indicates caching, and 0 indicates no caching;

[0057] The total energy consumption of computing tasks of ground terminal device m executed on drone k for:

[0058]

[0059] If the ground terminal device m chooses to offload the calculation, the calculation time of the ground terminal device m on the drone k is for:

[0060]

[0061] Energy consumption of computing tasks of ground terminal device m on drone k for:

[0062]

[0063] where c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV;

[0064] The total delay T for the task requested by the ground terminal device m to complete m :

[0065]

[0066] The total energy consumption E of the ground terminal equipment m m :

[0067]

[0068] The total energy consumption E of drone k k :

[0069]

[0070] In some embodiments, in step S3, the pre-built total delay optimization problem of minimizing all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory, including:

[0071] S31. When the resources of the drone are allocated and the trajectory of the drone is determined, the task offloading decision problem is solved and the optimization problem P1 is transformed into P1.1:

[0072]

[0073] stC1,C2,C3,C5

[0074] The binary variable c m,k Relaxation to continuous variables That is, 0≤c m,k ≤1, where:

[0075]

[0076]

[0077]

[0078] in represents the total delay in completing the task requested by the ground terminal device m, the total energy consumption of the ground terminal device m, and the total energy consumption of the UAV k after relaxation;

[0079] The optimization problem P1.1 is transformed into P1.2:

[0080]

[0081] The optimization problem P1.2 is a linear programming problem, and the constraints are all linear. Therefore, the optimization problem P1.2 is a convex problem. We use CVX in the MATLAB toolbox to solve it and get a better c m,k ;

[0082] S32. Under the condition that the task offloading decision is made and the UAV trajectory is determined, the UAV resource allocation problem is solved. On this basis, the optimization problem P1 is transformed into P1.3:

[0083]

[0084] The Lagrangian and KKT constraints are used to solve the problem, and two constraint factors λ are introduced. m ,ν m , while m >0,ν m >0, define the Lagrangian equation as:

[0085]

[0086] Since the optimization problem P1.3 is convex, by applying the KKT condition, we get and Solve the optimal UAV resource allocation f k,m* :

[0087]

[0088] S33. When the task offloading decision is made and the UAV resource allocation is determined, the UAV trajectory problem is solved, and the optimization problem P1 is transformed into the optimization problem P1.4:

[0089]

[0090]

[0091]

[0092]

[0093]

[0094] The transmission delay of ground terminal equipment in the objective function, the energy consumption of drone multicast software in the constraints, and the energy consumption of task upload have important effects on Q k is non-convex, but for the variable Q k , formula ||Q k -Q l || 2 is convex, so the continuous convex approximation method is used; because the first-order Taylor expansion of any point of any convex function is the global lower bound of the convex function, the convex function can be approximated by the first-order Taylor expansion; the transmission rate from the ground terminal equipment to the drone Approximately:

[0095]

[0096] in,

[0097] Among them, Q k [i] is the i-th order Taylor expansion of the UAV trajectory, Z m,k [i] G m,k is the intermediate parameter; When the optimization problem P1.4 is introduced, P1.4 is a standard convex optimization problem. The CVX in the MATLAB toolbox is used to solve it and the optimal Q is obtained. k ;

[0098] S34. The solution to P1 is obtained by iteratively solving the three sub-problems P1.2, P1.3 and P1.4, and updating the corresponding solutions: task offloading decision, UAV resource allocation and UAV trajectory.

[0099] In a second aspect, the present invention provides a UAV-assisted task offloading and resource allocation device based on service cache, including a processor and a storage medium;

[0100] The storage medium is used to store instructions;

[0101] The processor is configured to operate according to the instructions to execute the method according to the first aspect.

[0102] In a third aspect, the present invention provides a device, comprising:

[0103] Memory;

[0104] processor;

[0105] as well as

[0106] Computer programs;

[0107] The computer program is stored in the memory and is configured to be executed by the processor to implement the method described in the first aspect above.

[0108] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

[0109] Beneficial effects: Compared with the prior art, the advantages of the present invention include:

[0110] 1. The present invention comprehensively considers introducing the concept of service cache into drone-assisted mobile edge computing. When the computing task is offloaded to the MEC server, the server must have the corresponding service program to complete the corresponding computing task. The service cache effectively reduces the real-time delay and communication cost of acquiring and initializing service applications.

[0111] 2. The present invention jointly considers caching the required services in the drone in advance according to local popularity, which effectively reduces the user completion delay.

[0112] 3. Different from the traditional computing task offloading method, this method makes full use of the mobility of drones and jointly optimizes the three sub-problems of computing resource allocation and drone placement, so as to effectively reduce the task completion delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] Figure 1 is a schematic diagram of a method flow chart provided according to an embodiment of the present invention;

[0114] Figure 2 Schematic diagram of a system model provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0115] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0116] In the description of the present invention, "several" means more than one, "many" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0117] In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0118] Example 1

[0119] In a first aspect, this embodiment provides a method for unloading and allocating resources of a drone-assisted task based on a service cache, including:

[0120] S1. Obtain local popularity based on the historical services required by the ground terminal device, and the drone selects the cached services based on the local popularity to obtain the drone caching solution;

[0121] S2. The ground terminal device caches the service in a random manner to obtain a cache solution for the ground terminal device;

[0122] S3. In response to the task request from the ground terminal device, based on the UAV cache solution and the ground terminal device cache solution, the pre-built total delay optimization problem of minimizing all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory;

[0123] S4. According to the optimized task offloading decision, the task requested by the ground terminal device is calculated on the local terminal device, or the task is offloaded to the corresponding UAV for calculation; the UAV flies according to the optimized UAV trajectory, and the ground terminal device is allocated resources according to the optimized UAV resource allocation.

[0124] In some embodiments, step S4 includes:

[0125] S41. The task requested by the ground terminal device is calculated on the local terminal device;

[0126] S411. If the ground terminal device has cached the required service, directly perform task calculation;

[0127] S412. If the ground terminal device does not cache the required service but the drone caches the service requested by the ground terminal device, then based on the optimized drone trajectory and resource allocation, the corresponding service program is downloaded from the drone to the ground terminal device, and the computing service is directly performed on the ground terminal device;

[0128] S413. If the ground terminal device does not cache the required service and the drone does not cache the service requested by the ground terminal device, use the wireless backhaul link to download the service program from the remote end to the drone through the base station, and based on the optimized drone trajectory and resource allocation, download the corresponding service program from the drone to the ground terminal device, and perform computing services directly on the ground terminal device.

[0129] In some other embodiments, step S4 includes:

[0130] S42. The ground terminal device offloads the task to the corresponding drone for calculation;

[0131] S421. The drone caches the service requested by the ground terminal device, and the drone is directly calculated based on the optimized drone trajectory and resource allocation;

[0132] S422. If the service requested by the ground terminal device is not cached on the drone, the service program is downloaded from the remote end to the drone via the base station using the wireless backhaul link, and the calculation is performed on the drone based on the optimized drone trajectory and resource allocation.

[0133] In some specific embodiments, referring to Figure 1 , Figure 2 , a multi-UAV assisted mobile edge computing MEC system provided in this embodiment includes a base station, K rotary wing UAVs and M ground terminal devices, K = {1,2,...,K} and M = {1,2,...,M} are sets of UAVs and ground terminal devices respectively. Each UAV is equipped with a small server to provide computing and caching services for the ground terminal devices. The UAV caches services according to popularity, and the terminal devices cache services in a random manner.

[0134] In some embodiments, step S1. obtains local popularity according to the historical services required by the ground terminal device, and the drone selects the cached services required according to the local popularity, and obtains the drone cache solution, including:

[0135] S11. The access method between the ground terminal equipment and the drone adopts the closest distance access. When the ground terminal equipment is within the coverage of the drone, the nearest drone will provide services. Suppose M k The number of ground terminal devices serving UAV k;

[0136] S12. The probability that ground terminal device m requests service s is p ms , then the request probability matrix P of all ground terminal devices is:

[0137]

[0138] S13. Based on the request probability p of the ground terminal device m for service s ms , get local popularity

[0139]

[0140] S14. Since there is no coupling relationship between the content deployments of drones, in order to improve the hit rate of the drone cache service, the service programs with higher local popularity are cached in the drone.

[0141] In some embodiments, a method for constructing an optimization problem for minimizing the total delay of all ground terminal device request tasks includes:

[0142] Due to the coverage problem of the base station, the ground terminal devices in the area cannot communicate directly with the base station BS; the base station is connected to the cloud center through a wired optical fiber link, and the drone communicates with the base station through a wireless backhaul link; assuming that the front-end and backhaul links operate on different frequency bands, the wireless backhaul link capacity of each drone to the base station BS is R b For the front-end link, the ground terminal equipment within the coverage of each drone adopts orthogonal frequency division multiple access, and the bandwidth is evenly divided among multiple ground terminal equipment. Assuming that the total uplink / downlink communication bandwidth is B, the two-way wireless communication spectrum bandwidth from drone k to ground terminal equipment is B / |M k |, where M k The total number of users served by drone k;

[0143] The horizontal position coordinate of drone k is Q k =(x k ,y k ), the height is fixed, and the horizontal position coordinate of the ground terminal equipment m is Q m =(x m ,y m ), then the distance between the ground terminal device m and the drone k is The channel gain between the ground terminal device m and the drone k is h0 is the channel gain at the reference distance d0=1, and H is the flight height of each unmanned aerial vehicle. Assuming that the two-way channel gain between the ground terminal device m and the drone k is the same, the uplink and downlink rates between the ground terminal device m and the drone k are

[0144]

[0145] Among them, p m is the transmission power of the ground terminal device m, p k is the transmission power allocated by UAV k to the ground terminal device m, and N0 is the noise power of the receiver;

[0146] The local calculation time is The energy consumption of local computing by ground terminal equipment is Among them, κ is a coefficient that depends on the chip structure, f m is the computing power of the ground terminal equipment, C m The number of CPU cycles required for computing tasks in ground terminal equipment;

[0147] The ground terminal device chooses to offload the task to the drone for calculation. The time for uploading the task to the drone is The energy consumption of task upload is The task calculation time is The energy consumption of task calculation is Among them, l m is the size of the input data of the ground terminal device m, f k,m is the computing power of UAV k for ground terminal device m. If the maximum computing power of UAV k is but

[0148] When local computing is selected but the ground terminal device does not cache the corresponding service, the download time of the ground terminal device downloading the corresponding service from the drone is Among them, c s is the size of the service s program; the energy consumption of UAV k sending service s to ground terminal device m is

[0149] If the drone does not have the service program corresponding to the task requested by the user, it needs to download the corresponding service from the remote through the base station. The time to download the service is

[0150] If the ground terminal device m chooses local calculation, the total delay of local calculation is for:

[0151]

[0152] Among them, bm,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; e m,s ∈{0,1} indicates whether the ground terminal device m caches service s, 1 indicates caching, and 0 indicates no caching;

[0153] The task is to calculate the total energy consumption locally at the ground terminal device m for:

[0154]

[0155] The total time that the computing task of the ground terminal device m is executed on the drone k for:

[0156]

[0157] where a k,s ∈{0,1} indicates whether drone k caches service s, 1 indicates caching, and 0 indicates no caching;

[0158] The total energy consumption of computing tasks of ground terminal device m executed on drone k for:

[0159]

[0160] If the ground terminal device m chooses to offload the calculation, the calculation time of the ground terminal device m on the drone k is for:

[0161]

[0162] Energy consumption of computing tasks of ground terminal device m on drone k for:

[0163]

[0164] where c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV;

[0165] The total delay T for the task requested by the ground terminal device m to complete m :

[0166]

[0167] The total energy consumption E of the ground terminal equipment m m :

[0168]

[0169] The total energy consumption E of drone kk :

[0170]

[0171] In some embodiments, in step S3, minimizing the total delay optimization problem P1 of all ground terminal device request tasks includes:

[0172]

[0173]

[0174]

[0175]

[0176]

[0177]

[0178]

[0179]

[0180]

[0181]

[0182]

[0183] Among them, C1 is the delay limit, T m is the total delay of completing the task requested by the ground terminal device m, K = {1, 2, ..., K} and M = {1, 2, ..., M} are the sets of UAVs and ground terminal devices respectively, B = (b m,k ∈{0,1}:m∈M,k∈K) is the set sum of whether the ground terminal device m is connected to the drone k, F=(f k,m :m∈M,k∈K) is the sum of the computing capabilities of UAV k to ground terminal device m, C=(c m,k ∈{0,1}:m∈M,k∈K) represents the sum of whether the computing task of the ground terminal device m is offloaded to the UAV, Q=(Q k :k∈K) is the horizontal position coordinate of UAV k; is the maximum task delay of the ground terminal device m, represents any mathematical symbol; C2 is the user's energy consumption limit, E m is the total energy consumption of ground terminal equipment m, is the maximum energy consumption of the ground terminal device m; C3 is the energy consumption limit of the UAV, Ek is the total energy consumption of UAV k, is the maximum energy consumption of the UAV; C4 is the resource limit allocated to the UAV, f k,m is the computing power of UAV k to ground terminal device m, is the maximum computing capacity of UAV k; C5 is the causal constraint, that is, the ground terminal equipment can only choose to offload the calculation after it is connected to the UAV, c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV, 1 means offloading, 0 means not offloading; b m,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; C6 stipulates that a ground terminal device can only connect to one drone; C7 is the maximum number of ground terminal devices that can be connected to the drone, is the maximum number of connected ground terminal devices; C8 is the maximum distance limit between drones, and the horizontal position coordinate of drone k is Q k =(x k ,y k ), Q l is the horizontal position coordinate of UAV l, d m is the maximum distance between drones; C9 stipulates that ground terminal equipment can access drones only when they are within the maximum range of drones. k,m is the distance between the ground terminal device m and the drone k, is the maximum communication range of the drone; C10 indicates c m,k ,a k,s ,b m,k ,e m,s is a binary variable, a k,s ∈{0,1} indicates whether drone k caches service s, 1 indicates caching, 0 indicates no caching, e m,s ∈{0,1} indicates whether the ground terminal device m caches the service s, 1 indicates caching, and 0 indicates no caching.

[0184] In some embodiments, in step S3, the pre-built total delay optimization problem of minimizing all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory, including:

[0185] S31. When the resources of the drone are allocated and the trajectory of the drone is determined, the task offloading decision problem is solved and the optimization problem P1 is transformed into P1.1:

[0186]

[0187] stC1,C2,C3,C5

[0188] The binary variable cm,k Relaxation to continuous variables That is, 0≤c m,k ≤1, where:

[0189]

[0190]

[0191]

[0192] in represents the total delay in completing the task requested by the ground terminal device m, the total energy consumption of the ground terminal device m, and the total energy consumption of the UAV k after relaxation;

[0193] The optimization problem P1.1 is transformed into P1.2:

[0194]

[0195]

[0196]

[0197]

[0198]

[0199] The optimization problem P1.2 is a linear programming problem, and the constraints are all linear. Therefore, the optimization problem P1.2 is a convex problem. We use CVX in the MATLAB toolbox to solve it and get a better c m,k ;

[0200] S32. Under the condition that the task offloading decision is made and the UAV trajectory is determined, the UAV resource allocation problem is solved. On this basis, the optimization problem P1 is transformed into P1.3:

[0201]

[0202]

[0203]

[0204]

[0205] The Lagrangian and KKT constraints are used to solve the problem, and two constraint factors λ are introduced. m ,ν m , while m >0,ν m >0, define the Lagrangian equation as:

[0206]

[0207] Since the optimization problem P1.3 is convex, by applying the KKT condition, we get and Solve the optimal UAV resource allocation f k,m * :

[0208]

[0209] S33. When the task offloading decision is made and the UAV resource allocation is determined, the UAV trajectory problem is solved, and the optimization problem P1 is transformed into the optimization problem P1.4:

[0210]

[0211]

[0212]

[0213]

[0214]

[0215] The transmission delay of ground terminal equipment in the objective function, the energy consumption of drone multicast software in the constraints, and the energy consumption of task upload have important effects on Q k is non-convex, but for the variable Q k , formula ||Q k -Q l || 2 is convex, so the continuous convex approximation method is used; because the first-order Taylor expansion of any point of any convex function is the global lower bound of the convex function, the convex function can be approximated by the first-order Taylor expansion; the transmission rate from the ground terminal equipment to the drone Approximately:

[0216]

[0217] in,

[0218] Among them, Q k [i] is the i-th order Taylor expansion of the UAV trajectory, Z m,k [i] G m,k is the intermediate parameter; When the optimization problem P1.4 is introduced, P1.4 is a standard convex optimization problem. The CVX in the MATLAB toolbox is used to solve it and the optimal Q is obtained. k ;

[0219] S34. The solution to P1 is obtained by iteratively solving the three sub-problems P1.2, P1.3 and P1.4 and updating the corresponding solutions: task offloading decision, UAV resource allocation and UAV trajectory;

[0220] Since the object value of P1 does not increase after each iteration and the optimal value is also bounded, S34 is guaranteed to converge after a finite number of iterations.

[0221] Example 2

[0222] In a second aspect, based on embodiment 1, this embodiment provides a drone-assisted task offloading and resource allocation device based on service cache, including a processor and a storage medium;

[0223] The storage medium is used to store instructions;

[0224] The processor is configured to operate according to the instructions to execute the method according to embodiment 1.

[0225] Example 3

[0226] In a third aspect, based on embodiment 1, this embodiment provides a device, including:

[0227] Memory;

[0228] processor;

[0229] as well as

[0230] Computer programs;

[0231] The computer program is stored in the memory and is configured to be executed by the processor to implement the method described in Example 1.

[0232] Example 4

[0233] In a fourth aspect, based on Embodiment 1, this embodiment provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method described in Embodiment 1 is implemented.

[0234] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0235] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0236] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0237] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0238] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for unmanned aerial vehicle assisted task offloading and resource allocation based on service cache, characterized in that: The method comprises: S1. Obtain local popularity based on the historical services required by the ground terminal device, and the drone selects the cached services based on the local popularity to obtain the drone caching solution; S2. The ground terminal device caches the service in a random manner to obtain a cache solution for the ground terminal device; S3. In response to the task request from the ground terminal device, based on the UAV cache solution and the ground terminal device cache solution, the pre-built total delay optimization problem of minimizing all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory; S4. According to the optimized task offloading decision, the task requested by the ground terminal device is determined to be calculated on the local terminal device, or the task is offloaded to the corresponding drone for calculation; the drone flies according to the optimized drone trajectory, and the ground terminal device is allocated resources according to the optimized drone resource allocation; The total delay optimization problem P1 of minimizing all ground terminal equipment request tasks includes: Among them, C1 is the delay limit, T m is the total delay of completing the task requested by the ground terminal device m, K = {1, 2, ..., k1} and M = {1, 2, ..., m1} are the sets of UAVs and ground terminal devices respectively, and B = (b m,k ∈{0,1}:m∈M,k∈K) is the set of whether the ground terminal device m is connected to the drone k, F=(f k,m :m∈M,k∈K) is the set of computing capabilities of drone k to ground terminal device m, C=(c m,k ∈{0,1}:m∈M,k∈K) represents the set of whether the computing task of the ground terminal device m is offloaded to the UAV, Q=(Q k :k∈K) is the horizontal position coordinate of UAV k; is the maximum task delay of the ground terminal device m, represents any mathematical symbol; C2 is the user's energy consumption limit, E m is the total energy consumption of the ground terminal device m, is the maximum energy consumption of the ground terminal device m; C3 is the energy consumption limit of the UAV, E k is the total energy consumption of UAV k, is the maximum energy consumption of the UAV; C4 is the resource limit allocated to the UAV, f k,m is the computing power of UAV k to ground terminal device m, is the maximum computing capacity of UAV k; C5 is the causal constraint, that is, the ground terminal equipment can only choose to offload the calculation after it is connected to the UAV, c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV, 1 means offloading, 0 means not offloading; b m,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; C6 stipulates that a ground terminal device can only connect to one drone; C7 is the maximum number of ground terminal devices that can be connected to the drone, is the maximum number of connected ground terminal devices; C8 is the maximum distance limit between drones, and the horizontal position coordinate of drone k is Q k =(x k ,y k ), Q l is the horizontal position coordinate of UAV l, d m is the maximum distance between drones; C9 stipulates that ground terminal equipment can access drones only when they are within the maximum range of drones. k,m is the distance between the ground terminal device m and the drone k, is the maximum communication range of the drone; C10 indicates c m,k ,a k,s ,b m,k ,e m,s is a binary variable, a k,s ∈{0,1} indicates whether drone k caches service s, 1 means cache, 0 means no cache, e m,s ∈{0,1} indicates whether the ground terminal device m caches service s, 1 indicates caching, and 0 indicates no caching; The construction method of minimizing the total delay optimization problem of all ground terminal device request tasks includes: Due to the coverage problem of the base station, the ground terminal devices in the area cannot communicate directly with the base station BS; the base station is connected to the cloud center through a wired optical fiber link, and the drone communicates with the base station through a wireless backhaul link; assuming that the front-end and backhaul links operate on different frequency bands, the wireless backhaul link capacity of each drone to the base station BS is R b For the front-end link, the ground terminal equipment within the coverage of each drone adopts orthogonal frequency division multiple access, and the bandwidth is evenly divided among multiple ground terminal equipment. Assuming that the total uplink / downlink communication bandwidth is B, the two-way wireless communication spectrum bandwidth from drone k to the ground terminal equipment is B / M k , where M k The total number of users served by drone k; The horizontal position coordinate of drone k is Q k =(x k ,y k ), the height is fixed, and the horizontal position coordinate of the ground terminal equipment m is Q m =(x m ,y m ), then the distance between the ground terminal device m and the drone k is The channel gain between the ground terminal device m and the drone k is h0 is the channel gain at the reference distance d0=1, and H is the flight height of each drone. Assuming that the two-way channel gain between the ground terminal device m and the drone k is the same, the uplink and downlink rates between the ground terminal device m and the drone k are Among them, p m is the transmission power of the ground terminal device m, p k is the transmission power allocated by UAV k to the ground terminal device m, and N0 is the noise power of the receiver; The local calculation time is The energy consumption of local computing by ground terminal equipment is Among them, κ is a coefficient that depends on the chip structure, f m is the computing power of the ground terminal equipment, C m The number of CPU cycles required for computing tasks in ground terminal equipment; The ground terminal device chooses to offload to the drone for calculation. The time for uploading the task to the drone is The energy consumption of task upload is The task calculation time is The energy consumption of task calculation is Among them, l m is the size of the input data of the ground terminal device m, f k,m is the computing power of UAV k for ground terminal device m. If the maximum computing power of UAV k is but When local computing is selected but the ground terminal device does not cache the corresponding service, the download time of the ground terminal device downloading the corresponding service from the drone is Among them, c s is the size of the service s program; the energy consumption of UAV k sending service s to ground terminal device m is If the drone does not have the service program corresponding to the task requested by the user, it needs to download the corresponding service from the remote through the base station. The time to download the service is If the ground terminal device m chooses local calculation, the total delay of local calculation is for: Among them, b m,k ∈{0,1} is whether the ground terminal device m is connected to the drone k, 1 means connected, 0 means not connected; e m,s ∈{0,1} indicates whether the ground terminal device m caches service s, 1 indicates caching, and 0 indicates no caching; The task is to calculate the total energy consumption locally at the ground terminal device m for: The total time that the computing task of the ground terminal device m is executed on the drone k for: where a k,s ∈{0,1} indicates whether drone k caches service s, 1 indicates caching, and 0 indicates no caching; The total energy consumption of computing tasks of ground terminal device m executed on drone k for: If the ground terminal device m chooses to offload the calculation, the calculation time of the ground terminal device m on the drone k is for: Energy consumption of computing tasks of ground terminal device m on drone k for: where c m,k ∈{0,1} indicates whether the computing task of the ground terminal device m is offloaded to the UAV; The total delay T for the task requested by the ground terminal device m to complete m : The total energy consumption E of the ground terminal equipment m m : The total energy consumption E of drone k k :

2. The method for unmanned aerial vehicle-assisted task offloading and resource allocation based on service cache according to claim 1, characterized in that: Step S4 includes: S41. The task requested by the ground terminal device is calculated on the local terminal device; S411. If the ground terminal device has cached the required service, directly perform task calculation; S412. If the ground terminal device does not cache the required service but the drone caches the service requested by the ground terminal device, then based on the optimized drone trajectory and resource allocation, the corresponding service program is downloaded from the drone to the ground terminal device, and the computing service is directly performed on the ground terminal device; S413. If the ground terminal device does not cache the required service and the drone does not cache the service requested by the ground terminal device, use the wireless backhaul link to download the service program from the remote end to the drone through the base station, and based on the optimized drone trajectory and resource allocation, download the corresponding service program from the drone to the ground terminal device, and perform computing services directly on the ground terminal device.

3. The method for unmanned aerial vehicle-assisted task offloading and resource allocation based on service cache according to claim 1, characterized in that: Step S4 includes: S42. The ground terminal device offloads the task to the corresponding drone for calculation; S421. The drone caches the service requested by the ground terminal device, and the drone is directly calculated based on the optimized drone trajectory and resource allocation; S422. If the service requested by the ground terminal device is not cached on the drone, the service program is downloaded from the remote end to the drone via the base station using the wireless backhaul link, and the calculation is performed on the drone based on the optimized drone trajectory and resource allocation.

4. The method for unmanned aerial vehicle-assisted task offloading and resource allocation based on service cache according to claim 1, characterized in that: Step S1 includes: S11. The access method between the ground terminal equipment and the drone adopts the closest distance access. When the ground terminal equipment is within the coverage of the drone, the nearest drone will provide services. Suppose M k The number of ground terminal devices serving UAV k; S12. The probability that ground terminal device m requests service s is p ms , then the request probability matrix P of all ground terminal devices is: S13. Based on the request probability p of the ground terminal device m for service s ms , get local popularity S14. Since there is no coupling relationship between the content deployments of drones, in order to improve the hit rate of the drone cache service, the service programs with higher local popularity are cached in the drone.

5. The method for unmanned aerial vehicle-assisted task offloading and resource allocation based on service cache according to claim 1, characterized in that: In step S3, the pre-built optimization problem of minimizing the total delay of all ground terminal device request tasks is used to jointly optimize the task offloading decision, UAV resource allocation and UAV trajectory, including: S31. When the resources of the drone are allocated and the trajectory of the drone is determined, the task offloading decision problem is solved and the optimization problem P1 is transformed into P1.1: stC1,C2,C3,C5 The binary variable c m,k Relaxation to continuous variables That is, 0≤c m,k ≤1, where: in represents the total delay in completing the task requested by the ground terminal device m, the total energy consumption of the ground terminal device m, and the total energy consumption of the UAV k after relaxation; The optimization problem P1.1 is transformed into P1.2: The optimization problem P1.2 is a linear programming problem, and the constraints are all linear. Therefore, the optimization problem P1.2 is a convex problem. We use CVX in the MATLAB toolbox to solve it and get a better c m,k ; S32. Under the condition that the task offloading decision is made and the UAV trajectory is determined, the UAV resource allocation problem is solved. On this basis, the optimization problem P1 is transformed into P1.3: The Lagrangian and KKT constraints are used to solve the problem, and two constraint factors λ are introduced. m ,ν m , while m >0,ν m >0, define the Lagrangian equation as: Since the optimization problem P1.3 is convex, by applying the KKT condition, we get and Solve the optimal UAV resource allocation f k,m * : S33. When the task offloading decision is made and the UAV resource allocation is determined, the UAV trajectory problem is solved, and the optimization problem P1 is transformed into the optimization problem P1.4: The transmission delay of ground terminal equipment in the objective function, the energy consumption of drone multicast software in the constraints, and the energy consumption of task upload have important effects on Q k is non-convex, but for the variable Q k , formula ||Q k -Q l || 2 is convex, so the continuous convex approximation method is used; because the first-order Taylor expansion of any point of any convex function is the global lower bound of the convex function, the convex function can be approximated by the first-order Taylor expansion; the transmission rate from the ground terminal equipment to the drone Approximately: in, Among them, Q k [i] is the i-th order Taylor expansion of the UAV trajectory, Z m,k [i] G m,k is the intermediate parameter; When the optimization problem P1.4 is introduced, P1.4 is a standard convex optimization problem. The CVX in the MATLAB toolbox is used to solve it and the optimal Q is obtained. k ; S34. The solution to P1 is obtained by iteratively solving the three sub-problems P1.2, P1.3 and P1.4, and updating the corresponding solutions: task offloading decision, UAV resource allocation and UAV trajectory.

6. A drone-assisted task offloading and resource allocation device based on service cache, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the method according to any one of claims 1 to 5.

7. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 5.

8. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.