A city airspace multi-unmanned aerial vehicle task allocation method based on task structure perception
By constructing maps in urban airspace and introducing heuristic information based on task structure awareness, combined with ant colony optimization algorithm and dual pheromone matrix, the problem of inaccurate and inefficient task allocation in existing technologies is solved, achieving efficient multi-UAV task allocation and improving the accuracy and efficiency of UAV task allocation in urban airspace.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANKAI UNIV
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-24
AI Technical Summary
Existing multi-UAV mission allocation methods are unable to accurately reflect actual flight paths and costs in urban airspace, and fail to fully utilize mission structure information. This results in a lack of differentiated priority guidance in the scheduling process, making it difficult to effectively compress the overall completion time and reduce the optimization performance and stability of the scheduling results.
We construct urban airspace maps, introduce heuristic information based on task structure awareness, and adopt a dual pheromone matrix and incremental UAV alliance construction method. Combined with ant colony optimization algorithm, we allocate tasks based on spatial proximity, critical path urgency, and topological influence to optimize task sequencing and resource allocation.
It improves the authenticity and feasibility of task allocation results, reduces the overall completion time of UAVs, enhances scheduling efficiency and the quality of task allocation schemes, avoids the combinatorial space explosion problem, and improves the efficiency of solving optimal task allocation in large-scale scenarios.
Smart Images

