Unmanned aerial vehicle task dynamic allocation method and system based on improved particle swarm optimization
Patent Information
- Application Number
- CN202611496713.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
在检测到动态事件后,如果针对全部任务和全部无人机重新执行优化计算,虽然能够重新建立任务分配关系,但也可能改变未受动态事件影响的原有任务安排,并增加重新规划所需的计算量
本发明通过获取待分配任务的位置、优先级、服务时间、任务类型、时间窗口和要求的无人机数量等属性信息,以及各无人机的位置、航程、载荷能力、剩余电量、健康状态和当前任务列表等状态信息,构建与任务条件和无人机可用资源相对应的动态分配过程。在任务分配过程中综合考虑任务收益、任务执行成本和任务负载不平衡度,并通过可行性约束排除不满足载荷能力、航程、任务时间窗口或无人机数量要求的候选方案,能够兼顾任务完成需求、资源消耗和多架无人机之间的任务负载分布,并支持一个任务由一架无人机执行或者由多架无人机共同执行的任务分配情形。
Smart Images

Figure CN123010855A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) swarm collaborative control technology, and more specifically, to a method and system for dynamic allocation of UAV tasks based on improved particle swarm optimization. Background Technology
[0002] With the continuous development of the perception, communication, navigation, and autonomous control capabilities of unmanned aerial vehicle (UAV) platforms, the application of multiple UAVs collaboratively performing tasks such as patrol, monitoring, search, identification, and material delivery is gradually increasing. Compared to a single UAV performing a task independently, multi-UAV collaborative operations can utilize the differences in spatial location, payload capacity, endurance, and task execution status among different UAVs to process multiple tasks in parallel. In some task scenarios, multiple UAVs may even need to cooperate to complete the same task. Therefore, how to rationally determine the allocation relationship between tasks and UAVs based on task requirements and UAV status is a task planning aspect of multi-UAV collaborative operations.
[0003] Drone task allocation typically requires comprehensive consideration of both task information and drone status information. Task information may include task location, priority, required service time, task type, and time window. Drone status information may include current location, flight speed, maximum range, payload capacity, current task list, remaining battery power, and health status. Different tasks may be related in terms of execution order, time constraints, or resource consumption, and different drones may differ in range, payload, remaining battery power, and available task types. Therefore, drone task allocation is usually a combinatorial optimization problem subject to multiple constraints. As the number of tasks and drones increases, the number of available task allocation combinations also increases, leading to a higher complexity in task allocation calculations.
[0004] Existing UAV task allocation methods can include centralized and distributed methods. Centralized task allocation typically involves a ground control station or central computing node collecting task data and status data from each UAV, calculating a unified task allocation scheme based on the obtained global information, and then sending the allocation results to the corresponding UAVs. This method facilitates unified scheduling of different tasks and UAV resources, but the calculation process relies on the completeness and timeliness of the status information obtained by the central node. As the number of UAVs or tasks increases, the amount of data and candidate task allocation combinations that the central node needs to process also increases; when task conditions or UAV status change, it may also be necessary to recalculate the task allocation scheme.
[0005] Distributed task allocation typically utilizes mechanisms such as contract networks, auctions, or inter-node negotiation. Each drone or task node exchanges task release information, resource status information, and response information, determining task assignment based on the interaction results. This method can distribute some computation across different nodes, but it usually requires multiple rounds of information exchange between nodes. In situations with limited communication bandwidth, increased communication latency, or partial communication link interruptions, some nodes may fail to receive timely status changes from other nodes, thus affecting the consistency between the task allocation result and the actual drone status. For applications with task time windows or requiring adjustments within a short period, multiple rounds of information exchange can also consume considerable task planning time.
[0006] To address task allocation problems with a large number of tasks and complex constraints, some task allocation methods employ heuristic optimization techniques such as genetic algorithms, ant colony optimization, and particle swarm optimization (PSO) to search for candidate task allocation schemes. Among these, PSO updates particle positions by combining individual search results with the swarm's overall search results, offering advantages such as a relatively small number of parameters and a well-defined computational structure. Standard PSO primarily targets continuous parameter spaces, while UAV task allocation results typically represent discrete allocation relationships between tasks and UAVs. Therefore, applying PSO to UAV task allocation requires addressing the representation conversion between the continuous search process and the discrete task allocation results. Differences in representation and conversion methods can affect candidate scheme generation, feasibility assessment, and subsequent iterative updates.
[0007] Drone task allocation may also involve multiple evaluation objectives. For example, task benefits can reflect task priority or the value of task completion, task execution costs can include task time, flight distance, and energy consumption, and task load distribution can reflect the differences in tasks undertaken by different drones. The direction of change and the range of values for the above evaluation indicators may differ, requiring coordination during the candidate solution evaluation process. If the evaluation method is inconsistent with the solution selection direction in the optimization process, it may affect the updating of individual and group optimal solutions. Simultaneously, when generating candidate solutions, constraints such as drone range, payload capacity, and task time windows must be considered to avoid assigning tasks to drones that do not possess the corresponding execution conditions.
[0008] More importantly, the process of multiple drones executing tasks is not always static. During task execution, situations may arise such as new tasks being added, changes in drone remaining battery power, changes in drone health status, drones losing their mission execution capability, and changes in communication status. These dynamic events may alter the scope of tasks to be assigned, the availability of drones, or the conditions for task execution. After detecting a dynamic event, if optimization calculations are re-performed for all tasks and all drones, although the task allocation relationship can be re-established, it may also change the original task arrangements that were not affected by the dynamic event and increase the computational load required for replanning.
[0009] In cases of drone failure or communication anomalies, treating drones in abnormal states as normal and available drones for task allocation may lead to allocation results that are incompatible with the current drone status. Conversely, directly reassigning drones with communication anomalies to their original tasks without assessing their task execution capabilities may result in duplicate task allocation. For new tasks, regenerating all candidate task allocation schemes each time makes it difficult to utilize the effective information generated during previous task allocation processes. Therefore, existing drone task allocation methods still have room for improvement to coordinate the conversion relationship between continuous optimization processes and discrete task allocation results, and to adjust affected tasks accordingly when the task set, drone availability, or communication status changes. Summary of the Invention
[0010] The present invention aims to solve at least one of the aforementioned technical problems existing in the prior art.
[0011] To this end, the first aspect of the present invention provides a method for dynamic allocation of unmanned aerial vehicle (UAV) missions based on improved particle swarm optimization.
[0012] A second aspect of the present invention provides a dynamic task allocation system for unmanned aerial vehicles (UAVs) based on improved particle swarm optimization.
[0013] This invention provides a method for dynamic allocation of UAV missions based on improved particle swarm optimization, comprising: Obtain the set of tasks to be assigned and the set of drones, and obtain the task attribute information of each task in the set of tasks to be assigned, the status information of each drone in the set of drones, and the feasibility constraints corresponding to task assignment; Initialize a particle swarm, with each particle in the particle swarm representing a candidate task allocation scheme. The particle position of each particle is represented by a task allocation probability matrix. Each element in the task allocation probability matrix represents the allocation probability of the corresponding task being assigned to the corresponding UAV. The allocation probability is used to characterize the allocation matching degree between the corresponding UAV and the corresponding task. For each particle in the particle swarm, the task allocation probability matrix of the particle is encoded using a recurrent neural network encoder to obtain the corresponding hidden features. The corresponding decoding task allocation probability matrix is generated using a recurrent neural network decoder based on the hidden features. Based on the decoding task allocation probability matrix and the feasibility constraints, the target UAV set corresponding to each task is determined to obtain a candidate task allocation scheme. The target UAV set includes at least one UAV. The fitness value of the candidate task allocation scheme is calculated based on task benefits, task execution costs, and task load imbalance. Based on the individual optimal particle position of each particle and the group optimal particle position of the particle swarm, update the particle velocity and particle position of each particle, and perform mutation operations on at least some of the candidate task allocation schemes. Repeat the encoding, decoding, target UAV set determination, fitness value calculation, particle velocity and particle position update and mutation operation until the preset termination condition is met, determine the optimal particle position of the swarm, and obtain the task allocation scheme based on the task allocation probability information corresponding to the optimal particle position of the swarm and the feasibility constraints. During the execution of the task allocation scheme, at least one dynamic event among the task addition event, drone failure event, and communication anomaly event is detected, and it is determined whether the task needs to be reassigned based on the detected dynamic event. When task reallocation is required, the set of affected tasks is determined. Based on the dynamic event, the input information of the recurrent neural network decoder and at least one of the feasibility constraints are updated. The recurrent neural network decoder generates a task allocation probability matrix adapted to the dynamic event. This matrix is used as the initial particle positions of the local particle swarm optimization. While maintaining the allocation relationships of unaffected tasks, local particle swarm optimization is performed on the set of affected tasks to obtain an updated task allocation scheme. The task allocation scheme or the updated task allocation scheme is sent to the path planning interface to generate flight path instructions for the corresponding UAV to execute.
[0014] The UAV mission dynamic allocation method based on improved particle swarm optimization according to the above-described technical solution of the present invention may also have the following additional technical features: In the above technical solution, the task attribute information includes task location, task priority, service time required for the task, task type, task time window, and the number of drones required for the task. The drone's status information includes its location, flight speed, maximum range, payload capacity, current task list, remaining battery power, and health status. The feasibility constraints include UAV payload capacity constraints, range constraints, mission time window constraints, and the number of UAVs required for the mission. The initialization of the particle swarm includes: randomly generating an initial allocation probability within a preset probability range based on the correspondence between each task and each drone, or determining the initial allocation probability according to a preset task-drone matching rule, and generating an initial task allocation probability matrix for each particle based on the initial allocation probability.
[0015] In the above technical solution, the task assignment probability matrix of the p-th particle at the k-th iteration and time t satisfies:
[0016] in, This represents the position of the p-th particle at time t during the k-th iteration. This indicates that the p-th particle at the k-th iteration and time t represents the task... Assigned to drones The allocation probability, which is used to characterize the drone With the task The degree of matching between the allocations; p represents the particle number; k represents the number of iterations; t represents the task planning time or task execution time; i represents the task number; j represents the UAV number; n represents the number of tasks; m represents the number of UAVs; The task allocation probability matrix includes n rows corresponding to each task in the set of tasks to be assigned, and m columns corresponding to each drone in the set of drones. Each allocation probability in the same row represents the allocation matching degree between each drone and the corresponding task. The recurrent neural network encoder is used to encode the task allocation probability matrix into continuous numerical hidden features, and the recurrent neural network decoder is used to generate the decoded task allocation probability matrix based on the hidden features; Based on the allocation probabilities in the decoding task allocation probability matrix and the feasibility constraints, at least one target UAV is determined for each task from the available UAVs, and the candidate task allocation scheme is formed by the set of target UAVs corresponding to each task.
[0017] In the above technical solution, the fitness value is calculated according to the principle that a larger fitness value corresponds to a better candidate task allocation scheme. The fitness value corresponding to the candidate task allocation scheme satisfies the following:
[0018] in, This represents the fitness value corresponding to candidate task allocation scheme A; This represents the task reward corresponding to candidate task allocation scheme A; This represents the task execution cost corresponding to candidate task allocation scheme A; This indicates the task load imbalance corresponding to candidate task allocation scheme A; The weighting coefficients representing task rewards; Weighting coefficients representing the cost of task execution; Weighting coefficients representing the degree of task load imbalance; When the candidate task allocation scheme does not meet the feasibility constraint, a penalty fitness value is set for the candidate task allocation scheme. The penalty fitness value is lower than the fitness value of the candidate task allocation scheme that meets the feasibility constraint in the current iteration.
[0019] In the above technical solution, the particle velocity of the p-th particle in the (k+1)-th iteration and at time t is updated according to the following formula:
[0020] in, This represents the particle velocity of the p-th particle at the (k+1)-th iteration and at time t. This represents the inertia weight coefficient corresponding to the k-th iteration; This represents the particle velocity of the p-th particle at time t during the k-th iteration. Indicates the cognitive acceleration coefficient; Represents a random number corresponding to a cognitive item; This represents the optimal particle position of the p-th particle up to the k-th iteration and at time t. This represents the position of the p-th particle at time t during the k-th iteration. Indicates the social acceleration coefficient; Represents a random number corresponding to a social item; This represents the optimal particle position of the swarm up to the k-th iteration and at time t. The position of the p-th particle in the (k+1)-th iteration and at time t is updated according to the following formula:
[0021] in, This represents the position of the p-th particle in the (k+1)-th iteration and at time t.
[0022] In the above technical solution, the inertia weight coefficient is adaptively adjusted according to the number of iterations, so that the inertia weight coefficient promotes global search in the early stage of iteration and promotes local search in the later stage of iteration. The mutation operation includes at least one of exchange mutation and insertion mutation, wherein the exchange mutation is used to exchange at least one allocation relationship between two tasks and their corresponding UAVs, and the insertion mutation is used to adjust the allocation relationship between a task and at least one UAV to the allocation relationship between the task and another available UAV; The preset termination condition includes at least one of reaching a preset maximum number of iterations and the fitness value change between consecutive iterations being less than a preset threshold.
[0023] In the above technical solution, performing local particle swarm optimization on the affected task set includes: The set of affected tasks is determined based on the detected dynamic events and the latest status information of each UAV; Based on the dynamic events, update at least one of the following: the task assignment marker information to be decoded, the feasibility mask, and the UAV status information corresponding to each particle; The recurrent neural network decoder is used to generate the event adaptation task allocation probability matrix corresponding to each particle, and the event adaptation task allocation probability matrix corresponding to each particle is used as the initial particle position of the local particle swarm. While keeping the rows of the task allocation probability matrix corresponding to the unaffected tasks and their allocation relationships unchanged, particle swarm optimization is performed on the rows of the task allocation probability matrix corresponding to the affected tasks to obtain local task allocation results; and The local task allocation results are merged with the allocation relationships of the unaffected tasks to obtain the updated task allocation scheme.
[0024] In the above technical solution, when the new task event is detected, the new task is added to the set of tasks to be assigned. A task assignment flag indicating that the new task has not yet determined the target UAV is added to the task assignment flag information corresponding to each particle. The task assignment flag is converted into continuous embedding features using an embedding layer, and the continuous embedding features are used as the input information of the recurrent neural network decoder. The recurrent neural network decoder is used to generate the allocation probability row corresponding to the new task. The allocation probability row is added to the original task allocation probability matrix of each particle to form an expanded-dimensional task allocation probability matrix with the number of matrix rows increasing with the new task. The expanded-dimensional task allocation probability matrix is used as the initial particle position of the local particle swarm. When the drone failure event is detected, the failed drone is marked as unavailable, the feasibility mask value of the column corresponding to the failed drone in the task allocation probability matrix is set to 0, the unfinished task originally handled by the failed drone is identified as the affected task, the updated allocation probability row corresponding to the affected task is generated using the recurrent neural network decoder, and local particle swarm optimization is performed on the affected task while the failed drone is masked.
[0025] In the above technical solution, when the communication anomaly event is detected: The current observable information is selected from the state information of the communication-abnormal UAV and other UAVs using a mask matrix, and the information that needs to be predicted based on the state information before the communication abnormality occurred is identified using an inverse mask matrix that is complementary to the mask matrix. The recurrent neural network is used to predict the subsequent mission execution status of the UAV with communication anomaly based on the currently observable information and the state information before the communication anomaly occurred. When the subsequent task execution status indicates that the communication-abnormal drone can continue to perform the task, the original task of the communication-abnormal drone remains unchanged. When the subsequent task execution status indicates that the communication-abnormal drone cannot continue to perform the task, the unfinished task originally handled by the communication-abnormal drone is identified as the affected task, and local particle swarm optimization is performed on the affected task while the communication-abnormal drone is disabled.
[0026] This invention provides a dynamic task allocation system for unmanned aerial vehicles (UAVs) based on improved particle swarm optimization, comprising: The task management module is used to receive, store, and maintain task data, and update the set of tasks to be assigned when a new task is added. The drone status awareness module is used to acquire the location, remaining battery power, payload, flight speed and health status of each drone, and to detect drone failure events and communication anomalies. The allocation decision module is used to initialize a particle swarm with the task allocation probability matrix as the particle position. It uses a recurrent neural network encoder to encode the task allocation probability matrix of each particle to obtain the corresponding hidden features. It uses a recurrent neural network decoder to generate a decoded task allocation probability matrix based on the hidden features. It determines the target UAV set corresponding to each task based on the decoded task allocation probability matrix and feasibility constraints. It calculates the fitness value of the candidate task allocation scheme based on the task benefit, task execution cost and task load imbalance. It updates the particle velocity and particle position based on the individual optimal particle position and the group optimal particle position and performs mutation and / or crossover operations to output the task allocation scheme. When it is necessary to reallocate tasks, it uses the recurrent neural network decoder to generate a task allocation probability matrix adapted to dynamic events. It uses the task allocation probability matrix adapted to dynamic events as the initial particle position of the local particle swarm and performs local particle swarm optimization on the affected tasks. The path planning interface module is used to convert the task allocation scheme output by the allocation decision module into flight path instructions for execution by drones in the corresponding target drone set; and The dynamic feedback module is used to monitor the mission execution status of each UAV, and when a new mission event, UAV failure event, or communication anomaly event is detected, the allocation decision module is triggered to determine whether the mission needs to be reassigned.
[0027] In summary, due to the adoption of the above-mentioned technical features, the beneficial effects of the present invention are: This invention constructs a dynamic allocation process corresponding to task conditions and available drone resources by acquiring attribute information such as the location, priority, service time, task type, time window, and required number of drones for tasks to be assigned, as well as status information such as the location, range, payload capacity, remaining battery power, health status, and current task list of each drone. During task allocation, it comprehensively considers task benefits, task execution costs, and task load imbalance, and eliminates candidate solutions that do not meet the requirements for payload capacity, range, task time window, or number of drones through feasibility constraints. This approach can balance task completion requirements, resource consumption, and task load distribution among multiple drones, and supports task allocation scenarios where a task is executed by a single drone or jointly by multiple drones.
[0028] This invention uses a task allocation probability matrix to represent the search position of particles. Each allocation probability in the matrix represents the matching degree between the corresponding UAV and the corresponding task, without requiring the allocation probabilities for the same task to form a mutually exclusive probability distribution. A recurrent neural network encoder extracts the correlation features from the task allocation probability matrix, and a recurrent neural network decoder generates the corresponding decoded task allocation probability matrix. Then, by combining the required number of UAVs for each task, the allocation probabilities, and feasibility constraints, the target UAV set is determined, establishing a correspondence between continuous numerical particle positions and discrete task allocation results. This processing method is applicable to both one-task-one-UAV allocation scenarios and one-task-multiple-UAV collaborative execution scenarios, and provides a clear task-UAV allocation relationship for subsequent fitness evaluation and trajectory generation.
[0029] This invention updates particle velocity and position based on the individual optimal position and the swarm's optimal position, and incorporates inertia weights adjusted during iteration. This allows the particle swarm to maintain its search capability for different candidate task allocation schemes in the early stages of iteration, and strengthens its search for areas near existing better schemes in the later stages. Simultaneously, it performs exchange mutations or insertion mutations on at least some candidate task allocation schemes to change the original allocation relationship between tasks and UAVs, increasing the diversity of candidate task allocation schemes during iteration. Employing a fitness maximization evaluation method that uses task benefits as positive evaluation terms and task execution costs and task load imbalance as negative evaluation terms also ensures that the fitness calculation direction is consistent with the update direction of the individual and swarm optimal positions.
[0030] This invention detects dynamic events such as new tasks, drone failures, and communication anomalies during task execution, and updates the input information, drone state information, or feasibility mask of the recurrent neural network decoder based on these dynamic events. For new tasks, the assignment flag is converted into continuous embedding features through an embedding layer, and the decoder generates an allocation probability row corresponding to the new task, forming an expanded-dimensional task allocation probability matrix while retaining the original matrix rows. For drone failures, the failed drone is masked, and the allocation probability corresponding to its incomplete tasks is regenerated. For communication anomalies, the subsequent task execution state of the drone with communication anomalies is first predicted based on existing state information, and then it is determined whether to retain the original allocation relationship or reassign the incomplete tasks. Using the task allocation probability matrix generated after the occurrence of dynamic events as the initial particle positions of the local particle swarm, and only performing local optimization on the affected tasks, helps to continue to utilize the search information already formed in the original particle swarm, reducing adjustments to the allocation relationships of unaffected tasks.
[0031] This invention forms a closed loop of task allocation and execution feedback through functional links such as task management, UAV status perception, allocation decision, path planning interface, and dynamic feedback. The task allocation result can be converted into a waypoint sequence and trajectory command for the corresponding target UAV via the path planning interface. Position, battery level, payload, health status, and task completion status during task execution can be fed back to the task allocation process to trigger subsequent task adjustments. This ensures that task data, UAV real-time status, task allocation results, and trajectory execution process remain correlated, providing task planning and dynamic adjustment support for multiple UAVs to collaboratively execute multiple tasks in scenarios such as patrol, monitoring, search, identification, and material delivery.
[0032] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0033] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of a method for dynamic allocation of UAV missions based on improved particle swarm optimization, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a particle encoding and decoding architecture based on a long short-term memory neural network for handling sudden situations in a UAV mission dynamic allocation method based on improved particle swarm optimization according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the framework of a UAV mission dynamic allocation system based on improved particle swarm optimization according to an embodiment of the present invention. Detailed Implementation
[0034] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0035] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0036] The following reference Figures 1 to 3 This invention describes a method and system for dynamic allocation of unmanned aerial vehicle (UAV) missions based on improved particle swarm optimization, provided by some embodiments of the present invention.
[0037] This invention addresses multi-UAV task allocation scenarios where the number of tasks, task attributes, and UAV availability may change during task execution. It uses a task allocation probability matrix as a representation of particle positions in a particle swarm. Each element in the task allocation probability matrix represents the probability of a corresponding task being assigned to a corresponding UAV, reflecting the allocation matching degree between the corresponding UAV and the corresponding task. A recurrent neural network encoder encodes the task allocation probability matrix of each particle to extract correlation features in the task allocation relationship; a recurrent neural network decoder generates a decoded task allocation probability matrix based on the encoded hidden features; then, based on the decoded task allocation probability matrix, the required number of UAVs for the task, and feasibility constraints, a target UAV set including at least one UAV is determined for each task. During the particle swarm iteration process, candidate task allocation schemes are evaluated based on task benefits, task execution costs, and task load imbalance, and the particle swarm is updated through individual optimal positions, group optimal positions, adaptive inertia weights, and mutation operations. When a new task, UAV failure, or communication anomaly is detected, the decoder input information or feasibility mask is updated according to the corresponding dynamic event, generating a task allocation probability matrix adapted to the dynamic event. This task allocation probability matrix is used as the initial particle positions of the local particle swarm, and local optimization is performed only on the affected tasks.
[0038] See Figure 1 In some embodiments of the UAV mission dynamic allocation method, the particle swarm is first initialized, and then particle encoding and decoding, candidate mission allocation scheme determination, fitness value calculation, and individual optimal position and swarm optimal position update are performed in sequence. Figure 1 The optimal position of an individual particle is labeled Pbest, and the optimal position of the swarm is labeled Gbest. If the termination condition is not met, the particle velocity and position are updated, and crossover or mutation operations are performed on at least some candidate task assignment schemes. Then, encoding, decoding, and fitness evaluation are re-executed. If the termination condition is met, the task assignment scheme is output based on the task assignment probability information corresponding to the optimal particle position in the swarm. If a dynamic event is detected during task execution and task reallocation is required, local particle swarm optimization is initiated, and the assignment relationships of affected tasks are updated while maintaining the assignment relationships of unaffected tasks.
[0039] In some embodiments, the above method includes steps S1 to S8.
[0040] Step S1: Acquire mission data and UAV status data, and initialize particle swarm.
[0041] The set of tasks to be assigned is represented as follows:
[0042] The collection of drones is represented as:
[0043] Where T represents the set of tasks to be assigned; U represents the i-th task to be assigned; U represents the set of drones. Let i represent the j-th drone; i represent the mission number; j represent the drone number; n represent the number of missions; and m represent the number of drones.
[0044] Task data can include task location, task priority, required service time, task type, task time window, task status, and the number of drones required for the task. The required number of drones is denoted as When the task When executed by a drone, Take 1; when the task When multiple drones need to work together, Then it is an integer greater than 1.
[0045] Drone status data can include the drone's current location, flight speed, maximum range, payload capacity, current task list, remaining battery power, health status, and communication status. The task management module provides data on tasks to be assigned, while the drone status perception module provides drone status data. For drones that have not yet performed a task at the initial moment, their operational status is set to idle, and their current location and flight speed are recorded.
[0046] To determine the payload capacity constraints between the mission and the UAV, mission data may also include information on the payload or other resource requirements needed to complete the mission.
[0047] Multiple initial candidate task allocation schemes are generated based on the number of tasks and the number of drones. Each initial candidate task allocation scheme is represented as a particle in the particle swarm. The position of the p-th particle at the k-th iteration and at time t is represented by a task allocation probability matrix, the specific form of which is:
[0048] in, This represents the task assignment probability matrix for the p-th particle at the k-th iteration and time t, and also represents the particle position. Indicates the task Assigned to drones The probability of allocation; p represents the particle number; k represents the number of particle swarm iterations; t represents the task planning time or the task execution time.
[0049] The i-th row of the task assignment probability matrix is related to the task Correspondingly, column j corresponds to the drone. Correspondingly, each allocation probability in the same row represents the allocation matching degree between different drones and the same task. Since the same task can be performed by one or more drones, each allocation probability in the same row corresponds to the independent allocation relationship between the task and each drone, and it is not required that the sum of the allocation probabilities in the same row be 1.
[0050] When initializing the particle swarm, initial allocation probabilities can be randomly generated within a preset probability range based on the correspondence between each task and each drone. When combining feasibility masks for random initialization, the initial allocation probabilities can be expressed as:
[0051] in, Indicates the initial allocation probability; This represents a random value generated within a preset probability range; Indicates the initial time of the task With drones The feasibility mask value between them. Drones Capable of performing tasks hour, Get 1; the task cannot be executed. hour, Take 0.
[0052] Besides random generation, the initial allocation probability can also be determined based on manually defined task-drone matching rules. For example, the initial allocation probability can be determined based on the distance between the task and the drone, task priority, drone's remaining battery power, payload capacity, and task type compatibility. Different particles can use different random values, different rule parameters, or a combination of random and rule methods to form different initial particle positions.
[0053] Step S2: Encode and decode the task allocation probability matrix of each particle to form a candidate task allocation scheme.
[0054] Figure 2 This illustrates the encoder and decoder architecture of a Long Short-Term Memory (LSTM) network for dynamic task assignment. See also: Figure 2 The upper dashed box represents the encoder, which processes the task assignment probability matrices X(0), X(1) to X(t) at different times and outputs the corresponding hidden features h(0), h(1) to h(t); the lower dashed box represents the decoder, which generates the decoding task assignment probability matrix based on the hidden features output by the encoder. , to . Figure 2The gating unit is used to control information input, information retention and information output. The unit state is used to transmit state information between adjacent processing times. The mask layer is used to shield matrix elements that cannot participate in the current task allocation. The embedding layer is used to convert the flags to be allocated corresponding to the new task into continuous embedding features that the decoder can process.
[0055] The encoding relationship can be represented as:
[0056] in, Indicates the currently hidden feature; Indicates an LSTM encoder; This represents the hidden feature corresponding to the previous moment.
[0057] The hidden features are continuous numerical features used to characterize the task association information and state change information in the task assignment probability matrix.
[0058] The decoding relationship can be represented as:
[0059] in, This represents the probability matrix for assigning decoding tasks; This indicates an LSTM decoder.
[0060] The decoding task allocation probability matrix and the particle position matrix have the same data meaning. When the number of tasks or drones remains unchanged, both are n×m matrices. Elements in the decoding task allocation probability matrix... Indicates task Assigned to drones The decoding assignment probability is used to characterize the drone. With the task The degree of matching between the allocations.
[0061] As a common implementation, the output layer of an LSTM decoder can employ a sigmoid activation function to map the undefined values output by the decoder to preset probability ranges. This mapping is element-wise and does not perform normalization to ensure that the sum of probabilities in the same row is 1.
[0062] The element-wise mapping relationship can be represented as:
[0063] in, Represents the sigmoid activation function; Indicates that the LSTM decoder is for the task and drones The output is an undefined value.
[0064] The assignment probability after masking can be expressed as:
[0065] in, This represents the allocation probability after masking; This represents the feasibility mask value. (Drone / Unmanned Aerial Vehicle) Execute the task When the payload capacity constraint, range constraint, and mission time window constraint are not violated, Take 1; Violation of any feasibility constraint or drone When in a failed state, Take 0.
[0066] For the task A candidate drone set is formed from the available drones whose allocation probability reaches a preset threshold:
[0067] in, Represents a set of candidate drones; Indicates task The corresponding allocation probability threshold.
[0068] Select the candidate drones with higher allocation probability from the candidate drone set. Deploy drones to form a target drone ensemble:
[0069] in, Indicates task The corresponding set of target drones; This indicates selection based on the probability of allocation from high to low. The sorting and selection operator for drones.
[0070] when At that time, the target drone ensemble contains only one drone; when At that time, the target drone set contains multiple drones. A candidate task allocation scheme is formed from the target drone sets corresponding to each task:
[0071] in, This represents the candidate task allocation scheme corresponding to the p-th particle.
[0072] When the number of drones that meet the allocation probability threshold and feasibility constraints is less than the number of drones required for the mission, the current candidate mission allocation scheme can be determined as an infeasible scheme; alternatively, a supplementary selection can be made from the remaining available drones according to the preset backup selection rules.
[0073] Tasks are processed one by one according to the task order provided by the task management module. After determining the target UAV set corresponding to each task, the remaining range, remaining battery power, available payload and current task list of the corresponding UAVs are updated before processing the next task.
[0074] The LSTM encoder and decoder can employ input gates, forget gates, output gates, and cell state structures known in the art. The number of hidden layers, the dimension of hidden features, and the activation function can be configured according to the number of tasks, the number of drones, and computational resources. The LSTM parameters can be trained using existing task-assigned samples and remain unchanged during a single particle swarm iteration.
[0075] When a task corresponds to multiple target drones, the identifiers of each target drone can be embedded separately, and the embedded features corresponding to the task can be formed by summation, averaging, splicing or other feature aggregation methods.
[0076] Step S3: Calculate the fitness value of the candidate task allocation scheme.
[0077] This embodiment adopts a maximization approach, where a higher fitness value corresponds to a better candidate task allocation scheme. The fitness value is calculated according to the following formula:
[0078] in, This represents the fitness value corresponding to candidate task allocation scheme A; Indicates the rewards for completing the task; Indicates the cost of task execution;
[0079] Indicates the degree of task load imbalance; The weighting coefficients representing task rewards; Weighting coefficients representing the cost of task execution; The weighting coefficients represent the degree of task load imbalance.
[0080] Task revenue can be determined based on the number of completed tasks, task priority, and the corresponding task revenue value. Task execution costs can include flight time, flight path costs, and energy consumption costs. Task load imbalance is used to reflect the differences in the number of tasks undertaken, task execution time, or resource consumption among different UAVs.
[0081] When a task is performed by multiple drones, the task revenue is calculated after the number of drones required to meet the task requirements, and the task execution cost generated by each participating drone is calculated separately.
[0082] When a candidate task allocation scheme does not meet the feasibility constraints, a penalty fitness value lower than the fitness value of the feasible scheme in the current iteration is set for it.
[0083] When the numerical ranges of the evaluation items differ significantly, maximum-minimum normalization, benchmark normalization, or other well-known dimensionless methods can be used to process each evaluation item separately.
[0084] Step S4: Update the individual optimal position, the group optimal position, particle velocity, and particle position.
[0085] The optimal position of an individual is updated according to the following formula:
[0086] in, This represents the updated optimal particle position for the individual. This represents the candidate task allocation scheme corresponding to the optimal particle position of the original individual.
[0087] The particle number with the highest individual optimal fitness value is determined according to the following formula:
[0088] in, The particle number represents the individual optimal fitness value; N represents the number of particles in the particle swarm. This indicates that the particle number that makes the compared quantity reach its maximum value is returned.
[0089] The optimal position of the group is determined by the following formula:
[0090] in, This represents the updated optimal particle position in the population.
[0091] Particle velocity is updated according to the following formula:
[0092] in, This represents the particle velocity of the p-th particle at the (k+1)-th iteration and at time t. This represents the inertia weight coefficient corresponding to the k-th iteration; This represents the particle velocity of the p-th particle at time t during the k-th iteration. Indicates the cognitive acceleration coefficient; This represents a random number corresponding to a cognitive item and whose value is within [0, 1]. This represents the optimal particle position of the p-th particle up to the k-th iteration and at time t. This represents the position of the p-th particle at time t during the k-th iteration. Indicates the social acceleration coefficient; This represents a random number corresponding to the social item and whose value is in the range [0, 1]. This represents the optimal particle position of the swarm up to the k-th iteration and at time t.
[0093] Particle positions are updated according to the following formula:
[0094] After the particle positions are updated, element-wise truncation, sigmoid activation functions, or other interval mapping methods can be used to limit the matrix elements to a preset probability range.
[0095] The inertia weight coefficient is adaptively adjusted based on the number of iterations, making the inertia weight relatively large in the early stages of iteration and relatively small in the later stages. The inertia weight can be adjusted using linear decreasing, piecewise decreasing, or other methods that change with the number of iterations.
[0096] Step S5 involves performing crossover and / or mutation operations on at least some of the candidate task allocation schemes, and then determining termination. This disclosure uses mutation operations as an example. Mutation operations include exchange mutation and insertion mutation.
[0097] Swap mutation can randomly select two tasks and swap at least one assignment relationship between the two tasks and their respective drones. Insertion mutation can randomly select a task and adjust the assignment relationship between that task and at least one drone to the assignment relationship between that task and another available drone. For tasks that require multiple drones to perform together, mutation operations can change only a subset of the drones in the target drone set.
[0098] After the mutation is completed, the payload capacity constraints, range constraints, mission time window constraints, and mission requirement for the number of UAVs are re-examined, and the fitness value is recalculated.
[0099] To ensure that the task assignment relationships after discrete mutation continue to participate in continuous particle position updates, the assignment probability of the matrix position corresponding to the target UAV set after mutation can be increased, while the assignment probability of the matrix position corresponding to the removed UAV can be decreased.
[0100] Termination conditions include at least one of the following: reaching a preset maximum number of iterations and the change in fitness value between adjacent iterations being less than a preset threshold. If the termination condition is not met, return to step S2 to continue iteration.
[0101] When the termination condition is met, the optimal particle positions in the swarm are encoded and decoded to obtain the final decoding task allocation probability matrix:
[0102] in, This represents the probability matrix for the final decoding task assignment corresponding to the optimal particle position in the swarm.
[0103] Based on the final decoding task allocation probability matrix, feasibility mask, and the number of drones required for each task, the final task allocation scheme is formed:
[0104] in, This indicates the final task allocation plan; This indicates the process of identifying and processing the target drone set; This represents the set of drones required for each mission.
[0105] Step S6: Detect dynamic events and determine the set of affected tasks.
[0106] The dynamic feedback module continuously receives location data, mission completion flags, and status reports uploaded by each drone during mission execution, and detects events such as new missions, mission delays, path deviations, abnormal drone battery levels, drone mechanical failures, and communication delays exceeding set thresholds.
[0107] The set of affected tasks corresponding to a new task event includes at least the new task; the set of affected tasks corresponding to a drone failure event includes at least the tasks that the failed drone has not yet completed; the set of affected tasks corresponding to a communication anomaly event is determined based on the subsequent task execution status of the drone with the communication anomaly.
[0108] Step S7: While keeping the assignment relationship of unaffected tasks unchanged, perform local particle swarm optimization on the affected task set.
[0109] Upon detecting a dynamic event requiring task reallocation, update at least one of the following for each particle: task assignment marker, feasibility mask, and UAV status information. Use an LSTM decoder to generate an event-adapted task assignment probability matrix for each particle, and use this matrix as the initial particle position for the local particle swarm. During local optimization, keep the matrix rows and their assignment relationships unchanged for unaffected tasks, and only update the matrix rows for affected tasks.
[0110] For newly added tasks, after the task is detected... Afterwards, the task will be completed. Add the task to be assigned to the set of tasks to be assigned, and add the assignment flag to the task assignment flag information to be decoded:
[0111] in, This indicates the assignment marker information for the tasks to be decoded after the addition of a new task; The new mission indicates that the target drone has not yet been identified.
[0112] The embedding layer transforms the flags to be assigned into continuous embedding features:
[0113] in, This represents the embedded features corresponding to the newly added task; This indicates the embedding layer.
[0114] The LSTM decoder generates the probability matrix for the extended-dimensional decoding task:
[0115] in, This represents the probability matrix assigned to the extended-dimensional decoding task. Indicates hidden characteristics prior to the occurrence of a dynamic event; indicates newly added task attributes; Indicate the latest status of each drone; This represents the updated feasibility mask.
[0116] Append the probability allocation line corresponding to the new task to the original particle position:
[0117] in, Indicates the position of the initial particle in the expanded dimension within the local particle swarm; This represents the probability matrix of task assignments prior to the occurrence of dynamic events. This represents the probability allocation row corresponding to the newly added task. The size of the expanded matrix is (n+1)×m, and the first n rows corresponding to the original tasks remain unchanged.
[0118] The expanded particle velocity can be obtained by appending a zero-value velocity row or a random velocity row to the original particle velocity matrix.
[0119] Regarding drone failure, when the drone When a task loses its ability to perform, it is marked as unavailable. The feasibility mask after a failure event is represented as follows:
[0120] in, This represents the feasibility mask value after a failure event occurs; Indicates the serial number of the failed drone; This represents the feasibility mask value before the failure event occurs.
[0121] After a drone fails, the original column count of the task assignment probability matrix is retained. The corresponding column of the failed drone is masked to 0 to prevent it from being selected into the target drone set. Tasks that the failed drone has not yet completed are identified as affected tasks. The LSTM decoder generates corresponding updated assignment probability rows, and local particle swarm optimization is performed.
[0122] For communication anomalies, the corresponding drone is first marked as having a communication anomaly, without directly assuming it has lost its mission execution capability. The inverse mask matrix is represented as follows:
[0123] in, Represents the inverse mask matrix; Represents the mask matrix; This represents a matrix consisting entirely of 1s.
[0124] Combined state information is formed from the current observable state and the predicted state:
[0125] Where (Z(t)) represents the combined state information; This indicates the current available status information; This indicates the predicted state information obtained based on known information prior to the communication anomaly. This indicates that corresponding elements are multiplied.
[0126] The hidden features corresponding to abnormal communication states are represented as follows:
[0127] in, Hidden features that represent abnormal communication states; This represents a long short-term memory network used for predicting communication states.
[0128] Based on the hidden features corresponding to the communication anomaly, predict whether the communication-abnormal drone can continue to execute its original mission. If it is predicted that it can continue, maintain its original mission allocation relationship; if it is predicted that it cannot continue, identify its unfinished missions as affected missions, disable the communication-abnormal drone, and perform local particle swarm optimization on the affected missions.
[0129] Step S8: Convert the task allocation scheme into a track command and report the task execution status.
[0130] The path planning interface module receives the task allocation scheme output by the allocation decision module. For each task, it generates a task list for each target UAV based on its corresponding target UAV set, and then generates a waypoint sequence and flight path based on the task location, UAV starting position, and task execution order. When a task is executed by multiple UAVs, it generates a flight path command corresponding to the task for each UAV in the target UAV set.
[0131] The dynamic feedback module continues to monitor the execution status of each UAV and provides the latest status to the task management module, the UAV status perception module, and the allocation decision module, thereby forming a closed loop of task data acquisition, task allocation, trajectory generation, task execution, and status feedback.
[0132] Figure 3 This embodiment illustrates a dynamic task allocation system for unmanned aerial vehicles (UAVs). The system includes a task management module, a UAV status perception module, an allocation decision module, a path planning interface module, a dynamic feedback module, and a visual human-machine interface. The system can be deployed at a ground control station and uses a Robot Operating System (ROS) to enable data exchange between different functional modules. Figure 3 In this context, GIS stands for Geographic Information System; 4G / 5G stands for fourth-generation mobile communication network and fifth-generation mobile communication network, respectively; and MAVLink stands for Micro Aircraft Communication Protocol.
[0133] The task management module receives, stores, and maintains task data. The UAV status awareness module collects the location, remaining battery power, current payload, flight speed, health status, and communication status of each UAV. The allocation decision module performs particle swarm initialization, LSTM encoding and decoding, target UAV set determination, fitness calculation, particle update, mutation, termination judgment, and local particle swarm optimization. The path planning interface module converts the task allocation scheme into waypoint sequences and flight paths. The dynamic feedback module monitors the UAV's task execution status and triggers local particle swarm optimization when dynamic adjustment conditions are met.
[0134] The above method is illustrated below using a multi-drone disaster reconnaissance mission in urban emergency rescue as an example. This scenario involves 5 fixed-wing drones. to And 10 areas to be inspected to Each area to be inspected has latitude and longitude coordinates, task priority, and a viewing time of 3 to 8 minutes. Each drone has a maximum flight time of 60 minutes, a maximum payload of 3 kg, a cruising speed of 60 km / h, and the task allocation process must be completed and the corresponding instructions issued within 5 minutes.
[0135] During initialization, 30 initial task assignment probability matrices are generated, and the maximum number of iterations is set to 100. In this example, each task is performed by a single drone; therefore, the corresponding single-element target drone set can be abbreviated using the target drone number. The example task assignment scheme is represented as follows:
[0136] Where A represents the task allocation scheme corresponding to 10 tasks; the first element 2 represents the task. Assigned to drones Execution; the second element 4 represents the task. Assigned to drones Execution; the remaining elements represent the drone numbers corresponding to the respective tasks in the same way.
[0137] In fitness evaluation, the weighting coefficient of task benefits is used. Setting it to 0.6 will adjust the weighting factor for task execution cost. Setting it to 0.3 will adjust the weighting factor for task load imbalance. Set it to 0.1. Adjust the cognitive acceleration coefficient. Set it to 1.5 to adjust the social acceleration coefficient. Set to 1.5, and perform mutation on at least some candidate task assignment schemes with a mutation probability of 0.1. The iteration terminates after 100 iterations, or when the fitness value changes by less than 1% between adjacent iterations.
[0138] In the example of adding a new task, the task will be... Add to the set of tasks to be assigned and generate assignment marker information for the tasks to be decoded:
[0139] in, This indicates the assignment marker information for the tasks to be decoded when a new task is added. Indicates task The target drone has not yet been identified.
[0140] Through the embedding layer The features are converted into continuous embeddings, and the LSTM decoder generates a probability row corresponding to the new task. This probability row is then appended to the original task probability matrix of each particle. After 20 rounds of local iteration, the following is formed:
[0141] in, This represents the task allocation scheme formed after 20 rounds of local iterations. By drone implement.
[0142] In the example of drone failure, the drone A battery malfunction occurred, and the mission was terminated. The drone was then shielded using a masking layer. to complete their unfinished tasks and tasks Re-added to the task set to be assigned, forming:
[0143] The first one Indicates task Waiting for the target drone to be re-identified, the second one. Indicates task Waiting for the target drone to be reidentified.
[0144] The LSTM decoder generates tasks respectively and tasks The corresponding update allocation probability row. After 15 rounds of local iterations, the following is formed:
[0145] in, This represents the task allocation scheme formed after 15 rounds of local iterations. By drone Execution, task By drone implement.
[0146] In the example of communication anomaly, the drone The communication delay exceeds a set threshold. For currently available status information, a mask matrix is used to preserve it; for missing real-time status information, an inverse mask matrix is used in conjunction with the location, battery level, mission progress, and historical motion status before the communication anomaly occurred to form a predictive input. When predicting the drone... When the drone is able to continue performing its mission, its original mission assignment relationship should be maintained; when predicting drones When a task cannot continue to be executed, the unfinished tasks are identified as affected tasks and local particle swarm optimization is performed.
[0147] The particle swarm size, maximum number of iterations, fitness weight coefficient, mutation probability, communication anomaly threshold, and recurrent neural network size in the above embodiments can be adjusted according to the task size, the number of UAVs, and the allowed computation time. Adjusting these parameters does not change the overall processing relationships of task allocation probability matrix initialization, recurrent neural network encoding and decoding, target UAV set determination, particle swarm iteration, dynamic event local optimization, and the conversion of task allocation results into trajectory commands.
[0148] In this specification, the illustrative expressions of the terms used do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0149] Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention shall be included within the scope of protection of this invention.
Claims
1. A method for dynamic allocation of UAV missions based on improved particle swarm optimization, characterized in that, include: Obtain the set of tasks to be assigned and the set of drones, and obtain the task attribute information of each task in the set of tasks to be assigned, the status information of each drone in the set of drones, and the feasibility constraints corresponding to task assignment; Initialize a particle swarm, with each particle in the particle swarm representing a candidate task allocation scheme. The particle position of each particle is represented by a task allocation probability matrix. Each element in the task allocation probability matrix represents the allocation probability of the corresponding task being assigned to the corresponding UAV. The allocation probability is used to characterize the allocation matching degree between the corresponding UAV and the corresponding task. For each particle in the particle swarm, the task allocation probability matrix of the particle is encoded using a recurrent neural network encoder to obtain the corresponding hidden features. The corresponding decoding task allocation probability matrix is generated using a recurrent neural network decoder based on the hidden features. Based on the decoding task allocation probability matrix and the feasibility constraints, the target UAV set corresponding to each task is determined to obtain a candidate task allocation scheme. The target UAV set includes at least one UAV. The fitness value of the candidate task allocation scheme is calculated based on task benefits, task execution costs, and task load imbalance. Based on the individual optimal particle position of each particle and the group optimal particle position of the particle swarm, update the particle velocity and particle position of each particle, and perform mutation operations on at least some of the candidate task allocation schemes. Repeat the encoding, decoding, target UAV set determination, fitness value calculation, particle velocity and particle position update and mutation operation until the preset termination condition is met, determine the optimal particle position of the swarm, and obtain the task allocation scheme based on the task allocation probability information corresponding to the optimal particle position of the swarm and the feasibility constraints. During the execution of the task allocation scheme, at least one dynamic event among the task addition event, drone failure event, and communication anomaly event is detected, and it is determined whether the task needs to be reassigned based on the detected dynamic event. When task reallocation is required, the set of affected tasks is determined. Based on the dynamic event, the input information of the recurrent neural network decoder and at least one of the feasibility constraints are updated. The recurrent neural network decoder generates a task allocation probability matrix adapted to the dynamic event. This matrix is used as the initial particle positions of the local particle swarm optimization. While maintaining the allocation relationships of unaffected tasks, local particle swarm optimization is performed on the set of affected tasks to obtain an updated task allocation scheme. The task allocation scheme or the updated task allocation scheme is sent to the path planning interface to generate flight path instructions for the corresponding UAV to execute.
2. The UAV mission dynamic allocation method according to claim 1, characterized in that, The task attribute information includes task location, task priority, service time required for the task, task type, task time window, and the number of drones required for the task. The drone's status information includes its location, flight speed, maximum range, payload capacity, current task list, remaining battery power, and health status. The feasibility constraints include UAV payload capacity constraints, range constraints, mission time window constraints, and the number of UAVs required for the mission. The initialization of the particle swarm includes: randomly generating an initial allocation probability within a preset probability range based on the correspondence between each task and each drone, or determining the initial allocation probability according to a preset task-drone matching rule, and generating an initial task allocation probability matrix for each particle based on the initial allocation probability.
3. The method for dynamic allocation of UAV missions according to claim 1, characterized in that, The task assignment probability matrix for the p-th particle at the k-th iteration and time t satisfies: in, This represents the position of the p-th particle at time t during the k-th iteration. This indicates that the p-th particle at the k-th iteration and time t represents the task... Assigned to drones The allocation probability, which is used to characterize the drone With the task The degree of matching between the allocations; p represents the particle number; k represents the number of iterations; t represents the task planning time or task execution time; i represents the task number; j represents the UAV number; n represents the number of tasks; m represents the number of UAVs; The task allocation probability matrix includes n rows corresponding to each task in the set of tasks to be assigned, and m columns corresponding to each drone in the set of drones. Each allocation probability in the same row represents the allocation matching degree between each drone and the corresponding task. The recurrent neural network encoder is used to encode the task allocation probability matrix into continuous numerical hidden features, and the recurrent neural network decoder is used to generate the decoded task allocation probability matrix based on the hidden features; Based on the allocation probabilities in the decoding task allocation probability matrix and the feasibility constraints, at least one target UAV is determined for each task from the available UAVs, and the candidate task allocation scheme is formed by the set of target UAVs corresponding to each task.
4. The UAV mission dynamic allocation method according to claim 1, characterized in that, The fitness value is calculated using the maximization principle that a larger fitness value corresponds to a better candidate task allocation scheme. The fitness values corresponding to the candidate task allocation schemes satisfy the following: in, This represents the fitness value corresponding to candidate task allocation scheme A; This represents the task reward corresponding to candidate task allocation scheme A; This represents the task execution cost corresponding to candidate task allocation scheme A; This indicates the task load imbalance corresponding to candidate task allocation scheme A; The weighting coefficients representing task rewards; Weighting coefficients representing the cost of task execution; Weighting coefficients representing the degree of task load imbalance; When the candidate task allocation scheme does not meet the feasibility constraint, a penalty fitness value is set for the candidate task allocation scheme. The penalty fitness value is lower than the fitness value of the candidate task allocation scheme that meets the feasibility constraint in the current iteration.
5. The method for dynamic allocation of UAV missions according to claim 1, characterized in that, The velocity of the p-th particle at the (k+1)-th iteration and at time t is updated according to the following formula: in, This represents the particle velocity of the p-th particle at the (k+1)-th iteration and at time t. This represents the inertia weight coefficient corresponding to the k-th iteration; This represents the particle velocity of the p-th particle at time t during the k-th iteration. Indicates the cognitive acceleration coefficient; Represents a random number corresponding to a cognitive item; This represents the optimal particle position of the p-th particle up to the k-th iteration and at time t. This represents the position of the p-th particle at time t during the k-th iteration. Indicates the social acceleration coefficient; Represents a random number corresponding to a social item; This represents the optimal particle position of the swarm up to the k-th iteration and at time t. The position of the p-th particle in the (k+1)-th iteration and at time t is updated according to the following formula: in, This represents the position of the p-th particle in the (k+1)-th iteration and at time t.
6. The method for dynamic allocation of UAV missions according to claim 5, characterized in that, The inertia weight coefficient is adaptively adjusted according to the number of iterations, so that the inertia weight coefficient promotes global search in the early stage of iteration and local search in the later stage of iteration. The mutation operation includes at least one of exchange mutation and insertion mutation, wherein the exchange mutation is used to exchange at least one allocation relationship between two tasks and their corresponding UAVs, and the insertion mutation is used to adjust the allocation relationship between a task and at least one UAV to the allocation relationship between the task and another available UAV; The preset termination condition includes at least one of reaching a preset maximum number of iterations and the fitness value change between consecutive iterations being less than a preset threshold.
7. The method for dynamic allocation of UAV missions according to any one of claims 1 to 6, characterized in that, Performing local particle swarm optimization on the affected task set includes: The set of affected tasks is determined based on the detected dynamic events and the latest status information of each UAV; Based on the dynamic events, update at least one of the following: the task assignment marker information to be decoded, the feasibility mask, and the UAV status information corresponding to each particle; The recurrent neural network decoder is used to generate the event adaptation task allocation probability matrix corresponding to each particle, and the event adaptation task allocation probability matrix corresponding to each particle is used as the initial particle position of the local particle swarm. While keeping the rows of the task allocation probability matrix corresponding to the unaffected tasks and their allocation relationships unchanged, particle swarm optimization is performed on the rows of the task allocation probability matrix corresponding to the affected tasks to obtain local task allocation results; and The local task allocation results are merged with the allocation relationships of the unaffected tasks to obtain the updated task allocation scheme.
8. The method for dynamic allocation of UAV missions according to claim 7, characterized in that, When the newly added task event is detected, the new task is added to the set of tasks to be assigned. A task assignment flag indicating that the target UAV of the new task has not yet been determined is added to the task assignment flag information corresponding to each particle. The task assignment flag is converted into continuous embedding features using the embedding layer, and the continuous embedding features are used as the input information of the recurrent neural network decoder. The recurrent neural network decoder is used to generate the allocation probability row corresponding to the new task. The allocation probability row is added to the original task allocation probability matrix of each particle to form an expanded-dimensional task allocation probability matrix with the number of matrix rows increasing with the new task. The expanded-dimensional task allocation probability matrix is used as the initial particle position of the local particle swarm. When the drone failure event is detected, the failed drone is marked as unavailable, the feasibility mask value of the column corresponding to the failed drone in the task allocation probability matrix is set to 0, the unfinished task originally handled by the failed drone is identified as the affected task, the updated allocation probability row corresponding to the affected task is generated using the recurrent neural network decoder, and local particle swarm optimization is performed on the affected task while the failed drone is masked.
9. The method for dynamic allocation of UAV missions according to claim 7, characterized in that, When the aforementioned communication anomaly event is detected: The current observable information is selected from the state information of the communication-abnormal UAV and other UAVs using a mask matrix, and the information that needs to be predicted based on the state information before the communication abnormality occurred is identified using an inverse mask matrix that is complementary to the mask matrix. The recurrent neural network is used to predict the subsequent mission execution status of the UAV with communication anomaly based on the currently observable information and the state information before the communication anomaly occurred. When the subsequent task execution status indicates that the communication-abnormal drone can continue to perform the task, the original task of the communication-abnormal drone remains unchanged. When the subsequent task execution status indicates that the communication-abnormal drone cannot continue to perform the task, the unfinished task originally handled by the communication-abnormal drone is identified as the affected task, and local particle swarm optimization is performed on the affected task while the communication-abnormal drone is disabled.
10. A dynamic task allocation system for unmanned aerial vehicles based on improved particle swarm optimization, characterized in that, include: The task management module is used to receive, store, and maintain task data, and update the set of tasks to be assigned when a new task is added. The drone status awareness module is used to acquire the location, remaining battery power, payload, flight speed and health status of each drone, and to detect drone failure events and communication anomalies. The allocation decision module is used to initialize a particle swarm with the task allocation probability matrix as the particle position. It uses a recurrent neural network encoder to encode the task allocation probability matrix of each particle to obtain the corresponding hidden features. It uses a recurrent neural network decoder to generate a decoded task allocation probability matrix based on the hidden features. It determines the target UAV set corresponding to each task based on the decoded task allocation probability matrix and feasibility constraints. It calculates the fitness value of the candidate task allocation scheme based on the task benefit, task execution cost and task load imbalance. It updates the particle velocity and particle position based on the individual optimal particle position and the group optimal particle position and performs mutation and / or crossover operations to output the task allocation scheme. When it is necessary to reallocate tasks, it uses the recurrent neural network decoder to generate a task allocation probability matrix adapted to dynamic events. It uses the task allocation probability matrix adapted to dynamic events as the initial particle position of the local particle swarm and performs local particle swarm optimization on the affected tasks. The path planning interface module is used to convert the task allocation scheme output by the allocation decision module into a flight path command for the drones in the corresponding target drone set to execute; as well as The dynamic feedback module is used to monitor the mission execution status of each UAV, and when a new mission event, UAV failure event, or communication anomaly event is detected, the allocation decision module is triggered to determine whether the mission needs to be reassigned.
