A method for unmanned aerial vehicle trajectory planning and task offloading decision based on joint optimization

Through the joint optimization of drone trajectory planning and task offloading decision-making method, the problem of limited computing resources of mobile devices is solved, efficient computing offloading and task dispatching are achieved, latency is reduced, and user experience is improved.

CN119828735BActive Publication Date: 2025-10-10ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510040968.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-10-10
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

In existing technologies, the computing requirements of mobile devices are difficult to meet the needs of low-latency, high-energy consumption intelligent applications. In addition, drone systems have problems such as limited computing resources, unstable connections, and lack of consideration for mobility, resulting in high delays in task completion and waste of resources.

Method used

A joint optimization-based UAV trajectory planning and task offloading decision-making method is adopted. Through a multi-objective optimization model and dynamic communication scenarios, UAV resources are coordinated to share resources. The Wolf-PHC and DDPG algorithms are used to optimize the offloading strategy and task dispatching, thereby reducing the task completion delay.

Benefits of technology

It improves the computing power and network performance of the UAV system, reduces the delay in mission completion, improves the quality of user service, and adapts to the real-time tasks and mobility of mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828735B_ABST
    Figure CN119828735B_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned aerial vehicle trajectory planning and task unloading decision method based on joint optimization, comprising:1 under the framework of double-layer unmanned aerial vehicle cooperative communication network that one centralized flight unmanned aerial vehicle and a group of distributed unmanned aerial vehicle are formed, the trajectory of flight unmanned aerial vehicle and the unloading decision of mobile device task are optimized;2 the unloading decision and the assignment decision of mobile device task are obtained using the method based on Wolf-PHC and the way based on game theory;3 based on the obtained unloading decision and assignment decision, the trajectory optimization problem of flight unmanned aerial vehicle is solved by applying DDPG algorithm.The application can effectively solve the problem that computing resource is limited and task execution time is too long in the scene that mobile device and unmanned aerial vehicle power are limited, find a best unloading strategy through the cooperation between unmanned aerial vehicle and trajectory optimization, so as to realize reducing total delay of task completion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of UAV trajectory planning and task offloading, and specifically relates to a UAV trajectory planning and task offloading decision-making method based on joint optimization. Background Art

[0002] With the rapid development of the mobile internet, intelligent applications such as augmented reality, autonomous driving, and health monitoring are constantly emerging. These new applications share several common characteristics: low latency tolerance, high energy consumption, and computational intensity. Due to the limited computing power and energy budget of mobile devices, it is difficult to meet the computational demands of such complex applications. In this context, the conflict between the diverse workloads of computationally intensive applications and the limited computing resources of mobile devices poses a challenge to user experience. Therefore, tasks generated by mobile devices can be offloaded locally to multi-access edge computing (MEC) servers located at the edge of the network. In contrast to mobile cloud computing, MEC servers can significantly reduce transmission latency because MEC servers are closer to devices than cloud servers. However, the fixed location of MEC servers limits coverage, making it impossible for mobile devices to directly access access points (APs) or MECs in areas such as mountainous areas, forests, deserts, underwater areas, or rural areas. Furthermore, in environments such as disaster response, emergency rescue, or military exercises, some ground base stations (BSs) may be damaged by natural disasters or military attacks. Installing new BSs or APs requires significant time, and mobile devices in these areas are unable to receive assistance.

[0003] While drone systems equipped with MEC servers have great potential and offer better and faster computing services than traditional fixed-location MEC systems, several challenges remain in real-world adoption. First, MEC-enabled drone systems require lower computing power than cloud servers and traditional MEC systems, resulting in a higher risk of crashes and property damage if the mobile device fails to complete its mission. Second, mobile devices on the ground often present diverse distribution scenarios, and existing methods cannot guarantee a stable connection between mobile devices and drones while maintaining flexibility. Third, mobile devices in real-world scenarios often have real-time tasks and a certain degree of mobility, which are not considered in existing scenarios. Summary of the Invention

[0004] In order to address the shortcomings of the above-mentioned prior art, the present invention proposes a UAV trajectory planning and task offloading decision method based on joint optimization, in order to find an optimal offloading strategy, thereby reducing the total delay in task completion.

[0005] In order to achieve the above-mentioned object, the present invention adopts the following technical solutions:

[0006] The characteristic of the multi-UAV layout and task offloading decision method based on multi-objective joint optimization of the present invention is that it is applied to a In a square ground area V, a vertex of the square ground area V is set as the origin o, two sides connected to the origin o are set as the X axis and the Y axis respectively, and a vertical line perpendicular to the XY plane and passing through the origin o is set as the Z axis, thereby establishing a three-dimensional coordinate system;

[0007] Deploy a distributed drone set U in the square ground area V = { , ,..., ,..., } and a flying drone To assist n mobile devices on the ground in a time slot set consisting of T time slots In the process of completing its own computing tasks, represents the jth distributed UAV; [1, m]; m represents the total number of distributed drones; the jth distributed drone The position of ;in, Represents the jth distributed UAV The coordinates projected onto the ground, Indicates the height of each distributed drone's hovering position; The position in the tth time slot is recorded as , Indicates flying drone The coordinates projected onto the ground in the t-th time slot, Indicates flying drone The flight altitude will fly the drone The flight angle in the tth time slot is recorded as , the flight distance is recorded as ; Represents the flying drones in each time slot Maximum flight distance;

[0008] The position of n mobile devices in the tth time slot is recorded as ,in, Denote the X-axis coordinate and Y-axis coordinate of the t-th time slot of the i-th mobile device, and record the task set of the t-th time slot on n mobile devices as ={ , ,..., ,..., },in, represents the task of the i-th mobile device in time slot t; if the task is executed on the mobile device, it is recorded as local computing, and if the task is executed on the drone side, it is recorded as edge computing; [1,n];

[0009] Let the i-th task in the t-th time slot be The attribute is recorded as = ,in, represents the data volume of the i-th mobile device in the t-th time slot; Representation processing The number of CPU cycles required;

[0010] The UAV trajectory planning and task offloading decision-making method based on joint optimization is carried out in the following steps:

[0011] Step 1: Based on the mobile device's mission and the drone's location, build a drone trajectory planning and task offloading decision model:

[0012] Step 1.1: Use Equation (1) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated locally :

[0013] (1)

[0014] In formula (1), It is represented as the computing power of the i-th mobile device;

[0015] Step 1.2: Use Equation (2) to calculate the task of the i-th mobile device in the t-th time slot Energy consumption calculated locally :

[0016] (2)

[0017] In formula (2), It is the correlation coefficient with the CPU chip performance of the mobile device;

[0018] Step 1.3: Calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay ;

