Unmanned aerial vehicle assisted unloading decision and resource allocation method and related system

By optimizing the task offloading decision and resource allocation of drones through genetic algorithms, the problem of minimizing the total delay in drone-assisted mobile edge computing is solved, and efficient utilization of computing resources and improvement of system efficiency are achieved.

CN119052852BActive Publication Date: 2025-10-24NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411248897.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-10-24
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

In drone-assisted mobile edge computing task offloading, how to effectively decide on task offloading strategies and resource allocation to minimize the total delay of task execution is challenging, especially in terms of computing resources and energy consumption.

Method used

A genetic algorithm is used to optimize the decision variables and resource allocation of drones. By detecting user locations, task complexity, and computing power, a fitness function is constructed. Combined with clustering and communication delay models, an offloading decision and resource allocation optimization model is established in a multi-base station, multi-drone, and multi-user scenario. The genetic algorithm is used to solve the problem to minimize the total delay.

Benefits of technology

It effectively reduces the average delay of task processing, improves system response speed and resource utilization, dynamically allocates tasks to the most suitable computing resources, and avoids resource waste and unnecessary delay increase.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052852B_ABST
    Figure CN119052852B_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned aerial vehicle auxiliary unloading decision and resource allocation method and related system, based on user location, user is clustered, and according to clustering result, the position of unmanned aerial vehicle is determined, and the midpoint of the center of user average position and base station is set as the position of relay unmanned aerial vehicle;According to user location, task complexity, task data volume, user computing capacity, communication delay is obtained;According to communication delay, the optimization model of unloading decision and resource allocation in the multi-base station multi-unmanned aerial vehicle multi-user scene is established, wherein the optimization goal is to minimize total delay;Fitness function is constructed, and the optimization model is solved using genetic algorithm, to obtain the final user decision, total delay and resource allocation matrix, and the application reduces task completion time by reasonable resource allocation and unloading decision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a method for jointly optimizing an offloading decision and resource allocation, and belongs to the technical field of communication. BACKGROUND

[0002] In a mobile edge computing (MEC) environment, a UAV (unmanned aerial vehicle) as a flexible schedulable mobile node provides a unique solution for the execution of edge computing tasks.

[0003] In UAV-assisted mobile edge computing task offloading, a user can have three ways to process resources: local execution, offloading to a UAV for execution, and offloading to a base station for execution through a UAV relay. Although a large amount of resources of the base station after the UAV relay can shorten the computing delay, the transmission cost and cost are undoubtedly greatly increased. At the same time, local computing does not need transmission, but also brings difficulties to local computing resources and energy consumption. With the change of task demand and network topology, how to effectively decide the task offloading strategy of the UAV and the resource allocation to minimize the total delay of task execution has become a key problem. SUMMARY

[0004] The application aims to effectively decide the task offloading strategy of the UAV and the resource allocation to minimize the total delay of task execution. The application provides a UAV-assisted offloading decision and resource allocation method, which aims to minimize the total delay of task execution by optimizing the decision variables and resource allocation of the UAV. Under the condition of the computing capability of the terminal and the resource limitation of the UAV, a task completion delay minimization optimization problem is established. A genetic algorithm is used to solve the problem. The computing resource limitations of the UAV and the base station are comprehensively considered to construct a fitness function for evaluating the execution effect of each decision variable and resource allocation scheme. In each generation evolution process, the genetic algorithm evaluates the quality of the candidate solution according to the fitness function, and generates a new generation of solutions by combining genetic operations such as crossover and mutation, until the optimal decision variable and resource allocation are obtained.

[0005] Technical scheme: To achieve the above object, the technical scheme adopted by the application is:

[0006] A UAV-assisted offloading decision and resource allocation method, comprising the following steps:

[0007] S1, detecting the user position, task complexity, task data volume and user computing capability.

[0008] S2, clustering the users based on the user positions, and determining the computing UAV position according to the clustering result, and setting the relay UAV position at the center of the average position of the users and the midpoint of the base station.

[0009] S3, calculate the time delay of each task in local computing, offloading to computing drone computing, offloading to base station computing through relay drone computing according to user location, task complexity, task data volume and user computing capability, and then calculate the communication time delay according to the positions of computing drone and relay drone.

[0010] S4, establish an optimization model of offloading decision and resource allocation in a multi-base station, multi-drone and multi-user scenario according to the communication time delay, wherein the optimization goal is to minimize the total time delay.

[0011] S5, construct a fitness function, and use a genetic algorithm to solve the optimization model of offloading decision and resource allocation in a multi-base station, multi-drone and multi-user scenario established in step S4 to obtain the final user decision, total time delay and resource allocation matrix, wherein the computing resources of the drone are allocated according to the size of the task offloaded to the drone.

[0012] Preferably, the optimization model of offloading decision and resource allocation in a multi-base station, multi-drone and multi-user scenario is represented as:

[0013]

