AGV sampling vehicle optimal path planning method based on graph neural network
By combining the improved GraphSAGE model and the Seq2Seq network, the path planning problem of AGV sampling vehicles in multi-target sampling points and complex environments was solved, generating the optimal sampling point access order and path, thus improving the rationality and efficiency of path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BINZHOU WEIQIAO NATIONAL SCIENCE & TECHNOLOGY ADVANCED TECHNOLOGY RESEARCH INSTITUTE
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-08
AI Technical Summary
Existing AGV sampling vehicle path planning methods based on graph neural networks struggle to balance local path optimality and global path optimization when dealing with multiple target sampling points and complex operating environments. Furthermore, they lack an effective dynamic weight adjustment mechanism, resulting in insufficient rationality and optimality of path planning.
An improved GraphSAGE model and an attention-based Seq2Seq network are used, combining pointer-style neighbor selection, bidirectional relational attention computation, and game-theoretic neighbor competition aggregation strategies to jointly model the sampling point access order decision and the shortest path in the environment graph. The optimal path is generated through multi-layer propagation and Dijkstra's algorithm.
It enables the generation of the overall optimal driving path covering all sampling points in complex sampling operation scenarios, improving the rationality of path planning and global path cost, and enhancing the accuracy and efficiency of path planning.
Smart Images

