Multi-robot task allocation method based on graph neural network and attention mechanism

By generating obstacle information vectors through graph neural networks and attention mechanisms, and combining them with reinforcement learning to optimize task allocation, this approach addresses the problem of poor adaptability of existing methods in complex environments, achieving more efficient task completion and path planning.

CN121680075APending Publication Date: 2026-03-17HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511932553.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing deep learning-based multi-robot task allocation methods fail to adequately consider obstacle constraints in real-world scenarios, resulting in poor adaptability in complex environments.

Method used

A graph neural network and attention mechanism-based approach is used to generate information vectors of the robot, task points, and obstacles. The robot's task sequence is generated by synthesizing the information vectors through a global graph. Reinforcement learning algorithm is used to optimize task allocation, and obstacle information is taken into account to improve adaptability.

Benefits of technology

It shortens the task completion time and travel distance, and improves the adaptability and efficiency of multi-robot task allocation in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680075A_ABST
    Figure CN121680075A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-robot task allocation method based on a graph neural network and an attention mechanism, and belongs to the technical field of robots. The technical problem that in the prior art, obstacle constraints are not considered for solving the multi-robot task allocation problem, and therefore the actual scene adaptability of an existing method is poor is solved. Generating a corresponding robot information vector, a task point information vector and an obstacle comprehensive information vector from the position coordinates of the robot, the task point and the obstacle through a graph neural network and an attention mechanism; obtaining a global graph comprehensive information vector by using the three information vectors; and then inputting the robot node information vector and the global graph comprehensive information vector into a trained sequence generation model, and outputting a task sequence of each robot by the model. The method is mainly used for multi-robot task allocation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robots, and in particular to a multi-robot task allocation method based on a graph neural network and an attention mechanism. BACKGROUND

[0002] In complex scenarios such as industrial production, logistics transportation, field exploration, and rescue, how to reasonably allocate different target points to multiple robots is the core of ensuring efficient task completion, which is defined as the multi-robot task allocation problem (MRTA). The efficiency of the allocation scheme directly affects the overall execution efficiency and final effect of the task, and is a combinatorial optimization problem, which is usually an NP-hard problem.

[0003] With the development of deep learning technology, a new solution to the multi-robot task allocation problem is provided. Since the MRTA problem naturally designs a graph structure composed of robots, task points, and other elements, and the sequence relationship of task execution, graph neural networks and sequence modeling neural networks become the core model selection for this type of problem. However, existing deep learning-based research still has obvious shortcomings: most research focuses on the traveling salesman problem, vehicle routing, and other abstract combinatorial optimization scenarios, and does not fully consider the obstacle constraints and real conditions in actual MRTA tasks, resulting in poor adaptability of existing methods to actual scenarios. SUMMARY

[0004] In order to overcome the technical problem that the prior art does not consider obstacle constraints when solving the multi-robot task allocation problem, thereby making the actual scenario adaptability of existing methods poor, the present application provides a multi-robot task allocation method based on a graph neural network and an attention mechanism.

[0005] The present application is implemented by the following technical solutions:

[0006] A multi-robot task allocation method based on a graph neural network and an attention mechanism, comprising the following steps:

[0007] S1: Based on the position coordinates of the robots, task points, and obstacles, generate corresponding robot information vectors, task point information vectors, and obstacle comprehensive information vectors;

[0008] S2: Based on the robot information vectors, task point information vectors, and obstacle comprehensive information vectors, obtain a global graph comprehensive information vector;

[0009] S3: Input the robot information vectors and the global graph comprehensive information vector into a sequence generation model, and the model outputs the task sequence of each robot.

[0010] Furthermore, the robot information vector and the task point information vector are generated by embedding and encoding the position coordinates of the robot and the task point using a one-layer fully connected neural network.

[0011] The obstacle comprehensive information vector is obtained by embedding and encoding the position coordinates of each vertex of each obstacle using a one-layer fully connected neural network to generate the information vector of each vertex of the obstacle. Then, the average value of the information vectors of each vertex of the obstacle is taken to obtain the obstacle comprehensive information vector.

[0012] Furthermore, the formula for obtaining the global graph comprehensive information vector described in S2 is as follows:

[0013] ,

[0014] ,

[0015] ,

[0016] In the formula, This represents a fully connected neural network. This represents the multi-head attention mechanism; Indicates batch normalization; This represents the total number of obstacle nodes; Indicates the first In a layered network, the first Vectors of obstacle nodes; Indicates in In a layered network, the first Vectors of obstacle nodes; ; ; This represents the total number of state nodes; For state nodes, representing robot nodes or task point nodes; ; Indicates the first The first to the second layer of the network A vector of state nodes; Indicates the first In the layer network The vector of the nth state node in the 0th layer of the network. The vector of each state node is either a robot information vector or a task point information vector. Indicates the first In the layer network A vector of state nodes; Indicates the process The first layer of graph neural network after processing A vector of state nodes; This represents the comprehensive information vector of the global graph.

[0017] Furthermore, S3 includes the following steps:

[0018] S31: The sequence generation model randomly selects a robot node corresponding to a robot information vector from the robot information vector as the current node, and writes the sequence number of the current robot node in the state node into the first position of the node sequence; at the same time, it sets the mask of the current robot node to true.

[0019] S32: Iterate through all state nodes except the current robot node, and output the node sequence after the iteration is complete; perform the following operations during each iteration:

[0020] (1) The robot information vector or task point information vector corresponding to the current state node is concatenated with the global graph comprehensive information vector to obtain the concatenated vector;

[0021] (2) Perform mutual attention calculation on the concatenated vector and the information vectors corresponding to all state nodes to obtain the current state node vector; when performing mutual attention calculation, mask the vectors of state nodes with a mask value of true;

[0022] (3) Calculate the correlation between the vector of the current state node and the vectors of the other state nodes that are not covered by the mask, and perform normalization on the correlation results to obtain the selection probability distribution corresponding to the state node with a mask value of false.

[0023] (4) From the selection probability distribution, select the state node with the largest probability value as the current node for the next traversal; append the corresponding index of the node in the state node to the node sequence, and set the mask at the node to true.

[0024] (5) Repeat (1)-(4) until all state nodes have been traversed;

[0025] S33: Divide the node sequence to obtain the task sequence of each robot.

[0026] Furthermore, the method for segmenting the node sequence includes: when a task node is subsequently connected to a robot node in the node sequence, the connection between the task node and the robot node is severed, resulting in multiple sequences, each of which begins with a robot node, i.e., a task sequence of a single robot.

[0027] Furthermore, the sequence generation model is trained and optimized using a reinforcement learning algorithm.

[0028] Furthermore, the reinforcement learning algorithm is the gradient algorithm REINFORCE.

[0029] Furthermore, the training process of the sequence generation model includes:

[0030] Execute S1 and S2 in sequence, and then perform the following steps:

[0031] S001: Randomly select a robot node as the current node, set the probability of the current node to 1, and write it to the first position of the probability sequence; obtain the index of the current robot information vector in the state node; and set the mask of the current robot node to true.

[0032] S002: Iterate through all state nodes except the current robot node, obtaining the node sequence and probability sequence after each iteration. Perform the following operations during each iteration:

[0033] (1) The robot information vector or task point information vector corresponding to the current state node is concatenated with the global graph comprehensive information vector to obtain the concatenated vector;

[0034] (2) Perform mutual attention calculation on the concatenated vector and the information vectors corresponding to all state nodes to obtain the current state node vector; when performing mutual attention calculation, mask the vectors of state nodes with a mask value of true;

[0035] (3) Calculate the correlation between the vector of the current state node and the vectors of the other state nodes that are not covered by the mask, and perform normalization on the correlation results to obtain the selection probability distribution corresponding to the state node with a mask value of false.

[0036] (4) Perform probability sampling on the selected probability distribution to obtain the node to be traversed next, and append the node's number and probability in the state node to the node sequence and probability sequence respectively, while setting the mask at the node to true;

[0037] (5) Repeat (1)-(4) until all state nodes have been traversed;

[0038] S003: Update the loss function based on the node sequence and probability sequence. Further, the formula for the loss function is:

[0039] ,