[0014] wherein X represents the offloading decision of the user, which is composed of x i , and x i represents whether the task of user i is executed locally, represents whether the task of user i is offloaded to a computing drone for execution, represents whether the task of user i is offloaded to a base station through a drone for execution, represents the execution time delay of user i, represents the total time delay when user i selects to offload to a computing drone m for execution, represents the total time delay when user i selects to offload to a base station j through a relay drone R for execution, represents a set of user terminals, represents a set of computing drones, represents a set of base stations, constraint C1 represents that each user has three offloading decisions to choose from, constraint C2 represents that the user can only choose one of the three offloading decisions, constraint C3 represents that the resources allocated to the user by the drone do not exceed the total resources of the user, constraint C4 represents that the resources allocated to the user by the base station do not exceed the total resources of the user, f i,m represents the computing resources of computing drone m allocated to user terminal i, f i,j represents the computing resources of base station j allocated to user terminal i, Y m represents the amount of computing resources of each computing drone, X j represents the amount of computing resources of each base station.

[0015] Preferably, the fitness function is as follows:

[0016]

[0017] Among them, totalDealy represents the fitness value, N represents the number of users, x i ,x i+N ,x i+2N are decision variables, indicating whether the user performs local processing, chooses to offload to the computing drone for processing, and chooses to relay to the base station for processing via the relay drone. i ,d i ,f i Represents the complexity of user tasks, the amount of user task data and the user computing power, r i,1 ,r i,2 They represent the calculation of the resources allocated by the drone to the user and the resources allocated by the base station to the user. local(), unload().relay() respectively represent the local delay, the calculation of the drone delay and the delay function of relaying to the base station.

[0018] Preferably, in step S3, the time delay of each task in local calculation, offloading to the calculation drone, and offloading to the base station through the relay drone is calculated based on the user location, task complexity, task data volume, and user computing power, and then the communication delay is calculated based on the calculation drone position and the relay drone position, including:

[0019] S3.1. Users use OMA multiple access, user transmissions do not interfere with each other, and the channel bandwidth is B. The communication rates from user i to computing drone m, user i to relay drone R, and relay drone R to base station j are obtained.

[0020] S3.2. The delay is divided into three cases for calculation according to the user's selection.

[0021] (1) Case 1: When user i chooses to execute the task locally, the execution delay of user i is Expressed as:

[0022]

[0023] in, represents the execution delay of user i, c i Indicates the number of CPU cycles required for task execution, f i Indicates the computing capability of user terminal i.

[0024] (2) Case 2: When user i chooses to offload to computing drone m for execution, the total delay when user i chooses to offload to computing drone m for execution is:

[0025]

[0026] wherein, denotes the total latency when user i chooses to offload to compute drone m to execute, d i denotes the task data volume of user terminal i, denotes whether the task of user i is offloaded to compute drone to execute, B denotes the channel bandwidth, P i denotes the transmission power of user i, h i,m denotes the channel gain between user i and compute drone m, σ denotes the noise power, h i denotes the number of CPU cycles required for task execution, f i,m denotes the computing resource allocated by compute drone m to user terminal i,

[0027] (3) Case three: when user i chooses to offload to base station j to execute through relay drone R, then the total latency of user i choosing to offload to base station j to execute through relay drone R is:

[0028]

[0029] wherein, denotes the total latency of user i choosing to offload to base station j to execute through relay drone R, d i denotes the task data volume of user terminal i, denotes whether the task of user i is offloaded to base station to execute through drone, B denotes the channel bandwidth, P i denotes the transmission power of user i, h i,R denotes the channel gain between user i and relay drone R, σ denotes the noise power, h R,j denotes the channel gain between relay drone R and base station j, c i denotes the number of CPU cycles required for task execution, f i,m denotes the computing resource allocated by compute drone m to user terminal i.

[0030] Preferably: the communication rates of user i to compute drone m, user i to relay drone R, and relay drone R to base station j are respectively:

[0031]

[0032]

[0033]

[0034] wherein, r i,m denotes the communication rate of user i to compute drone m, ri,R denotes the communication rate of user i to the relay drone R, R,j denotes the communication rate of the relay drone R to the base station j, denotes whether the task of user i is offloaded to the computing drone for execution, denotes whether the task of user i is offloaded to the base station for execution through the drone, B denotes the channel bandwidth, P i denotes the transmission power of user i, P R denotes the transmission power of the relay drone R, h i,m denotes the channel gain between user i and computing drone m, h i,R denotes the channel gain between user i and relay drone R, h R,j denotes the channel gain between relay drone R and base station j, σ denotes the noise power.

[0035] Preferably, in the step S5, a fitness function is constructed, and a genetic algorithm is used to solve the optimization model of the offloading decision and resource allocation in the multi-base station, multi-drone and multi-user scenario established in step S4, including:

[0036] S5.1, define a fitness function for calculating the total delay of the system.

[0037] S5.2, initialize the resource allocation matrix and the number of users, and count the number of users covered by each computing drone. Traverse all users, count the number of users that choose to offload to computing drones and offload to base stations through relay drones according to the decision variable x, and obtain the resource allocation of each user.

[0038] S5.3, calculate the total delay as the fitness value of the solution, which is used for evaluation and selection of the optimization method, and use a genetic algorithm to solve the problem to obtain the final user decision, total delay and resource allocation matrix.

