An unmanned aerial vehicle task allocation method and system based on an improved whale optimization algorithm

CN122887108APending Publication Date: 2026-10-09HENAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611342559.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]为了解决现有技术中无人机任务分配方案质量较差的不足,本发明提供一种基于改进鲸鱼优化算法的无人机任务分配方法及系统

Benefits of technology

1、本发明采用改进鲸鱼优化算法以综合成本最小为目标对初始种群进行迭代处理,在迭代过程中基于当前最优个体更新种群中其他个体的位置,并且采用自适应收敛因子调节更新步长,自适应收敛因子基于当前种群适应度的归一化方差进行动态调节。当种群分散度较高时减缓收敛因子衰减以增强全局探索能力,当种群趋于聚集时加快收敛因子衰减以强化局部开发能力,从而有效平衡全局探索与局部开发,避免陷入局部最优,提高了收敛速度和求解质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887108A_ABST
    Figure CN122887108A_ABST
Patent Text Reader

Abstract

The application relates to an unmanned aerial vehicle (UAV) task allocation method based on an improved whale optimization algorithm, and relates to the technical field of UAV task allocation. The improved whale optimization algorithm is used to iteratively process an initial population with the minimum comprehensive cost as the target. In the iteration process, the positions of other individuals in the population are updated based on the current optimal individual, and an adaptive convergence factor is used to adjust the update step. The adaptive convergence factor is dynamically adjusted based on the normalized variance of the current population fitness. When the preset convergence condition is met, the task allocation scheme corresponding to the optimal individual in the population is selected as the optimal task allocation scheme. The adaptive convergence factor can effectively balance global exploration and local development. Meanwhile, the load dynamic attenuation characteristics are comprehensively considered when the total energy consumption cost is calculated. The physical total weight currently carried by the UAV is used to real-time correct the level flight energy consumption and vertical climbing energy consumption, so that the total energy consumption calculation is closer to the actual situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) task allocation technology, specifically to a UAV task allocation method and system based on an improved whale optimization algorithm. Background Technology

[0002] With the rapid development of drone technology, multi-drone collaborative delivery of supplies has become an important development direction in the logistics field. In three-dimensional space, multi-drone collaborative delivery of large quantities of supplies is a complex, unsteady, multi-objective combinatorial optimization problem. It requires simultaneously considering multiple optimization objectives such as flight distance, energy consumption, load balancing, and mission timeliness, while satisfying multiple constraints including drone payload capacity, cruising speed, climb capability, terrain environment, and mission time window. The quality of the task allocation scheme directly determines the delivery efficiency and energy consumption level of the drone swarm.

[0003] Currently, existing technologies primarily employ constant energy consumption models for calculating energy consumption during drone mission allocation. As goods are unloaded during delivery, the overall weight of the drone decreases, and actual flight energy consumption should follow suit. However, constant energy consumption models fail to account for this change, leading to significant discrepancies between calculated and actual energy consumption, and consequently, non-optimal flight routes. Secondly, unforeseen circumstances such as new or canceled missions frequently arise during drone operations. Existing drone mission allocation methods typically employ global replanning to address these issues. This global replanning approach not only consumes substantial computational resources but also results in frequent changes to drone flight paths, leading to wasted transport capacity. Summary of the Invention

[0004] To address the shortcomings of poor quality in existing UAV task allocation schemes, this invention provides a UAV task allocation method and system based on an improved whale optimization algorithm.

[0005] To achieve the above objectives, the specific solution adopted by this invention is as follows: a UAV task allocation method based on an improved whale optimization algorithm, comprising: Obtain the raw data of the task to be executed. The raw data includes task node data, task constraint data, flight area environmental data, and UAV swarm data. Several initial task allocation schemes are generated based on the original data as an initial population. The fitness of individuals in the population is represented by the comprehensive cost of the task allocation scheme. The comprehensive cost is calculated based on the task allocation scheme and the original data through a pre-constructed comprehensive cost function. The comprehensive cost function includes total flight distance cost, load balancing cost, overload penalty cost, timeout penalty cost and total energy consumption cost. An improved whale optimization algorithm is used to iteratively process the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. The adaptive convergence factor is dynamically adjusted based on the normalized variance of the current population fitness. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme.

