Dynamic target task allocation and path planning method based on energy-limited unmanned aerial vehicle

CN120686859APending Publication Date: 2025-09-23NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510814256.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-23

Smart Images

  • Figure CN120686859A_ABST
    Figure CN120686859A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic target task allocation and path planning method based on an energy-limited unmanned aerial vehicle. The method comprises the following steps: step 1, obtaining and converting position information; step 2, establishing a task allocation model according to the path and the energy; 3, designing an unmanned aerial vehicle path planning algorithm; step 4, calculating path energy consumption; and 5, monitoring the change of the target point. According to the method, a self-adaptive task allocation model taking energy as a core is established, energy safety pre-evaluation is realized in an initial task allocation stage by quantifying the matching degree between the energy state of the unmanned aerial vehicle and task requirements in real time, and the energy safety is evaluated for multiple times according to the change of a target in a task execution process; and the safety redundancy of the distribution scheme is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of dynamic target task allocation and path planning, and in particular to a dynamic target task allocation and path planning method based on an energy-constrained unmanned aerial vehicle. Background Art

[0002] In recent years, drones, with their low cost, high efficiency, and high maneuverability, have demonstrated unique advantages in uncertain environments, such as maritime target tracking and urban traffic surveillance. However, existing single / multi-drone task allocation methods generally employ classical assignment problems or generalized assignment problems, which are difficult to apply to real-time environments. Improved algorithms typically utilize classic combinatorial optimization models to describe multi-task collaborative allocation. Common models include the traveling salesman problem (TSP) and the vehicle routing problem (VRP). However, these models suffer from poor generalizability. This is because traditional models assume that parameters such as the location, number, and priority of task points are known and immutable, whereas task points may suddenly change (move) during maritime (urban) operations. Furthermore, existing studies assume that drones (or swarms) have sufficient energy during mission execution. However, drones are powered by energy-constrained batteries. If drone energy falls below a safety threshold during mission execution, serious flight accidents can occur. Furthermore, after task allocation is completed, the initial allocation solution no longer meets energy constraints due to target point movement. Therefore, it is necessary to add constraints to the path planning algorithm to accommodate the moving target. Summary of the Invention

[0003] Purpose of the invention: The technical problem to be solved by the present invention is to address the deficiencies of the existing technology and provide a dynamic target task allocation and path planning method based on energy-constrained drones to solve the problems of poor versatility, lack of energy constraints, and changes in task objectives in traditional models. By establishing an allocation model based on the path-energy system to constrain the collaborative work of drone swarms, avoid task conflicts and complete task allocation, and establish a reallocation mechanism to adapt to target changes, it is ultimately ensured that the drone swarm completes collaborative task allocation and path planning under energy-constrained constraints, and can adjust secondary task allocation and secondary path planning in real time after sensing changes in the external environment (target movement).

[0004] The method of the present invention comprises the steps of:

[0005] Step 1: Acquisition and conversion of location information;

[0006] Step 2: Establish a task allocation model based on path and energy;

[0007] Step 3: Design the UAV path planning algorithm;

[0008] Step 4: Calculate the path energy consumption;

[0009] Step 5: Monitor the changes of the target point.

[0010] Step 1 includes: using satellite positioning or wireless sensing to obtain the real-time location information of the mission target point and obstacles, and then sending the location information to the UAV cluster and converting it into grid coordinates: [lat, lon]→[gridX, gridY], where lat represents latitude, lon represents longitude, gridX represents the X-axis grid coordinate, and gridY represents the Y-axis grid coordinate. Its significance is to convert the obtained longitude and latitude location information into grid location information.

[0011] Step 2 includes: establishing a dynamic target combination optimization problem, where the optimization goal is to minimize the weighted sum of the total path length from the UAV to the task point and the energy consumed by the path; performing task allocation by improving the gray wolf optimization algorithm; initializing the wolf pack [numWolves, numDrones, numTasks] to represent the position encoding and discretization, allowing each wolf to represent a task allocation scheme, that is, the task point number assigned to each UAV, where numWolves represents the number of gray wolf populations, numDrones represents the number of UAVs, and numTasks represents the number of task points; and allowing energy to directly participate in the position update of the gray wolf. The specific formula is:

[0012]

[0013] Where a is the convergence factor, iter is the current iteration number, max_iter is the maximum iteration number, γ is the convergence adjustment index, and its minimum value is limited to 0.2; v task is the average change rate of the task points; Represents the position vector of the current individual i after updating to the positions of α, β, and δ wolves respectively; α, β, and δ are the wolf’s current position vectors respectively; is the coefficient vector, represents the current position vector of the i-th individual, is the inverse energy weight, E i (t) represents the residual energy of the i-th individual at time t; represents the position of the i-th individual in the next generation after the update; P is the population mutation probability, and its maximum value is limited to 0.08; μ is the normalization coefficient, which is 0.1; Δtask represents the change in task position, and map_size represents the map size;

[0014] Set the drone set U={u1,u2,……,u n}, where u n Denotes the nth UAV; set the mission point set D(t) = {d1, d2, ..., d m}, where d mIndicates the mth task point, and introduces the time axis t∈{t1,t2,……,t max}, in the initial task allocation stage, that is, t <t change When , the task allocation objective function is:

[0015]

[0016] Among them, t max Indicates the maximum time required to complete the planning, t change Indicates the time slot when the target change is subsequently detected, Indicates minimizing the weighted sum of path and energy during initial allocation, a ij (0) indicates the drone u at time 0 i Assigned to perform task point d j , D ij (0) represents the path length from UAV i to mission point j, E ij (0) represents the energy consumed by UAV i along the path from UAV i to mission point j, ζ and η are the path weight and energy consumption weight respectively;

[0017] When the task point change is detected, that is, t=t change When the updated task point set is D(t change )={d′1,d′2,……,d′ m}, where d′ m Represents the updated mth task point, and the corresponding objective function is:

[0018]

[0019] in Indicates minimizing the weighted sum of path and energy in quadratic distribution; a ij (t change ) represents t change Moment drone u′ i Assigned execution task point d′ j ;D ij (t change ) represents the drone u′ i To the task point d′ j The path length E ij (t change ) represents the drone u′ i To the task point d′ j The UAV u′ under the path iEnergy consumed; λ is the penalty factor. When λ=0, it means no penalty for changing the task; when 0<λ<1, it means a slight penalty. At this time, the model will adjust the allocation plan but will not force a change; when λ>10, the model will keep the allocation plan unchanged to obtain stability, but will still force a change if the plan does not meet the energy threshold; δ i It is an indicator function that indicates whether the mission has changed. A1(i) represents the number of drones u before the mission change. i The assigned mission number, A2(i) represents the number of drone u′ after the mission is changed i The new task number assigned;

[0020] The overall optimization goal of the entire task allocation model is:

[0021]

[0022]

[0023] During the initial task assignment phase and when task point changes are detected, the constraints are:

[0024]

[0025] a ij (t)∈{0,1}(15),

[0026] Among them E ε Represents the energy safety threshold. In this invention, 25% of the total energy of the drone battery is taken as the threshold; the decision variable a ij (t) = 1 means that UAV i is assigned to task j; a ij (t)=0 indicates that the task allocation fails.

[0027] Step 3 includes: using A * The algorithm calculates the path of the drone and introduces a heading penalty term:

[0028] f(n)=g(n)+h(n) (16),

[0029]

[0030] Where f(n) is the comprehensive cost, g(n) is the path cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, (x1, y1) is the position coordinate of the current node, and (x2, y2) is the position coordinate of the target node. Euclidean distance is used as the heuristic function. The specific calculation formula is:

[0031] g(n′)=g current +distance(current,neighbor) (18),

[0032]

[0033] f(n′)=g(n′)+h(n′)+ξ·θ(n) (21),