[0039] Preferably, the steps of solving by genetic algorithm are as follows:

[0040] (1) Initialize the population: determine the population size and randomly assign initial values to each individual. Here, an individual represents a possible solution to the problem, and each individual represents a task allocation scheme for a drone. Each user can only choose one of the three task processing schemes.

[0041] (2) Fitness evaluation: set the fitness function, and calculate the fitness of each individual, i.e. evaluate their ability to solve the problem. The fitness function calculates the delay according to the task allocation scheme of the drone represented by the individual, and compares the calculated delay to evaluate the performance of the individual.

[0042] (3) Selection: According to the fitness of the individual, the individual with better fitness is selected as the parent for generating the next generation.

[0043] (4) Crossover: New individuals are generated by combining the selected parent individuals through crossover operation. The crossover operation can be to exchange and combine the task allocation schemes of two parent individuals to generate new individuals.

[0044] (5) Mutation: The newly generated individuals are subjected to mutation operation to increase the diversity of the population. Mutation operation will randomly change some characteristics of the individual. In this chapter, some task allocations in the task allocation scheme of the individual can be randomly changed.

[0045] (6) Repeat iteration: Steps (2) to (5) are repeated until the stopping condition is reached.

[0046] Preferably, in the step S2, the users are clustered based on the user positions, and the positions of the unmanned aerial vehicles are determined according to the clustering results, comprising:

[0047] S2.1, set the number N of clustering.

[0048] S2.2, randomly calculate the initial positions of the unmanned aerial vehicles.

[0049] S2.3, for each user, calculate the distance between it and each unmanned aerial vehicle, and assign it to the nearest unmanned aerial vehicle.

[0050] S2.4, for each unmanned aerial vehicle, calculate the center of gravity position of the users covered by it, and update the position of the unmanned aerial vehicle to the center of gravity position.

[0051] S2.5, repeat steps S2.3-S2.4 for iteration until the position change of the unmanned aerial vehicle is less than a set threshold.

[0052] S2.6, return the clustering results, that is, which unmanned aerial vehicle covers each user and calculate the final position of the unmanned aerial vehicle.

[0053] Another object of the present application is to provide a unmanned aerial vehicle assisted unloading decision and resource allocation system for realizing the unmanned aerial vehicle assisted unloading decision and resource allocation method, comprising a detection unit, a clustering unit, a communication delay unit, an optimization model unit and a genetic algorithm unit, wherein:

[0054] The detection unit is used for detecting user positions, task complexity, task data volume and user computing capacity.

[0055] The clustering unit clusters users based on user positions, and determines the positions of the unmanned aerial vehicles according to the clustering results, and sets the positions of the relay unmanned aerial vehicles at the center of the average positions of the users and the midpoint of the base station.

[0056] The communication delay unit calculates the time delay of each task in local computing, offloading to computing drones, and offloading to base stations through relay drones according to user location, task complexity, task data volume, and user computing capability, and then calculates the communication delay according to the positions of the computing drones and the relay drones.

[0057] The optimization model unit establishes an optimization model for offloading decision and resource allocation in a multi-base station, multi-drone, and multi-user scenario according to the communication delay, wherein the optimization goal is to minimize the total time delay.

[0058] The genetic algorithm unit solves the optimization model for offloading decision and resource allocation in a multi-base station, multi-drone, and multi-user scenario established in step S4 by constructing a fitness function and using a genetic algorithm, to obtain the final user decision, total time delay, and resource allocation matrix, wherein the computing resources of the drones are allocated according to the size of the tasks offloaded to the drones.

[0059] Another object of the present application is to provide a computer system comprising a memory and a processor, the memory being used to store computer programs / instructions. The processor is used to execute the computer programs / instructions to realize the method for offloading decision and resource allocation assisted by drones.

[0060] Compared with the prior art, the present application has the following beneficial effects:

[0061] 1. Time delay optimization: By allocating tasks to multiple computing drones and base stations, the present application reduces the load of single computing resources, thereby reducing the average time delay of task processing. The optimization goal is to minimize the total time delay, considering the comprehensive influence of computing time delay and communication time delay, thereby improving the response speed and efficiency of the overall system. The waiting time of user task processing is reduced, and the user experience and system reliability are improved.

[0062] 2. Resource utilization efficiency improvement: By optimizing offloading decision and resource allocation, the computing resources of multiple base stations and multiple drones can be effectively utilized, making the overall computing load more balanced and improving the utilization rate of resources. According to the size and complexity of the tasks, the tasks are dynamically allocated to the most suitable computing resources, avoiding resource waste and unnecessary time delay increase.

[0063] 3. Efficient solution: The present application first determines the positions of the computing drones by Kmeans algorithm, then constructs a fitness function, and uses a genetic algorithm to solve the optimization problem in a multi-base station, multi-drone, and multi-user scenario. Compared with traditional heuristic methods and greedy algorithms, the present application can quickly find the global optimal solution or approximate optimal solution. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1is a flowchart of the offloading decision and resource allocation joint optimization method provided by the embodiment of the application;

