Multi-unmanned aerial vehicle cooperative task dynamic allocation method
By combining genetic algorithms and operations research methods, and improving K-means and ant colony algorithms, a multi-UAV collaborative task allocation model is constructed, which solves the problem of low task allocation efficiency in multi-UAV systems and achieves efficient task allocation in dynamic environments.
Patent Information
- Application Number
- CN202510985181.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-09-23
AI Technical Summary
Existing technologies struggle to effectively allocate tasks in multi-UAV systems, especially in dynamic environments where maximizing overall system efficiency is difficult to achieve. Traditional methods are ill-suited to complex factors such as a large number of task points and limited resources.
By combining genetic algorithms and operations research methods, and by improving the K-means clustering algorithm, ant colony algorithm and genetic algorithm, an initial and dynamic redistribution model for multi-UAV cooperative tasks is constructed to achieve optimal grouping and dynamic redistribution of task points.
It improves the efficiency of multi-drone collaborative task allocation, can adapt to complex factors in dynamic environments, and ensures task completion and execution efficiency.
Smart Images

Figure CN120688830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a method for dynamically allocating collaborative tasks among multiple UAVs. Background Art
[0002] Drones are a vital force in modern production, with widespread applications in areas such as agricultural seeding, geological exploration, and emergency response. Drones primarily perform simple, repetitive, and mechanical tasks, effectively reducing labor costs and efficiency. In recent years, researchers have been working to enable drones to perform more complex and comprehensive tasks. This requires drone swarms to possess advanced capabilities in joint detection, intelligent decision-making, and coordinated action. Task allocation technology is a crucial component of intelligent decision-making.
[0003] Currently, effectively allocating tasks to maximize overall system efficiency when multiple drone systems execute large-scale missions is a key research issue in this field. Traditional static task allocation methods or heuristic methods based on simple rules struggle to adapt to complex factors such as the large number of task points and limited resources (such as battery power) in dynamic environments. Summary of the Invention
[0004] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method for dynamic allocation of multi-UAV collaborative tasks. The present invention proposes to combine genetic algorithms with operations planning methods to integrate the advantages of both to achieve more efficient multi-UAV collaborative task allocation and adapt to application scenarios with complex factors in dynamic environments.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] The present invention provides a method for dynamically allocating collaborative tasks among multiple UAVs, comprising:
[0007] Construct an initial allocation model for multi-UAV collaborative tasks based on static factors;
[0008] The improved Kmeans clustering algorithm is used to optimally group the task points;
[0009] Determine the optimal order of task points within each group based on the ant colony algorithm;
[0010] Based on the initial allocation model and the grouping, an improved genetic algorithm is used to solve the initial allocation;
[0011] After the initial allocation is performed according to the initial allocation solution, a dynamic reallocation model of multi-UAV collaborative tasks is constructed based on dynamic factors;
[0012] Based on the dynamic reallocation model, dynamic reallocation is solved by adopting the operational planning idea, and dynamic reallocation is performed according to the dynamic reallocation solution result;
[0013] The improved Kmeans clustering algorithm is based on the Kmeans clustering algorithm, which introduces a balance constraint mechanism to balance the cluster size, combines the elbow point method and the silhouette coefficient method to determine the number of clusters, and selects the cluster center of the cluster based on the square of the distance from the data point to its nearest cluster center;
[0014] The improved genetic algorithm is based on the genetic algorithm, initializes the population based on the encoding method of integer arrangement and separators, adopts the elite strategy and genetic operation to expand the solution space, and judges and repairs the effectiveness of individuals in the population.
[0015] Optionally, the objective function of the initial allocation model is for:
[0016]
[0017] Where, are all weight parameters; are total time cost, total flight distance cost, flight distance equilibrium cost, number of drones cost, and number of tasks assigned;
[0018]
[0019]
[0020]
[0021]
[0022]
[0023] Where, For the The actual flight distance and average flight speed of each drone, is the number of drones and the number of missions; is a binary decision variable;
[0024] .
[0025] Optionally, the constraints of the initial allocation model include:
[0026] Task uniqueness constraint:
[0027]
[0028] Where, are binary decision variables and have directionality. hour, ;
[0029] Drone round-trip constraints:
[0030]
[0031] Task completion limit constraints:
[0032]
[0033] Drone endurance constraints:
[0034]
[0035] Where, is the task execution time, For the The number of tasks assigned to each drone, For the The maximum flight time of a drone.
[0036] Optionally, the optimal grouping of task points using the improved Kmeans clustering algorithm includes:
[0037] Initialize the number of cluster centers and cluster centers, repeat the first iteration process until , execute the final determination process; among them, The maximum number of preset cluster centers;
[0038] The first iterative process includes:
[0039] Initialization iteration count , repeat the second iteration process until , output objective function The clustering result with the smallest value of is obtained, and the error square and silhouette coefficient are calculated based on the clustering result; among them, is the preset maximum number of iterations;
[0040] The second iterative process includes:
[0041] Assign each task point to the nearest cluster center to generate a cluster;
[0042] Get the number of data points in each cluster and calculate the balance constraint penalty value for each cluster :
[0043]
[0044] Where, For the The equilibrium constraint penalty value of the clusters, For the The number of task points in a cluster, is the total number of mission points;
[0045] Calculate the probability of each task point being selected as the cluster center :
[0046]
[0047] Where, For the The distance from the task point to its nearest cluster center, For the The probability of a task point being selected as a cluster center;
[0048] According to probability Reselect the cluster center and calculate the objective function with the introduction of the equilibrium constraint mechanism :
[0049]
[0050] Where, For the clusters, For the The coordinates of the mission point, For the The coordinates of the cluster centers of the clusters, is the number of clusters, is the weight parameter to control the degree of balance;
[0051] The determination process includes:
[0052] If the k value corresponding to the minimum square error is equal to the k value corresponding to the maximum silhouette coefficient, it is taken as the optimal k value and the corresponding clustering result is output;
[0053] If the k value corresponding to the minimum square error and the k value corresponding to the maximum silhouette coefficient are not equal, the optimal k value is selected based on the criteria of minimizing the square error and maximizing the silhouette coefficient, and the corresponding clustering results are output.
[0054] Optionally, the initial allocation solution using an improved genetic algorithm includes:
[0055] Initialize the population:
[0056] Repeat the initialization steps until the number of individuals in the population reaches the preset number of individuals;
[0057] The initialization step includes:
[0058] Generate a numbered list of groups and randomly shuffle the order of the numbered list to form an initial sort of the groups; randomly insert a corresponding number of separators in the initial sort of the groups based on the number of drones, so that each separator interval corresponds to a drone to obtain individuals, and then judge the validity of the individuals and eliminate invalid individuals;
[0059] Repeat the following steps until the maximum number of iterations is met, and output the individual with the largest fitness value as the solution result:
[0060] Fitness function calculation evaluation:
[0061] Calculating the fitness value of each individual by using the objective function of the initial allocation model as the fitness function;
[0062] Elite Strategy:
[0063] Select the one with the highest fitness Each individual is regarded as an elite individual and retained to the next generation of the population;
[0064] Select crossover operation and select mutation operation:
[0065] The roulette wheel selection method is used to select two individuals from the remaining individuals as parent individuals to perform crossover operation to generate offspring individuals;
[0066] The roulette wheel selection method is used to select an individual from the remaining individuals as the parent individual to perform mutation operation to generate offspring individuals;
[0067] The generated offspring individuals are all judged for their validity, and the valid offspring individuals are retained to the next generation of the population; the invalid offspring individuals are repaired and mediated and retained to the next generation of the population;
[0068] Synthesize the next generation population:
[0069] The elite individuals generated by the elite strategy, the offspring individuals generated by the selection crossover operation and the selection mutation operation are merged into the next generation population.
[0070] Optionally, the individual validity judgment includes:
[0071] If the individual is subject to both legality constraints and feasibility constraints, it is judged as valid, otherwise it is judged as invalid;
[0072] The legality constraints include a task uniqueness constraint and a drone quantity constraint. The task uniqueness constraint includes that an individual cannot contain repeated group numbers; the drone quantity constraint includes that the number of drones in an individual is equal to the number of separators.
[0073] The feasibility constraint includes a drone endurance constraint, wherein the drone endurance constraint includes that the total flight time of the drone is less than or equal to its maximum endurance time;
[0074] The individual remediation mediation is only for individuals who do not meet the legality constraints, including:
[0075] Remove extra delimiters or insert missing delimiters at random positions, fix the number of delimiters;
[0076] For repeated group numbers, delete the group numbers at random positions to ensure task uniqueness;
[0077] For cases where the sum of the number of groups and the number of drones is not equal to the individual length, find the missing groups and fill them in.
[0078] Optionally, the objective function of the dynamic reallocation model is for:
[0079]
[0080] Where, are weight parameters, The additional flight costs for the number of unassigned mission points, the number of newly added drones, and reallocation;
[0081]
[0082]
[0083]
[0084] Where, is the number of task points that need to be reallocated, For the number of drones and the number of newly added drones, For the The task points that need to be reallocated are The Euclidean distance between the drones, is the binary decision variable for task reallocation, To add new drone variables, ;
[0085]
[0086] .
[0087] Optionally, the constraints of the dynamic reallocation model are the same as the constraints of the initial allocation model.
[0088] Optionally, the dynamic reallocation solution using operations planning ideas includes:
[0089] Obtaining status information of each drone, and determining the earliest idle drone in order based on the status information, recording it as a target drone and forming a target drone sequence;
[0090] Perform the following steps in order for the target drones in the target drone sequence:
[0091] Construct a search area with the last mission point of the target UAV as the center and initialize the search radius;
[0092] Repeating the search allocation process until the search radius is greater than a preset maximum search radius;
[0093] The search allocation process includes:
[0094] If the target UAV has remaining flight time, obtain the task points that need to be reallocated within the search radius;
[0095] If the number of task points that need to be reallocated within the search radius is 0, the search radius is increased according to the preset distance gradient;
[0096] If the number of task points that need to be reallocated within the search radius is not 0, the optimal sorting is determined by the ant colony algorithm and used as a new task sequence. If the remaining flight time of the target UAV is sufficient to complete the new task sequence, the new task sequence is assigned to the target UAV, and the search radius is increased according to the preset distance gradient.
[0097] Optionally, after the dynamic reallocation solution is performed using the operations planning idea, if there are still task points that need to be reallocated, the number of drones is increased according to a preset number gradient, and the dynamic reallocation solution is performed again.
[0098] Compared with the prior art, the present invention has the following beneficial effects:
[0099] The present invention provides a method for dynamic allocation of collaborative tasks among multiple unmanned aerial vehicles. An initial allocation model is constructed based on static factors and solved by combining an improved Kmeans clustering algorithm, an ant colony algorithm, and an improved genetic algorithm to obtain an initial optimal allocation. On this basis, in order to cope with the uncertainty of the power and status of the drones during task execution, a dynamic reallocation model is constructed based on dynamic factors and solved by combining the idea of operations planning. From static initial allocation to dynamic reallocation, an algorithm system for dynamic task allocation and scheduling of collaborative tasks among multiple unmanned aerial vehicles is systematically constructed. The genetic algorithm is combined with the operations planning method to integrate the advantages of both to achieve more efficient collaborative task allocation among multiple unmanned aerial vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 11 is a flow chart of a method for dynamically allocating collaborative tasks among multiple UAVs provided by an embodiment of the present invention;
[0101] Figure 2 This is a technical flow chart of a method for dynamically allocating collaborative tasks among multiple UAVs provided by an embodiment of the present invention;
[0102] Figure 3 This is a technical flow chart of an embodiment of the present invention providing an improved genetic algorithm for performing initial allocation solution;
[0103] Figure 4 is an example diagram of a chromosome encoding method provided by an embodiment of the present invention;
[0104] Figure 5 This is an example diagram of legal individuals generated by a crossover operation provided by an embodiment of the present invention;
[0105] Figure 6 This is an example diagram of illegal individuals generated by a crossover operation provided by an embodiment of the present invention;
[0106] Figure 7 This is an example diagram of generating new individuals through mutation operations provided by an embodiment of the present invention;
[0107] Figure 8 It is a technical flow chart of the chromosome repair mediation process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0108] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0109] Example 1:
[0110] like Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a method for dynamically allocating collaborative tasks among multiple UAVs, including the following steps:
[0111] Step S1: Construct an initial allocation model for multi-UAV collaborative tasks based on static factors.
[0112] In multi-UAV collaborative operations, due to the complexity of task requirements, the uncertainty of the operating environment, and the limited resources of the UAVs themselves, a reasonable task allocation plan needs to consider both static task allocation and dynamic task adjustment to ensure the system's task completion and execution efficiency. This application uses a static allocation strategy for initial task allocation, that is, without considering any internal or external interference factors during the execution process, a one-time optimal allocation is made based on the global information of the task points and the UAV status, providing a basis for subsequent dynamic reallocation.
[0113] The objective function is an evaluation metric for the multi-UAV collaborative task allocation problem. The evaluation system in this model primarily considers five components: total time cost, total flight cost, flight equilibrium cost, UAV quantity cost, and the number of assigned tasks. The solution to the problem is to minimize the sum of these costs, or the objective function, while satisfying a series of constraints.
[0114] (1) Objective function of the initial allocation model for:
[0115]
[0116] Where, are all weight parameters; are total time cost, total flight distance cost, flight distance equilibrium cost, number of drones cost, and number of tasks assigned;
[0117]
[0118] The total time cost is the total duration from the start of the mission execution to the return of the last UAV to the starting point. The less UAV flight time, the more efficient the system.
[0119]
[0120] The total flight cost is the sum of the flight distances of all drones during the execution of a mission by a multi-drone system. The longer the total flight distance, the more energy the system consumes.
[0121]
[0122] The range balancing cost is the sum of the standard deviations of the flight distances of each UAV. In order to prevent excessive energy consumption of a single UAV, the workload of each UAV in the multi-UAV system is balanced as much as possible.
[0123]
[0124] The drone quantity cost is used to control the number of drones, avoiding wasted resources and increased costs caused by excessive drones. This adds a penalty term related to the number of drones. The greater the number of drones, the greater the penalty term and the smaller the objective function value.
[0125]
[0126] The number of task assignments is the total number of tasks completed by drones. Considering that the research goal is to optimize the allocation, the number of drones is set in advance. When the number of drones is small, the multi-drone system may not be able to assign all tasks. Therefore, it is hoped that the total number of task assignments is as large as possible.
[0127] Where, For the The actual flight distance and average flight speed of each drone, is the number of drones and the number of missions; is a binary decision variable;
[0128] .
[0129] (2) The constraints of the initial allocation model include:
[0130] Task uniqueness constraint: indicates that the drone will not repeat each task, and each task will only be assigned to one drone or no drone. When it is equal to 0, it means that the drone starts from the starting point or returns to the starting point.
[0131]
[0132] Where, are binary decision variables and have directionality. hour, ;
[0133] Drone round-trip constraint: This means that the drone can only start from the starting point and can only make one round trip.
[0134]
[0135] Task completion upper limit constraint: This means that the total number of tasks performed by all drones in the multi-drone system must be less than or equal to the total number of tasks. In other words, not all tasks are necessarily executed. When system resources are insufficient, the multi-drone system may not be able to complete all tasks.
[0136]
[0137] Drone endurance constraint: This means that due to the limitations of the drone's flight speed and battery capacity, the total flight distance of the drone is limited. The drone must complete the mission within the maximum flight time (endurance) and finally return to the starting point safely.
[0138]
[0139] Where, is the task execution time, For the The number of tasks assigned to each drone, For the The maximum flight time of a drone.
[0140] Step S2: Use the improved Kmeans clustering algorithm to optimally group the task points.
[0141] UAV mission areas are often vast, with numerous and unevenly distributed target points. These target points are predefined based on geographic information or mission requirements. Assigning these large-scale mission points one by one would result in a very high time complexity for the allocation algorithm. To improve the efficiency of task allocation, we can apply the clustering principle used in target allocation to divide the mission area into several sub-areas (dividing all mission points into several groups), determine the requirements of each sub-area, and then rationally assign these sub-areas to different UAVs for mission execution, achieving efficient task allocation and resource optimization.
[0142] Specifically in this embodiment, the improved Kmeans clustering algorithm is also called the BalancedXmeans++ clustering algorithm, which is based on the Kmeans clustering algorithm and introduces a balance constraint mechanism to balance the size of clusters. It combines the elbow point method and the silhouette coefficient method to determine the number of clusters, and selects the cluster center of the cluster based on the square of the distance from the data point to its nearest cluster center.
[0143] The improved Kmeans clustering algorithm is used to optimally group the task points, specifically including:
[0144] Initialize the number of cluster centers and cluster centers, repeat the first iteration process until , execute the final determination process; among them, The maximum number of preset cluster centers;
[0145] (1) The first iteration process includes:
[0146] Initialization iteration count , repeat the second iteration process until , output objective function The clustering result with the smallest value of is obtained, and the error square and silhouette coefficient are calculated based on the clustering result; among them, is the preset maximum number of iterations;
[0147] Elbow point method: The square error SSE is the sum of the squares of the distances from each task point to the cluster center.
[0148] Silhouette Coefficient Method: Silhouette Coefficient Right now:
[0149]
[0150] Where: For the The average distance from a task point to other task points in the same cluster, For the The average distance from a task point to the nearest task point in other clusters;
[0151] (2) The second iteration process includes:
[0152] Assign each task point to the nearest cluster center to generate a cluster;
[0153] Get the number of data points in each cluster and calculate the balance constraint penalty value for each cluster :
[0154]
[0155] Where, For the The equilibrium constraint penalty value of the clusters, For the The number of task points in a cluster, is the total number of mission points;
[0156] Calculate the probability of each task point being selected as the cluster center :
[0157]
[0158] Where, For the The distance from the task point to its nearest cluster center, For the The probability of a task point being selected as a cluster center;
[0159] According to probability Reselect the cluster center and calculate the objective function with the introduction of the equilibrium constraint mechanism :
[0160]
[0161] Where, For the clusters, For the The coordinates of the mission point, For the The coordinates of the cluster centers of the clusters, is the number of clusters, is the weight parameter to control the degree of balance;
[0162] (3) The determination process includes:
[0163] If the k value corresponding to the minimum square error is equal to the k value corresponding to the maximum silhouette coefficient, it is taken as the optimal k value and the corresponding clustering result is output;
[0164] If the k value corresponding to the minimum square error and the k value corresponding to the maximum silhouette coefficient are not equal, the optimal k value is selected based on the criteria of minimizing the square error and maximizing the silhouette coefficient, and the corresponding clustering results are output.
[0165] Based on the classic Circles dataset, the BalancedXmeans++ algorithm and the traditional Kmeans algorithm are used for clustering. The Circles dataset is usually used to verify the ability of the algorithm to handle irregular shape clustering. The clustering indicators of the two algorithms are shown in Table 1.
[0166] Table 1: Comparison of indicators between the BalancedXmeans++ algorithm and the Kmeans algorithm
[0167]
[0168] First, the BalancedXmeans++ algorithm clusters the data set into 4 clusters. The number of clusters of the Kmeans algorithm is also set to 4, but the amount of sample data in each cluster is different. The standard deviation of the number of samples is 2.708 and 4.546 respectively. Obviously, the classification results of the BalancedXmeans++ algorithm are more balanced. The MSE indicator represents the average square distance from each data point to the centroid of its category. The BalancedXmeans++ algorithm is also better than the traditional Kmeans algorithm. The silhouette coefficient is the ratio of its average distance to other points of the same category (cohesion) and the average distance to the nearest point of a different category (separation). The result of this indicator shows that the BalancedXmeans++ algorithm has better aggregation and separation. In addition, the calculation results of the two algorithms are relatively stable.
[0169] Step S3: Determine the optimal order of task points in each group based on the ant colony algorithm.
[0170] After grouping, the ant colony algorithm is used to sort the task points in the group to realize the route planning of the UAV.
[0171] Step S4: Based on the initial allocation model and grouping, an improved genetic algorithm is used to perform initial allocation solution.
[0172] Since it is difficult to reasonably express the problem raised in this application using traditional genetic algorithms, and a large number of solutions that cannot meet the constraints will be generated in the population, which seriously affects the optimization effect and convergence speed of the algorithm, the solution to this problem is as follows: (1) First, a grouping strategy is adopted. Based on the Kmeans algorithm, the BalancedXmeans++ clustering algorithm is developed for optimal grouping. By optimizing the selection strategy of cluster centers and the distribution method of points within clusters, the optimal number of clusters is determined independently, and the point set within each cluster is ensured to be balanced. Then, the ant colony algorithm is used to perform sequence planning on the point set within the cluster; (2) With the help of the genetic algorithm framework, a chromosome encoding method and a fitness evaluation function calculation formula that are more in line with the multi-machine initial allocation mathematical model are designed to evaluate the quality of individuals, and a chromosome mediation and repair mechanism is proposed to adjust invalid solution individuals that do not meet the constraints, and finally achieve the optimal allocation of each target point in the task area based on the given system resources.
[0173] The improved genetic algorithm is based on the genetic algorithm, initializes the population based on the encoding method of integer arrangement and separator, adopts the elite strategy and genetic operation to expand the solution space, and judges and repairs the effectiveness of individuals in the population.
[0174] like Figure 3 As shown in Figure 2, an improved genetic algorithm is used to solve the initial allocation problem, which specifically includes:
[0175] (1) Initialize the population:
[0176] Repeat the initialization steps until the number of individuals in the population reaches the preset number of individuals;
[0177] The initialization steps include:
[0178] Generate a numbered list of groups and randomly shuffle the order of the numbered list to form an initial sort of the groups; randomly insert a corresponding number of separators in the initial sort of the groups based on the number of drones, so that each separator interval corresponds to a drone to obtain individuals, and then judge the validity of the individuals and eliminate invalid individuals;
[0179] Chromosome encoding is one of the key steps in algorithm design. The traditional encoding method for this problem is usually that each digit on the chromosome index represents the serial number of the assigned drone. For example, the individual [2, 0, 0, 1, 2, 1] means that regions 0, 1, 2, 3, 4, and 5 are assigned to drones 2, 0, 0, 1, 2, and 1. However, this method implies the sequential arrangement of regions and is not very flexible.
[0180] Therefore, the following encoding rules are set according to the mathematical model above: 1. Ensure that all subtask areas must be allocated without any omissions; 2. The same task area cannot be allocated repeatedly; 3. The chromosome length must be consistent to ensure the feasibility of genetic operations and fitness evaluation; 4. Be concise, efficient, clear and easy to decode.
[0181] Following the above rules, we adopt an improved encoding method based on integer arrangement plus dynamic separators, representing the mission area number as an integer sequence, and adding "-1" as a separator to represent the allocation situation. The number of bits in the chromosome is the sum of the number of mission groups and the number of drones. For example, if there are 8 mission areas and 3 drones, if mission areas 1, 2, and 3 are assigned to drone No. 1, mission areas 4 and 5 are assigned to drone No. 2, and mission areas 6, 7, and 8 are assigned to drone No. 2, the chromosome encoding method of this allocation scheme is as follows: Figure 4 As shown in (a); For example, if 5 mission areas are assigned to 5 drones, if the allocation plan is to assign mission areas 3 and 5 to drone No. 3, and assign mission areas 1, 2, and 4 to drone No. 5, the chromosome form corresponding to this allocation plan is as follows Figure 4 As shown in (b), the first "-1" means that no task is assigned to drone No. 1. In the above two cases, the last bit of the chromosome is "-1", which means that the task is fully assigned. The case where the task is not fully assigned is as follows. Figure 4 As shown in (c), it means that Task Group 5 was not assigned any drone to perform the mission.
[0182] This encoding method uses dynamic delimiters to allow some task blocks to remain unassigned, and can naturally represent situations where a drone is not assigned a task, supporting the drone's idle state without special constraints. Furthermore, for multi-digit ID numbers (e.g., "12," "56"), decoding errors will not occur when calculating individual fitness values. This is because chromosomes are stored in a list format, where each element represents an independent task. When traversing the list, the complete task is directly read rather than parsing the numbers individually. Overall, this encoding method is simple, intuitive, and versatile, adaptable to a variety of task sizes, and easy to expand.
[0183] Repeat the following steps until the maximum number of iterations is met, and output the individual with the largest fitness value as the solution result:
[0184] (2) Fitness function calculation and evaluation:
[0185] The objective function of the initial allocation model is used as the fitness function to calculate the fitness value of each individual;
[0186] (3) Elite Strategy:
[0187] Select the one with the highest fitness Each individual is regarded as an elite individual and retained to the next generation of the population;
[0188] (4) Select crossover operation and select mutation operation:
[0189] The roulette wheel selection method is used to select two individuals from the remaining individuals as parent individuals for crossover operation to generate offspring individuals; the general steps are as follows:
[0190] First, set the crossover probability to determine whether the selected parent chromosome will undergo a crossover operation. Then, randomly select crossover points to perform partial crossover on the chromosome to generate a new chromosome. Finally, determine the validity of the chromosome offspring generated by the crossover. If the offspring individual is a valid solution, it will be directly retained and added to the new population. For example, Figure 5 As shown, the fourth gene position is selected for exchange, and the resulting new chromosomes are all valid. For invalid individuals, repair and mediation operations should be performed according to the cause analysis, for example Figure 6 As shown, exchanges are performed at the fourth to sixth genes, resulting in two illegal solution individuals.
[0191] The roulette wheel selection method is used to select an individual from the remaining individuals as the parent individual to perform mutation operations to generate offspring individuals; the mutation operation introduces new gene diversity by randomly changing some genes in the chromosome to prevent the population from falling into a local optimal solution. There are usually two types of mutation operations: point mutation and exchange mutation. This study found through repeated experiments that exchange mutation is more effective and can save a lot of time-consuming repair and mediation operations. Therefore, exchange mutation is selected as the mutation operation operator. The operation steps can be briefly described as: 1. Probability judgment, decide whether to perform a mutation operation with a certain probability; 2. Select the mutation point, randomly select two different gene positions as the mutation point; 3. Exchange the gene values of the two mutation points; 4. Make a validity judgment on the mutated chromosome to ensure that it meets the task allocation constraints, otherwise perform repair and mediation. Such as Figure 7 shown.
[0192] The generated offspring individuals are all judged for their validity, and the valid offspring individuals are retained to the next generation of the population; the invalid offspring individuals are repaired and mediated and retained to the next generation of the population;
[0193] (5) Synthesize the next generation population:
[0194] The elite individuals generated by the elite strategy, the offspring individuals generated by the selection crossover operation and the selection mutation operation are merged into the next generation population.
[0195] Through elite strategy, selection, crossover and mutation operations, the improved genetic algorithm can efficiently search the solution space in the task allocation problem and gradually approach the optimal solution while ensuring the convergence of the algorithm and the quality of the solution.
[0196] In genetic algorithms, chromosomes represent individual solutions, and their validity is directly related to the algorithm's convergence and the quality of the solution. However, in traditional genetic algorithms, genetic operations during population evolution may produce individuals that fail to meet constraints. These infeasible solutions can slow down the algorithm's optimization speed or even prevent convergence. Therefore, a validity judgment mechanism is needed to first verify the validity of chromosomes, checking whether individuals meet the constraints. A repair and mediation strategy is then designed to adjust conflicts between individuals that fail to meet the constraints, ultimately ensuring that chromosomes remain valid and feasible solutions in every generation.
[0197] Individual effectiveness judgments include:
[0198] If the individual is subject to both legality constraints and feasibility constraints, it is judged as valid, otherwise it is judged as invalid;
[0199] The legality constraints include task uniqueness and drone quantity constraints. The task uniqueness constraint includes that the individual cannot contain repeated group numbers; the drone quantity constraint includes that the number of drones in an individual is equal to the number of separators.
[0200] Feasibility constraints include the drone's endurance constraint, which requires that the drone's total flight time is less than or equal to its maximum endurance time;
[0201] Individual reparative mediation is only for individuals who do not meet the legality constraints, including:
[0202] Remove extra delimiters or insert missing delimiters at random positions, fix the number of delimiters;
[0203] For repeated group numbers, delete the group numbers at random positions to ensure task uniqueness;
[0204] For cases where the sum of the number of groups and the number of drones is not equal to the individual length, find the missing groups and fill them in.
[0205] Figure 8 The chromosome repair process is shown, as well as the comparison before and after the repair of an invalid chromosome. For example, after repairing the chromosome [0, 1, -1, 0, 4, 3, 4] based on the repair mediation mechanism, the resulting chromosome may be [0, 1, -1, 2,4, 3, -1], and after repairing the chromosome [1, 2, -1, 2, 3, -1, -1], the resulting chromosome is [1, 2, 4, 3,0, -1, -1].
[0206] Step S5: After initial allocation according to the initial allocation solution, a dynamic reallocation model for multi-UAV collaborative tasks is constructed based on dynamic factors.
[0207] The initial task allocation problem for multiple drones is typically optimized based on a static environment and known mission requirements. However, in real-world applications, the environment often changes dynamically, such as due to fluctuations in drone status, environmental interference or failures, and shifting mission priorities. These dynamic factors can make the initial allocation scheme suboptimal, or even prevent mission execution according to the original plan. Therefore, dynamic reallocation has become an essential component of drone system task allocation and management.
[0208] The core concept of dynamic reallocation is that when a multi-machine system faces unexpected changes that prevent it from executing according to the initial task allocation plan, reallocation can quickly generate a new task allocation plan based on the system's real-time status. Therefore, the dynamic reallocation system can be roughly divided into three modules: data perception and task monitoring, which acquires real-time information about each drone and task status; task reallocation trigger detection, which determines whether task adjustments and arrangements are necessary; and optimization solution, which uses model-based algorithms to solve new task allocation plans.
[0209] Specifically, the problem can be described as follows.
[0210] Input: Real-time status of each drone in the system, including current location coordinates, battery power, remaining execution time, task progress, list of pending tasks, etc.; task point status, including task coordinates and completion status, etc.; environmental information, etc.
[0211] Decision variable: Task point reallocation strategy, that is, whether it is necessary to adjust the current task execution order or reassign some tasks to other UAVs.
[0212] Objectives: The objectives that need to be considered in dynamic reallocation include: ensuring that as many tasks as possible in the system are assigned and executed, reducing task failures due to faults or environmental changes, that is, minimizing the number of unassigned task points and maximizing the task completion rate; minimizing the use of additional drones to reduce resource consumption while meeting task requirements; optimizing the flight paths of drones, minimizing the additional flight costs caused by task reallocation, reducing energy consumption and time costs, and improving the overall efficiency of the system; during the reallocation process, try to maintain the stability of the initial allocation plan, reduce interference with assigned tasks, and avoid frequent adjustments to the drone's task queue.
[0213] (1) Objective function of the dynamic reallocation model for:
[0214]
[0215] Where, are weight parameters, The additional flight costs for the number of unassigned mission points, the number of newly added drones, and reallocation;
[0216]
[0217]
[0218]
[0219] Where, is the number of task points that need to be reallocated, For the number of drones and the number of newly added drones, For the The task points that need to be reallocated are The Euclidean distance between the drones, is the binary decision variable for task reallocation, To add new drone variables, ;
[0220]
[0221] .
[0222] (2) The constraints of the dynamic reallocation model are the same as those of the initial allocation model.
[0223] Step S6: Based on the dynamic reallocation model, adopt the operational planning idea to perform dynamic reallocation solution, and perform dynamic reallocation according to the dynamic reallocation solution result.
[0224] The core goal of dynamic reallocation is to be able to monitor emergencies in real time and quickly adjust the UAV's task allocation plan when the environment or tasks change, so as to maximize task completion efficiency, minimize resource consumption, and ensure the robustness and real-time performance of the system. Compared with initial allocation, dynamic reallocation requires higher computational efficiency and adaptability to ensure immediacy and meet the needs of real-time changes. Solving the dynamic reallocation model is still a relatively complex combinatorial optimization problem. The present invention adopts a strategy that combines hierarchical search with local optimization of the ant colony algorithm, and uses the idle priority scheduling strategy of the UAV to reasonably allocate unallocated task points when the total objective function term is minimized. In this way, it can respond promptly to the initial allocation results in combination with real-time system information, and dynamically adjust the task allocation plan, thereby effectively responding to the uncertainty of environmental changes, ensuring smooth execution of tasks, and improving the task completion rate.
[0225] The basic process of the algorithm is as follows:
[0226] (1) Prioritize scheduling of idle drones
[0227] Adopting the earliest available resource priority strategy, a common practice in operations research and optimization, the system maintains a list of unallocated points within the dynamic simulation system. The system assesses the current resource status in real time and triggers a timely reallocation response when the list is not empty. Based on the current state information, the system estimates the available time window for each drone and selects the earliest available drone as the core resource for task reallocation. Using the end of that drone's task sequence as the search center, a dynamic search buffer is created, enabling dynamic priority scheduling optimization and reducing task wait times.
[0228] (2) Hierarchical search sequence optimization and feasibility evaluation
[0229] Based on combinatorial optimization principles from operations research, the system uses a buffer zone as the search space and uses nearest neighbor search to identify task points within the buffer zone. Local path planning based on an ant colony algorithm then determines the optimal execution sequence for these task points within the buffer zone, which serves as the set of candidate path sequences. Taking into account the current remaining battery life of the drone, the system further conducts a resource feasibility analysis, assessing the feasibility of the task sequence within energy and time constraints, and ultimately determining a constrained local optimal solution. Based on this foundation, the system continuously expands the search radius, constructing a hierarchical optimization structure to achieve coordinated optimization of task allocation and route planning.
[0230] (3) Added new drone strategy and task allocation termination conditions
[0231] When all existing drones are fully loaded and there are still unassigned tasks, the minimum allocation principle in operations research is used to dynamically introduce the minimum amount of new resources while ensuring that all tasks are completed, and then assign tasks. When all tasks are successfully assigned, the task reallocation process ends.
[0232] The dynamic redistribution solution is solved by using the operational planning idea, including:
[0233] Obtain the status information of each drone, determine the earliest idle drone in order based on the status information, record it as the target drone and form a target drone sequence;
[0234] Perform the following steps in order for the target drone in the target drone sequence:
[0235] Construct a search area with the target UAV's last mission point as the center and initialize the search radius;
[0236] Repeat the search allocation process until the search radius is greater than the preset maximum search radius;
[0237] The search allocation process includes:
[0238] If the target UAV has remaining flight time, obtain the task points that need to be reallocated within the search radius;
[0239] If the number of task points that need to be reallocated within the search radius is 0, the search radius is increased according to the preset distance gradient;
[0240] If the number of task points that need to be reallocated within the search radius is not zero, the ant colony algorithm is used to determine their optimal order and use it as a new task sequence. If the remaining flight time of the target UAV is sufficient to complete the new task sequence, the new task sequence will be assigned to the target UAV, and the search radius will be increased according to the preset distance gradient.
[0241] Furthermore, after dynamic reallocation solution is performed using the operational planning idea, if there are still task points that need to be reallocated, the number of drones is increased according to the preset number gradient, and the dynamic reallocation solution is performed again.
[0242] In summary, based on the idea of hierarchical decoupling, this application first develops the BalancedXmeans++ clustering algorithm to achieve the optimal grouping of large-scale task points at the level of initial task allocation for multiple drones. Then, an improved genetic algorithm is proposed to realize the initial task allocation scheme of task sequences to drones based on the number of task points and sequence length in the cluster, as well as the performance parameters of each drone. The improvements of the genetic algorithm mainly include: (1) formulating chromosome encoding rules and fitness evaluation functions that are more accurate and suitable for the description according to the mathematical model of initial task allocation; (2) improving the chromosome validity judgment and mediation repair mechanism according to the mathematical model of initial task allocation, adjusting the invalid solution individuals that do not meet the constraints, and greatly improving the search efficiency and solution feasibility. On this basis, in order to cope with the uncertainty of drone power and status during task execution, a dynamic reallocation strategy is designed, and an operations planning model with a multi-level decision-making structure is constructed. Through the earliest available resource priority strategy and the minimum configuration principle, the system can still efficiently complete task allocation under complex constraints. Overall, this application systematically constructs an algorithm system for multi-drone collaborative dynamic task allocation and scheduling from static initial allocation to dynamic reallocation.
[0243] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0244] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0245] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0246] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0247] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for dynamic allocation of multi-UAV collaborative tasks, characterized in that: include: Construct an initial allocation model for multi-UAV collaborative tasks based on static factors; The improved Kmeans clustering algorithm is used to optimally group the task points; Determine the optimal order of task points within each group based on the ant colony algorithm; Based on the initial allocation model and the grouping, an improved genetic algorithm is used to solve the initial allocation; After the initial allocation is performed according to the initial allocation solution, a dynamic reallocation model of multi-UAV collaborative tasks is constructed based on dynamic factors; Based on the dynamic reallocation model, dynamic reallocation is solved by adopting the operational planning idea, and dynamic reallocation is performed according to the dynamic reallocation solution result; The improved Kmeans clustering algorithm is based on the Kmeans clustering algorithm, which introduces a balance constraint mechanism to balance the cluster size, combines the elbow point method and the silhouette coefficient method to determine the number of clusters, and selects the cluster center of the cluster based on the square of the distance from the data point to its nearest cluster center; The improved genetic algorithm is based on the genetic algorithm, initializes the population based on the encoding method of integer arrangement and separators, adopts the elite strategy and genetic operation to expand the solution space, and judges and repairs the effectiveness of individuals in the population.
2. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The objective function of the initial allocation model for: Where, are all weight parameters; are total time cost, total flight distance cost, flight distance equilibrium cost, number of drones cost, and number of tasks assigned; Where, For the The actual flight distance and average flight speed of each drone, is the number of drones and the number of missions; is a binary decision variable; 。 3. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 2, characterized in that: The constraints of the initial allocation model include: Task uniqueness constraint: Where, are binary decision variables and have directionality. hour, ; Drone round trip constraints: Task completion limit constraints: Drone endurance constraints: Where, is the task execution time, For the The number of tasks assigned to each drone, For the The maximum flight time of a drone.
4. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The improved Kmeans clustering algorithm is used to optimally group the task points, including: Initialize the number of cluster centers and cluster centers, repeat the first iteration process until , execute the final determination process; among them, The maximum number of preset cluster centers; The first iterative process includes: Initialization iteration count , repeat the second iteration process until , output objective function The clustering result with the smallest value of is obtained, and the error square and silhouette coefficient are calculated based on the clustering result; among them, is the preset maximum number of iterations; The second iterative process includes: Assign each task point to the nearest cluster center to generate a cluster; Get the number of data points in each cluster and calculate the balance constraint penalty value for each cluster : Where, For the The equilibrium constraint penalty value of the clusters, For the The number of task points in a cluster, is the total number of mission points; Calculate the probability of each task point being selected as the cluster center : Where, For the The distance from the task point to its nearest cluster center, For the The probability of a task point being selected as a cluster center; According to probability Reselect the cluster center and calculate the objective function with the introduction of the equilibrium constraint mechanism : Where, For the clusters, For the The coordinates of the mission point, For the The coordinates of the cluster centers of the clusters, is the number of clusters, is the weight parameter to control the degree of balance; The determination process includes: If the k value corresponding to the minimum square error is equal to the k value corresponding to the maximum silhouette coefficient, it is taken as the optimal k value and the corresponding clustering result is output; If the k value corresponding to the minimum square error and the k value corresponding to the maximum silhouette coefficient are not equal, the optimal k value is selected based on the criteria of minimizing the square error and maximizing the silhouette coefficient, and the corresponding clustering results are output.
5. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The improved genetic algorithm is used to solve the initial allocation problem, which includes: Initialize the population: Repeat the initialization steps until the number of individuals in the population reaches the preset number of individuals; The initialization step includes: Generate a numbered list of groups and randomly shuffle the order of the numbered list to form an initial sort of the groups; randomly insert a corresponding number of separators in the initial sort of the groups based on the number of drones, so that each separator interval corresponds to a drone to obtain individuals, and then judge the validity of the individuals and eliminate invalid individuals; Repeat the following steps until the maximum number of iterations is met, and output the individual with the largest fitness value as the solution result: Fitness function calculation evaluation: Calculating the fitness value of each individual by using the objective function of the initial allocation model as the fitness function; Elite Strategy: Select the one with the highest fitness Each individual is regarded as an elite individual and retained to the next generation of the population; Select crossover operation and select mutation operation: The roulette wheel selection method is used to select two individuals from the remaining individuals as parent individuals to perform crossover operation to generate offspring individuals; The roulette wheel selection method is used to select an individual from the remaining individuals as the parent individual to perform mutation operation to generate offspring individuals; The generated offspring individuals are all judged for their validity, and the valid offspring individuals are retained to the next generation of the population; the invalid offspring individuals are repaired and mediated and retained to the next generation of the population; Synthesize the next generation population: The elite individuals generated by the elite strategy, the offspring individuals generated by the selection crossover operation and the selection mutation operation are merged into the next generation population.
6. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 5, characterized in that: The individual validity judgment includes: If the individual is subject to both legality constraints and feasibility constraints, it is judged as valid, otherwise it is judged as invalid; The legality constraints include a task uniqueness constraint and a drone quantity constraint. The task uniqueness constraint includes that an individual cannot contain repeated group numbers; the drone quantity constraint includes that the number of drones in an individual is equal to the number of separators. The feasibility constraint includes a drone endurance constraint, wherein the drone endurance constraint includes that the total flight time of the drone is less than or equal to its maximum endurance time; The individual remediation mediation is only for individuals who do not meet the legality constraints, including: Remove extra delimiters or insert missing delimiters at random positions, fix the number of delimiters; For repeated group numbers, delete the group numbers at random positions to ensure task uniqueness; For cases where the sum of the number of groups and the number of drones is not equal to the individual length, find the missing groups and fill them in.
7. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The objective function of the dynamic reallocation model for: Where, are weight parameters, The additional flight costs for the number of unassigned mission points, the number of newly added drones, and reallocation; Where, is the number of task points that need to be reallocated, For the number of drones and the number of newly added drones, For the The task points that need to be reallocated are The Euclidean distance between the drones, is the binary decision variable for task reallocation, To add new drone variables, ; 。 8. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The constraints of the dynamic reallocation model are the same as those of the initial allocation model.
9. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: The dynamic reallocation solution using the operational planning concept includes: Obtaining status information of each drone, and determining the earliest idle drone in order based on the status information, recording it as a target drone and forming a target drone sequence; Perform the following steps in order for the target drones in the target drone sequence: Construct a search area with the last mission point of the target UAV as the center and initialize the search radius; Repeating the search allocation process until the search radius is greater than a preset maximum search radius; The search allocation process includes: If the target UAV has remaining flight time, obtain the task points that need to be reallocated within the search radius; If the number of task points that need to be reallocated within the search radius is 0, the search radius is increased according to the preset distance gradient; If the number of task points that need to be reallocated within the search radius is not 0, the optimal sorting is determined by the ant colony algorithm and used as a new task sequence. If the remaining flight time of the target UAV is sufficient to complete the new task sequence, the new task sequence is assigned to the target UAV, and the search radius is increased according to the preset distance gradient.
10. The method for dynamic allocation of multi-UAV collaborative tasks according to claim 1, characterized in that: After the dynamic reallocation solution is performed using the operations planning idea, if there are still task points that need to be reallocated, the number of drones is increased according to a preset number gradient, and the dynamic reallocation solution is performed again.
Citation Information
Cited By
Task redistribution optimization method and system for flight of multiple unmanned aerial vehicles
CN121300415A
Multi-unmanned vehicle field cooperative task allocation method based on auction-ant colony algorithm
CN121745642A
A multi-unmanned aerial vehicle cooperative confrontation method and system based on role representation and mutual information constraint
CN122346174A