A Distributed Feedback Hybrid Attention Network Model for Optimal Path Planning

The distributed feedback hybrid attention network model addresses suboptimal path planning in multi-agent systems by enhancing feature extraction and prediction, resulting in efficient and accurate path generation.

CN116011691BActive Publication Date: 2025-07-15DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211719273.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-07-15
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Traditional path planning methods for multi-agent systems, such as random search tree algorithms, often result in suboptimal paths and high computational complexity, especially in high-dimensional environments, failing to guarantee optimal paths and efficient resource use.

Method used

A distributed feedback hybrid attention network model is introduced, incorporating a feedback mechanism with a hybrid attention mechanism to enhance feature extraction and path prediction, using a U-Net architecture for generator and discriminator networks to refine path planning.

Benefits of technology

The model efficiently generates optimal paths by accurately predicting path regions, reducing computational burden and improving path planning efficiency and accuracy in multi-agent systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116011691B_ABST
    Figure CN116011691B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of path planning of multi-agent systems, and particularly relates to a distributed feedback hybrid attention network model for optimal path planning. The present invention provides a generative adversarial neural network model with feedback hybrid attention based on a distributed structure and obtains better path planning effects. The present invention restores the aggregated image features to the original image level through up-convolution, and at the same time fuses high-dimensional images and low-dimensional images, so as to complete multi-dimensional feature extraction of images and finally obtain a predicted path image. Then, the predicted path map and the real path map are input into the discriminator for iterative learning, so that the generated path prediction map is closer to the real path map. Therefore, this model can accurately generate a path prediction map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of path planning for multi-agent systems, and particularly relates to a distributed feedback hybrid attention network model for optimal path planning. Background Art

[0002] Path planning technology plays an important role in multi-agent systems such as autonomous robots, unmanned aerial vehicle swarms, and unmanned fleets. Its quality directly determines the success rate and completion degree of multi-agent tasks. The goal of the path planning problem is to generate a collision-free optimal path for multi-agents from the initial state to the target state. Traditional path planning methods are mainly based on graph network methods and heuristic algorithms, which often have the problem of local path optimality. And in a high-dimensional space environment, the algorithm has a large amount of calculation, which not only occupies memory space but also cannot guarantee the generation of an optimal path. An effective method to solve this problem is to propose a random search tree algorithm for the environmental graph, so as to guide multi-agents to move towards the target point along a safe route. When completing tasks such as item transportation, aerial cruise, and maritime reconnaissance, multi-agents can accurately avoid obstacles and have a more reasonable movement trajectory, improving work efficiency while avoiding unnecessary resource consumption.

[0003] Currently, there are the following several methods for path planning of multi-agents:

[0004] 1) Path planning method based on the random search tree algorithm.

[0005] This method determines a starting point in the environmental graph, takes this point as the root node, randomly samples the map, connects the new sampling point to the nearest node. If the connection line between the two nodes does not pass through an obstacle, the new sampling point is considered a valid node and added to the random tree; if it passes through an obstacle, the new sampling point is considered an invalid node and the next sampling continues. Until the target point enters a certain range of the random tree, the search stops, connects the target point and the final sampling point, and generates a feasible path from the starting point to the end point. This method randomly samples on the global map, has probabilistic completeness, and high search efficiency, and can ensure the generation of a feasible path from the starting point to the end point. However, this path is not necessarily the optimal path, and in the case where the gap between obstacles is small, a continuous feasible path cannot be generated, so the path planning effect of this algorithm is poor.

[0006] 2) Path planning method based on an improved random search tree algorithm.

[0007] This method takes the initial point in the environmental map as the root node and conducts random sampling in the environmental map. If the line connecting the newly sampled point and the nearest node does not pass through an obstacle, the new sampled point is added to the search tree. If it passes through an obstacle, the new sampled point is invalid and the next sampling is carried out. After each sampling, the random tree is re-wired so that the total distance of the line connecting the new sampled point to the initial point is the shortest, thus achieving the optimal overall path effect. This method can generate an optimal path from the starting point to the ending point. However, the search path of this method is the global map, with too many sampled points, and re-wiring is required after each iteration, resulting in a slow convergence speed to the optimal path.

[0008] Based on the above discussion, the generative adversarial neural network model with feedback series-parallel attention mechanism designed in the present invention based on a distributed structure can efficiently complete the path planning task of multiple agents. This patent is funded by the China Postdoctoral Science Foundation (2022TQ0179) and the National Key Research and Development Program (2022YFF0610900). Summary of the Invention

[0009] Aiming at the limitation problems brought by the random search tree algorithm and the improved random search tree algorithm in multi-agent path planning, the present invention provides a generative adversarial neural network model with feedback series-parallel attention based on a distributed structure and obtains a better path planning effect. Since the quality of path planning directly determines the task completion degree of multiple agents, the traditional random search tree algorithm and the improved random search tree algorithm generate a feasible path from the starting point to the ending point through global search of the environmental map, which has probabilistic completeness but lacks focus. Therefore, how to predict the path area in the environmental map for key sampling has always been a challenging problem.

