Road type identification method and device and vehicle
By extracting high-order statistical features of vehicle historical trajectories and using a self-attention mechanism, combined with a homogeneous graph convolutional neural network, road types are identified, solving the problems of high computing power and equipment dependence in existing technologies, and achieving efficient and accurate road type identification.
Patent Information
- Application Number
- CN202511330862.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-12-19
AI Technical Summary
Existing road type recognition methods rely on vehicle image acquisition and intelligent algorithms, which require high computing power, image acquisition equipment, and a complex and cumbersome process.
By extracting high-order statistical features of vehicle historical trajectories, and employing a self-attention mechanism and homogeneous graph convolutional neural network, the feature fusion ratio is dynamically allocated to identify road types, eliminating the need for image acquisition equipment and reducing hardware requirements.
It improves the accuracy and efficiency of road type recognition, reduces reliance on vehicle hardware, adapts to different terrains, and reduces labor costs.
Smart Images

Figure CN121167486A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent driving, specifically to a road type recognition method, device, and vehicle. Background Technology
[0002] Current road type recognition mainly relies on a combination of vehicle image acquisition and intelligent algorithms.
[0003] This method requires high computing power and vehicles equipped with image acquisition devices to capture images of each terrain. Then, it combines professional image recognition algorithms to judge the terrain. The overall process is complex and cumbersome. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a road type identification method, device, and vehicle to overcome or at least partially solve the above problems. The technical solution is as follows: A road type identification method includes: extracting original trajectory features from historical vehicle trajectories and determining higher-order statistical features of the original trajectory features; superimposing the higher-order statistical features of each trajectory point with those of adjacent points to obtain enhanced features; determining the self-attention weights of the enhanced features and performing feature filtering based on the self-attention weights to obtain weighted features; and inputting the weighted features into a pre-trained road type identification model to output the probability that each trajectory point belongs to a preset road type.
[0005] This application mines spatiotemporal statistical features from the vehicle's original trajectory to obtain higher-order statistical features that better reflect key information about the vehicle's historical trajectory. These higher-order statistical features are then superimposed between trajectory points and adjacent points to fully extract spatiotemporal feature information. Subsequently, a multi-head self-attention mechanism is employed to adaptively enhance key spatiotemporal features, significantly improving information density while preserving key spatiotemporal pattern information. Processing the trajectory features enhances the information density within them, thus significantly improving the accuracy of the model's output after the weighted features are input into the road type recognition model. Furthermore, by using the vehicle's historical trajectory to determine the road type, there is no need to equip the vehicle with image acquisition equipment to collect images of each terrain feature, thereby reducing the vehicle's hardware requirements and significantly saving labor costs in road paving condition recognition tasks.
[0006] In one example, the original trajectory features include at least one of the following: timestamp, longitude, latitude, speed, pitch angle, roll angle, yaw angle, and rotation angle corresponding to each trajectory point; the determination of the higher-order statistical features of the original trajectory features specifically includes: determining the higher-order statistical features of the vehicle's historical trajectory based on the original trajectory features, time windows, and the spatial neighborhood of each trajectory point; the higher-order statistical features include at least one of the following: acceleration, jerk, descent rate of the trajectory point in the altitude direction, altitude change within a preset horizontal distance, horizontal distance between two trajectory points within a preset time period, azimuth of the current trajectory segment, rate of change of azimuth with horizontal distance, and trajectory azimuth change within a preset distance period.
[0007] By using the original trajectory features as input and mining the corresponding higher-order statistical properties, statistical calculations based on time windows and spatial neighborhoods can be introduced on top of the original trajectory features (timestamp, longitude, latitude, speed, acceleration, pitch angle, roll angle, yaw angle, and rotation angle) to generate new higher-order statistical features for each trajectory point. The higher-order statistical features output by this module provide richer discriminative information for the road type identification process, enabling more accurate capture of dynamic changes during vehicle movement and thus improving the accuracy of road type identification. For example, acceleration and jerk characteristics can reflect sudden acceleration or deceleration of vehicles, helping to identify special road types such as sharp turns and inclines / declines. By mining these higher-order statistical features, more vehicle trajectory information is included in the features, thereby achieving more accurate road type identification.
[0008] In one example, the step of superimposing the higher-order statistical features of each trajectory point with those of its neighbors to obtain enhanced features specifically includes: determining the neighbors of the current trajectory point, wherein the neighbors include the predecessor and successor points of the trajectory point, and / or the left neighbor and right neighbor points; and adding the enhanced feature matrices corresponding to the higher-order statistical features of the current trajectory point and the neighbors to obtain the enhanced features.
[0009] By superimposing the higher-order statistical features of each trajectory point with those of its neighbors, enhanced features are obtained, leveraging the spatial correlation between trajectory points for feature enhancement. By introducing the higher-order statistical features of neighboring points (predecessor, successor, left neighbor, and right neighbor), an enhanced feature matrix is constructed for the trajectory points. This ensures that the feature representation of each trajectory point not only includes its own information but also incorporates the contextual information of surrounding trajectory points, thereby enhancing the discriminative power of the features and helping the model more accurately identify road types. Specifically, by fusing the higher-order statistical features of predecessor and successor points, the model can effectively capture the complex topological structure and temporal and spatial dependencies in the trajectory map. By fusing the higher-order statistical features of left and right neighbor points, it can effectively distinguish the hidden geographical location and terrain features in off-road scenarios. This feature superposition method fully utilizes the spatial correlation in vehicle trajectories, providing the model with richer feature information.
[0010] In one example, determining the self-attention weights of the enhanced features and performing feature filtering based on the self-attention weights to obtain weighted features specifically includes: generating a triple matrix of the enhanced features using preset matrix weights; determining the attention score matrix corresponding to the enhanced features based on the triple matrix; and outputting the weighted features based on the triple matrix and the attention score matrix.
[0011] In the feature selection stage, a self-attention mechanism is employed to determine the self-attention weights for enhanced features. A triplet matrix is generated using preset matrix weights, and then the attention score matrix is calculated, ultimately outputting weighted features. The self-attention mechanism adaptively adjusts the importance of each feature dimension, enabling the model to focus on the most discriminative features in complex and varied road environments, thereby improving the robustness and accuracy of road type recognition. For example, in complex road conditions such as mud or gravel, the trajectory features generated by vehicle movement may contain a large amount of noise. The self-attention mechanism can automatically identify and enhance features closely related to road type (such as jerkiness and rate of change of height) while suppressing redundant vibration features caused by road bumps, ensuring the stability of the model's output.
[0012] In one example, the road type recognition model includes a self-learning graph topology module and a homogeneous graph convolutional neural network module; the self-learning graph topology module is used to generate a feature matrix and output the feature matrix to the homogeneous graph convolutional neural network module; the homogeneous graph convolutional neural network module dynamically allocates the fusion ratio of each trajectory point under different filtering paths by setting multiple filtering paths, and outputs the probability that each trajectory point belongs to a preset road type based on the fusion ratio.
[0013] In one example, generating a feature matrix and outputting the feature matrix to the homogeneous graph convolutional neural network module specifically includes: generating an intermediate adjacency matrix based on a preset nonlinear activation function, preset adjacency matrix weights, and the weighted features; determining the angle matrix of the intermediate adjacency matrix; determining a normalized adjacency matrix and a feature matrix based on the angle matrix and the intermediate adjacency matrix; updating the preset adjacency matrix weights through the normalized adjacency matrix during the model training phase; and outputting the feature matrix to the homogeneous graph convolutional neural network module.
[0014] The self-learning graph topology module adaptively mines the latent graph topology in trajectory data by applying linear transformations and activation functions to weighted features, and directly generates the adjacency matrix required for graph convolution. This generated adjacency matrix captures the spatial and temporal dependencies between any two trajectory nodes during convolution. Furthermore, the adjacency matrix weights can be dynamically updated during model training. Throughout the training process, after obtaining the adjacency matrix, the weights can be iteratively adjusted through backpropagation, minimizing a specific loss function to continuously improve the model's prediction accuracy and feature representation capabilities, thereby adapting to various trajectory data with different structures.
[0015] In one example, the step of dynamically allocating the fusion ratio of each trajectory point under different filtering paths by setting multiple filtering paths specifically includes: setting multiple filtering paths in parallel within the homogeneous graph convolutional neural network module, wherein the multiple filtering paths include at least a low-pass filtering path, a high-pass filtering path, and a full filtering path; extracting different frequency components of the feature matrix through the multiple filtering paths respectively; determining the path weights corresponding to the multiple filtering paths through learnable parameters; and determining the fusion ratio of each trajectory point under different filtering paths based on the path weights.
[0016] The homogeneous graph convolutional neural network module extracts different frequency components of the graph signal by setting multiple filtering paths (low-pass, high-pass, and full-pass filtering paths). It then uses a learnable weight matrix to score and filter the importance of these components, dynamically allocating the fusion ratio for each trajectory point under different filtering paths. This allows for filtering out redundant or noise information while retaining key frequency components. This design comprehensively captures spectral patterns from local to global levels, significantly mitigating the convolutional attenuation problem caused by heterogeneity.
[0017] In one example, the step of outputting the probability that each trajectory point belongs to a preset road type based on the fusion ratio specifically includes: determining the multi-scale features corresponding to each trajectory point based on the fusion ratio; and inputting the multi-scale features as the node features of the corresponding trajectory points into a fully connected layer to determine the probability that each trajectory point belongs to a preset road type.
[0018] The model determines the multi-scale features corresponding to each trajectory point based on the fusion ratio, and propagates the weighted features along adjacent edges to complete node-level multi-scale information aggregation. This allows the off-road trajectory map to adaptively select the most relevant frequency domain features based on local structure without relying on prior labels, improving the ability to discriminate and generalize to complex road conditions. Finally, the probability of each trajectory point belonging to a preset road type is output through a fully connected layer, achieving accurate identification of road types.
[0019] This application also provides a road type recognition device, comprising: a statistical feature determination module for extracting the original trajectory features of a vehicle's historical trajectory and determining the higher-order statistical features of the original trajectory features; an enhanced feature determination module for superimposing the higher-order statistical features of each trajectory point with those of its adjacent points to obtain enhanced features; a weighted feature determination module for determining the self-attention weights of the enhanced features and performing feature filtering based on the self-attention weights to obtain weighted features; and a road type determination module for inputting the weighted features into a pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
[0020] This application also provides a vehicle, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: extract original trajectory features of the vehicle's historical trajectory, determine higher-order statistical features of the original trajectory features; superimpose the higher-order statistical features of each trajectory point with those of its neighboring points to obtain enhanced features; determine the self-attention weights of the enhanced features, and perform feature filtering based on the self-attention weights to obtain weighted features; input the weighted features into a pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
[0021] By employing the aforementioned technical solution, this disclosure provides a road type identification method, device, and vehicle. Through identification based on the vehicle's historical trajectory, the road type identification results can be stored in the current vehicle or uploaded to the network for reference by other vehicles. This eliminates the need for vehicles equipped with image acquisition equipment or requiring high computing power to acquire road types in different regions, thereby providing more accurate environmental perception information for intelligent driving. This method not only reduces dependence on vehicle hardware but also improves the efficiency and universality of road type identification through the reuse of historical trajectory data.
[0022] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, specific embodiments of this disclosure are described below. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this disclosure. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a road type identification method according to an embodiment of this disclosure is shown; Figure 2 A flowchart illustrating another road type identification method in an embodiment of this disclosure is shown; Figure 3 A schematic diagram of a feature weight self-filtering process is shown in an embodiment of this disclosure; Figure 4 This illustration shows a structural diagram of a self-learning graph topology module and a homogeneous graph convolutional neural network module in an embodiment of this disclosure; Figure 5 A schematic diagram of the structure of a road type identification device according to an embodiment of the present disclosure is shown; Figure 6 A schematic diagram of the structure of a vehicle according to an embodiment of the present disclosure is shown. Detailed Implementation
[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0025] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0026] Currently, road type identification mainly relies on vehicle image acquisition combined with AI algorithms. This method requires significant computing power and necessitates vehicles equipped with image acquisition devices to capture images of each terrain type before combining them with specialized image recognition algorithms for terrain identification. The overall process is complex and the real-time operation is cumbersome.
[0027] Vehicle trajectory datasets consist of sequences of geographic coordinates generated by vehicles during off-road missions or long-distance maneuvers. Vehicles frequently switch between paved and unpaved roads and may also enter areas with natural terrain; therefore, their behavior patterns are typically categorized into "off-road maneuvering" and "road driving." Accurately mapping trajectory data to corresponding behavior patterns is a key step in improving vehicle path planning and off-road classification.
[0028] On paved roads, the working areas of vehicles are naturally distributed, and the generated trajectory data is continuous in both spatial and temporal dimensions, with each point rich in spatiotemporal semantics. However, on unpaved roads, vehicles need to rapidly switch between multiple behavior patterns, leading to cross-category associations of trajectory graph nodes and significant heterogeneity; if nodes and edges tend to belong to the same category, they exhibit homogeneity. Traditional graph convolution uses a uniform neighborhood aggregation for all nodes, which is insufficient to characterize heterogeneous structures and instead amplifies cross-category noise.
[0029] To address the aforementioned issues, this paper proposes a statistical feature enhancement combined with a feature weight filtering module to uncover significant spatiotemporal features in trajectories. A homogeneous graph convolutional neural network module is also designed: by using multi-channel filters to transmit semantic information of nodes of different categories, cross-category interference is suppressed, and the output representation is homogeneous, thereby enhancing model performance and discrimination accuracy.
[0030] Therefore, this application provides a road type identification method, such as... Figure 1 The diagram illustrates a road type recognition method according to one or more embodiments of this specification. This method can be applied to road type recognition. The process can be executed by a computing device in the relevant field (e.g., a computing device installed in a vehicle or a server located in the cloud). Certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.
[0031] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a cloud server as an example. The cloud server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not impose any specific limitations on it.
[0032] like Figure 1 and Figure 2 As shown in the figure, this application provides a road type identification method, including: S101: Extract the original trajectory features of the vehicle's historical trajectory and determine the higher-order statistical features of the original trajectory features.
[0033] First, the cloud server acquires the historical trajectories of different vehicles. These historical trajectories refer to the vehicle movement trajectories formed by the sampling points of off-road vehicles in chronological order over a continuous observation period. These trajectories contain temporal, physical, and spatial information generated by the interaction between the vehicle and the terrain environment. Existing research typically focuses only on the relative relationships between trajectory points, failing to fully utilize the deep semantics of key attributes such as speed, position, coordinates, and heading in the spatiotemporal dimensions. Therefore, by extracting the original trajectory features of the vehicle's historical trajectories and further determining the higher-order statistical features of these original trajectory features, these higher-order statistical features can be used in subsequent processes to identify road types, thereby improving the accuracy of road type identification.
[0034] The aforementioned vehicle historical trajectory can be pre-stored in the storage device of the computer device. When it is necessary to classify the road types corresponding to each trajectory point in the vehicle historical trajectory, the computer device can select the vehicle historical trajectory from the storage device. Of course, the computer device can also obtain the vehicle historical trajectory from other external devices. For example, the vehicle historical trajectory can be stored in the cloud. When it is necessary to classify the road types corresponding to each trajectory point in the vehicle historical trajectory, the computer device can obtain the vehicle historical trajectory from the cloud. This embodiment does not limit the method of obtaining the vehicle historical trajectory.
[0035] In one embodiment, existing research typically focuses only on the relative relationships between trajectory points, failing to fully utilize the deep semantics of key attributes such as speed, position, coordinates, and heading in the spatiotemporal dimension. To address this deficiency, this application uses the original trajectory features as input to mine their potential higher-order statistical features. Specifically, for off-road scenarios, on top of the original basic features (timestamp, longitude, latitude, speed, acceleration, pitch angle, roll angle, yaw angle, rotation angle, etc.), statistical calculations based on time windows and spatial neighborhoods are introduced to generate new higher-order statistical features for each trajectory point.
[0036] The original trajectory features include timestamps, longitude, latitude, speed, pitch angle, roll angle, yaw angle, and rotation angle corresponding to each trajectory point. When determining the higher-order statistical features of the original trajectory features, the following calculations can be performed based on the original trajectory features to determine the corresponding higher-order trajectory features:
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045] in, For the first The acceleration corresponding to each trajectory point; For the first The velocity corresponding to each trajectory point; For the first The time corresponding to each trajectory point; For the first The jerkiness corresponding to each trajectory point; For the first The height corresponding to each trajectory point; For the first The height change value corresponding to each trajectory point; For the first The descent speed of each trajectory point in the height direction; For the first The change in height of a trajectory point within a specific horizontal distance; The number of sampling points per unit time; The horizontal distance between two trajectory points within a given time period; The difference in latitude between two trajectory points. ; The difference in longitude between two trajectory points; This is the Earth's average radius (a constant, approximately 6371 km). This is the azimuth angle of the current trajectory segment; For the first The rate of change of the azimuth angle of a trajectory point with distance, i.e., the curvature sensitivity index; This refers to the azimuth change within a specific distance period.
[0046] The aforementioned high-order statistical features include acceleration, jerk, the rate of descent of a trajectory point in the height direction, the change in height within a preset horizontal distance, the horizontal distance between two trajectory points within a preset time period, the azimuth of the current trajectory segment, the rate of change of the azimuth with the horizontal distance, and the change in the trajectory azimuth within a preset distance period. These high-order statistical features can more comprehensively and accurately reflect the dynamic characteristics of the vehicle during driving, providing richer discriminative information for subsequent self-learning graph topology construction and multi-filter homogeneous graph convolutional neural network modules.
[0047] In addition to the features mentioned above, higher-order statistical features can also include the rate of change of acceleration in the vertical direction of the trajectory point, the radius of curvature of the trajectory, the torsion of the trajectory, and the total curvature of the trajectory in three-dimensional space. These features can further characterize the complex dynamic behavior of vehicles during driving. For example, the rate of change of acceleration in the vertical direction can reflect the vehicle's driving state in undulating terrain; the radius of curvature and torsion can describe the vehicle's driving characteristics on turns or complex paths; and the total curvature can comprehensively reflect the degree of curvature of the vehicle's driving path. By introducing these higher-order statistical features, the spatiotemporal information of the vehicle's driving process can be captured more comprehensively, thereby improving the accuracy and robustness of road type identification.
[0048] Furthermore, the feature dimensions can be further enriched by introducing spatiotemporal correlation features between trajectory points, such as the standard deviation of the rate of change of velocity and the acceleration direction consistency index of trajectory points within a specific time window. These supplementary features can be obtained based on sliding window statistics or graph structure modeling. For example, a local subgraph can be constructed using the spatial adjacency relationship between trajectory points, and the average velocity dispersion or direction entropy of nodes within the subgraph can be calculated to capture heterogeneous features in nonlinear driving modes. Experiments show that after combining spatiotemporal correlation features, the model's classification accuracy in unpaved road intersection areas is significantly improved, especially the misclassification rate at the junction of gravel roads and muddy roads is significantly reduced.
[0049] S102: Superimpose the higher-order statistical features of each trajectory point with those of its neighboring points to obtain enhanced features.
[0050] To more comprehensively expand the spatiotemporal feature range of each trajectory point, the higher-order statistical features of each trajectory point can be superimposed with those of its neighboring points to obtain enhanced features. By integrating the higher-order trajectory features of neighboring points with the higher-order statistical features of the current trajectory point, complete trajectory feature information is ultimately formed. This approach can fully exploit the feature information in the spatiotemporal dimension and provide more detailed and accurate features for trajectory representation.
[0051] In one embodiment, when superimposing the higher-order statistical features of each trajectory point with those of its neighbors to obtain enhanced features, the neighbors to be superimposed must first be determined. Here, neighbors include four types: predecessor points, successor points, left neighbors, and right neighbors. A predecessor point refers to the previous time point of the current trajectory point in the time dimension; a successor point refers to the next time point of the current trajectory point in the time dimension; a left neighbor point refers to the left neighbor point of the current trajectory point in the ground dimension, that is, the neighbor point to the left of the vehicle's direction of travel; and a right neighbor point refers to the right neighbor point of the current trajectory point in the ground dimension, that is, the neighbor point to the right of the vehicle's direction of travel.
[0052] When the aforementioned adjacent points appear in pairs, the higher-order statistical features of the current trajectory point can be superimposed with those of the predecessor and successor points, or the higher-order statistical features of the current trajectory point can be superimposed with those of the left and right neighboring points, or the higher-order statistical features of the current trajectory point can be superimposed with those of the four adjacent points: the predecessor, successor, left neighbor, and right neighboring point.
[0053] In practical implementation, feature overlay can be achieved using weighted summation or direct concatenation. For example, The higher-order statistical features of the current trajectory point and its four neighboring points (predecessor, successor, left neighbor, and right neighbor) can be superimposed using the following formula:
[0054] in, The enhanced features obtained after superposition. For the current trajectory point, The predecessor point of the current trajectory point, The successor point of the current trajectory point, The right neighbor of the current trajectory point. The left neighbor of the current trajectory point.
[0055] In another embodiment, when superimposing the higher-order statistical features of the current trajectory point with the four neighboring points—the predecessor point, the successor point, the left neighbor point, and the right neighbor point—corresponding weights can be set according to the different types of neighboring points. For example, the weights of the predecessor point and the successor point can be set to 0.4 and 0.6, respectively, and the enhanced features in the time dimension can be obtained through weighted calculation. For the left and right neighboring points in the geographical dimension, the higher-order statistical features of the left and right neighboring points can be directly concatenated into geographical enhanced features by means of concatenation.
[0056] in, and It can effectively capture the complex topological structure and temporal and spatial dependencies in trajectory graphs. and It can effectively distinguish the geographical location and terrain features (e.g., relative elevation difference or slope steepness) hidden in the data in off-road scenarios.
[0057] S103: Determine the self-attention weights of the enhanced features, and perform feature filtering based on the self-attention weights to obtain weighted features.
[0058] While enhanced features obtained by superimposing high-order statistical features can fully explore the spatiotemporal context surrounding trajectory points, they also introduce problems such as feature dimensionality inflation and sparsity of effective information. To suppress redundancy and retain the most discriminative components, this application implements feature weight self-filtering based on a self-attention mechanism. Specifically, the cloud server first calculates the self-attention weights of the enhanced features, and then adaptively recalibrates the features according to the weight distribution: high-weight channels are enhanced, while low-weight channels are suppressed or discarded. This significantly improves information density while preserving key spatiotemporal patterns, and provides downstream models with more compact and highly representative trajectory features.
[0059] In one embodiment, such as Figure 3 As shown, when performing feature selection, it is first necessary to use preset matrix weights ( , , ), generate enhanced features ( The triple matrix of ) , , ).in: , , ; After generating the triplet matrix of enhanced features, the cloud server determines the attention score matrix corresponding to the enhanced features based on the triplet matrix. The attention score matrix can be determined using the following formula:
[0060] in, Triple matrix Dimensions Triple matrix The transpose of the matrix. After obtaining the attention score matrix, weighted features can be output based on the triplet matrix and the attention score matrix. Specifically, the weighted features can be determined using the following formula:
[0061] in, As a weighted feature, Triple matrix The dimension is defined as follows: the weighted feature corresponding to each trajectory point is the weighted sum of the features of that trajectory point and the features of other trajectory points, with weights... The importance of the reflected features is assessed. Channels with significant weights in the final vector are enhanced, while low-weight channels are suppressed, achieving noise filtering and focusing on key information, providing high-purity input for downstream road type determination. Through the aforementioned feature selection process, multiple sets of feature weights can be learned in parallel, and different subspaces of trajectory features can be targeted. All weights are automatically updated during end-to-end training. Each attention head is given an independent perspective, which can lock onto a specific subset of features or capture unique interaction patterns between features, thereby accurately extracting the most discriminative elements. Subsequently, the weighted features output by each head are aggregated, and the model can effectively capture key information in the input features and suppress redundancy.
[0062] S104: Input the weighted features into the pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
[0063] After obtaining the weighted features, these features can be input into a trained road type recognition model to output the probability that each trajectory point belongs to a preset road type. The road types here include both paved roads and unpaved roads.
[0064] The road type recognition model is a mathematical model built based on machine learning algorithms, including but not limited to neural network models and support vector machine models. The road type recognition model is pre-trained using a training dataset. When the set training precision and accuracy are reached, the road type recognition model for the current training is considered to have completed training and can then be used for prediction processing.
[0065] In one embodiment, the construction of the adjacency matrix directly determines the model performance in a homogeneous graph convolutional neural network module. Existing work employs manual rules: first, various relationships between the current point and subsequent points are calculated for each trajectory, and a fixed weight is assigned to each relationship, ultimately resulting in six adjacency matrices being manually constructed; then, this set of matrices is reused for message passing within the same graph convolutional layer. This strategy has three drawbacks: high training cost, requiring the simultaneous storage and updating of multiple dense matrices in each iteration; poor adaptability, as fixed rules are difficult to transfer to new trajectory sets with vastly different terrains and sampling frequencies; and weak robustness, as trajectory gaps caused by packet loss or drift can easily result in null values or misaligned edges in the manual relationship calculations, leading to distortion of the adjacency matrix and thus reducing the model's generalization ability.
[0066] Furthermore, in the actual operation of off-road vehicles, road types can be divided into "paved road driving" and "unpaved road driving." When a vehicle switches from one road type to another (e.g., from an unpaved off-road section to a paved highway), a natural cross-type association is formed between the two driving modes. This association is defined as heterogeneity, and the corresponding graph structure is called a heterogeneous graph. If all nodes and edges in the graph belong to the same category, it constitutes a homogeneous graph. Traditional homogeneous graph convolutional neural network modules perform well on homogeneous graphs due to their unified message passing mechanism. Their core is to aggregate information from homogeneous neighborhoods and update the current node. However, in heterogeneous scenarios, since neighborhood nodes contain both paved and unpaved features, their contribution differs significantly. The unified aggregation operation often amplifies cross-type noise, thus adversely affecting node representation.
[0067] Therefore, this application proposes as follows Figure 4 The road type recognition model shown includes a self-learning graph topology module and a homogeneous graph convolutional neural network module. The self-learning graph topology module generates a feature matrix and outputs it to the homogeneous graph convolutional neural network module as its input. The homogeneous graph convolutional neural network module dynamically allocates the fusion ratio of each trajectory point under different filtering paths by setting multiple filtering paths, and outputs the probability that each trajectory point belongs to a preset road type based on the fusion ratio.
[0068] Specifically, after the weighted features are input into the learning graph topology module, two tasks are automatically completed within each graph convolutional layer: dynamically inferring the probability of an edge between any two points based on the feature representation of the weighted features, and simultaneously learning and updating the weights of the adjacency matrix to correct the topology. The entire process does not require manually setting thresholds or rules, can adapt to training iterations, significantly reduces computational overhead, and improves robustness to missing or noisy trajectories.
[0069] Specifically, the process of generating the feature matrix is as follows: First, an intermediate adjacency matrix is generated based on a preset nonlinear activation function, preset adjacency matrix weights, and weighted features. Then, the probability of an edge existing between any two points is dynamically inferred based on the feature representation of the weighted features, as expressed below:
[0070]
[0071] in, The feature matrix is a weighted feature matrix with dimensions (n×d), which specifically means n nodes of d-dimensional features; and These are the weight matrices learned by the first and second linear layers, respectively; This represents a nonlinear activation function, thereby introducing a nonlinear relationship; It is an intermediate adjacency matrix.
[0072] Then, the angle matrix is determined based on the intermediate adjacency matrix. elements in :
[0073] in The degree of node i is the sum of the weights of the edges connected to node i.
[0074] Then, based on the angle matrix and the intermediate adjacency matrix, the normalized adjacency matrix and the characteristic matrix can be determined. :
[0075]
[0076] in, For the first The output feature matrix, For the first Layer weight matrix.
[0077] By calculating the normalized adjacency matrix, the numerical stability problem in graph convolution can be solved, and the influence of node degree can be balanced. During the model training phase, the preset adjacency matrix weights can be updated using the normalized adjacency matrix. After calculating the feature matrix, the feature matrix is output to the homogeneous graph convolutional neural network module.
[0078] Figure 4 This demonstrates the overall workflow of the self-learning graph topological adjacency matrix module, which uses preprocessed weighted features of off-road vehicle trajectory points as input. According to the formula above, the input features are first passed through the first layer of learnable weights. A linear transformation is performed to obtain the initial node representation; then a second layer of weights is applied. A linear transformation is applied to obtain the hidden feature representation. The outputs of the two layers are then processed by a nonlinear activation function. After processing, element-wise multiplication is performed to adaptively mine the latent graph topology in the trajectory data and directly generate the intermediate adjacency matrix required for graph convolution. After normalization, an adjacency matrix is formed. It is applied to the convolution process to capture the spatial-temporal dependencies between any two trajectory nodes. Meanwhile, The model captures the dependencies between trajectory nodes and dynamically updates the adjacency matrix weights during model training. Throughout training, the model iteratively adjusts these weights through backpropagation and minimizes a specific loss function. The main goal is to continuously improve the model's prediction accuracy and feature representation capabilities, thereby adapting to various trajectory data with different structures.
[0079] To simultaneously capture the multi-scale differences between paved and unpaved road sections in the graph structure, multiple filtering paths are set in parallel in the homogeneous graph convolutional neural network module. Taking three filtering paths as an example, they can be set as follows: low-pass filter channel (LP), used to preserve the smooth trend of trajectory points in the long distance and low frequency domain, corresponding to the uniform straight-line characteristics of paved roads; high-pass filter channel (HP), used to emphasize the abrupt information in the short distance and high frequency domain, corresponding to the sharp bends, bumps and other local anomalies of unpaved roads; and full filter channel (IP), used to maintain the complete spectrum of the original graph signal to ensure that global information is not lost.
[0080] By using the constraint relationship HP + LP = IP, adaptive fusion of the three channels can be achieved: during the training process, the network automatically learns the weight matrix of each channel and dynamically assigns the fusion ratio of LP / HP / IP to each trajectory node, thereby overcoming the representation differences caused by the aliasing of "paved-unpaved" nodes in heterogeneous graphs.
[0081] Specifically, the three filters extract different frequency components of the feature matrix, which are defined as follows: , , Introducing learnable parameters , This is used to measure the importance of each frequency component; then, the above learnable parameters are normalized into weights using the Softmax function, thus ensuring that the sum of the weights of each channel is 1, resulting in: , ,
[0082] Furthermore, after determining the weights corresponding to each channel, the channel weights can be used as the fusion ratio. Feature weighting is achieved through the following formula, and the weighted features are propagated along the adjacency transition, thereby completing the aggregation of node and multi-scale information and determining the multi-scale features corresponding to each trajectory point:
[0083] After determining the multi-scale features corresponding to each trajectory point, the multi-scale features are... The node features corresponding to the trajectory points are input into the fully connected layer or logistic regression model. This is to determine the probability that each trajectory point belongs to a preset road type. and These are learnable parameters. After the above operations, the probability that the trajectory of each point is a paved road can be output.
[0084] This application achieves efficient and accurate road type identification in off-road scenarios through the synergistic effect of a self-learning graph topology module and a homogeneous graph convolutional neural network module. The self-learning graph topology module can dynamically infer the relationships between trajectory points and generate adjacency matrices adapted to different terrain features, effectively solving the problems of traditional methods that rely on manual rules for adjacency matrix construction and have poor adaptability. Simultaneously, through learning nonlinear activation functions and weight matrices, this module can capture the complex graph topology structure in trajectory data, providing more accurate input for subsequent graph convolution operations.
[0085] The homogeneous graph convolutional neural network module extracts different frequency components of trajectory features by setting multiple filtering paths to adapt to the multi-scale differences between paved and unpaved roads in the graph structure. This design allows the model to simultaneously focus on the smoothing trend of the trajectory and local anomalies, thus capturing the features of road types more comprehensively. Furthermore, by dynamically allocating the fusion ratio of each trajectory point under different filtering paths, the model can adaptively adjust the weights of each channel to overcome the representational differences caused by the aliasing of paved and unpaved nodes within the heterogeneous graph.
[0086] During the model training phase, the self-learning graph topology module and the homogeneous graph convolutional neural network module iteratively adjust their weights through backpropagation to minimize a specific loss function, thereby continuously improving the model's prediction accuracy and feature representation capabilities. This end-to-end training approach enables the model to automatically learn the optimal feature representation and classification boundaries, thus adapting to various trajectory data with different structures.
[0087] Ultimately, the trained road type recognition model can output the probability that each trajectory point belongs to a preset road type, providing strong support for the navigation and decision-making of off-road vehicles. In practical applications, this model can quickly and accurately determine the current road type based on real-time trajectory data during vehicle operation, thereby helping the vehicle adjust its driving strategy and improve driving safety and efficiency.
[0088] In addition, such as Figure 5 As shown, Figure 5 This is a schematic diagram of the road type recognition device provided in an embodiment of this application. The device includes: The statistical feature determination module 501 extracts the original trajectory features of the vehicle's historical trajectory and determines the higher-order statistical features of the original trajectory features.
[0089] The enhanced feature determination module 502 overlays the higher-order statistical features of each trajectory point with those of its neighboring points to obtain enhanced features.
[0090] The weighted feature determination module 503 determines the self-attention weight of the enhanced feature and performs feature filtering based on the self-attention weight to obtain the weighted feature.
[0091] The road type determination module 504 inputs the weighted features into the pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
[0092] In one specific embodiment, the original trajectory features include at least one of the following: timestamp, longitude, latitude, speed, pitch angle, roll angle, yaw angle, and rotation angle corresponding to each trajectory point; the statistical feature determination module 501 includes: determining high-order statistical features of the vehicle's historical trajectory based on the original trajectory features, time window, and spatial neighborhood of each trajectory point; the high-order statistical features include at least one of the following: acceleration, jerk, descent rate of the trajectory point in the altitude direction, altitude change within a preset horizontal distance, horizontal distance between two trajectory points within a preset time period, azimuth of the current trajectory segment, rate of change of azimuth with horizontal distance, and trajectory azimuth change within a preset distance period.
[0093] In one specific embodiment, the enhanced feature determination module 502 includes: determining the neighboring points of the current trajectory point, wherein the neighboring points include the predecessor and successor points of the trajectory point, and / or, the left neighbor and the right neighbor; and adding the enhanced feature matrix corresponding to the higher-order statistical features of the current trajectory point and the neighboring points to obtain the enhanced features.
[0094] In one specific embodiment, the weighted feature determination module 503 includes: generating a triple matrix of the enhanced features by pre-set matrix weights; determining the attention score matrix corresponding to the enhanced features based on the triple matrix; and outputting weighted features based on the triple matrix and the attention score matrix.
[0095] In one specific embodiment, the road type recognition model includes a self-learning graph topology module and a homogeneous graph convolutional neural network module; the self-learning graph topology module is used to generate a feature matrix and output the feature matrix to the homogeneous graph convolutional neural network module; the homogeneous graph convolutional neural network module dynamically allocates the fusion ratio of each trajectory point under different filtering paths by setting multiple filtering paths, and outputs the probability that each trajectory point belongs to a preset road type based on the fusion ratio.
[0096] In one specific embodiment, the road type determination module 504 includes: generating an intermediate adjacency matrix based on a preset nonlinear activation function, preset adjacency matrix weights, and the weighted features; determining the angle matrix of the intermediate adjacency matrix; determining a normalized adjacency matrix and a feature matrix based on the angle matrix and the intermediate adjacency matrix; updating the preset adjacency matrix weights through the normalized adjacency matrix during the model training phase; and outputting the feature matrix to the homogeneous graph convolutional neural network module.
[0097] In one specific embodiment, the road type determination module 504 includes: setting multiple filtering paths in parallel within a homogeneous graph convolutional neural network module, wherein the multiple filtering paths include at least a low-pass filtering path, a high-pass filtering path, and a full filtering path; extracting different frequency components of the feature matrix through the multiple filtering paths respectively; determining the path weights corresponding to the multiple filtering paths respectively through learnable parameters; and determining the fusion ratio of each trajectory point under different filtering paths based on the path weights.
[0098] In one specific embodiment, the road type determination module 504 includes: determining the multi-scale features corresponding to each trajectory point based on the fusion ratio; and inputting the multi-scale features as node features of the corresponding trajectory points into the fully connected layer to determine the probability that each trajectory point belongs to a preset road type.
[0099] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0100] Figure 6 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application.
[0101] For example, such as Figure 6 As shown, the vehicle includes a memory 601 and a processor 602. The memory 601 stores executable program code 6011, and the processor 602 is used to call and execute the executable program code 6011 to perform a road type recognition method.
[0102] This embodiment can divide the vehicle into functional modules according to the above method example. For example, each function can be assigned to a separate module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0103] When each functional module is divided according to its corresponding function, the vehicle may include: The statistical feature determination module extracts the original trajectory features of the vehicle's historical trajectory and determines the higher-order statistical features of the original trajectory features.
[0104] The enhanced feature determination module overlays the higher-order statistical features of each trajectory point with those of its neighboring points to obtain enhanced features.
[0105] The weighted feature determination module determines the self-attention weights of the enhanced features and performs feature filtering based on the self-attention weights to obtain weighted features.
[0106] The road type determination module inputs the weighted features into a pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
[0107] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0108] The vehicle provided in this embodiment is used to execute the road type recognition method described above, and therefore can achieve the same effect as the above implementation method.
[0109] When using integrated units, the vehicle may include a processing module and a storage module. The processing module is used to control and manage the vehicle's actions. The storage module supports the vehicle in executing program code and data.
[0110] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0111] This embodiment also provides a computer-readable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) storing computer program code. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement the road type recognition method provided in the above embodiment.
[0112] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the xx method provided in the above embodiment.
[0113] The beneficial effects of the above embodiments can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0114] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0115] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0116] In the description of this disclosure, it should be understood that if the terms "upper", "lower", "front", "rear", "left" and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the position or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.
[0117] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0118] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. A road type recognition method characterized by comprising: The method comprises the following steps: extracting original trajectory features of a vehicle historical trajectory, and determining high-order statistical features of the original trajectory features; superimposing high-order statistical features of each trajectory point and adjacent points to obtain enhanced features; determining self-attention weights of the enhanced features, and performing feature screening according to the self-attention weights to obtain weighted features; inputting the weighted features into a pre-trained road type recognition model to output probabilities of each trajectory point belonging to a preset road type.
2. The method of claim 1, wherein, The original trajectory features comprise at least one of a timestamp, a longitude, a latitude, a speed, a pitch angle, a roll angle, a yaw angle and a rotation angle corresponding to each trajectory point; The method of determining the high-order statistical features of the original trajectory features comprises the following steps: based on the original trajectory features, a time window and a spatial neighborhood of the trajectory points, determining high-order statistical features of the vehicle historical trajectory; The high-order statistical features comprise at least one of acceleration, jerk, a downward rate of a trajectory point in a height direction, a height variation amount within a preset horizontal distance, a horizontal distance between two trajectory points within a preset time length, an azimuth angle of a current trajectory segment, a variation rate of the azimuth angle with respect to a horizontal distance, and a trajectory azimuth angle variation amount within a preset distance period.
3. The method of claim 1, wherein, The method of superimposing high-order statistical features of each trajectory point and adjacent points to obtain enhanced features comprises the following steps: determining adjacent points of a current trajectory point, wherein the adjacent points comprise predecessor points and successor points of the trajectory point, and / or left neighborhood points and right neighborhood points; adding enhanced feature matrices corresponding to the high-order statistical features of the current trajectory point and the adjacent points to obtain the enhanced features.
4. The method of claim 1, wherein, The method of determining self-attention weights of the enhanced features and performing feature screening according to the self-attention weights to obtain weighted features comprises the following steps: generating a triple matrix of the enhanced features through a preset matrix weight; based on the triple matrix, determining an attention score matrix corresponding to the enhanced features; based on the triple matrix and the attention score matrix, outputting weighted features.
5. The method of claim 1, wherein, The road type recognition model comprises a self-learning graph topology module and a homogeneous graph convolutional neural network module; The self-learning graph topology module is configured to generate a feature matrix and output the feature matrix to the homogeneous graph convolutional neural network module; The homogeneous graph convolutional neural network module dynamically allocates a fusion proportion of each trajectory point in different filtering paths by setting multiple filtering paths, and outputs probabilities of each trajectory point belonging to a preset road type based on the fusion proportion.
6. The method of claim 5, wherein, The method of generating a feature matrix and outputting the feature matrix to the homogeneous graph convolutional neural network module comprises the following steps: based on a preset nonlinear activation function, a preset adjacency matrix weight and the weighted features, generating an intermediate adjacency matrix; determining an angle matrix of the intermediate adjacency matrix; based on the angle matrix and the intermediate adjacency matrix, determining a normalized adjacency matrix and a feature matrix; updating the preset adjacency matrix weight through the normalized adjacency matrix in a model training stage; outputting the feature matrix to the homogeneous graph convolutional neural network module.
7. The method of claim 5, wherein, The fusion proportion of each trajectory point in different filtering paths is dynamically allocated by setting multiple filtering paths, and the method specifically comprises the following steps: A plurality of filtering paths are set in parallel inside the homogeneous graph convolutional neural network module, and the plurality of filtering paths at least include a low-pass filtering path, a high-pass filtering path, and a full-amount filtering path; Different frequency components of the feature matrix are extracted through the plurality of filtering paths respectively; Path weights corresponding to the plurality of filtering paths are determined through learnable parameters; The fusion proportion of each trajectory point in different filtering paths is determined based on the path weights.
8. The method of claim 7, wherein, The probability that each trajectory point belongs to a preset road type is output based on the fusion proportion, and the method specifically comprises the following steps: Based on the fusion proportion, the multi-scale features corresponding to each trajectory point are determined; The multi-scale features are taken as node features of the corresponding trajectory points, and are input into a full connection layer to determine the probability that each trajectory point belongs to a preset road type.
9. A road type recognition apparatus characterized by comprising: The method comprises the following steps: A statistical feature determination module extracts original trajectory features of a vehicle historical trajectory, and determines high-order statistical features of the original trajectory features; An enhanced feature determination module superimposes the high-order statistical features of each trajectory point and adjacent points to obtain enhanced features; A weighted feature determination module determines self-attention weights of the enhanced features, and performs feature screening according to the self-attention weights to obtain weighted features; A road type determination module inputs the weighted features into a pre-trained road type recognition model to output the probability that each trajectory point belongs to a preset road type.
10. A vehicle characterized by comprising: The method comprises the following steps: At least one processor; And A memory connected in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1-8.