[0019] Step 1.4: Calculate the tasks of the i-th mobile device under different dispatch decisions On the jth distributed UAV Dispatch processing latency on ;

[0020] Step 1.5: Use Equation (20) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated at the edge ;

[0021] = + (20)

[0022] Step 1.6: Calculate the jth distributed UAV in the tth time slot in edge computing Total energy consumption and flying drones Total energy consumption ;

[0023] Step 1.7: Use Equation (26) to define the objective function W of the UAV trajectory planning and task offloading decision model: (26)

[0024] In formula (36), T represents the total number of time slots, Task offloading decisions for all mobile users, Task assignment decisions for mobile users, is the trajectory of the flying drone, Indicates the completion of the task of the i-th mobile device in the t-th time slot The time delay of , and obtained by formula (27):

[0025] (27)

[0026] In formula (27), is the uninstall decision of the i-th mobile device, when =0 indicates the task of the i-th mobile device When executed locally, =j represents the task of the i-th mobile device Unload to the jth distributed UAV Execute on; is the indicator function;

[0027] Step 1.8: Use Equations (28a) to (28e) to construct the constraints for the UAV trajectory planning and task offloading decision model:

[0028] (28a)

[0029] (28b)

[0030] (28c)

[0031] (28d)

[0032] In formula (28a) to formula (28e), represents the maximum energy of the i-th mobile device, represents the jth distributed UAV The maximum energy, Indicates flying drone Maximum energy;

[0033] Step 2: Define and initialize various parameters, including: the locations of n mobile devices, the task list, the locations of m distributed drones, and the starting position of the flying drone;

[0034] Step 3: Use the Wolf-PHC-based task offloading algorithm to generate the offloading strategy for all mobile devices in the tth time slot (t);

[0035] Step 4: According to the offloading strategy of all mobile devices in the tth time slot (t), and the number of drones flying in the tth time slot Location , and thus use the dispatching algorithm based on game theory to obtain the dispatching strategy of mobile devices in the tth time slot ;

[0036] Step 5: Based on the state of the tth time slot , and use the DDPG algorithm to get the flying drone Action at time slot t ,in They represent the remaining power of the i-th mobile device in the t-th time slot, the j-th distributed drone Remaining battery and flying drone Remaining power;

[0037] Step 6: Calculate the reward for the tth time slot And the state of the t+1th time slot ,in, is the drone flying in the tth time slot The penalty constant generated when flying out of the target area, is the drone flying in the tth time slot Battery capacity loss penalty coefficient; represents the remaining power of the i-th mobile device in the t+1-th time slot; represents the jth distributed UAV in the t+1th time slot Remaining power; Indicates the number of drones flying in the t+1th time slot Remaining power; represents the position of the i-th mobile device in the t+1-th time slot, represents the task of the i-th mobile device in the t+1-th time slot The amount of data, Indicates processing the i-th mobile device task in the t+1-th time slot The number of CPU cycles;

[0038] Step 7: Judgment Whether it is achieved If so, the coordinates of all time slots constitute the flying drone Trajectory Otherwise, return to step 3 to continue.

[0039] The UAV trajectory planning and task offloading decision method based on joint optimization of the present invention is also characterized in that step 1.3 includes:

[0040] Step 1.3.1: Use formula (3) to calculate the Mobile devices and distributed drones The probability of line-of-sight connection between :

[0041] (3)

[0042] In formula (3), C and D are two constants related to the propagation environment type. is the distance between the i-th mobile device and the j-th distributed drone in the t-th time slot The Euclidean distance of , and obtained by formula (4):

[0043] (4)

[0044] Step 1.3.2: Use equation (5) to calculate the mobile devices and the jth distributed drone The probability of non-line-of-sight connection :

[0045] (5)

[0046] Step 1.3.3: Use equations (6) and (7) to calculate the mobile devices and the jth distributed drone Line-of-sight links loss and non-line-of-sight links loss :

[0047] (6)

[0048] (7)

[0049] In formula (6) and formula (7), is the path loss exponent, and , represents the carrier frequency, is the speed of light, and Line-of-sight link and non-line-of-sight links The average additional loss of

[0050] Step 1.3.4: Use Equation (8) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot The path loss between :

[0051] (8)

[0052] Step 1.3.5: Use Equation (9) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Channel gain between :

[0053] (9)

[0054] Step 1.3.6: Use Equation (10) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Uplink transmission speed between :

[0055] (10)

[0056] In formula (10), represents the average bandwidth allocated to the i-th mobile device, is the transmit power of the ith mobile device, is the Gaussian white noise power;

[0057] Step 1.3.7: Use equation (11) to calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay :

[0058] (11).

[0059] Furthermore, the step 1.4 includes:

[0060] Step 1.4.1: Use Equation (12) to calculate the jth distributed UAV in the tth time slot With flying drone Channel gain between :

[0061] (12)

[0062] In formula (12), is the jth distributed UAV in the tth time slot With flying drone The path loss between = + ,in, Line-of-sight link The additional attenuation coefficient, represents the jth distributed UAV in the tth time slot With flying drone The free space path loss between them is calculated and obtained from equation (13):

[0063] (13)

[0064] In formula (13), is the carrier frequency, is the speed of light, is the jth distributed UAV in the tth time slot and flying drones The Euclidean distance between them is obtained by formula (14):

[0065] (14)

[0066] Step 1.4.2: Use Equation (15) to calculate the jth distributed UAV in the tth time slot and flying drones Uplink transmission speed between :

[0067] (15)

[0068] In formula (15), represents the average distribution to the jth distributed UAV bandwidth, is the jth distributed drone The transmission power;

[0069] Step 1.4.3: Define the number of The dispatch decision for mobile devices is ,in, Indicates the Mobile device tasks Assign to distributed drones for execution; Indicates that Assigned to flying drones implement; Indicates that the Mobile device tasks Assigned to flying drones ;in, represents the optimal allocation ratio allocated in the t-th time slot;

[0070] Step 1.4.4: When When , use formula (16) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0071] (16)

[0072] In formula (16), is the jth distributed UAV in the tth time slot The computing resources allocated to the i-th mobile device are obtained by formula (17):

[0073] (17)

[0074] In formula (17), is the jth distributed drone Maximum available computing resources, Indicates unloading to the jth distributed drone The set of tasks on Indicates processing of the jth distributed drone On the Mobile device tasks The number of CPU cycles required;

[0075] when When , use formula (18) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0076] (18)

[0077] In formula (18), is the number of drones flying in the tth time slot Assigned to the jth distributed UAV computing resources;

[0078] when When , use formula (19) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0079] + (19).

[0080] Furthermore, the step 1.6 includes:

[0081] Step 1.6.1: Use Equation (21) to calculate the jth distributed UAV in the tth time slot Total energy consumption :

[0082] (twenty one)

[0083] In formula (21), represents the jth distributed UAV in the tth time slot Process the i-th mobile device task The computing energy consumption, represents the jth distributed UAV in the tth time slot The task of the i-th mobile device Assigned to flying drones The transmission energy consumption, represents the jth distributed UAV in the tth time slot The hovering energy consumption is calculated and obtained from equations (22a) to (22c):

[0084] (22a)

[0085] (22b)

[0086] (22c)

[0087] In formula (22a)-formula (22c), is the correlation coefficient with the CPU chip in the distributed drone, is the thrust proportional to the mass of the drone, is the jth distributed drone Power efficiency, is the number of rotors per distributed UAV, is the diameter of the rotor, is the air density, is the jth distributed drone The hovering time is calculated by formula (23):

[0088] (twenty three)

[0089] In formula (23), Indicates the first time slot in the tth time slot Mobile device tasks Latency calculated at the edge;

[0090] Step 1.6.2: Use Equation (24) to calculate the number of drones flying in the tth time slot Total energy consumption :

[0091] (twenty four)

[0092] In formula (24), Indicates the number of drones flying in the tth time slot A collection of tasks to be processed; represents the jth distributed UAV in the tth time slot The first Mobile device tasks Dispatched to flying drones The computational energy consumption of processing, Indicates the number of drones flying in the tth time slot The flight energy consumption is calculated by formula (25):

[0093] (25)

[0094] In formula (25), It's a flying drone quality, It's a flying drone Flight time, is the number of drones flying in the tth time slot flight speed.

[0095] Furthermore, the step three includes:

[0096] Step 3.1: Initialize i=1, the current number of iterations is ,initialization =1;

[0097] Step 3.2: For the tth time slot The uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, recorded as , and initialize =0;

[0098] Step 3.3: Use formula (29) to get the The uninstall decision of the i-th mobile device in the iteration Associated Q value :

[0099] (29)

[0100] In formula (29), Indicates the number of the tth time slot The i-th mobile device completes the task in the iteration The total delay of Indicates the first time slot in the tth time slot The learning rate of the i-th mobile device in the iteration is obtained by formula (30):

[0101] (30)

[0102] In formula (30), represents the feasible offloading decision space of the i-th mobile device; is a lower learning rate, is a higher learning rate, and < , Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The probability that =1, let =1 / (m+1), Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The average probability of =1, let =1 / (m+1);

[0103] Step 3.4: Use equations (31a), (31b) and (32) to get the The i-th mobile device executes the uninstallation strategy in the iteration Probability and the tth time slot The i-th mobile device executes the uninstallation strategy in the +1 iteration The average probability of :

[0104] (31a)

[0105] (31b)

[0106] (32)

[0107] In formula (31a), formula (31b) and formula (32), It means that the i-th mobile device in the t-th time slot is Make uninstallation decisions before iterations the number of times; Indicates the first time slot in the tth time slot The uninstall decision of the i-th mobile device in the iteration The strategy adjustment parameters, represents the feasible offloading decision space of the i-th mobile device except An uninstall decision other than Indicates the first time slot in the tth time slot Another uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, Indicates the first time slot in the tth time slot In the next iteration, the i-th mobile device executes another uninstallation strategy probability;

[0108] Step 3.5: According to Get the first time slot in the tth time slot Uninstallation decision of the i-th mobile device in +1 iteration , and assign i+1 to i, then return to step 3.2 and execute sequentially until i>n; thus, the number of all mobile users in the tth time slot is obtained. +1 Uninstallation Decision ,judge and Are they equal? ​​If they are equal, it means As the offloading decision of all mobile devices in the tth time slot (t .

[0109] Furthermore, the step 4 includes:

[0110] Step 4.1: Calculate the optimal allocation ratio for the t-th time slot using equation (33) :

[0111] (33)

[0112] Step 4.2: Based on the optimal allocation ratio allocated in the tth time slot , get the dispatch decision of the i-th mobile device in the t-th time slot ;

[0113] Step 4.3: Initialize i=1 and randomly initialize the dispatching decisions of all mobile devices , and record the current dispatch decision as the optimal dispatch decision for the i-th mobile device in the t-th time slot ;

[0114] Step 4.4: Offloading decision at fixed time slot t Under the premise of , the dispatch decision of all mobile devices in the t-th time slot is calculated by formula (27): The corresponding cost function value is , and record it as the optimal cost ;

[0115] Step 4.5: Change the dispatch decision of the i-th mobile device in the t-th time slot when the dispatch decisions of other mobile devices in the t-th time slot do not change , get the changed dispatch strategy of the i-th mobile device in the t-th time slot , and calculate the corresponding cost function value ;

[0116] Step 4.6: If < , then the dispatch decision after the change of the i-th mobile device Assign to the optimal dispatch decision Otherwise, the optimal dispatch decision remain unchanged;

[0117] Step 4.7: After assigning i+1 to i, return to step 4.5 until i>n; thus, the optimal dispatch decision for all mobile devices in the tth time slot is obtained. And assign it to .

[0118] The electronic device of the present invention includes a memory and a processor, and is characterized in that the memory is used to store a program that supports the processor to execute the drone trajectory planning and task offloading decision method, and the processor is configured to execute the program stored in the memory.

[0119] The present invention provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, which is characterized in that when the computer program is run by a processor, the steps of the drone trajectory planning and task offloading decision-making method are executed.

[0120] Compared with the prior art, the present invention has the following beneficial effects:

[0121] 1. This paper proposes a two-layer, drone-assisted MEC network architecture. Specifically, users can select appropriate distributed drones for computation offload based on the current offload situation. The distributed drones make task assignment decisions based on the positions of flying drones in each time slot. Through resource sharing and collaboration between the upper and lower layers of drones, wireless network performance in MEC scenarios is optimized, providing efficient computing capabilities with limited resources.

[0122] 2. This paper investigates the joint offloading decision-making, task assignment, and UAV trajectory planning issues in UAV-assisted MEC collaboration. First, under the assumption of fixed trajectory motion, Wolf-PHC and game theory-based methods are employed to obtain optimal offloading and task assignment strategies. Second, based on these optimal offloading and task assignment strategies, the DDPG algorithm is employed, allowing the flying UAV to act as an agent. Through coordination and cooperation between UAVs, trajectory optimization is achieved, thereby reducing overall task completion latency and improving user service quality.

[0123] 3. The present invention designs a dynamic real-time communication and data transmission scenario, taking into account the real-time tasks and certain mobility of mobile devices, which is closer to reality and improves the practicality of the solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] Figure 1 is a scene graph of the present invention;