[0034] Where g(n′) is the actual cost of the current node, g current is the path cost from the starting point to the current node, distance(current, neighbor) is the Euclidean distance from the current node to the neighbor node neighbor, (x current ,y current ) is the coordinate of the current node, (x neighbor ,y neighbor ) is the coordinate of the neighbor node neighbor, (x goal ,y goal ) is the coordinate of the target node, ξ is the heading penalty coefficient, which is 2; θ(n) is the angle change between the current moving direction and the previous step direction, that is, the turning angle. Let the parent node coordinate of the current node be (x m ,y m ), the coordinates of the grandparent node are (x n ,y n ); the grandparent node, parent node, and current node are three consecutive points, and the direction vector is obtained:

[0035]

[0036] Then the calculation formula of Δθ(n) is:

[0037]

[0038] where θ th is the flight tolerance steering angle, which is 45°, h(n′) is the estimated cost from the neighbor node to the target node, and f(n′) is the comprehensive cost. Through continuous iterative updates, until the target point with the minimum cost is found, the cumulative g of the path with the minimum cost from the starting point to the end point is current Derived, that is, the shortest path length D ij (t).

[0039] Step 4 includes: setting the basic energy consumption rate of the UAV at the standard flight speed v0, standard flight altitude h0 and standard load m0 to P0, introducing the speed adjustment factor F v , load adjustment factor F m and height adjustment factor F h .

[0040] In step 4, the speed adjustment factor F v, load adjustment factor F m and height adjustment factor F h The calculation formula is:

[0041]

[0042] The energy calculation formula is:

[0043]

[0044] E i (t) = E in -E ij (t) (30),

[0045] Where v is the actual flight speed, m is the actual load, j is the actual flight altitude, k v is the speed influence coefficient, k m is the load influence coefficient, k h is the height influence coefficient, E in The initial energy of the drone before performing a mission.

[0046] Step 4 also includes: according to the shortest path length D ij (t), calculate the energy consumption E of each path ij (t) and the remaining energy E of each UAV to reach the target point i (t), E ij (t), E i (t) The data is transferred to the task allocation model for calculation to obtain the optimal allocation solution.

[0047] Step 5 includes: setting a fixed time interval Δt to check whether the position of the task point changes. The present invention sets Δt = 1s for the task point with a large probability of change (probability greater than 0.5) and Δt = 5s for the task point with a small probability of change (probability less than 0.5). A new set P is established. previous ={p1,p2,……,p n}Record the initial task point p1 to the nth task point p n The location information is in each detection time slot t change =t k =kΔt, obtain the position P of the current time slot task point current , and then calculate the displacement of each task point. For any task point d j , its displacement g i is the Euclidean distance:

[0048]

[0049] Where kΔt represents the kth time slot, k is a natural number, is the last recorded location coordinate, is the current position coordinate;

[0050] The displacement of each task point is calculated, and a change judgment threshold ε is set to determine whether the task point has changed. This scheme considers that the displacement exceeds one grid and changes, that is, ε = 1. If any g is satisfied i >ε, the task point is determined to have changed; after confirming the change, the task allocation model is called again, the position information of the UAV, obstacles and task target points is updated, and the path planning algorithm is used to obtain the path length D from the original position to the current position of the UAV d The energy consumption formula is used to calculate the energy consumption of the path to obtain the current remaining energy. The current position information and the current remaining energy of each drone are used as the initial position and initial energy in the task allocation link to complete the task allocation. The decision variable a is used again. ij (t) Confirm whether the task assignment is completed successfully and update P previous =P current , continuously monitor the task point P previous ,Once a change is detected, step 5 is repeated until the ,UAV reaches the target point and stops.

[0051] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method.

[0052] The present invention also provides a storage medium storing a computer program or instruction, which executes the steps of the method when the computer program or instruction is run on a computer.

[0053] Beneficial effects: The present invention establishes an adaptive task allocation model with energy as the core. By quantifying the matching degree between the energy status of the UAV and the task requirements in real time, it realizes the energy safety pre-assessment in the initial task allocation stage. At the same time, during the task execution process, the energy safety is evaluated multiple times according to the changes in the target, so as to improve the safety redundancy of the allocation plan.

