Unmanned aerial vehicle cluster task allocation method based on large language model optimization genetic algorithm

By optimizing the genetic algorithm using a large language model, the problems of low efficiency and insufficient robustness in UAV swarm task allocation in complex battlefield environments are solved, and efficient and interpretable task allocation schemes are generated.

CN121860289APending Publication Date: 2026-04-14NANKAI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511942908.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing UAV swarm task allocation methods suffer from low solution efficiency, insufficient robustness, and poor interpretability in complex battlefield environments. In particular, they are prone to getting trapped in local optima or generating invalid solutions under highly dynamic and multi-constraint conditions.

Method used

The genetic algorithm is optimized using a large language model. By setting the chromosome encoding method, an initial population is generated and the chromosome semantics are understood by combining the large language model. Fitness and evolutionary potential scores are calculated, and selection, crossover and mutation operations are performed to ensure the rationality of task allocation and the recoverability of constraints.

Benefits of technology

It significantly improves the solution efficiency and robustness of task allocation for UAV swarms, reduces the generation of invalid solutions, and enhances the interpretability and engineering implementation efficiency of the solution, especially under large-scale multi-constraint conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860289A_ABST
    Figure CN121860289A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle cluster task allocation method based on a large language model optimization genetic algorithm, and belongs to the field of computers. The method comprises the following steps: setting a specific chromosome coding mode; generating a multi-constraint initial population; calculating fitness to quantify the advantages and disadvantages of individual genes of the population; when the optimal individual meets the requirement or the maximum iteration round is reached, ending; retaining the optimal individual as a filial generation; generating a batch of new filial generation individuals by the large language model, and fusing the new filial generation individuals with the current filial generation population; calling an optimized large language model to analyze individual chromosome semantics, and outputting an evolutionary potential score; obtaining an individual comprehensive selection probability by integrating the fitness and the evolution potential score, and executing a selection operation; and selecting individuals based on the individual comprehensive selection probability to carry out crossover and mutation operation to generate offspring. The large language model is embedded into the core link of the genetic algorithm, and the algorithm efficiency is improved by improving the population diversity of the genetic algorithm in the unmanned aerial vehicle cluster task allocation scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer science and focuses on improving the execution efficiency and rationality of task allocation schemes generated by genetic algorithms in UAV task allocation scenarios. Background Technology

[0002] In the field of UAV swarm task allocation, current mainstream methods primarily rely on intelligent optimization algorithms to solve combinatorial scheduling problems. Among these, evolutionary methods such as genetic algorithms and particle swarm optimization are widely used, typically improving convergence performance by adjusting internal parameters such as population size, crossover probability, and mutation rate. Another type of method focuses on the task allocation model itself, introducing customized constraint handling mechanisms, such as designing penalty functions to incorporate battlefield constraints like anti-jamming capability, endurance time, and payload matching into the fitness evaluation, thereby improving the feasibility of the solution.

[0003] However, the aforementioned existing technologies have some limitations: On the one hand, the selection, crossover, and mutation operations of traditional genetic algorithms are entirely based on numerical fitness, lacking an understanding of the task allocation semantics represented by chromosomes, resulting in a highly blind evolutionary process that is prone to getting trapped in local optima or generating a large number of invalid solutions; on the other hand, although penalty functions can handle constraints to some extent, they are unable to distinguish the repairability of constraint violations, nor can they actively guide the search towards structurally reasonable and easily optimized solution regions. Especially in highly dynamic and multi-constrained complex battlefield environments, existing methods often have slow convergence speeds, insufficient robustness, and a lack of interpretability in the generated solutions, making it difficult to support commanders' rapid decision-making and mission review. Summary of the Invention

[0004] The purpose of this invention is to improve the efficiency, robustness, and interpretability of task allocation for UAV swarms in complex battlefield environments, and to provide a task allocation method for UAV swarms that uses a large language model to optimize a genetic algorithm.

[0005] The UAV swarm task allocation method based on a large language model-optimized genetic algorithm provided by this invention includes: setting a task platform constraint configuration set consisting of UAV performance, task requirements, and battlefield environment; designing an n+m integer vector as a chromosome, where n is the total number of tasks and m is the total number of UAVs, the first n bits of the chromosome are called the task allocation and sequence segment, and the last m bits are called the UAV task quantity segment; generating an initial population, supporting random feasible generation or active generation of high-quality individuals by the large language model; calculating fitness based on the maximum completion time and the number of constraint violations; and adjusting the population through prompts or fine-tuning. The large language model natively understands chromosome semantics; it outputs an "evolutionary potential" score based on structural rationality, correlation with elite individuals, and constraint repairability; it integrates fitness and potential scores to obtain an "individual comprehensive selection probability" and performs a roulette wheel selection; it uses partial matching crossover for task allocation segments and maintains legal recombination for task quantity segments; it performs differential mutations on both segments to ensure encoding effectiveness; it retains elite individuals in each generation, and the large language model generates high-quality new offspring based on the current population semantics, which are then deduplicated and integrated into the population; it iterates until the termination condition is met and outputs the optimal task allocation and execution order scheme.