[0006] As an optimization scheme for the aforementioned UAV task allocation method based on the improved whale optimization algorithm, the comprehensive cost function is: , in, For overall cost, For total flight distance cost, For the cost of load balancing, As a consequence of penalties for overloading, As a consequence of exceeding the time limit, Total energy cost, , , , , All of these are preset weighting coefficients.

[0007] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm: the total flight distance cost includes the sum of the terrain correction distances of all UAV flight paths, where the terrain correction distance is: , in, Predecessor node To the current node Terrain correction distance, Predecessor node To the current node The two-dimensional Euclidean physical distance, The proportionality factor for the influence of terrain on distance. The terrain complexity level of the flight area.

[0008] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm: the total energy cost is the sum of the level flight energy consumption and vertical climb energy consumption of all UAVs in the process of executing the task allocation scheme: Level flight energy consumption is: , in, For level flight energy consumption, Predecessor node To the current node Terrain correction distance, This represents the energy consumption coefficient for level flight under full load. This is the dynamic energy consumption attenuation factor; The energy consumption for vertical climb is: , in, Energy consumption for vertical climbing. For the current node altitude Predecessor node altitude The energy consumption coefficient for vertical climbing under full load; The dynamic energy consumption decay factor is: , in, This is the dynamic energy consumption attenuation factor. The percentage of energy consumed during unloaded flight. This refers to the total physical weight carried by the drone during its current flight segment. This represents the maximum physical payload capacity of the drone.

[0009] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm: the overload penalty cost is the penalty cost for the UAV's weighted load exceeding the preset weighted load threshold, and the weighted load is the sum of the products of the physical weight of each task undertaken by the UAV and the task priority.

[0010] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm: the load balancing cost is the load balancing coefficient, which is: , in, This is the load balancing coefficient. For the number of drones, For the first Weighted payload of the drone The average weighted load of the drone swarm.

[0011] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm: the timeout penalty cost is the sum of the time window penalty cost and the hard deadline penalty cost, and the timeout penalty cost is: , in, As a consequence of exceeding the time limit, The time window penalty coefficient, For task nodes The upper limit of the time window, For task nodes The lower limit of the time window, To reach the task node The current time, This is the penalty coefficient for a hard deadline. For task nodes Execution duration, For task nodes The hard deadline.

[0012] As another optimization scheme for the UAV task allocation method based on the improved whale optimization algorithm mentioned above, the adaptive convergence factor is: , , , in, The adaptive convergence factor. The maximum value of the adaptive convergence factor. This is the minimum value of the adaptive convergence factor. This represents the current iteration number. The maximum number of iterations, The attenuation rate, For adjustment coefficients, The normalized variance of the current population fitness. For population size, For individual fitness, For average fitness, For maximum fitness, This represents the minimum fitness.

[0013] As another optimization scheme for the above-mentioned UAV task allocation method based on the improved whale optimization algorithm, the UAV also includes dynamic task replanning during task execution: When the tasks to be executed change, a temporary allocation scheme is generated based on the optimal task allocation scheme, and the real-time comprehensive cost and real-time load balancing coefficient of the temporary allocation scheme are calculated. The dynamic trigger threshold is calculated based on the task change rate. The dynamic trigger threshold includes the load balancing trigger threshold and the overall cost trigger threshold. When tasks increase: , in, The threshold for triggering load balancing, This is the load balancing coefficient before the task change. Increase the rate of task completion. The threshold for triggering overall cost. The total cost before the task change. , , , All are adjustment coefficients; When the number of tasks decreases: , in, For task reduction rate; When the real-time comprehensive cost exceeds the comprehensive cost trigger threshold or the real-time load balancing coefficient exceeds the load balancing trigger threshold, the temporary allocation scheme is determined to be unbalanced, and the improved whale optimization algorithm is used again for task allocation. When the real-time comprehensive cost is less than or equal to the comprehensive cost trigger threshold and the real-time load balancing coefficient is less than or equal to the load balancing trigger threshold, the temporary allocation scheme is deemed feasible and is used to replace the optimal task allocation scheme.

