Unmanned aerial vehicle urban inspection task allocation method based on two-order heuristic algorithm

By treating the drone city inspection task as a dynamic vehicle path optimization problem with multi-dimensional constraints, a two-stage heuristic algorithm is used to distribute tasks, which solves the problem of drone task allocation in multi-constrained and highly collaborative environments, and achieves efficient and excellent task allocation results.

CN119886629APending Publication Date: 2025-04-25AVIC JINCHENG UNMANNED SYST CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411798010.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In a multi-constrained and highly coordinated environment, how to reasonably allocate tasks among multiple drones to ensure coverage of all patrol requirements while minimizing flight costs and completion time.

Method used

The drone city inspection task is regarded as a dynamic vehicle path optimization problem with multi-dimensional constraints, and a two-stage heuristic algorithm is used to allocate tasks. The first stage is a heuristic feasible solution collection search, and the second stage is a heuristic decision-making path planning, combining genetic algorithms and ant colony algorithms to improve task allocation efficiency and quality.

Benefits of technology

Through the combination of two-stage decomposition and heuristic algorithm, the difficulty of finding global optimality is reduced, the quality of local optimal solutions is avoided, and the efficiency and quality of task allocation is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886629A_ABST
    Figure CN119886629A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle urban inspection task allocation method based on a two-stage heuristic algorithm, and the method comprises the steps: regarding an unmanned aerial vehicle urban inspection task as a multi-dimensional constrained dynamic path planning problem, and simplifying the dynamic path planning problem into a two-stage static planning problem for solving; the first stage is called heuristic feasible solution set search, and after a round of decision is executed and state transition is completed, a feasible solution set of a next round of decision is heuristically searched in multi-dimensional constraints; the second stage is heuristic decision path planning, and an optimal decision path is searched in a feasible solution set of multiple rounds of decision. According to the method, through two-order decomposition, a complex dynamic programming problem is decomposed into two layers of static linear programming problems, and heuristic algorithms are used in the two layers; on one hand, the difficulty of solving the global optimum problem is reduced, and on the other hand, the poor quality of the overall solution caused by the relative optimum of each round of decision solution is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for allocating unmanned aerial vehicle (UAV) urban inspection tasks based on a two-order heuristic algorithm, and belongs to the application technology of unmanned aerial vehicles (UAVs) in urban inspections. Background Art

[0002] With the development of smart cities, drones, as an efficient inspection tool, are playing an increasingly important role in urban management. However, drones face many challenges when performing inspection tasks. For example, the urban road network is vast and the tasks are complexly distributed. Each section of road may have different inspection requirements, such as inspection accuracy, coverage or time requirements. At the same time, some roads have higher priorities due to their importance or emergency situations, and inspection work needs to be completed on time without delay.

[0003] As the main body of the task execution, drones have limited endurance and load capacity. Their initial position, flight time between tasks, and energy consumption all impose additional constraints on task allocation. In addition, the flight path of drones may be restricted by external environments such as no-fly zones and weather conditions, further increasing the complexity of task scheduling. For some large inspection areas, multiple drones are required to work together to complete the task. During the collaboration process, the task parts of each drone must be reasonably allocated to avoid resource waste or duplication of work. In addition, due to the dynamic changes in the urban environment, task requirements may be updated in real time, which requires drones to dynamically adjust their task allocation and path planning to ensure the flexibility and efficiency of the overall inspection work. In these cases, how to reasonably allocate tasks among multiple drones to ensure that all inspection needs are covered while minimizing flight costs and completion time is an important research issue.

[0004] At present, there are two solutions for drone task planning that can be used as reference for road and regional inspection task planning in smart cities. One is the two-stage optimization method for drone task distribution, and the other is the multi-drone task allocation method for power inspection.

[0005] The implementation steps of the two-stage optimization method for UAV task distribution generally include:

[0006] Step 1: Environmental modeling and initialization: Establish mission parameters and UAV initial parameters in a two-dimensional space coordinate system; mission parameters include distribution location, delivery demand, and priority; UAV parameters include nest location, endurance, and flight speed.

[0007] Step 2: Establish a directed graph mathematical model: abstract tasks and machine nests as nodes in the graph, abstract the paths from machine nests to tasks and the paths from tasks to tasks as edges in the graph, and define the objective function, which is generally the overall task completion time and the weight of the penalty for late delivery.

[0008] Step 3, multi-task allocation: Use mixed integer programming or heuristic algorithms (such as particle swarm algorithm, taboo search algorithm, bee colony / ant colony algorithm, genetic algorithm, etc.) to allocate multiple tasks. During the allocation process, do not consider which drone will execute the task and the drone's endurance constraints. Only consider the task requirements and time window constraints to obtain the optimal task allocation plan.

[0009] Step 4: Based on the allocation plan obtained in step 3, the objects to perform the tasks are allocated from the available UAV resources, and the endurance constraints of a single UAV flight are considered. The task allocation plan is further decomposed to obtain the optimal paths for each UAV when they jointly complete all tasks in the task set.

[0010] The implementation steps of the power inspection multi-UAV task allocation method generally include:

[0011] Step 1: Based on the acquired power line data, a distribution map of the power lines to be inspected is constructed, and the power grid routes in the area are divided into a number of arc segments.

[0012] Step 2: Use the mixed integer programming method to determine the objective function as to whether a certain UAV is assigned to a certain task, and use the upper limit of the UAV transfer cost as the constraint function to solve the allocation result.