[0006] This invention addresses the core limitations of traditional intelligent optimization algorithms, which rely solely on scalar fitness to evaluate the merits of different schemes, exhibit blindness in evolutionary operations, and ignore the semantic information of solution structures. Specifically, these limitations manifest as a tendency to generate invalid solutions in complex environments, getting trapped in local optima, and having weak adaptability to highly dynamic constraints. Therefore, by introducing a large language model to parse the semantic structure of chromosome encoding and guide the evolutionary process, the invention effectively improves the solution efficiency, robustness, and interpretability of task allocation.

[0007] The specific technical solution of the present invention is as follows:

[0008] A method for drone swarm task allocation based on a large language model-optimized genetic algorithm is disclosed. This method utilizes a large language model to optimize the selection operation and population generation within the genetic algorithm. The specific steps of the method are as follows:

[0009] First, define the chromosome encoding method, as well as the task parameters and constraints;

[0010] Second, generate the initial population;

[0011] Third, calculate and evaluate the fitness of each individual in the population;

[0012] Step 4: Find the best individual in the current population and determine whether the optimal value or the maximum number of iterations has been reached. If not, proceed to a new round of iterative evolution, i.e., execute step 5. If the conditions are met, output the best individual in the population, i.e., execute step 13.

[0013] 5. Retain the best individual in the current population into the offspring;

[0014] 6. The large language model autonomously generates a batch of high-quality new offspring individuals based on the semantics of the current population, and integrates them with the current offspring population to enhance population diversity;

[0015] 7. Use the large language model to obtain the "evolutionary potential" score of individuals within the population;

[0016] 8. Calculate the "individual comprehensive selection probability" based on fitness and "evolutionary potential" scores. The specific calculation formula is as follows ,in For individuals The "individual comprehensive choice probability". For individuals The "evolutionary potential" score and All of these are the individual IDs of the population, with values ​​ranging from 1 to n;

[0017] 9. Select two individuals based on the "individual comprehensive selection probability" to perform crossover and genetic operations;

[0018] 10. Perform crossover operation;

[0019] 11. Perform the mutation operation;

[0020] Step 12: Determine if enough offspring have been generated. If not, continue with the genetic evolution operation, i.e., execute step 8. If the condition is met, calculate and evaluate the fitness of each individual in the population, i.e., execute step 3.

[0021] Step 13: Output the optimal task allocation scheme corresponding to the best individual in the population, and the program execution ends.

[0022] Furthermore, the "setting chromosome encoding method" described in step 1 is a genetic algorithm encoding method for drone swarm task allocation scenarios. It uses an integer vector of length n+m as the chromosome encoding, where n is the total number of tasks and m is the total number of drones. The first n bits of the chromosome are called the task allocation and sequence segment, and the last m bits are called the drone task quantity segment. The task allocation and sequence segment is an arrangement of task numbers 1, 2, ..., n, which is formed by sequentially concatenating the task subsequences undertaken by each drone according to their numbering order. The drone task quantity segment is a positive integer vector (a1, a2, ..., a...). m ), satisfying a1, a2, ..., a m The sum equals n, where a j This represents the number of tasks assigned to the j-th drone; during decoding, the first n bits are arranged in (a1, a2, ..., a...). mThe task is divided into m consecutive subsequences. The j-th subsequence is the task list undertaken by the j-th UAV, and the order of the tasks in the subsequence is the actual execution order of the task group on the j-th UAV. The task execution of different UAVs is independent and parallel, and there is no sequential constraint between them.

[0023] Furthermore, the "setting task parameters and constraints" mentioned in step 1 refers to the task and platform-related parameters and constraint information dynamically set by the commander or the upper-level task management system before or during the startup of the task planning system. The task parameters and constraints include UAV set information, task set information, and constraint mapping relationships. Among them, the UAV set information includes the unique number, model, endurance, payload capacity, and anti-interference level of each UAV; the task set information includes the unique number, task type, required capabilities for task completion, and required time for task completion for each task; the constraint mapping relationship includes task adaptation constraint functions, which supplement the additional capabilities required for specific tasks.