[0040] In the formula, Represents a sequence of nodes. Represents a probability sequence. Indicates the sequence of nodes The Middle The state node to the _th The distance between each state node. This indicates that the first step is selected during the decoding process. The probability of each state node.

[0041] Furthermore, the normalization in S32 (3) and S002 (3) both use the softmax function.

[0042] The beneficial effects of this invention are:

[0043] This invention utilizes graph neural networks and attention mechanisms to generate corresponding robot information vectors, task point information vectors, and obstacle comprehensive information vectors based on the position coordinates of the robot, task points, and obstacles. These three information vectors are then used to obtain a global graph comprehensive information vector. The robot node information vectors and the global graph comprehensive information vector are then input into a trained sequence generation model, which outputs the task sequences for each robot. By explicitly introducing obstacle comprehensive information, the invention shortens task completion time and travel distance, thereby improving adaptability to real-world scenarios. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0045] Figure 1 This is a schematic diagram comparing the optimization indicators of an embodiment of the present invention with those of existing methods;

[0046] Figure 2 This is a schematic diagram comparing the trajectory generated by an embodiment of the present invention with that generated by an existing method;

[0047] Figure 3 This is a schematic diagram of an encoder structure according to an embodiment of the present invention;

[0048] Figure 4 This is a pseudocode diagram illustrating the generation of a robot task sequence in one embodiment of the present invention. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Specific Implementation Method 1

[0051] Step S100: Based on the position coordinates of the robot, task point, and obstacles, generate corresponding robot information vectors, task point information vectors, and obstacle comprehensive information vectors. This specifically includes the following steps:

[0052] refer to Figure 3 The input section contains multiple blue and green circles and red polygons. Blue circles represent robots, green circles represent task points, and red polygons represent obstacles.

[0053] Obtain the position coordinates of each vertex of the robot, task point, and obstacle; map the coordinates to the 0-1 interval and complete the normalization preprocessing operation.

[0054] Using the position coordinates of each vertex of the robot, task point, and obstacle as input features, the corresponding robot information vector, task point information vector, and obstacle comprehensive information vector are obtained, with reference to... Figure 3 The embedding part includes the following steps:

[0055] (1) For the robot and the task point:

[0056] A single-layer fully connected neural network is used to embed and encode the position coordinates of the robot and task points, generating robot node information vectors and task point information vectors, as shown in the formula:

[0057] ,

[0058] In the formula, For state nodes, representing robot nodes or task point nodes; Indicates the sequence number of the state node; Indicates the first Status nodes Input features; This indicates the 0th layer of the neural network. A vector of state nodes; This represents a fully connected neural network layer. The input features are the robot's position coordinates or the position coordinates of the task point.

[0059] It should be noted that although the state nodes include robot nodes and task nodes, each state node has its own identifiable type information, that is, it is possible to determine whether a certain state node belongs to a robot node or a task node.

[0060] (2) For obstacles:

[0061] Each polygonal obstacle is abstracted as a subgraph, and the vertices of the obstacles are abstracted as subgraph nodes. Then, subgraph structure embedding encoding is used. Specifically, a fully connected neural network layer is used to embed and encode the coordinates of each vertex of each obstacle, generating an information vector for each vertex of the obstacle. The formula is as follows:

[0062] ,

[0063] In the formula, Indicates the first The first obstacle The position coordinates of each vertex; Indicates the first The first obstacle The information vector of each vertex in the 0th layer of the neural network.

[0064] Then, the information vectors of each vertex of the obstacle are averaged to obtain a comprehensive information vector. The formula for averaging includes:

[0065] ,

[0066] ,

[0067] In the formula, This represents the multi-head attention mechanism; Indicates batch normalization; , This indicates the number of layers in the subgraph neural network. ; This represents the number of vertices of a polygonal obstacle. Indicates the first The first of the polygonal obstacles The vertex at the th Vectors in a multilayer neural network; Indicates the first The first polygonal obstacle The vertex at the th Vectors in a multilayer neural network; Indicates the first The first polygonal obstacle The vertex at the th Vectors in a multilayer neural network; express Indicates the first The first polygonal obstacle The vertex at the th Vectors in a multilayer neural network; Indicates the first A comprehensive information vector of polygonal obstacles.