[0065] Figure 2 is a system model schematic diagram provided by the embodiment of the application. DETAILED DESCRIPTION

[0066] The application will be further clarified by the following examples and figures, which should not be construed as limiting the scope of the application. After reading the application, those skilled in the art can make various modifications to the application, which are within the scope of the appended claims.

[0067] Embodiment 1

[0068] The present example provides a UAV-assisted offloading decision and resource allocation method, comprising the following steps:

[0069] S1, obtaining the user location and evaluating the complexity of the task, the data volume and the computing capacity of the user.

[0070] S2, clustering the users based on the user location, and determining the computing UAV location according to the clustering result, and setting the relay UAV location at the center of the average location of the users and the midpoint of the base station.

[0071] S3, calculating the time delay of each task in local computing, offloading to the computing UAV and offloading to the base station through the relay UAV according to the user location, the task complexity, the data volume and the computing capacity. According to the location of the computing UAV and the relay UAV, the communication time delay is calculated.

[0072] S4, in the multi-base station, multi-UAV and multi-user scenario, an optimization model of offloading decision and resource allocation in the multi-base station, multi-UAV and multi-user scenario is established according to the communication time delay, wherein the optimization objective is to minimize the total time delay.

[0073] S5, a fitness function is constructed, and the optimization model of offloading decision and resource allocation in the multi-base station, multi-UAV and multi-user scenario established in step S4 is solved by using a genetic algorithm to obtain the final user decision, total time delay and resource allocation matrix, wherein the computing resources of the UAV are allocated according to the size of the task offloaded to the UAV.

[0074] S6, the final user decision, total time delay and resource allocation matrix in the iteration process are recorded and returned.

[0075] Reference Figure 1 , Figure 2 The present embodiment provides a resource allocation and offloading decision joint optimization method, and the application specific process is as follows:

[0076] S1, detecting user location, task complexity, task data volume, user computing capacity;

[0077] S2, clustering users based on user location, and determining the computing drone location according to the clustering result, setting the relay drone location at the center of the average user location and the midpoint of the base station;

[0078] S2.1, setting the number of clusters N, here set to 3 computing drones;

[0079] S2.2, randomly setting the initial location of the computing drone;

[0080] S2.3, for each user, calculating the distance between it and each drone, and assigning it to the nearest drone;

[0081] S2.4, for each drone, calculating the average location (center of gravity) of the users it covers, and updating the drone location to the center of gravity location;

[0082] S2.5, repeating steps S2.3-S2.4 for iteration until the change in the location of the drone is less than a set threshold;

[0083] S2.6, returning the clustering result, i.e., which drone covers each user and the final location of the computing drone.

[0084] S3, calculating the time delay of each task in local computing, offloading to computing drone computing, and offloading to base station computing through relay drone computing according to user location, task complexity, task data volume, and user computing capacity, and then calculating the communication time delay according to the computing drone location and the relay drone location;

[0085] S3.1, assuming that the user adopts OMA multiple access mode, there is no interference between user transmissions, and the channel bandwidth is B, according to the Shann-Hartley theorem, the communication rates of user i to computing drone m, user i to relay drone R, and relay drone R to base station j are respectively:

[0086]

[0087]

[0088]

[0089] where, r i,m represents the communication rate of user i to computing drone m, r i,R represents the communication rate of user i to relay drone R, and r R,j represents the communication rate of relay drone R to base station j, denotes whether the task of user i is offloaded to a computing drone to perform, denotes whether the task of user i is offloaded to a base station via a drone to perform, B denotes the channel bandwidth, P i denotes the transmission power of user i, P R denotes the transmission power of the relay drone R, h i,m denotes the channel gain between user i and computing drone m, h i,R denotes the channel gain between user i and relay drone R, h R,j denotes the channel gain between relay drone R and base station j, σ denotes the noise power.

[0090] S3.2, assuming that the task data volume of user terminal i is d i , and the number of CPU cycles required for task execution is c i . The delay is divided into three cases for calculation.

[0091] (1) Case one: when user i chooses to perform the task locally, the execution delay of user i can be represented as:

[0092]

[0093] wherein, denotes the execution delay of user i, c i denotes the number of CPU cycles required for task execution, f i denotes the computing capability of user terminal i, i.e., the number of CPU cycles running per unit time.

[0094] (2) Case two: when user i chooses to offload to computing drone m to perform, the transmission time of the task offloaded data from the user terminal to the computing drone and the computing time of the computing drone are obtained from the communication model as:

[0095]

[0096]

[0097] wherein, denotes the transmission time of the task offloaded data from the user terminal to the computing drone, d i denotes the task data volume of user terminal i, denotes the computing time of the computing drone, f i,m denotes the computing resource allocated by computing drone m to user terminal i.

[0098] Then the total delay of user i when choosing to offload to computing drone m to perform is:

[0099]

[0100]

[0101] wherein, denotes the total latency when user i chooses to offload to computing drone m for execution, f i,m denotes the computing resource allocated by computing drone m to user terminal i.