[0014] A drone task allocation system based on an improved whale optimization algorithm includes a data acquisition module, a data processing module, and a data display module. The data acquisition module is used to acquire the raw data of the task to be executed. The raw data includes task node data, task constraint data, flight area environmental data, and UAV swarm data. The data processing module is used to generate several initial task allocation schemes as an initial population based on the raw data. An improved whale optimization algorithm is used to iterate the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme. The data visualization module is used to visually represent the optimal task allocation scheme.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention employs an improved whale optimization algorithm to iteratively process the initial population with the goal of minimizing overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. The adaptive convergence factor is dynamically adjusted based on the normalized variance of the current population fitness. When the population dispersion is high, the decay of the convergence factor is slowed down to enhance global exploration ability; when the population tends to cluster, the decay of the convergence factor is accelerated to enhance local exploitation ability. This effectively balances global exploration and local exploitation, avoids getting trapped in local optima, and improves convergence speed and solution quality.

[0016] 2. The comprehensive cost of the present invention is calculated based on the task allocation scheme and the original data through a pre-constructed comprehensive cost function. The comprehensive cost function includes the total flight distance cost, load balancing cost, overload penalty cost, timeout penalty cost and total energy consumption cost. In the calculation of total energy consumption cost, the dynamic attenuation characteristics of the load are taken into account. The energy consumption of level flight and vertical climb is corrected in real time according to the total physical weight currently carried by the UAV, so that the total energy consumption calculation is closer to reality.

[0017] 3. The present invention also includes dynamic task replanning, which dynamically adjusts the trigger threshold according to the type of task addition or deletion. While ensuring the quality of task allocation, it effectively reduces unnecessary global replanning, reduces the consumption of computing resources, avoids frequent changes in UAV flight paths, and achieves a comprehensive balance between UAV carrying capacity and computer computing power. Attached Figure Description

[0018] Figure 1 This is a flowchart of the UAV task allocation method of the present invention; Figure 2 This is a schematic diagram of the drone scheduling principle of the present invention. Detailed Implementation

[0019] The technical solution of the present invention will be further described in detail below with reference to specific embodiments. Parts not described or disclosed in detail in the following embodiments of the present invention should be understood as prior art known or should be known by those skilled in the art.

[0020] like Figure 1 , Figure 2 As shown, the present invention provides a method for UAV task allocation based on the Improved Whale Optimization Algorithm (IWOA), including steps S1 to S4.

[0021] S1. Obtain the raw data for the task to be executed. The raw data includes task node data, task constraint data, flight area environment data, and UAV swarm data. Task node data includes the two-dimensional coordinates, altitude, physical weight of the supplies to be deployed, and task priority of each task node. Task constraint data includes the time window, task execution duration, and hard deadline of each task node. Flight area environment data includes the terrain complexity level of the flight area. UAV swarm data includes the total number of UAVs, the energy consumption coefficient for level flight under full load, the energy consumption coefficient for vertical climb under full load, the proportion of energy consumption for empty flight, the maximum physical payload capacity, and the maximum weighted payload threshold for a single UAV.

[0022] S2. Generate several initial task allocation schemes based on the original data as the initial population. The fitness of individuals in the population is represented by the comprehensive cost of the task allocation scheme. The comprehensive cost is calculated based on the task allocation scheme and the original data through a pre-constructed comprehensive cost function. The comprehensive cost function includes the total flight distance cost, load balancing cost, overload penalty cost, timeout penalty cost, and total energy consumption cost.

[0023] The comprehensive cost function is: , in, For overall cost, For total flight distance cost, For the cost of load balancing, As a consequence of penalties for overloading, As a consequence of exceeding the time limit, Total energy cost, , , , , All of these are preset weighting coefficients, which can be flexibly set according to requirements.

[0024] in: The total flight distance cost includes the sum of terrain correction distances for all UAV flight paths, where the terrain correction distance is: , in, Predecessor node To the current node Terrain correction distance, Predecessor node To the current node The two-dimensional Euclidean physical distance, The proportionality factor for the influence of terrain on distance. The terrain complexity level of the flight area.