[0068] Step S200: Based on the robot information vector, task point information vector, and obstacle integrated information vector, obtain the global graph integrated information vector, referencing... Figure 3 The CAG and Average parts, for those containing The execution steps within the CrossAttention Graph (CAG) module of a layered graph neural network include:

[0069] First, the comprehensive information vectors of all polygonal obstacles in the current layer network are mapped to a set of obstacle nodes, which is then fed into the first multi-head attention mechanism module. Self-attention calculation is performed on the obstacle nodes, and the aggregated obstacle node features are output. After normalization of the obstacle node features, they are processed by a feedforward neural network and a residual neural network to obtain the first obstacle node in the next layer network. A vector of obstacle nodes.

[0070] Then, the robot information vector and task point information vector corresponding to the state node are mapped to a set of state nodes. The set of state nodes and the set of obstacle nodes are fed into the second multi-head attention mechanism module. For any node that belongs to the state node, attention calculation is performed on all robot nodes, task point nodes, and obstacle nodes, and the state node features after global perception are output. After normalizing the state node features, they are processed by the feedforward neural network and the residual neural network to obtain the next layer. A vector of state nodes.

[0071] when After all layers of the graph neural network have been executed, the mean vector of the state nodes is calculated to obtain the global graph comprehensive information vector. The formula is:

[0072] ,

[0073] ,

[0074] ,

[0075] In the formula, This represents a fully connected neural network. This represents the multi-head attention mechanism; Indicates batch normalization; This represents the total number of obstacle nodes; Indicates the first In a layered network, the first Vectors of obstacle nodes; Indicates in In a layered network, the first Vectors of obstacle nodes; ; ; This represents the total number of state nodes; For state nodes, representing robot nodes or task point nodes; ; Indicates the first The first to the second layer of the network A vector of state nodes; Indicates the first In the layer network The vector of the nth state node, in the 0th layer network (input node) The vector of each state node is either a robot information vector or a task point information vector. Indicates the first In the layer network A vector of state nodes; Indicates the process The first layer of graph neural network after processing A vector of state nodes; This represents the comprehensive information vector of the global graph.

[0076] In summary, steps S100-S200 embed and encode the robot's position coordinates and task point position coordinates using a single fully connected neural network to obtain robot information vectors and task point information vectors. Obstacles are represented using polygons, with each obstacle considered a subgraph and each obstacle's vertex considered a subgraph node. Subgraph structure embedding and encoding are then used to obtain the corresponding obstacle information vectors. A graph neural network with multi-head attention is then used to process the robot information vector, task point information vector, and obstacle information vector. These three information vectors are integrated using a feedforward application network and a residual neural network. The average of the integrated information vectors from the robot node and task point node is then calculated to obtain the global graph comprehensive information vector.

[0077] Step S300: Combine the robot node information vector obtained in step S100 and the global graph integrated information vector obtained in step S200. The input sequence generates a model, and the model outputs the task sequence for each robot. The specific steps include:

[0078] Step S301: The sequence generation model randomly selects a robot node corresponding to the robot information vector from the robot information vector as the current node, and writes the sequence number of the current robot node in the state node into the first position of the node sequence; at the same time, it sets the mask of the current robot node to true.

[0079] Step S302: Iterate through all state nodes except the current robot node, and output the node sequence after the iteration is complete. Perform the following operations during each iteration:

[0080] (1) The robot information vector or task point information vector corresponding to the current state node is concatenated with the global graph comprehensive information vector to obtain the concatenated vector;

[0081] (2) Perform mutual attention calculation on the concatenated vector and the information vectors corresponding to all state nodes to obtain the current state node vector; when performing mutual attention calculation, mask the vectors of state nodes with a mask value of true;

[0082] (3) Calculate the correlation between the vector of the current state node and the vectors of the other state nodes that are not covered by the mask, and perform normalization on the correlation results to obtain the selection probability distribution corresponding to the state node with a mask value of false.

[0083] (4) From the selection probability distribution, select the state node with the largest probability value as the current node for the next traversal; append the corresponding index of the node in the state node to the node sequence, and set the mask at the node to true.