[0010] Technical solution of the present invention:

[0011] A distributed feedback series-parallel attention network model for optimal path planning, the steps are as follows:

[0012] Step 1: Generate a real path image

[0013] (1.1) Prepare the environmental map

[0014] The environmental map is a grayscale map composed of black and white colors. As Figure 1 shown, static obstacles are represented by black, the movable area is represented by white, and two points in the figure represent the starting point and the ending point of the movement respectively.

[0015] (1.2) Select the improved random search tree algorithm to generate a real path

[0016] The input of the improved random search tree algorithm is the environment map. The starting point in the map is used as the root node of the search tree. Random sampling is performed on the environment map, and the new sampling point is X rand , find the point in the search tree that is closest to X rand , denoted as X near , connect X rand and X near , the direction from X near to X rand is the growth direction of the search tree. Select a step size Step as the growth distance of the random tree. If the distance between X near and X rand is less than Step, then X rand is the next new node X new . If the distance between X rand and X near is greater than Step, then calculate a distance of Step along the tree growth direction from X near to obtain the new node X new . Then judge whether the connection line from X near to X new passes through an obstacle. If it passes through, it means the path is invalid and the node X new is abandoned; if it does not pass through, it means the path is valid, and then X new is added to the search tree. Taking X new as the center, find the adjacent node X new within a certain radius range of X nearest , calculate the sum of the path distances from the starting point to X nearest and from X nearest to X new , and select the node X min with the minimum path distance as the new parent node to replace the original sampling point X near , and rewire the adjacent nodes of X min so that the sum of the distances from all nodes to the starting point is minimized. When the termination point enters a certain range of the search tree nodes, connect the termination point and the end node, and the set of all paths from the starting point to the end point is the real path set.

[0017] Step 2: Construct a feedback parallel - series attention mechanism model

[0018] The network structure diagram of the feedback parallel - series attention mechanism model is shown in Figure 2(a), which can be divided into a parallel - series attention network and a recurrent feedback network.

[0019] (2.1) Parallel - series attention network

[0020] The hybrid attention network body consists of three parts: channel attention mechanism, spatial attention mechanism, and position attention mechanism. The spatial attention mechanism and the position attention mechanism are in parallel and then in series with the channel attention mechanism. The spatial attention module uses the spatial relationship of features to obtain the correlation between features. The position attention module encodes a wider range of context information into local features to enhance its representation ability. The two are concatenated in the channel dimension to achieve a complementary effect. The channel attention module aggregates all feature information and assigns corresponding proportions according to the importance of channels, which can better express image information.

[0021] (2.1.1) Channel attention mechanism

[0022] We first aggregate the spatial information of the feature map through adaptive average pooling and adaptive max pooling operations to generate two different spatial image descriptions: F avg and F max , which represent the adaptive average pooling feature and the adaptive max pooling feature respectively. After passing them through the shared network, a channel map F CA is generated. The shared network consists of a multi-layer perceptron (MLP) and an activation hidden layer. The size of the hidden activation parameter is (b*c / r)*1*1, which can reduce the parameter overhead. The entire network structure is shown in Figure 2(b). The change of the image resolution parameters can be expressed as (b, c, h, w) — (b, c, 1, 1) — (b, c / r, 1, 1) — (b, c / r, 1, 1) — (b, c, 1, 1) — (b, c, 1, 1). Where b represents the number of samples in a unit batch, c represents the number of image channels, h represents the image height, w represents the image width, and r represents the hyperparameter for compressing the channel dimension.

[0023] The output of each layer of the multi-layer perceptron (MLP) is a linear function of the upper layer input. No matter how many layers the neural network has, the output is a linear combination of the input. In this case, a two-layer perceptron is selected, and a ReLu activation function is added in the middle to add non-linear elements to the neurons and increase the usability of the network:

[0024] MLP = W1(W0(x))(1)

[0025] Where MLP represents the multi-layer perceptron. The weights W0 and W1 in the MLP are shared. W0 is in front of the ReLu activation function, and W1 is behind.

[0026] The calculation process of the entire channel attention mechanism is as follows:

[0027] F avg = Adaptive AvgPool(x)(2)

[0028] F max= Adaptive MaxPool(x)(3)

[0029] F CA = σ(MLP(F avg ) + MLP(F max ))(4)

[0030] where F avg represents the adaptive average pooling feature, F max represents the adaptive max pooling feature, σ is the sigmoid activation function, AdaptiveAvgPool is the adaptive average pooling, AdaptiveMaxPool is the adaptive max pooling, and F CA represents the feature information after passing through the channel attention mechanism.