[0024] Furthermore, in step 2, the initial population can be generated in several ways: 1. Randomly generate feasible individuals that satisfy the chromosome encoding format described in claim 2 and conform to the task-platform constraint configuration set; 2. Call the large language model to actively generate several high-quality initial individuals with reasonable structure and balanced load to form the initial population based on the task-platform constraint configuration set and typical task allocation patterns; 3. Combine the high-quality initial solution templates saved in historical task scenarios, and let the large language model learn and actively generate similar high-quality initial individuals to form the initial population.

[0025] Furthermore, in step 3, the method for "calculating the fitness of each individual in the population" is to calculate the fitness of each individual in the population by combining the task parameters and constraints set in step 1. The specific fitness function is... The calculation formula is as follows: ,in, The maximum completion time for all drones to complete their respective task sequences, in minutes (min). The number of task allocation schemes that violate the task adaptation constraint function; This is a preset penalty weight coefficient.

[0026] Furthermore, the large language model called in step 6, "autonomously generating a batch of high-quality new offspring individuals based on the semantics of the current population," can natively understand the chromosome encoding method defined in step 1. Its specific construction methods can be as follows: 1. System Prompt: Before calling the large language model, a system-level prompt containing chromosome structure definitions, decoding rules, task allocation semantics, and evaluation criteria is constructed to guide the model to correctly parse the meaning of the input chromosome under zero-sample or few-sample conditions; 2. Retrieval Enhancement Group (RAG): A structured chromosome knowledge base is constructed, storing high-quality individuals generated during historical evolution and their contextual information. When evaluating new individuals, the RAG is used to retrieve semantically or structurally similar historical individuals from the knowledge base, and the retrieved relevant documents are injected as context into the large language model's prompts to help the large language model understand the encoding format; 3. Supervised Fine-tuning: Based on the general large language model, chromosome-scores generated manually or by algorithms are used to fine-tune the parameters of the dataset, enabling the model to internalize its understanding of chromosome encoding methods.

[0027] Furthermore, the high-quality new offspring individuals mentioned in step 6 are generated by a large language model AI agent, i.e., the AI ​​Agent, based on the following criteria: 1. The chromosomal structure and task allocation patterns of several elite individuals with high fitness rankings in the current population; 2. Typical chromosomal segments or task scheduling templates that have produced high-fitness offspring during historical evolution; 3. Sparse regions in the solution space of the current population, used to enhance population diversity. Simultaneously, duplicate individuals are removed after generating high-quality offspring. These criteria are used as prompts input into the large language model, enabling it to generate new high-quality offspring individuals to address the deficiencies of the current population.

[0028] Furthermore, the "evolutionary potential" score R(x)>0 mentioned in step 7 is generated by the AI ​​agent of the large language model, i.e., AIAgent, based on the following criteria: 1. Semantic rationality of the individual chromosome structure, including whether the task allocation conforms to the drone's capability constraints, whether there are logical conflicts in the task execution order, and the degree of balance of task load among the drones. The higher the rationality, the closer the structure is to a high-quality solution, and the higher its "evolutionary potential" score; 2. Structural similarity and difference between the individual and high-fitness individuals in the current population, used to determine whether the individual contains high-quality substructures that can be recombined or solution space regions that have not yet been fully explored. If it contains both high-quality substructures and new solution forms, the "evolutionary potential" score is higher; 3. Assessment of the type and repairability of constraint violations, i.e., classifying the constraints violated by the current individual and judging the ease with which feasibility can be restored through local adjustments such as task reassignment and order fine-tuning. The fewer the violations and the easier they are to repair, the higher the "evolutionary potential" score. The above judgment criteria are used as prompt words input into the large language model, which then gives an "evolutionary potential" score for the individual chromosomes in the population.

[0029] Furthermore, the "individual comprehensive selection probability" mentioned in step 8 is obtained by normalizing the weighted sum of fitness and "evolutionary potential" scores. In addition to the formula mentioned in step 8, it can also be calculated using the following formula: ,in For individuals The "individual comprehensive choice probability". For individuals The "evolutionary potential" score and All of these are the population individual IDs, with values ​​ranging from 1 to n. and These are the preset weighting coefficients.

[0030] The specific content involved in this invention and the meaning of the terms used are as follows:

[0031] (1) Large Language Model (LLM): A large language model is an artificial intelligence model with powerful semantic understanding, logical reasoning and generation capabilities. It can be guided or fine-tuned to adapt to specific task scenarios through prompt words.