[0084] (5) Repeat (1)-(4) until all state nodes have been traversed;

[0085] Step S303: Segment the node sequence as follows:

[0086] When the node sequence The process involves connecting a task node to a robot node, severing the connection between the task node and the robot node, and splitting the sequence into multiple sequences, each starting with a robot node, representing a single robot's task sequence.

[0087] The inventors of this application have discovered that although deep learning methods can find relatively good suboptimal solutions within an acceptable timeframe, they still face challenges in training data labeling. For large-scale problems, exhaustive search to obtain the global optimum is computationally infeasible, while labeled data generated by heuristic algorithms may lead the model to learn suboptimal solutions rather than optimal ones, thus affecting its generalization performance. Therefore, the method of this invention does not employ supervised learning that requires labeled data, but instead uses reinforcement learning that does not require labeled data.

[0088] In this implementation, a neural network is deployed during the robot task allocation process to generate the optimal task sequence. Once the task sequence is determined, the robot executes the task using traditional path planning and trajectory tracking algorithms. These traditional control algorithms fully consider kinematic constraints to ensure the physical feasibility of task execution. Therefore, the reinforcement learning feedback signal originates from the robot's actual execution process; that is, the task allocation algorithm is optimized backward through the reward generated during execution, unlike existing machine learning methods that commonly use Euclidean distance between nodes as feedback.

[0089] The data generation method used in this implementation during the training phase is as follows:

[0090] In one On a normalized unit plane of a given size, robot nodes, task nodes, and polygonal obstacles are randomly generated in a uniform distribution, ensuring that robot nodes and task nodes do not fall within the polygons of the obstacles. The number of robot nodes, task nodes, and obstacles varies within the required range to construct problem scenarios of different scales, and batch_size instances are generated for each scale for batch training.

[0091] The method of this invention uses the gradient algorithm REINFORCE for reinforcement learning training, and the hyperparameter settings are shown in Table 1:

[0092] Table 1

[0093]

[0094] The training process of the sequence generation model used in the method of this invention sequentially executes the above steps S100 and S200, and then performs the following steps, refer to... Figure 4 :

[0095] Step S001: Randomly select a robot node as the current node, set the probability of the current node to 1, and write it to the first position of the probability sequence; and obtain the index of the current robot information vector in the state node; at the same time, set the mask of the current robot node to true.

[0096] Step S002: Iterate through all state nodes except the current robot node in sequence. After the iteration is complete, the node sequence is obtained. and probability sequence Perform the following operations during each iteration:

[0097] (1) Transfer the information vector corresponding to the current state node Combined with global graph information vector Concatenate to obtain the concatenated vector. .

[0098] (2) The spliced ​​vector Perform mutual attention calculations on the information vectors corresponding to all state nodes to obtain the current state node vector. When performing mutual attention calculations, the state node vectors corresponding to state nodes with a mask value of true are masked.

[0099] (3) Calculate the current state node vector The correlation with the information vectors of other state nodes not covered by the mask is normalized to obtain the selection probability distribution corresponding to the state node with a mask value of false.

[0100] (4) Perform probability sampling on the selection probability distribution to obtain the node to be traversed next, and append the node's number and probability in the state node to the node sequence. and probability sequence At the same time, the mask at that node is set to true.

[0101] (5) Repeat (1)-(4) until all state nodes have been traversed.

[0102] Step S003: Based on the node sequence and probability sequence Then update the loss function. The formula for the loss function is:

[0103] ,

[0104] In the formula, Indicates the sequence of nodes The Middle The state node to the _th The distance between each state node is calculated in the simulation environment using path planning and trajectory tracking algorithms. This indicates that the first step is selected during the decoding process. The probability of each state node.

[0105] Example

[0106] To verify the beneficial effects of the method of the present invention, the following comparative experiments were conducted with other existing methods at different problem scales:

[0107] This experiment uses computation time and total driving distance as evaluation metrics. The selected comparison methods include: Greedy algorithm, Genetic algorithm (GA), and attention method for combinatorial optimization problems (CO-AM).

[0108] Greedy algorithms are online algorithms that first use... The algorithm calculates the shortest distance between all robots and all task points in each step, then selects the robot-task pair with the shortest distance to complete the assignment, and updates the position of the corresponding robot synchronously. The above process is repeated until all task points are assigned.