[0031] (2.1.2) Spatial Attention Mechanism

[0032] We generate a spatial attention map using the spatial relationship, perform average pooling and max pooling operations along the channel axis direction, gather all the information on the channel into a plane to obtain F avg and F max , which are merged in the channel dimension to effectively highlight the key information areas, and obtain the spatial mapping F SA through a 7×7 convolutional network. The entire network structure is shown in Figure 2(c). The change in the image resolution parameters can be expressed as (b, c, h, w) — (b, 1, h, w) — (b, 2, h, w) — (b, 2, h, w) — (b, 1, h, w). Where b represents the number of image samples in a unit batch, c represents the number of image channels, h represents the image height, and w represents the image width.

[0033] F avg = AvgPool(x)(5)

[0034] F max = MaxPool(x)(6)

[0035] F SA = σ(Conv 7*7 [F avg : F max ) (7)

[0036] where F avg represents the average pooling feature, F max represents the max pooling feature, AvgPool represents the average pooling function, MaxPool represents the max pooling function, Conv 7*7 is a 7×7 convolutional function, σ is the activation function, and F SA represents the feature information after passing through the spatial attention mechanism.

[0037] (2.1.3) Position attention mechanism

[0038] The position attention mechanism encodes image information with a wider range into local features, obtaining the correlation between different positions of the image, thereby enhancing the expression ability of image features. The entire network structure is shown in Figure 2(d).

[0039] Given a feature input A ∈ R C*H*W , passing it through a convolutional layer with a convolution kernel of 1*1 to obtain three feature maps: query Q, key K, and value V:

[0040]

[0041] where is a trainable projection matrix, and A is the initial feature input.

[0042] After convolution, {Q, K} ∈ R C*H*W , reshaping it into R C*N , where N = H * W is the number of pixels. Performing matrix multiplication between the transpose of Q and K, and passing through the softmax layer to obtain the spatial attention map:

[0043]

[0044] where s ji represents the influence of the i-th position on the j-th position. The more similar the two features are, the greater the correlation between them. exp is the matrix multiplication operation, and ∑ is the summation symbol. Summing the feature similarities from i to N, Q i and K j are the query values and key values at different positions.

[0045] Value V ∈ R C*H*W , reshaping it into R C*N , N = H * W is the number of pixels. Performing matrix multiplication between V and the transpose of S to obtain the feature map of spatial attention, and reshaping the result into R C*H*W . Finally, adding the position attention feature map to the original feature, while retaining the original image features, integrating the position features into it, making the image features have aggregation and consistency. The calculation process of position attention is as follows:

[0046]

[0047] where F PA is the image position feature, ∑ is the summation symbol, s ji represents the influence of the i-th position on the j-th position, V i are the values at different positions, and A is the initial feature input.

[0048] (2.2) Recurrent feedback network

[0049] As shown in the overall network structure of Figure 2(a), first, the initial feature (x) passes through a convolutional network with a 1*1 convolutional kernel (Conv2), and another part passes through a convolutional network with a 1*1 convolutional kernel (Conv3), a convolutional network with a 3*3 convolutional kernel (Conv4), and a convolutional network with a 1*1 convolutional kernel (Conv5). The sum of the two is the result of the first feature extraction. After that, the recurrent feedback process starts. The result obtained at time t = 0 is positively fed back to the input position. At this time, it passes through the convolutional networks of Conv3, Conv4, and Conv5 below. The recurrent feedback process at all times is expressed as follows:

[0050]

[0051]

[0052] where F represents the convolution operation, the subscript represents the name of the convolution module, the superscript represents the convolution at the t-th time, and x represents the input of the output feature.

[0053] The entire recurrent feedback process is shown in the figure. The initial feature passes through the parallel position attention mechanism and spatial attention mechanism, and the results are concatenated and then input into the channel attention mechanism. At the same time, the initial feature is input into the recurrent feedback network, and the output of the last feedback is added to the result after Conv1. The entire process is as follows:

[0054]

[0055] where F PSCAF represents the output result of the feedback hybrid attention module, F Conv1 represents the output after passing through the convolution module Conv1, F CA represents the output after passing through the channel attention module, F PA represents the output after passing through the position attention module, F SA the output after passing through the spatial attention module, the output after t times of feedback convolution.

[0056] Step 3: Generative adversarial network

[0057] (3.1) Generator network with a distributed structure

[0058] The generator network is based on the U-net network architecture, which is divided into two parts: an encoder and a decoder. The main body of the encoder consists of a convolution and a feedback series-parallel attention module with a distributed structure, as shown in Figure 3(a). In this figure, all dark squares represent convolutional networks with a convolution kernel of 4*4, a stride of 2, and a padding of 1. First, the environmental map undergoes a convolution operation to complete feature preprocessing. Each dashed square represents an independent individual under the distributed structure. The feature module sums the result of passing through the feedback series-parallel attention module with itself. After an independent individual completes its own operation process, it continues with the next feature extraction operation. The main body of the decoder consists of a transposed convolutional neural network. After the image features undergo convolution operations to complete multiple aggregations, the high-level feature map and the low-level feature map are first subjected to feature splicing, and then a transposed convolution operation is performed on them, and the two are alternated. Feature splicing ensures that context information is retained to the greatest extent, making the generated path prediction map more accurate. The transposed convolutional neural network is used to restore the image size, and finally, the prediction of the path area is completed. The loss of the generator is defined as the sigmoid cross-entropy loss function of the generated mapping and the target mapping. The loss of the generator part can be expressed as:

[0059] CE(g,t)=-[t*ln(M)+(1 - g)*ln(1 - M)](13)

[0060]

[0061] where g and t represent two sets of inputs, M represents the result after passing through the sigmoid function, and CE is the cross-entropy loss function of the two sets of inputs.

[0062] To improve anti-interference and reduce ambiguity, L1 loss (mean absolute error) is added to the loss function of the generator. The final generator function is:

[0063]

[0064] where o is the input environmental map, G(o) represents the path prediction map generated by the generator according to the input, represents the generated L1 loss function, λ is the weight coefficient of the L1 loss, and CE is the cross-entropy loss function of the two sets of inputs.

[0065] (3.2) Discriminator

[0066] The discriminator network is shown in Fig. 3(b), which includes two sets of inputs. One set is the environmental map and the real path image, and the discriminator network should judge it as true. The other pair is the global environmental map and the neural network prediction path map with a feedback series-parallel attention mechanism based on a distributed structure, and the discriminator network should judge it as false. The initial inputs are feature maps formed by splicing the two sets of images respectively, and encoding operations are performed on each set. This process mainly consists of convolution, normalization, and activation functions. The discriminator is used to distinguish the real path map and the predicted path map, so the loss function is defined as the sum of the actual loss and the generated loss:

[0067] L D = CE(G(o), 0) + CE(y, 1) (15)

[0068] where y is the real path map, o is the input environmental map, G(o) represents the path prediction map generated by the generator according to the input, and CE is the cross-entropy loss function of the two sets of inputs.

[0069] Step 4: Perform path prediction on the input environmental map

[0070] First, according to the input environmental map, the real path map is obtained through the random search tree algorithm in Step 1. Then, the environmental map is input into the generator with a feedback series-parallel attention mechanism based on a distributed structure to generate a path prediction map. Through continuous iterative learning, the path prediction map for the initial environmental map is finally obtained.

[0071] Advantages of the present invention:

[0072] The feedback hybrid attention generative adversarial network model based on a distributed structure fully extracts the features of the environmental map, obtains the predicted path set, and thus quickly plans an optimal path for multiple agents. First, the environmental map is input into the generator network, and the initial extraction of image features is completed through a convolutional neural network. Then, the processed image passes through the feedback hybrid attention mechanism with a distributed structure. The position attention mechanism obtains the attention weight by calculating the correlation between the query vector and the key vector, and then uses this weight to perform weighted calculation with the value vector to obtain the feature map, realizing the information fusion and feature extraction at different positions of the image. The spatial attention mechanism aggregates the information in the channel dimension to a spatial plane by performing maximum pooling and average pooling operations along the channel axis direction, strengthening the focus on the obstacle itself and the relative positions between obstacles. The image features processed by the position attention mechanism and the spatial attention mechanism are aggregated along the channel direction, and the channel attention mechanism assigns corresponding feature weights to different channels, realizing the full fusion of the image feature information. At the same time, the input feature map passes through a parallel convolutional neural network to complete the feature extraction under different convolutional kernels. In different time steps, the convolutional results are cyclically fed back a corresponding number of times, and the initial image features are added in each cycle feedback process, fully considering the original features while extracting the image features more deeply. Finally, the results of the cyclical feedback feature extraction and the feature results of the hybrid attention are summed, enhancing the neural network's ability to extract features from the image. The aggregated image features are restored to the original image level through upsampling, and at the same time, the high-dimensional image and the low-dimensional image are fused, so that the multi-dimensional feature extraction of the image can be completed, and finally the predicted path image is obtained. Then, the predicted path map and the real path map are input into the discriminator for iterative learning, making the generated path prediction map closer to the real path map. Therefore, this model can accurately generate the path prediction map. Description of the Drawings

[0073] Figure 1 is the environmental map.

[0074] Figure 2 is the structure diagram of the feedback hybrid attention network and the structure diagrams of its sub-parts. Among them, Figure 2(a) is the structure diagram of the feedback hybrid attention network, Figure 2(b) is the structure diagram of the channel attention network, Figure 2(c) is the structure diagram of the spatial attention network, and Figure 2(d) is the structure diagram of the position attention mechanism network.

[0075] Figure 3 is the structure diagram of the generative adversarial network. Among them, Figure 3(a) is the structure diagram of the generator network, and Figure 3(b) is the structure diagram of the discriminator network.

[0076] Figure 4 is a comparison between the actual path map and the path prediction maps under different numbers of feedbacks. Among them, Figure 4(a) is the actual path map, Figure 4(b) is the path prediction map under the series-parallel one-time feedback attention mechanism, Figure 4(c) is the path prediction map under the series-parallel two-time feedback attention mechanism, and Figure 4(d) is the path prediction map under the series-parallel four-time feedback attention mechanism. Detailed implementation manners

[0077] The following further describes the detailed implementation manners of the present invention in combination with the accompanying drawings and technical solutions.

[0078] The grayscale images are used in the present invention, where black represents obstacles and white represents the movable area. The training set and the test set are the same set of image sets. The training set is an image sequence arranged in a certain order, and the test set is a randomly shuffled image sequence. This image set contains 2,000 pictures. The first column is the environment map (map), the second column is the task map (task), and the third column is the actual path area map (roi). The image data is sourced from https: / / github.com / akanametov / pathgan / releases / download / 2.0 / dataset.zip , and the specific image test sequences are as follows:

[0079] Table 1 Image test sequence table

[0080] map task roi map_84.png task_99.png task_99_roi.png map_11.png task_18.png task_18_roi.png map_13.png task_61.png task_61_roi.png map_6.png task_20.png task_20_roi.png map_43.png task_92.png task_92_roi.png map_41.png task_73.png task_73_roi.png map_28.png task_59.png task_59_roi.png map_74.png task_2.png task_2_roi.png map_82.png task_8.png task_8_roi.png map_56.png task_36.png task_36_roi.png map_77.png task_98.png task_98_roi.png map_21.png task_81.png task_81_roi.png map_88.png task_37.png task_37_roi.png map_57.png task_11.png task_11_roi.png map_27.png task_9.png task_9_roi.png map_64.png task_3.png task_3_roi.png map_57.png task_60.png task_60_roi.png map_3.png task_92.png task_92_roi.png map_48.png task_51.png task_51_roi.png

[0081] The evaluation indexes for path prediction are the similarity degree with the actual path map and the completion degree of planning a feasible path from the starting point to the ending point.

[0082] Example:

[0083] Step 1: For the training set and the test set, first select the environment map as the initial global environment, input it into the improved random search tree algorithm to generate the real path area map. The real path map is used as the judgment criterion for the subsequent prediction results. The training set and the test set include the environment map, the task map, and the real path area map.

[0084] Step 2: Construct a deep learning model with a feedback hybrid attention mechanism based on a distributed structure. The main body of the deep learning model is a generative adversarial network, which consists of a generator and a discriminator. The generator itself is an autoencoder with a U-net architecture. The encoder part is mainly composed of convolution and a feedback hybrid attention mechanism. Each feature unit is arranged in a distributed structure. The feature unit completes its own convolution process and feedback hybrid attention process, and sums the two and passes them downwards. The entire encoder process consists of three distributed modules. The network structure can be expressed as: [Conv:Conv]—Conv—(Conv+PSCAF—Conv)—(Conv+PSCAF—Conv)—(Conv+PSCAF—Conv)—Conv. The change in the image channel parameters can be expressed as: 3—[16:16]—32—(64-64)—(128-128)—(256-256)—512, and the extraction of image features is completed in the encoder part. The decoder part is mainly composed of transposed convolution, and splices the high-level feature map and the low-level feature map, and finally generates a predicted map of the path area. The network structure can be expressed as: Up Conv—Concat—Up Conv—Concat—Up Conv—Concat—Up Conv—Concat—Conv. The change in the image channel parameters can be expressed as: 512—256—[256:256]—128—[128:128]—64—[64:64]—3. The discriminator is a fully convolutional neural network. The channel parameters of the real path map, the environment map, and the path prediction map are 3. The real path map and the environment map are spliced with the path prediction map and the environment map respectively in the channel dimension, and the two spliced images are respectively input into the discriminator network for learning. The change in the image channel parameters can be expressed as: [3:3]—64—128—256—512—512—512. (where ":" represents splicing in the channel dimension of the image resolution, Conv represents the convolutional network, PSCAF represents the feedback hybrid attention network, UpConv represents the transposed convolutional network, and Concat represents the splicing operation)

[0085] Step 3: Use the training sample set constructed in Step 1 to train the generative adversarial neural network model. The training objective function is shown in Equation (16), and the training is mainly the iterative training of the discriminator D and the generator G:

[0086] First, train the discriminator D. Select epoch samples from the training image set X train and input them into the discriminator D. Calculate the loss Loss of the discriminator using the discriminator loss function in Equation (15) DSimilarly, an equal number of samples are selected from the training image set and input into the generator G. The generated path prediction map is used to calculate the loss Loss using the generator loss function in Equation (14). G , and Loss D and Loss G are summed up, and the sum result is used to update the discriminator's gradient through the Adam function.

[0087] Next, the generator G is trained. Samples of epoch images X train are newly selected from the training image set X real , and input into the generator G to obtain the predicted path image X fake . The sample image is marked as 1, representing the real path image, and the predicted path image is marked as 0, representing the generated path image. The two are input into the discriminator for judgment. The loss loss is calculated using the generator loss function in Equation (14), and then the loss is passed to the generator to update the generator's gradient through the Adam function.

[0088] G * = argmin G max D (E o,y [logD(o,y)] + E o,z [log(1 - D(o,G(o,z)))])(16)

[0089] where y is the real path map and z is the input noise. In Equation (1), D(o,y) represents the probability that y belongs to 1, and D(o,G(o,z)) represents the probability that G(o,z) belongs to 0. min G means to make the value of the generator as small as possible, and max D means to make the value of the discriminator as large as possible.

[0090] After that, the training processes of the discriminator and the generator are continuously repeated. By continuously iteratively updating the discriminator parameters, the discriminator can accurately distinguish between the real path map and the generated path map; by continuously updating the generator parameters, the path map generated by the generator is closer to the real path map, making the probability that the generated path map is identified as the real path map by the discriminator continuously increase. After multiple training iterations, the training process of the generative adversarial neural network model is completed.

[0091] Step 4: Using the generator G in the generative adversarial neural network trained in Step 3, a set of path prediction maps are generated under the conditional input of the environmental map. The improved random search tree algorithm will perform non-uniform sampling based on the path prediction maps and finally generate the optimal path.

[0092] Implementation Results

[0093] According to the prediction results of the model with a feedback hybrid attention mechanism based on a distributed structure under four environmental maps, compare it with other methods, and at the same time compare the results of itself under different feedback times. The results are as follows:

[0094] 1) As can be seen from Figure 4, for the environmental map in Figure 1 , the path map predicted by the feedback hybrid attention neural network based on the distributed structure is very close to the actual path map, reflecting the excellent predictability of the model.