[0054] The present invention uses path and energy weight distribution to generate the optimal initial solution. Equipped with a dynamic event response module, it quickly reconstructs the solution when the target point shifts position, resulting in a high response efficiency. Under energy constraints, for fixed, unchanging target points, multiple drones can be assigned the shortest path and paths can be planned, ultimately yielding the best task allocation solution and optimal planned trajectory. For target points that are subject to change, a change detection mechanism can rapidly respond to changes, using the drone's position at the moment the target change is detected as the initial position and the remaining energy at that moment as the initial energy, again completing optimal task allocation and path planning.

[0055] The present invention establishes an energy consumption estimation model, and when the target point changes and triggers re-planning, it simultaneously performs energy reachability verification: by estimating the energy consumption of the UAV to reach the target point, the candidate paths that exceed the safety threshold are dynamically eliminated to ensure that the re-planning plan has both mission reachability and energy safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more apparent.

[0057] Figure 1 It is a flow chart of the present invention.

[0058] Figure 2 This is a schematic diagram of distribution and path planning under full energy state.

[0059] Figure 3 This is a schematic diagram of the energy distribution and path planning of UAV No. 1 when it is in an insufficient energy state.

[0060] Figure 4 This is a schematic diagram of the energy distribution and path planning of UAV No. 2 when it is in an insufficient energy state.

[0061] Figure 5 This is a schematic diagram of predicted allocation and path planning under full energy state.

[0062] Figure 6 This is a schematic diagram of distribution and path planning under full energy and target change conditions.

[0063] Figure 7 This is a schematic diagram of predicted allocation and path planning under non-full energy states.

[0064] Figure 8 This is a schematic diagram of allocation and path planning under non-full energy and target change states. DETAILED DESCRIPTION

[0065] The embodiment of the present invention provides a method for dynamic target task allocation and path planning based on an energy-constrained UAV, comprising the following steps:

[0066] Step 1: Acquisition and conversion of location information;

[0067] Step 2: Establish a task allocation model based on path and energy;

[0068] Step 3: Design the UAV path planning algorithm;

[0069] Step 4: Calculate the path energy consumption;

[0070] Step 5: Monitor the changes of the target point.

[0071] Step 1 includes: using satellite positioning or wireless sensing to obtain the real-time location information of the mission target point and obstacles, and then sending the location information to the UAV cluster and converting it into grid coordinates: [lat, lon]→[gridX, gridY], where lat represents latitude, lon represents longitude, gridX represents the X-axis grid coordinate, and gridY represents the Y-axis grid coordinate. Its significance is to convert the obtained longitude and latitude location information into grid location information.

[0072] Step 2 includes: establishing a dynamic target combination optimization problem, where the optimization goal is to minimize the weighted sum of the total path length from the UAV to the task point and the energy consumed by the path; performing task allocation by improving the gray wolf optimization algorithm; initializing the wolf pack [numWolves, numDrones, numTasks] to represent the position encoding and discretization, allowing each wolf to represent a task allocation scheme, that is, the task point number assigned to each UAV, where numWolves represents the number of gray wolf populations, numDrones represents the number of UAVs, and numTasks represents the number of task points; and allowing energy to directly participate in the position update of the gray wolf. The specific formula is:

[0073]

[0074] Where a is the convergence factor, iter is the current iteration number, max_iter is the maximum iteration number, γ is the convergence adjustment index, and its minimum value is limited to 0.2; v task is the average change rate of the task points; Represents the position vector of the current individual i after updating to the positions of α, β, and δ wolves respectively; α, β, and δ are the wolf’s current position vectors respectively; is the coefficient vector, represents the current position vector of the i-th individual, is the inverse energy weight, E i (t) represents the residual energy of the i-th individual at time t; represents the position of the i-th individual in the next generation after the update; P is the population mutation probability, and its maximum value is limited to 0.08; μ is the normalization coefficient, which is 0.1; Δtask represents the change in task position, and map_size represents the map size;

[0075] Set the drone set U={u1,u2,……,u n}, where u n Denotes the nth UAV; set the mission point set D(t) = {d1, d2, ..., d m}, where d m Indicates the mth task point, and introduces the time axis t∈{t1,t2,……,t max}, in the initial task allocation stage, that is, t <t change When , the task allocation objective function is:

[0076]