[0125] Figure 2 is a flow chart of the method of the present invention;

[0126] Figure 3a This is a result diagram of the mobile device of the present invention in a random distribution scenario;

[0127] Figure 3b This is the result diagram under the skewed distribution scenario of the present invention;

[0128] Figure 3c This is the result diagram of the centralized distribution scenario of the present invention;

[0129] Figure 3d This is a result diagram of the dispersed distribution scenario of the present invention. DETAILED DESCRIPTION

[0130] In this embodiment, in order to solve the problem of limited computing resources and long task execution time in scenarios where both mobile devices and drones have limited power, a joint optimization-based drone trajectory planning and task offloading decision method is proposed. The method helps ground mobile devices perform task calculations through collaboration between two layers of drones. Once the computing resources of the distributed drones are insufficient, the computing tasks offloaded to the mobile devices will be assigned to flying drones with more powerful computing capabilities for execution. The scenario is shown in the figure below. Figure 1 Specifically, the method is applied to a In the square ground area V, a vertex of the square ground area V is set as the origin o, the two sides connected to the origin o are set as the X-axis and Y-axis respectively, and the vertical line perpendicular to the XY plane and passing through the origin o is set as the Z-axis, thereby establishing a three-dimensional coordinate system;

[0131] Deploy a distributed drone set U in a square ground area V = { , ,..., ,..., } and a flying drone To assist n mobile devices on the ground in a time slot set consisting of T time slots In the process of completing its own computing tasks, represents the jth distributed UAV; [1, m]; m represents the total number of distributed drones; the jth distributed drone The position of ;in, Represents the jth distributed UAV The coordinates projected onto the ground, Indicates the height of each distributed drone's hovering position; The position in the tth time slot is recorded as , Indicates flying drone The coordinates projected onto the ground in the tth time slot, Indicates flying drone The flight altitude will fly the drone The flight angle in the tth time slot is recorded as , the flight distance is recorded as ; Represents the flying drones in each time slot Maximum flight distance;

[0132] The position of n mobile devices in the tth time slot is recorded as ,in, Denote the X-axis coordinate and Y-axis coordinate of the t-th time slot of the i-th mobile device, and record the task set of the t-th time slot on n mobile devices as ={ , ,..., ,..., },in, represents the task of the i-th mobile device in time slot t; if the task is executed on the mobile device, it is recorded as local computing, and if the task is executed on the drone side, it is recorded as edge computing; [1,n];

[0133] Let the i-th task in the t-th time slot be The attribute is recorded as = ,in, represents the data volume of the i-th mobile device in the t-th time slot; Representation processing The number of CPU cycles required.

[0134] In specific implementation, the UAV trajectory planning and task offloading decision-making method based on joint optimization is carried out in the following steps:

[0135] Step 1: Based on the mobile device's mission and the drone's location, build a drone trajectory planning and task offloading decision model:

[0136] Step 1.1: Use Equation (1) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated locally :

[0137] (1)

[0138] In formula (1), It is represented as the computing power of the i-th mobile device;

[0139] Step 1.2: Use Equation (2) to calculate the task of the i-th mobile device in the t-th time slot Energy consumption calculated locally :

[0140] (2)

[0141] In formula (2), It is the correlation coefficient with the CPU chip performance of the mobile device.

[0142] Step 1.3: Calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay ;

[0143] Step 1.3.1: Use formula (3) to calculate the Mobile devices and distributed drones The probability of line-of-sight connection between :

[0144] (3)

[0145] In formula (3), C and D are two constants related to the propagation environment type. is the distance between the i-th mobile device and the j-th distributed drone in the t-th time slot The Euclidean distance of is obtained by formula (4):

[0146] (4)

[0147] Step 1.3.2: Use equation (5) to calculate the mobile devices and the jth distributed drone The probability of non-line-of-sight connection :

[0148] (5)

[0149] Step 1.3.3: Use equations (6) and (7) to calculate the mobile devices and the jth distributed drone Line-of-sight links loss and non-line-of-sight links loss :

[0150] (6)

[0151] (7)

[0152] In formula (6) and formula (7), is the path loss exponent, and , represents the carrier frequency, is the speed of light, and Line-of-sight link and non-line-of-sight links The average additional loss.

[0153] Step 1.3.4: Use Equation (8) to calculate the distance between the i-th mobile device and the j-th distributed drone in the t-th time slot The path loss between :

[0154] (8)

[0155] Step 1.3.5: Use Equation (9) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Channel gain between :

[0156] (9)

[0157] Step 1.3.6: Use Equation (10) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Uplink transmission speed between :

[0158] (10)

[0159] In formula (10), represents the average bandwidth allocated to the i-th mobile device, is the transmit power of the ith mobile device, is the Gaussian white noise power.

[0160] Step 1.3.7: Use equation (11) to calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay :

[0161] (11)

[0162] Step 1.4: Calculate the tasks of the i-th mobile device under different dispatch decisions On the jth distributed UAV Dispatch processing latency on .

[0163] Step 1.4.1: Use Equation (12) to calculate the jth distributed UAV in the tth time slot With flying drone Channel gain between :

[0164] (12)

[0165] In formula (12), is the jth distributed UAV in the tth time slot With flying drone The path loss between = + ,in, Line-of-sight link The additional attenuation coefficient, represents the jth distributed UAV in the tth time slot With flying drone The free space path loss between them is calculated and obtained from equation (13):

[0166] (13)

[0167] In formula (13), is the carrier frequency, is the speed of light, is the jth distributed UAV in the tth time slot and flying drones The Euclidean distance between them is obtained by formula (14):

[0168] (14)

[0169] Step 1.4.2: Use Equation (15) to calculate the jth distributed UAV in the tth time slot and flying drones Uplink transmission speed between :

[0170] (15)

[0171] In formula (15), represents the average distribution to the jth distributed UAV bandwidth, is the jth distributed drone The transmission power.

[0172] Step 1.4.3: Define the number of The dispatch decision for mobile devices is ,in, Indicates the Mobile device tasks Assign to distributed drones for execution; Indicates that Assigned to flying drones implement; Indicates that the Mobile device tasks Assigned to flying drones ;in, represents the optimal allocation ratio allocated in the tth time slot.

[0173] Step 1.4.4: When When , use formula (16) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0174] (16)

[0175] In formula (16), is the jth distributed UAV in the tth time slot The computing resources allocated to the i-th mobile device are obtained by formula (17):

[0176] (17)

[0177] In formula (17), is the jth distributed drone Maximum available computing resources, Indicates unloading to the jth distributed drone The set of tasks on Indicates processing of the jth distributed drone On the Mobile device tasks The number of CPU cycles required.

[0178] when When , use formula (18) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0179] (18)