Figure CN122453031A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of collaborative scheduling of unmanned aerial vehicles (UAVs), and in particular to a method for allocating multiple UAV tasks in urban airspace based on task structure perception. Background Technology
[0002] With the development of the urban low-altitude economy, the application of multiple drones in urban logistics, inspection, and emergency rescue scenarios is becoming increasingly widespread. In these applications, it is often necessary to rationally allocate multiple tasks with pre-existing constraints to multiple drones for collaborative completion under certain time and resource limitations, thus forming a multi-drone task allocation problem. This problem not only relates to task execution efficiency but also directly affects the overall safety and reliability of the system.
[0003] The multi-UAV task allocation problem typically involves multiple tasks and multiple constraints. In real-world scenarios, tasks often have prerequisite relationships, meaning some tasks can only be executed after their preceding tasks are completed. Furthermore, heterogeneous UAVs differ in payload capacity, flight speed, and endurance, requiring the task allocation process to simultaneously consider task structure constraints and resource matching. In addition, differences in the spatial distribution and execution time of different tasks further increase the complexity of scheduling decisions. These coupled factors make the problem highly complex, proven to be NP-hard, and difficult to solve efficiently using traditional exact methods in large-scale scenarios.
[0004] Existing multi-UAV task allocation methods mostly use Euclidean distance to model the flight costs between tasks. However, in real urban environments, UAV flights are constrained by road layouts and building obstacles, and their flight paths usually need to be adjusted along accessible spaces. Simple Euclidean distance cannot accurately reflect the actual flight paths and costs. In addition, existing methods usually treat pre-task constraints as feasibility limitations without further exploring the structural information between tasks, such as critical path tasks and tasks with significant follow-up impacts. As a result, the scheduling process lacks differentiated priority guidance based on task structure, making it difficult to effectively compress the overall completion time and reducing the optimization performance and stability of the scheduling results.
[0005] Ant colony optimization (ACO) algorithms possess excellent global search capabilities in combinatorial optimization problems, gradually approximating high-quality solutions through pheromone feedback mechanisms. Therefore, they are widely used in path planning and task allocation. However, traditional ACO methods typically assume an idealized search space and are not specifically designed for the complex spatial constraints and task structure characteristics of urban airspace. This leads to problems such as low search efficiency and unstable solution quality when dealing with multi-UAV task allocation problems with pre-constraints and heterogeneous resource allocation. Therefore, it is necessary to design an optimization method that simultaneously considers urban spatial constraints and task structure characteristics to improve the efficiency and practical application effectiveness of multi-UAV task allocation. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a method for allocating multiple UAV tasks in urban airspace based on task structure perception.
[0007] The objective of this invention is achieved through the following technical solution:
[0008] A method for multi-UAV task allocation in urban airspace based on task structure awareness includes the following steps:
[0009] S1. Construct a city airspace map and obtain several tasks; based on the city airspace map, determine the distance between any two tasks for subsequent calculations of preconditions, maximum flight distance constraints, and spatial proximity.
[0010] S2. Initialize the task set and the drone set, and establish the "task-task" pheromone matrix and the "task-drone" pheromone matrix; based on the task set and the drone set, generate an initial task allocation scheme that satisfies the capability constraints, preconditions, and maximum flight distance constraints, so as to determine the initial pheromone intensity of the pheromone matrix.
[0011] S3. Construct a directed acyclic graph based on the task preconditions and determine the set of optional tasks that satisfy the task preconditions.
[0012] S4. Based on the set of available tasks, in the ant colony optimization algorithm, a task allocation sequence is constructed step by step through state transition rules: after selecting a task, the next task is selected based on the "task-task" pheromone matrix and heuristic information perceived by the task structure; wherein, the heuristic information is calculated by three heuristic factors: spatial proximity, critical path urgency and topological influence.
[0013] S5. For each task in the task allocation sequence, based on the "task-drone" pheromone and heuristic information, incrementally build a drone alliance until the task requirements are met.
[0014] S6. When a set of task allocation schemes from steps S3 to S5 is completed, perform a local pheromone update on the pheromone matrix and search for multiple sets of task allocation schemes.
[0015] When an iteration is completed, that is, when multiple task allocation schemes are completed, the current optimal task allocation scheme is selected by evaluating the adaptive value function, and a global pheromone update is performed.
[0016] Based on the updated global pheromone, the final task allocation scheme is obtained when the maximum number of iterations is met.
[0017] S1 refers to constructing an urban airspace map: establishing a set of road centerlines X={x1,x2,…,x…} N}、Y={y1,y2,…,y M The set of intersection nodes formed by} and their intersections is Intersection={(x i ,y j )|1≤i≤N, 1≤j≤M}; and divide the building obstacle area according to the road width to obtain the flight space constrained by the road network;
[0018] Where X and Y represent the set of transverse road centerlines and the set of longitudinal road centerlines, respectively; x i y j Let N and M represent the i-th horizontal road and the j-th vertical road, respectively, and let N and M be the total number of horizontal roads and the total number of vertical roads, respectively.
[0019] Given several tasks, the distance between any two tasks on the city airspace map is defined as:
[0020] ;
[0021] Among them, (x i , y i ), (x j , y j ) are tasks , Two-dimensional coordinates, and Let i and j represent the i-th task and the j-th task, respectively, where i ≠ j; Indicates task The two nearest intersections in opposite directions on the same road; Indicates task The two nearest intersections in opposite directions on the same road; Indicates from After passing intersections k and l, to The total cost of the Manhattan distance path.
[0022] Step S2 is to define the set of drones as U={u1, u2, …, u n}, where n is the number of heterogeneous drones, and the i-th drone u i Represented as (Uid) i , Uv i , Uc i Md i These correspond to the drone identifier, the drone's constant flight speed, the drone's 1-dimensional capabilities, and its maximum flight distance, respectively; a drone alliance is constructed based on the drone set, and the drone alliance is represented by 'a'. k This means that k is encoded as a binary number, where a position with a 1 indicates that the drone at that position number belongs to that alliance; the task set is defined as T = {t1, t2, …, t}. m}, where m is the number of tasks, and the i-th task t i Represented as (Tid) i ,Tp i , Te i , Tc i Pre i These correspond to the task identifier, task location, task execution time, task required 1-dimensional capability, and set of preceding tasks, respectively.
[0023] The "task-task" pheromone matrix τ1 and the "task-UAV" pheromone matrix τ2 are established as follows:
[0024] ;
[0025] ;
[0026] in, Represents task t i With task t j The pheromone values between Represents task t i With drones j The pheromone values between them;
[0027] Based on the task set and the UAV set, generate a task allocation scheme X that satisfies capability constraints, prerequisite constraints, and maximum flight distance constraints. r Through task allocation scheme X r Determine the initial pheromone intensity Assign to and Initial pheromone intensity The specific calculations are as follows:
[0028] ;
[0029] in, For X r The fitness value; m is the total number of tasks in the task allocation scheme;
[0030] fitness function The calculation is as follows:
[0031] ;
[0032] Where X is the constructed task allocation scheme, FT(X) and WT(X) represent the maximum completion time of all tasks and the average waiting time of all tasks, respectively, and ω is the weight parameter used to balance the objectives.
[0033] The specific capability constraints, prerequisite constraints, and maximum flight distance constraints are as follows:
[0034] The specific capability constraints are:
[0035] ;
[0036] in, Indicates drone u j The capabilities provided in the z-th dimension Represents task t i The capability required in the z-th dimension This indicates a randomly selected drone alliance;
[0037] The preconditions are:
[0038] ;
[0039] in, Represents task t o Completion time, Represents task t i The waiting time for task t o Located in task t i In the set of prerequisite tasks;
[0040] Define the Drone Alliance Execute task t i time for;
[0041] ;
[0042] in, Represents task t i Required execution time;
[0043] Task t i Waiting time The specific calculation formula is as follows:
[0044] ;
[0045] ;
[0046] in, Indicates drone u j Arrive at mission t i Time, Indicates in task t i Previously immediately assigned to drone u j The task Indicates task To task t i The distance between them; Indicates drone u j A constant flight speed;
[0047] Task t i Completion time , The specific calculation formula is as follows:
[0048] ;
[0049] The maximum flight distance constraint is:
[0050] ;
[0051] in, Indicates drone u j Total flight distance, Indicates drone u j Maximum flight distance;
[0052] drone j Total flight distance The calculation formula is as follows:
[0053] ;
[0054] Among them, RT j Indicates the assignment to drone u j Task sequence, task Tasks in sequence The previous task, task This indicates the last one assigned to drone u. j The task.
[0055] In step S4, the state transition rule, that is, from the current task t... w Select the next task. i Specifically:
[0056] ;
[0057] ;
[0058] Among them, T p This represents the set of currently feasible tasks; Represents task t w With candidate task t o The pheromone values between This indicates selecting task t in the current state. o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], I represents the task selected according to the probability distribution P1; the parameters α, β and q0 are pre-set constants; Indicates starting from the current task t w To task t o The probability of;
[0059] Task structure perception heuristic information It is calculated by weighting spatial proximity P(j), critical path urgency U(j), and topological influence I(j), and is expressed as:
[0060] ;
[0061] in, , as well as These are the weight parameters for the three.
[0062] The spatial proximity P(j), critical path urgency U(j), and topological influence I(j) are as follows:
[0063] Spatial proximity P(j) assessment task t j Spatial proximity: Calculate the last task t performed by all currently assigned drones. u To task t j average distance :
[0064] ;
[0065] Among them, U prev It is the set of coordinates of the last mission executed by the drone that has been assigned a task; by analyzing D mean Normalization and taking the reciprocal yields P(j):
[0066] ;
[0067] Norm() is the Min-Max normalization function;
[0068] The critical path urgency U(j) measures the urgency of the critical path based on the task's position in the directed acyclic graph formed by the pre-constraints: Define task t j The execution time plus the length of the longest path of all its successor tasks, Mt j The criticality of the task is denoted as C. j The formula for calculating U(j) is as follows:
[0069] ;
[0070] ;
[0071] Topological influence I(j) based on task t j The total number of subsequent tasks Ts j To measure its impact on subsequent tasks, I(j) is calculated using the following formula:
[0072] .
[0073] In step S5, the incremental construction of the drone alliance is specifically as follows:
[0074] The drone alliance required for each task is built using an incremental approach. This means that a drone meeting the maximum flight distance constraint is selected as the drone alliance. If the current drone alliance does not meet the drone capability constraint, another drone meeting the maximum flight distance constraint is selected and added to the current drone alliance. j The selection rules are as follows:
[0075] ;
[0076] ;
[0077] Where U' represents the set of candidate drones; Represents task t i With candidate drones u o The pheromone values between Indicates the current task t i Choose drones o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], and J represents the probability distribution P. 2 The selected drone; parameters α, β, and q0 are preset constants; Indicates starting from the current task t i To drone u o The probability of;
[0078] Task t i Choose drones j Inspirational information Defined as:
[0079] ;
[0080] Among them, FT i For task t i The completion time under the current alliance, T f For the set of assigned tasks.
[0081] In step S6, the local pheromone and global pheromone updates are specifically as follows:
[0082] When a set of task allocation schemes in steps S3 to S5 is completed, local pheromone updates are performed on the "task-task" pairs and "task-UAV" pairs involved in the scheme.
[0083] Local pheromones The updated formula is:
[0084] ;
[0085] Where, k∈{1,2}, ρ l X is the local volatility coefficient. f This is the task allocation plan for the completed task;
[0086] When an iteration is completed, that is, when multiple task allocation schemes are completed, each scheme is evaluated by the fitness value function, and the current optimal task allocation scheme is selected and a global pheromone update is performed.
[0087] Global pheromones The updated formula is:
[0088] ;
[0089] Where, k∈{1,2}, ρ g X is the global volatility coefficient. b This represents the current optimal task allocation scheme.
[0090] Meanwhile, this invention provides:
[0091] A server includes a processor and a memory, the memory storing at least one program that is loaded and executed by the processor to implement the above-described urban airspace multi-UAV task allocation method based on task structure awareness.
[0092] A computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the above-described urban airspace multi-UAV task allocation method based on task structure perception.
[0093] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0094] 1. This invention constructs an urban airspace map based on road networks and building obstacles, constraining the flight path of UAVs to the actual passable area. Compared with the method of using Euclidean distance modeling, it can more accurately describe the flight distance between any two tasks, thereby improving the authenticity and feasibility of task allocation results.
[0095] 2. This invention introduces heuristic information for task structure perception and is specifically designed for the characteristics of task structure in urban airspace. During the task selection process, it comprehensively considers spatial proximity, critical path urgency and topological influence, and can capture the spatial structure of the task and the logical structure in the preceding relationships, thereby effectively reducing the overall completion time of the UAV and improving scheduling efficiency and the quality of task allocation schemes.
[0096] 3. This invention employs a dual-pheromone guidance mechanism ("task-task" pheromone matrix and "task-UAV" pheromone matrix) and an incremental UAV alliance construction method. It is designed to address complex spatial constraints (capability constraints, preconditions, and maximum flight distance constraints) in urban airspace, thereby achieving coordinated optimization of task sequencing and resource allocation. While satisfying multiple constraints, it avoids the combinatorial space explosion problem, thus reducing computational complexity and improving the efficiency of solving the optimal task allocation scheme in large-scale scenarios. Attached Figure Description
[0097] Figure 1 This is an example of an urban airspace map.
[0098] Figure 2 This is a flowchart of a multi-UAV task allocation method for urban airspace based on task structure perception, as described in this invention.
[0099] Figure 3 This is an example diagram for calculating the longest path and the number of successor tasks in the critical path urgency. Detailed Implementation
[0100] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0101] like Figure 2 A method for multi-UAV task allocation in urban airspace based on task structure perception includes the following steps:
[0102] S1. Construct a city airspace map and obtain several tasks; based on the city airspace map, determine the distance between any two tasks for subsequent calculations of preconditions, maximum flight distance constraints, and spatial proximity.
[0103] S2. Initialize the task set and the drone set, and establish the "task-task" pheromone matrix and the "task-drone" pheromone matrix; based on the task set and the drone set, generate an initial task allocation scheme that satisfies the capability constraints, preconditions, and maximum flight distance constraints, so as to determine the initial pheromone intensity of the pheromone matrix.
[0104] S3. Construct a directed acyclic graph based on the task preconditions and determine the set of optional tasks that satisfy the task preconditions.
[0105] S4. Based on the set of available tasks, in the ant colony optimization algorithm, a task allocation sequence is constructed step by step through state transition rules: after selecting a task, the next task is selected based on the "task-task" pheromone matrix and heuristic information perceived by the task structure; wherein, the heuristic information is calculated by three heuristic factors: spatial proximity, critical path urgency and topological influence.
[0106] S5. For each task in the task allocation sequence, based on the "task-drone" pheromone and heuristic information, incrementally build a drone alliance until the task requirements are met.
[0107] S6. When a set of task allocation schemes from steps S3 to S5 is completed, perform a local pheromone update on the pheromone matrix and search for multiple sets of task allocation schemes.
[0108] When an iteration is completed, that is, when multiple task allocation schemes are completed, the current optimal task allocation scheme is selected by evaluating the adaptive value function, and a global pheromone update is performed.
[0109] Based on the updated global pheromone, the final task allocation scheme is obtained when the maximum number of iterations is met.
[0110] In step S1, the urban airspace map is as follows: Figure 1 Establish a set of road centerlines X = {x1, x2, ..., x...} N}、Y={y1,y2,…,y M The set of intersection nodes formed by} and their intersections is Intersection={(x i ,y j )|1≤i≤N, 1≤j≤M}; and divide the building obstacle area according to the road width to obtain the flight space constrained by the road network;
[0111] Where X and Y represent the set of transverse road centerlines and the set of longitudinal road centerlines, respectively; x i y j Let N and M represent the i-th horizontal road and the j-th vertical road, respectively, and let N and M be the total number of horizontal roads and the total number of vertical roads, respectively.
[0112] In an urban airspace map, the distance between any two tasks is defined as:
[0113] ;
[0114] Among them, (x i , y i ), (x j , y j ) are tasks , Two-dimensional coordinates, and Let i and j represent the i-th task and the j-th task, respectively, where i ≠ j; Indicates task The two nearest intersections in opposite directions on the same road; Indicates task The two nearest intersections in opposite directions on the same road; Indicates from After passing intersections k and l, to The total cost of the Manhattan distance path.
[0115] In step S2, the task set and drone set are initialized: multiple heterogeneous drones and several tasks to be performed are distributed within the urban area; the drone set is defined as U={u1, u2, …, u n}, where n is the number of heterogeneous drones, and the i-th drone u i Represented as (Uid) i , Uv i , Uc i Md i These correspond to the drone identifier, constant flight speed, 1-dimensional capabilities, and maximum flight distance, respectively; all drones start from the initial point Sp; a drone alliance is constructed based on the drone set, and the drone alliance is represented by a. k This means that k is encoded as a binary number, and the position of the number 1 indicates that the drone at that position number is in the alliance (e.g., if the drone alliance corresponding to the task initially randomly selects drone 1, then the drone alliance is a1; in the subsequent continuous optimization matching, the task should be performed by drone 1 and drone 3, then the drone alliance at this time is a5; because the binary code of 5 is 101, indicating that the 1st and 3rd drones are selected); the number of drones in the drone alliance is one or more.
[0116] The task set is defined as T = {t1, t2, …, t}. m}, where m is the number of tasks, and the i-th task t i Represented as (Tid) i , Tpi , Te i , Tc i Pre i These correspond to the task identifier, task location, task execution time, task required 1-dimensional capability, and set of preceding tasks, respectively.
[0117] The "task-task" pheromone matrix τ1 and the "task-UAV" pheromone matrix τ2 are established as follows:
[0118] ;
[0119] ;
[0120] in, Represents task t i With task t j The pheromone values between Represents task t i With drones j The pheromone values between; in a dimension of length m+1, index 0 is reserved to represent the initial position Sp; in a dimension of length n+1, index 0 has no special meaning and is only used to maintain alignment with the drone identifier Uid;
[0121] Based on the task set and the UAV set, generate a task allocation scheme X that satisfies capability constraints, prerequisite constraints, and maximum flight distance constraints. r Specifically, the capability constraints are:
[0122] ;
[0123] in, Indicates drone u j The capabilities provided in the z-th dimension Represents task t i The capability required in the z-th dimension This indicates a randomly selected drone alliance;
[0124] The preconditions are:
[0125] ;
[0126] in, Represents task t o Completion time, Represents task t i The waiting time for task t o Located in task t i In the set of prerequisite tasks;
[0127] Define the Drone Alliance Execute task t i time for;
[0128] ;
[0129] in, Represents task t i Required execution time;
[0130] Task t i Waiting time The specific calculation formula is as follows:
[0131] ;
[0132] ;
[0133] in, Indicates drone u j Arrive at mission t i Time, Indicates in task t i Previously immediately assigned to drone u j The task Indicates task To task t i The distance between them; Indicates drone u j A constant flight speed;
[0134] Task t i Completion time ( The calculation is similar. The specific calculation formula is as follows:
[0135] ;
[0136] The maximum flight distance constraint is:
[0137] ;
[0138] in, Indicates drone u j Total flight distance, Indicates drone u j Maximum flight distance;
[0139] drone j Total flight distance The calculation formula is as follows:
[0140] ;
[0141] Among them, RTj Indicates the assignment to drone u j Task sequence, task Tasks in sequence The previous task (specifically, when o=1), Represented as the starting point Sp), task This indicates the last one assigned to drone u. j The task;
[0142] Through task allocation scheme X r Determine the initial pheromone intensity Assign to and Initial pheromone intensity The specific calculations are as follows:
[0143] ;
[0144] in, For X r The fitness value; m is the total number of tasks in the task allocation scheme;
[0145] fitness function The calculation is as follows:
[0146] ;
[0147] Where X is the constructed task allocation scheme, FT(X) and WT(X) represent the maximum completion time of all tasks and the average waiting time of all tasks, respectively, and ω is the weight parameter used to balance the objectives.
[0148] In step S3, a directed acyclic graph is constructed based on the pre-constraint relationships of the tasks. Specifically, this involves: first, abstracting each task as a node in the graph, forming a node set; then, based on the pre-constraint relationships between tasks, ensuring that "task t..." i Must be in task t j Under the condition of "previously executed", construct the node t i Pointing to node t j The directed edges are used to form an edge set; finally, a directed acyclic graph satisfying all preconditions is obtained, which is used for subsequent task scheduling and priority calculation; in each iteration, the set of optional tasks T that satisfy the preconditions is determined. p .
[0149] In step S4, based on the set of available tasks, in the ant colony optimization algorithm, the ants gradually construct a task allocation sequence through state transition rules: after selecting a task, the next task is selected based on the "task-task" pheromone matrix and heuristic information perceived by the task structure; wherein, the heuristic information is calculated by three heuristic factors: spatial proximity, critical path urgency, and topological influence; when selecting the next task in the current task, the ant refers to a single drone.
[0150] The state transition rule (i.e., from the current task t) w Select the next task. i The specific calculations are as follows:
[0151] ;
[0152] ;
[0153] Among them, T p This represents the set of currently feasible tasks; Represents task t w With candidate task t o The pheromone values between This indicates selecting task t in the current state. o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], I represents the task selected according to the probability distribution P1; the parameters α, β and q0 are pre-set constants; Indicates starting from the current task t w To task t o The probability of;
[0154] Task structure perception heuristic information It is calculated by weighting spatial proximity P(j), critical path urgency U(j), and topological influence I(j), and is expressed as:
[0155] ;
[0156] Where P(j) is through candidate task t j The average path distance between the current UAV and the last task executed by each UAV is calculated and normalized. U(j) is calculated and normalized by the sum of the task execution time and the longest path length of its successor task. I(j) is calculated and normalized by the number of successor tasks of the task in the directed acyclic graph. , as well as The weight parameters for the three;
[0157] Among them, the spatial proximity P(j) evaluation task t jSpatial proximity: Calculate the last task t performed by all currently assigned drones. u To task t j average distance :
[0158] ;
[0159] Among them, U prev It is the set of coordinates of the last task executed by the drones with assigned tasks (including the coordinates of the starting point Sp if there are unassigned drones); by adjusting D mean Normalization and taking the reciprocal yields P(j):
[0160] ;
[0161] Norm() is the Min-Max normalization function;
[0162] The critical path urgency U(j) measures the urgency of the critical path based on the task's position in the directed acyclic graph (DAG) formed by the pre-constraints; task t is defined. j The execution time plus the length of the longest path of all its successor tasks, Mt j The criticality of the task is denoted as C. j The higher the criticality, the greater the impact of the task on the overall optimization objective during the allocation process, and therefore it should be given priority. The formula for calculating U(j) is as follows:
[0163] ;
[0164] ;
[0165] Topological influence I(j) based on task t j The total number of subsequent tasks Ts j This measures the extent of its impact on subsequent tasks. The more subsequent tasks there are, the greater the likelihood that this task will be a bottleneck; therefore, it should be prioritized to avoid blocking subsequent processes. The formula for calculating I(j) is as follows:
[0166] ;
[0167] Figure 3 An example of calculating the longest path of successor tasks and the number of successor tasks is given. The left side is the directed acyclic graph structure of the original task, and the right side is the calculation result of the length Mt of the longest path of successor tasks and the total number of successor tasks Ts.
[0168] Taking task t1 as an example, it has multiple successor task paths, with the longest path being t1→t3→t6. The sum of the execution times for this path is the largest, so its Mt1 is the length of this path. Meanwhile, the successor tasks of t1 include t2, t3, t5, t6, and t7, so its Ts1 is the total number of successor nodes. Similarly, the Mt and Ts values for all task nodes can be calculated.
[0169] In the specific implementation process, a directed acyclic graph is first constructed based on the pre-task constraints. Then, a bottom-up dynamic programming approach is used to recursively calculate each task node: for a terminal node with no successor task, its Mt value is set to 0 and its Ts value is set to 0; for a node with a successor task, its Mt value is the maximum value of the execution time of all successor nodes plus the successor Mt, and its Ts value is the sum of the number of all successor nodes.
[0170] In step S5, for each task in the task allocation sequence, the ant selects drones from the unallocated drone set for execution based on the "task-drone" pheromone and heuristic information, incrementally building an execution alliance until the task capability requirements are met; when assigning drones to a task, the ant refers to a single task.
[0171] In step S5, task t i Choose drones j Inspirational information Defined as:
[0172] ;
[0173] Among them, FT i For task t i The completion time under the current alliance, T f For the set of assigned tasks;
[0174] The drone alliance required for each task is built using an incremental approach. This means that a drone meeting the maximum flight distance constraint is selected as the drone alliance. If the current drone alliance does not meet the drone capability constraint, another drone meeting the maximum flight distance constraint is selected and added to the current drone alliance. j The selection rules are as follows:
[0175] ;
[0176] ;
[0177] Where U' represents the candidate drone set, which includes unassigned drones; Represents task t i With candidate drones u o The pheromone values between Indicates the current task t i Choose drones o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], and J represents the probability distribution P. 2 The selected drone; parameters α, β, and q0 are preset constants; Indicates starting from the current task t i To drone u o The probability of.
[0178] In step S6, when a set of task allocation schemes from steps S3 to S5 is completed, local pheromone updates are performed on the "task-task" pairs and "task-UAV" pairs involved in the scheme.
[0179] Local pheromones The updated formula is:
[0180] ;
[0181] Where, k∈{1,2}, ρ l X is the local volatility coefficient. f This is the task allocation plan that has been completed.
[0182] The purpose of performing local pheromone updates is to prevent the same choices as historical task allocation schemes from being made during the construction of task allocation schemes for other groups, thereby enhancing the exploratory nature of the scheme, avoiding premature convergence to local optima, and improving the quality of the final scheme.
[0183] When an iteration is completed, that is, when multiple task allocation schemes (e.g., 20 groups) are completed, each scheme is evaluated by the fitness value function, and the current optimal task allocation scheme (global optimal solution) is selected, and global pheromone update is performed;
[0184] Global pheromones The updated formula is:
[0185] ;
[0186] Where, k∈{1,2}, ρ g X is the global volatility coefficient. b This is the globally optimal solution.
[0187] The purpose of performing global pheromone updates is to guide the task allocation scheme to concentrate in the region of historical best solutions during the construction of the scheme, thereby strengthening the best solution and continuously converging it.
[0188] Based on the updated global pheromone, the final task allocation scheme is obtained when the maximum number of iterations (usually set to 60) is met; otherwise, the process returns to step S3 to continue iterating.
[0189] Meanwhile, this invention provides:
[0190] A server includes a processor and a memory, the memory storing at least one program that is loaded and executed by the processor to implement the above-described urban airspace multi-UAV task allocation method based on task structure awareness.
[0191] A computer-readable storage medium storing at least one program, which is loaded and executed by a processor to implement the above-described urban airspace multi-UAV task allocation method based on task structure perception.
[0192] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for allocating multiple unmanned aerial vehicle (UAV) tasks in urban airspace based on task structure perception, characterized in that, Includes the following steps: S1. Construct a city airspace map and obtain several tasks; based on the city airspace map, determine the distance between any two tasks for subsequent calculations of preconditions, maximum flight distance constraints, and spatial proximity. S2. Initialize the task set and the drone set, and establish the "task-task" pheromone matrix and the "task-drone" pheromone matrix; based on the task set and the drone set, generate an initial task allocation scheme that satisfies the capability constraints, preconditions, and maximum flight distance constraints, so as to determine the initial pheromone intensity of the pheromone matrix. S3. Construct a directed acyclic graph based on the task preconditions and determine the set of optional tasks that satisfy the task preconditions. S4. Based on the set of available tasks, in the ant colony optimization algorithm, a task allocation sequence is constructed step by step through state transition rules: after selecting a task, the next task is selected based on the "task-task" pheromone matrix and heuristic information perceived by the task structure; wherein, the heuristic information is calculated by three heuristic factors: spatial proximity, critical path urgency and topological influence. S5. For each task in the task allocation sequence, based on the "task-drone" pheromone and heuristic information, incrementally build a drone alliance until the task requirements are met. S6. When a set of task allocation schemes from steps S3 to S5 is completed, perform a local pheromone update on the pheromone matrix and search for multiple sets of task allocation schemes. When an iteration is completed, that is, when multiple task allocation schemes are completed, the current optimal task allocation scheme is selected by evaluating the adaptive value function, and a global pheromone update is performed. Based on the updated global pheromone, the final task allocation scheme is obtained when the maximum number of iterations is met.
2. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 1, characterized in that, S1 refers to constructing an urban airspace map: establishing a set of road centerlines X={x1,x2,…,x…} N }、Y={y1,y2,…,y M The set of intersection nodes formed by} and their intersections is Intersection={(x i ,y j )|1≤i≤N, 1≤j≤M}; and divide the building obstacle area according to the road width to obtain the flight space constrained by the road network; Where X and Y represent the set of transverse road centerlines and the set of longitudinal road centerlines, respectively; x i y j Let N and M represent the i-th horizontal road and the j-th vertical road, respectively, and let N and M be the total number of horizontal roads and the total number of vertical roads, respectively. Given several tasks, the distance between any two tasks on the city airspace map is defined as: ; Among them, (x i , y i ), (x j , y j ) are tasks , Two-dimensional coordinates, and Let i and j represent the i-th task and the j-th task, respectively, where i ≠ j; Indicates task The two nearest intersections in opposite directions on the same road; Indicates task The two nearest intersections in opposite directions on the same road; Indicates from After passing intersections k and l, to The total cost of the Manhattan distance path.
3. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 1, characterized in that, Step S2 is to define the set of drones as U={u1, u2, …, u n }, where n is the number of heterogeneous drones, and the i-th drone u i Represented as (Uid) i , Uv i , Uc i Md i These correspond to the drone identifier, the drone's constant flight speed, the drone's 1-dimensional capabilities, and its maximum flight distance, respectively; a drone alliance is constructed based on the drone set, and the drone alliance is represented by 'a'. k This means that k is encoded as a binary number, where a position with a 1 indicates that the drone at that position number belongs to that alliance; the task set is defined as T = {t1, t2, …, t}. m }, where m is the number of tasks, and the i-th task t i Represented as (Tid) i , Tp i ,Te i , Tc i Pre i These correspond to the task identifier, task location, task execution time, task required 1-dimensional capability, and set of preceding tasks, respectively. Establish the "task-task" pheromone matrix τ1 and the "task-UAV" pheromone matrix τ2 as follows: ; ; in, Represents task t i With task t j The pheromone values between them Represents task t i With drones j The pheromone values between them; Based on the task set and the UAV set, generate a task allocation scheme X that satisfies capability constraints, prerequisite constraints, and maximum flight distance constraints. r Through task allocation scheme X r Determine the initial pheromone intensity Assign to and Initial pheromone intensity The specific calculations are as follows: ; in, For X r The fitness value; m is the total number of tasks in the task allocation scheme; fitness function The calculation is as follows: ; Where X is the constructed task allocation scheme, FT(X) and WT(X) represent the maximum completion time of all tasks and the average waiting time of all tasks, respectively, and ω is the weight parameter used to balance the objectives.
4. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 3, characterized in that, The specific capability constraints, prerequisite constraints, and maximum flight distance constraints are as follows: The specific capability constraints are: ; in, Indicates drone u j The capabilities provided in the z-th dimension Represents task t i The capability required in the z-th dimension This indicates a randomly selected drone alliance; The preconditions are: ; in, Represents task t o Completion time, Represents task t i The waiting time for task t o Located in task t i In the set of prerequisite tasks; Define the Drone Alliance Execute task t i Time for; ; in, Represents task t i Required execution time; Task t i Waiting time The specific calculation formula is as follows: ; ; in, Indicates drone u j Arrive at mission t i Time, Indicates in task t i Previously immediately assigned to drone u j The task Indicates task To task t i The distance between them; Indicates drone u j A constant flight speed; Task t i Completion time , The specific calculation formula is as follows: ; The maximum flight distance constraint is: ; in, Indicates drone u j Total flight distance, Indicates drone u j Maximum flight distance; drone j Total flight distance The calculation formula is as follows: ; Among them, RT j Indicates the assignment to drone u j Task sequence, task Tasks in sequence The previous task, task This indicates the last one assigned to drone u. j The task.
5. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 1, characterized in that, In step S4, the state transition rule, that is, from the current task t... w Select the next task. i Specifically: ; ; Among them, T p This represents the set of currently feasible tasks; Represents task t w With candidate task t o The pheromone values between them This indicates selecting task t in the current state. o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], I represents the task selected according to the probability distribution P1; the parameters α, β and q0 are pre-set constants; Indicates starting from the current task t w To task t o The probability of; Task structure perception heuristic information It is calculated by weighting spatial proximity P(j), critical path urgency U(j), and topological influence I(j), and is expressed as: ; in, , as well as These are the weight parameters for the three.
6. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 5, characterized in that, The spatial proximity P(j), critical path urgency U(j), and topological influence I(j) are as follows: Spatial proximity P(j) assessment task t j Spatial proximity: Calculate the last task t performed by all currently assigned drones. u To task t j average distance : ; Among them, U prev It is the set of coordinates of the last mission executed by the drone that has been assigned a task; by analyzing D mean Normalization and taking the reciprocal yields P(j): ; Norm() is the Min-Max normalization function; The critical path urgency U(j) measures the urgency of the critical path based on the task's position in the directed acyclic graph formed by the pre-constraints: Define task t j The execution time plus the length of the longest path of all its successor tasks, Mt j The criticality of the task is denoted as C. j The formula for calculating U(j) is as follows: ; ; Topological influence I(j) based on task t j The total number of subsequent tasks Ts j To measure its impact on subsequent tasks, the formula for calculating I(j) is as follows: 。 7. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 1, characterized in that, In step S5, the incremental construction of the drone alliance is specifically as follows: The drone alliance required for each task is built using an incremental approach. This means that a drone meeting the maximum flight distance constraint is selected as the drone alliance. If the current drone alliance does not meet the drone capability constraint, another drone meeting the maximum flight distance constraint is selected and added to the current drone alliance. j The selection rules are as follows: ; ; Where U' represents the set of candidate drones; Represents task t i With candidate drones u o The pheromone values between them Indicates the current task t i Choose drones o The heuristic information; q is a random number uniformly sampled from the interval [0, 1], and J represents the probability distribution P. 2 The selected drone; parameters α, β, and q0 are preset constants; Indicates starting from the current task t i To drone u o The probability of; Task t i Choose drones j Inspirational information Defined as: ; Among them, FT i For task t i The completion time under the current alliance, T f For the set of assigned tasks.
8. The urban airspace multi-UAV task allocation method based on task structure perception according to claim 1, characterized in that, In step S6, the local pheromone and global pheromone updates are specifically as follows: When completing a set of task allocation schemes from steps S3 to S5, perform local pheromone updates on the "task-task" pairs and "task-UAV" pairs involved in the scheme; Local pheromones The updated formula is: ; Where, k∈{1,2}, ρ l X is the local volatility coefficient. f This is the task allocation plan for the completed task; When an iteration is completed, that is, when multiple task allocation schemes are completed, each scheme is evaluated by the fitness value function, and the current optimal task allocation scheme is selected and a global pheromone update is performed. Global pheromones The updated formula is: ; Where, k∈{1,2}, ρ g X is the global volatility coefficient. b This represents the current optimal task allocation scheme.
9. A server, characterized in that, The server includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the urban airspace multi-UAV task allocation method based on task structure perception as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is loaded and executed by a processor to implement the urban airspace multi-UAV task allocation method based on task structure perception as described in any one of claims 1 to 8.