[0077] Among them, t max Indicates the maximum time required to complete the planning, t change Indicates the time slot when the target change is subsequently detected, Indicates minimizing the weighted sum of path and energy during initial allocation, a ij (0) indicates the drone u at time 0 i Assigned to perform task point d j , D ij (0) represents the path length from UAV i to mission point j, E ij (0) represents the energy consumed by UAV i along the path from UAV i to mission point j, ζ and η are the path weight and energy consumption weight respectively;

[0078] When the task point change is detected, that is, t=t change When the updated task point set is D(t change )={d′1,d′2,……,d′ m}, where d′ m Represents the updated mth task point, and the corresponding objective function is:

[0079]

[0080]

[0081] in Indicates minimizing the weighted sum of path and energy in quadratic distribution; a ij (t change ) represents t change Moment drone u′ i Assigned execution task point d′ j ;D ij (t change ) represents the drone u′ i To the task point d′ j The path length E ij (t change ) represents the drone u′ i To the task point d′ j The UAV u′ under the path iEnergy consumed; λ is the penalty factor. When λ=0, it means no penalty for changing the task; when 0<λ<1, it means a slight penalty. At this time, the model will adjust the allocation plan but will not force a change; when λ>10, the model will keep the allocation plan unchanged to obtain stability, but will still force a change if the plan does not meet the energy threshold; δ i It is an indicator function that indicates whether the mission has changed. A1(i) represents the number of drones u before the mission change. i The assigned mission number, A2(i) represents the number of drone u′ after the mission is changed i The new task number assigned;

[0082] The overall optimization goal of the entire task allocation model is:

[0083]

[0084]

[0085] During the initial task assignment phase and when task point changes are detected, the constraints are:

[0086]

[0087]

[0088] a ij (t)∈{0,1}(15),

[0089] Among them E ε Represents the energy safety threshold. In this invention, 25% of the total energy of the drone battery is taken as the threshold; the decision variable a ij (t) = 1 means that UAV i is assigned to task j; a ij (t)=0 indicates that the task allocation fails.

[0090] Step 3 includes: using A * The algorithm calculates the path of the drone and introduces a heading penalty term:

[0091] f(n)=g(n)+h(n) (16),

[0092]

[0093] Where f(n) is the comprehensive cost, g(n) is the path cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, (x1, y1) is the position coordinate of the current node, and (x2, y2) is the position coordinate of the target node. Euclidean distance is used as the heuristic function. The specific calculation formula is:

[0094] g(n′)=gcurrent +distance(current,neighbor) (18),

[0095]

[0096] f(n′)=g(n′)+h(n′)+ξ·θ(n) (21),

[0097] Where g(n′) is the actual cost of the current node, g current is the path cost from the starting point to the current node, distance(current, neighbor) is the Euclidean distance from the current node to the neighbor node neighbor, (x current ,y current ) is the coordinate of the current node, (x neighbor ,y neighbor ) is the coordinate of the neighbor node neighbor, (x goal ,y goal ) is the coordinate of the target node, ξ is the heading penalty coefficient, which is 2; θ(n) is the angle change between the current moving direction and the previous step direction, that is, the turning angle. Let the parent node coordinate of the current node be (x m ,y m ), the coordinates of the grandparent node are (x n ,y n ); the grandparent node, parent node, and current node are three consecutive points, and the direction vector is obtained:

[0098]

[0099] Then the calculation formula of Δθ(n) is:

[0100]

[0101] where θ th is the flight tolerance steering angle, which is 45°, h(n′) is the estimated cost from the neighbor node to the target node, and f(n′) is the comprehensive cost. Through continuous iterative updates, until the target point with the minimum cost is found, the cumulative g of the path with the minimum cost from the starting point to the end point is current Derived, that is, the shortest path length D ij (t).

[0102] Step 4 includes: setting the basic energy consumption rate of the UAV at the standard flight speed v0, standard flight altitude h0 and standard load m0 to P0, introducing the speed adjustment factor F v , load adjustment factor F m and height adjustment factor F h .

[0103] In step 4, the speed adjustment factor F v , load adjustment factor F m and height adjustment factor F h The calculation formula is:

[0104]

[0105] The energy calculation formula is:

[0106]

[0107] E i (t) = E in -E ij (t) (30),

[0108] Where v is the actual flight speed, m is the actual load, h is the actual flight altitude, k v is the speed influence coefficient, k m is the load influence coefficient, k h is the height influence coefficient, E in The initial energy of the drone before performing a mission.

[0109] Step 4 also includes: according to the shortest path length D ij (t), calculate the energy consumption E of each path ij (t) and the remaining energy E of each UAV to reach the target point i (t), E ij (t), E i (t) The data is transferred to the task allocation model for calculation to obtain the optimal allocation solution.

[0110] Step 5 includes: setting a fixed time interval Δt to check whether the position of the task point changes. The present invention sets Δt = 1s for the task point with a large probability of change (probability greater than 0.5) and Δt = 5s for the task point with a small probability of change (probability less than 0.5). A new set P is established. previous ={p1,p2,……,p n}Record the initial task point p1 to the nth task point p n The location information is in each detection time slot t change =t k =kΔt, obtain the position P of the current time slot task point current , and then calculate the displacement of each task point. For any task point d j , its displacement g i is the Euclidean distance:

[0111]

[0112] Where kΔt represents the kth time slot, k is a natural number, is the last recorded location coordinate, is the current position coordinate;

[0113] The displacement of each task point is calculated, and a change judgment threshold ε is set to determine whether the task point has changed. This scheme considers that the displacement exceeds one grid and changes, that is, ε = 1. If any g is satisfied i >ε, the task point is determined to have changed; after confirming the change, the task allocation model is called again, the position information of the UAV, obstacles and task target points is updated, and the path planning algorithm is used to obtain the path length D from the original position to the current position of the UAV d The energy consumption formula is used to calculate the energy consumption of the path to obtain the current remaining energy. The current position information and the current remaining energy of each drone are used as the initial position and initial energy in the task allocation link to complete the task allocation. The decision variable a is used again. ij (t) Confirm whether the task assignment is completed successfully and update P previous =P current , continuously monitor the task point P previous ,Once a change is detected, step 5 is repeated until the ,UAV reaches the target point and stops.

[0114] This embodiment is performed with the following parameter values: max_iter is 100, φ is 0.1, and λ is 0.1.

[0115] Figure 2 The following example shows the task allocation scheme for the drone swarm when all drones are fully powered and the target point remains unchanged. It can be seen that in this case, the task allocation method is based on the shortest sum of paths and successfully completes the tracking task.

[0116] and Figure 2 compared to, Figure 3 、 Figure 4 It shows that when UAVs 1 and 2 plan their paths according to the allocation method with the shortest total path when their energy is insufficient, the estimated remaining energy to reach the target point will be less than the set threshold. Therefore, this allocation method that does not meet the energy constraint is deleted from the storage, and the method with the shortest total path is selected from the remaining options to complete the tracking task.

[0117] Figure 6 The distribution scheme and path planning of drones under full energy and target point changes are shown. It can be seen that at a certain moment Δt, when the target point is detected to have changed, the drone group uses the position at that moment as the starting point and the remaining energy at that moment as the initial energy to re-plan the distribution scheme and path. Figure 5 yes Figure 6Predictive allocation and path planning without changes in the target point.

[0118] Figure 8 The distribution scheme and path planning of the UAV under the condition of insufficient energy and target point change are shown. It can be seen that Figure 6 At the same Δt moment, when the target point is detected to have changed, the system assigns UAV No. 1 to the new task point 3 because the remaining energy at that moment cannot meet the safety constraints after reaching the target point, while UAV No. 2 performs the task of the new task point 2 with higher energy consumption. Figure 7 yes Figure 8 Predictive allocation and path planning without changes in the target point.

[0119] from Figure 5 and Figure 7 It can be seen that in the same scenario, the two performed the same task allocation and path planning under the conditions of full energy and insufficient energy, indicating that under this condition, the remaining energy of both parties after reaching the target point can meet the safety constraint. However, after the task point changes at the same time, the allocation method is adjusted due to its energy constraint, which confirms the correctness of the scenario proposed in step 5.