[0180] In formula (18), is the number of drones flying in the tth time slot Assigned to the jth distributed UAV computing resources;

[0181] when When , use formula (19) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ;

[0182] + (19)

[0183] Step 1.5: Use Equation (20) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated at the edge ;

[0184] = + (20)

[0185] Step 1.6: Calculate the jth distributed UAV in the tth time slot in edge computing Total energy consumption and flying drones Total energy consumption :

[0186] Step 1.6.1: Use Equation (21) to calculate the jth distributed UAV in the tth time slot Total energy consumption :

[0187] (twenty one)

[0188] In formula (21), represents the jth distributed UAV in the tth time slot Process the i-th mobile device task The computing energy consumption, represents the jth distributed UAV in the tth time slot The task of the i-th mobile device Assigned to flying drones The transmission energy consumption, represents the jth distributed UAV in the tth time slot The hovering energy consumption is calculated and obtained from equations (22a) to (22c):

[0189] (22a)

[0190] (22b)

[0191] (22c)

[0192] In formula (22a)-formula (22c), is the correlation coefficient with the CPU chip in the distributed drone, is the thrust proportional to the mass of the drone, is the jth distributed drone Power efficiency, is the number of rotors per distributed UAV, is the diameter of the rotor, is the air density, is the jth distributed drone The hovering time is calculated by formula (23):

[0193] (twenty three)

[0194] In formula (23), Indicates the first time slot in the tth time slot Mobile device tasks Latency calculated at the edge.

[0195] Step 1.6.2: Use Equation (24) to calculate the number of drones flying in the tth time slot Total energy consumption :

[0196] (twenty four)

[0197] In formula (24), Indicates the number of drones flying in the tth time slot A collection of tasks to be processed; represents the jth distributed UAV in the tth time slot The first Mobile device tasks Dispatched to flying drones The computational energy consumption of processing, Indicates the number of drones flying in the tth time slot The flight energy consumption is calculated by formula (25):

[0198] (25)

[0199] In formula (25), It's a flying drone quality, It's a flying drone Flight time, is the number of drones flying in the tth time slot flight speed.

[0200] Step 1.7: Use Equation (26) to define the objective function W of the UAV trajectory planning and task offloading decision model: (26)

[0201] In formula (36), T represents the total number of time slots, Task offloading decisions for all mobile users, Task assignment decisions for mobile users, is the trajectory of the flying drone, Indicates the completion of the task of the i-th mobile device in the t-th time slot The time delay of , and obtained by formula (27):

[0202] (27)

[0203] In formula (27), is the uninstall decision of the i-th mobile device, when =0 indicates the task of the i-th mobile device When executed locally, =j represents the task of the i-th mobile device Unload to the jth distributed drone Execute on; is the indicator function.

[0204] Step 1.8: Use Equations (28a) to (28e) to construct the constraints for the UAV trajectory planning and task offloading decision model:

[0205] (28a)

[0206] (28b)

[0207] (28c)

[0208] (28d)

[0209] In formula (28a) to formula (28e), represents the maximum energy of the i-th mobile device, represents the jth distributed UAV The maximum energy, Indicates flying drone Constraint (28a) ensures that the energy consumption of each mobile device is less than its maximum power; constraint (28b) ensures that the energy consumption of each distributed drone is less than its maximum power; constraint (28c) ensures that the energy consumption of the flying drone is less than its maximum power; constraint (28d) ensures that the flight distance of the flying drone in each time slot is less than its maximum allowed flight distance.

[0210] Step 2: Define and initialize various parameters, including: the locations of n mobile devices, the task list, the locations of m distributed drones, and the starting position of the flying drone;

[0211] Step 3: Use the Wolf-PHC-based task offloading algorithm to generate the offloading strategy for all mobile devices in the tth time slot (t);

[0212] Step 3.1: Initialize i=1, the current number of iterations is ,initialization =1;

[0213] Step 3.2: For the tth time slot The uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, recorded as , and initialize =0.

[0214] Step 3.3: Use formula (29) to get the The uninstall decision of the i-th mobile device in the iteration Associated Q value :

[0215] (29)

[0216] In formula (29), Indicates the number of the tth time slot The i-th mobile device completes the task in the iteration The total delay of Indicates the first time slot in the tth time slot The learning rate of the i-th mobile device in the iteration is obtained by formula (30):

[0217] (30)

[0218] In formula (30), represents the feasible offloading decision space of the i-th mobile device; is a lower learning rate, is a higher learning rate, and < , Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The probability that =1, let =1 / (m+1), Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The average probability of =1, let =1 / (m+1).

[0219] Step 3.4: Use equations (31a), (31b) and (32) to get the The i-th mobile device executes the uninstallation strategy in the iteration Probability and the tth time slot The i-th mobile device executes the uninstallation strategy in the +1 iteration The average probability of :

[0220] (31a)

[0221] (31b)

[0222] (32)

[0223] In formula (31a), formula (31b) and formula (32), It means that the i-th mobile device in the t-th time slot is Make uninstallation decisions before iterations the number of times; Indicates the first time slot in the tth time slot The uninstall decision of the i-th mobile device in the iteration The strategy adjustment parameters, represents the feasible offloading decision space of the i-th mobile device except An uninstall decision other than Indicates the first time slot in the tth time slot Another uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, Indicates the first time slot in the tth time slot In the next iteration, the i-th mobile device executes another uninstallation strategy probability.