[0102] (3) Case three: when user i chooses to offload to base station j for execution through relay drone R, the transmission time of task offloading data from user terminal to relay drone, the transmission time from relay drone to base station and the computing time of computing drone are respectively:

[0103]

[0104]

[0105]

[0106] wherein, denotes the transmission time of task offloading data from user terminal to relay drone, denotes the transmission time of task offloading data from relay drone to base station, denotes the computing time of task offloading data computing drone, f i,j denotes the computing resource allocated by base station j to user terminal i.

[0107] The total latency when user i chooses to offload to base station j for execution through relay drone R is:

[0108]

[0109]

[0110] wherein, denotes the total latency when user i chooses to offload to base station j for execution through relay drone R, d i denotes the task data volume of user terminal i, denotes whether the task of user i is offloaded to base station for execution through drone, B denotes channel bandwidth, P i denotes the transmission power of user i, h i,R denotes the channel gain between user i and relay drone R, σ denotes noise power, h R,j denotes the channel gain between relay drone R and base station j, c i denotes the number of CPU cycles required for task execution, f i,m denotes the computing resource allocated by computing drone m to user terminal i.

[0111] S4, establishing an optimization model of offloading decision and resource allocation in a multi-base station multi-unmanned aerial vehicle multi-user scenario, wherein an optimization objective is to minimize total latency;

[0112] The optimization model of offloading decision and resource allocation in the multi-base station multi-unmanned aerial vehicle multi-user scenario can be expressed as:

[0113]

[0114] Wherein, X represents an offloading decision of a user, composed of x i , and x i represents whether a task of the user i is executed locally, represents whether the task of the user i is offloaded to a computing unmanned aerial vehicle for execution, represents whether the task of the user i is offloaded to a base station through an unmanned aerial vehicle, represents an execution latency of the user i, represents a total latency of the user i when selecting offloading to a computing unmanned aerial vehicle m for execution, represents a total latency of the user i when selecting offloading to a base station j through a relay unmanned aerial vehicle R for execution, represents a user terminal set, represents a computing unmanned aerial vehicle set, represents a base station set, constraint C1 represents that each user has three offloading decisions to choose from, C2 represents that the user can only choose one of the three offloading decisions, C3 represents that the resource allocated to the user by the unmanned aerial vehicle does not exceed the total resource of the user, C4 represents that the resource allocated to the user by the base station does not exceed the total resource of the user, f i,m represents a computing resource of the computing unmanned aerial vehicle m allocated to the user terminal i, f i,j represents a computing resource of the base station j allocated to the user terminal i, Y m represents a computing resource amount of each computing unmanned aerial vehicle, X j represents a computing resource amount of each base station.

[0115] S5, constructing a fitness function, and solving the problem established in S4 by using a genetic algorithm, wherein the computing resource of the unmanned aerial vehicle is allocated according to the size of the task offloaded to the unmanned aerial vehicle;

[0116] S5.1, defining a fitness function for calculating the total latency of the system, which is used in the optimization method to evaluate the performance of each solution (i.e., the decision variable x). The fitness function is as follows:

[0117]

[0118] Wherein, x ix i+N x i+2N are decision variables, N represents the number of users, x i x i+N x i+2N are decision variables, respectively representing whether the user performs local processing, whether the user chooses to offload to a computing drone for processing, and whether the user chooses to relay to a base station through a relay drone, c i d i f i respectively represent the user task complexity, the user task data volume, and the user computing capability, r i,1 r i,2 respectively represent the resources allocated to the user by the computing drone and the resources allocated to the user by the base station. local(), unload(), and relay() respectively represent the local delay, the computing drone delay, and the delay function of relaying to the base station.

[0119] S5.2, initialize the resource allocation matrix and the number of users, and count the number of users covered by each computing drone. Traverse all users, count the number of users that choose to offload to a computing drone and offload to a base station through a relay drone according to the decision variable x, and obtain the resource allocation of each user.

[0120] S5.3, calculate the total delay as the fitness value of the solution, for evaluation and selection of the optimization method, use genetic algorithm to solve the problem, and obtain the final user decision, total delay, and resource allocation matrix. The steps of the genetic algorithm are as follows:

[0121] (1) Initialize the population: determine the population size, and randomly assign initial values to each individual (possible solution). Here, an individual represents a possible solution to the problem, and each individual represents a task allocation scheme for a drone. Each user can only choose one of the three task processing schemes.

[0122] (2) Fitness evaluation: set the fitness function, and calculate the fitness of each individual, i.e., evaluate their ability to solve the problem. In this problem, the fitness function is to calculate the delay according to the task allocation scheme of the drone represented by the individual, and to evaluate the performance of the individual by comparing the calculated delay.

[0123] (3) Selection: select individuals with better fitness as parents for generating the next generation according to the fitness of the individuals.

[0124] (4) Crossover: combine the selected parent individuals to generate new individuals through crossover operation. The crossover operation can be to exchange and combine the task allocation schemes of two parent individuals to generate new individuals.

