Calculation unloading and resource allocation method and system for unmanned aerial vehicle cooperative edge calculation
Through the UAV collaborative edge computing system, the computing resources of two UAVs and terminal devices are used to optimize computing offloading and resource allocation, solving the problem of insufficient processing of computing-intensive tasks by a single UAV, and achieving a more efficient and reliable task processing and wider application scenarios.
Patent Information
- Application Number
- CN202411446961.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, when the computing task is large, a single drone is not enough to handle these computing-intensive tasks in real time, and if multiple flying drones are deployed, the flight trajectory solution is complex and there is communication interference problem.
A drone collaboration edge computing system is designed, and the computing resources of the two drones and terminal equipment are used to calculate the uninstallation and resource allocation by optimizing the model to improve the real -time and reliability of task processing.
Improve the real -time and reliability of task processing, simplify the system structure, reduce communication interference, expand the application scenarios, and improve energy utilization efficiency.
Smart Images

Figure CN119364427A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of mobile edge computing technology, and in particular to a method and system for computing offloading and resource allocation for unmanned aerial vehicle collaborative edge computing. Background Art
[0002] With the rapid development of the fifth generation of mobile communication technology and the Internet of Things, more and more new mobile applications have gradually become an indispensable part of daily life, such as smart home, virtual reality, face recognition, etc.; these applications require a lot of computing resources, which may exceed the computing power of resource-constrained terminal devices; fortunately, Mobile Edge Computing (MEC) technology has been proposed, which can provide effective computing services for terminal devices to alleviate the pressure of insufficient computing resources of terminal devices; however, traditional edge servers are deployed in fixed locations and are affected by other uncertain factors such as terrain factors and climate, resulting in problems such as inflexible coverage and high maintenance costs.
[0003] Due to the advantages of unmanned aerial vehicles (UAVs) such as low cost and easy deployment, by deploying drones equipped with MEC servers, more efficient and flexible computing services can be provided for terminal devices. However, when the number of terminal devices is large and the amount of computing tasks is large, a single drone may not be sufficient to process these computing-intensive tasks in real time. In view of the above reasons, some existing research works have introduced ground base stations to assist in processing these tasks. In natural disaster scenarios, infrastructure such as ground base stations are easily damaged, which will limit their ability to respond to potential emergencies. Therefore, other research works have studied the design of MEC systems assisted by multiple flying drones, where multiple flying drones are deployed in their respective activity areas to help process the computing tasks of terminal devices. However, the flight trajectory solution of multiple drones is very complicated and there is a lot of communication interference.
[0004] Therefore, in the prior art, when the amount of computing tasks is large, a single drone is not sufficient to process these computing-intensive tasks in real time, and if multiple flying drones are deployed, the flight trajectory solution is very complicated and there is a large communication interference problem. Summary of the invention
[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a computational offloading and resource allocation method and system for UAV collaborative edge computing, which fully utilizes the computing resources of all terminal devices and two UAVs and improves the real-time and reliability of task processing.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] The first aspect of the present invention provides a computational offloading and resource allocation method for UAV collaborative edge computing.
[0008] The computation offloading and resource allocation method of UAV collaborative edge computing includes:
[0009] Establish a UAV collaborative edge computing system, including several terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to the ground control base. The terminal device performs local computing, the mobile UAV performs part of the computing, and the hovering UAV performs the remaining computing;
[0010] Construct an optimization model for the UAV collaborative edge computing system and formulate the optimization objectives and constraints for computation offloading and resource allocation;
[0011] With the goal of minimizing the total energy consumption, the optimization model is solved to jointly optimize the task allocation of terminal devices and drones, the allocation of computing resources, and the flight trajectory of mobile drones.
[0012] Furthermore, the mobile drone always flies at a predetermined height, and the hovering drone hovers at a fixed height; the ground control base directly provides energy for the hovering drone.
[0013] Furthermore, the optimization model includes a channel model, an unloading model, a calculation model and a flight energy consumption model;
[0014] The channel model defines the channel gain between the terminal device and the mobile drone, and between the mobile drone and the hovering drone;
[0015] The offloading model, based on the channel gain, defines the number of tasks and energy consumption of offloading tasks to the mobile UAV, and the number of tasks and energy consumption of offloading tasks to the hovering UAV respectively;
[0016] The computing model defines the number of tasks and energy consumption of local computing of the terminal device and the number of tasks and energy consumption of computing of the mobile drone;
[0017] The flight energy consumption model defines the energy consumption of the mobile UAV flight.
[0018] Furthermore, the total energy consumption is a weighted total energy consumption of unloading energy consumption, calculation energy consumption and flight energy consumption.
[0019] Furthermore, the total energy consumption is minimized, which is expressed as:
[0020]
[0021] Where M and N are the number of terminal devices and the number of time slots, respectively. m and θ u are the weights of energy consumption of terminal device m and drone, E m [n] and E u [n] are the energy consumption of terminal device m and drone respectively, They are the energy consumption of offloading tasks from terminal device m to mobile drones, the energy consumption of offloading tasks from mobile drones to hovering drones, the energy consumption of local calculation by terminal device m, the energy consumption of calculation by mobile drones, and the energy consumption of flying by mobile drones.
[0022] Furthermore, the constraints include:
[0023] In each time slot, the mobile and hovering drones only process the tasks obtained before the current time slot;
[0024] The total number of bits that the mobile UAV needs to calculate and offload is equal to the number of bits forwarded from terminal device m;
[0025] The sum of the bits calculated locally and offloaded by terminal device m must be equal to the task input bits;
[0026] Any optimization variable is non-negative;
[0027] The mobile drone flies from the starting position to the end position;
[0028] The speed of a moving drone cannot exceed its own maximum speed.
[0029] Furthermore, the solution is to decompose the original optimization problem into two sub-problems: a resource allocation optimization sub-problem and a mobile drone trajectory optimization sub-problem;
[0030] In the first sub-problem, by fixing the flight trajectory of the mobile UAV, the task bit quantity allocation and computing frequency allocation in the resource allocation optimization sub-problem are optimized until the first sub-problem meets the convergence condition and the convergence is terminated;
[0031] In the second sub-problem, the optimized task bit number allocation and computing frequency allocation are fixed and the flight trajectory of the mobile UAV is optimized.
[0032] The second aspect of the present invention provides a computing offloading and resource allocation system for UAV collaborative edge computing.
[0033] The computing offloading and resource allocation system of UAV collaborative edge computing includes system establishment module, model building module and optimization solution module:
[0034] The system establishment module is configured to: establish a UAV collaborative edge computing system, including a plurality of terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to a ground control base, wherein the terminal device performs local computing, the mobile UAV performs partial computing, and the hovering UAV performs the remaining computing;
[0035] A model building module, configured to: build an optimization model of the UAV collaborative edge computing system, and formulate optimization objectives and constraints for computation offloading and resource allocation;
[0036] The optimization solution module is configured to solve the optimization model with the goal of minimizing the total energy consumption, and jointly optimize the task allocation of the terminal device and the drone, the computing resource allocation, and the flight trajectory of the mobile drone.
[0037] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the method for computational offloading and resource allocation of UAV collaborative edge computing as described in the first aspect of the present invention.
[0038] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the computational offloading and resource allocation method for cooperative edge computing of unmanned aerial vehicles as described in the first aspect of the present invention are implemented.
[0039] One or more of the above technical solutions have the following beneficial effects:
[0040] (1) The present invention designs a mobile edge computing system MEC based on air-to-air cooperative assistance of drones, which fully utilizes the computing resources of all terminal devices and two drones. The tasks of the terminal devices are divided into three parts: the terminal devices perform local computing, the mobile drones perform partial computing, and the hovering drones perform the remaining computing. Compared with the limited computing resources of a single drone, the present invention improves the real-time and reliability of task processing.
[0041] (2) Compared with MEC assisted by multiple flying drones, the present invention has a simpler system structure, less communication interference, and only one moving flying drone, so trajectory solving is relatively easy. In addition, the present invention does not rely on the assistance of ground base stations and will not be affected by natural disasters and other scenarios, and has a wider range of application scenarios.
[0042] (3) The present invention proposes a computing offloading and resource allocation method for UAV collaborative edge computing. By jointly optimizing the task allocation and computing resource allocation of terminal devices and mobile UAVs as well as the flight trajectory of mobile UAVs, unnecessary energy consumption is reduced and the energy utilization efficiency of the entire system is improved. In addition, by reducing the energy consumption of the equipment, the service life of the equipment is also extended.
[0043] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0045] Figure 1 This is a schematic diagram of the structure of the UAV collaborative edge computing system of the first embodiment.
[0046] Figure 2 This is a solution flow chart for the first embodiment.
[0047] Figure 3 This is a curve chart showing how the weighted total energy consumption of the first embodiment changes with the number of input tasks.
[0048] Figure 4 This is a curve chart showing the weighted total energy consumption of the first embodiment changing with task completion time. DETAILED DESCRIPTION
[0049] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0050] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0051] Terminology explanation:
[0052] Line-of-sight (LoS) refers to the transmission mode when there are no obstacles between the sender and the receiver.
[0053] Time Division Multiple Access (TDMA): is a communication technology used for multiple users to share limited spectrum resources. In a TDMA system, time is divided into continuous time slots, and each user communicates in a different time slot to achieve parallel data transmission.
[0054] Embodiment 1
[0055] In one embodiment of the present disclosure, a method for computing offloading and resource allocation of UAV collaborative edge computing is provided, comprising the following steps:
[0056] Step S1: Establish a UAV collaborative edge computing system, including several terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to the ground control base. The terminal device performs local calculations, the mobile UAV performs partial calculations, and the hovering UAV performs the remaining calculations.
[0057] Furthermore, the mobile drone always flies at a predetermined height, and the hovering drone hovers at a fixed height; the ground control base directly provides energy for the hovering drone.
[0058] Step S2: Construct an optimization model for the UAV collaborative edge computing system and formulate the optimization objectives and constraints for computation offloading and resource allocation.
[0059] Furthermore, the optimization model includes a channel model, an unloading model, a calculation model and a flight energy consumption model;
[0060] The channel model defines the channel gain between the terminal device and the mobile drone, and between the mobile drone and the hovering drone;
[0061] The offloading model, based on the channel gain, defines the number of tasks and energy consumption of offloading tasks to the mobile UAV, and the number of tasks and energy consumption of offloading tasks to the hovering UAV respectively;
[0062] The computing model defines the number of tasks and energy consumption of local computing of the terminal device and the number of tasks and energy consumption of computing of the mobile drone;
[0063] The flight energy consumption model defines the energy consumption of the mobile UAV flight.
[0064] Furthermore, the constraints include:
[0065] In each time slot, the mobile and hovering drones only process the tasks obtained before the current time slot;
[0066] The total number of bits that the mobile UAV needs to calculate and offload is equal to the number of bits forwarded from terminal device m;
[0067] The sum of the bits calculated locally and offloaded by terminal device m must be equal to the task input bits;
[0068] Any optimization variable is non-negative;
[0069] The mobile drone flies from the starting position to the end position;
[0070] The speed of a moving drone cannot exceed its own maximum speed.
[0071] Step S3: With the goal of minimizing the total energy consumption, the optimization model is solved to jointly optimize the task allocation of the terminal device and the drone, the computing resource allocation, and the flight trajectory of the mobile drone.
[0072] Furthermore, the total energy consumption is a weighted total energy consumption of unloading energy consumption, calculation energy consumption and flight energy consumption.
[0073] Furthermore, the solution is to decompose the original optimization problem into two sub-problems: a resource allocation optimization sub-problem and a mobile drone trajectory optimization sub-problem;
[0074] In the first sub-problem, by fixing the flight trajectory of the mobile UAV, the task bit quantity allocation and computing frequency allocation in the resource allocation optimization sub-problem are optimized until the first sub-problem meets the convergence condition and the convergence is terminated;
[0075] In the second sub-problem, the optimized task bit number allocation and computing frequency allocation are fixed and the flight trajectory of the mobile UAV is optimized.
[0076] As an embodiment, the specific implementation method of the computation offloading and resource allocation method of the UAV collaborative edge computing is as follows: Figure 1 As shown:
[0077] Step 1: Build an optimization model for the UAV collaborative edge computing system, formulate the optimization objectives and constraints of computational offloading and resource allocation, and solve the optimization problem of minimizing the weighted total energy consumption of all devices.
[0078] Specifically, firstly, a MEC system consisting of M ground terminal devices, a mobile drone flying around the terminal devices, and a hovering drone hovering in the air and connected to the ground control base is designed, that is, Figure 1 The drone collaborative edge computing system shown.
[0079] Next, we build an optimization model for the UAV collaborative edge computing system, including:
[0080] Step 1.1: Build a channel model
[0081] Assume that the mobile drone always flies at a predetermined height H1, and the hovering drone hovers at a fixed height H2; Represents the set of terminal devices, and the location of terminal device m is represented by u m =(x m ,y m ,0), where The position of the hovering drone is represented by u2=(x2, y2, H2).
[0082] The total task completion time T is divided into N time slots, and the length of each time slot is expressed as Since the selected δ is small enough, the position of the mobile drone can be considered roughly fixed in each time slot. Therefore, in the nth time slot, the position of the mobile drone is expressed as u[n] = (x[n], y[n], H1), where Then, the starting position and the ending position of the mobile drone are represented as u I =(x I ,y I ) and u F =(x F ,y F ).
[0083] The speed of the mobile drone in the nth time slot is expressed as Among them, u[n-1] and u[n] are at the positions of the n-1th and nth time slots respectively. Let V max represents the maximum speed of the mobile drone. The constraints of the mobile drone can be expressed as:
[0084] u[0]=u I ,u[N]=u F
[0085] v[n]≤V max
[0086] Assume that there is a Line-of-Sight (LoS) link between each terminal device and the mobile drone, and between the mobile drone and the hovering drone; the channel gain between each terminal device and the mobile drone, and between the mobile drone and the hovering drone in the nth time slot can be expressed as:
[0087]
[0088] in, and are the distances between the terminal device m and the mobile drone and between the mobile drone and the hovering drone in the nth time slot, g0 represents the channel gain at a reference distance of 1m, H1 and H2 represent the heights of the mobile drone and the hovering drone, u m, u[n], and u2 are the locations of the terminal device m, the mobile drone, and the hovering drone, respectively.
[0089] Step 1.2: Build an offloading model
[0090] In order to avoid interference between different terminal devices, time division multiple access (TDMA) technology is used for communication; each time slot is divided into M sub-time slots, and the length of the sub-time slot is In addition, each sub-time slot is divided into two time periods of equal length, expressed as In the first time period, the terminal device m offloads part of its own tasks to the mobile drone. In the second time period, the mobile drone further offloads the tasks of the terminal device m to the hovering drone.
[0091] (1) Order The number of tasks that the terminal device m offloads part of its own tasks to the mobile drone in the nth time slot can be expressed as:
[0092]
[0093] in, represents the unloaded power of terminal device m in the nth time slot, represents the noise power, B represents the channel bandwidth, is the channel gain between the terminal device m and the mobile drone in the nth time slot.
[0094] (2) The energy consumption of the terminal device m offloading the task to the mobile drone in the nth time slot is expressed as:
[0095]
[0096] (3) Order The number of tasks that the mobile UAV further offloads to the hovering UAV is expressed as:
[0097]
[0098] in, represents the unloading power of the mobile drone in the nth time slot, represents the noise power, B represents the channel bandwidth, is the channel gain between the mobile UAV and the hovering UAV in the nth time slot.
[0099] (4) The energy consumption of the mobile drone in the nth time slot further offloading the task of the terminal device m to the hovering drone is expressed as:
[0100]
[0101] Step 1.3, build the computational model
[0102] The computing tasks of the terminal device are divided into three parts: the terminal device performs local computing, the mobile drone performs partial computing, and the hovering drone performs the remaining computing.
[0103] (1) Local computing model of terminal devices:
[0104] Let f m [n] represents the calculation frequency of terminal device m in the nth time slot. The number of tasks and energy consumption of local calculation of terminal device m are:
[0105]
[0106] Among them, κ m represents the effective capacitance coefficient of the terminal device m, C m represents the computational resources required to compute one input bit task, and δ is the length of the time slot.
[0107] (2) Computational model of mobile drones:
[0108] Since terminal devices can only perform a few tasks locally, mobile drones can assist in handling some tasks.
[0109] make represents the calculation frequency of the mobile drone in the nth time slot. The number of tasks and energy consumption calculated by the mobile drone are:
[0110]
[0111] in, represents the effective capacitance coefficient of the mobile UAV, δ1 is the length of the sub-time slot;
[0112] (3) Number of tasks calculated by the hovering drone:
[0113] Considering the large amount of computing tasks that need to be processed, the mobile drone may not be able to process all the tasks obtained from the terminal device in real time. Therefore, the mobile drone can further forward some tasks to the hovering drone for calculation; since the ground control base can directly provide energy for the hovering drone, this means that the hovering drone has sufficient energy, so the energy consumption of the hovering drone calculation can be ignored.
[0114] In addition, since the mobile drone and the hovering drone in each time slot only process the tasks obtained before the current time slot, the following constraints should be met:
[0115]
[0116] Step 1.4: Build a flight energy consumption model for mobile drones
[0117] Due to the high maneuverability of mobile drones, it is necessary to consider their flight energy consumption. The flight energy consumption of mobile drones in the nth time slot is:
[0118]
[0119] Among them, ε1 and ε2 represent parameters related to the hardware configuration of the mobile drone, and v[n] is the speed of the mobile drone at the nth time slot.
[0120] Step 1.5: Formulate and describe the optimization problem
[0121] The optimization goal is to optimize the calculation frequency Unloading task volume Based on the three variables of u = {u[n]} and the trajectory of the mobile drone, the total energy consumption of all devices is minimized. Therefore, the optimization model can be formulated as:
[0122] Objective function P1:
[0123] Constraints:
[0124] C1:
[0125] C2:
[0126] C3:
[0127] C4:
[0128] C5:
[0129] C6:
[0130] C7:
[0131] C8: u[0] = u I ,u[N]=u F
[0132] C9:
[0133] Where M and N are the number of terminal devices and the number of time slots, respectively. m and θ u are the weights of energy consumption of terminal device m and drone respectively, E m [n] and E u[n] are the energy consumption of terminal device m and drone respectively, They are the energy consumption of offloading tasks from terminal device m to mobile drones, the energy consumption of offloading tasks from mobile drones to hovering drones, the energy consumption of local calculation by terminal device m, the energy consumption of calculation by mobile drones, and the energy consumption of flying by mobile drones.
[0134] Constraint C1 means that in each time slot, the mobile drone and the hovering drone only process the tasks obtained before the current time slot.
[0135] Constraint C2 states that the total number of bits that the mobile drone needs to calculate and offload must be equal to the number of bits forwarded from terminal device m.
[0136] Constraint C3 indicates that the sum of the number of bits calculated locally and offloaded by terminal device m must be equal to the task input bits
[0137] Constraints C4-C7 indicate that any optimization variable must be non-negative.
[0138] Constraint C8 indicates that the mobile drone flies from the starting position to the end position.
[0139] Constraint C9 means that the speed of the mobile drone cannot exceed its own maximum speed.
[0140] Step 2: Solve the optimization model
[0141] Figure 2 is a flowchart for the solution, such as Figure 2 As shown, first, set the iteration number variable j = 1, the maximum iteration number j max , iterative termination thresholds χ1 and χ2 and initialize the trajectory u of the mobile UAV; by using the block coordinate descent method, the original optimization problem is decomposed into two sub-problems, namely the resource allocation optimization sub-problem and the mobile UAV trajectory optimization sub-problem;
[0142] Step 3: In the first subproblem, set the iteration number variable t=1 of subproblem 1, and optimize the task bit number allocation and calculation frequency allocation in the resource allocation optimization subproblem by fixing the flight trajectory of the mobile drone, until the first subproblem meets the convergence condition and terminates the convergence, specifically:
[0143] Step 3.1: The trajectory of the fixed mobile drone u remains unchanged, and the variable calculation frequency F and the number of unloaded tasks L are optimized:
[0144] The objective function of the first subproblem P1.1 is: Constraints: C1-C7.
[0145] in, The energy consumption calculated for the mobile UAV and the energy consumption of offloading tasks from the mobile UAV to the hovering UAV are shown respectively.
[0146] Step 3.2: Given the dual variable corresponding to the inequality constraint C1
[0147] Step 3.3: Based on the value of the dual variable γ, obtain the dual variables corresponding to the equality constraints C2 and C3 through binary search. and The value of .
[0148] Step 3.4: Through the Karush-Kuhn-Tucker condition, the optimized calculation frequency F and unloading task volume L are solved, which can be expressed as:
[0149]
[0150] in,
[0151] Step 3.5: Iteratively update the dual variable γ according to the subgradient method:
[0152]
[0153] in, represents the step length, Yes m,n The sub-gradient of It can be expressed as:
[0154]
[0155] Step 3.6: In addition, use the binary search method to obtain the dual variables μ and η corresponding to the equality constraints C2 and C3.
[0156] Because f m [n]≥0 and η m The range of can be obtained from equation (1):
[0157]
[0158] Based on constraints C2 to C3 and equations (1) to (4), The value of can be expressed as follows:
[0159]
[0160] It should be noted that equation (5) is obtained from constraint C3, equation (6) is obtained from equation (3), and equation (7) is obtained from constraint C2.
[0161] In (5) to (6), the formula μ m is η m A non-decreasing function based on and the iteratively updated dual variable γ, the corresponding μ m From formula (5) to (7), we can get μ m Range and Can be expressed as:
[0162]
[0163] Therefore, when formula (5) = (7), the optimal dual variable μ m and η m As you can see, this represents the end of the binary search method.
[0164] Step 3.7: After obtaining the values of the dual variables γ, μ, and η, the number of unloaded tasks L and the calculation frequency F are obtained from formulas (1), (2), (3), and (4) and input into the objective function of subproblem P1.1, thereby obtaining the energy consumption of subproblem P1.1
[0165] Step 3.8: Set the iteration variable t = t + 1, and repeat steps 3.2 to 3.7 until the objective function of subproblem P1.1 satisfies Stop the iteration and get the optimal number of offload tasks L and calculation frequency F.
[0166] Step 4: In the second sub-problem, the optimized task bit number allocation and calculation frequency allocation are fixed and the flight trajectory of the mobile UAV is optimized as follows:
[0167] Step 4.1: Fix the optimized number of offload tasks L and the calculation frequency allocation F and optimize the flight trajectory u of the mobile UAV;
[0168] The objective function of the second sub-problem P1.2 is: Constraints: C8, C9.
[0169] because The objective function of subproblem P1.2 is non-convex, so a slack variable ζ[n] is introduced into the objective function of P1.2 and rewritten as:
[0170]
[0171] And there are additional constraints that need to be met:
[0172] ‖v[n]‖2 ≥ζ 2 [n]
[0173] ζ[n]≥0
[0174] Obviously, Both v[n] and ζ[n] are convex, but due to the constraint ‖v[n]‖ 2 ≥ζ 2 [n] is still non-convex. Here, using the continuous convex approximation method, the above non-convex constraint can be transformed into:
[0175]
[0176] After the above transformation, subproblem P1.2 is a convex problem, and the convex optimization tool CVX can be used to solve the trajectory u of the mobile drone.
[0177] Step 5: Input the task bit quantity allocation, calculation frequency allocation and flight trajectory obtained in steps 3 and 4 into the objective function of the original optimization problem to obtain the total energy consumption value E of the current iteration. j .
[0178] Step 6: Update the number of iterations j=j+1.
[0179] Step 7: Input the j-th optimized trajectory u into step 3, and repeat steps 3 to 6 until |E j -E j-1 |≤χ2 or number of iterations j>j max , get the minimum total energy consumption E j .
[0180] A comparative experiment was conducted on the effect of the method of this embodiment, using three existing methods: local computing of the terminal device, flying a mobile drone in a straight trajectory, and flying a mobile drone in a semicircular trajectory as comparison schemes. Figure 3 is a curve diagram showing the weighted total energy consumption of the solution of this embodiment and three comparative solutions as the number of input tasks changes. Figure 4 is a curve diagram showing the weighted total energy consumption of the solution of this embodiment and three comparative solutions as the task completion time changes. Figure 3 In , the relationship between the weighted energy consumption of the system and the task completion time is described. It can be seen that the weighted energy consumption of all schemes decreases as the task completion time increases, which is consistent with the intuition that there is a trade-off between energy consumption and time consumption to complete the same task, and energy consumption will decrease as time increases. It is worth noting that this scheme always achieves the best performance compared to other schemes; Figure 4A comparison chart of the weighted total energy consumption of various schemes under different numbers of task inputs is shown. When the number of task inputs increases, the weighted total energy consumption increases; the reason is that the mobile drone needs to consume more energy to calculate or unload; in addition, it can be seen that the scheme proposed in this embodiment can always obtain the lowest energy consumption compared to other schemes.
[0181] Embodiment 2
[0182] In one embodiment of the present disclosure, a computing offloading and resource allocation system for cooperative edge computing of drones is provided, including a system establishment module, a model building module and an optimization solution module:
[0183] The system establishment module is configured to: establish a UAV collaborative edge computing system, including a plurality of terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to a ground control base, wherein the terminal device performs local computing, the mobile UAV performs partial computing, and the hovering UAV performs the remaining computing;
[0184] A model building module, configured to: build an optimization model for the UAV collaborative edge computing system, and formulate optimization objectives and constraints for computation offloading and resource allocation;
[0185] The optimization solution module is configured to solve the optimization model with the goal of minimizing the total energy consumption, and jointly optimize the task allocation of the terminal device and the drone, the computing resource allocation, and the flight trajectory of the mobile drone.
[0186] Embodiment 3
[0187] The purpose of this embodiment is to provide a computer-readable storage medium.
[0188] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method for computing offloading and resource allocation for cooperative edge computing of drones as described in the first embodiment of the present disclosure.
[0189] Embodiment 4
[0190] The purpose of this embodiment is to provide an electronic device.
[0191] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for computing offloading and resource allocation of drone collaborative edge computing as described in Embodiment 1 of the present disclosure are implemented.
[0192] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for computing offloading and resource allocation for cooperative edge computing of unmanned aerial vehicles, characterized in that: include: Establish a UAV collaborative edge computing system, including several terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to the ground control base. The terminal device performs local computing, the mobile UAV performs part of the computing, and the hovering UAV performs the remaining computing; Construct an optimization model for the UAV collaborative edge computing system and formulate the optimization objectives and constraints for computation offloading and resource allocation; With the goal of minimizing the total energy consumption, the optimization model is solved to jointly optimize the task allocation of terminal devices and drones, the allocation of computing resources, and the flight trajectory of mobile drones.
2. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The mobile UAV always flies at a predetermined height, and the hovering UAV hovers at a fixed height; the ground control base directly provides energy for the hovering UAV.
3. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The optimization model includes a channel model, an unloading model, a calculation model and a flight energy consumption model; The channel model defines the channel gain between the terminal device and the mobile drone, and between the mobile drone and the hovering drone; The offloading model, based on the channel gain, defines the number of tasks and energy consumption of offloading tasks to the mobile UAV, and the number of tasks and energy consumption of offloading tasks to the hovering UAV respectively; The computing model defines the number of tasks and energy consumption of local computing of the terminal device and the number of tasks and energy consumption of computing of the mobile drone; The flight energy consumption model defines the energy consumption of the mobile UAV flight.
4. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The total energy consumption is the weighted total energy consumption of unloading energy consumption, calculation energy consumption and flight energy consumption.
5. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The total energy consumption is minimized and is expressed as: Where M and N are the number of terminal devices and the number of time slots, respectively. m and θ u are the weights of energy consumption of terminal device m and drone, E m [n] and E u [n] are the energy consumption of terminal device m and drone respectively, They are the energy consumption of offloading tasks from terminal device m to mobile drones, the energy consumption of offloading tasks from mobile drones to hovering drones, the energy consumption of local calculation by terminal device m, the energy consumption of calculation by mobile drones, and the energy consumption of flying by mobile drones.
6. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The constraints include: In each time slot, the mobile and hovering drones only process the tasks obtained before the current time slot; The total number of bits that the mobile UAV needs to calculate and offload is equal to the number of bits forwarded from terminal device m; The sum of the bits calculated locally and offloaded by terminal device m must be equal to the task input bits; Any optimization variable is non-negative; The mobile drone flies from the starting position to the end position; The speed of a moving drone cannot exceed its own maximum speed.
7. The method for computing offloading and resource allocation of UAV collaborative edge computing according to claim 1, characterized in that: The solution is to decompose the original optimization problem into two sub-problems: resource allocation optimization sub-problem and mobile drone trajectory optimization sub-problem; In the first sub-problem, by fixing the flight trajectory of the mobile UAV, the task bit quantity allocation and computing frequency allocation in the resource allocation optimization sub-problem are optimized until the first sub-problem meets the convergence condition and the convergence is terminated; In the second sub-problem, the optimized task bit number allocation and computing frequency allocation are fixed and the flight trajectory of the mobile UAV is optimized.
8. The computing offloading and resource allocation system for UAV collaborative edge computing is characterized by: Including system building module, model building module and optimization solution module: The system establishment module is configured to: establish a UAV collaborative edge computing system, including a plurality of terminal devices, a mobile UAV flying around the terminal device, and a hovering UAV hovering in the air and connected to a ground control base, wherein the terminal device performs local computing, the mobile UAV performs partial computing, and the hovering UAV performs the remaining computing; A model building module, configured to: build an optimization model of the UAV collaborative edge computing system, and formulate optimization objectives and constraints for computation offloading and resource allocation; The optimization solution module is configured to solve the optimization model with the goal of minimizing the total energy consumption, and jointly optimize the task allocation of the terminal device and the drone, the computing resource allocation, and the flight trajectory of the mobile drone.
9. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; a processor for executing the computer-readable instructions; Wherein, when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is executed.
10. A storage medium, characterized in that: The computer-readable instructions are non-transitorily stored, wherein when the computer-readable instructions are executed by a computer, the method of any one of claims 1 to 7 is performed.