[0013] Of the two methods mentioned above, the first one mainly solves the problem of constrained drone logistics distribution, and the second one mainly solves the path planning problem in power inspection. In the first solution, the task is a "point", and the drone needs to reach the task point to deliver materials; in the second solution, the task is a "line", and the drone needs to plan the inspection path to avoid obstacles and improve economic efficiency. However, the task is a number of continuous large-scale tasks, and there is often no time window constraint. Multiple drones mainly cooperate in parallel in independent spatial domains, rather than in the same area in the time domain.

[0014] The use of drones to perform road and regional inspection tasks in smart cities is somewhat different from the problems solved by the above two solutions. Unlike the first one, urban inspections require coverage flights on linear or loop roads, and the mission length is often far longer than the single-shot range of the drone; this means that when a drone completes a certain area inspection of a certain mission in one sortie, the starting point of the next mission will change, and the distance from the machine nest to the starting point of this mission and the distance from other tasks to the starting point of this mission will change; therefore, unlike the task planning for drone logistics distribution problems, urban inspections are a dynamic planning problem rather than a static planning problem. Unlike the second one, urban inspections are composed of a large number of scattered individual tasks, and individual tasks are constrained by their own priorities and time windows. For tasks with high priority and tight time, multiple drone resources need to be dispatched to perform task inspections in segments at the same time. Summary of the invention

[0015] Purpose of the invention: In order to overcome the shortcomings of the prior art, the present invention provides a method for allocating UAV urban inspection tasks based on a two-order heuristic algorithm, aiming to solve the problems of task allocation and collaborative optimization in a multi-constraint and highly collaborative environment; the present invention regards the urban inspection task as a dynamic vehicle path optimization problem with multi-dimensional constraints, and decomposes it into two stages: "heuristic search of feasible solution sets" and "heuristic decision path planning", combining genetic algorithm and ant colony algorithm to improve the efficiency and quality of task allocation.

[0016] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:

[0017] A method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm regards the UAV urban inspection task as a dynamic path planning problem with multi-dimensional constraints, and simplifies the dynamic path planning problem into a two-stage static planning problem for solution; the first stage is called heuristic feasible solution set search, after executing a round of decision-making and completing state transfer, the feasible solution set for the next round of decision-making is heuristically searched in multi-dimensional constraints; the second stage is called heuristic decision path planning, which searches for the optimal decision path in the feasible solution set of several rounds of decisions.

[0018] Specifically, a directed graph model structure is constructed to represent the task state of the drone city inspection task. The directed graph model structure includes a drone set D = {d1, d2, ..., d K} and the task set T consisting of T path task nodes = {t1, t2, …, t T}, the connection between nodes is regarded as a directed edge, represented by arc(a,b) and arc(b,a), a,b∈T∪K, and a≠b;

[0019] Define the properties of the drone node, including: ① The location of the drone nest d k stationPos: The drone returns to the nest to recharge when the remaining endurance is insufficient; ② Maximum endurance; ③ Remaining endurance d k ·remained: equal to the maximum endurance in the initial state; ④ Sailing speed d k ·travelVel;⑤Patrol speed d k ·taskVel;⑥Ready time d k readTime: The time when the drone can perform the next mission after completing the current mission or charging;

[0020] Define the attributes of the task node, including: ① Task requirement: the total distance required for the UAV to complete the path task; ② Time window [t t beginTime,t t ·endTime]: expressed as the task preparation start time and task preparation end time. The task execution start time is later than the task preparation start time, and the task execution end time is earlier than the task preparation end time; ③ Task priority t t priority: When the path task needs to be completed in a specified time period, the priority of the path task in the specified time period is increased; if the path task cannot be executed in the specified time period, the priority of the path task in the specified time period is set to 0; ④ Remaining task requirements t t ·remained: the initial time is equal to the task requirement; ⑤Cycle period / number of cycles: expressed based on the time window attribute;

[0021] Define the properties of directed edges, including: ① Forward edge cost: arc(a,b)·cost, the distance from the current position of the drone to the starting point of the mission; ② Reverse edge cost arc(b,a)·cost, the distance from the end point of the mission back to the drone nest.

[0022] Specifically, after a round of decision-making is completed, the task status of the drone city inspection task changes, the interruption position of the path task is used as the task starting point of the next round of decision-making, the directed graph model structure is updated, and the state transfer is completed, including:

[0023] ① Changes in the remaining task requirements: If a path task is executed in this round of decision-making, the amount of tasks executed in this round of decision-making is subtracted from the remaining task requirements. If the result is 0, the path task is considered completed and removed from the task set;

[0024] ② Change of task starting point: If a path task is executed in this round of decision-making, but the remaining task demand of the path task is greater than 0, the task starting point of the next round of decision-making is changed to the interruption position of the path task, and the directed edge cost related to this task changes:

[0025] arc(d a(a∈K) ,t t )·cost, which means the cost from the drone d a Current location to task t t The distance of the interruption position;

[0026] arc(t b(b∈T,b≠t) ,t t )·cost, which means the cost from other tasks t b The end position of task t t The distance of the interruption position;

[0027] ③ Changes in the time window: Each round of decision-making takes time to determine and execute. As the current round of decisions is determined and executed, the distance between the current time and the task preparation end time changes;