[0125] (5) Variation: Perform variation operation on the newly generated individuals to increase the diversity of the population. Variation operation will randomly change some characteristics of the individuals, in this chapter, some task assignments in the task assignment scheme of the individuals can be randomly changed.

[0126] (6) Repeat iteration: Repeat steps 2 to 5 until the stopping condition is reached, in this chapter, the stopping condition is set as the approximate latency obtained in 10 consecutive iterations, which indicates that the approximate optimal solution has been reached.

[0127] S6, record and return the final user decision, total latency and resource allocation matrix of iteration.

[0128] This embodiment considers the edge computing service optimization in the multi-base station, multi-unmanned aerial vehicle and multi-user scenario, effectively utilizes unmanned aerial vehicles as edge computing nodes, and improves the efficiency and performance of the system.

[0129] This example uses the Kmeans algorithm to cluster users to determine the location of the unmanned aerial vehicle. According to the clustering result, the average position center of the users in the coverage area is calculated for the deployment of the unmanned aerial vehicle, and the midpoint of the base station is set as the position of the relay unmanned aerial vehicle to maximize the coverage effect and communication efficiency.

[0130] This example calculates the latency of tasks in local computing, offloading to computing unmanned aerial vehicles, and offloading to base station computing through relay unmanned aerial vehicles according to user location and task characteristics. Combined with the position information of the computing unmanned aerial vehicle and the relay unmanned aerial vehicle, the communication latency is further calculated to optimize the offloading decision and resource allocation. Through mathematical modeling and optimization theory, the offloading decision and resource allocation problem in the multi-base station, multi-unmanned aerial vehicle and multi-user scenario is established. The optimization goal is to minimize the total latency to improve the efficiency and user experience of the overall system. A fitness function is designed to quantify the optimization goal, and evolutionary algorithms such as genetic algorithm are used to solve the established optimization problem. According to the task size and the computing resources of the unmanned aerial vehicle, resources are dynamically allocated to maximize the utilization and performance of the system.

[0131] Embodiment 2

[0132] This example provides a kind of unmanned aerial vehicle assisted offloading decision and resource allocation system, characterized by: for realizing the unmanned aerial vehicle assisted offloading decision and resource allocation method, including detection unit, clustering unit, communication latency unit, optimization model unit, genetic algorithm unit, wherein:

[0133] The detection unit is used to detect user location, task complexity, task data volume and user computing capacity.

[0134] The clustering unit clusters users based on user location, and determines the position of the computing unmanned aerial vehicle according to the clustering result, and sets the position of the relay unmanned aerial vehicle at the center of the average position of the users and the midpoint of the base station.

[0135] The communication delay unit calculates the time delay of each task in local computing, computing offloaded to a computing drone, and computing offloaded to a base station through a relay drone according to user location, task complexity, task data volume, and user computing capability, and then calculates the communication delay according to the computing drone location and the relay drone location.

[0136] The optimization model unit establishes an optimization model of offloading decision and resource allocation in a multi-base station, multi-drone, and multi-user scenario according to the communication delay, wherein the optimization objective is to minimize the total time delay.

[0137] The genetic algorithm unit solves the optimization model of offloading decision and resource allocation in a multi-base station, multi-drone, and multi-user scenario established in step S4 by constructing a fitness function and using a genetic algorithm, to obtain the final user decision, total time delay, and resource allocation matrix, wherein the computing resources of the drone are allocated according to the size of the task offloaded to the drone.

[0138] Embodiment 3

[0139] The present example provides a computer system comprising a memory for storing computer programs / instructions and a processor for executing the computer programs / instructions to implement the method of drone-assisted offloading decision and resource allocation.

[0140] Embodiment 4

[0141] The present example provides an offloading decision and resource allocation joint optimization device, comprising:

[0142] A detection module for detecting user location, task complexity, task data volume, and user computing capability;

[0143] A clustering module for clustering users based on user location and determining the computing drone location according to the clustering result;

[0144] A calculation module for calculating the time delay of each task in local computing, computing offloaded to a computing drone, and computing offloaded to a base station through a relay drone according to user location, task complexity, task data volume, and user computing capability, and then calculating the communication delay according to the computing drone location and the relay drone location;

[0145] An iteration module for establishing an optimization problem of offloading decision and resource allocation in a multi-base station, multi-drone, and multi-user scenario, wherein the optimization objective is to minimize the total time delay. A fitness function is constructed, and the established problem is iteratively solved using a genetic algorithm;

[0146] A resource allocation module for allocating computing resources according to the size of the task offloaded to the drone.

[0147] Example 5

[0148] The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement steps of the method in any one of the preceding embodiments.

[0149] The user of the application can choose to execute the task locally, unload it to the UAV for execution, or unload it to the base station through the UAV. Under the constraints of base station resources and UAV resources, an optimization model for minimizing the task completion time is established. The optimization model is solved by using a genetic algorithm, each solution in the solution space of the optimization model is mapped to an individual in the genetic algorithm, a fitness function is constructed to evaluate the pros and cons of each individual in consideration of the total task completion time of the user, to guide the evolution process of the genetic algorithm, and finally obtain the user's unloading decision, total time delay and resource allocation matrix. The application reduces the task completion time through reasonable resource allocation and unloading decision.