[0032] (2) Genetic Algorithm (GA): The genetic algorithm is a heuristic optimization algorithm that simulates the natural evolutionary process of organisms. Its core is to search for the optimal solution through the process of "initial population generation - fitness evaluation - selection - crossover - mutation - iteration". It first encodes the potential solutions of the problem into "chromosomes" to form an initial population. Then, it quantifies each individual through the fitness function, that is, the merits of the corresponding task allocation scheme. Then, it updates the population with the help of three core evolutionary operations: the selection operation simulates the "survival of the fittest" law, and allocates the selection probability according to the individual's fitness. Individuals with higher fitness are more likely to be retained to participate in subsequent evolution, avoiding the loss of high-quality features; the crossover operation simulates gene recombination in biological reproduction, selects two parent individuals, and exchanges some genes through specific rules, such as randomly selecting a crossover point, to fuse the features of the two and generate offspring individuals with the advantages of both parents, enriching the diversity of solutions; the mutation operation simulates gene mutation, randomly selects some gene positions of individuals for small adjustments, such as changing gene values, introducing new solution structures, and preventing the algorithm from getting stuck in local optima. Finally, it iterates these steps until the optimal or suboptimal solution is found.

[0033] (3) Unmanned Aerial Vehicle (UAV) Swarm Task Allocation: UAV swarm task allocation refers to the key technology of assigning specific tasks to each UAV in a swarm and planning the execution order of tasks within a single UAV in complex battlefield environments, based on the performance constraints of the UAV swarm, such as endurance, payload, and anti-interference level, as well as task requirements, such as task type, location, and priority, and battlefield environment information. Its core objective is to achieve optimal overall swarm efficiency while satisfying multiple constraints.

[0034] Advantages and positive effects of the present invention:

[0035] This invention can significantly improve the solution efficiency and robustness of task allocation for UAV swarms.

[0036] For task allocation scenarios in complex battlefield environments, this invention overcomes the blindness of traditional genetic algorithm evolutionary operations. It uses a large language model to natively understand the task allocation semantics represented by chromosome encoding, directly assessing the rationality of individual structures and the repairability of constraints, predicting their "evolutionary potential," and effectively reducing the generation of invalid or low-quality solutions. The crossover operation only applies partial matching to the first n task allocations and sequence segments, preserving the remaining m task quantity segments within the legal range for recombination, maintaining task uniqueness while stabilizing platform load distribution. The mutation operation is implemented for the two structural differences: the task sequence segment maintains its permutation legality by shuffling local subsequences, while the task quantity segment uses a two-value adjustment strategy to ensure the total number of tasks remains constant and each value is a positive integer, thereby accurately optimizing performance bottlenecks and avoiding constraint violations and redundant iterations caused by random perturbations. Especially in large-scale, multi-constraint task allocation problems, the improvement in solution efficiency and convergence speed is even more significant.

[0037] In a single task allocation process, a selection mechanism integrating fitness and "evolutionary potential" scoring is employed, balancing the quality of the current solution with future evolutionary capabilities. Combined with a large language model's deep understanding of dynamic task platform constraints, this proactively avoids risks of hard constraint violations such as payload mismatch and exceeding endurance limits, significantly reducing the probability of solution failure in highly dynamic and adversarial scenarios. Furthermore, while traditional algorithms only output scalar optimization results, this invention leverages the semantic parsing capabilities of a large language model to clearly trace the decision-making logic behind task allocation to specific UAVs and the formation of their execution order. Moreover, the chromosome encoding used directly corresponds to the task list and execution order of each UAV, allowing for direct deployment after decoding without additional conversion or post-processing, significantly improving solution interpretability and engineering implementation efficiency. Attached Figure Description

[0038] Figure 1 This is a flowchart of the UAV swarm task allocation method based on a large language model-optimized genetic algorithm in this invention.

[0039] Figure 2 This is the chromosome encoding method of the genetic algorithm in this invention. As shown in the figure, the chromosome is divided into a task allocation and sequence segment and a task quantity segment.

[0040] Figure 3 This is a schematic diagram of the UAV set in the task parameters and constraints of this invention.

[0041] Figure 4 This is a schematic diagram of the task set in the task parameters and constraints of this invention.

[0042] Figure 5 This is a schematic diagram of the constraint mapping relationship between task parameters and constraints in this invention.

[0043] Figure 6 This is a schematic diagram of the crossover operation in the genetic algorithm of this invention.

[0044] Figure 7 This is a schematic diagram of the mutation operation in the genetic algorithm of this invention. Detailed Implementation

[0045] This invention provides a method for task allocation in UAV swarms based on a large language model-optimized genetic algorithm.

[0046] The specific steps of the UAV swarm task allocation method based on a large language model-optimized genetic algorithm provided by this invention are as follows:

[0047] First, define the chromosome encoding method, as well as the task parameters and constraints;

