A multi-uav system task allocation method and system
By combining self-attention and cross-attention mechanisms with a Transformer decoder, a multi-UAV task allocation method is proposed. This method solves the problems of real-time performance and global optimality in task allocation in existing technologies, and achieves efficient and intelligent task allocation in dynamic environments. It adapts to the complex interaction relationships of multi-UAV systems and improves the robustness and practical value of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI GUANGTOU NATURAL GAS PIPELINE NETWORK CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-05
Smart Images

Figure CN122155232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of task scheduling technology for multi-agent systems, and more specifically, to a task allocation method and system for multi-UAV systems. Background Technology
[0002] In recent years, unmanned aerial vehicle (UAV) systems have been increasingly widely used in logistics, agricultural plant protection, geographic surveying, emergency response, and military reconnaissance. While the capabilities of a single UAV are limited, multi-UAV systems working together can significantly improve the efficiency, coverage, and robustness of mission execution. However, multi-UAV collaborative task allocation is a complex combinatorial optimization problem. It typically requires consideration of multiple constraints, such as mission time window, spatial distribution, priority, UAV energy, range, and payload, in a dynamic and uncertain environment to achieve the optimal or near-optimal global objectives (e.g., the highest overall mission completion rate, the shortest total time, and the lowest total energy consumption).
[0003] Existing task allocation methods are mainly divided into three categories: centralized optimization methods, distributed negotiation methods, and intelligent learning methods. Although centralized optimization methods (such as mixed integer linear programming) can find the theoretical optimal solution, the computational complexity increases exponentially with the problem size, making it difficult to meet real-time requirements. Distributed negotiation methods (such as contract net protocol and auction algorithm) reduce the computational pressure on the central node and improve system scalability, but the communication overhead is large and it is difficult to guarantee global optimality. Intelligent learning methods, represented by deep reinforcement learning, can learn decision-making strategies in complex states through interactive trial and error with the environment and have good generalization ability.
[0004] However, directly applying deep reinforcement learning to multi-UAV task allocation still faces challenges. Traditional policy networks (such as multilayer perceptrons (MLPs) or recurrent neural networks (RNNs) struggle to effectively model the complex dynamic relationships between tasks and UAVs, as well as between tasks themselves. Furthermore, the number of tasks in a task scenario is often variable, requiring the model to handle variable-length input sequences. The standard Transformer model, with its powerful sequence modeling and global dependency capture capabilities, offers a new approach to solving these problems, but it has limitations in handling heterogeneous features (task features differ from UAV features in terms of dimension and semantics) and dynamically focusing on key information, potentially hindering its ability to make refined allocation decisions under resource constraints.
[0005] Therefore, there is an urgent need for a multi-UAV task allocation method that can efficiently model complex interaction relationships, adapt to dynamic task scale, and be sensitive to key constraints. Summary of the Invention
[0006] In view of this, in order to solve the above-mentioned problems in the prior art, this application provides a method and system for task allocation in a multi-UAV system.
[0007] The embodiments of this application are implemented as follows: In a first aspect, this application provides a method for task allocation in a multi-UAV system, including: Each task in the set of tasks to be assigned is encoded as a task requirement vector, forming a task requirement vector set. At the same time, each drone in the set of available drones is encoded as a drone state vector, forming a drone state vector set. The task requirement vector set and the UAV state vector set are input into the encoder. The self-attention mechanism in the encoder is used to model the internal dependencies between tasks and between UAVs, and the cross-attention mechanism is used to model the interaction dependencies between tasks and UAVs. The fused high-dimensional joint feature representation is output. The high-dimensional joint feature representation is input into the Transformer decoder with an integrated gating unit. The gating unit dynamically adjusts the output intensity of the multi-head attention mechanism in the decoder to generate a task allocation context vector containing the current global state information. The task allocation context vector is input into the pointer network, which calculates the matching probability of each UAV with all tasks to be assigned in turn, and selects the UAV to execute the task based on the matching probability to generate a task allocation sequence. Based on the near-end policy optimization algorithm, the reward signal obtained through interaction in the simulation environment is used to perform end-to-end reinforcement learning training on the policy network, which includes the encoder, the Transformer decoder, and the pointer network, in order to optimize the task allocation policy.
[0008] In one possible implementation, the encoder is a multi-layer structure, each layer of which includes the self-attention mechanism, the cross-attention mechanism, and a gated residual fusion unit; The gated residual fusion unit is used to perform weighted fusion of the output of the attention mechanism, and its calculation formula is as follows: ; in, This represents the Sigmoid activation function. For the gated weight matrix, This indicates element-wise multiplication.
[0009] In one possible implementation, the gating unit acts on the output of each attention head of the multi-head attention mechanism in the form of a learnable parameter matrix, and adjusts the contribution intensity of each attention head through element-wise multiplication to achieve focusing on key mission features or key UAV state features.
[0010] In one possible implementation, the pointer network performs the following operations for each unassigned drone: Using the fusion result of the UAV state and the task allocation context vector as the query vector, attention scores are applied to the encoded features of all tasks to be assigned, and the scores are converted into a probability distribution using the Softmax function. The task with the highest probability is then assigned to the UAV. After updating the system status, repeat this process until the task assignment is complete.
[0011] In one possible implementation, the objective function of the proximal policy optimization algorithm is a cut-and-substitute objective function, and its loss function is expressed by the formula: ; in, This represents the probability ratio between the current strategy and the old strategy. For the dominant function, This is the shear range coefficient.
[0012] In one possible implementation, the task requirement vector includes task location coordinates, expected start time, expected end time, task priority, estimated execution time, and task value. The UAV state vector includes the UAV's current location coordinates, remaining battery power, maximum range, maximum payload capacity, and the number of tasks currently undertaken.
[0013] In one possible implementation, the simulation environment calculates a reward signal based on the task allocation result and the UAV's performance simulation, the reward signal including: The reward for completing a task is positively correlated with the value of the successfully completed task. Constraints and penalties are used to negatively incentivize at least one of the following situations: drone battery depletion, mission timeout, and drone overload. Efficiency optimization rewards are used to guide strategies to shorten the total system task completion time or reduce the total flight energy consumption of drones.
[0014] Secondly, this application provides a multi-UAV system task allocation system, comprising: The input modeling module is used to encode the raw task information and UAV status information into a task requirement vector set and a UAV status vector set, respectively. The encoding module, connected to the input modeling module, is used to receive the task requirement vector set and the UAV state vector set, and extract high-dimensional joint feature representations through self-attention mechanism, cross-attention mechanism and gated residual fusion unit; The decoding and assignment module, connected to the encoding module, includes a Transformer decoder with an integrated gating unit and a pointer network; the Transformer decoder is used to decode the high-dimensional joint feature representation and generate a task assignment context vector; the pointer network is connected to the Transformer decoder and is used to generate a specific task assignment sequence based on the task assignment context vector; The policy training module, connected to the encoding module and the decoding and assignment module, is used to perform reinforcement learning training on the policy network composed of the encoding module and the decoding and assignment module based on the near-end policy optimization algorithm and through interaction with the environment simulator. The deployment and execution module is used to load the policy network model optimized by the policy training module and generate task allocation instructions based on the real-time input task and UAV status information.
[0015] In one possible implementation, the encoding module comprises a plurality of encoding layers connected in sequence, each encoding layer comprising: a task self-attention sub-layer for processing internal dependencies of the task, a drone self-attention sub-layer for processing internal dependencies of the drone, a cross-attention sub-layer for processing the interaction dependencies between the task and the drone, and a gated residual fusion unit for fusing the outputs of each attention sub-layer.
[0016] In one possible implementation, the Transformer decoder in the decoding and assignment module includes a multi-head attention layer and a feedforward neural network layer, and the gating unit acts on the output channel of the multi-head attention layer to dynamically adjust the information flow intensity of each channel.
[0017] The technical solution provided in this application can achieve at least the following beneficial effects: This application provides a multi-UAV system task allocation method and system. By constructing a multi-UAV task allocation model that integrates gating attention mechanism and deep reinforcement learning, it achieves efficient and intelligent matching of tasks and UAV resources in dynamic and multi-constraint environments. It solves the problems of poor real-time performance of traditional centralized optimization methods, easy getting trapped in local optima by heuristic algorithms, and weak ability and insufficient generalization of existing deep reinforcement learning methods to model complex relationships. It changes the previous allocation approach that relies on fixed rules or single mathematical models, and establishes a unified, end-to-end, data-driven collaborative decision-making framework, realizing the integration of "perception-decision-optimization" at the task allocation level of multi-UAV systems.
[0018] This application constructs an encoder that integrates self-attention and cross-attention mechanisms, effectively capturing multidimensional and nonlinear relationships between tasks, between drones, and between tasks and drones. It solves the problems of insufficient feature extraction capabilities and difficulty in expressing complex interaction relationships in traditional methods. The introduced gating mechanism acts like a dynamic filter, which can enhance attention to key constraints based on real-time context, significantly improving the model's modeling accuracy and decision rationality for dynamic and heterogeneous task scenarios.
[0019] This application abandons the traditional design pattern of "one rule for one scenario" and builds a unified decision model that can handle variable-length input sequences by combining pointer networks with the Transformer architecture. This framework can adapt to the dynamic changes in the number of tasks, the scale of drones and constraints, without having to redesign the algorithm or adjust a large number of parameters for each scenario change. It realizes a fundamental shift in thinking from "specific scenario customization" to "general intelligent adaptation".
[0020] This application enables the system to autonomously learn the optimal allocation strategy in a simulation environment with multiple constraints, including power, range, and time window, through end-to-end training of the near-end policy optimization algorithm. The trained policy network has strong generalization ability and can transfer the learned allocation logic to unseen task combinations and initial states. This effectively solves the problem that traditional methods are slow to adapt to environmental changes and require readjustment, ensuring the robustness and reliability of the system in actual deployment.
[0021] This application leverages the parallel computing capabilities of the Transformer architecture and the efficient sequence generation mechanism of pointer networks to complete the allocation and computation of large-scale task sets in an extremely short time, meeting the scheduling requirements of high concurrency and real-time response. At the same time, the explicit modeling and optimization of resource constraints ensures the feasibility of the generation scheme in actual physical systems, thereby closely linking advanced algorithm research with engineering applications and greatly enhancing the practical value and deployment potential of this technology. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating a task allocation method for a multi-UAV system according to an exemplary embodiment of this application; Figure 2This is a flowchart illustrating a specific implementation of a task allocation method for a multi-UAV system, as shown in an exemplary embodiment of this application. Figure 3 This is a schematic diagram of the process of a Transformer with a gating mechanism, as illustrated in an exemplary embodiment of this application; Figure 4 This is a flowchart illustrating the deep reinforcement learning PPO optimization process in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of the structure of a multi-UAV system task allocation system shown in an exemplary embodiment of this application.
[0024] Figure label: 1. Input modeling module; 2. Encoding module; 3. Decoding and assignment module; 4. Policy training module; 5. Deployment and execution module. Detailed Implementation
[0025] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0026] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0027] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0028] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0029] Next, the technical solutions of this application and how they solve the aforementioned technical problems will be described in detail through embodiments and in conjunction with the accompanying drawings. The embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application.
[0030] In one exemplary embodiment, such as Figure 1 and Figure 2 As shown, a method for task allocation in a multi-UAV system is provided. In this embodiment, the method may include the following steps: Step 100: Encode each task in the set of tasks to be assigned as a task requirement vector to form a task requirement vector set. At the same time, encode each drone in the set of available drones as a drone state vector to form a drone state vector set.
[0031] In one embodiment, the goal of this step is to transform the unstructured scheduling problem in the real world into a computer-processable normalized mathematical expression, with the system receiving and maintaining two dynamic sets in real time: The set of tasks to be assigned is T = {t1, t2, ..., t_N}; where N is the total number of tasks to be processed in the current period. This value can be dynamically increased or decreased over time. The source of tasks can be a pre-defined plan (such as a logistics delivery list) or a real-time triggered request (such as an emergency event report).
[0032] The available drone set is U = {u1, u2, ..., u_M}, where M is the number of drones currently available for scheduling, which may change due to malfunctions, return flights, or new additions.
[0033] For each element in the set, extract key attributes and construct a feature vector: Task requirement vector: For each task t i Its vector v_t i It includes, but is not limited to, the following features: the three-dimensional coordinates of the task target point, the expected time window for task execution, the priority indicating the urgency, the estimated execution time, and the benefits and value that can be brought about by completing the task.
[0034] UAV state vector: For each UAV u j Its vector v_u j Features include, but are not limited to, the drone's real-time three-dimensional position coordinates, remaining battery percentage, maximum range, maximum payload capacity, and the number of missions currently being undertaken.
[0035] All task requirement vectors form a matrix V_T, and all UAV state vectors form a matrix V_U, which serve as the unified input for subsequent intelligent processing.
[0036] Step 200: Input the task requirement vector set and the UAV state vector set into the encoder, model the internal dependencies between tasks and between UAVs through the self-attention mechanism in the encoder, and model the interaction dependencies between tasks and UAVs through the cross-attention mechanism, and output the fused high-dimensional joint feature representation.
[0037] In one embodiment, this step uses an advanced encoder to perform deep feature extraction and fusion of V_T and V_U to capture the complex matching relationship between the task and the drone.
[0038] At the core of the encoder is a multi-layered Transformer structure, with each layer performing the following operations: Task self-attention: Self-attention calculation is performed within the task feature matrix V_T, enabling each task to perceive the features of all other tasks, thereby modeling the spatial proximity, temporal sequence, or logical correlation between tasks.
[0039] Drone self-attention: Self-attention calculation is performed within the drone state matrix V_U, enabling each drone to compare its state with that of other members in the cluster, thereby understanding its relative advantages and disadvantages in terms of power, location, load, etc.
[0040] Task-Drone Cross-Attention: This is key to achieving intelligent matching. Using drone status as the query and task features as the key and value, it calculates each drone's "attention" to all tasks, essentially assessing the drone's suitability for performing tasks. This mechanism establishes a bridge between heterogeneous information.
[0041] After processing by the attention mechanism described above, the information is integrated through a gated residual fusion unit, and finally outputs a high-dimensional joint feature representation H rich in global interaction information.
[0042] Step 300: Input the high-dimensional joint feature representation into the Transformer decoder with integrated gating unit, and dynamically adjust the output intensity of the multi-head attention mechanism in the decoder through the gating unit to generate a task allocation context vector containing the current global state information.
[0043] In one embodiment, the joint features H output by the encoder are input into a Transformer decoder that integrates a gating unit. The decoder's task is to generate a "decision context vector" C to guide the assignment of specific tasks.
[0044] The multi-head attention layer inside the decoder is its core. In this embodiment, the gating unit introduced here assigns a dynamically learnable weight to the output of each attention head. During the inference process, the model automatically adjusts these weights according to the current global state information, thereby enhancing the focus on the most critical information pattern of the current decision and suppressing secondary or interfering information. This dynamic focusing capability significantly improves the adaptability and accuracy of the strategy.
[0045] Step 400: Input the task allocation context vector into the pointer network. The pointer network calculates the matching probability of each UAV with all tasks to be assigned in turn, and selects the UAV to execute the task according to the matching probability to generate a task allocation sequence.
[0046] In one embodiment, this step transforms the abstract context vector C into a concrete, executable sequence of task assignments. The pointer network operates in a serialized, autoregressive manner, and its process is as follows: Initialization: Set all tasks to the "unassigned" state.
[0047] Iterative decision-making: Select the drone to be assigned according to a predetermined order (such as drone number) or a dynamic strategy.
[0048] Calculate the matching probability: Fuse the state vector of the UAV with the context vector C into a query vector, then calculate the attention score with the encoded features of all “unassigned” tasks in the encoder, and transform the score into a probability distribution through the Softmax function. This distribution accurately represents the suitability of assigning each unassigned task to the current UAV in the current state.
[0049] Make an assignment: Select the task with the highest probability and assign it to the current drone.
[0050] Status Update and Loop: Mark the selected task as "assigned" and simulate updating the drone's status. Then, select the next drone and repeat the calculation of matching probability and assignment steps until all tasks are assigned or drone resources are exhausted.
[0051] This mechanism perfectly adapts to the dynamic changes in the number of tasks N, and each decision is based on the latest global and local states.
[0052] Step 500: Based on the near-end policy optimization algorithm, the reward signal obtained through simulation environment interaction is used to perform end-to-end reinforcement learning training on the policy network including the encoder, the Transformer decoder and the pointer network to optimize the task allocation policy.
[0053] In one embodiment, the preceding steps collectively define a parameterizable policy network. To train this network, this embodiment employs a near-end policy optimization algorithm, which is trained in a high-fidelity multi-UAV task assignment simulation environment. Interactive sampling: The simulation environment simulates the physical processes of drone flight, mission execution, power consumption, and time progression. In each training round, the environment generates a random initial state s (i.e., specific V_T and V_U), and the policy network outputs an assignment action a (i.e., a complete task assignment sequence) based on s.
[0054] Reward feedback: The environment performs action a and calculates a scalar reward signal r, which is the core of evaluating the merits of the allocation scheme.
[0055] Policy optimization: By utilizing a large amount of collected interaction data (s, a, r), the PPO algorithm steadily updates the policy network parameters θ by optimizing a pruned alternative objective function, causing it to evolve in the direction of maximizing long-term cumulative rewards, thereby automatically learning a high-performance allocation policy.
[0056] In one embodiment, such as Figure 3 As shown, the encoder has a multi-layer structure, each layer of which includes the self-attention mechanism, the cross-attention mechanism, and a gated residual fusion unit. In this embodiment, the structure of the gated residual fusion unit in the encoder is further defined. This unit is key to improving the model's expressive power, and its workflow is as follows: This unit takes the output of the attention module's original input vector after attention weighting, passes it through a learnable linear transformation layer, and then through a sigmoid activation function to generate a gating weight matrix of the same dimension as the attention-weighted output. The Sigmoid function ensures The value of each element is between 0 and 1, representing the strength of the introduction of new information into the output after attention weighting calculation on the corresponding feature dimension.
[0057] Then, the unit performs the calculation according to the formula: ; Calculate the final output ,in, This represents the Sigmoid activation function. For the gated weight matrix, This indicates element-wise multiplication.
[0058] The core idea of this design is that the model autonomously learns a "soft switch" to dynamically determine how much original feature information to retain and how much new association information extracted by the attention mechanism to integrate in the final output. This effectively alleviates the information loss or gradient problem in deep networks and enhances the model's ability to retain and strengthen key features.
[0059] In one embodiment, the function of the gating unit in the decoder is defined. In the multi-head attention layer of the decoder, there are multiple independent attention heads, each of which captures information patterns from different subspaces.
[0060] The gating unit associates a learnable weight parameter with each attention head.
[0061] In implementation, the weight parameter can be a scalar used to globally adjust the contribution of the attention head, or it can be a vector of the same dimension as the attention head for more fine-grained feature-wise adjustment.
[0062] During forward propagation of information, the output of each attention head is modulated by its corresponding gating weight. Subsequently, all modulated outputs are concatenated and projected.
[0063] Through training, the model can automatically learn to assign appropriate higher weights to attention patterns that are more useful for the current decision at different stages of decoding, thereby achieving intelligent and dynamic context awareness and information filtering.
[0064] In one embodiment, the specific operation flow of the pointer network is as follows: Maintain a binary mask with a length equal to the total number of tasks N, and initialize all values to 1.
[0065] For the current drone u in the assignment sequence, its state vector and global context vector C are fused through a small neural network to generate a query vector q for the current decision step.
[0066] Scoring and Masking: Use q to calculate attention scores for all task features output by the encoder. For tasks marked as assigned (value 0) in the mask, force their scores to a very large negative value (such as negative infinity) to ensure that they are excluded in subsequent steps.
[0067] Probabilistic selection: Apply the Softmax function to the scores of the remaining tasks (mask value is 1) to convert them into a probability distribution. At this point, the task with the highest probability is the current optimal assignment choice.
[0068] Status update: Execute the assignment and update the mask value of the corresponding task to 0. At the same time, update the status of the drone u in the simulation logic (such as moving its virtual position to the task point and incrementing the load by 1).
[0069] Sequence progression: Shift the decision focus to the next drone.
[0070] Repeat the above steps to form a task assignment sequence until the loop ends.
[0071] In one embodiment, such as Figure 4 As shown, the objective function of the proximal policy optimization algorithm used to train the policy network is crucial to the stability of the PPO algorithm. In specific training: First, it is necessary to estimate the advantage function. It is used to measure the advantage of taking a specific action relative to the average strategy in a given state, and is usually calculated using the generalized advantage estimation method.
[0072] The core of PPO lies in limiting the step size of each policy update. It does this by calculating the probability ratio of choosing the same action under the same conditions with the old and new policies. To achieve this.
[0073] Its loss function is expressed by the formula: ; in, This represents the probability ratio between the current strategy and the old strategy. For the dominant function, This is the shear range coefficient.
[0074] In one embodiment, the typical features of the task requirement vector and the UAV state vector are defined. In this embodiment, the task requirement vector includes the task location coordinates, expected start time, expected end time, task priority, estimated execution time, and task value; the UAV state vector includes the UAV's current location coordinates, remaining battery power, maximum range, maximum payload capacity, and the number of tasks currently undertaken.
[0075] In one embodiment, a well-designed reward function is key to guiding the policy to learn correct behavior. In the simulation environment of this embodiment, the reward r is calculated at the end of each decision round and typically consists of a weighted sum of the following three parts: Task completion reward: For each successfully executed task, a positive reward is given. The reward value is usually positively correlated with the value of the task, encouraging the model to prioritize high-value tasks.
[0076] Penalties for violating constraints: This is crucial to ensuring the feasibility of the plan, including: Battery depletion penalty: A large negative reward is given when the drone runs out of power en route.
[0077] Task timeout penalty: If a task is completed later than its deadline, a penalty will be imposed according to the degree of timeout.
[0078] Overload penalty: A penalty is imposed if the tasks assigned to a drone exceed its maximum payload capacity.
[0079] Efficiency optimization rewards: These are used to guide strategies to pursue better system-level performance. For example, a reward that is negatively correlated with the total system task completion time can be given to encourage rapid response; or a reward that is negatively correlated with the total flight energy consumption / distance of the drone can be given to encourage energy-efficient path planning.
[0080] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially as indicated, these steps are not necessarily executed in the indicated order. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0081] Corresponding to the aforementioned embodiments of the multi-UAV system task allocation method, and employing the same technical concept, this application also provides embodiments of a multi-UAV system task allocation system.
[0082] In one exemplary embodiment, such as Figure 5 As shown, the multi-UAV system task allocation system includes: Input modeling module 1 is used to encode the original task information and UAV state information into a task requirement vector set and a UAV state vector set, respectively. Encoding module 2, connected to the input modeling module, is used to receive the task requirement vector set and the UAV state vector set, and extract high-dimensional joint feature representation through self-attention mechanism, cross-attention mechanism and gated residual fusion unit; The decoding and assignment module 3, connected to the encoding module, includes a Transformer decoder with an integrated gating unit and a pointer network; the Transformer decoder is used to decode the high-dimensional joint feature representation and generate a task assignment context vector; the pointer network is connected to the Transformer decoder and is used to generate a specific task assignment sequence based on the task assignment context vector; The policy training module 4 is connected to the encoding module and the decoding and assignment module, and is used to perform reinforcement learning training on the policy network composed of the encoding module and the decoding and assignment module based on the near-end policy optimization algorithm and through interaction with the environment simulator. The deployment execution module 5 is used to load the policy network model optimized by the policy training module and generate task allocation instructions based on the real-time input task and UAV status information.
[0083] In one embodiment, the multi-UAV system task allocation system includes the following five collaborative modules: Input Modeling Module 1: As the system data entry point, it connects the task management system and the UAV data link, and is responsible for executing step S101 to realize the vectorization encoding of the raw data.
[0084] Encoding module 2: It is carried by a high-performance computing unit to implement step S102. It has a built-in multi-layer feature encoder as described in claim 2 and is responsible for extracting high-dimensional joint feature representation.
[0085] Decoding and Assignment Module 3: Tightly coupled with the encoding module, it implements steps S103 and S104. This module sequentially includes a Transformer decoder with integrated gating units and a pointer network, responsible for generating the task assignment sequence.
[0086] Policy Training Module 4: This is an offline subsystem containing an environment simulator that simulates physical laws and a training engine that executes the PPO algorithm. It uses massive amounts of simulated data to jointly train the encoding module and the decoding and assignment module.
[0087] Deployment Execution Module 5: This is the core of online scheduling. It solidifies and loads the trained policy network parameters, periodically or in an event-driven manner calls the aforementioned modules, generates allocation instructions based on real-time input, and sends them to the drone swarm via the communication interface.
[0088] In one embodiment, the encoding module consists of L (e.g., L=6) identical encoding layers connected in series. Each layer contains three computational cores deployed in parallel. Task self-attention sublayer: Specifically handles the dependencies within the task feature matrix.
[0089] Drone Self-Attention Sublayer: Specifically handles the dependencies within the drone's state matrix.
[0090] Cross-attention sublayer: Specifically handles the interaction between the task and the drone's features.
[0091] The outputs of these three sub-layers are fed into a shared gated residual fusion unit for aggregation, then processed through layer normalization and a feedforward neural network to form the output of this layer, which serves as the input to the next layer. This hierarchical parallel processing structure greatly improves the depth and efficiency of feature extraction.
[0092] In one embodiment, the Transformer decoder in the decoding and assignment module is a modified Transformer decoder layer at its core. This layer includes a multi-head attention layer, a gating fusion module, and a residual connection and normalization layer, with the gating unit integrated in series in the multi-head attention layer.
[0093] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for task allocation in a multi-UAV system, characterized in that, include: Each task in the set of tasks to be assigned is encoded as a task requirement vector, forming a task requirement vector set. At the same time, each drone in the set of available drones is encoded as a drone state vector, forming a drone state vector set. The task requirement vector set and the UAV state vector set are input into the encoder. The self-attention mechanism in the encoder is used to model the internal dependencies between tasks and between UAVs, and the cross-attention mechanism is used to model the interaction dependencies between tasks and UAVs. The fused high-dimensional joint feature representation is output. The high-dimensional joint feature representation is input into the Transformer decoder with an integrated gating unit. The gating unit dynamically adjusts the output intensity of the multi-head attention mechanism in the decoder to generate a task allocation context vector containing the current global state information. The task allocation context vector is input into the pointer network, which calculates the matching probability of each UAV with all tasks to be assigned in turn, and selects the UAV to execute the task based on the matching probability to generate a task allocation sequence. Based on the near-end policy optimization algorithm, the reward signal obtained through interaction in the simulation environment is used to perform end-to-end reinforcement learning training on the policy network, which includes the encoder, the Transformer decoder, and the pointer network, in order to optimize the task allocation policy.
2. The task allocation method for a multi-UAV system as described in claim 1, characterized in that, The encoder has a multi-layer structure, and each layer includes the self-attention mechanism, the cross-attention mechanism, and a gated residual fusion unit. The gated residual fusion unit is used to perform weighted fusion of the output of the attention mechanism, and its calculation formula is as follows: ; in, This represents the Sigmoid activation function. For the gated weight matrix, This indicates element-wise multiplication.
3. The task allocation method for a multi-UAV system as described in claim 2, characterized in that, The gating unit acts on the output of each attention head of the multi-head attention mechanism in the form of a learnable parameter matrix, and adjusts the contribution intensity of each attention head through element-wise multiplication to achieve focusing on key mission features or key UAV state features.
4. The task allocation method for a multi-UAV system as described in claim 1, characterized in that, The pointer network performs the following operations for each unassigned drone: Using the fusion result of the UAV state and the task allocation context vector as the query vector, attention scores are applied to the encoded features of all tasks to be assigned, and the scores are converted into a probability distribution using the Softmax function. The task with the highest probability is then assigned to the UAV. After updating the system status, repeat this process until the task assignment is complete.
5. The task allocation method for a multi-UAV system as described in claim 1, characterized in that, The objective function of the near-end policy optimization algorithm is the cut-and-substitute objective function, and its loss function is expressed by the formula: ; in, This represents the probability ratio between the current strategy and the old strategy. For the dominant function, This is the shear range coefficient.
6. The task allocation method for a multi-UAV system as described in claim 1, characterized in that, The task requirement vector includes the task location coordinates, expected start time, expected end time, task priority, estimated execution time, and task value. The UAV state vector includes the UAV's current location coordinates, remaining battery power, maximum range, maximum payload capacity, and the number of tasks currently undertaken.
7. The task allocation method for a multi-UAV system as described in claim 1, characterized in that, The simulation environment calculates reward signals based on the task allocation results and the UAV's simulated execution, and the reward signals include: The reward for completing a task is positively correlated with the value of the successfully completed task. Constraints and penalties are used to negatively incentivize at least one of the following situations: drone battery depletion, mission timeout, and drone overload. Efficiency optimization rewards are used to guide strategies to shorten the total system task completion time or reduce the total flight energy consumption of drones.
8. A task allocation system for a multi-UAV system, characterized in that, include: The input modeling module is used to encode the raw task information and UAV state information into a task requirement vector set and a UAV state vector set, respectively. The encoding module, connected to the input modeling module, is used to receive the task requirement vector set and the UAV state vector set, and extract high-dimensional joint feature representations through self-attention mechanism, cross-attention mechanism and gated residual fusion unit; The decoding and assignment module, connected to the encoding module, includes a Transformer decoder with an integrated gating unit and a pointer network; the Transformer decoder is used to decode the high-dimensional joint feature representation and generate a task assignment context vector; the pointer network is connected to the Transformer decoder and is used to generate a specific task assignment sequence based on the task assignment context vector; The policy training module, connected to the encoding module and the decoding and assignment module, is used to perform reinforcement learning training on the policy network composed of the encoding module and the decoding and assignment module based on the near-end policy optimization algorithm and through interaction with the environment simulator. The deployment and execution module is used to load the policy network model optimized by the policy training module and generate task allocation instructions based on the real-time input task and UAV status information.
9. The multi-UAV system task allocation system as described in claim 8, characterized in that, The encoding module comprises multiple encoding layers connected in sequence. Each encoding layer includes: a task self-attention sub-layer for processing internal dependencies of the task, a drone self-attention sub-layer for processing internal dependencies of the drone, a cross-attention sub-layer for processing the interaction dependencies between the task and the drone, and a gated residual fusion unit for fusing the outputs of each attention sub-layer.
10. The multi-UAV system task allocation system as described in claim 8, characterized in that, The Transformer decoder in the decoding and assignment module includes a multi-head attention layer and a feedforward neural network layer. The gating unit acts on the output channel of the multi-head attention layer to dynamically adjust the information flow intensity of each channel.