Path planning method based on self-attention enhancement under unstructured terrain

By employing a path planning method that combines offline global learning with online local decision-making, and utilizing a self-attention-enhanced network architecture, the problem of decision failure in unknown unstructured terrain is solved, enabling autonomous navigation and efficient path planning for vehicles in unknown environments.

CN122258907APending Publication Date: 2026-06-23ANHUI UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIV OF SCI & TECH
Filing Date
2026-03-25
Publication Date
2026-06-23

Smart Images

  • Figure CN122258907A_ABST
    Figure CN122258907A_ABST
Patent Text Reader

Abstract

The application discloses a path planning method based on self-attention enhancement under unstructured terrain and relates to the technical field of automatic driving decision planning. The method comprises the following steps: constructing an offline global training field containing diversified slope combinations; establishing a physical mapping model of terrain slope and energy consumption to quantify path cost; constructing a normalized multi-channel terrain feature map, introducing a self-attention mechanism to capture long-distance spatial dependence to predict slope trends; building a double deep Q network and combining distance-energy coupling reward functions for training to learn an optimal decision model; and in the online stage, only local features are obtained by using vehicle-mounted sensors to output an optimal action sequence in real time. The application realizes autonomous navigation of a vehicle under no global terrain information through an offline global learning and online local perception mode, effectively overcomes decision failure caused by lack of prior map data in traditional methods, and significantly improves the working capacity of the vehicle in unknown unstructured terrain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving decision-making and planning technology, and in particular to a path planning method based on self-attention enhancement in unstructured terrain. Background Technology

[0002] In applications such as wilderness rescue, geological exploration, and military reconnaissance, unmanned ground vehicles often need to perform long-distance travel in unstructured terrains such as deserts, Gobi, or undulating mountains. Because these environments often lack pre-built global high-precision maps, or because environmental features dynamically change with geological activity, vehicles must rely on local environmental information acquired by onboard sensors for autonomous path planning. Current mainstream technologies typically employ an architecture combining deep reinforcement learning and convolutional neural networks, utilizing convolutional layers to extract local terrain features and using the reduction of the geometric Euclidean distance from the starting point to the destination as the primary optimization objective.

[0003] However, traditional methods often fail to make decisions due to the lack of prior map data, thus limiting the ability of vehicles to operate in unknown, unstructured terrain. Summary of the Invention

[0004] To overcome the above shortcomings, this invention provides a path planning method based on self-attention enhancement for unstructured terrain, aiming to improve the problem that traditional methods often fail due to the lack of prior map data, thus limiting the vehicle's ability to operate in unknown unstructured terrain.

[0005] This invention provides the following technical solution: a path planning method based on self-attention enhancement for unstructured terrain, comprising the following steps:

[0006] S1: Obtain global elevation data of the task area and calculate the slope matrix to construct an offline global training field containing diverse slope combinations; S2: Based on the gravity component of the vehicle along the slope and the rolling resistance at different slopes, calculate the work component and establish a physical mapping model between terrain slope and energy consumption to quantify path cost. S3: After normalizing the elevation and slope data, stack the channel dimensions to construct a multi-channel terrain feature map representing the local environment, which serves as the input tensor for training the network. S4: Introduce a self-attention mechanism into the network architecture. By calculating the correlation weights between different locations in the topographic map, capture the long-distance spatial dependence of the terrain and realize the prediction of slope trends. S5: Construct a dual-deep Q-network architecture and combine it with a distance-energy-consumption coupled reward function for training in a global environment; optimize the cumulative reward by separating action selection and target estimation, and learn the optimal decision model for path planning; S6. In the online execution phase, only the on-board sensors are used to acquire local terrain features within a preset range. These features are then input into the trained model, and the globally optimal action sequence, which balances energy efficiency and distance, is output in real time through the local field of view.

[0007] By adopting the above technical solution, the offline global learning and online local perception mode realizes autonomous vehicle navigation without global terrain information, effectively overcoming the decision failure caused by the lack of prior map data in traditional methods, and significantly improving the vehicle's operating capability in unknown unstructured terrain.