[0048] Second, generate the initial population;

[0049] Third, calculate and evaluate the fitness of each individual in the population;

[0050] Step 4: Find the best individual in the current population and determine whether the optimal value or the maximum number of iterations has been reached. If not, proceed to a new round of iterative evolution, i.e., execute step 5. If the conditions are met, output the best individual in the population, i.e., execute step 13.

[0051] 5. Retain the best individual in the current population into the offspring;

[0052] 6. The large language model autonomously generates a batch of high-quality new offspring individuals based on the semantics of the current population, and integrates them with the current offspring population to enhance population diversity;

[0053] 7. Use the large language model to obtain the "evolutionary potential" score of individuals within the population;

[0054] 8. Calculate the "individual comprehensive selection probability" based on fitness and "evolutionary potential" scores. The specific calculation formula is as follows ,in For individuals The "individual comprehensive choice probability". For individuals The "evolutionary potential" score and All of these are the individual IDs of the population, with values ​​ranging from 1 to n;

[0055] 9. Select two individuals to perform crossover and genetic operations based on the "individual comprehensive selection probability";

[0056] 10. Perform crossover operation;

[0057] 11. Perform the mutation operation;

[0058] Step 12: Determine if enough offspring have been generated. If not, continue with the genetic evolution operation, i.e., execute step 8. If the condition is met, calculate and evaluate the fitness of each individual in the population, i.e., execute step 3.

[0059] Step 13: Output the optimal task allocation scheme corresponding to the best individual in the population, and the program execution ends.

[0060] To further understand the technical content, features, and effects of this invention, the following application examples are provided, along with detailed descriptions in conjunction with the accompanying drawings:

[0061] Application Example 1

[0062] like Figure 1 As shown, the specific steps of the UAV swarm task allocation method based on a large language model-optimized genetic algorithm provided by this invention are as follows:

[0063] Step 1: Set the chromosome encoding method, as well as the task parameters and constraints.

[0064] like Figure 2 As shown, the chromosome uses an integer vector of length n+m as the chromosome code, where n is the total number of tasks and m is the total number of drones. The first n bits of the chromosome are called the task allocation and sequence segment, and the last m bits are called the drone task quantity segment. The task allocation and sequence segment is an arrangement of task numbers 1, 2, ..., n, which is formed by concatenating the task subsequences undertaken by each drone in the order of the drone numbers. The drone task quantity segment is a positive integer vector (a1, a2, ..., a...). m ), satisfying a1, a2, ..., a m The sum equals n, where a j This represents the number of tasks assigned to the j-th drone.

[0065] like Figure 3 , Figure 4 and Figure 5 As shown, examples of task parameters and constraints are as follows:

[0066] Drone collection:

[0067] serial number model Battery life Load capacity Anti-interference level 1 Type 1 of drones 48h30min reconnaissance V1 2 Type 1 drone 46h45min reconnaissance and strike V1 3 Type 1 drone 47h30min reconnaissance and strike V1 4 Type 2 drone 60h15min Reconnaissance, electromagnetic interference V3 5 Type 2 drone 58h15min Reconnaissance, electromagnetic interference V3 6 Type 3 of drones 50h45min Reconnaissance, strike, electromagnetic interference V2

[0068] The anti-interference levels are represented by V1, V2, and V3, with V1 representing the weakest anti-interference level and V3 representing the strongest.

[0069] Task Collection:

[0070] serial number Task type Abilities required to complete the task Time required to complete the task 1 Task Type 1 reconnaissance 12h 2 Task Type 1 reconnaissance 12h 3 Task Type 1 reconnaissance 8h 4 Task Type 1 reconnaissance 10h 5 Task Type 2 strike 1h 6 Task Type 3 Reconnaissance, electromagnetic interference 24h

[0071] Constraint mapping relationship:

[0072] serial number Task type Required abilities 1 Battery life constraints The flight distances between different mission locations are as follows: Mission 1 to Mission 2: 4 hours; Mission 1 to Mission 3: 6 hours; Mission 1 to Mission 4: 4 hours; Mission 1 to Mission 5: 8 hours; Mission 1 to Mission 6: 7 hours; Mission 2 to Mission 3: 9 hours; Mission 2 to Mission 4: 2 hours; Mission 2 to Mission 5: 3 hours; Mission 2 to Mission 6: 4 hours; Mission 3 to Mission 4: 7 hours; Mission 3 to Mission 5: 5 hours; Mission 3 to Mission 6: 4 hours; Mission 4 to Mission 5: 3 hours; Mission 4 to Mission 6: 7 hours; Mission 5 to Mission 6: 3 hours. 2 Anti-interference constraints Task 1 requires an anti-interference level of at least V2; Task 6 requires an anti-interference level of at least V3.