[0095] 2) As can be seen from Figure 4, according to different environmental maps and by selecting different feedback times, the path prediction effect is different, but it can ensure that the prediction result of one model is close to the real path map, reflecting the excellent universality of the model. According to different map requirements, different feedback times can be selected to achieve a better prediction effect.

[0096] Therefore, such results conform to the essential characteristics of the generative adversarial neural network model with a feedback hybrid attention mechanism based on a distributed structure. At the same time, it also proves that the generative adversarial neural network model with a feedback hybrid attention mechanism based on a distributed structure has a more accurate prediction ability for the real path area under different environmental maps.

[0097] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention and cannot be construed as limitations on the present invention. Those of ordinary skill in the art can modify and replace the above embodiments within the scope of the present invention without departing from the principles and purposes of the present invention.

Claims

1. A distributed feedback hybrid serial-parallel attention network model for optimal path planning, characterized in that The steps are as follows: Step 1: Generate the real path image (1.1) Prepare the environmental map The environmental map is a grayscale image composed of black and white. Static obstacles are represented by black, and the movable area is represented by white. Two points in the map represent the starting point and the ending point of the movement respectively. (1.2) Select the improved random search tree algorithm to generate the real path The input of the improved random search tree algorithm is the environmental map. The starting point in the map is used as the root node of the search tree. Random sampling is performed on the environmental map, and the new sampling point is X rand , find the point closest to X rand in the search tree, denoted as X near , connect X rand and X near , the direction from X near to X rand is the growth direction of the search tree. Select a step size Step as the growth distance of the random tree. If the distance between X near and X rand is less than Step, then X rand is the next new node X new . If the distance between X rand and X near is greater than Step, then calculate a distance of Step along the tree growth direction from X near to obtain the new node X new ; then judge whether the connection line from X near to X new passes through an obstacle. If it passes through, it means the path is invalid and the node X new is abandoned; If it does not pass through, indicating that the path is valid, add X new to the search tree; with X new as the center, search for adjacent nodes X new within a certain radius range of X nearest , calculate the sum of the path distance from the starting point to X nearest and the path distance from X nearest to X new , select the node X min with the minimum path distance as the new parent node to replace the original sampling point X near , and rewire the adjacent nodes of X min so that the total distance from all nodes to the starting point is minimized; When the ending point enters a certain range of the search tree nodes, connect the ending point and the terminal node. The set of all paths from the starting point to the ending point is the real path set. Step 2: Construct the feedback series-parallel attention mechanism model (2.1) Series-parallel attention network The main body of the series-parallel attention network consists of three parts: channel attention mechanism, spatial attention mechanism, and position attention mechanism. The spatial attention mechanism and the position attention mechanism are in parallel and then in series with the channel attention mechanism. The spatial attention module uses the spatial relationship of features to obtain the correlation between features. The position attention module encodes broader context information into local features to enhance its representation ability. (2.2) Recurrent feedback network First, the initial feature (x) passes through a convolutional network (Conv2) with a 1*1 convolutional kernel. Another part passes through a convolutional network (Conv3) with a 1*1 convolutional kernel, a convolutional network (Conv4) with a 3*3 convolutional kernel, and a convolutional network (Conv5) with a 1*1 convolutional kernel. The sum of the two is the result of the first feature extraction. After that, the loop feedback process starts, and the result obtained at time t = 0 is positively fed back to the input position. At this time, through the convolutional networks of Conv3, Conv4, and Conv5 below, the loop feedback process at all times is expressed as follows: Where F represents the convolution operation, the subscript represents the convolution module name, the superscript represents the convolution at the t-th moment, and x represents the input of the output feature. The entire recurrent feedback process is shown in the figure. The initial feature passes through the parallel position attention mechanism and spatial attention mechanism, and the results are concatenated and then input into the channel attention mechanism. At the same time, the initial feature is input into the recurrent feedback network, and the output of the last feedback is added to the result after Conv1. The entire process is as follows: Among them, F PSCAF represents the output result of the feedback hybrid attention module, and F Conv1 represents the output after passing through the convolutional module Conv1, and F CA represents the output after passing through the channel attention module, and F PA represents the output after passing through the position attention module, and F SA The output after passing through the spatial attention module, The output after t times of feedback convolution; Step 3: Generative adversarial network (3.1) Generator network with a distributed structure The generator network is based on the network architecture of U-net. This network is divided into two parts: an encoder and a decoder. The main body of the encoder consists of a convolution with a distributed structure and a feedback series-parallel attention module. The loss of the generator is defined as the sigmoid cross-entropy loss function of the generated mapping and the target mapping. The loss expression of the generator part is: CE(g,t)=-[t*ln(M)+(1 - g)*ln(1 - M)](13) Where g and t represent two groups of inputs, M represents the result after passing through the sigmoid function, and CE is the cross-entropy loss function of the two groups of inputs. (3.2) Discriminator The discriminator network includes two groups of inputs. One group is the environmental map and the real path image, and the discriminator network should judge it as true. The other pair is the global environmental map and the neural network prediction path map with a feedback series-parallel attention mechanism based on a distributed structure, and the discriminator network should judge it as false. Step 4: Perform path prediction on the input environmental map First, according to the input environmental map, obtain the real path map through the random search tree algorithm in Step 1. Then, input the environmental map into the generator with a feedback series-parallel attention mechanism based on a distributed structure to generate a path prediction map. Through continuous iterative learning, finally obtain the path prediction map for the initial environmental map.