[0008] Preferably, in step S1, constructing the offline global training field containing diverse slope combinations includes: Obtain the global elevation map of the task area and traverse every grid point within it; Calculate the gradient vectors of the current grid point in the horizontal and vertical directions, and use the magnitude of the gradient vectors as the slope value at that location to generate a global slope matrix; The global elevation map and the global slope matrix are used as a simulation environment for vehicles to perform all-terrain traversal training.

[0009] Preferably, in step S2, establishing the physical mapping model between terrain slope and energy consumption includes: Obtain the vehicle's current slope angle and the displacement distance generated by a single action; Calculate the component of the work done by the vehicle against gravity based on the vehicle's mass, gravitational acceleration, and the sine of the slope angle. Calculate the component of the work done by the vehicle against the rolling resistance of the ground based on the vehicle mass, gravitational acceleration, ground friction coefficient, and the cosine value of the slope angle. The physical energy consumption value is obtained by summing the component of work done by gravity and the component of work done by rolling resistance and multiplying it by the displacement distance.

[0010] Preferably, in step S3, constructing a multi-channel terrain feature map representing the local environment includes: Using the vehicle's current location as the center, a region within a preset observation radius is selected as a local observation window; The elevation and slope data within the local observation window are mapped to the [0, 1] interval for normalization. A three-dimensional data tensor is constructed, with normalized elevation data as the first channel and normalized slope data as the second channel, and the data are stacked in the channel dimension.

[0011] Preferably, in step S4, introducing a self-attention mechanism into the network architecture includes: The multi-channel terrain feature map is input into a convolutional layer to extract the initial feature sequence; Configure three independent trainable linear transformation matrices; The initial feature sequence is processed by the three linear transformation matrices to generate a query matrix, a key matrix, and a value matrix.

[0012] Preferably, in step S4, calculating the correlation weights between different locations on the topographic map includes: Calculate the dot product between the query matrix and the transposed key matrix; The result of the dot product is smoothed by division using a scaling factor, and the attention weight distribution is generated using a normalized exponential function. The attention weight distribution is weighted and summed with the value matrix to output a self-attention enhancement feature that includes global dependencies.

[0013] Preferably, in step S5, the construction of the dual-depth Q-network architecture includes: Construct a current network and a target network with identical structures; The target network is used to evaluate the maximum action value of the next state, and the target value is calculated as a supervision signal by combining the distance-energy consumption coupled reward function. Calculate the mean square error loss between the predicted value of the current network output and the supervision signal, and update the parameters of the current network based on this loss.

[0014] Preferably, in step S5, the combined distance-energy coupling reward function includes: Distance rewards include step length rewards that are negatively correlated with single-step movement distance and global distance rewards that are negatively correlated with destination distance; The energy consumption bonus is obtained by multiplying the physical energy consumption value calculated based on the physical mapping model by the intensity factor and taking the negative value. The finish line reward is an incentive signal set to a fixed positive value; The overall reward is obtained by weighted summation of three items: distance reward, energy consumption reward, and destination reward.

[0015] Preferably, in step S6, the online execution phase includes: The vehicle uses an onboard LiDAR or depth camera to scan a 200-meter radius area centered on the vehicle in real time. Without loading a global map, the optimal path to the destination is planned in real time using the trained model based solely on the local terrain features within the specified area.

[0016] Preferably, in step S6, the real-time output of the globally optimal action sequence that balances energy efficiency and distance through a local view includes: The five candidate commands are: left turn first angle, left turn second angle, go straight, right turn second angle, and right turn first angle; The value of the first angle is set to be greater than the value of the second angle in order to achieve graded control of the vehicle's steering amplitude.

[0017] The present invention has the following beneficial effects: 1. To address the problem of traditional path planning relying heavily on global maps, leading to decision-making paralysis in unknown areas, this invention proposes an "offline global learning, online local decision-making" model. By constructing a global training field offline, the model pre-learns terrain and energy consumption patterns. In the online phase, it eliminates reliance on complete global information, using only local sensor features to deduce the optimal global action. This mechanism enables autonomous navigation in environments with incomplete information, significantly improving the vehicle's survivability and mission robustness in unknown, unstructured scenarios.