[0025] The total energy cost is the sum of the energy consumption of all UAVs during level flight and vertical climb in the process of executing the task allocation plan: Level flight energy consumption is: , in, For level flight energy consumption, Predecessor node To the current node Terrain correction distance, This represents the energy consumption coefficient for level flight under full load. This is the dynamic energy consumption attenuation factor; The energy consumption for vertical climb is: , in, Energy consumption for vertical climbing. For the current node altitude Predecessor node altitude The energy consumption coefficient for vertical climbing under full load; The dynamic energy consumption decay factor is: , in, This is the dynamic energy consumption attenuation factor. The percentage of energy consumed during unloaded flight. This refers to the total physical weight carried by the drone during its current flight segment. This represents the maximum physical payload capacity of the drone.

[0026] The overload penalty is the penalty for the drone's weighted load exceeding a preset weighted load threshold. The weighted load is the sum of the products of the physical weight of the drone for each task and the task priority.

[0027] The cost of load balancing is the load balancing coefficient, which is: , in, This is the load balancing coefficient. For the number of drones, For the first Weighted payload of the drone The average weighted load of the drone swarm.

[0028] The timeout penalty is the sum of the time window penalty and the hard deadline penalty. The timeout penalty is: , in, As a consequence of exceeding the time limit, The time window penalty coefficient, For task nodes The upper limit of the time window, For task nodes The lower limit of the time window, To reach the task node The current time, This is the penalty coefficient for a hard deadline. For task nodes Execution duration, For task nodes The hard deadline.

[0029] Due to terrain limitations, the time required for a drone to perform a mission is: , in, For drones from the precursor node Fly to the current node Corrected flight time, Predecessor node To the current node The two-dimensional Euclidean physical distance, For the drone's flight speed, As a proportionality factor for the influence of topography on time, The terrain complexity level of the flight area.

[0030] Furthermore, to ensure the safety of multi-drone collaborative operations, a collision penalty cost can be added to the overall cost function. First, a safe collision avoidance threshold is set for multi-drone missions. During the route generation phase, the spatial Euclidean distance between any two drones is monitored in real time. If the spatial Euclidean distance is less than the safe collision avoidance threshold, a collision penalty cost is incurred and included in the overall cost. For delivery tasks with high flight safety requirements, introducing a collision penalty cost can help avoid routes with collision risks.

[0031] Methods for generating several initial task allocation schemes as an initial population based on raw data include: Logistic chaotic mapping is used to generate several initial task assignment schemes based on the original data as the initial population. The chaotic mapping equation is: , in, The chaotic variable value for the next iteration. For chaos control parameters, This represents the current value of the chaotic variable.

[0032] S3. An improved whale optimization algorithm is used to iterate the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual. An adaptive convergence factor is used to adjust the update step size. The adaptive convergence factor is dynamically adjusted based on the normalized variance of the current population fitness.

[0033] The adaptive convergence factor is: , , , in, The adaptive convergence factor. The maximum value of the adaptive convergence factor. This is the minimum value of the adaptive convergence factor. This represents the current iteration number. The maximum number of iterations, The attenuation rate, For adjustment coefficients, The normalized variance of the current population fitness. For population size, For individual fitness, For average fitness, For maximum fitness, This represents the minimum fitness.

[0034] Among them, the adjustment coefficient Used to control attenuation rate Sensitivity to changes in normalized variance.

[0035] In the later stages of iteration, a local search strategy based on the K-medoids concept is introduced. Specifically, candidate nodes in the neighborhood of each cluster center in the current global optimum are selected sequentially, with the cluster center being the representative node among the task nodes undertaken by the UAV. A greedy "one-for-one" replacement is performed on each cluster center, meaning the original cluster center is replaced by one of the candidate nodes in its neighborhood. If the overall cost of the task allocation scheme decreases after the replacement, the replacement is retained; otherwise, the original cluster center is restored. This local search strategy eliminates the accuracy error generated by the whale optimization algorithm when mapping from continuous space to discrete task nodes, further improving the quality of the task allocation scheme.