[0028] ④ Change of priority: Unlike the previous three influences, priority is an external input influence, generally triggered by user operations, not the result of decision execution; but the change of priority will inevitably affect the set of feasible solutions for the next round of decision-making.

[0029] Specifically, in each round of decision-making in the heuristic feasible solution set search stage, a two-level chromosome encoding method is used to first solve the feasible solution set that meets the multidimensional constraints, and then select a feasible solution from the feasible solution set as the decision solution; the multidimensional constraints for solving the feasible solution set include one or more of the following constraints: ① Endurance constraint: The UAV has a fixed maximum endurance, which needs to take into account the loss between tasks and the loss of returning to the nest; ② Time window constraint: The tasks to be executed need to be completed within the time window, and a penalty will be incurred if the time is exceeded; ③ Priority constraint: Tasks with high priority are executed earlier than tasks with low priority; ④ Task requirement constraint: The total task volume of tasks to be executed is less than or equal to the total remaining task requirement; ⑤ Multi-UAV cooperation constraint: A single task to be executed that cannot be completed by a single UAV is assigned to multiple UAVs for joint execution; ⑥ Task integrity: If the remaining task requirement of a task is less than or equal to the maximum endurance of the UAV, the task shall not be split.

[0030] The method for allocating UAV urban inspection tasks based on the two-stage heuristic algorithm specifically includes the following steps:

[0031] Step 1: Identify and read the UAV city inspection mission information, decompose it into T path tasks, and represent each path task as a list of location points along the way, including the mission start point and the mission end point;

[0032] Step 2: deploy K drone resources on the mission road or in the mission area;

[0033] Step 3: Construct a directed graph model structure to represent the task status of the UAV city inspection task. The directed graph model structure includes a UAV set D = {d1, d2, ..., d K} and the path task set T consisting of T path task nodes = {t1, t2, …, t T}, the connection between nodes is regarded as a directed edge, represented by arc(a,b) and arc(b,a), a,b∈T∪K, and a≠b;

[0034] Step 4: Set the total number of ants in the ant colony to P, the pth ant is called ant p; the total number of iterations of the ant colony is Q, the qth iteration is called the qth generation ant colony, and the initial value q = 1;

[0035] Step 5: Perform multiple rounds of decision-making on the T path tasks, and use a heuristic feasible solution set search method to calculate the decision solution of each round of decision-making. The decision solution expresses the path tasks, task amounts, and execution order assigned to each of the K drones in the current round of decision-making; the heuristic feasible solution set search method uses a two-level chromosome encoding method to first solve a feasible solution set that meets multidimensional constraints, and then uses an ant colony algorithm to select a feasible solution from the feasible solution set as the decision solution, including the following steps:

[0036] Step 5.1, initialize r=1;

[0037] Step 5.2: Generate initial population

[0038] The first level of chromosome encoding: path task allocation, which determines which path tasks are pending tasks for the rth round of decision, the task volume of each pending task, and which drones will perform each pending task; consider the priority from high to low to allocate path tasks; add up the remaining endurance of all drones as the total endurance pool to ensure that the total task volume is less than or equal to the total endurance pool; drones that cannot reach the task starting point from the machine nest position do not participate in task allocation; drones whose ready time is later than the task preparation start time do not participate in task allocation; all pending tasks and corresponding drones of the rth round of decision are expressed as a gene;

[0039] Second-level chromosome encoding: Task volume adjustment, determine the task volume and execution order assigned to each drone, and optimize the path task allocation plan; for each drone, high-priority path tasks are executed earlier than low-priority path tasks, while considering inter-task loss and return loss; the task volume and execution order assigned to each drone are supplemented and expressed in the genes obtained by the first-level chromosome encoding to obtain the genes of the initial population;

[0040] If the genes of the initial population cannot be obtained, then R = r, and go to step 6;

[0041] Step 5.3: Selection, crossover, and mutation

[0042] The genes of the initial population are selected, crossed, and mutated. The tasks to be executed by the drones are randomly changed during the first-level chromosome encoding process, and the execution order of the drones is randomly changed during the second-level chromosome encoding process. Finally, N genes are obtained, which are all N feasible solutions for the r-th round of decision-making.

[0043] Step 5.4: Calculate the fitness of each feasible solution

[0044] Calculate the fitness of the nth feasible solution in the rth round of decision making for:

[0045]

[0046] in: is the total time consumption indicator, which represents the sum of the flight time and execution time spent by the drone to complete the total task volume of the rth round of decision-making; is the total coverage task volume indicator, which represents the sum of the tasks that have been assigned and completed; The overtime penalty index for task completion time: the penalty for the path task whose completion time is later than the task preparation end time is calculated according to the overtime degree; is the remaining task fragmentation penalty index. For the assigned but uncompleted path tasks, if the remaining task demand is less than the threshold, the penalty is calculated; θ1, θ2, θ3, and θ4 represent the weight coefficients of balancing each index;

[0047] Step 5.5: Determine the decision solution for the rth round of decision making

[0048] The fitness of the feasible solution is used as the visibility value in the ant colony algorithm, combined with the path The pheromone strength on the ant p is solved to find the probability that the ant p chooses the nth feasible solution. Will The corresponding feasible solution is the decision solution of ant p Solve the decision of the rth round of decision and all previous rounds of decision solutions to form the path chosen by ant p