[0018] 2. To address the challenges of complex geomorphic features and weak local correlations in unstructured terrain, this invention introduces a self-attention mechanism into the network architecture. By calculating the spatial correlation weights across regions in the topographic map, it effectively compensates for the limited receptive field of traditional convolution operators, significantly improving the model's accuracy in predicting long-distance slope trends and its ability to enhance complex terrain features. Attached Figure Description

[0019] Figure 1 This is a flowchart of the self-attention-enhanced path planning method for unstructured terrain proposed in this invention; Figure 2 This is a schematic diagram of the reinforcement learning model for the path planning method based on self-attention enhancement under unstructured terrain proposed in this invention; Figure 3 This is a network architecture diagram of the self-attention-enhanced path planning method for unstructured terrain proposed in this invention. Figure 4 This is a schematic diagram of the discrete action space of the path planning method based on self-attention enhancement under unstructured terrain proposed in this invention; Figure 5 This is a self-attention calculation logic diagram of the path planning method based on self-attention enhancement under unstructured terrain proposed in this invention; Figure 6 This is a flowchart illustrating the physical energy consumption update process of the self-attention-enhanced path planning method for unstructured terrain proposed in this invention. Detailed Implementation

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

[0021] Example 1: In a first embodiment of the present invention, the present invention provides a path planning method based on self-attention enhancement for unstructured terrain, such as... Figures 1-6 As shown, it includes the following steps: S1: Obtain global elevation data of the task area and calculate the slope matrix to construct an offline global training field containing diverse slope combinations; Furthermore, in step S1, constructing an offline global training field containing diverse slope combinations includes: Obtain the global elevation map of the task area and traverse every grid point within it; Calculate the gradient vectors of the current grid point in the horizontal and vertical directions, and use the magnitude of the gradient vectors as the slope value at that location to generate a global slope matrix; The global elevation map and global slope matrix are used as the simulation environment for vehicles to perform all-terrain traversal training.

[0022] Specifically, the core function of step S1 is to construct an offline simulation environment with complete physical properties, providing a fundamental data source containing geometric undulations and dynamic drag features for subsequent reinforcement learning model training. Through offline preprocessing, the original geospatial data is transformed into input parameters adapted to the vehicle dynamics model.

[0023] In the specific implementation process, the global elevation data covering the task area is first obtained, and the global elevation matrix is ​​defined as follows: To quantify the specific impact of terrain geometry on vehicle drag, spatial gradient calculation of the elevation data is required. (Torrent traversal) Each discrete grid point in The gradient components of the point in the horizontal and vertical directions are calculated using the central difference method.

[0024] The slope value at a given location is determined based on the magnitude of the gradient vector. The specific mathematical calculation model is as follows: ; in Representing coordinates The local slope scalar value at the location; and These represent the terrain elevation values ​​of the current grid point in the horizontal x-axis direction, corresponding to the preceding and following grid points. and These represent the terrain elevation values ​​of the previous and next adjacent grid points along the vertical y-axis of the current grid point, respectively. This indicates the physical spacing resolution of the raster map along the x-axis. The y-axis represents the physical spacing resolution of the raster map; the two terms inside the square root represent the squares of the partial derivatives of the surface surface in two orthogonal directions.

[0025] After completing the traversal calculation, generate and A dimensionally consistent global slope matrix The system will and The system is mapped to a physical simulation environment. In this environment, the vehicle agent can perceive the rate of change of gravitational potential energy and the ground support angle at different coordinate points, thereby traversing diverse slope combinations in the offline stage and providing complete state-space samples for establishing the nonlinear mapping relationship between slope and energy consumption.