[0073] In the above task parameters and constraints, n=6 and m=6.

[0074] Step 2: Generate the initial population;

[0075] For example, the following individuals can be generated using a random generation method to form an initial population:

[0076] Individual 1 chromosome: 123456, 111111;

[0077] Individual 2 chromosomes: 142365, 221100;

[0078] ...

[0079] The comma "," is used to separate the task allocation and sequence segment of the first n positions from the drone task quantity segment of the last m positions.

[0080] Step 3: Calculate the fitness of each individual in the evaluation population;

[0081] For example, for chromosome 1: 123456, 111111, the fitness is calculated as follows:

[0082]

[0083] in, The time allotted for UAV 6 to complete Mission 6 is 24h = 1440min. Take 500, This represents the number of assignments that violated the constraint function. Specifically, UAV 1 violated the anti-interference constraint when completing task 1, and UAV 6 also violated the anti-interference constraint when completing task 6, for a total of 2. .

[0084] Step 4: Find the best individual in the current population and determine whether the optimal value or the maximum number of iterations has been reached. If not, proceed to a new round of iterative evolution, i.e., execute step 5. If the conditions are met, output the best individual in the population, i.e., execute step 13.

[0085] Step 5: Retain the best individual from the current population into the offspring;

[0086] Step 6: The large language model autonomously generates a batch of high-quality new offspring individuals based on the semantics of the current population, and integrates them with the current offspring population to improve population diversity;

[0087] For example, inputting the following prompt words into a large language model can yield high-quality new offspring individuals:

[0088] Based on the task parameters and constraints of the current UAV swarm task allocation scenario, please generate five high-quality, constraint-compliant, and load-balanced new offspring chromosomes according to the structural characteristics of previous generations of the population. These chromosomes must satisfy all constraints in the constraint mapping relationship. The generation of the new offspring chromosomes is based on the following: 1. The chromosome structure and task allocation patterns of several elite individuals with high fitness rankings in the current population; 2. Typical chromosome segments or task scheduling templates that have produced high-fitness offspring during historical evolution; 3. Sparsely distributed regions of the current population in the solution space, used to enhance population diversity.

[0089] The newly generated offspring individuals are deduplicated using a hash algorithm to ensure that no duplicate individuals appear during the evolutionary process.

[0090] Step 7: Use the large language model to obtain the "evolutionary potential" score of individuals within the population;

[0091] For example, inputting the following prompt words into a large language model yields the "evolutionary potential" score for individual chromosome 1: 123456, 111111:

[0092] Based on the task parameters and constraints of the current UAV swarm task allocation scenario, please evaluate the "evolutionary potential" score of individual chromosome 1 (123456, 111111) in the solution space, considering its structural characteristics, constraint satisfaction degree, and differences from elite solutions. The score should range from 0.1 to 5.0, with higher values ​​indicating greater evolutionary value. The criteria for evaluating the "evolutionary potential" score are as follows: 1. The semantic rationality of the individual chromosome structure, including whether the task allocation conforms to the UAV's capability constraints, whether there are logical conflicts in the task execution order, and the degree of balance of task load among the UAVs. Higher rationality results in higher scores. The closer the structure is to a high-quality solution, the higher its "evolutionary potential" score. 2. The structural similarity and difference between the individual and high-fitness individuals in the current population are used to determine whether the individual contains high-quality substructures that can be recombined or solution space regions that have not yet been fully explored. If it contains both high-quality substructures and new solution forms, the "evolutionary potential" score is higher. 3. The type and repairability assessment of constraint violations, that is, classifying the constraints violated by the current individual and judging the ease with which feasibility can be restored through local adjustments such as task reassignment and sequence fine-tuning. The fewer the violations and the easier they are to repair, the higher the "evolutionary potential" score.

[0093] Step 8: Calculate the "individual comprehensive selection probability" based on fitness and "evolutionary potential" scores. The specific calculation formula is as follows ,in For individuals The "individual comprehensive choice probability". For individuals The "evolutionary potential" score and All of these are the individual IDs of the population, with values ​​ranging from 1 to n;

[0094] Step 9: Select two individuals to perform crossover and genetic operations based on the "individual comprehensive selection probability";

[0095] Step 10, execute as follows Figure 6 The crossover operation shown;

[0096] For example, performing a crossover operation between individual 1 chromosome: 123456, 111111 and individual 2 chromosome: 142365, 221100 is as follows:

[0097] The task allocation and sequence segments 123456 and 142365 for individuals 1 and 2 are cross-referenced using PMX. The cross-reference interval is randomly selected from the 2nd to the 4th position. After partial mapping, the task allocation and sequence segments of two offspring are generated as 123465 and 142356, respectively. At the same time, combined with the number of drone tasks of individuals 1 and 2, four different offspring are obtained: Offspring 1: 123465, 111111, Offspring 2: 123465, 221100, Offspring 3: 142356, 111111, Offspring 4: 142356, 221100.

[0098] Step 11, execute as follows Figure 7 The mutation operation shown;

[0099] For example, the following mutation operation is performed on offspring 1 (123456, 111111) generated by crossing chromosome 123465, 111111 with chromosome 2 (142365, 221100):

[0100] The task allocation and sequence segment 123465 of offspring 1:123465,111111 are mutated. The first to third positions are shuffled and become 231465, resulting in the mutated individual:231465,111111.

[0101] Step 12: Determine if enough offspring have been generated. If not, continue with the genetic evolution operation, i.e., execute step 8. If the condition is met, calculate and evaluate the fitness of each individual in the population, i.e., execute step 3.

[0102] Step 13: Output the optimal task allocation scheme corresponding to the best individual in the population, and the program execution ends.

[0103] In view of the description and exemplary embodiments of the invention disclosed herein, other embodiments of the invention will be apparent to those skilled in the art. These descriptions and embodiments are considered as examples only, and any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A method for task allocation in UAV swarms based on a large language model-optimized genetic algorithm, characterized in that... The method for optimizing the selection operation and population generation in a genetic algorithm using a large language model includes the following specific steps: First, define the chromosome encoding method, as well as the task parameters and constraints; Second, generate the initial population; Third, calculate and evaluate the fitness of each individual in the population; Step 4: Find the best individual in the current population and determine whether the optimal value or the maximum number of iterations has been reached. If not, proceed to a new round of iterative evolution, i.e., execute step 5. If the conditions are met, output the best individual in the population, i.e., execute step 13.

5. Retain the best individual in the current population into the offspring; 6. The large language model autonomously generates a batch of high-quality new offspring individuals based on the semantics of the current population, and integrates them with the current offspring population to enhance population diversity; 7. Use the large language model to obtain the "evolutionary potential" score; 8. Calculate the "individual comprehensive selection probability" based on fitness and "evolutionary potential" scores. The specific calculation formula is as follows ,in For individuals "Individual comprehensive choice probability", For individuals The "evolutionary potential" score and All of these are the individual IDs of the population, with values ​​ranging from 1 to n; 9. Select two individuals to perform crossover and genetic operations based on the "individual comprehensive selection probability"; 10. Perform crossover operation; 11. Perform the mutation operation; Step 12: Determine if enough offspring have been generated. If not, continue with the genetic evolution operation, i.e., execute step 8. If the condition is met, calculate and evaluate the fitness of each individual in the population, i.e., execute step 3. Step 13: Output the optimal task allocation scheme corresponding to the best individual in the population, and the program execution ends.

2. The method according to claim 1, characterized in that, The "setting the chromosome encoding method" described in step 1 is a genetic algorithm encoding method for drone swarm task allocation scenarios. It uses an integer vector of length n+m as the chromosome encoding, where n is the total number of tasks and m is the total number of drones. The first n bits of the chromosome are called the task allocation and sequence segment, and the last m bits are called the drone task quantity segment. The task allocation and sequence segment is an arrangement of task numbers 1, 2, ..., n, which is formed by sequentially concatenating the task subsequences undertaken by each drone according to their numbering order. The drone task quantity segment is a positive integer vector (a1, a2, ..., a...). m ), satisfying a1, a2, ..., a m The sum equals n, where a j This represents the number of tasks assigned to the j-th drone; during decoding, the first n bits are arranged in (a1, a2, ..., a...). m The task is divided into m consecutive subsequences. The j-th subsequence is the task list undertaken by the j-th UAV, and the order of the tasks in the subsequence is the actual execution order of the task group on the j-th UAV. The task execution of different UAVs is independent and parallel, and there is no sequential constraint between them.

3. The method according to claim 1, characterized in that, The "setting of task parameters and constraints" mentioned in step 1 refers to the task and platform-related parameters and constraints dynamically set by the commander or the upper-level task management system before or during the startup of the task planning system. The task parameters and constraints include UAV set information, task set information, and constraint mapping relationships. Among them, the UAV set information includes the unique number, model, endurance, payload capacity, and anti-interference level of each UAV; the task set information includes the unique number, task type, required capabilities for task completion, and required time for task completion for each task; the constraint mapping relationship includes task adaptation constraint functions, which supplement the additional capabilities required for specific tasks.