[0049] Step 5.6: Each ant executes the decision solution of the rth round according to its own decision solution, and then uses the interruption position of the path task in the rth round of decision as the task starting point of the path task in the r+1th round of decision, and updates the remaining task requirements t t remained, if updated t If remained is 0, then the path task t t After the execution is completed, the path task is removed from the task set; the directed graph model structure is updated to complete the task status transfer;

[0050] Step 5.7: Determine whether all path tasks have been completed: if not, then r++, return to step 5.2; if yes, then R=r, go to step 6;

[0051] Step 6: Calculate the quality index of the path selected by each ant. The decision path selected by ant p is Quality Index p for:

[0052]

[0053] Step 7: max(L p ,p∈P) is the path corresponding to the optimal decision path. Optimal decision path The quality index is L q ; Update the optimal decision path The pheromone intensity on the surface, the pheromone intensity increase Δτ is:

[0054]

[0055] Among them: S represents the pheromone intensity released per unit cost, S is a constant, and the larger S is, the faster the convergence;

[0056] Step 8: Compare the best decision paths The quality index of the global optimal solution is If the quality index of is greater than the quality index of the global optimal solution, the global optimal solution is updated to the optimal decision path. Otherwise, maintain the global optimal solution;

[0057] Step 9: If q<Q, then q++, and return to step 5; if q=Q, it indicates that the ant colony iteration is completed.

[0058] Specifically, the priority ranges from 0 to 9, the larger the value, the higher the priority, and the value 0 indicates that flight is prohibited.

[0059] Specifically, in step 1, the UAV city inspection mission information is identified and read, and the linear mission is expressed as a list of longitudes and latitudes of waypoints based on the longitude and latitude coordinates of the two-dimensional map of the mission road or mission area. The surface mission is decomposed into loop paths according to the nature of the mission and the density of the mission, and then expressed as a list of longitudes and latitudes of waypoints.

[0060] Beneficial effects: The method for allocating urban inspection tasks for drones based on a two-stage heuristic algorithm provided by the present invention has the following advantages over the prior art: 1. Through two-order decomposition, a complex dynamic programming problem is decomposed into two levels of static linear programming problems, and heuristic algorithms are used at both levels; on the one hand, the difficulty of obtaining the global optimum is reduced, and on the other hand, the relative optimum of each round of decision-making solution is avoided, which results in poor quality of the overall solution. 2. A genetic algorithm is used to find a feasible solution set for a decision. Its randomness allows the elements in the solution set to remain different, avoiding the problem of the overall optimization search falling into a local optimum; its guidance improves the relative quality of a single solution, allowing the algorithm to converge within a certain algebra. 3. In the first-order heuristic search process, an ant colony algorithm is used to obtain the optimal decision path; other similar algorithms such as a bee colony algorithm, a particle swarm algorithm, etc. can be used to solve the optimal decision path. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a schematic diagram of the basic process of genetic algorithm;

[0062] Figure 2 Schematic diagram of the process of searching for feasible solutions;

[0063] Figure 3 A schematic diagram of the solution path that the ant colony passes through;

[0064] Figure 4 It is a schematic diagram of the implementation process of the present invention. DETAILED DESCRIPTION

[0065] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0066] The allocation of UAV city inspection tasks is a core challenge in the application of UAVs in smart cities, which requires the implementation of task allocation and collaborative optimization in a dynamic, multi-constrained, and highly collaborative environment. The present invention provides a task allocation method based on a two-stage heuristic algorithm, which regards the UAV city inspection task as a dynamic path planning problem with multi-dimensional constraints, and simplifies the dynamic path planning problem into a two-stage static planning problem for solution; the first stage is called heuristic feasible solution set search, after executing a round of decision-making and completing state transfer, the feasible solution set of the next round of decision-making is heuristically searched in multi-dimensional constraints; the second stage is called heuristic decision path planning, which searches for the optimal decision path in the feasible solution set of several rounds of decisions.

[0067] The vehicle routing problem (VRP) is a classic combinatorial optimization problem. After adding multi-dimensional constraints, it can be transformed into a vehicle routing problem with capacity constraints (CVRP), a hybrid vehicle routing problem (HVRP), a vehicle routing problem with time window constraints (VRP-TW), a multi-objective vehicle routing problem (MOVRP), a decomposable demand vehicle routing problem (SDVRP), and a dynamic vehicle routing problem (DVRP).

[0068] The present invention solves the problem of drone city inspection, which can be regarded as a particularly complex vehicle routing problem, including: multi-center (there are multiple drone nests in the system), capacity-limited (drones have endurance limitations), time window constraints (tasks have time window requirements), priority constraints (tasks have priority requirements), demand-divisible (a task is allowed to be completed by multiple drone sorties in collaboration), mixed vehicles (drones with different endurance and speeds in the system), multi-target (need to take into account both the total time spent and the total task completion rate), and dynamic (as the task is executed, the starting point of the task and the remaining task volume are constantly changing) vehicle routing problems.

[0069] However, it is different from the vehicle routing problem in that the vehicle routing problem solves problems in the field of logistics and distribution, so the task is generally expressed as a point with the attribute of demand. However, in the problem solved by the present invention, the task is a patrol route, which is a list of several points. The present invention is further explained below in conjunction with specific implementation steps.

[0070] Step 1: Identify and read the drone city inspection mission information

[0071] Identify and read UAV city inspection mission information, including mission roads or mission areas, time window requirements and priorities, to extract relevant information of path mission nodes.