[0026] S2: Based on the gravity component of the vehicle along the slope and the rolling resistance at different slopes, calculate the work component and establish a physical mapping model between terrain slope and energy consumption to quantify path cost. Furthermore, in step S2, establishing a physical mapping model between terrain slope and energy consumption includes: Obtain the vehicle's current slope angle and the displacement distance generated by a single action; Calculate the component of the work done by the vehicle against gravity based on the vehicle's mass, gravitational acceleration, and the sine of the slope angle. Calculate the component of the work done by the vehicle against the rolling resistance of the ground based on the vehicle's mass, gravitational acceleration, ground friction coefficient, and the cosine of the slope angle. The physical energy consumption value is obtained by summing the components of work done by gravity and work done by rolling resistance and multiplying the sum by the displacement distance.

[0027] Specifically, the core function of step S2 is to establish a quantitative mapping relationship between terrain geometry attributes and vehicle energy consumption, transforming abstract slope characteristics into concrete physical energy consumption costs, thereby providing the path planning algorithm with an optimization objective based on dynamic constraints. Through this step, the system can accurately calculate the mechanical work consumption of the vehicle under different terrain undulations.

[0028] First, obtain the vehicle's slope angle data at the current time step and the preset single-action displacement distance. Based on the vehicle dynamics model, calculate the gravitational drag component and rolling resistance component experienced by the vehicle on the slope.

[0029] The fundamental mechanical components for calculating the work done by a vehicle against gravity along a slope The calculation formula is as follows: ; in Indicates the vehicle's curb weight; Represents the gravitational acceleration constant; Indicates the local slope angle of the vehicle's current position; The value of is the sine of the slope angle. This formula represents the component of gravity along the slope that a vehicle needs to overcome during the uphill process.

[0030] The fundamental mechanical components for calculating the work done by a vehicle against ground rolling resistance The calculation formula is as follows: ; in It represents the ground rolling resistance coefficient, used to quantify the frictional characteristics when a tire is in contact with an unstructured terrain surface; The value is the cosine of the slope angle. This term is used to calculate the normal force perpendicular to the slope, and then to derive the rolling friction force.

[0031] Based on the two components mentioned above, calculate the physical energy consumption value generated by the vehicle performing a single action. The calculation formula is as follows: ; in This indicates the displacement distance generated by the vehicle performing a single action; This represents the total mechanical energy consumed by the vehicle to complete the displacement. This physical energy consumption value... The key parameters are output to the multi-objective reward function module to update the parameters of the deep reinforcement learning network, forcing the model to actively identify and avoid factors that could lead to corruption during training. High-energy-consuming terrain with soaring values.

[0032] S3: After normalizing the elevation and slope data, stack the channel dimensions to construct a multi-channel terrain feature map representing the local environment, which serves as the input tensor for training the network. Furthermore, in step S3, constructing a multi-channel terrain feature map representing the local environment includes: Using the vehicle's current location as the center, a region within a preset observation radius is selected as a local observation window; The elevation and slope data within the local observation window are mapped to the [0, 1] interval for normalization. A three-dimensional data tensor is constructed, with normalized elevation data as the first channel and normalized slope data as the second channel, and the data are stacked in the channel dimension.

[0033] Specifically, step S3 aims to construct a deglobalized state space input, ensuring that the path planning model relies solely on local information perceived by onboard sensors for computation, and eliminating the influence of different physical dimensions on the gradient descent of the neural network.

[0034] The system uses the vehicle's current coordinates as the center and extracts terrain information within a preset observation radius. The observation radius is set as... Extracting local elevation matrices from global data With local slope matrix In this embodiment The value is 200 meters, and the corresponding matrix dimension is... .

[0035] To eliminate differences in physical dimensions, normalization operations are performed on the two matrices mentioned above, mapping the data to the [0,1] interval. The normalized elevation data is shown below. With slope data The calculation logic is as follows: ; ; in and These represent the minimum and maximum values ​​of elevation data within the observation window, respectively. and These represent the minimum and maximum values ​​of the slope data within the observation window, respectively.

[0036] The normalized data is stacked along the channel dimension to construct a three-dimensional state tensor. Its mathematical expression is: ; in This represents a tensor splicing operation along the depth channel direction. The generated... Dimensions This tensor is used as a multi-channel local terrain feature map input to subsequent convolutional neural network layers.