Figure CN121995915A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation and path planning technology, and in particular to an optimal path planning method for AGV sampling vehicles based on graph neural networks. Background Technology
[0002] With the development of intelligent manufacturing and smart logistics, Automated Guided Vehicles (AGVs) have been widely used in industrial production, warehousing logistics, and medical delivery. AGV sampling vehicles, as intelligent mobile platforms with autonomous path decision-making and task execution capabilities, are widely used in sophisticated scenarios such as medical testing and biological product sampling. Path planning, as a key component of the AGV system, directly determines operational efficiency and resource consumption. Traditional path planning methods are mostly based on classic graph search algorithms such as Dijkstra and A*, which perform well under fixed graph structures and single objectives. However, when faced with multiple target sampling points, variable operating environments, and dynamic interference factors, traditional methods struggle to balance overall path optimality and execution efficiency.
[0003] To improve the overall performance of multi-objective path planning, recent studies have attempted to introduce intelligent technologies such as deep learning and reinforcement learning, especially Graph Neural Networks (GNNs), which have shown strong capabilities in modeling graph-structured data. GraphSAGE, as a mainstream variant of GNNs, achieves efficient learning of graph structures through neighbor sampling and feature aggregation. However, the standard GraphSAGE model still has limitations in neighbor node selection, relationship modeling, and node aggregation strategies, especially when dealing with AGV path planning scenarios with complex spatial constraints and task order requirements. It is insufficient in modeling differences in relationships between nodes, game analysis of local optimal paths, and global path optimization.
[0004] Existing path planning methods based on graph neural networks often fail to fully utilize the bidirectional dependencies between adjacent nodes. They lack an effective dynamic weight adjustment mechanism during neighbor node aggregation, which can easily lead to local information dominating overall node updates, thus affecting the overall path quality. Furthermore, in multi-point path decision-making, the lack of a unified mechanism for handling sampling point sorting and path segment shortestification results in insufficient coupling between the path visit order and the driving path, impacting the rationality and optimality of the final path.
[0005] Therefore, how to provide an optimal path planning method for AGV sampling vehicles based on graph neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose an optimal path planning method for AGV sampling vehicles based on graph neural networks. This invention fully utilizes an improved GraphSAGE model and an attention-based Seq2Seq network, jointly modeling the sampling point access order decision and the shortest path solution in the environment graph. By introducing a pointer-style neighbor selection mechanism, a bidirectional relational attention calculation method, and a game-theoretic neighbor competition aggregation strategy, it achieves a deep expression and refined distinction of the association information between graph nodes. Furthermore, it combines Dijkstra's shortest path algorithm to complete the optimal search for the driving path between adjacent target nodes. Through dual optimization of the sampling point access order and the shortest path between nodes, this invention can generate an overall optimal driving path covering all sampling points, possessing advantages such as high path planning rationality, refined node relationship modeling, low global path cost, and applicability to complex sampling operation scenarios.
[0007] An optimal path planning method for an AGV sampling vehicle based on a graph neural network according to an embodiment of the present invention includes the following steps:
[0008] Step 1: Obtain map data and sampling point data of the AGV sampling vehicle's operating area, and construct an environmental map for path planning;
[0009] Step 2: Call the pointer-based neighbor selection unit of the improved GraphSAGE model to generate pointer scores for the neighbor nodes of the target node, and select a preset number of neighbor nodes as the target neighbor set based on the pointer scores;
[0010] The improved GraphSAGE model includes a pointer-based neighbor selection unit, a bidirectional relationship attention calculation unit, a game-theoretic neighbor competition aggregation unit, and a node update unit;
[0011] Step 3: In the bidirectional relationship attention calculation unit, positive relationship representations and negative relationship representations are generated for the target node and each neighbor node in the target neighbor set, respectively. Comparison and fusion are performed to obtain the bidirectional relationship attention weights of the target node to the neighbor nodes.
[0012] Step 4: In the game-theoretic neighbor competition aggregation unit, a neighborhood revenue model is constructed using the bidirectional relationship attention weight and the node features of the target neighbor set as inputs. The aggregation weights of each neighbor node are then iteratively updated based on the neighborhood revenue model to obtain the neighbor competition aggregation weights.
[0013] Step 5: Based on the neighbor competition aggregation weight, perform weighted aggregation of the node features of the target neighbor set, concatenate the feature vector of the target node with the aggregated features and input the result into the node update unit to generate the updated node representation;
[0014] Step 6: Repeat steps 2 to 5 for all nodes in the environment graph to complete the propagation of the multi-layer improved GraphSAGE model according to the preset number of layers and obtain the final representation of all nodes;
[0015] Step 7: Combine the final representations of the nodes corresponding to the sampling points into a sampling point feature sequence, and input the sampling point feature sequence into a Seq2Seq network based on the attention mechanism to generate a sampling point access sequence;
[0016] Step 8: Generate the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the terminal node based on the sampling point access sequence and the connectivity between nodes in the environment graph.
[0017] Optionally, step one specifically includes:
[0018] Obtain electronic map data and corresponding coordinate system information of the AGV sampling vehicle's operating area, extract roads, passages and operating area boundaries from the electronic map data, and determine passable areas and obstacle areas;
[0019] Within the passable area, the work area is discretized according to the preset spatial division rules, and the discretized passable locations and the locations of the sampling points are marked as graph nodes;
[0020] Based on the road connectivity recorded in the electronic map data and the connectivity between adjacent drivable locations after discretization, graph edges are established for pairs of graph nodes with drivable connections to form the topology of the environment graph.
[0021] For each node in the environment map, according to the preset node initial feature rules, the node's location information in the work area, whether it is a sampling point, and attribute information related to the node's passage status are written into the feature vector to complete the construction of the environment map for path planning.
[0022] Optionally, step two specifically includes:
[0023] In the environment graph, the currently pending graph node is selected as the target node according to the preset node traversal rules;
[0024] Read the set of neighboring nodes of the target node from the topology of the environment graph, obtain the feature vector of the target node and the feature vector of each neighboring node, and input the feature vector of the target node and the feature vector of each neighboring node into the pointer-type neighbor selection unit of the improved GraphSAGE model.
[0025] In the pointer-based neighbor selection unit, the relationship between the target node and each neighbor node is encoded based on the pointer network, and a corresponding pointer score is generated for each neighbor node in the neighbor node set.
[0026] The neighbor node set is sorted from high to low according to the pointer score. Based on the preset threshold for the number of neighbor nodes, the neighbor nodes with the highest pointer scores are selected from the sorted results, and the selected neighbor node set is determined as the target neighbor set.
[0027] Optionally, step three specifically includes:
[0028] The feature vector of the target node is combined with the feature vectors of the neighbor nodes in the target neighbor set according to a preset positive relationship encoding rule to generate a positive relationship representation that represents the target node pointing to the neighbor nodes;
[0029] The feature vectors of neighbor nodes in the target neighbor set are combined with the feature vectors of the target node according to a preset reverse relationship encoding rule to generate a reverse relationship representation that represents the neighbor node pointing to the target node.
[0030] Perform a comparison and fusion operation on the positive and negative relation representations corresponding to the same neighbor node to obtain the bidirectional relation association score corresponding to the current neighbor node;
[0031] Normalize the bidirectional relationship scores of each neighbor node in the target neighbor set to generate the bidirectional relationship attention weights of the target node to each neighbor node.
[0032] Optionally, step four specifically includes:
[0033] The bidirectional relationship attention weights are associated with and stored in relation to the feature vectors of neighboring nodes;
[0034] Initialize the aggregation weight for each neighbor node in the target neighbor set, and build a neighborhood revenue model for each neighbor node within the neighborhood.
[0035] The neighborhood revenue model includes its own revenue value generated by the current neighbor node feature vector and the bidirectional relationship attention weight according to a preset revenue composition rule, and the neighbor interaction influence value generated by the current neighbor node feature vector, other neighbor node feature vectors and the bidirectional relationship attention weight according to a preset interaction composition rule.
[0036] During the iterative update process, the aggregation weights of each neighbor node in the target neighbor set are updated according to the neighborhood revenue model;
[0037] The iterative update process includes: based on the initial aggregation weight, calculating the self-income value and neighbor interaction influence value of each neighbor node based on the neighborhood income model;
[0038] The total benefit is formed by combining its own benefit value with the impact value of its interactions with neighbors;
[0039] The aggregation weight of the corresponding neighbor node is increased or decreased according to the direction of change of the overall return between the current iteration round and the previous iteration round: if the overall return of the current iteration round shows an increasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is increased; if the overall return of the current iteration round shows a decreasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is decreased.
[0040] After each round of updates, the aggregate weights of all neighboring nodes are normalized.
[0041] When the number of iterations reaches the preset iteration limit or the change in the aggregate weight of all neighbor nodes in two adjacent iterations is less than the preset threshold, the update stops and the neighbor competition aggregate weight is output.
[0042] Optionally, step five specifically includes:
[0043] After the game-like neighbor competition aggregation unit completes the iterative update, the neighbor competition aggregation weights and feature vectors of each neighbor node in the target neighbor set are obtained, and the neighbor competition aggregation weights are associated with the corresponding neighbor node feature vectors one by one.
[0044] Based on the neighbor competition aggregation weight, a weighted operation is performed on the feature vectors of each neighbor node in the target neighbor set to generate a neighborhood aggregation feature vector that represents the neighborhood information of the target node.
[0045] Obtain the feature vector of the target node, and concatenate the feature vector of the target node with the neighborhood aggregated feature vector according to the preset feature concatenation order to form the combined feature vector of the target node;
[0046] The combined feature vector of the target node is input into the node update unit. In the node update unit, a linear transformation and activation process are performed on the combined feature vector of the target node to generate the updated node representation of the target node.
[0047] Optionally, step six specifically includes:
[0048] Write the updated node representation of each graph node generated in the node update unit into the corresponding graph node in the environment graph, and use it as the feature vector of the current graph node in the next round of processing.
[0049] In each round of processing, the graph nodes in the environment graph are taken as target nodes in turn, and the pointer-type neighbor selection unit, bidirectional relationship attention calculation unit, game-like neighbor competition aggregation unit, and node update unit of the improved GraphSAGE model are called to process the feature vector of the target node and the feature vector of the neighbor nodes in the target neighbor set to generate the updated node representation of the target node.
[0050] The updated node representations of all graph nodes in the current round are used as the feature vectors of graph nodes in the next round of processing. This process is repeated multiple times according to the preset number of network layers until the propagation of the multi-layer improved GraphSAGE model corresponding to the preset number of layers is completed.
[0051] After completing multi-layer propagation, the updated node representations of each graph node in the last round of processing are determined as the final representations of each graph node in the environment graph.
[0052] Optionally, step seven specifically includes:
[0053] Read the final representation of the graph node corresponding to each sampling point from the environment graph, and arrange the final representations corresponding to each sampling point in the order of the sampling point number to form a sampling point feature sequence;
[0054] The sampling point feature sequence is input into the encoder of the attention-based Seq2Seq network. The encoder receives the feature vectors of each sampling point in the sampling point feature sequence in the order of time steps, and encodes the feature vectors of each sampling point at each time step to generate the corresponding encoder hidden state sequence.
[0055] The initial state of the decoder is set according to the encoder hidden state sequence. The initial state of the decoder and the start identifier used to indicate the start of decoding are input into the decoder of the Seq2Seq network to start the decoding process.
[0056] In the current time step at the decoder, the sampling point identifier output from the previous time step and the decoder hidden state of the previous time step are received. The sequence of decoder hidden state and encoder hidden state at the current time step is used as the input for attention calculation to calculate the attention weight distribution corresponding to the current time step.
[0057] The encoder hidden state sequence is weighted according to the attention weight distribution of the current time step to generate the context vector of the current time step. The context vector of the current time step is combined with the decoder hidden state of the current time step to obtain the decoder output vector of the current time step.
[0058] The next sample point identifier to be accessed is generated based on the decoding output vector of the current time step, and the sample point identifier is written into the sample point access sequence as the decoding output result of the current time step. At the same time, the current sample point identifier is used as one of the inputs to the decoder at the next time step.
[0059] The attention calculation, context vector generation, decoding output vector generation, and sample point identifier output are repeated sequentially at the decoder end until the sample point access sequence contains the identifiers corresponding to all sample points, thus obtaining the sample point access sequence output by the attention-based Seq2Seq network.
[0060] Optionally, step eight specifically includes:
[0061] Determine the start and end nodes of the AGV sampling vehicle in the environment map, and map the start and end nodes to the start and end positions of the AGV sampling vehicle, respectively.
[0062] Based on the sampling point access sequence output by the attention-based Seq2Seq network, the graph nodes corresponding to the sampling point identifiers in the sampling point access sequence are sequentially obtained from the environment graph to form a sampling point node sequence arranged in the access order.
[0063] Insert a start node at the beginning of the sampling point node sequence and append a stop node to the end of the sampling point node sequence to obtain a target node sequence containing the start node, the corresponding graph nodes of each sampling point, and the stop node.
[0064] For the preceding and following nodes in the target node sequence, Dijkstra's shortest path algorithm is invoked to perform path search processing based on the connectivity between nodes in the environment graph.
[0065] Determine the graph node travel path from the previous node to the next node, and then concatenate the graph node travel paths of each adjacent node pair in the order of the target node sequence to generate a graph node sequence that covers all sampling points and is arranged in the travel order, which serves as the overall travel path of the AGV sampling vehicle.
[0066] The sequence of graph nodes and the corresponding graph edge connections contained in the overall driving path of the AGV sampling vehicle are determined as the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the ending node.
[0067] The beneficial effects of this invention are:
[0068] This invention significantly improves the efficiency and accuracy of AGV sampling vehicles in complex work areas by introducing a path planning architecture that combines graph neural networks and attention mechanisms. First, the improved GraphSAGE model proposed in this invention constructs a multi-layer graph neural network structure containing pointer-based neighbor selection units, bidirectional relational attention calculation units, and game-theoretic neighbor competition aggregation units. This structure effectively extracts deep semantic relationships between graph nodes and performs refined filtering and weighted aggregation of neighbor node features, improving the accuracy and discriminability of node representations.
[0069] By introducing a pointer network mechanism into the pointer-based neighbor selection unit, dynamic selection of the most relevant neighbors for the target node is achieved, avoiding interference from invalid information caused by traditional random sampling or fixed neighborhoods. In the bidirectional attention calculation process, a comparative fusion method of positive and negative relationships is adopted, enhancing the directional modeling capability between the target node and its neighbors, which helps improve the discriminativeness of attention weights. Furthermore, the game-theoretic neighbor competition aggregation mechanism, by constructing a neighborhood payoff model, dynamically adjusts the weights of neighbor nodes in multiple iterations, effectively enhancing the competitiveness and selectivity of feature aggregation.
[0070] This invention combines an attention-based Seq2Seq network to sequentially model the feature sequences of sampling points, accurately predicting the access order of sampling points and achieving fully automated planning from perception to decision-making. Finally, Dijkstra's shortest path algorithm is used to efficiently obtain the shortest path between each pair of target nodes after the access order is determined, ensuring that the overall path has the minimum cost under the current access order, thus achieving global optimization of the sampling path.
[0071] This invention not only improves the node feature modeling capability and information fusion effect of AGV sampling vehicles in path planning tasks, but also achieves unified optimization of local shortest path and global order in the path generation stage, resulting in higher decision accuracy and path execution efficiency, and is suitable for diverse and complex industrial sampling application scenarios. Attached Figure Description
[0072] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0073] Figure 1 This is an overall flowchart of an optimal path planning method for AGV sampling vehicles based on graph neural networks proposed in this invention;
[0074] Figure 2 This is a schematic diagram of the improved GraphSAGE model structure of the optimal path planning method for AGV sampling vehicles based on graph neural networks proposed in this invention.
[0075] Figure 3 This is a schematic diagram illustrating the generation of the optimal path for an AGV sampling vehicle, based on a graph neural network-based optimal path planning method proposed in this invention. Detailed Implementation
[0076] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0077] refer to Figures 1-3 An optimal path planning method for AGV sampling vehicles based on graph neural networks includes the following steps:
[0078] Step 1: Obtain map data and sampling point data of the AGV sampling vehicle's operating area, and construct an environmental map for path planning;
[0079] Step 2: Call the pointer-based neighbor selection unit of the improved GraphSAGE model to generate pointer scores for the neighbor nodes of the target node, and select a preset number of neighbor nodes as the target neighbor set based on the pointer scores;
[0080] The improved GraphSAGE model includes a pointer-based neighbor selection unit, a bidirectional relationship attention calculation unit, a game-theoretic neighbor competition aggregation unit, and a node update unit;
[0081] Step 3: In the bidirectional relationship attention calculation unit, positive relationship representations and negative relationship representations are generated for the target node and each neighbor node in the target neighbor set, respectively. Comparison and fusion are performed to obtain the bidirectional relationship attention weights of the target node to the neighbor nodes.
[0082] Step 4: In the game-theoretic neighbor competition aggregation unit, a neighborhood revenue model is constructed using the bidirectional relationship attention weight and the node features of the target neighbor set as inputs. The aggregation weights of each neighbor node are then iteratively updated based on the neighborhood revenue model to obtain the neighbor competition aggregation weights.
[0083] Step 5: Based on the neighbor competition aggregation weight, perform weighted aggregation of the node features of the target neighbor set, concatenate the feature vector of the target node with the aggregated features and input the result into the node update unit to generate the updated node representation;
[0084] Step 6: Repeat steps 2 to 5 for all nodes in the environment graph to complete the propagation of the multi-layer improved GraphSAGE model according to the preset number of layers and obtain the final representation of all nodes;
[0085] Step 7: Combine the final representations of the nodes corresponding to the sampling points into a sampling point feature sequence, and input the sampling point feature sequence into a Seq2Seq network based on the attention mechanism to generate a sampling point access sequence;
[0086] Step 8: Generate the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the terminal node based on the sampling point access sequence and the connectivity between nodes in the environment graph.
[0087] In this embodiment, step one specifically includes:
[0088] Obtain electronic map data and corresponding coordinate system information of the AGV sampling vehicle's operating area, extract roads, passages and operating area boundaries from the electronic map data, and determine passable areas and obstacle areas;
[0089] Within the passable area, the work area is discretized according to the preset spatial division rules, and the discretized passable locations and the locations of the sampling points are marked as graph nodes;
[0090] Based on the road connectivity recorded in the electronic map data and the connectivity between adjacent drivable locations after discretization, graph edges are established for pairs of graph nodes with drivable connections to form the topology of the environment graph.
[0091] For each node in the environment map, according to the preset node initial feature rules, the node's location information in the work area, whether it is a sampling point, and attribute information related to the node's passage status are written into the feature vector to complete the construction of the environment map for path planning.
[0092] In this embodiment, step two specifically includes:
[0093] In the environment graph, the currently pending graph node is selected as the target node according to the preset node traversal rules;
[0094] Read the set of neighboring nodes of the target node from the topology of the environment graph, obtain the feature vector of the target node and the feature vector of each neighboring node, and input the feature vector of the target node and the feature vector of each neighboring node into the pointer-type neighbor selection unit of the improved GraphSAGE model.
[0095] The pointer-based neighbor selection unit replaces the neighbor sampling module in the traditional GraphSAGE model. It encodes the relationships of neighbor nodes through a pointer network and determines the target neighbor set based on scores.
[0096] In the pointer-based neighbor selection unit, the relationship between the target node and each neighbor node is encoded based on the pointer network, and a corresponding pointer score is generated for each neighbor node in the neighbor node set.
[0097] The neighbor node set is sorted from high to low according to the pointer score. Based on the preset threshold for the number of neighbor nodes, the neighbor nodes with the highest pointer scores are selected from the sorted results, and the selected neighbor node set is determined as the target neighbor set.
[0098] In this embodiment, step three specifically includes:
[0099] The feature vector of the target node is combined with the feature vectors of the neighbor nodes in the target neighbor set according to a preset positive relationship encoding rule to generate a positive relationship representation that represents the target node pointing to the neighbor nodes.
[0100] The feature vectors of neighbor nodes in the target neighbor set are combined with the feature vectors of the target node according to a preset reverse relationship encoding rule to generate a reverse relationship representation that represents the neighbor node pointing to the target node.
[0101] The positive relation encoding rule is used to concatenate the feature vectors of the target node and the feature vectors of the neighboring nodes in a combination order with the target node first and the neighboring nodes last.
[0102] The reverse relation encoding rule is used to concatenate the feature vectors of neighboring nodes and the feature vectors of the target node in a combination order of neighboring nodes first and target nodes last.
[0103] Perform a comparison and fusion operation on the positive and negative relation representations corresponding to the same neighbor node to obtain the bidirectional relation association score corresponding to the current neighbor node;
[0104] Normalize the bidirectional relationship scores of each neighbor node in the target neighbor set to generate the bidirectional relationship attention weights of the target node to each neighbor node.
[0105] In this embodiment, step four specifically includes:
[0106] The bidirectional relationship attention weights are associated with and stored in relation to the feature vectors of neighboring nodes;
[0107] Initialize the aggregation weight for each neighbor node in the target neighbor set, and build a neighborhood revenue model for each neighbor node within the neighborhood.
[0108] The neighborhood revenue model includes its own revenue value generated by the current neighbor node feature vector and the bidirectional relationship attention weight according to a preset revenue composition rule, and the neighbor interaction influence value generated by the current neighbor node feature vector, other neighbor node feature vectors and the bidirectional relationship attention weight according to a preset interaction composition rule.
[0109] The preset revenue composition rule is used to combine the feature vector of the current neighbor node with the bidirectional relationship attention weight corresponding to the neighbor node according to the preset feature fusion order, and generate the current neighbor node's own revenue value based on the combination result.
[0110] The preset interaction composition rules are used to combine the feature vectors of the current neighbor node, the feature vectors of other neighbor nodes, and the bidirectional relationship attention weights corresponding to each neighbor node according to the preset neighborhood relationship fusion order, and generate a neighbor interaction influence value based on the combination result to characterize the degree of mutual influence between the current neighbor node and other neighbor nodes.
[0111] During the iterative update process, the aggregation weights of each neighbor node in the target neighbor set are updated according to the neighborhood revenue model;
[0112] The iterative update process includes: based on the initial aggregation weight, calculating the self-income value and neighbor interaction influence value of each neighbor node based on the neighborhood income model;
[0113] The total benefit is formed by combining its own benefit value with the impact value of its interactions with neighbors;
[0114] The comprehensive benefit is obtained by combining the self-benefit value of the current neighbor node with the neighbor interaction impact value in a preset order, and then obtaining a numerical result to represent the comprehensive benefit of the neighbor node based on the result of the combination process.
[0115] The aggregation weight of the corresponding neighbor node is increased or decreased according to the direction of change of the overall return between the current iteration round and the previous iteration round: if the overall return of the current iteration round shows an increasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is increased; if the overall return of the current iteration round shows a decreasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is decreased.
[0116] After each round of updates, the aggregate weights of all neighboring nodes are normalized.
[0117] When the number of iterations reaches the preset iteration limit or the change in the aggregate weight of all neighbor nodes in two adjacent iterations is less than the preset threshold, the update stops and the neighbor competition aggregate weight is output.
[0118] This invention updates node relationships in the environment graph layer by layer by constructing an improved GraphSAGE model. It introduces a pointer-based neighbor selection mechanism, a bidirectional relationship attention calculation mechanism, and a game-theoretic neighbor competition aggregation mechanism in the neighbor selection, relationship modeling, and feature aggregation stages, respectively. Specifically, in the neighbor selection stage, a pointer network is used to encode the relationship between the target node and its neighbor nodes and generate pointer scores. The target neighbor set is then selected based on the scoring results, improving the targeting of the neighborhood selection. In the relationship modeling stage, forward and reverse relationship encoding rules are used to construct relationship representations from the target node to its neighbor nodes and from the neighbor nodes to the target node, respectively. These two relationship representations are then compared and fused to form a bidirectional relationship association score, which is then normalized to obtain the bidirectional relationship attention weight. In the aggregation stage, a neighborhood revenue model is constructed based on the bidirectional relationship attention weight and neighbor node features. A comprehensive revenue is formed through iterative updates of the self-revenue value and the neighbor interaction influence value. The neighbor node aggregation weight is dynamically adjusted according to the direction of change in the comprehensive revenue. After multiple iterations, a stable neighbor competition aggregation weight is obtained for subsequent weighted aggregation and updating of node features.
[0119] In this embodiment, step five specifically includes:
[0120] After the game-like neighbor competition aggregation unit completes the iterative update, the neighbor competition aggregation weights and feature vectors of each neighbor node in the target neighbor set are obtained, and the neighbor competition aggregation weights are associated with the corresponding neighbor node feature vectors one by one.
[0121] Based on the neighbor competition aggregation weight, a weighted operation is performed on the feature vectors of each neighbor node in the target neighbor set to generate a neighborhood aggregation feature vector that represents the neighborhood information of the target node.
[0122] Obtain the feature vector of the target node, and concatenate the feature vector of the target node with the neighborhood aggregated feature vector according to the preset feature concatenation order to form the combined feature vector of the target node;
[0123] The combined feature vector of the target node is input into the node update unit. In the node update unit, a linear transformation and activation process are performed on the combined feature vector of the target node to generate the updated node representation of the target node.
[0124] In this embodiment, step six specifically includes:
[0125] Write the updated node representation of each graph node generated in the node update unit into the corresponding graph node in the environment graph, and use it as the feature vector of the current graph node in the next round of processing.
[0126] In each round of processing, the graph nodes in the environment graph are taken as target nodes in turn, and the pointer-type neighbor selection unit, bidirectional relationship attention calculation unit, game-like neighbor competition aggregation unit, and node update unit of the improved GraphSAGE model are called to process the feature vector of the target node and the feature vector of the neighbor nodes in the target neighbor set to generate the updated node representation of the target node.
[0127] The updated node representations of all graph nodes in the current round are used as the feature vectors of graph nodes in the next round of processing. This process is repeated multiple times according to the preset number of network layers until the propagation of the multi-layer improved GraphSAGE model corresponding to the preset number of layers is completed.
[0128] After completing multi-layer propagation, the updated node representations of each graph node in the last round of processing are determined as the final representations of each graph node in the environment graph.
[0129] In this embodiment, step seven specifically includes:
[0130] Read the final representation of the graph node corresponding to each sampling point from the environment graph, and arrange the final representations corresponding to each sampling point in the order of the sampling point number to form a sampling point feature sequence;
[0131] The sampling point feature sequence is input into the encoder of the attention-based Seq2Seq network. The encoder receives the feature vectors of each sampling point in the sampling point feature sequence in the order of time steps, and encodes the feature vectors of each sampling point at each time step to generate the corresponding encoder hidden state sequence.
[0132] The initial state of the decoder is set according to the encoder hidden state sequence. The initial state of the decoder and the start identifier used to indicate the start of decoding are input into the decoder of the Seq2Seq network to start the decoding process.
[0133] In the current time step at the decoder, the sampling point identifier output from the previous time step and the decoder hidden state of the previous time step are received. The sequence of decoder hidden state and encoder hidden state at the current time step is used as the input for attention calculation to calculate the attention weight distribution corresponding to the current time step.
[0134] The encoder hidden state sequence is weighted according to the attention weight distribution of the current time step to generate the context vector of the current time step. The context vector of the current time step is combined with the decoder hidden state of the current time step to obtain the decoder output vector of the current time step.
[0135] The next sample point identifier to be accessed is generated based on the decoding output vector of the current time step, and the sample point identifier is written into the sample point access sequence as the decoding output result of the current time step. At the same time, the current sample point identifier is used as one of the inputs to the decoder at the next time step.
[0136] The attention calculation, context vector generation, decoding output vector generation, and sample point identifier output are repeated sequentially at the decoder end until the sample point access sequence contains the identifiers corresponding to all sample points, thus obtaining the sample point access sequence output by the attention-based Seq2Seq network.
[0137] In this embodiment, step eight specifically includes:
[0138] Determine the start and end nodes of the AGV sampling vehicle in the environment map, and map the start and end nodes to the start and end positions of the AGV sampling vehicle, respectively.
[0139] Based on the sampling point access sequence output by the attention-based Seq2Seq network, the graph nodes corresponding to the sampling point identifiers in the sampling point access sequence are sequentially obtained from the environment graph to form a sampling point node sequence arranged in the access order.
[0140] Insert a start node at the beginning of the sampling point node sequence and append a stop node to the end of the sampling point node sequence to obtain a target node sequence containing the start node, the corresponding graph nodes of each sampling point, and the stop node.
[0141] For the preceding and following nodes in the target node sequence, Dijkstra's shortest path algorithm is invoked to perform path search processing based on the connectivity between nodes in the environment graph.
[0142] Determine the graph node travel path from the previous node to the next node, and then concatenate the graph node travel paths of each adjacent node pair in the order of the target node sequence to generate a graph node sequence that covers all sampling points and is arranged in the travel order, which serves as the overall travel path of the AGV sampling vehicle.
[0143] The sequence of graph nodes and the corresponding graph edge connections contained in the overall driving path of the AGV sampling vehicle are determined as the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the ending node.
[0144] Graph edge connectivity is used to characterize the connection information between adjacent graph nodes in a graph node sequence, established according to the topology of the environment graph.
[0145] This invention determines the access order of sampling points using a Seq2Seq network based on an attention mechanism. Under this access order, Dijkstra's shortest path algorithm is used to obtain the shortest travel paths between adjacent nodes. The paths of each segment are then concatenated according to the access order to form an overall travel path covering all sampling points. Since each segment path is the shortest path after the access order is fixed, the overall travel path formed by the concatenated graph node sequence and its edge connections is the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the ending node.
[0146] Example 1:
[0147] To verify the feasibility of this invention in practice, it was applied to a material sampling and scheduling system in a smart manufacturing workshop. The system deploys several AGV sampling vehicles to collect samples within the work area and transport them to a centralized processing unit. Due to the complex workshop structure, dense and uneven distribution of sampling points, and strong path selection, traditional path planning methods cannot effectively balance the access order and path length, leading to frequent problems such as path duplication, numerous inflection points, and long processing times.
[0148] In actual tasks, the system constructs an environmental map based on an electronic map. After spatial discretization of the work area, it generates a graph structure consisting of 1032 graph nodes and 2119 graph edges. Each graph node carries initial features such as passage status, spatial coordinates, and whether it is a sampling point, which are used for subsequent neural network modeling. The daily scheduling task includes 18 sampling points. The AGV sampling vehicle needs to start from the starting point, visit these 18 sampling points in sequence, and finally return to the termination point.
[0149] The application process of this invention in this scenario is as follows: An improved GraphSAGE model is invoked to perform multi-layer propagation modeling on all graph nodes in the environment graph. This model introduces a pointer-type neighbor selection unit, which can dynamically select important neighbor nodes for the target node. Simultaneously, it combines a bidirectional relationship attention mechanism and a game-like aggregation weight update strategy to enhance the node feature representation capability. After two rounds of propagation, the final representation of all graph nodes is obtained.
[0150] The node features corresponding to 18 sampling points are extracted from the final node representation above, and these features are combined into a sampling point feature sequence, which is then input into an attention-based Seq2Seq network. After sequential modeling through this network, a sampling point access sequence is automatically generated to guide the scheduling order of the AGV sampling vehicles.
[0151] Based on the output access order and the graph topology, Dijkstra's shortest path algorithm is used to perform path searches between each pair of adjacent sampling points in the access sequence. All segment paths are then sequentially concatenated to generate a complete AGV travel path. The system automatically calculates and extracts all graph node sequences and edge connections involved in this path as the final path planning result.
[0152] In actual operation, the path planning process of the method of this invention takes only 1.12 seconds, far below the 5-second response threshold for task issuance, fully meeting the real-time scheduling requirements. After the AGV runs according to the planned path, the total travel path length is 206.4 meters, and the total sampling operation time is 138.7 seconds, which shortens the total mileage by 16.8% and reduces the task time by 19.3% compared with the average scheduling results of the workshop in the past. In addition, through the statistics of inflection points in the path, the number of turns in the path generated by this scheme is only 31, which is 27.4% lower than the historical average, significantly improving driving stability. Specific experimental data are shown in Table 1:
[0153] Table 1. Statistical table of path planning results in AGV sampling tasks according to the present invention.
[0154] Indicator Item Actual values Historical average Improvement range unit Notes Total number of graph nodes 1032 — — indivual Graph structure construction result Total number of edges in the graph 2119 — — strip Graph structure construction result Number of sampling points 18 18 — indivual Daily task scale Total length of planned path 206.4 248.1 ↓16.8% rice Actual trajectory calculation results Total time for path planning 1.12 2.06 ↓45.6% Second Model inference + path concatenation Total AGV operation execution time 138.7 171.9 ↓19.3% Second End-to-end task completion time Number of inflection points in the driving path 31 42.7 ↓27.4% indivual The number of turns affects energy consumption and stability.
[0155] As shown in Table 1, this invention achieves significant comprehensive advantages by ensuring the shortest path while also considering computational efficiency, execution efficiency, and path quality. Monitoring by the scheduling system revealed that no path conflicts or duplicate visits occurred during actual operation. The AGV completed all sampling point collection tasks in sequence, and the overall system operation was stable and efficient, verifying the adaptability, practicality, and superior scheduling effect of the method in industrial environments.
[0156] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An optimal path planning method for AGV sampling vehicles based on graph neural networks, characterized in that, Includes the following steps: Step 1: Obtain map data and sampling point data of the AGV sampling vehicle's operating area, and construct an environmental map for path planning; Step 2: Call the pointer-based neighbor selection unit of the improved GraphSAGE model to generate pointer scores for the neighbor nodes of the target node, and select a preset number of neighbor nodes as the target neighbor set based on the pointer scores; The improved GraphSAGE model includes a pointer-based neighbor selection unit, a bidirectional relationship attention calculation unit, a game-theoretic neighbor competition aggregation unit, and a node update unit; Step 3: In the bidirectional relationship attention calculation unit, positive relationship representations and negative relationship representations are generated for the target node and each neighbor node in the target neighbor set, respectively. Comparison and fusion are performed to obtain the bidirectional relationship attention weights of the target node to the neighbor nodes. Step 4: In the game-theoretic neighbor competition aggregation unit, a neighborhood revenue model is constructed using the bidirectional relationship attention weight and the node features of the target neighbor set as inputs. The aggregation weights of each neighbor node are then iteratively updated based on the neighborhood revenue model to obtain the neighbor competition aggregation weights. Step 5: Based on the neighbor competition aggregation weight, perform weighted aggregation of the node features of the target neighbor set, concatenate the feature vector of the target node with the aggregated features and input the result into the node update unit to generate the updated node representation; Step 6: Repeat steps 2 to 5 for all nodes in the environment graph to complete the propagation of the multi-layer improved GraphSAGE model according to the preset number of layers and obtain the final representation of all nodes; Step 7: Combine the final representations of the nodes corresponding to the sampling points into a sampling point feature sequence, and input the sampling point feature sequence into a Seq2Seq network based on the attention mechanism to generate a sampling point access sequence; Step 8: Generate the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the terminal node based on the sampling point access sequence and the connectivity between nodes in the environment graph.
2. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step one specifically includes: Obtain electronic map data and corresponding coordinate system information of the AGV sampling vehicle's operating area, extract roads, passages and operating area boundaries from the electronic map data, and determine passable areas and obstacle areas; Within the passable area, the work area is discretized according to the preset spatial division rules, and the discretized passable locations and the locations of the sampling points are marked as graph nodes; Based on the road connectivity recorded in the electronic map data and the connectivity between adjacent drivable locations after discretization, graph edges are established for pairs of graph nodes with drivable connections to form the topology of the environment graph. For each node in the environment map, according to the preset node initial feature rules, the node's location information in the work area, whether it is a sampling point, and attribute information related to the node's passage status are written into the feature vector to complete the construction of the environment map for path planning.
3. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step two specifically includes: In the environment graph, the currently pending graph node is selected as the target node according to the preset node traversal rules; Read the set of neighboring nodes of the target node from the topology of the environment graph, obtain the feature vector of the target node and the feature vector of each neighboring node, and input the feature vector of the target node and the feature vector of each neighboring node into the pointer-type neighbor selection unit of the improved GraphSAGE model. In the pointer-based neighbor selection unit, the relationship between the target node and each neighbor node is encoded based on the pointer network, and a corresponding pointer score is generated for each neighbor node in the neighbor node set. The neighbor node set is sorted from high to low according to the pointer score. Based on the preset threshold for the number of neighbor nodes, the neighbor nodes with the highest pointer scores are selected from the sorted results, and the selected neighbor node set is determined as the target neighbor set.
4. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step three specifically includes: The feature vector of the target node is combined with the feature vectors of the neighbor nodes in the target neighbor set according to a preset positive relationship encoding rule to generate a positive relationship representation that represents the target node pointing to the neighbor nodes; The feature vectors of neighbor nodes in the target neighbor set are combined with the feature vectors of the target node according to a preset reverse relationship encoding rule to generate a reverse relationship representation that represents the neighbor node pointing to the target node. Perform a comparison and fusion operation on the positive and negative relation representations corresponding to the same neighbor node to obtain the bidirectional relation association score corresponding to the current neighbor node; Normalize the bidirectional relationship scores of each neighbor node in the target neighbor set to generate the bidirectional relationship attention weights of the target node to each neighbor node.
5. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step four specifically includes: The bidirectional relationship attention weights are associated with and stored in relation to the feature vectors of neighboring nodes; Initialize the aggregation weight for each neighbor node in the target neighbor set, and build a neighborhood revenue model for each neighbor node within the neighborhood. The neighborhood revenue model includes its own revenue value generated by the current neighbor node feature vector and the bidirectional relationship attention weight according to a preset revenue composition rule, and the neighbor interaction influence value generated by the current neighbor node feature vector, other neighbor node feature vectors and the bidirectional relationship attention weight according to a preset interaction composition rule. During the iterative update process, the aggregation weights of each neighbor node in the target neighbor set are updated according to the neighborhood revenue model; The iterative update process includes: based on the initial aggregation weight, calculating the self-income value and neighbor interaction influence value of each neighbor node based on the neighborhood income model; The total benefit is formed by combining its own benefit value with the impact value of its interactions with neighbors; The aggregation weight of the corresponding neighbor node is increased or decreased according to the direction of change of the overall return between the current iteration round and the previous iteration round: if the overall return of the current iteration round shows an increasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is increased; if the overall return of the current iteration round shows a decreasing trend relative to the previous iteration round, the aggregation weight of the corresponding neighbor node is decreased. After each round of updates, the aggregate weights of all neighboring nodes are normalized. When the number of iterations reaches the preset iteration limit or the change in the aggregate weight of all neighbor nodes in two adjacent iterations is less than the preset threshold, the update stops and the neighbor competition aggregate weight is output.
6. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step five specifically includes: After the game-like neighbor competition aggregation unit completes the iterative update, the neighbor competition aggregation weights and feature vectors of each neighbor node in the target neighbor set are obtained, and the neighbor competition aggregation weights are associated with the corresponding neighbor node feature vectors one by one. Based on the neighbor competition aggregation weight, a weighted operation is performed on the feature vectors of each neighbor node in the target neighbor set to generate a neighborhood aggregation feature vector that represents the neighborhood information of the target node. Obtain the feature vector of the target node, and concatenate the feature vector of the target node with the neighborhood aggregated feature vector according to the preset feature concatenation order to form the combined feature vector of the target node; The combined feature vector of the target node is input into the node update unit. In the node update unit, a linear transformation and activation process are performed on the combined feature vector of the target node to generate the updated node representation of the target node.
7. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step six specifically includes: Write the updated node representation of each graph node generated in the node update unit into the corresponding graph node in the environment graph, and use it as the feature vector of the current graph node in the next round of processing. In each round of processing, the graph nodes in the environment graph are taken as target nodes in turn, and the pointer-type neighbor selection unit, bidirectional relationship attention calculation unit, game-like neighbor competition aggregation unit, and node update unit of the improved GraphSAGE model are called to process the feature vector of the target node and the feature vector of the neighbor nodes in the target neighbor set to generate the updated node representation of the target node. The updated node representations of all graph nodes in the current round are used as the feature vectors of graph nodes in the next round of processing. Multiple rounds of processing are repeated according to the preset number of network layers until the propagation of the multi-layer improved GraphSAGE model corresponding to the preset number of layers is completed. After completing multi-layer propagation, the updated node representations of each graph node in the last round of processing are determined as the final representations of each graph node in the environment graph.
8. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step seven specifically includes: Read the final representation of the graph node corresponding to each sampling point from the environment graph, and arrange the final representations corresponding to each sampling point in the order of the sampling point number to form a sampling point feature sequence; The sampling point feature sequence is input into the encoder of the attention-based Seq2Seq network. The encoder receives the feature vectors of each sampling point in the sampling point feature sequence in the order of time steps, and encodes the feature vectors of each sampling point at each time step to generate the corresponding encoder hidden state sequence. The initial state of the decoder is set according to the encoder hidden state sequence. The initial state of the decoder and the start identifier used to indicate the start of decoding are input into the decoder of the Seq2Seq network to start the decoding process. In the current time step at the decoder, the sampling point identifier output from the previous time step and the decoder hidden state of the previous time step are received. The sequence of decoder hidden state and encoder hidden state at the current time step is used as the input for attention calculation to calculate the attention weight distribution corresponding to the current time step. The encoder hidden state sequence is weighted according to the attention weight distribution of the current time step to generate the context vector of the current time step. The context vector of the current time step is combined with the decoder hidden state of the current time step to obtain the decoder output vector of the current time step. The next sample point identifier to be accessed is generated based on the decoding output vector of the current time step, and the sample point identifier is written into the sample point access sequence as the decoding output result of the current time step. At the same time, the current sample point identifier is used as one of the inputs to the decoder at the next time step. The attention calculation, context vector generation, decoding output vector generation, and sample point identifier output are repeated sequentially at the decoder end until the sample point access sequence contains the identifiers corresponding to all sample points, thus obtaining the sample point access sequence output by the attention-based Seq2Seq network.
9. The optimal path planning method for AGV sampling vehicles based on graph neural networks according to claim 1, characterized in that, Step eight specifically includes: Determine the start and end nodes of the AGV sampling vehicle in the environment map, and map the start and end nodes to the start and end positions of the AGV sampling vehicle, respectively. Based on the sampling point access sequence output by the attention-based Seq2Seq network, the graph nodes corresponding to the sampling point identifiers in the sampling point access sequence are sequentially obtained from the environment graph to form a sampling point node sequence arranged in the access order. Insert a start node at the beginning of the sampling point node sequence and append a stop node to the end of the sampling point node sequence to obtain a target node sequence containing the start node, the corresponding graph nodes of each sampling point, and the stop node. For the preceding and following nodes in the target node sequence, Dijkstra's shortest path algorithm is invoked to perform path search processing based on the connectivity between nodes in the environment graph. Determine the graph node travel path from the previous node to the next node, and then concatenate the graph node travel paths of each adjacent node pair in the order of the target node sequence to generate a graph node sequence that covers all sampling points and is arranged in the travel order, which serves as the overall travel path of the AGV sampling vehicle. The sequence of graph nodes and the corresponding graph edge connections contained in the overall driving path of the AGV sampling vehicle are determined as the optimal path planning result for the AGV sampling vehicle from the starting node to each sampling point and then to the ending node.