[0224] Step 3.5: According to Get the first Uninstallation decision of the i-th mobile device in +1 iteration , and assign i+1 to i, then return to step 3.2 and execute sequentially until i>n; thus, the number of all mobile users in the tth time slot is obtained. +1 Uninstallation Decision ,judge and Are they equal? ​​If they are equal, it means As the offloading decision of all mobile devices in the tth time slot (t .

[0225] Step 4: According to the offloading strategy of all mobile devices in the tth time slot (t), and the number of drones flying in the tth time slot Location , and thus use the dispatching algorithm based on game theory to obtain the dispatching strategy of mobile devices in the tth time slot ;

[0226] Step 4.1: In the tth time slot, due to the offloading decision (t) has been determined, the completion delay of the local computing task is known, and the offloading transmission delay of the edge computing task is also known. Therefore, it is only necessary to minimize the dispatch processing delay of the i-th mobile device. However, for the three dispatch cases, the dispatch ratio in the partial dispatch is is an indeterminate number between (0,1), which makes it difficult to calculate the scheduling processing delay in this case. In this case, The size depends on In addition, the amount of tasks that a single user needs to calculate and offload in time slot t is certain. When the amount of tasks remains unchanged, the amount of tasks offloaded to distributed drones and flying drones is inversely proportional, corresponding to and is also inversely proportional. According to the characteristics of increasing and decreasing functions in mathematics, Only when Therefore, we can first deduce the optimal allocation ratio for the tth time slot. , can be calculated using formula (33):

[0227] (33)

[0228] Step 4.2: Based on the optimal allocation ratio allocated in the tth time slot , get the dispatch decision of the i-th mobile device in the t-th time slot .

[0229] Step 4.3: Initialize i=1 and randomly initialize the dispatching decisions of all mobile devices , and record the current dispatch decision as the optimal dispatch decision for the i-th mobile device in the t-th time slot ;

[0230] Step 4.4: Offloading decision at fixed time slot t Under the premise of , the dispatch decision of all mobile devices in the t-th time slot is calculated by formula (27): The corresponding cost function value is , and record it as the optimal cost ;

[0231] Step 4.5: Change the dispatch decision of the i-th mobile device in the t-th time slot when the dispatch decisions of other mobile devices in the t-th time slot do not change , get the changed dispatch strategy of the i-th mobile device in the t-th time slot , and calculate the corresponding cost function value .

[0232] Step 4.6: If < , then the dispatch decision after the change of the i-th mobile device Assign to the optimal dispatch decision Otherwise, the optimal dispatch decision remain unchanged;

[0233] Step 4.7: After assigning i+1 to i, return to step 4.5 until i>n; thus, the optimal dispatch decision for all mobile devices in the tth time slot is obtained. And assign it to .

[0234] Step 5: Based on the state of the tth time slot , and use the DDPG algorithm to get the flying drone Action at time slot t and the position of the flying drone in the t+1th time slot ,in They represent the remaining power of the i-th mobile device in the t-th time slot, the j-th distributed drone Remaining battery and flying drone remaining power.

[0235] like Figure 2 As shown, step five includes the following steps:

[0236] Step 5.1: Initialize the current network parameters of Actor and Critic , and the parameters of the target network , ;

[0237] Step 5.2: According to the state of the tth time slot and a deterministic policy function Select Action ,in, is to add random noise to each output action;

[0238] Step 5.3: Calculate the reward for the tth time slot And the state of the t+1th time slot ,in, is the drone flying in the tth time slot The penalty constant generated when flying out of the target area, is the drone flying in the tth time slot Battery capacity loss penalty coefficient; represents the remaining power of the i-th mobile device in the t+1-th time slot; represents the jth distributed UAV in the t+1th time slot Remaining power; Indicates the number of drones flying in the t+1th time slot Remaining power; represents the position of the i-th mobile device in the t+1-th time slot, represents the task of the i-th mobile device in the t+1-th time slot The amount of data, Indicates processing the i-th mobile device task in the t+1-th time slot The number of CPU cycles.

[0239] Step 5.4: In order to solve the problem of sample relevance and stability, the DDPG algorithm also introduces an experience replay mechanism to replay the experience gained by the flying drone interacting with the environment. Stored in the experience replay buffer Then randomly select The current network of Critic can be trained based on the current record and deterministic strategy function calculate The value can be calculated using formula (34):

[0240] (34)

[0241] In formula (34), is the value function in the tth time slot, represents the Bellman equation, Indicates the current state of the Critic's network Execute action when The reward function, represents the depreciation rate, Indicates that the current network of Critic in the t+1th time slot is in state Execute the deterministic policy function The value function of .

[0242] Step 5.5: Next, the Actor target network will get the next state through approximate estimation Corresponding action value The target network of Critic can approximate the state-action of the next moment. The value can be calculated using formula (35):

[0243] (35)

[0244] In formula (35), is the current state in the tth time slot The target value of the value function, is the reward in the t-th time slot, Indicates that the target network of the Critic in the t+1th time slot is parameter and status Execute a deterministic strategy The obtained value function.

[0245] Step 5.6: In order to stabilize the learning process and speed up the convergence, combine the Actor target network and the Critic target network. After that, the Critic's target network will transmit it to the Critic's current network to minimize its loss function , can be calculated using formula (36):

[0246] (36)

[0247] In formula (36), is the number of samples drawn, Indicates that the current network of the Critic in the tth time slot is and the status is Execute action when The value function of .

[0248] Step 5.7: After updating the parameters of the Critic current network After that, use the gradient strategy to update the strategy parameters of the Actor's current network , can be calculated using formula (37):

[0249] (37)

[0250] In formula (37), To find the sign of the partial derivative, is the loss function, Represents the loss function right Find partial derivatives; Representation value function right Find the partial derivative, and , so we can apply the chain rule to continue to solve Find the partial derivative and record it as .

[0251] Step 5.8: Use the soft update method to update the parameters of the two target networks, which can be calculated using equations (38) and (39):

[0252] (38)

[0253] (39)

[0254] In formulas (38) and (39), Soft update parameters.

[0255] Step 6: Judgment Whether it is achieved If so, the coordinates of all time slots constitute the flying drone Trajectory Otherwise, return to step 3 to continue.

[0256] The effectiveness of this method is tested through different distribution scenarios. Figure 3a 、 Figure 3b 、 Figure 3c and Figure 3d The flight trajectory of the UAV in four different distribution scenarios of mobile devices: random distribution, skewed distribution, concentrated distribution, and dispersed distribution. The MD trajectory represents the movement trajectory of the mobile device and is displayed with a black line. The D-UAV location represents the hovering position of the distributed UAV and is marked with a red five-pointed star. The F-UAV start location represents the initial position of the UAV and is marked with a blue five-pointed star. The F-UAV trajectory represents the flight trajectory of the UAV and is displayed with a green line. Figure 3a-3d In the figure, we can see that the flight trajectory of the flying drone is mainly concentrated between the distributed drones. This is because the mobile device offloads tasks to the distributed drones in the first layer, so in the second layer, only the communication between the flying drone and the distributed drones needs to be maintained, which greatly reduces the flight energy consumption of the flying drone.

[0257] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0258] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.

Claims