[0120] The present invention provides a method for dynamic target task allocation and path planning for energy-constrained unmanned aerial vehicles. There are numerous methods and approaches for implementing this technical solution. The above is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Any components not specified in this embodiment may be implemented using existing technologies.

Claims

1. A dynamic target task allocation and path planning method based on energy-constrained UAV, characterized by: The following steps are involved: Step 1: Acquisition and conversion of location information; Step 2: Establish a task allocation model based on path and energy; Step 3: Design the UAV path planning algorithm; Step 4: Calculate the path energy consumption; Step 5: Monitor the changes of the target point.

2. The method according to claim 1, characterized in that Step 1 includes: using satellite positioning or wireless sensing to obtain the real-time location information of the mission target point and obstacles, and then sending the location information to the UAV cluster and converting it into grid coordinates: [lat, lon] → [gridX, gridY], where lat represents latitude, lon represents longitude, gridX represents the X-axis grid coordinate, and gridY represents the Y-axis grid coordinate.

3. The method according to claim 2, characterized in that Step 2 includes: establishing a dynamic target combination optimization problem, where the optimization goal is to minimize the weighted sum of the total path length from the UAV to the task point and the energy consumed by the path; performing task allocation by improving the gray wolf optimization algorithm; initializing the wolf pack [numWolves, numDrones, numTasks] to represent the position encoding and discretization, allowing each wolf to represent a task allocation scheme, that is, the task point number assigned to each UAV, where numWolves represents the number of gray wolf populations, numDrones represents the number of UAVs, and numTasks represents the number of task points; and allowing energy to directly participate in the position update of the gray wolf. The specific formula is: Where a is the convergence factor, iter is the current iteration number, max_iter is the maximum iteration number, γ is the convergence adjustment index; v task is the average change rate of the task points; Represents the position vector of the current individual i after updating to the positions of α, β, and δ wolves respectively; α, β, and δ are the wolf’s current position vectors respectively; is the coefficient vector, represents the current position vector of the i-th individual, is the inverse energy weight, E i (t) represents the residual energy of the i-th individual at time t; represents the position of the i-th individual in the next generation after the update; P is the population mutation probability; μ is the normalization coefficient; Δtask represents the change in task position, and map_size represents the map size; Set the drone set U={u1,u2,……,u n }, where u n Denotes the nth UAV; set the mission point set D(t) = {d1, d2, ..., d m }, where d m Indicates the mth task point, and introduces the time axis t∈{t1,t2,……,t max }, in the initial task allocation stage, that is, t <t change When , the task allocation objective function is: Among them, t max Indicates the maximum time required to complete the planning, t change Indicates the time slot when the target change is subsequently detected, Indicates minimizing the weighted sum of path and energy during initial allocation, a ij (0) indicates the drone u at time 0 i Assigned to perform task point d j , D ij (0) represents the path length from UAV i to mission point j, E ij (0) represents the energy consumed by UAV i along the path from UAV i to mission point j, ζ and η are the path weight and energy consumption weight respectively; When the task point change is detected, that is, t=t change When the updated task point set is D(t change )={d′1,d′2,……,d′ m }, where d′ m Represents the updated mth task point, and the corresponding objective function is: in Indicates minimizing the weighted sum of path and energy in quadratic distribution; a ij (t change ) represents t change Moment Drone U i ′ is assigned to execute task point d j ';D ij (t change ) indicates drone u i ' to task point d j ′ path length; E ij (t change ) indicates drone u i ' to task point d j ′ under the path of UAV u i ′ is the energy consumed; λ is the penalty factor. When λ=0, it means no penalty for the task change; when 0<λ<1, it means a slight penalty, and the model will adjust the allocation plan; when λ>10, the model will keep the allocation plan unchanged to obtain stability; δ i It is an indicator function that indicates whether the mission has changed. A1(i) represents the number of drones u before the mission change. i The assigned mission number, A2(i) represents the number of drones u after the mission changes i 'The new task number assigned; The overall optimization goal of the entire task allocation model is: During the initial task assignment phase and when task point changes are detected, the constraints are: a ij (t)∈{0,1}(15), Among them E ε represents the energy safety threshold; decision variable a ij (t) = 1 means that UAV i is assigned to task j; a ij (t)=0 indicates that the task allocation fails.