4. The method according to claims 2 and 3, characterized in that, In step 2, the initial population can be generated in several ways depending on the encoding method: (1) Randomly generate feasible individuals that meet the chromosome encoding format described in claim 2 and conform to the task-platform constraint configuration set; (2) Call the large language model and actively generate several high-quality initial individuals with reasonable structure and balanced load to form the initial population based on the task-platform constraint configuration set and typical task allocation mode; (3) Combine the high-quality initial solution templates saved in the historical task scenario and let the large language model learn and actively generate similar high-quality initial individuals to form the initial population.

5. The method according to claim 1, characterized in that, The method described in step 3 for "calculating the fitness of each individual in the population" is to calculate the fitness of each individual in the population by combining the task parameters and constraints set in step 1. The specific fitness function is... The calculation formula is as follows: ,in, The maximum completion time for all drones to complete their respective task sequences, in minutes (min). The number of task allocation schemes that violate the task adaptation constraint function; This is a preset penalty weight coefficient.

6. The method according to claim 1, characterized in that, The large language model called in step 6, "autonomously generating a batch of high-quality new offspring individuals based on the semantics of the current population by the large language model", can natively understand the chromosome encoding method defined in step 1. The specific construction methods can be as follows: (1) System Prompt: Before calling the large language model, a system prompt containing chromosome structure definition, decoding rules, task allocation semantics and evaluation criteria is constructed to guide the model to correctly parse the meaning of the input chromosome under zero or few sample conditions; (2) Retrieval Enhancement (RAG): a structured chromosome knowledge base is constructed, which stores high-quality individuals and their context information generated during historical evolution. When evaluating new individuals, the RAG is used to retrieve historical individuals with similar semantics or structure in the knowledge base. The retrieved relevant documents are injected into the large language model prompt as context to help the large language model understand the encoding format; (3) Supervised fine-tuning: Based on the general large language model, the chromosome-score generated manually or by algorithm is used to fine-tune the parameters of the dataset so that the model internalizes the ability to understand the chromosome encoding method.

7. The method according to claim 1, characterized in that, The high-quality new offspring individuals mentioned in step 6 are generated by the AI ​​agent of the large language model, i.e., the AI ​​Agent is generated based on the following criteria: (1) the chromosome structure and task allocation pattern of several elite individuals with high fitness ranking in the current population; (2) typical chromosome segments or task scheduling templates that have produced high-fitness offspring in the historical evolution process; (3) the sparse distribution region of the current population in the solution space, which is used to enhance population diversity; at the same time, duplicate individuals will be deduplicated after generating high-quality offspring; the above judgment criteria are used as prompt words to input into the large language model, so that the model can generate new high-quality offspring individuals in response to the deficiencies of the current population.

8. The method according to claim 1, characterized in that, The "evolutionary potential" score R(x)>0 mentioned in step 7 is generated by the AI ​​agent of the large language model, that is, the AI ​​Agent is based on the following criteria: (1) the semantic rationality of the individual chromosome structure, including whether the task allocation conforms to the UAV capability constraints, whether there is a logical conflict in the task execution order, and the degree of balance of task load among the UAVs. The higher the rationality, the closer the structure is to the high-quality solution, and the higher the "evolutionary potential" score; (2) the structural similarity and difference between the individual and the high-fitness individuals in the current population, which is used to determine whether the individual contains a high-quality substructure that can be recombined or a solution space region that has not been fully explored. If it contains both a high-quality substructure and a new solution form, the "evolutionary potential" score is higher; (3) the type of constraint violation and the assessment of repairability, that is, classifying the constraints violated by the current individual and judging the ease or difficulty of restoring feasibility through local adjustments such as task redistribution and sequence fine-tuning. The fewer the violations and the easier they are to repair, the higher the "evolutionary potential" score is. The above judgment criteria are used as prompt words to input into the large language model, so that the model gives an "evolutionary potential" score for the individual chromosomes in the population.

9. The method according to claim 1, characterized in that, The "individual comprehensive selection probability" mentioned in step 8 is obtained by normalizing the weighted sum of fitness and "evolutionary potential" scores. In addition to the formula mentioned in step 8, it can also be calculated using the following formula: ,in For individuals "Individual comprehensive choice probability", For individuals The "evolutionary potential" score and All of these are the population individual IDs, with values ​​ranging from 1 to n. and These are the preset weighting coefficients.

Citation Information

Cited By

  • A crowd-sensing task allocation method and system based on prompt word and reasoning coupling

    CN122242772A

  • A task scheduling scheme determination method, an electronic device, and a storage medium

    CN122334899A