[0109] Genetic algorithms are evolutionary algorithms that simulate the biological evolution process, aiming to gradually optimize task allocation. In this experiment, the population size of the genetic algorithm was set to 50, the number of iterations was set to 500, and bubble sort was used for population selection.

[0110] Attention-based methods for combinatorial optimization problems utilize attention mechanisms to solve path planning-type combinatorial optimization problems. Since multi-robot task allocation problems can be viewed as combinatorial and optimization problems of the path planning class, this method is used as one of the comparison methods. In this experiment, the attention method for the original combinatorial optimization problem is adjusted by introducing obstacle vertex information into the attention mechanism: a fully connected neural network is used for all obstacle vertices, and their features are averaged to account for the impact of obstacles on path planning. This adapts the method to the problem scenario of this experiment. The attention method for combinatorial optimization problems maintains consistency with the method of this invention in terms of training scale, hyperparameter settings, and hardware environment.

[0111] The experimental data consists of 1024 batches of datasets, each containing 256 map data samples. Each data sample includes normalized coordinates of the robot, task points, polygon obstacle vertices, and an adjacency matrix used only during testing. The algorithm calculates it.

[0112] The test dataset is randomly generated according to different problem sizes, and the number of robots varies. Set the number of tasks to 2, 4, 6, or 8. Set the number of obstacles to 5, 10, 15, or 20. Set to 5, 10, 15, 20; each scale corresponds to generating 100 test instances.

[0113] The test data is generated in the same way as the training data, but with a different random seed. Specifically, the robot's initial position, task point, and center point of the polygonal obstacle are all generated randomly through uniform distribution to ensure that the robot's initial position and task point are not located inside the polygonal obstacle. In addition, some test scales are set to exceed the range of the training set to evaluate the model's generalization ability.

[0114] The above three comparison methods and the method of this invention (GA) were all tested on a server configured with an Intel(R) Xeon(R) Platinum8357B CPU. The test results are shown in Table 2:

[0115] Table 2

[0116]

[0117] To more intuitively demonstrate the task allocation effects of the four methods, a test instance was randomly selected, and the problem size of this instance was set to [missing information]. , , The task allocation path for each method is plotted. The specific process is as follows: each task allocation algorithm first outputs the task execution sequence for each robot, and then... The algorithm calculates the robot's travel path and finally plots the results on a map, such as... Figure 2 As shown.

[0118] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

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

Claims

1. A multi-robot task allocation method based on a graph neural network and an attention mechanism, characterized in that, The method comprises the following steps: S1: generating a corresponding robot information vector, a task point information vector, and an obstacle comprehensive information vector based on the position coordinates of the robot, the task point, and the obstacle; S2: obtaining a global graph comprehensive information vector based on the robot information vector, the task point information vector, and the obstacle comprehensive information vector; S3: inputting the robot information vector and the global graph comprehensive information vector into a sequence generation model, and outputting a task sequence of each robot by the model.

2. The multi-robot task allocation method based on a graph neural network and an attention mechanism according to claim 1, characterized in that, The robot information vector and the task point information vector are respectively embedded and encoded by using a one-layer fully connected neural network to generate the position coordinates of the robot and the task point; The obstacle comprehensive information vector is embedded and encoded by using a one-layer fully connected neural network to generate the position coordinates of each vertex of the obstacle, and then the information vectors of the vertices of the obstacle are averaged to obtain the obstacle comprehensive information vector.

3. The multi-robot task allocation method based on graph neural network and attention mechanism according to claim 2, characterized in that, The formula for obtaining the global graph comprehensive information vector in S2 is as follows: , , , In the formula, This represents a fully connected neural network. This represents the multi-head attention mechanism; Indicates batch normalization; This represents the total number of obstacle nodes; Indicates the first In a layered network, the first Vectors of obstacle nodes; Indicates in In a layered network, the first Vectors of obstacle nodes; ; ; This represents the total number of state nodes; For state nodes, representing robot nodes or task point nodes; ; Indicates the first The first to the second layer of the network A vector of state nodes; Indicates the first In the layer network The vector of the nth state node in the 0th layer of the network. The vector of each state node is either a robot information vector or a task point information vector. Indicates the first In the layer network A vector of state nodes; Indicates the process The first layer of graph neural network after processing A vector of state nodes; This represents the comprehensive information vector of the global graph.