2. The distributed feedback hybrid attention network model for optimal path planning according to claim 1, wherein For the series-parallel attention network in step (2.1), the specific operations are as follows: (2.1.1) Channel attention mechanism First, aggregate the spatial information of the feature map by using adaptive average pooling and adaptive max pooling operations to generate two different spatial image text descriptions: F avg and F max , representing the adaptive average pooling feature and the adaptive max pooling feature respectively. Pass them through a shared network to generate the channel map F CA ; The shared network consists of a multi-layer perceptron (MLP) and an activation hidden layer. The size of the hidden activation parameter is (b*c / r)*1*1, and the change of the image resolution parameter is expressed as (b, c, h, w) — (b, c, 1, 1) — (b, c / r, 1, 1) — (b, c / r, 1, 1) — (b, c, 1, 1) — (b, c, 1, 1); where b represents the number of samples in a unit batch, c represents the number of image channels, h represents the image height, w represents the image width, and r represents the hyperparameter for compressing the channel dimension; The output of each layer of the multi-layer perceptron (MLP) is a linear function of the input of the upper layer. No matter how many layers the neural network has, the output is a linear combination of the input. (2.1.2) Spatial attention mechanism Generate a spatial attention map using spatial relationships, perform average pooling and max pooling operations along the channel axis, aggregate all information on the channel into a plane to obtain F avg and F max , the two are merged in the channel dimension to effectively highlight the key information area, and a spatial mapping F SA is obtained through a 7×7 convolutional network; the change in the image resolution parameter is expressed as (b, c, h, w) — (b, 1, h, w) — (b, 2, h, w) — (b, 2, h, w) — (b, 1, h, w); where b represents the number of image samples in a unit batch, c represents the number of image channels, h represents the image height, and w represents the image width; F avg = AvgPool(x)(5) F max = MaxPool(x)(6) F SA = σ(Conv 7*7 [F avg :F max )(7) Among them, F avg represents the average pooling feature, and F max represents the max pooling feature. AvgPool represents the average pooling function, MaxPool represents the max pooling function, and Conv 7*7 is a 7×7 convolutional function, σ is the activation function, and F SA represents the feature information after passing through the spatial attention mechanism; (2.1.3) Position Attention Mechanism Encode image information with a wider range into local features through the position attention mechanism to obtain the correlation between different positions of the image; Given a feature input \(A\in\mathbb{R}\) C*H*W , passing it through a convolutional layer with a \(1\times1\) convolutional kernel to obtain three feature map queries \(Q\), keys \(K\), and values \(V\): wherein is a trainable projection matrix, and A is the initial feature input; After convolution, {Q, K} ∈ R C*H*W , reshape it to R C*N , where N = H * W is the number of pixels, perform matrix multiplication between the transpose of Q and K, and obtain the spatial attention map through the softmax layer: where s ji represents the influence of the i-th position on the j-th position. The more similar their features are, the greater the correlation between them. exp is the matrix multiplication operation, and ∑ is the summation symbol, which sums the feature similarities from i to N. Q i and K j are the query value and key value at different positions; Value V ∈ R C*H*W , reshape it to R C*N , N = H * W is the number of pixels. Perform matrix multiplication on V and the transpose of S to obtain the feature map of spatial attention, and reshape the result to R C*H*W , finally add the position attention feature map to the original feature. While retaining the original image features, the position features are incorporated into them, making the image features have aggregation and consistency; the calculation process of position attention is as follows: where F PA is the image position feature, ∑ is the summation symbol, s ji represents the influence of the i-th position on the j-th position, V i is the value at different positions, and A is the initial feature input.

3. The distributed feedback hybrid attention network model for optimal path planning according to claim 2, wherein The output of each layer of the described multi-layer perceptron (MLP) is a linear function of the input of the upper layer. No matter how many layers the neural network has, the output is a linear combination of the input. In this case, a two-layer perceptron is selected, and a ReLu activation function is added in the middle to add non-linear elements to the neurons and increase the usability of the network: MLP = W1(W0(x))(1) Where MLP represents the multi-layer perceptron. The weights W0 and W1 in the MLP are shared. W0 is in front of the ReLu activation function, and W1 is behind it; The calculation process of the entire channel attention mechanism is as follows: F avg = AdaptiveAvgPool(x)(2) F max = AdaptiveMaxPool(x)(3) F CA = σ(MLP(F avg ) + MLP(F max ))(4) Among them, F avg represents the adaptive average pooling feature, and F max represents the adaptive max pooling feature. σ is the sigmoid activation function, AdaptiveAvgPool is the adaptive average pooling, AdaptiveMaxPool is the adaptive max pooling, and F CA represents the feature information after passing through the channel attention mechanism.

4. A distributed feedback hybrid serial-parallel attention network model for optimal path planning according to claim 1 or 2 or 3, characterized in that For the generator network with a distributed structure in step (3.1), in order to improve anti-interference and reduce ambiguity, L1 loss is added to the loss function of the generator. The final generator function is: where \(o\) is the input environmental map, and \(G(o)\) represents the path prediction map generated by the generator according to the input. It represents the generated L1 loss function, \(\lambda\) is the weight coefficient of the L1 loss, and CE is the cross-entropy loss function of two groups of inputs.

5. A distributed feedback hybrid serial-parallel attention network model for optimal path planning as claimed in claim 1 or 2 or 3, characterized in that, The discriminator network in step (3.2) is specifically: The initial input is the feature maps stitched together from two groups of images respectively. Encoding operations are performed on each group. This process mainly consists of convolution, normalization, and activation functions; the discriminator is used to distinguish the real path map and the predicted path map, so the loss function is defined as the sum of the actual loss and the generated loss: L D = CE(G(o), 0) + CE(y, 1)(15) Where y is the real path map, o is the input environmental map, G(o) represents the path prediction map generated by the generator according to the input, and CE is the cross-entropy loss function of the two groups of inputs.

6. The distributed feedback hybrid attention network model for optimal path planning according to claim 4, wherein The discriminator network in step (3.2) is specifically: The initial input is the feature maps stitched together from two groups of images respectively. Encoding operations are performed on each group. This process mainly consists of convolution, normalization, and activation functions; the discriminator is used to distinguish the real path map and the predicted path map, so the loss function is defined as the sum of the actual loss and the generated loss: L D = CE(G(o), 0) + CE(y, 1) (15) Where y is the real path map, o is the input environmental map, G(o) represents the path prediction map generated by the generator according to the input, and CE is the cross-entropy loss function of the two groups of inputs.

Citation Information

Patent Citations

  • Health and safety monitoring system for personnel on board based on wireless sensor network

    CN102088471A

  • Quadruped robot path planning method based on DRL

    CN114859911A