[0037] S4: Introduce a self-attention mechanism into the network architecture. By calculating the correlation weights between different locations in the topographic map, capture the long-distance spatial dependence of the terrain and realize the prediction of slope trends. Furthermore, in step S4, the introduction of a self-attention mechanism into the network architecture includes: The multi-channel terrain feature map is input into the convolutional layer to extract the initial feature sequence; Configure three independent trainable linear transformation matrices; The initial feature sequence is operated on with three linear transformation matrices to generate a query matrix, a key matrix, and a value matrix.

[0038] In step S4, the correlation weights between different locations on the topographic map are calculated, including: Calculate the dot product between the query matrix and the transposed key matrix; The results of the dot product are smoothed by division using a scaling factor, and the attention weight distribution is generated using a normalized exponential function. The attention weight distribution is weighted and summed with the value matrix to output a self-attention enhancement feature that includes global dependencies.

[0039] Specifically, the core function of step S4 is to overcome the physical limitations of the local receptive field of convolutional neural networks. By calculating the correlation strength between any two pixels in the terrain feature map, it captures long-distance spatial dependencies. This processing mechanism enables the model to perceive the undulation trend of the terrain from a global perspective, identify distant continuous steep slopes or complex terrain structures, and thus provide forward-looking global feature input for path planning.

[0040] First, the initial feature sequence output from the convolutional feature extraction layer is received. Configure three independent weight matrices with trainable parameters. , and These three weight matrices are used to weight the initial feature sequence. Perform linear transformations to map the results to the query space, key space, and value space respectively, generating a query matrix. Key matrix Sum matrix The specific matrix operation formulas are as follows: ; ; ; in This represents the initial feature sequence containing terrain geometry information as input. , and These represent the query weight matrix, key weight matrix, and value weight matrix, respectively. , and These represent the generated query matrix, key matrix, and value matrix, respectively.

[0041] Then the query matrix is ​​calculated. AND key matrix The dot product between the transposes of the matrices is used to measure the original correlation between locations in the feature map. To prevent the dot product from becoming too large in high-dimensional space, which could lead to unstable gradient calculations, a scaling factor is introduced. The dot product result is smoothed by division to obtain the scaled similarity score matrix. The calculation formula is as follows: ; in The transpose of the key matrix; The numerical value representing the dimension of the key vector; for The square root of the product is used as a scaling factor to adjust the magnitude of the inner product value.

[0042] Using the normalized exponential function For the scaled similarity score matrix Normalization is performed to transform the scores into attention weight matrices in probability distribution form. The calculation formula is as follows: ; in The function operates on a specific dimension of the matrix to ensure the generation of the attention weight matrix. The sum of the values ​​of the elements in each row is 1, and this weight value represents the degree of attention the model pays to different terrain locations when making decisions.

[0043] Finally, the calculated attention weight matrix AND-value matrix A weighted summation operation is performed to generate self-attention enhanced features that incorporate global contextual information. The calculation formula is as follows: ; in This represents the final output self-attention-enhanced feature tensor. This feature tensor aggregates the spatial dependency information of the global terrain and is then passed to the decision layer of the dual-deep Q-network for action value evaluation.

[0044] S5: Construct a dual-deep Q-network architecture and combine it with a distance-energy-consumption coupled reward function for training in a global environment; optimize the cumulative reward by separating action selection and target estimation, and learn the optimal decision model for path planning; Furthermore, in step S5, building the dual-depth Q-network architecture includes: Construct a current network and a target network with identical structures; The target network is used to evaluate the maximum action value of the next state, and the target value is calculated as a supervision signal by combining the distance-energy consumption coupled reward function. Calculate the mean squared error loss between the predicted value of the current network output and the supervision signal, and update the parameters of the current network based on this loss.

[0045] In step S5, the distance-energy coupling reward function includes: Distance rewards include step length rewards that are negatively correlated with single-step movement distance and global distance rewards that are negatively correlated with destination distance; The energy consumption bonus is obtained by multiplying the physical energy consumption value calculated based on the physical mapping model by the intensity factor and taking the negative value. The finish line reward is an incentive signal set to a fixed positive value; The overall reward is obtained by weighted summation of three items: distance reward, energy consumption reward, and destination reward.