1. A UAV trajectory planning and task offloading decision method based on joint optimization, characterized in that: is applied to a In a square ground area V, a vertex of the square ground area V is set as the origin o, the two sides connected to the origin o are set as the X axis and the Y axis respectively, and the vertical line perpendicular to the XY plane and passing through the origin o is set as the Z axis, thereby establishing a three-dimensional coordinate system; in the square ground area V, a distributed drone set U={ , ,..., ,..., } and a flying drone To assist n mobile devices on the ground in a time slot set consisting of T time slots In the process of completing its own computing tasks, represents the jth distributed UAV; [1, m]; m represents the total number of distributed drones; the jth distributed drone The position of ;in, Represents the jth distributed UAV The coordinates projected onto the ground, Indicates the height of each distributed drone's hovering position; The position in the tth time slot is recorded as , Indicates flying drone The coordinates projected onto the ground in the tth time slot, Indicates flying drone The flight altitude will fly the drone The flight angle in the tth time slot is recorded as , the flight distance is recorded as ; Represents the flying drones in each time slot Maximum flight distance; The position of n mobile devices in the tth time slot is recorded as ,in, Denote the X-axis coordinate and Y-axis coordinate of the t-th time slot of the i-th mobile device, and record the task set of the t-th time slot on n mobile devices as ={ , ,..., ,..., },in, represents the task of the i-th mobile device in time slot t; if the task is executed on the mobile device, it is recorded as local computing, and if the task is executed on the drone side, it is recorded as edge computing; [1,n]; Let the i-th task in the t-th time slot be The attribute is recorded as = ,in, represents the data volume of the i-th mobile device in the t-th time slot; Representation processing The number of CPU cycles required; The UAV trajectory planning and task offloading decision-making method based on joint optimization is carried out in the following steps: Step 1: Based on the mobile device's mission and the drone's location, build a drone trajectory planning and task offloading decision model: Step 1.1: Use Equation (1) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated locally : (1) In formula (1), It is represented as the computing power of the i-th mobile device; Step 1.2: Use Equation (2) to calculate the task of the i-th mobile device in the t-th time slot Energy consumption calculated locally : (2) In formula (2), It is the correlation coefficient with the CPU chip performance of the mobile device; Step 1.3: Calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay ; Step 1.4: Calculate the tasks of the i-th mobile device under different dispatch decisions On the jth distributed UAV Dispatch processing latency on ; Step 1.5: Use Equation (20) to calculate the task of the i-th mobile device in the t-th time slot Latency calculated at the edge ; = + (20) Step 1.6: Calculate the jth distributed UAV in the tth time slot in edge computing Total energy consumption and flying drones Total energy consumption ; Step 1.7: Use Equation (26) to define the objective function W of the UAV trajectory planning and task offloading decision model: (26) In formula (36), T represents the total number of time slots, Task offloading decisions for all mobile users, Task assignment decisions for mobile users, is the trajectory of the flying drone, Indicates the completion of the task of the i-th mobile device in the t-th time slot The time delay of , and obtained by formula (27): (27) In formula (27), is the uninstall decision of the i-th mobile device, when =0 indicates the task of the i-th mobile device When executed locally, =j represents the task of the i-th mobile device Unload to the jth distributed UAV Execute on; is the indicator function; Step 1.8: Use Equations (28a)-(28d) to construct the constraints for the UAV trajectory planning and task offloading decision model: (28a) (28b) (28c) (28d) In formula (28a) to formula (28d), represents the maximum energy of the i-th mobile device, represents the jth distributed UAV The maximum energy, Indicates flying drone Maximum energy; Step 2: Define and initialize various parameters, including: the locations of n mobile devices, the task list, the locations of m distributed drones, and the starting position of the flying drone; Step 3: Use the Wolf-PHC-based task offloading algorithm to generate the offloading strategy for all mobile devices in the tth time slot (t); Step 4: According to the offloading strategy of all mobile devices in the tth time slot (t), and the number of drones flying in the tth time slot Location , and thus use the dispatching algorithm based on game theory to obtain the dispatching strategy of mobile devices in the tth time slot ; Step 5: Based on the state of the tth time slot , and use the DDPG algorithm to get the flying drone Action at time slot t ,in They represent the remaining power of the i-th mobile device in the t-th time slot, the j-th distributed drone Remaining battery and flying drone Remaining power; Step 6: Calculate the reward for the tth time slot And the state of the t+1th time slot ,in, is the drone flying in the tth time slot The penalty constant generated when flying out of the target area, is the drone flying in the tth time slot Battery capacity loss penalty coefficient; represents the remaining power of the i-th mobile device in the t+1-th time slot; represents the jth distributed UAV in the t+1th time slot Remaining power; Indicates the number of drones flying in the t+1th time slot Remaining power; represents the position of the i-th mobile device in the t+1-th time slot, represents the task of the i-th mobile device in the t+1-th time slot The amount of data, Indicates processing the i-th mobile device task in the t+1-th time slot The number of CPU cycles; Step 7: Judgment Whether it is achieved If so, the coordinates of all time slots constitute the flying drone Trajectory Otherwise, return to step 3 to continue.