[0072] The task road or task area, first, according to the latitude and longitude coordinates of the two-dimensional map of the task road or task area, expresses the linear task as a list of longitude and latitude of the way points, and decomposes the surface task into loop paths according to the nature of the task and the task density, and then expresses it as a list of longitude and latitude of the way points; then, the task is decomposed to obtain T path tasks, and each path task is represented as a list of location points passed by, including the task starting point and the task end point.

[0073] The time window requirement is expressed as the start execution time and the end execution time of the UAV city inspection task.

[0074] The priority ranges from 0 to 9, the larger the value, the higher the priority, and the value 0 indicates that flight is prohibited.

[0075] Step 2: Configure K drone resources on the mission road or mission area

[0076] According to the urban environment and task density, K drone resources are deployed in the task road or task area, and the relevant information of the drone nodes is extracted, including: ① the location of the drone's nest; ② the maximum endurance of the drone; ③ the navigation speed of the drone; ④ the inspection speed of the drone.

[0077] Step 3: Construct a directed graph model structure to represent the task status of the UAV city inspection task

[0078] The directed graph model structure includes a drone set D = {d1, d2, …, d K} and the path task set T consisting of T path task nodes = {t1, t2, …, t T}, the lines between the nodes are regarded as directed edges, represented by arc(a,b) and arc(b,a), a,b∈T∪K, and a≠b.

[0079] Define the properties of the drone node, including: ① The location of the drone nest d k stationPos: The drone returns to the nest to recharge when the remaining endurance is insufficient; ② Maximum endurance; ③ Remaining endurance d k ·remained: equal to the maximum endurance in the initial state; ④ Sailing speed d k ·travelVel;⑤Patrol speed d k ·taskVel;⑥Ready time d k readTime: The time when the drone can execute the next mission after completing the current mission or charging.

[0080] Define the attributes of the task node, including: ① Task requirement: the total distance required for the UAV to complete the path task; ② Time window [t t beginTime,t t ·endTime]: expressed as the task preparation start time and task preparation end time. The task execution start time is later than the task preparation start time, and the task execution end time is earlier than the task preparation end time. If a path task requires execution time within 1 hour, the time window is [t0, t0+60×60], where t0 is the task execution start time. ③ Task priority t tpriority: When the path task needs to be completed in a specified time period, the priority of the path task in the specified time period is increased; if the path task cannot be executed in the specified time period, the priority of the path task in the specified time period is set to 0; ④ Remaining task requirements t t ·remained: the initial time is equal to the task requirement; ⑤Cycle period / number of cycles: expressed based on the time window attribute; if a path task requires 2 cycles per day, the time window of task copy 1 is [0:00, 12:00], and the time window of task copy 2 is [12:00, 24:00]; if a path task requires 2 cycles per week, the time window of task copy 1 is [Monday 0:00, Wednesday 12:00], and the time window of task copy 2 is [Wednesday 12:00, Friday 24:00].

[0081] Define the properties of directed edges, including cost. The cost represents the flight route distance between different nodes (not the straight-line distance). Since the two nodes have different directions, there are two edges in the forward and reverse directions: ① Forward edge cost: arc(a,b)·cost, the distance from the current position of the drone to the starting point of the mission; ② Reverse edge cost arc(b,a)·cost, the distance from the end point of the mission back to the drone nest, arc(a,b)·cost≠arc(b,a)·cost.

[0082] Step 4: Use the ant colony algorithm to obtain the global optimal solution for the optimal decision path

[0083] Suppose the total number of ants in the ant colony is P, and the pth ant is called ant p; the total number of iterations of the ant colony is Q, and the qth iteration is called the qth generation ant colony, and the initial value q=1.

[0084] Step 5: Use the heuristic feasible solution set search method to calculate the decision solution for each round of decision making

[0085] Multiple rounds of decision-making are carried out on T path tasks, and the decision solution of each round of decision-making is calculated by using a heuristic feasible solution set search method. The decision solution expresses the path tasks, task amounts and execution order assigned to each of the K drones in the current round of decision-making; the heuristic feasible solution set search method adopts a two-level chromosome encoding method to first solve a feasible solution set that meets multidimensional constraints, and then uses an ant colony algorithm to select a feasible solution from the feasible solution set as the decision solution.

[0086] The multidimensional constraints for solving the feasible solution set include one or more of the following constraints: ① Endurance constraint: The UAV has a fixed maximum endurance, which needs to take into account the loss between tasks and the loss of returning to the nest; ② Time window constraint: The tasks to be executed need to be completed within the time window, and a penalty will be incurred if the time is exceeded; ③ Priority constraint: High-priority tasks to be executed before low-priority tasks to be executed; ④ Task demand constraint: The total task volume of the tasks to be executed is less than or equal to the total remaining task demand; ⑤ Multi-UAV cooperation constraint: A single task to be executed that cannot be completed by a single UAV is assigned to multiple UAVs for joint execution; ⑥ Task integrity: If the remaining task demand of a task is less than or equal to the maximum endurance of the UAV, the task shall not be split; Considering the simplification problem, as long as the endurance allows, the path task will not be split.

[0087] The heuristic feasible solution set search method is used to calculate the decision solution for each round of decision making, including the following steps:

[0088] Step 5.1, initialize r=1.

[0089] Step 5.2: Generate initial population