[0150] The above only describes the preferred embodiments of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method for UAV-assisted unloading decision and resource allocation, characterized in that, The method comprises the following steps: S1, detecting user location, task complexity, task data volume, and user computing capacity; S2, clustering users based on user location, and determining the computing drone location according to the clustering result, and setting the relay drone location at the midpoint between the center of the user average location and the base station; S3, calculating the time delay of each task in local computing, computing offloaded to the computing drone, and computing offloaded to the base station through the relay drone according to the user location, task complexity, task data volume, and user computing capacity, and calculating the communication time delay according to the computing drone location and the relay drone location; S4, establishing an optimization model for offloading decision and resource allocation in the multi-base-station multi-drone multi-user scenario according to the communication time delay, wherein the optimization objective is to minimize the total time delay; S5, constructing a fitness function, and solving the optimization model for offloading decision and resource allocation in the multi-base-station multi-drone multi-user scenario established in step S4 by using a genetic algorithm to obtain the final user decision, total time delay, and resource allocation matrix, wherein the computing resources of the drone are allocated according to the size of the task offloaded to the drone. 2.The method of claim 1, wherein: The optimization model for offloading decision and resource allocation in the multi-base-station multi-drone multi-user scenario is represented as: in, Represents the user's uninstall decision, represented by , and composition, Represents a user Whether the task is executed locally, Represents a user Whether the task is offloaded to the computing drone for execution, Represents a user Whether the task is offloaded to the base station by the drone, Represents a user The execution delay of Represents a user Select Offload to Compute Drone The total delay during execution, Represents a user Select via Relay Drone Relay then offloads to base station The total execution delay, Represents a set of user terminals, represents the set of computing drones, represents the base station set, constraint Indicates that each user has three options for uninstalling decisions. Indicates that the user can only choose one of the three uninstall decisions. Indicates that the resources allocated by the drone to the user do not exceed the user's total resources. Indicates that the resources allocated by the base station to the user do not exceed the total resources of the user. Represents computing drones Assigned to user terminal computing resources, Indicates base station Assigned to user terminal computing resources, represents the amount of computing resources of each computing drone, Indicates the computing resources of each base station.

3. The method of claim 2, wherein: The fitness function is shown as follows: wherein, denotes a fitness value, denotes a number of users, are decision variables, respectively representing whether a user performs local processing, whether a user chooses to offload to a computing drone for processing, and whether a user chooses to relay to a base station via a relay drone for processing, respectively represent a number of CPU cycles required for task execution, a user task data volume, and a user computing capability, respectively represent a resource allocated to a user by a computing drone and a resource allocated to a user by a base station, respectively represent a local latency, a computing drone latency, and a latency function for relaying to a base station.

4. The method of claim 3, wherein: In the step S3, the time delay of each task in local computing, computing offloaded to the computing drone, and computing offloaded to the base station through the relay drone is calculated according to the user location, task complexity, task data volume, and user computing capacity, and the communication time delay is calculated according to the computing drone location and the relay drone location, comprising: S3.1, the user adopts the OMA multiple access mode, the user transmission does not interfere with each other, and the channel bandwidth is , the user to the calculation unmanned plane , the user to the relay unmanned plane , the relay unmanned plane to the base station The communication rate is obtained; S3.2, dividing the time delay into three cases for calculation according to the user's selection; (1) Case 1: When the user selects to execute the task locally, the user's execution delay is represented as: wherein, denotes the execution latency of a user , denotes the number of CPU cycles required for the execution of a task, denotes the computing power of a user terminal ; (2) Case 2: When the user selects to offload to a computing drone then the user selects to offload to a computing drone the total latency when executed is: wherein, denotes a user selects to offload to a computing drone total latency at execution, denotes a user terminal amount of task data, denotes a user whether a task is offloaded to a computing drone for execution, denotes a channel bandwidth, denotes a user transmission power, denotes a user channel gain between, a computing drone denotes a noise power, denotes a number of CPU cycles required for task execution, denotes a computing resource allocated by a computing drone to a user terminal , (3) Case 3: When the user selects to go through the relay UAV relay offloads to the base station is executed, then the total latency for the user selects to go through the relay UAV relay offloads to the base station is executed is: ; wherein, denotes a user selects to pass through a relay unmanned aerial vehicle relay offloads to a base station total latency of execution, denotes a user terminal amount of task data, denotes a user whether the task is offloaded to a base station for execution by an unmanned aerial vehicle, denotes a channel bandwidth, denotes a transmission power of a user denotes a channel gain between a user and a relay unmanned aerial vehicle denotes a noise power, denotes a channel gain between a relay unmanned aerial vehicle and a base station denotes a number of CPU cycles required for task execution, denotes a computing resource allocated by a computing unmanned aerial vehicle to a user terminal ​​​​ 5. The method of claim 4, wherein: user to the computing drone , the user to the relay drone , the relay drone to the base station communication rates are: wherein denotes the communication rate of the user to the computing drone , denotes the communication rate of the user to the relay drone , denotes the communication rate of the relay drone to the base station , denotes whether the task of the user is offloaded to the computing drone for execution, denotes whether the task of the user is offloaded to the base station via the drone for execution, denotes the channel bandwidth, denotes the transmission power of the user , denotes the transmission power of the relay drone , denotes the channel gain between the user and the computing drone , denotes the channel gain between the user and the relay drone , denotes the channel gain between the relay drone and the base station , denotes the noise power.