4. The method according to claim 3, characterized in that Step 3 includes: using A * The algorithm calculates the path of the drone and introduces a heading penalty term: f(n)=g(n)+h(n) (16), Where f(n) is the comprehensive cost, g(n) is the path cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, (x1, y1) is the position coordinate of the current node, and (x2, y2) is the position coordinate of the target node. Euclidean distance is used as the heuristic function. The specific calculation formula is: g(n′)=g current +distance(current,neighbor) (18), f(n′)=g(n′)+h(n′)+ξ·θ(n) (21), Where g(n′) is the actual cost of the current node, g current is the path cost from the starting point to the current node, distance(current, neighbor) is the Euclidean distance from the current node to the neighbor node neighbor, (x current ,y current ) is the coordinate of the current node, (x neighbor ,y neighbor ) is the coordinate of the neighbor node neighbor, (x goal ,y goal ) is the coordinate of the target node, ξ is the heading penalty coefficient, θ(n) is the angle change between the current moving direction and the previous step direction, and the parent node coordinate of the current node is (x m ,y m ), the coordinates of the grandparent node are (x n ,y n ); the grandparent node, parent node, and current node are three consecutive points, and the direction vector is obtained: Then the calculation formula of Δθ(n) is: where θ th is the flight tolerance steering angle, h(n′) is the estimated cost from the neighbor node to the target node, f(n′) is the comprehensive cost, and the cumulative g of the path with the minimum cost from the starting point to the end point is updated continuously through iteration until the target point with the minimum cost is found. current Derived, that is, the shortest path length D ij (t).

5. The method according to claim 4, characterized in that Step 4 includes: setting the basic energy consumption rate of the UAV at the standard flight speed v0, standard flight altitude h0 and standard load m0 to P0, introducing the speed adjustment factor F v , load adjustment factor F m and height adjustment factor F h .

6. The method according to claim 5, characterized in that In step 4, the speed adjustment factor F v , load adjustment factor F m and height adjustment factor F h The calculation formula is: The energy calculation formula is: E i (t)=E in -E ij (t) (30), Where v is the actual flight speed, m is the actual load, h is the actual flight altitude, k v is the speed influence coefficient, k m is the load influence coefficient, k h is the height influence coefficient, E in The initial energy of the drone before performing a mission.

7. The method according to claim 6, characterized in that Step 4 also includes: according to the shortest path length D ij (t), calculate the energy consumption E of each path ij (t) and the remaining energy E of each UAV to reach the target point i (t), E ij (t), E i (t) The data is transmitted to the task allocation model for calculation to obtain the optimal allocation solution.

8. The method according to claim 7, characterized in that Step 5 includes: setting a fixed time interval Δt to check whether the position of the task point changes, taking Δt = 1s for the task point with a higher probability of change and taking Δt = 5s for the task point with a lower probability of change, and establishing a new set p previous ={p1,p2,……,p n }Record the initial task point p1 to the nth task point p n The location information is in each detection time slot t change =t k =kΔt, obtain the position P of the current time slot task point current , and then calculate the displacement of each task point. For any task point d j , its displacement g i is the Euclidean distance: Where kΔt represents the kth time slot, k is a natural number, is the last recorded location coordinate, is the current position coordinate; Calculate the displacement of each task point and set a change judgment threshold ε to determine whether the task point changes. If any g i >ε, the task point is determined to have changed; after confirming the change, the task allocation model is called again, the position information of the UAV, obstacles and task target points is updated, and the path planning algorithm is used to obtain the path length D from the original position to the current position of the UAV d The energy consumption formula is used to calculate the energy consumption of the path to obtain the current remaining energy. The current position information and the current remaining energy of each drone are used as the initial position and initial energy in the task allocation link to complete the task allocation. The decision variable a is used again. ij (t) Confirm whether the task assignment is completed successfully and update P previous =P current , continuously monitor the task point P previois ,Once a change is detected, step 5 is repeated until the ,UAV reaches the target point and stops.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 8 are executed.