[0090] The first level of chromosome encoding: path task allocation, which determines which path tasks are the tasks to be executed in the rth round of decision-making, the task volume of each task to be executed, and which drones will execute each task to be executed; consider the priority from high to low to perform path task allocation; do not strictly calculate the endurance constraint of each drone, because the execution order will affect the overhead, so the remaining endurance of all drones is accumulated as the total endurance pool, ensuring that the total task volume is less than or equal to the total endurance pool; drones that cannot reach the task starting point from the machine nest position, or drones that are far away from the machine nest to the task starting point do not participate in task allocation; considering the available time of the drone, drones whose ready time is later than the task preparation start time do not participate in task allocation.

[0091] All tasks to be executed and the corresponding drones in the rth round of decision are expressed as a gene.

[0092] Example: [[1,3],[2],[1],[3],[2]], which means that path task t1 is assigned to drones d1 and d3, path task t2 is assigned to drone d2, path task t3 is assigned to drone d1, path task t4 is assigned to drone d3, and path task t5 is assigned to drone d2.

[0093] The second level chromosome encoding: task volume adjustment, determine the task volume and execution order assigned to each drone, and optimize the path task allocation plan; for each drone, high-priority path tasks are executed earlier than low-priority path tasks, while considering the loss between tasks and the loss of returning to the nest, and considering the remaining endurance limit of the drone.

[0094] The amount of tasks assigned to each drone and the order of execution are supplemented and expressed in the genes obtained by the first-level chromosome encoding to obtain the genes of the initial population.

[0095] Example: It means that drone d1 executes path task t1 and then executes path task t3, and there is no subsequent task, where the task amount of path task t1 is x1; drone d2 executes path task t2 and then executes path task t5, and there is no subsequent task; drone d3 executes path task t4 and then executes path task t1, and there is no subsequent task, where the task amount of path task t1 is x2.

[0096] If the genes of the initial population cannot be obtained, then R = r, and go to step 6;

[0097] Step 5.3: Selection, crossover, and mutation

[0098] The genes of the initial population are selected, crossed, and mutated. The tasks to be performed by the drones are randomly changed during the first-level chromosome encoding process, and the execution order of the drones is randomly changed during the second-level chromosome encoding process. Finally, N genes are obtained, which are all N feasible solutions for the r-th round of decision-making.

[0099] Step 5.4: Calculate the fitness of each feasible solution

[0100] Calculate the fitness of the nth feasible solution in the rth round of decision making for:

[0101]

[0102] in: is the total time consumption indicator, which represents the sum of the flight time and execution time spent by the drone to complete the total task volume of the rth round of decision-making; is the total coverage task volume indicator, which represents the sum of the tasks that have been assigned and completed; The overtime penalty index for task completion time: the penalty for the path task whose completion time is later than the task preparation end time is calculated according to the overtime degree; is the remaining task fragmentation penalty index. For the assigned but uncompleted path tasks, if the remaining task demand is less than the threshold (such as the minimum valuable mileage), the penalty is calculated; θ1, θ2, θ3, and θ4 represent the weight coefficients for balancing the indicators;

[0103] Step 5.5: Determine the decision solution for the rth round of decision making

[0104] The fitness of the feasible solution is used as the visibility value in the ant colony algorithm, combined with the path The pheromone strength on the ant p is solved to find the probability that the ant p chooses the nth feasible solution. Will The corresponding feasible solution is the decision solution of ant p Solve the decision of the rth round of decision and all previous rounds of decision solutions to form the path chosen by ant p

[0105] Example: Figure 3 As shown, there are 3 feasible solutions in the first round of decision-making; when ant p chooses feasible solution 1.1 in the first round of decision-making, there will be 4 feasible solutions in the second round of decision-making; when ant p chooses feasible solution 1.2 in the first round of decision-making, there will be 2 feasible solutions in the second round of decision-making; when ant p chooses feasible solution 1.1 in the first round of decision-making and chooses feasible solution 1.1->2.1 in the second round of decision-making, there will be 2 feasible solutions in the third round of decision-making, and the path chosen by ant p in the second round of decision-making is (1.1, 2.1); when the search is completed, if ant p chooses feasible solution 1.1 in the first round of decision-making, chooses feasible solution 2.1 in the second round of decision-making, and chooses feasible solution 3.1 in the third round, then the decision path chosen by ant p is (1.1, 2.1, 3.1)

[0106] Step 5.6: Each ant executes the decision solution of the rth round according to its own decision solution, and then updates the directed graph model structure to complete the task state transfer, including:

[0107] ① Changes in the remaining task requirements: If the path task t in the rth round of decision t is executed, then from the remaining task requirements t t The amount of tasks executed by the policy is subtracted from the amount of tasks remaining. If the result is 0, the path task t t Completed, the path task t t Remove from the task set T;

[0108] ② Change of task starting point: If the path task t in the rth round of decision t is executed, but the remaining tasks after execution require t t If remained is still greater than 0, the starting point of the task in the r+1th round of decision-making is changed to the path task t t The interruption position of the path task t t The associated directed edge costs change:

[0109] arc(d a(a∈K) ,t t )·cost, which means the cost from the drone d a Current location to task t t The distance of the interruption position;

[0110] arc(tb(b∈T,b≠t) ,t t )·cost, which means the cost from other tasks t b The end position of task t t The distance of the interruption position;

[0111] ③ Changes in the time window: Each round of decision-making takes time to determine and execute. As the current round of decisions is determined and executed, the distance between the current time and the task preparation end time changes;