[0036] S4. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme. A flight path is generated for each UAV based on the optimal task allocation scheme. Each UAV corresponds to a cluster center. The task nodes are sorted according to their distance from the cluster center from closest to farthest to determine the task execution order. After taking off from the airport, the UAV completes the material delivery according to this task execution order.

[0037] Furthermore, the drone also includes dynamic mission replanning during mission execution: When the tasks to be executed change, a temporary allocation scheme is generated based on the optimal task allocation scheme, and the real-time comprehensive cost and real-time load balancing coefficient of the temporary allocation scheme are calculated. Specifically, the cluster centers and original task allocation relationships of each UAV in the optimal task allocation scheme are retained. For new tasks, they are allocated to the UAV closest to the cluster center according to the principle of proximity. For canceled tasks, they are removed from the task sequence of the corresponding UAV, thus obtaining the temporary allocation scheme.

[0038] The dynamic trigger threshold is calculated based on the task change rate. The dynamic trigger threshold includes the load balancing trigger threshold and the overall cost trigger threshold.

[0039] When tasks increase: , in, The threshold for triggering load balancing, This is the load balancing coefficient before the task change. Increase the rate of task completion. The threshold for triggering overall cost. The total cost before the task change. , , , All are adjustment coefficients; When the number of tasks decreases: , in, For task reduction rate; When the real-time comprehensive cost exceeds the comprehensive cost trigger threshold or the real-time load balancing coefficient exceeds the load balancing trigger threshold, the temporary allocation scheme is deemed unbalanced, and the improved whale optimization algorithm is used again for task allocation. When the real-time comprehensive cost is less than or equal to the comprehensive cost trigger threshold and the real-time load balancing coefficient is less than or equal to the load balancing trigger threshold, the temporary allocation scheme is deemed feasible, and the temporary allocation scheme replaces the optimal task allocation scheme.

[0040] Finally, this invention provides a drone task allocation system based on an improved whale optimization algorithm, including a data acquisition module, a data processing module, and a data display module.

[0041] The data acquisition module is used to acquire the raw data of the task to be executed. The raw data includes task node data, task constraint data, flight area environmental data, and UAV swarm data.

[0042] The data processing module is used to generate several initial task allocation schemes as an initial population based on the raw data. An improved whale optimization algorithm is used to iteratively process the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme.

[0043] The data visualization module is used to visually represent the optimal task allocation scheme.

[0044] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for UAV task allocation based on an improved whale optimization algorithm, characterized in that, include: Obtain the raw data of the task to be executed. The raw data includes task node data, task constraint data, flight area environmental data, and UAV swarm data. Several initial task allocation schemes are generated based on the original data as an initial population. The fitness of individuals in the population is represented by the comprehensive cost of the task allocation scheme. The comprehensive cost is calculated based on the task allocation scheme and the original data through a pre-constructed comprehensive cost function. The comprehensive cost function includes total flight distance cost, load balancing cost, overload penalty cost, timeout penalty cost and total energy consumption cost. An improved whale optimization algorithm is used to iteratively process the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. The adaptive convergence factor is dynamically adjusted based on the normalized variance of the current population fitness. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme.

2. The UAV task allocation method based on the improved whale optimization algorithm according to claim 1, characterized in that, The comprehensive cost function is: , in, For overall cost, For total flight distance cost, For the cost of load balancing, As a consequence of penalties for overloading, As a consequence of exceeding the time limit, Total energy cost, , , , , All of these are preset weighting coefficients.

3. The UAV task allocation method based on the improved whale optimization algorithm according to claim 2, characterized in that, The total flight distance cost includes the sum of terrain correction distances for all UAV flight paths, where the terrain correction distance is: , in, Predecessor node To the current node Terrain correction distance, Predecessor node To the current node The two-dimensional Euclidean physical distance, The proportionality factor for the influence of terrain on distance. The terrain complexity level of the flight area.