6. The method of claim 5, wherein: In the step S5, the fitness function is constructed, and the optimization model for offloading decision and resource allocation in the multi-base-station multi-drone multi-user scenario established in step S4 is solved by using a genetic algorithm, comprising: S5.1, defining a fitness function for calculating the total time delay of the system; S5.2, initialize resource allocation matrix and the number of users, count the number of users covered by each computing drone; traverse all users, according to the decision variable count the number of users selected to be unloaded to the computing drone and unloaded to the base station through the relay drone, and obtain the resource allocation of each user; S5.3, calculating the total time delay as the fitness value for the evaluation and selection of the optimization method, and solving by using a genetic algorithm to obtain the final user decision, total time delay, and resource allocation matrix.

7. The method of claim 6, wherein: The steps of solving by using a genetic algorithm are as follows: (1) initializing the population: determining the population size, and randomly allocating initial values to each individual; here, the individual represents a possible solution to the problem, and each individual represents a task allocation scheme of a drone; each user can only select one of the three offloading decisions; (2) fitness evaluation: setting the fitness function, and calculating the fitness of each individual, i.e., evaluating their ability to solve the problem; the fitness function is to calculate the time delay according to the task allocation scheme of the drone represented by the individual, and the performance of the individual is evaluated by comparing the calculated time delay; (3) selection: selecting individuals with better fitness as parents for generating the next generation according to the fitness of the individuals; (4) crossover: combining the selected parent individuals to generate new individuals through the crossover operation; the crossover operation is to exchange and combine the task allocation schemes of two parent individuals to generate new individuals; (5) variation: performing a variation operation on the newly generated individual to increase the diversity of the population; the variation operation will randomly change some characteristics of the individual, thereby randomly changing some task allocations in the task allocation scheme of the individual; (6) repeat iteration: repeating steps (2) to (5) until a stop condition is reached.

8. The method of claim 7, wherein: In the step S2, the users are clustered based on the user positions, and the positions of the unmanned aerial vehicles are determined according to the clustering results, comprising: S2.1, set the number of clusters ; S2.2, randomly calculating the initial positions of the unmanned aerial vehicles; S2.3, for each user, calculating the distance between the user and each unmanned aerial vehicle, and assigning the user to the nearest unmanned aerial vehicle; S2.4, for each unmanned aerial vehicle, calculating the center of gravity position of the users covered by the unmanned aerial vehicle, and updating the position of the unmanned aerial vehicle to the center of gravity position; S2.5, repeating steps S2.3-S2.4 for iteration until the position change of the unmanned aerial vehicle is less than a set threshold; S2.6, returning the clustering results, that is, which unmanned aerial vehicle covers each user and calculating the final position of the unmanned aerial vehicle.

9. An unmanned aerial vehicle assisted unloading decision and resource allocation system, characterized in that: The method for realizing the unmanned aerial vehicle assisted offloading decision and resource allocation method of claim 1 comprises a detection unit, a clustering unit, a communication delay unit, an optimization model unit, and a genetic algorithm unit, wherein: The detection unit is used to detect user positions, task complexity, task data volume, and user computing capacity; The clustering unit clusters users based on user positions, and determines the positions of the computing unmanned aerial vehicles according to the clustering results, and sets the positions of the relay unmanned aerial vehicles at the center of the average positions of the users and the midpoint of the base stations; The communication delay unit calculates the time delay of each task in local computing, offloading to computing unmanned aerial vehicles, and offloading to base station computing through relay unmanned aerial vehicles according to user positions, task complexity, task data volume, and user computing capacity, and then calculates the communication delay according to the positions of the computing unmanned aerial vehicles and the positions of the relay unmanned aerial vehicles; The optimization model unit establishes an optimization model for offloading decision and resource allocation in a multi-base station, multi-unmanned aerial vehicle, and multi-user scenario according to the communication delay, wherein the optimization objective is to minimize the total time delay; The genetic algorithm unit solves the optimization model for offloading decision and resource allocation in a multi-base station, multi-unmanned aerial vehicle, and multi-user scenario established in step S4 by constructing a fitness function and using a genetic algorithm, and obtains the final user decision, total time delay, and resource allocation matrix, wherein the computing resources of the unmanned aerial vehicles are allocated according to the size of the tasks offloaded to the unmanned aerial vehicles.

10. A computer system, characterized by A device comprising a memory and a processor, the memory being used to store computer programs / instructions; the processor being used to execute the computer programs / instructions to realize the unmanned aerial vehicle assisted offloading decision and resource allocation method of any one of claims 1-8.