[0112] ④ Change of priority: Unlike the previous three influences, priority is an external input influence, generally triggered by user operations, not the result of decision execution; but the change of priority will inevitably affect the set of feasible solutions for the next round of decision-making.

[0113] Step 5.7: Determine whether all path tasks have been completed: if not, then r++, return to step 5.2; if yes, then R=r, go to step 6.

[0114] Step 6: Calculate the quality index of the path selected by each ant

[0115] Calculate the quality index of the path selected by each ant separately. The decision path selected by ant p is Quality Index p for:

[0116]

[0117] Step 7: Determine the optimal decision path

[0118] max(L p ,p∈P) is the path corresponding to the optimal decision path. Optimal decision path The quality index is L q ; Update the optimal decision path The pheromone intensity on the surface, the pheromone intensity increase Δτ is:

[0119]

[0120] Where: S represents the intensity of pheromone released per unit cost.

[0121] Step 8: Determine whether to update the global optimal solution

[0122] Compare the best decision paths The quality index of the global optimal solution is If the quality index of is greater than the quality index of the global optimal solution, the global optimal solution is updated to the optimal decision path. Otherwise, the global optimal solution is maintained.

[0123] Step 9: Determine whether the ant colony iteration is completed

[0124] If q<Q, then q++, return to step 5; if q=Q, it means the ant colony iteration is completed.

[0125] The present invention provides a method for allocating urban inspection tasks by drones based on a two-stage heuristic algorithm, which degrades the dynamic planning of inspection tasks into a two-stage static planning problem through two-stage decomposition; the selection of multi-round decision solutions is mapped into a "path" selection, and a method for solving the complete optimal inspection task allocation problem using a heuristic algorithm can be used. At the same time, the present invention uses a genetic algorithm, which is split into two levels: task allocation and task volume and execution order adjustment, to solve a feasible solution for a decomposable task set with capacity constraints, time window constraints, priority constraints, and collaborative execution by multiple drones.

[0126] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm, characterized by: The UAV urban inspection task is regarded as a dynamic path planning problem with multi-dimensional constraints, and the dynamic path planning problem is simplified into a two-stage static planning problem for solution; the first stage is called heuristic feasible solution set search. After executing a round of decision-making and completing state transfer, the feasible solution set for the next round of decision-making is heuristically searched under multi-dimensional constraints; the second stage is called heuristic decision path planning, which searches for the optimal decision path in the feasible solution set of several rounds of decisions.

2. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 1 is characterized in that: A directed graph model structure is constructed to represent the task status of the UAV city inspection task. The directed graph model structure includes a UAV set D = {d1, d2, …, d K } and the task set T consisting of T path task nodes = {t1, t2, …, t T }, take the lines between nodes as directed edges; define the properties of the drone nodes, including: ① The location of the drone nest d k stationPos; ② Maximum endurance; ③ Remaining endurance k ·remained;④Sailing speed d k ·travelVel;⑤Inspection speed d k ·taskVel;⑥Ready time d k ·readTime; defines the attributes of the task node, including: ① Task requirement: the total distance required for the drone to complete the path task; ② Time window [t t beginTime,t t ·endTime]: expressed as the task preparation start time and task preparation end time; ③Task priority t t ·priority; ④ Remaining task requirements t t ·remained: The initial time is equal to the task requirement.

3. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 2 is characterized in that: After one round of decision-making is completed, the task status of the UAV city inspection task changes. The interruption position of the path task is used as the task starting point of the next round of decision-making. The directed graph model structure is updated to complete the state transfer, including: ① Changes in the remaining task requirements: If a path task is executed in this round of decision-making, the amount of tasks executed in this round of decision-making is subtracted from the remaining task requirements. If the result is 0, the path task is considered completed and removed from the task set; ② Change of task starting point: If a path task is executed in this round of decision-making, but the remaining task demand of the path task is greater than 0, the task starting point of the next round of decision-making is changed to the interruption position of the path task; ③ Change of time window: The determination and execution of each round of decisions will take time. As the decisions of this round are determined and executed, the distance between the current time and the task preparation end time changes.

4. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 1 is characterized in that: In each round of decision-making in the heuristic feasible solution set search phase, a two-level chromosome encoding method is used to first solve the feasible solution set that meets the multidimensional constraints, and then select a feasible solution from the feasible solution set as the decision solution; the multidimensional constraints for solving the feasible solution set include one or more of the following constraints: ① endurance constraint; ② time window constraint: the tasks to be executed need to be completed within the time window, and a penalty will be incurred if the time is exceeded; ③ priority constraint: tasks with high priority are executed earlier than tasks with low priority; ④ task requirement constraint: the total task volume of tasks to be executed is less than or equal to the total remaining task requirement; ⑤ multi-UAV cooperation constraint: a single task to be executed that cannot be completed by a single UAV is assigned to multiple UAVs for joint execution; ⑥ task integrity: if the remaining task requirement of a task is less than or equal to the maximum endurance of the UAV, the task shall not be split.

5. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 1 is characterized in that: The steps include: Step 1: Identify and read the UAV city inspection mission information, decompose it into T path tasks, and represent each path task as a list of location points along the way, including the mission start point and the mission end point; Step 2: deploy K drone resources on the mission road or in the mission area; Step 3: Construct a directed graph model structure to represent the task status of the UAV city inspection task. The directed graph model structure includes a UAV set D = {d1, d2, ..., d K } and the path task set T consisting of T path task nodes = {t1, t2, …, t T }, the connection between nodes is regarded as a directed edge, represented by arc(a,b) and arc(b,a), a,b∈T∪K, and a≠b; Step 4: Set the total number of ants in the ant colony to P, the pth ant is called ant p; the total number of iterations of the ant colony is Q, the qth iteration is called the qth generation ant colony, and the initial value q = 1; Step 5: Perform multiple rounds of decision-making on the T path tasks, and use a heuristic feasible solution set search method to calculate the decision solution of each round of decision-making. The decision solution expresses the path tasks, task amounts, and execution order assigned to each of the K drones in the current round of decision-making; the heuristic feasible solution set search method uses a two-level chromosome encoding method to first solve a feasible solution set that meets multidimensional constraints, and then uses an ant colony algorithm to select a feasible solution from the feasible solution set as the decision solution, including the following steps: Step 5.1, initialize r=1; Step 5.2: Generate initial population The first level of chromosome encoding: path task allocation, which determines which path tasks are pending tasks for the rth round of decision-making, the task volume of each pending task, and which drones will perform each pending task; considers the priority from high to low to allocate path tasks; accumulates the remaining endurance of all drones as the total endurance pool to ensure that the total task volume is less than or equal to the total endurance pool; drones that cannot reach the starting point of the task from the machine nest position do not participate in task allocation; The drones whose ready time is later than the task preparation start time do not participate in task allocation; all the tasks to be executed and the corresponding drones in the rth round of decision are expressed as a gene; Second-level chromosome encoding: Task volume adjustment, determine the task volume and execution order assigned to each drone, and optimize the path task allocation plan; for each drone, high-priority path tasks are executed earlier than low-priority path tasks, while considering inter-task loss and return loss; the task volume and execution order assigned to each drone are supplemented and expressed in the genes obtained by the first-level chromosome encoding to obtain the genes of the initial population; If the genes of the initial population cannot be obtained, then R = r, and go to step 6; Step 5.3: Selection, crossover, and mutation The genes of the initial population are selected, crossed, and mutated. The tasks to be executed by the drones are randomly changed during the first-level chromosome encoding process, and the execution order of the drones is randomly changed during the second-level chromosome encoding process. Finally, N genes are obtained, which are all N feasible solutions for the r-th round of decision-making. Step 5.4: Calculate the fitness of each feasible solution Calculate the fitness of the nth feasible solution in the rth round of decision making for: in: is the total time consumption indicator, which represents the sum of the flight time and execution time spent by the drone to complete the total task volume of the rth round of decision-making; is the total coverage task volume indicator, which represents the sum of the tasks that have been assigned and completed; The overtime penalty index for task completion time: the penalty for the path task whose completion time is later than the task preparation end time is calculated according to the overtime degree; is the remaining task fragmentation penalty index. For the assigned but uncompleted path tasks, if the remaining task demand is less than the threshold, the penalty is calculated; θ1, θ2, θ3, and θ4 represent the weight coefficients of balancing each index; Step 5.5: Determine the decision solution for the rth round of decision making The fitness of the feasible solution is used as the visibility value in the ant colony algorithm, combined with the path The pheromone strength on the , the probability of ant p choosing the nth feasible solution is Will The corresponding feasible solution is the decision solution of ant p Solve the decision of the rth round of decision and all previous rounds of decision solutions to form the path chosen by ant p Step 5.6: Each ant executes the decision solution of the rth round according to its own decision solution, and then uses the interruption position of the path task in the rth round of decision as the task starting point of the path task in the r+1th round of decision, and updates the remaining task requirements t t remained, if updated t If remained is 0, then the path task t t After the execution is completed, the path task is removed from the task set; the directed graph model structure is updated to complete the task status transfer; Step 5.7: Determine whether all path tasks have been completed: if not, then r++, return to step 5.2; if yes, then R=r, go to step 6; Step 6: Calculate the quality index of the path selected by each ant. The decision path selected by ant p is Quality Index p for: Step 7: max(L p ,p∈P) is the path corresponding to the optimal decision path. Optimal decision path The quality index is L q ; Update the optimal decision path The pheromone intensity on the surface, the pheromone intensity increase Δτ is: Among them: S represents the intensity of pheromone released per unit cost; Step 8: Compare the best decision paths The quality index of the global optimal solution is If the quality index of is greater than the quality index of the global optimal solution, the global optimal solution is updated to the optimal decision path. Otherwise, maintain the global optimal solution; Step 9: If q<Q, then q++, and return to step 5; if q=Q, it means that the ant colony iteration is completed.

6. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 1 or 5, characterized in that: The priority ranges from 0 to 9, the larger the value, the higher the priority, and the value 0 indicates that flight is prohibited.

7. The method for allocating UAV urban inspection tasks based on a two-stage heuristic algorithm according to claim 1 or 5, characterized in that: In step 1, the UAV city inspection mission information is identified and read, and the linear mission is expressed as a list of longitudes and latitudes of waypoints according to the longitude and latitude coordinates of the two-dimensional map of the mission road or mission area. The surface mission is decomposed into loop paths according to the nature of the mission and the density of the mission, and then expressed as a list of longitudes and latitudes of waypoints.

Citation Information

Cited By

  • Logistics task allocation method and device based on multiple unmanned vehicles

    CN120875367A

  • Unmanned aerial vehicle distribution and road inspection path optimization method considering no-fly zone

    CN122491639A