2. The UAV trajectory planning and task offloading decision method based on joint optimization according to claim 1 is characterized in that: The step 1.3 includes: Step 1.3.1: Use formula (3) to calculate the Mobile devices and distributed drones The probability of line-of-sight connection between : (3) In formula (3), C and D are two constants related to the propagation environment type. is the distance between the i-th mobile device and the j-th distributed drone in the t-th time slot The Euclidean distance of is obtained by formula (4): (4) Step 1.3.2: Use equation (5) to calculate the mobile devices and the jth distributed drone The probability of non-line-of-sight connection : (5) Step 1.3.3: Use equations (6) and (7) to calculate the mobile devices and the jth distributed drone Line-of-sight links loss and non-line-of-sight links loss : (6) (7) In formula (6) and formula (7), is the path loss exponent, and , represents the carrier frequency, is the speed of light, and Line-of-sight link and non-line-of-sight links The average additional loss of Step 1.3.4: Use Equation (8) to calculate the distance between the i-th mobile device and the j-th distributed drone in the t-th time slot The path loss between : (8) Step 1.3.5: Use Equation (9) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Channel gain between : (9) Step 1.3.6: Use Equation (10) to calculate the distance between the i-th mobile device and the j-th distributed UAV in the t-th time slot Uplink transmission speed between : (10) In formula (10), represents the average bandwidth allocated to the i-th mobile device, is the transmit power of the ith mobile device, is the Gaussian white noise power; Step 1.3.7: Use equation (11) to calculate the Mobile device tasks Unloading from the ground to distributed drones Transmission delay : (11)。 3. The UAV trajectory planning and task offloading decision method based on joint optimization according to claim 2 is characterized in that: The step 1.4 includes: Step 1.4.1: Use Equation (12) to calculate the jth distributed UAV in the tth time slot With flying drone Channel gain between : (12) In formula (12), is the jth distributed UAV in the tth time slot With flying drone The path loss between = + ,in, Line-of-sight link The additional attenuation coefficient, represents the jth distributed UAV in the tth time slot With flying drone The free space path loss between them is calculated and obtained from equation (13): (13) In formula (13), is the carrier frequency, is the speed of light, is the jth distributed UAV in the tth time slot and flying drones The Euclidean distance between them is obtained by formula (14): (14) Step 1.4.2: Use Equation (15) to calculate the jth distributed UAV in the tth time slot and flying drones Uplink transmission speed between : (15) In formula (15), represents the average distribution to the jth distributed UAV bandwidth, is the jth distributed drone The transmission power; Step 1.4.3: Define the number of The dispatch decision for mobile devices is ,in, Indicates the Mobile device tasks Assign to distributed drones for execution; Indicates that Assigned to flying drones implement; Indicates that the Mobile device tasks Assigned to flying drones ;in, represents the optimal allocation ratio allocated in the t-th time slot; Step 1.4.4: When When , use formula (16) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ; (16) In formula (16), is the jth distributed UAV in the tth time slot The computing resources allocated to the i-th mobile device are obtained by formula (17): (17) In formula (17), is the jth distributed drone Maximum available computing resources, Indicates unloading to the jth distributed drone The set of tasks on Indicates processing of the jth distributed drone On the Mobile device tasks The number of CPU cycles required; when When , use formula (18) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ; (18) In formula (18), is the number of drones flying in the tth time slot Assigned to the jth distributed UAV computing resources; when When , use formula (19) to calculate the task of the i-th mobile device in the t-th time slot On the jth distributed UAV Dispatch processing latency on ; + (19)。 4. The UAV trajectory planning and task offloading decision method based on joint optimization according to claim 3 is characterized in that: The step 1.6 includes: Step 1.6.1: Use Equation (21) to calculate the jth distributed UAV in the tth time slot Total energy consumption : (21) In formula (21), represents the jth distributed UAV in the tth time slot Process the i-th mobile device task The computing energy consumption, represents the jth distributed UAV in the tth time slot The task of the i-th mobile device Assigned to flying drones The transmission energy consumption, represents the jth distributed UAV in the tth time slot The hovering energy consumption is calculated and obtained from equations (22a) to (22c): (22a) (22b) (22c) In formula (22a)-formula (22c), is the correlation coefficient with the CPU chip in the distributed drone, is the thrust proportional to the mass of the drone, is the jth distributed drone Power efficiency, is the number of rotors per distributed UAV, is the diameter of the rotor, is the air density, is the jth distributed drone The hovering time is calculated by formula (23): (23) In formula (23), Indicates the first time slot in the tth time slot Mobile device tasks Latency calculated at the edge; Step 1.6.2: Use Equation (24) to calculate the number of drones flying in the tth time slot Total energy consumption : (24) In formula (24), Indicates the number of drones flying in the tth time slot A collection of tasks to be processed; represents the jth distributed UAV in the tth time slot The first Mobile device tasks Dispatched to flying drones The computational energy consumption of processing, Indicates the number of drones flying in the tth time slot The flight energy consumption is calculated by formula (25): (25) In formula (25), It's a flying drone quality, It's a flying drone Flight time, is the number of drones flying in the tth time slot flight speed.

5. The UAV trajectory planning and task offloading decision method based on joint optimization according to claim 4 is characterized in that: The step three includes: Step 3.1: Initialize i=1, the current number of iterations is ,initialization =1; Step 3.2: For the tth time slot The uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, recorded as , and initialize =0; Step 3.3: Use formula (29) to get the The uninstall decision of the i-th mobile device in the iteration Associated Q value : (29) In formula (29), Indicates the number of the tth time slot The i-th mobile device completes the task in the iteration The total delay of Indicates the first time slot in the tth time slot The learning rate of the i-th mobile device in the iteration is obtained by formula (30): (30) In formula (30), represents the feasible offloading decision space of the i-th mobile device; is a lower learning rate, is a higher learning rate, and < , Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The probability that =1, let =1 / (m+1), Indicates the first time slot in the tth time slot The i-th mobile device executes the uninstallation strategy in the iteration The average probability of =1, let =1 / (m+1); Step 3.4: Use equations (31a), (31b) and (32) to get the The i-th mobile device executes the uninstallation strategy in the iteration Probability and the tth time slot The i-th mobile device executes the uninstallation strategy in the +1 iteration The average probability of : (31a) (31b) (32) In formula (31a), formula (31b) and formula (32), It means that the i-th mobile device in the t-th time slot is Make uninstallation decisions before iterations the number of times; Indicates the first time slot in the tth time slot The uninstall decision of the i-th mobile device in the iteration The strategy adjustment parameters, represents the feasible offloading decision space of the i-th mobile device except An uninstall decision other than Indicates the first time slot in the tth time slot Another uninstall decision of the i-th mobile device in the iteration Associate a corresponding Q value, Indicates the first time slot in the tth time slot In the next iteration, the i-th mobile device executes another uninstallation strategy probability; Step 3.5: According to Get the first Uninstallation decision of the i-th mobile device in +1 iteration , and assign i+1 to i, then return to step 3.2 and execute sequentially until i>n; thus, the number of all mobile users in the tth time slot is obtained. +1 Uninstallation Decision ,judge and Are they equal? ​​If they are equal, it means As the offloading decision of all mobile devices in the tth time slot (t .

6. The UAV trajectory planning and task offloading decision method based on joint optimization according to claim 5 is characterized in that: The fourth step includes: Step 4.1: Calculate the optimal allocation ratio for the t-th time slot using equation (33) : (33) Step 4.2: Based on the optimal allocation ratio allocated in the tth time slot , get the dispatch decision of the i-th mobile device in the t-th time slot ; Step 4.3: Initialize i=1 and randomly initialize the dispatching decisions of all mobile devices , and record the current dispatch decision as the optimal dispatch decision for the i-th mobile device in the t-th time slot ; Step 4.4: Offloading decision at fixed time slot t Under the premise of , the dispatch decision of all mobile devices in the t-th time slot is calculated by formula (27): The corresponding cost function value is , and record it as the optimal cost ; Step 4.5: Change the dispatch decision of the i-th mobile device in the t-th time slot when the dispatch decisions of other mobile devices in the t-th time slot do not change , get the changed dispatch strategy of the i-th mobile device in the t-th time slot , and calculate the corresponding cost function value ; Step 4.6: If < , then the dispatch decision after the change of the i-th mobile device Assign to the optimal dispatch decision Otherwise, the optimal dispatch decision remain unchanged; Step 4.7: After assigning i+1 to i, return to step 4.5 until i>n; thus, the optimal dispatch decision for all mobile devices in the tth time slot is obtained. And assign it to .

7. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the UAV trajectory planning and task offloading decision method based on joint optimization as described in any one of claims 1-6, and the processor is configured to execute the program stored in the memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the UAV trajectory planning and task offloading decision method based on joint optimization according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Multi-unmanned aerial vehicle fair cooperation and task unloading optimization method and system

    CN116887355A

  • Joint optimization method for deployment and unloading strategies of MEC system assisted by multiple unmanned aerial vehicles

    CN116980852A