4. The UAV task allocation method based on the improved whale optimization algorithm according to claim 3, characterized in that, The total energy cost is the sum of the energy consumption of all UAVs during level flight and vertical climb in the process of executing the task allocation plan: Level flight energy consumption is: , in, For level flight energy consumption, Predecessor node To the current node Terrain correction distance, This represents the energy consumption coefficient for level flight under full load. This is the dynamic energy consumption attenuation factor; The energy consumption for vertical climb is: , in, Energy consumption for vertical climbing. For the current node altitude Predecessor node altitude The energy consumption coefficient for vertical climbing under full load; The dynamic energy consumption decay factor is: , in, This is the dynamic energy consumption attenuation factor. The percentage of energy consumed during unloaded flight. This refers to the total physical weight carried by the drone during its current flight segment. This represents the maximum physical payload capacity of the drone.

5. The UAV task allocation method based on the improved whale optimization algorithm according to claim 2, characterized in that, The overload penalty is the penalty for the drone's weighted load exceeding a preset weighted load threshold. The weighted load is the sum of the products of the physical weight of the drone for each task and the task priority.

6. The UAV task allocation method based on the improved whale optimization algorithm according to claim 5, characterized in that, The cost of load balancing is the load balancing coefficient, which is: , in, This is the load balancing coefficient. For the number of drones, For the first The weighted payload of the drone The average weighted load of the drone swarm.

7. The UAV task allocation method based on the improved whale optimization algorithm according to claim 2, characterized in that, The timeout penalty is the sum of the time window penalty and the hard deadline penalty. The timeout penalty is: , in, As a consequence of exceeding the time limit, The time window penalty coefficient, For task nodes The upper limit of the time window, For task nodes The lower limit of the time window, To reach the task node The current time, This is the penalty coefficient for a hard deadline. For task nodes Execution duration, For task nodes The hard deadline.

8. The UAV task allocation method based on the improved whale optimization algorithm according to claim 1, characterized in that, The adaptive convergence factor is: , , , in, The adaptive convergence factor. The maximum value of the adaptive convergence factor. This is the minimum value of the adaptive convergence factor. This represents the current iteration number. The maximum number of iterations, The attenuation rate, For adjustment coefficients, The normalized variance of the current population fitness. For population size, For individual fitness, For average fitness, For maximum fitness, This represents the minimum fitness.

9. A method for UAV task allocation based on an improved whale optimization algorithm according to claim 1, characterized in that, The drone also includes dynamic mission replanning during mission execution: When the tasks to be executed change, a temporary allocation scheme is generated based on the optimal task allocation scheme, and the real-time comprehensive cost and real-time load balancing coefficient of the temporary allocation scheme are calculated. The dynamic trigger threshold is calculated based on the task change rate. The dynamic trigger threshold includes the load balancing trigger threshold and the overall cost trigger threshold. When tasks increase: , in, The threshold for triggering load balancing, This is the load balancing coefficient before the task change. Increase the rate of task completion. The threshold for triggering overall cost. The total cost before the task change. , , , All are adjustment coefficients; When the number of tasks decreases: , in, For task reduction rate; When the real-time comprehensive cost exceeds the comprehensive cost trigger threshold or the real-time load balancing coefficient exceeds the load balancing trigger threshold, the temporary allocation scheme is determined to be unbalanced, and the improved whale optimization algorithm is used again for task allocation. When the real-time comprehensive cost is less than or equal to the comprehensive cost trigger threshold and the real-time load balancing coefficient is less than or equal to the load balancing trigger threshold, the temporary allocation scheme is deemed feasible and is used to replace the optimal task allocation scheme.

10. A drone task allocation system based on an improved whale optimization algorithm, characterized in that, It includes a data acquisition module, a data processing module, and a data display module; The data acquisition module is used to acquire the raw data of the task to be executed. The raw data includes task node data, task constraint data, flight area environmental data, and UAV swarm data. The data processing module is used to generate several initial task allocation schemes as an initial population based on the raw data. An improved whale optimization algorithm is used to iterate the initial population with the goal of minimizing the overall cost. During the iteration process, the positions of other individuals in the population are updated based on the current best individual, and an adaptive convergence factor is used to adjust the update step size. When the preset convergence condition is met, the task allocation scheme corresponding to the best individual in the population is selected as the optimal task allocation scheme. The data visualization module is used to visually represent the optimal task allocation scheme.