[0046] Specifically, step S5 addresses the overestimation problem in traditional Q-learning by utilizing a dual-deep Q-network architecture. It also transforms the physical mapping model established in step S2 into a supervisory signal for model training by introducing a multi-objective reward function that couples physical energy consumption with distance. This step guides the agent to weigh driving efficiency against energy consumption in the discrete action space, ultimately converging to the globally optimal path planning strategy.

[0047] First, construct the current Q-network and the target Q-network with identical structures. At each training step... In this context, the current Q-network is used to evaluate the current state. Take action below The value of the target Q-network is used to compute the next state. Target value .

[0048] ; in This represents the immediate reward value obtained at the current time step; This represents the discount factor, used to adjust the weight of future rewards on the current decision; This represents the weight parameters of the current Q-network; These represent the weight parameters of the target Q-network; This represents the output value of the target Q-network; This represents the action with the greatest value in the next state, selected using the current Q-network.

[0049] Calculate the mean squared error loss function of the current network based on the target value. The calculation formula is as follows: ; in This indicates the current state of the Q network. Next action The predicted Q-value is obtained. This loss function is minimized using the gradient descent algorithm, and the parameters of the current Q-network are updated. .

[0050] To guide the convergence direction of the aforementioned network, a multi-objective comprehensive reward function is constructed. This function is based on the distance reward item. Energy consumption incentive items and finish line bonus The weighted composition, its mathematical expression is as follows:

[0051] in , and These are the weighting coefficients for distance reward, energy reward, and finish line reward, respectively. Distance reward item. Rewards based on single-step distance and global distance reward The composition and calculation formula are as follows: ; ; ; in The single-step distance reward intensity factor; This represents the three-dimensional Euclidean distance between the current point and adjacent planned points. This is the global distance reward intensity factor; This calculates the distance from the point to the destination coordinates for the next time step. Negative values ​​force the model to find a shorter path.

[0052] Energy consumption bonus Based on the physical energy consumption value output in step S2 The calculation is performed using the following formula: ; in Energy consumption reward intensity factor; This is the physical energy consumption value calculated based on the vehicle dynamics model. This value uses a negative feedback mechanism to penalize high-energy-consuming actions and discourage the vehicle from entering areas with high gradients or high resistance.

[0053] Finish line bonus It is set to a fixed positive value and is triggered when the vehicle reaches the preset destination area, serving as a sparse reward signal for completing the task.

[0054] S6. In the online execution phase, only the vehicle-mounted sensors are used to acquire local terrain features within a preset range. These features are then input into the trained model, and the globally optimal action sequence that balances energy efficiency and distance is output in real time through the local field of view. Furthermore, in step S6, the online execution phase includes: The vehicle uses an onboard LiDAR or depth camera to scan a 200-meter radius area centered on the vehicle in real time. Without loading a global map, the trained model can plan the optimal path to the destination in real time based solely on local terrain features within the area.

[0055] In step S6, the globally optimal action sequence that balances energy efficiency and distance is output in real time through a local viewpoint, including: The five candidate commands are: left turn first angle, left turn second angle, go straight, right turn second angle, and right turn first angle; The value of the first angle is set to be greater than the value of the second angle in order to achieve graded control of the vehicle's steering amplitude.

[0056] Specifically, step S6, as the online inference and execution stage of the entire path planning method, plays a crucial role in deploying the offline-trained policy model to the physical vehicle or online simulation, solving the "blind guidance" problem in unstructured and unknown environments. At this stage, the system eliminates its reliance on a global prior map, making real-time decisions entirely based on the local state space constructed by onboard sensors. Utilizing the forward propagation capability of neural networks, it outputs control commands that satisfy physical energy consumption constraints and optimal geometric distance within milliseconds.

[0057] The system first activates the onboard environmental perception module, using LiDAR or a depth camera to scan a sector in front of the vehicle's heading. The perception radius is set to... Acquire real-time local point cloud data and map it into a local terrain elevation matrix. With local slope matrix .

