Unmanned aerial vehicle route planning method based on graph neural network
Through the drone route planning method based on graph neural network, the probability road map and graph attention network are used to achieve efficient and accurate route planning in complex urban environments, and the problems of high computational complexity or insufficient accuracy in the prior art are solved.
Patent Information
- Application Number
- CN202411915868.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-24
AI Technical Summary
When dealing with complex urban environments, existing drone route planning algorithms are difficult to balance the accuracy of search efficiency and solutions, resulting in high computational complexity or insufficient accuracy.
The unmanned aerial vehicle route planning method based on graph neural network is adopted to generate an undirected graph of the target area through the probability road map, and a graph attention network with an encoder-decoder structure is used to select paths to ensure the safety and consistency of the paths.
It realizes efficient and accurate route planning in complex urban environments, improves search efficiency and ensures the safety and coherence of the paths.
Smart Images

Figure CN119714284A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of unmanned aerial vehicle (UAV) route planning, and more specifically, relates to a UAV route planning method based on graph neural network. Background Art
[0002] With the rise of the concept of Urban Air Mobility (UAM), the application scenarios of drones in cities have become more and more extensive, covering multiple fields such as cargo transportation, emergency rescue, environmental monitoring, and urban patrols. In order to cope with the traffic congestion and environmental pressure brought about by the accelerated urbanization process, UAM, as an emerging transportation mode, has shown great potential to solve ground traffic bottlenecks and improve transportation efficiency. As a key technology to achieve the safety and efficiency of UAM, drone route planning has become one of the hot spots and difficulties in research. Among them, the "high-efficiency service and low-cost loss" brought by a reasonable route planning scheme is a reflection of its enhanced core competitiveness. Therefore, with the reform and innovation of information technology, in order to promote the development of urban air transportation, how to design a more efficient drone route planning is a problem that needs to be solved urgently.
[0003] Currently, precise and heuristic algorithms are usually used to solve route planning problems. Although precise algorithms such as dynamic programming and integer linear programming can provide optimal solutions under certain constraints, their computational complexity is relatively high, especially when dealing with large-scale problems, which often require a long computing time. Heuristic algorithms such as genetic algorithms and particle swarm optimization algorithms usually reduce solution accuracy in exchange for computational efficiency, and their effectiveness is still limited when facing dynamic changes or uncertain environments. Therefore, how to strike a balance between search efficiency and solution accuracy has always been the core challenge faced by traditional algorithms. Summary of the invention
[0004] In response to the above defects or improvement needs of the prior art, the present invention provides a UAV route planning method based on graph neural network, which can achieve efficient and accurate route planning in target areas, such as complex urban environments.
[0005] To achieve the above object, according to a first aspect of the present invention, a UAV route planning method based on a graph neural network is provided, comprising:
[0006] S1, using the probabilistic roadmap method to generate an undirected graph G = (V, E) of the target area;
[0007] Where V is the node set, V = {q1, q2, ..., q N}, E is the edge set, E={e ij |i≠j,e ij=1}, N is the number of nodes, and each node is located in the free space of the target area;
[0008] S2, input G into the trained graph attention network to obtain the route path of the UAV in the target area;
[0009] Wherein, the graph attention network includes an encoder and a decoder;
[0010] The encoder includes an input layer and M layers of multi-head attention mechanism layers connected in sequence, wherein the input layer is used to i The two-dimensional coordinate x i Perform initial embedding to obtain After passing through the M layers of multi-head attention mechanism connected in sequence, it is updated to
[0011] is node q i The query vector is is node q j The key vector of is node q j The value vector of d key yes The dimension of j∈N(i) is q i The set of adjacent nodes, g = 1, 2, ..., H, l = 1, 2, ..., M, i = 1, 2, ..., N, H is the number of attention heads in each layer of the multi-head attention mechanism, b x , W x , W′, W Q , W K , W V All are learnable weight parameters;
[0012] The decoder includes a single-head attention mechanism layer for k Contextual embedding Embedded with nodes From π k Select the next path point π from the adjacent nodes k+1 , until the complete path sequence π=(π0,π1,…,π m ),π0 is q1;π k+1 The probability of selection is the query vector, is the key vector, K k The dimension of is π k-1 Node embedding, is the embedding of the entire undirected graph, u context,rThe definition of is similar, N(k) is π k The set of adjacent nodes, W Q ′ is a learnable weight parameter, k=0,1,2,…,m.
[0013] According to a second aspect of the present invention, there is provided an electronic device, comprising: a computer-readable storage medium and a processor;
[0014] The computer-readable storage medium is used to store executable instructions;
[0015] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method as described in the first aspect.
[0016] According to a third aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute the method as described in the first aspect.
[0017] According to a fourth aspect of the present invention, there is provided a computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the method according to the first aspect is implemented.
[0018] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0019] The method provided by the present invention uses a probabilistic route map to generate nodes and edges by random sampling in the target area, considers the safe distance from the building, simplifies the complex map structure, converts the continuous space into a discrete space, and then selects the path node on the path network graph, solves the problem of low search efficiency in complex space, and ensures the safety of the drone during flight; and, in the encoder-decoder structure graph attention network proposed by the present invention, the encoder uses the attention mechanism to extract features from the obtained probabilistic route map, assigns different weights to the nodes through the self-attention mechanism, and emphasizes the influence of the key nodes related to the path and their neighbors; the decoder uses the node features extracted by the encoder and the context node embedding and other information to guide the node selection, and finally forms the optimal path. Through network training, the network can learn effective path planning strategies in complex environments, so that the flight path can be obtained quickly and accurately during online planning.
[0020] As a preferred solution, in the method provided by the present invention, during the path generation process, the decoder uses a mask mechanism to avoid repeated node access and limit message transmission between adjacent nodes, thereby ensuring the rationality and consistency of the path.
[0021] As a preferred solution, the method provided by the present invention uses a B-spline curve to optimize the path generated by the graph attention network. Its smoothness avoids sharp turns, improves flight stability, reduces fuel consumption, and optimizes overall capacity utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of a flow chart of a method for UAV route planning based on a graph neural network provided in an embodiment of the present invention;
[0023] Figure 2 A flowchart of constructing an undirected graph of a target area based on a probabilistic roadmap method provided in an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of graph neural network training provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0026] Deep learning algorithms can autonomously learn and optimize path planning solutions by simulating flight path data in complex environments, and have shown significant advantages in solving UAV path planning problems. This type of method uses the powerful learning ability of neural networks to train models with large-scale data, thereby quickly and efficiently solving complex route planning problems. Especially when dealing with diverse and dynamically changing urban environments, deep learning algorithms can achieve more timely and flexible path planning than traditional methods.
[0027] Based on this, an embodiment of the present invention provides a UAV route planning method based on a graph neural network, such as Figure 1 As shown, including:
[0028] S1, using the probabilistic roadmap method to generate an undirected graph G = (V, E) of the target area;
[0029] Where V is the node set, V = {q1, q2, ..., q N}, E is the edge set, E={e ij |i≠j,e ij =1}, N is the number of nodes, and each node is located in the free space of the target area.
[0030] Specifically, the building obstacle information of the target area is obtained, and a two-dimensional plane map containing the obstacle information is simplified and generated; then, nodes are randomly generated in the feasible area based on the probabilistic roadmap method, and an undirected graph is established. The undirected graph ensures the connectivity and security of the path map by detecting whether the edges and obstacles collide.
[0031] Taking the target area as an urban area as an example, for the planned urban area, obtain the urban building obstacle information, simplify the two-dimensional plane map containing obstacle information (that is, the environment map containing obstacle information), and construct an undirected graph based on the probabilistic roadmap method, such as Figure 2 As shown in the figure, nodes are randomly sampled and generated in the feasible area to ensure that these nodes avoid obstacles. Then undirected edges are established between the nodes, and it is detected whether the edges and obstacles intersect to ensure connectivity and safety. Finally, the undirected graph constructed represents a traversable path.
[0032] By randomly sampling N nodes in the target area, and using the K nearest neighbor algorithm to connect adjacent nodes, edges are generated while ensuring that the path does not intersect with obstacles. Finally, an undirected graph G = (V, E) is obtained, where V represents the node set V = {q1, q2, ..., q N}, E represents the edge set E = {e ij |i≠j,e ij =1}.
[0033] Specifically, the target urban area is first planned, and the information of urban obstacles in the area is obtained, and then simplified on this basis. During the flight, it is assumed that the flight altitude of the drone remains unchanged, so the movement of the drone in three-dimensional space can be simplified to movement in a two-dimensional plane. Therefore, a two-dimensional plane map containing obstacle information can be obtained according to the planned urban area, that is, the configurable space of the probabilistic roadmap algorithm (PRM). The PRM method generates a path map by randomly sampling in the configuration space, discretizing the continuous space into a series of nodes and their connected edges, thereby converting it into a graph search problem that is easier to solve. The configurable space can be divided into free space and obstacle space. The free space represents the area where the drone can fly safely, and the obstacle space contains obstacles such as buildings that need to be avoided in the flight path. Only nodes located in the free space are valid nodes.
[0034] Randomly sample and generate N nodes q1, q2, ..., q in the configuration space N , where q i ∈C freeIndicates that the node is located in free space. The selection process of these nodes is carried out through multiple random sampling to ensure uniform distribution, so that the path planning covers the entire feasible area. The position of each node is affected by the probability distribution and is also screened according to the safety requirements of its distance from obstacles to ensure that the drone can avoid obstacles such as buildings during flight.
[0035] For each sampling node q i , first use the K nearest neighbor algorithm to find the K nearest neighbors of the node The node distance is calculated using the Euclidean distance. After finding K neighboring nodes, we need to check the connectivity between these nodes. i and its neighbors Judging from q i arrive If the path does not cross any obstacles, then at q i and Create an edge between Indicates that they are connected, and the formula is as follows:
[0036]
[0037] in, Represents node q i and connectivity, Indicates that from q i arrive The straight line segment.
[0038] After checking the connectivity between nodes, these nodes and edges are combined into an undirected graph G = (V, E), where V represents the node set V = {q1, q2, ..., q N}, E represents the edge set E = {e ij |i≠j,e ij =1}. This undirected graph transforms the complex path planning problem into a graph search problem and also provides a structured data input format for the subsequent graph neural network algorithm.
[0039] S2, input G into the trained graph attention network to obtain the route path of the UAV in the target area;
[0040] Wherein, the graph attention network includes an encoder and a decoder;
[0041] The encoder includes an input layer and M layers of multi-head attention mechanism layers connected in sequence, wherein the input layer is used to i The two-dimensional coordinate x i Perform initial embedding to obtain After passing through the M layers of multi-head attention mechanism connected in sequence, it is updated to
[0042] is node q i The query vector is is node q j The key vector of is node q j The value vector of d key is the key vector The dimension of N(i) is q i The set of adjacent nodes, g = 1, 2, ..., H, l = 1, 2, ..., M, i = 1, 2, ... N, H is the number of attention heads in each multi-head attention mechanism layer, W ′, W Q ,W K ,W V is a learnable weight parameter;
[0043] The decoder includes a single-head attention mechanism layer for k Contextual embedding Embedded with nodes From π k Select the next path point π from the adjacent nodes k+1 , until the complete path sequence π=(π0,π1,…,π m ),π0 is q1;π k+1 The probability of selection is the query vector, is the key vector, K k The dimension of is π k-1 Node embedding, is the embedding of the entire undirected graph, u context,r The definition of is similar, N(k) is π k The set of adjacent nodes, W Q ′ is a learnable weight parameter, k=0,1,2,…,m.
[0044] In step S2, a graph attention network with an encoder-decoder structure is used to perform path selection on the undirected graph, and node features are extracted and node importance analysis is performed through the attention mechanism, so as to select appropriate nodes and edges to generate a safe and efficient flight path for the drone.
[0045] The graph attention network consists of an encoder and a decoder, wherein the encoder extracts information between nodes through a multi-layer attention mechanism and generates a high-dimensional embedding representation of nodes and graphs, and the decoder gradually selects the next node of the path through context information and the attention mechanism until a complete flight path is generated.
[0046] That is, the graph attention network is used to solve the path decision problem during the flight of the UAV. The route planning is modeled as a graph search problem. The graph attention network is designed as an encoder-decoder structure, in which the encoder is responsible for extracting the features of the nodes in the graph, and mainly uses the attention mechanism to realize the information transmission between adjacent nodes to ensure that the path selection meets the UAV flight requirements. When selecting the path, the decoder gradually selects the nodes on the path, outputs the complete path sequence, and obtains the flight route of the UAV.
[0047] (1) Encoder
[0048] The input of the encoder consists of nodes q i The two-dimensional coordinate x of (i∈[1,n]) i and the adjacency matrix A of the graph (used to confirm the adjacent nodes of any node). Initially, the node coordinates x i It will be embedded into a high-dimensional feature space. The specific formula is:
[0049]
[0050] in, Represents node q i The initial embedding, W x is the learnable weight matrix, b x is the bias term, b x and W x are all learnable parameters of the encoder. This embedding process transforms the two-dimensional coordinates of the node into a 128-dimensional feature vector.
[0051] In the encoder, the multi-layer attention mechanism layer allows each node to exchange information with its adjacent nodes. The node embedding of the current multi-head attention mechanism layer is updated through the query vector, key vector and value vector of the node calculated by the previous multi-head attention mechanism layer, and the priority of information transmission is determined according to the similarity of adjacent nodes. The higher the similarity, the higher the priority of information transmission.
[0052] That is, in the encoder, message passing is implemented through the multi-head attention mechanism of the M layer, which allows each node to exchange information with its neighboring nodes, thereby updating its feature representation and finally obtaining the node embedding representation Each attention head calculates and outputs independently, and then the outputs of each head are concatenated to obtain the node embedding representation of the multi-head attention mechanism layer. The specific formula is:
[0053] MultiHead(Q,K,V)=Concat(head1,head2,…,head H )W′
[0054]
[0055] Where W′ is the concatenated projection matrix, which is a learnable parameter of the encoder and can be obtained through training; Q, K, V represent query, key and value vectors respectively, H is the number of attention heads in each multi-head attention mechanism layer, and d key is the dimension of the key vector.
[0056] Define node q i Neighbor node q j The set of is N(i).
[0057] After l layers, node q i Embed is based on the neighbor node q j ∈N(i) is obtained by weighted summation of information, and its formula can be expressed as:
[0058]
[0059] The g-th attention head of the l-th multi-head attention mechanism layer can be expressed as:
[0060]
[0061] Attention Weight The calculation formula is as follows:
[0062]
[0063] in is node q i The query vector is is node q j The key vector of is node q j The value vector of d key is the dimension of the key vector, which is used to scale the result of the dot product. Through this attention mechanism, node q i According to the adjacent node q j The similarity is used to decide which nodes to receive information from and update their own embedding representation.
[0064] After M layers of attention and message passing, the encoder finally outputs the embedding representation of each node And the embedding of the entire graph The graph embedding is calculated by averaging the embeddings of all nodes:
[0065]
[0066] That is, through the graph convolution operations of several layers of the encoder, the node embedding is gradually updated using multi-layer attention operations, ultimately providing a high-dimensional feature representation for path selection.
[0067] (2) Decoder
[0068] The input to the decoder consists of the node embeddings generated by the encoder The decoder uses the context information to make path decisions. Including the embedding of the previous node, the current node and the embedding of the entire graph, which is used to guide the node selection of each step of the path to ensure the rationality and coherence of the generated path. For a certain path node, its context node embedding It consists of the following three parts:
[0069]
[0070] in is the embedding of the previous path node, is the embedding of the current path node, It is the embedding of the entire graph, representing the global information of the graph.
[0071] In the initial stage, the context node embedding combines the starting point embedding and the graph embedding, and this information is used to guide the decoder to select nodes. That is, in the initial state, the decoder takes the starting point as the current node, and its context node embedding is 0.
[0072] Based on the above information, the decoder calculates the probability distribution of selecting the next path node at the current moment through a single-head attention mechanism.
[0073] That is, the decoder includes a single-head attention mechanism layer, which is used to take q1 as the path starting point π0, select the next path point π1 from the set of adjacent nodes of q1 according to the context embedding and node embedding of q1, and then select the next path point π2 from the set of adjacent nodes of π1 according to the context embedding and node embedding of π1, until a complete path sequence π=(π0,π1,…,π m ).
[0074] π k The next node π k+1 The probability calculation process of the selection involves the similarity between the current context embedding and the current node embedding and its neighbor node embedding. The probability is calculated by the following formula:
[0075]
[0076] in, is the current path node π k Contextual embedding Embedded with nodes The similarity measure of for The generated query vector, W Q ′ is a learnable weight parameter, for The generated key vector, u context,r The definition of is similar, where non-adjacent nodes are set u through a mask mechanism (context)j =-∞. That is, by sampling with this probability, the current node π k In the set of adjacent nodes The largest node is the next path node π k+1 .
[0077] Next, the new context embeds By selecting the next node π k The embedding is updated so that it can reflect the real-time path state representation, thereby guiding the decoder to select the next optimal node. This node selection process continues until the decoder selects the terminal node, generating a complete path sequence π = (π0, π1, ..., π m ), the strategy p(π|s) of the entire path can be expressed as:
[0078]
[0079] Preferably, the decoder avoids repeated access to nodes by means of a masking mechanism and limits message transmission between adjacent nodes.
[0080] Specifically, the decoder adopts a mask mechanism to ensure that in the process of path node selection, nodes that have been traversed are no longer selected and disconnected nodes are skipped.
[0081] During the path generation process, the decoder uses a mask mechanism to ensure the rationality and coherence of the path. This mechanism has two main functions:
[0082] First, we need to prevent repeated node visits. At each step of the path, the decoder needs to ensure that nodes that have been traversed are no longer selected. To this end, the mask marks the nodes that have been visited and calculates the node similarity metric u. (context)j When , for nodes that have been visited, their values are set to negative infinity to prevent these nodes from being selected again. The formula can be expressed as:
[0083]
[0084] That is, this masking process can ensure that each node is visited only once in the path, preventing the generation of loops and invalid paths.
[0085] The second is to limit the message transmission between adjacent nodes. The mask will limit the scope of message transmission according to the adjacency matrix A to ensure that information is only transmitted between adjacent nodes. If two nodes are not adjacent, their corresponding similarity measure u (context)j It will also be masked to negative infinity. This allows disconnected nodes to be skipped when generating a path, ensuring the continuity of the path.
[0086] Preferably, the training method of the graph attention network of the encoder-decoder structure is to perform training by combining a defined path cost L(π) with a reinforcement learning method.
[0087] The path cost L(π) can be expressed as the sum of the distances between adjacent nodes of the resulting path π, that is, the path cost function is defined as the sum of the distances between each pair of adjacent nodes. The path π consists of the node sequence π = (π0, π1, ..., π m ) represents, m is the number of nodes in the path, where π k is the kth node on the path, and its path cost L(π) can be calculated as:
[0088]
[0089] Where d(π k ,π k+1 ) represents node π k and node,π k+1 The Euclidean distance between .
[0090] In order to minimize the path cost L(π), the parameters of the graph attention network are updated by minimizing the expected cost. The loss function during training is defined as:
[0091]
[0092] p θ (π|s) is the path strategy generated by the graph attention network, π is the path, s is the current state of the graph attention network, θ is the parameter set of the graph attention network, and E is the expectation.
[0093] Considering that the training samples of the graph attention network are unlabeled, a reinforcement learning algorithm is used to train it; among them, reinforcement learning algorithms such as the PPO algorithm and the DQN algorithm can be used.
[0094] Considering the computational efficiency, preferably, the REINFORCE algorithm is used to train the graph attention network. The algorithm is a reinforcement learning algorithm based on policy gradient, which has the advantages of being simple and easy to implement, unbiased gradient estimation, and lightweight structure.
[0095] To update the parameters θ of the graph attention network, the REINFORCE gradient estimator is used, combined with the baseline b(s) to reduce the variance of the gradient, as follows:
[0096]
[0097] Where b(s) is a baseline function used to reduce the variance in the gradient estimate. The specific baseline b(s) is defined by exponential moving average:
[0098] b(s)=βR+(1-β)L(π)
[0099] At the initial moment, let R = L(π), and update it by weight β in subsequent iterations.
[0100] In order to optimize the loss function, the Adam optimizer is used to update the parameters of the graph attention network. Figure 3 As shown, the complete algorithm training process can be summarized into the following steps:
[0101] Step 1: Generate training data set: Generate a probabilistic roadmap G through a given two-dimensional plane map containing obstacle information, and randomly select the starting point and the end point to generate multiple sample data sets;
[0102] Step 2: Perform forward propagation, input sample data, and generate path strategy p through graph attention network θ (π|s), and use sampling decoding for path selection;
[0103] Step 3: Based on the selected path π, calculate the cost L(π) of the resulting path;
[0104] Step 4: Update baseline and gradient: Use REINFORCE to update the policy gradient and calculate the gradient of the parameters
[0105] Step 5: Parameter update: Use the Adam optimizer to update the parameters θ of the graph attention network according to the gradient.
[0106] Preferably, the method further comprises:
[0107] S3, using a B-spline curve method to smooth the route path.
[0108] Specifically, the B-spline curve method can provide a safer and more stable path planning solution for drones through its smoothness, local adjustability and high-order continuity, while also being able to handle complex dynamic constraints and environmental requirements. The B-spline curve is used to optimize the path output by the graph neural network, and the aircraft's turns are reduced through smooth and controllable curves, thereby smoothing the drone's flight path, optimizing the flight distance, reducing large turns during flight, and reducing fuel consumption.
[0109] A B-spline curve is composed of a series of control points {P0, P1, ..., P n} and a set of basis functions N i,p (u), its curve can be expressed as a linear combination of control points, and the formula can be expressed as:
[0110]
[0111] Where C(u) is the parameterized representation of the curve, and u is the curve parameter, which usually varies in the interval [0, 1]. i is the i-th control point, N i,p (u) is the control point P i The associated basis functions, p is the order of the B-spline curve.
[0112] Basis Function N in B-Spline Curve i,p (u) is defined recursively. The basis functions are defined based on a node vector U = {u0,u1,…,u m}, which determines the influence range of each control point. For high-order basis functions, the calculation formula is:
[0113]
[0114] In summary, the method provided by the present invention obtains the information of urban buildings and obstacles in the target urban area, and simplifies the two-dimensional plane map containing obstacle information; secondly, based on the probabilistic roadmap (PRM) method, an undirected graph is constructed on the plane map containing obstacle information, and nodes that avoid obstacles are generated by random sampling in the feasible area, and the connectivity between nodes and the interaction between edges and obstacles are detected to ensure the safety and connectivity of the path; then, the graph attention network (GAT) with an encoder-decoder structure is used to select the path of the constructed undirected graph, and an initial feasible path is generated by analyzing the importance of the nodes; finally, the generated initial path is optimized using a B-spline curve, and the path is smoothed to reduce turns and path length, thereby reducing aircraft fuel consumption and improving path safety. This method effectively combines PRM, GAT and B-spline curves, and can provide a safe and efficient flight path planning solution for drones in complex urban environments.
[0115] An embodiment of the present invention provides an electronic device, including: a computer-readable storage medium and a processor;
[0116] The computer-readable storage medium is used to store executable instructions;
[0117] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in any of the above embodiments.
[0118] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.
[0119] An embodiment of the present invention provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0120] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A UAV route planning method based on graph neural network, characterized in that: include: S1, using the probabilistic roadmap method to generate an undirected graph G = (V, E) of the target area; Where V is the node set, V = {q1, q2, ..., q N }, E is the edge set, E={e ij |i≠j,e ij =1}, N is the number of nodes, and each node is located in the free space of the target area; S2, input G into the trained graph attention network to obtain the route path of the UAV in the target area; Wherein, the graph attention network includes an encoder and a decoder; The encoder includes an input layer and M layers of multi-head attention mechanism layers connected in sequence, wherein the input layer is used to i The two-dimensional coordinate x i Perform initial embedding to obtain After passing through the M layers of multi-head attention mechanism connected in sequence, it is updated to is node q i The query vector is is node q j The key vector of is node q j The value vector of d key yes The dimension of j∈N(i) is q i The set of adjacent nodes, g = 1, 2, ..., H, l = 1, 2, ..., M, i = 1, 2, ..., N, H is the number of attention heads in each layer of the multi-head attention mechanism, b x , W x , W ′ , W Q , W K , W V All are learnable weight parameters; The decoder includes a single-head attention mechanism layer for k Contextual embedding Embedded with nodes From π k Select the next path point π from the adjacent nodes k+1 , until the complete path sequence π=(π0,π1,…,π m ),π0 is q1;π k+1 The probability of selection is the query vector, is the key vector, K k The dimension of is π k-1 Node embedding, is the embedding of the entire undirected graph, u context,r The definition of is similar, N(k) is π k The set of adjacent nodes, W Q ′ is a learnable weight parameter, k=0,1,2,…,m.
2. The method according to claim 1, characterized in that The decoder avoids repeated node accesses through a masking mechanism and limits message transmission between adjacent nodes.
3. The method according to claim 1 or 2, characterized in that The graph attention network is trained using a reinforcement learning algorithm; the loss function during the training process is: L(π) is the path cost, d(π k ,π k+1 ) is the node π k and node,π k+1 The Euclidean distance between them, m is the number of nodes in the path, p is θ (π|s) is the path strategy generated by the graph attention network, π is the path, π=(π0,π1,…,π m ), s is the current state of the graph attention network, θ is the parameter set of the graph attention network, and E is the expectation.
4. The method according to claim 3, characterized in that The REINFORCE algorithm is used to train the graph attention network.
5. The method according to claim 1, characterized in that The method further comprises: S3, using a B-spline curve method to smooth the route path.
6. An electronic device, characterized in that: include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 5.
8. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Deep map attentive adversarial variation automatic encoder training method and system
CN113361606A
Measurement viewpoint and measurement path synchronous optimization method based on reinforcement learning
CN115509224A
Unmanned aerial vehicle search path planning method and system suitable for emergency rescue
CN116301005A
Unmanned aerial vehicle route planning method, electronic equipment and storage medium
CN117249831A
Distributed intelligent storage unmanned vehicle path planning method based on reinforcement learning
CN117451066A
Cited By
Large-scale vehicle path planning method based on deep reinforcement learning
CN120972966A
Low-altitude path planning method and system based on dynamic adaptive graph neural network
CN121544810A
A Low-Altitude Path Planning Method and System Based on Dynamic Adaptive Graph Neural Network
CN121544810B