4. The multi-robot task allocation method based on a graph neural network and an attention mechanism according to claim 3, characterized in that, S3 comprises the following steps: S31: the sequence generation model randomly selects a robot node corresponding to a robot information vector in the robot information vector as a current node, and writes the sequence number corresponding to the current robot node in the state node at the beginning of the node sequence; meanwhile, the mask of the current robot node is set to true; S32: sequentially traversing other state nodes except the current robot node, and outputting the node sequence after the traversal; the following operations are performed each time the traversal is performed: (1) concatenating the robot information vector or the task point information vector corresponding to the current state node with the global graph comprehensive information vector to obtain a concatenated vector; (2) performing mutual attention calculation on the concatenated vector and the information vectors corresponding to all state nodes to obtain a current state node vector; when performing the mutual attention calculation, the vector of the state node with the mask value true is shielded; (3) calculating the correlation between the vector of the current state node and the vectors of the remaining state nodes that are not covered by the mask, and performing normalization processing on the correlation result to obtain a selection probability distribution corresponding to the state node with the mask value false; (4) selecting the state node with the maximum probability value from the selection probability distribution as the current node for the next traversal; the sequence number corresponding to the node in the state node is appended to the node sequence, and the mask at the node is set to true; (5) repeating (1)-(4) until the traversal of all state nodes is completed; S33: cutting the node sequence to obtain a task sequence of each robot.

5. The multi-robot task allocation method based on graph neural network and attention mechanism according to claim 4, characterized in that, The method for cutting the node sequence comprises the following steps: when a task point node is connected to a robot node in the node sequence, cutting the connection between the task point node and the robot node, and splitting to obtain multiple sequences, and each sequence starts with a robot node, i.e., a task sequence of a single robot.

6. The multi-robot task allocation method based on graph neural network and attention mechanism according to claim 5, characterized in that, The sequence generation model is trained and optimized by using a reinforcement learning algorithm.

7. The multi-robot task allocation method based on a graph neural network and an attention mechanism according to claim 6, characterized in that, The reinforcement learning algorithm is a gradient algorithm REINFORCE.

8. The multi-robot task allocation method based on a graph neural network and an attention mechanism according to claim 7, characterized in that, The training process of the sequence generation model comprises the following steps: sequentially performing the above S1 and S2, and then performing the following steps: S001: randomly select a robot node as the current node, set the probability of the current node to 1, write the first probability sequence; and obtain the corresponding sequence number of the current robot information vector in the state node; at the same time, set the mask of the current robot node to true; S002: traverse the other state nodes except the current robot node in turn, and obtain the node sequence and the probability sequence after the traversal; the following operations are performed each time: (1) the robot information vector or the task point information vector corresponding to the current state node is spliced with the global graph synthesis information vector to obtain a spliced vector; (2) the spliced vector is calculated with the information vector corresponding to all state nodes to obtain the current state node vector; when the mutual attention calculation is performed, the vector of the state node with the mask value true is shielded; (3) the correlation between the current state node vector and the vectors of the remaining state nodes not covered by the mask is calculated, and the correlation result is normalized to obtain the selection probability distribution corresponding to the state node with the mask value false; (4) probability sampling is performed on the selection probability distribution to obtain the node for the next traversal, and the number and probability of the node in the state node are written into the node sequence and the probability sequence respectively, and the mask at the node is set to true; (5) repeat (1)-(4) until all state nodes are traversed; S003: update the loss function based on the node sequence and the probability sequence.

9. The method of claim 8, wherein, The formula of the loss function is: , wherein denotes a sequence of nodes, denotes a sequence of probabilities, denotes a path between the th state node to the th state node in the sequence of nodes, denotes a path between the th state node to the th state node in the sequence of nodes.

10. The method of claim 9, wherein, The normalization in (3) of S32 and (3) of S002 both adopts a softmax function.