[0058] The aforementioned local matrices are constructed as the state tensor at the current moment. The input is fed into a deep reinforcement learning model whose parameters have been fixed. The model's output layer corresponds to a discrete action space. Using a greedy strategy to select actions with maximum value Q The instruction with the value is the current optimal action. The mathematical expression of this decision-making process is as follows: ; in This represents the current state input, which is composed of local terrain features. Represents a pre-defined set of discrete actions; This indicates the network weight parameters that have been trained and frozen. Indicates the state Take action below The predictive value; Operators are used to extract the maximum Q The action index corresponding to the value.

[0059] To adapt to the complex obstacle avoidance requirements of unstructured terrain and ensure control stability, a discrete action space is defined. It contains five levels of steering commands. Action set. The mathematical definition of is as follows: ; Corresponding to a specific set of steering angles : ; in, and The first large-angle maneuvers corresponding to left and right turns respectively have an absolute steering angle of [value missing]. ; and The second-level small-angle maneuvers, corresponding to left and right turns respectively, have an absolute steering angle of [value missing]. ; The steering angle is 0 for the straight-ahead command.

[0060] To achieve a hierarchical control logic that combines coarse and fine adjustments, the above angle parameters must satisfy the following inequality constraints: The system will calculate the optimal action. This information is converted into drive-by-wire signals from the chassis, which in turn drive the vehicle to perform corresponding steering and propulsion maneuvers. As the vehicle's position is updated, the aforementioned perception-decision-execution process iterates at a fixed frequency until the vehicle reaches the preset destination coordinates.

[0061] Example 2: This technology is applied to unmanned vehicles for emergency rescue or material transport missions in unstructured outdoor environments (such as the Gobi Desert, deserts, or undulating mountains). In such scenarios with incomplete information and missing map data, vehicles can only rely on onboard LiDAR or depth cameras to obtain local terrain information, and face the dual constraints of limited battery power and variable ground resistance.

[0062] The main technical obstacles faced by existing technologies in such scenarios include: First, traditional algorithms rely on complete prior maps and cannot compute the global optimum in unknown environments with only local perception; second, existing methods based on ordinary convolutional neural networks are limited by local receptive fields, making it difficult to capture long-distance spatial dependencies of terrain to predict distant slope trends; third, existing decision-making mechanisms typically ignore the nonlinear effects of terrain slope and ground friction on vehicle dynamics and energy consumption, causing vehicles to forcibly traverse high-gravity potential energy areas in pursuit of geometrically short paths, resulting in unnecessary energy loss. To address these issues, this invention employs a path planning method based on self-attention enhancement for unstructured terrain, the structure of which is as follows: Figure 1As shown. The specific implementation process of this method is as follows: By constructing an offline global training field containing diverse slope combinations, a physical mapping model based on gravity work and rolling resistance is established, transforming terrain geometric features into quantified physical energy consumption costs. On this basis, a normalized multi-channel terrain feature map is used as input, and a self-attention mechanism is introduced into the network architecture to capture long-distance spatial dependencies to predict slope trends. A dual-depth Q-network is trained in conjunction with a distance-energy consumption coupled reward function. Finally, in the online execution phase, the dependence on the global prior map is cut off, and the system outputs globally optimal control commands that take into account both driving energy efficiency and geometric distance in real time, relying solely on the local terrain features obtained by the vehicle sensors.

[0063] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A path planning method based on self-attention enhancement for unstructured terrain, characterized in that, Includes the following steps: S1: Obtain global elevation data of the task area and calculate the slope matrix to construct an offline global training field containing diverse slope combinations; S2: Based on the gravity component of the vehicle along the slope and the rolling resistance at different slopes, calculate the work component and establish a physical mapping model between terrain slope and energy consumption to quantify path cost. S3: After normalizing the elevation and slope data, stack the channel dimensions to construct a multi-channel terrain feature map representing the local environment, which serves as the input tensor for training the network. S4: Introduce a self-attention mechanism into the network architecture. By calculating the correlation weights between different locations in the topographic map, capture the long-distance spatial dependence of the terrain and realize the prediction of slope trends. S5: Construct a dual-deep Q-network architecture and combine it with a distance-energy-consumption coupled reward function for training in a global environment; optimize the cumulative reward by separating action selection and target estimation, and learn the optimal decision model for path planning; S6. In the online execution phase, only the on-board sensors are used to acquire local terrain features within a preset range. These features are then input into the trained model, and the globally optimal action sequence, which balances energy efficiency and distance, is output in real time through the local field of view.

2. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S1, constructing an offline global training field containing diverse slope combinations includes: Obtain the global elevation map of the task area and traverse every grid point within it; Calculate the gradient vectors of the current grid point in the horizontal and vertical directions, and use the magnitude of the gradient vectors as the slope value at that location to generate a global slope matrix; The global elevation map and the global slope matrix are used as a simulation environment for vehicles to perform all-terrain traversal training.

3. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S2, establishing the physical mapping model between terrain slope and energy consumption includes: Obtain the vehicle's current slope angle and the displacement distance generated by a single action; Calculate the component of the work done by the vehicle against gravity based on the vehicle's mass, gravitational acceleration, and the sine of the slope angle. Calculate the component of the work done by the vehicle against the rolling resistance of the ground based on the vehicle mass, gravitational acceleration, ground friction coefficient, and the cosine value of the slope angle. The physical energy consumption value is obtained by summing the component of work done by gravity and the component of work done by rolling resistance and multiplying it by the displacement distance.

4. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S3, constructing a multi-channel terrain feature map representing the local environment includes: Using the vehicle's current location as the center, a region within a preset observation radius is selected as a local observation window; The elevation and slope data within the local observation window are mapped to the [0, 1] interval for normalization. A three-dimensional data tensor is constructed, with normalized elevation data as the first channel and normalized slope data as the second channel, and the data are stacked in the channel dimension.

5. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S4, the introduction of a self-attention mechanism into the network architecture includes: The multi-channel terrain feature map is input into a convolutional layer to extract the initial feature sequence; Configure three independent trainable linear transformation matrices; The initial feature sequence is processed by the three linear transformation matrices to generate a query matrix, a key matrix, and a value matrix.

6. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S4, calculating the correlation weights between different locations on the topographic map includes: Calculate the dot product between the query matrix and the transposed key matrix; The result of the dot product is smoothed by division using a scaling factor, and the attention weight distribution is generated using a normalized exponential function. The attention weight distribution is weighted and summed with the value matrix to output a self-attention enhancement feature that includes global dependencies.

7. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S5, the construction of the dual-deep Q-network architecture includes: Construct a current network and a target network with identical structures; The target network is used to evaluate the maximum action value of the next state, and the target value is calculated as a supervision signal by combining the distance-energy consumption coupled reward function. Calculate the mean square error loss between the predicted value of the current network output and the supervision signal, and update the parameters of the current network based on this loss.

8. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S5, the combined distance-energy coupling reward function includes: Distance rewards include step length rewards that are negatively correlated with single-step movement distance and global distance rewards that are negatively correlated with destination distance; The energy consumption bonus is obtained by multiplying the physical energy consumption value calculated based on the physical mapping model by the intensity factor and taking the negative value. The finish line reward is an incentive signal set to a fixed positive value; The overall reward is obtained by weighted summation of three items: distance reward, energy consumption reward, and destination reward.

9. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S6, the online execution phase includes: The vehicle uses an onboard LiDAR or depth camera to scan a 200-meter radius area centered on the vehicle in real time. Without loading a global map, the optimal path to the destination is planned in real time using the trained model based solely on the local terrain features within the specified area.

10. The path planning method based on self-attention enhancement in unstructured terrain according to claim 1, characterized in that, In step S6, the real-time output of the globally optimal action sequence that balances energy efficiency and distance through a local view includes: The five candidate commands are: left turn first angle, left turn second angle, go straight, right turn second angle, and right turn first angle; The value of the first angle is set to be greater than the value of the second angle in order to achieve graded control of the vehicle's steering amplitude.