Vehicle lane-changing intention prediction method based on contrastive learning under data missing condition
By combining a self-supervised contrastive learning framework and a graph attention network, the accuracy and reliability issues of vehicle lane-changing intention prediction under data-deficient conditions are solved. This enables efficient spatiotemporal feature modeling and stable prediction in complex traffic scenarios, thereby improving the safety and smoothness of autonomous driving systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-03-20
AI Technical Summary
Existing methods for predicting vehicle lane-changing intentions lack accuracy and reliability when data is missing. Traditional methods are difficult to effectively handle complex and ever-changing traffic scenarios, and they also have high computational complexity and insufficient generalization ability.
A self-supervised contrastive learning framework is adopted, combining Siamese networks and graph attention networks. Through time trend-aware multi-head self-attention mechanism and graph attention network module, deep collaborative modeling of spatiotemporal features is carried out. Dual loss function optimization is used to improve the robustness and prediction accuracy of the model under data missing conditions.
It achieves superior prediction accuracy of vehicle lane-changing intentions under high missing rates, improves the operational safety and reliability of autonomous driving systems in complex and unstable data environments, and enhances the model's generalization ability and long-term prediction stability.
Smart Images

Figure CN121281016B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, in particular to a vehicle lane change intention prediction method based on contrast learning under data missing condition applied in a sensing and sensing integrated system. BACKGROUND
[0002] At present, with the development of automatic driving technology, automatic driving vehicles have become an important part of intelligent transportation systems. Vehicle lane change intention prediction, as a key technology in the field of automatic driving and intelligent assistant driving, has attracted widespread attention. Accurate prediction of vehicle lane change intention can effectively improve road traffic safety, reduce traffic congestion, and provide necessary basis for decision-making and planning of automatic driving vehicles.
[0003] Traditional vehicle lane change intention prediction methods are mainly based on the kinematic characteristics of vehicles, such as vehicle speed, acceleration, and inter-vehicle distance, etc. With the rise of machine learning and deep learning technologies, prediction models based on neural networks, support vector machines, etc. have also achieved remarkable results. These methods usually assume that complete and accurate vehicle operation data can be obtained, but in actual traffic scenarios, due to sensor failure, communication delay, data transmission loss, etc., data missing problems are common.
[0004] Data missing can seriously affect the accuracy and reliability of vehicle lane change intention prediction models. First, missing data may contain key information for vehicle lane change decision, directly leading to the model's inability to learn complete lane change patterns and rules; second, data missing can destroy the integrity and continuity of data, making it difficult for time series-based prediction models to effectively capture the dynamic characteristics of vehicle motion. For example, in long-distance highway scenarios, vehicle-mounted sensors may lose part of the surrounding vehicle position information due to signal obstruction, or in complex traffic environments, data synchronization deviation may occur during multi-sensor fusion, resulting in data missing.
[0005] Currently, some research has attempted to use data interpolation, completion algorithms to handle data missing problems, such as linear interpolation, K-nearest neighbor interpolation, and deep learning-based generative adversarial network (GAN) completion methods. However, these methods mostly do not fully consider the particularity of vehicle lane change intention prediction, and may introduce errors when completing missing data, and are difficult to adapt to complex and variable traffic scenarios. In addition, some research improves the structure of the prediction model to enhance the robustness to missing data, but existing models still face high computational complexity, insufficient generalization ability, and other problems when dealing with high-dimensional, dynamic, and missing data vehicle operation data.
[0006] Therefore, a vehicle lane change intention prediction method capable of effectively handling data missing problems is proposed, which has important theoretical significance and practical application value for improving the performance and safety of intelligent transportation systems. SUMMARY
[0007] Therefore, the present application provides a vehicle lane change intention prediction method based on contrast learning under data missing conditions, which can significantly improve the prediction robustness, avoid the complex operation of traditional data filling, help to fuse time series dynamics and spatial interaction, realize efficient spatio-temporal feature modeling, and effectively solve the data missing and spatio-temporal interaction modeling problems faced by vehicle lane change intention prediction in intelligent driving scenarios.
[0008] To achieve the above purpose, the technical scheme adopted by the present application is:
[0009] In a first aspect, the present application provides a vehicle lane change intention prediction method based on contrast learning under data missing conditions, which mainly includes the following steps:
[0010] Collecting vehicle trajectory data and surrounding environment data of vehicles in the scene, and preprocessing the collected data;
[0011] Building a self-supervised contrast learning framework, wherein the upstream task adopts a twin network structure composed of two trend attention mechanism sub-modules with shared weights, the input of the sub-module is the complete or missing data sample collected by the vehicle, and the output is the generated time series feature vector; the downstream task adopts a graph attention network module, which further extracts spatial features from the time series feature vector based on graph representation, integrates and represents with environmental features, and then performs dimension reduction; finally, after nonlinear mapping processing, the vehicle lane change intention is generated;
[0012] Defining the data enhancement processing strategy, encoder selection strategy, graph attention network architecture, similarity measurement index and loss function in the contrast learning framework, and training them until the training target is reached;
[0013] Using the trained self-supervised contrast learning framework to build a vehicle lane change intention prediction model, and predicting the lane change intention based on the data obtained by the vehicle in the lane change scene.
[0014] Further, the obtained vehicle trajectory data includes the lateral / side speed, lateral / side acceleration, heading angle, lateral / side position and vehicle type of the lane changing vehicle and surrounding vehicles; the surrounding environment data of the vehicle in the scene includes the interaction information between the lane changing vehicle and the surrounding vehicles, road information and environmental factors, wherein:
[0015] The interaction information of the lane-changing vehicle and the surrounding vehicles includes a relative distance change rate and a relative speed change rate; the road information includes a lane ID, a lane direction, and lane node information; and the environmental factors include weather conditions and traffic flow.
[0016] Further, the data enhancement processing strategy needs to process the vehicle trajectory time series data, specifically including two steps. First, the trajectory feature data is randomly masked, and a part of the trajectory feature of each vehicle is randomly extracted as the input time series data. The masking length ranges from 0% to 90% of the length of the trajectory data. The specific loss (masking) ratio is randomly generated to simulate real traffic scenarios involving random data loss. Second, a data set with different proportions of trajectory loss is generated to simulate traffic scenarios with vehicles of different intelligence levels.
[0017] Further, the encoder selection strategy adopts a temporal trend-aware multi-head attention mechanism (TTA-MHA) to capture the global trend and local changes of the time series data; and a fully connected network is used as a feature extraction module to explore deeper associations between features.
[0018] Further, the spatial features are extracted by adaptively learning the interaction graph between vehicles to construct a graph attention network, and the specific method is as follows: the target lane-changing vehicle is taken as the center node, and the surrounding vehicles are taken as the neighbor nodes to construct a dynamic interaction graph, the spatial feature vector of the center node is generated by graph attention calculation, and the multi-head attention is used for parallel calculation and fusion to capture the spatial dependence between the relative distance and speed change of the vehicles, and the specific calculation process is as follows:
[0019] ① Feature transformation: linear transformation is performed on the input time series feature vector h i , and the calculation method is as follows:
[0020]
[0021] wherein, represents the feature vector of node i after linear transformation by the kth attention head, k is the number of attention heads, W k represents the learnable weight matrix of the kth attention head;
[0022] ② Attention weight calculation: the unnormalized attention coefficients of the center node and the neighbor nodes are obtained by performing attention weight calculation (LeakyReLU activation function), and the specific calculation method is as follows:
[0023]
[0024] Wherein, i represents the lane-changing vehicle, j represents the surrounding vehicle; represents the importance of node i to node j in the kth attention head; is an attention parameter vector; || is a vector splicing operation, which is a connection operator used to fuse the features of the center node and the neighbor node; represents the feature vector of node j after linear transformation through the kth attention head; LeakyReLU is an activation function, which mainly avoids gradient disappearance and preserves negative feature information;
[0025] ③ Normalization processing: using the softmax function to normalize the attention coefficient to obtain the final neighborhood weight distribution, the specific calculation method is as follows:
[0026]
[0027] Wherein, represents the importance of neighbor node j to center node i; is the neighbor node set of center node i. The features of the neighbor nodes are aggregated according to the normalized weight to generate the new features of the center node The specific calculation method is as follows:
[0028]
[0029] Wherein, represents the new features of the center node;
[0030] ④ Feature aggregation: the attention heads (K) are calculated in parallel, and the results are fused by splicing or averaging to generate the final spatial feature vector h' i , realizing multi-attention head fusion, the specific calculation method is as follows:
[0031]
[0032] Wherein, h′ i represents the fusion features of node i, K represents the total number of attention heads, k represents the kth attention head, which is used to identify the specific attention head, || represents splicing operation of the feature vectors output by the K attention heads, Concatenation can preserve the specificity information of each head, and Averaging can improve stability.
[0033] Further, the similarity measure index adopts the Euclidean distance similarity calculation, the specific calculation method is as follows:
[0034] s(z i ,z j )=||z i -z j || 2
[0035] wherein s(z i ,z j ) is the Euclidean distance similarity of the sample pair, z i and z j represent the embedding representations of the two samples.
[0036] Further, the loss function adopted is a total loss function (L) jointly optimized by double losses, which is a weighted sum of the contrast learning loss and the intention prediction loss, and the specific calculation method is as follows:
[0037] L = λ1·L MSE + λ2·L prediction
[0038] wherein λ1 and λ2 are weight coefficients, used to balance the importance of contrast learning and intention prediction tasks;
[0039] L MSE is a contrast learning loss function, used to calculate the similarity loss of the feature vectors of the complete sample and the mask sample in the contrast learning, and the specific formula is as follows:
[0040]
[0041] wherein y k is the target label (y k = 1 represents a positive sample pair, and y k = 0 represents a negative sample pair), and N is the total number of sample pairs;
[0042] L prediction is an intention prediction loss function (cross-entropy), used for the intention prediction task, and the specific formula is as follows:
[0043]
[0044] wherein C = 3 represents the number of lane change intention categories (left lane change, keep lane, and right lane change); y c represents the real label (0 or 1); and represents the class probability predicted by the model.
[0045] In the second aspect, the embodiments of the present application also provide an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the data missing condition based vehicle lane change intention prediction method based on contrast learning.
[0046] According to the above technical solution, compared with the prior art, the present application discloses a data missing condition based vehicle lane change intention prediction method based on contrast learning, which has at least the following beneficial effects:
[0047] (1) The application can achieve excellent prediction accuracy under high deletion rate, breaking the limitation of traditional models in performance decline when facing high missing data, abandoning the traditional interpolation method, thereby avoiding the information bias and distortion that may be introduced in the interpolation process. Through the innovative contrast learning mechanism, deep and stable feature information is directly mined from the missing data, so that the model can accurately capture key features even when there is a large amount of missing data, and has strong adaptability to random data missing in real scenarios. In the intelligent transportation scenario, it provides reliable basis for the decision of the autonomous driving system, effectively improving the running safety and reliability of the system in a more complex and unstable data environment.
[0048] (2) The application proposes a deep collaborative modeling of spatio-temporal features, using a composite model that organically combines a time trend perception multi-head self-attention (TTA-MHA) module and a graph attention network (GAT) module. Breaking the isolation of previous models in spatio-temporal feature processing, it realizes the deep fusion and collaborative optimization of time and space features. Among them, TTA-MHA can effectively solve the deficiency of traditional self-attention mechanism in capturing local time trend details, and GAT innovatively introduces graph structure into vehicle interaction modeling, overcoming the problem of traditional methods in describing the spatial relationship of vehicles not being flexible and comprehensive enough. Deep fusion of the two can more realistically and comprehensively reflect the complex state of vehicles in actual driving process, accurately analyze the spatio-temporal correlation between vehicles in complex scenarios, and improve the accuracy of vehicle lane-changing intention prediction.
[0049] (3) The application improves the stability of long-term prediction, breaking the bottleneck of traditional models in long-term prediction due to information loss and significant accuracy decline caused by long time series. Through unique network structure design and training mechanism, key information in long sequence data is effectively preserved and utilized, maintaining the stability of long-time span prediction. This allows the autonomous driving system to have more time for path planning, speed adjustment, and other operations, greatly improving the safety and smoothness of autonomous driving in complex road conditions and reducing the risk of traffic accidents caused by decision delay.
[0050] (4) The application proposes a dual loss joint optimization strategy, innovatively combining self-supervised contrast learning with supervised intention prediction loss, solving the problem that traditional models cannot balance feature robustness and task accuracy under single loss optimization. The contrast learning loss makes the embedding vectors obtained after processing the complete samples and the mask samples by the model similar, enhancing the model's feature extraction ability for missing data and ensuring the consistency and stability of the features under data missing conditions, improving the practicality and reliability of the model.
[0051] (5) The application improves the generalization of vehicle intention prediction technology, and can dynamically adjust the attention weight of different vehicle interaction relationships according to real-time traffic conditions in complex scenes. Breakthrough the dependence of traditional models on specific scenes, can adapt to the interweaving area of urban expressway, the traffic system of different geographical areas, various weather conditions and complex traffic flow and other diversified scenes, change the limitation that the previous model needs to be retrained a lot before use in the new scene. Make the model can maintain stable prediction performance when facing different sources and different quality of data, improve the generalization ability of vehicle intention prediction technology in the data level, avoid the performance fluctuation caused by the difference of data characteristics.
[0052] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the application. The objects and other advantages of the present application can be achieved and obtained by the structure particularly pointed out in the written description and drawings.
[0053] The technical solutions of the present application will be further described in detail below by means of the drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments or prior art of the present application, the drawings needed in the embodiment or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0055] The drawings are used to provide further understanding of the present application, and constitute a part of the specification. Together with embodiments of the present application, they are used to explain the present application, and do not constitute a limitation on the present application.
[0056] Figure 1 A flow chart of a vehicle lane change intention prediction method based on contrast learning under data missing condition provided by the present application is shown in the figure.
[0057] Figure 2 A lane change scene schematic diagram provided by the present application is shown in the figure.
[0058] Figure 3 A self-supervised contrast learning framework schematic diagram provided by the present application is shown in the figure.
[0059] Figure 4 A time trend perception multi-head self-attention mechanism architecture schematic diagram provided by the present application is shown in the figure.
[0060] Figure 5 A graph attention mechanism framework schematic diagram provided by the present application is shown in the figure.
[0061] Figure 6A topology structure schematic diagram of the SDE vehicle and the SID vehicle provided by the present application is provided.
[0062] Figure 7 A schematic diagram of a multi-head graph attention layer aggregation process provided by the present application is provided.
[0063] Figure 8 A schematic diagram of the overall framework of the lane change intention prediction model CMT-GAT provided by the present application is provided.
[0064] Figure 9 A schematic diagram of the validation accuracy trend of different models in various prediction time ranges under 0% sample missing is provided.
[0065] Figure 10 A schematic diagram of the validation accuracy trend of different models in various prediction time ranges under 20% sample missing is provided.
[0066] Figure 11 A schematic diagram of the validation accuracy trend of different models in various prediction time ranges under 40% sample missing is provided.
[0067] Figure 12 A schematic diagram of the validation accuracy trend of different models in various prediction time ranges under 60% sample missing is provided.
[0068] Figure 13 A schematic diagram of the validation accuracy trend of different models in various prediction time ranges under 80% sample missing is provided.
[0069] Figure 14 A schematic diagram of the prediction accuracy change of the method of the present application in different prediction time ranges under different data missing rates is provided.
[0070] Figure 15 A schematic diagram of the electronic device structure provided by the present application is provided. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments of the present application.
[0072] In the description of the present application, it should be noted that in some processes described in the present application specification and drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that these operations can be executed or in parallel without the order appearing in the present text. In addition, various serial numbers and the like are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0073] The following detailed description of embodiments of the application in the accompanying drawings provides merely by way of illustrations of selected embodiments of the application. Therefore, specific structural and functional details disclosed herein are not intended to limit the scope of the application but merely explain selected embodiments of the application.
[0074] As shown in the drawings, the embodiments of the application disclose a vehicle lane change intention prediction method based on contrast learning under data missing condition, which mainly comprises the following steps: Figure 1
[0075] S1, collecting vehicle trajectory data and vehicle surrounding environment data in the scene, and preprocessing the collected data;
[0076] S2, building a self-supervised contrast learning framework, wherein the upstream task adopts a twin network structure composed of two trend attention mechanism sub-modules (i.e. time trend perception multi-head self-attention mechanism (TTA-MHA)) with shared weights, the input of the sub-module is the complete or missing data sample collected by the vehicle, and the output is the generated time sequence feature vector; the downstream task adopts a graph attention network module, which further extracts spatial features from the time sequence feature vector based on graph representation, integrates and represents with environmental features, and then performs dimension reduction; finally, the vehicle lane change intention is generated after nonlinear mapping processing;
[0077] S3, defining data enhancement processing strategy, encoder selection strategy, graph attention network architecture, similarity measurement index and loss function in the contrast learning framework, training them until the training target is reached;
[0078] S4, building a vehicle lane change intention prediction model using the trained self-supervised contrast learning framework, and predicting the lane change intention based on the data obtained by the vehicle in the lane change scene.
[0079] The specific embodiments of the application will be described in detail below:
[0080] S1, collecting vehicle trajectory data and vehicle surrounding environment data in the scene, and preprocessing the collected data, specifically:
[0081] In this embodiment, the obtained vehicle trajectory data includes lateral / side speed, lateral / side acceleration, heading angle, lateral / side position and vehicle type of the lane changing vehicle and surrounding vehicles; the vehicle surrounding environment data in the scene includes interaction information between the lane changing vehicle and the surrounding vehicles, road information and environmental factors, wherein:
[0082] The interaction information of the lane-changing vehicle and the surrounding vehicles includes a relative distance change rate and a relative speed change rate; the road information includes a lane ID, a lane direction, and lane node information; and the environmental factors include weather conditions and traffic flow.
[0083] As shown in Figure 2 , the figure shows a typical scenario of intelligent vehicle predicting the lane-changing intention of surrounding vehicles, simulating a multi-lane interaction environment; wherein the EGO vehicle represents the intelligent vehicle, the SDE vehicle represents the vehicle that has a direct impact on the intelligent vehicle, and the SID vehicle represents the surrounding vehicle that has an indirect impact on the intelligent vehicle, but may affect the SDE vehicle. Through the positional relationship of different vehicles, the spatial constraints and dynamic influences between vehicles are embodied.
[0084] S2, generate the lane-changing intention of the vehicle by building a self-supervised contrast learning framework.
[0085] As shown in Figure 3 , wherein the upstream task adopts a twin network structure, which consists of two trend attention mechanism sub-modules with shared weights. The input of the sub-module is the complete or missing data sample collected by the vehicle, and the output is the generated time series feature vector. The downstream task adopts a graph attention network module. From the time series feature vector based on the graph representation, further spatial features are extracted, and after integration with the environmental features, dimensionality reduction is performed. Finally, after nonlinear mapping processing, the lane-changing intention of the vehicle is generated.
[0086] S3, define the data enhancement processing strategy, encoder selection strategy, graph attention network architecture, similarity measurement index and loss function in the contrast learning framework, and train them until the training target is reached, which specifically includes:
[0087] (1) The data enhancement processing strategy needs to process the vehicle trajectory time series data, which specifically includes two steps. First, randomly mask the trajectory feature data, and randomly extract a part of the trajectory feature of each vehicle as the input time series data. The masking length ranges from 0% to 90% of the length of the trajectory data. Randomly generate the specific loss (masking) ratio to simulate real traffic scenarios involving random data loss. Second, generate a dataset with different proportions of trajectory loss to simulate traffic scenarios involving vehicles with different levels of intelligence.
[0088] (2) As shown in Figure 4As shown, the encoder selection strategy adopts the temporal trend-aware multi-head attention mechanism (TTA-MHA) to capture the global trend and local changes of time series data; and adopts a fully connected network as the feature extraction module to explore deeper associations between features. The specific process of capturing global trends and local changes is as follows:
[0089] ① Convolution-enhanced attention calculation:
[0090] TTA-MHA extracts the local context features of queries (Q) and keys (K) through one-dimensional convolution operations, thereby capturing the local trend dynamics in time series, avoiding the problem that traditional self-attention mechanisms only focus on numerical matching at a single time point and ignore the local context trends of time series. The specific formula is as follows:
[0091]
[0092] Where Trhead i represents the output result of the i-th attention head; Attention(*) is an attention calculation function for calculating the attention weight after input and generating the corresponding output; is the convolution kernel parameter in the i-th attention head for convolution operation on the query (Q); is the parameter related to the key (K) in the i-th attention head; Q represents the query vector, which is usually a feature vector related to time series data in the temporal trend-aware multi-head attention mechanism; V is the value vector, which is another part of the input participating in attention calculation; represents the weight matrix for linear transformation of the value (V) in the i-th attention head, which projects the value vector into a specific feature space through the matrix; i.e., the query feature after convolution enhancement, which reflects the direct influence of convolution operation on attention calculation; represents the feature concatenation operation, Trhead h represents the output of the h-th attention head, W o represents the output weight matrix.
[0093] ② Multi-scale feature extraction using multi-head parallelism:
[0094] The multi-head attention mechanism is adopted to map the input to multiple subspaces and calculate attention in parallel. Different attention heads focus on different time span information: some heads capture local changes in short cycles (such as speed fluctuations within 0.3 seconds), and the other heads capture global trends in long cycles (such as overall acceleration trends within 3 seconds), forming multi-scale feature representations.
[0095] ③Co-modeling global dependency and local trend:
[0096] Global trend capture: modeling long-range dependencies between sequence elements through attention mechanisms, analyzing the evolution of time series over the entire time span.
[0097] Local change detection: using the local receptive field characteristics of convolutional operations to extract feature differences between adjacent time points, capturing subtle changes in short time.
[0098] Finally, the results of local change detection are spliced with the outputs of other heads in multi-head attention (responsible for global trend) to form the final representation of spatio-temporal features.
[0099] (3) As shown in Figure 5 , the graph attention network architecture extracts spatial features by adaptively learning the interaction graph between vehicles.
[0100] As shown in Figure 6 , the topological graph structure of SDE and SID vehicles is shown, where the SDE vehicle is the center node and the SID vehicle is the neighbor node; the edge represents the spatial relationship between vehicles. The specific method is to construct a dynamic interaction graph with the target lane-changing vehicle as the center node and the surrounding vehicles as the neighbor nodes, and generate a spatial feature vector of the center node through graph attention calculation. Utilizing multi-head attention parallel computing and fusion, the spatial dependencies such as relative distance and speed change between vehicles are captured, and the specific calculation process is as follows:
[0101] ① Feature transformation: linear transformation is performed on the input time series feature vector h i , and the calculation method is as follows:
[0102]
[0103] where represents the feature vector of node i after linear transformation by the kth attention head, k is the number of attention heads, W k represents the learnable weight matrix of the kth attention head;
[0104] ② Attention weight calculation: through attention weight calculation (LeakyReLU activation function), the unnormalized attention coefficients of the center node and the neighbor nodes are obtained, and the specific calculation method is as follows:
[0105]
[0106] where i represents the lane-changing vehicle and j represents the surrounding vehicle; represents the importance of node i to node j in the kth attention head; is the attention parameter vector; is the vector concatenation operation, which is a concatenation operator used to fuse the features of the center node and the neighbor nodes; represents the feature vector of node j after linear transformation through the kth attention head; LeakyReLU is an activation function, which mainly functions to avoid gradient disappearance and preserve negative feature information;
[0107] ③ Normalization processing: the attention coefficients are normalized using the softmax function to obtain the final neighborhood weight distribution, which is calculated as follows:
[0108]
[0109] wherein, represents the importance of neighbor node j to center node i; is the set of neighbor nodes of center node i. The features of the neighbor nodes are aggregated according to the normalized weights to generate new features of the center node The specific calculation method is as follows:
[0110]
[0111] wherein, represents the new features of the center node;
[0112] As shown in Figure 7 , the aggregation process of the multi-head graph attention layer is shown, wherein the feature aggregation is to calculate multiple attention heads (K) in parallel, and the results are fused by concatenation or averaging to generate the final spatial feature vector h′ i , which realizes multi-head attention fusion, and the specific calculation method is as follows:
[0113]
[0114] wherein, h′ i represents the fused features of node i, K represents the total number of attention heads, k represents the kth attention head, which is used to identify a specific attention head, || represents the concatenation operation of the feature vectors output by the K attention heads, Concatenation can preserve the specificity information of each head, and Averaging can improve stability.
[0115] (4) The similarity measure index in the contrastive learning framework adopts the Euclidean distance similarity calculation, which is calculated as follows:
[0116] s(z i ,z j )=||z i -z j || 2
[0117] wherein, s(zi ,z j ) represents the Euclidean distance similarity between sample pairs, z i With z j This represents the embedding representation of two samples.
[0118] (5) A dual-loss joint optimization strategy is proposed, in which the total loss function (L) of the dual-loss joint optimization is adopted, which is a weighted sum of the contrastive learning loss and the intention prediction loss. The specific calculation method is as follows:
[0119] L=λ1·L MSE +λ2·L prediction
[0120] Where λ1 and λ2 are weighting coefficients used to balance the importance of contrastive learning and intent prediction tasks;
[0121] L MSE This is the contrastive learning loss function, used to calculate the similarity loss between the feature vectors of the complete sample and the masked sample in contrastive learning. The specific formula is as follows:
[0122]
[0123] Among them, s(z) i ,z j ) represents the Euclidean distance similarity between sample pairs, y k For target label (y) k =1 indicates a positive sample pair, y k =0 indicates a negative sample pair, and N is the total number of sample pairs;
[0124] L prediction The intention prediction loss function (cross-entropy) is used for intention prediction tasks, and its specific formula is as follows:
[0125]
[0126] Where C=3, representing the number of lane change intention categories (left lane change, lane keeping, right lane change); y c Indicates the true label (0 or 1); This represents the class probability predicted by the model.
[0127] like Figure 8As shown, the lane change intention recognition based on contrastive learning proposes the overall framework of the lane change intention prediction model CMT-GAT (Contrastive learning framework for predicting Lane Change Intention of surrounding vehicles under Missing data conditions based on Graph Attention Network), which runs in a self-supervised contrastive learning framework, including two main components: training part and testing part, and the specific process of model training is as follows:
[0128] (1) The weights, biases and other parameters in the model are initialized.
[0129] (2) Focus on the urban expressway weaving area scene, intercept the lane change data of 270 meters of road section (210 meters of weaving area), label the samples according to the lane change type (merge, split, straight lane change), and input the labeled sample data into the model, including complete samples and samples processed by data masking.
[0130] (3) In the contrastive learning module, the TTA-MHA and fully connected network are used to extract and represent the features of the complete samples and the masked samples respectively, and the corresponding embedding representations are obtained.
[0131] (4) Calculate the similarity between the embedding representations and compare it with the target similarity to get the contrastive learning loss.
[0132] (5) The embedding representation of the complete sample is extracted through the GAT module to extract spatial features, which are integrated with environmental features, then dimensionality reduction and nonlinear mapping are performed to get the lane change intention prediction result, and the intention prediction loss is calculated according to the prediction result and the real label.
[0133] (6) The contrastive learning loss and the intention prediction loss are combined according to certain weights to get the total loss of the model.
[0134] (7) According to the total loss, the gradient of the loss function to the model parameters is calculated through the back propagation algorithm, and the model parameters are updated using the optimization algorithm (such as Adam) to minimize the total loss.
[0135] (8) Repeat the steps (3)-(5) to calculate the loss and the back propagation process, and iterate the training of the model for multiple times until the performance of the model no longer improves or reaches the preset training number of rounds.
[0136] (9) Evaluate the trained model on the validation set, calculate the average validation accuracy and validation loss of the model, to evaluate the performance of the model under different data missing rates.
[0137] (10) According to the performance of the model on the validation set, adjust the hyperparameters of the model (such as learning rate, weight of contrastive learning loss and intention prediction loss, etc.) to further optimize the performance of the model.
[0138] (11) According to the results of hyperparameter adjustment, retrain and evaluate the model until the optimal model parameter and hyperparameter configuration is found.
[0139] S4, based on the data obtained by the vehicle in the lane changing scene, the lane changing intention is predicted:
[0140] In order to evaluate the performance of the CMT-GAT model proposed in the present application, six commonly used time series modeling baseline models are selected for comparison, including DLinear, MLP, LightTS, TimesNet, Informer and Transformer, which are six models with strong performance in predicting lane changing intention. Through extracting the data of a weaving area on the expressway of a Chinese city in the unmanned aerial vehicle-based micro-vehicle trajectory data set, the lane changing intention recognition is studied, wherein the total length of the weaving area is 270 meters, the length of the weaving section is 210 meters, and the design speed is 70 km / h. In this experiment, the average validation accuracy and validation loss of the target model CMT-GAT and the six baseline models under different data missing rates (0%, 20%, 40%, 60%, 80%) are evaluated, and the influence of missing data rate on the performance of the model is analyzed.
[0141] The experimental results show that Figures 9 to 13As shown, the validation accuracy of all models decreases and the validation loss increases as the data missing rate increases. This indicates that the missing data reduces the available information for the study, making it more difficult for the models to effectively learn the feature representation, thus affecting their prediction performance. The most obvious is that at lower data missing rates (0% and 20%), the accuracy difference between different models is relatively small. However, at higher data missing rates (60% and 80%), the performance difference between models becomes more significant. During this period, the CMT-GAT model performs well at all data missing rates, with the smallest decrease in validation accuracy and relatively low validation loss. In contrast, the MLP model has comparable accuracy to CMT-GAT at a lower data missing rate (0%), but its accuracy decreases significantly as the data missing rate increases; DLinear performs well at low data missing rates (0% and 20%), but its accuracy drops sharply at higher data missing rates (60% and 80%); LightTS maintains stable performance at medium data missing rates (20% and 40%), and its accuracy decreases relatively small when data missing rate further increases, TimesNet, although it performs worse than CMT-GAT at all data missing rates, its performance is slightly better than MLP and DLinear at high data missing rates; Transformer performs well at low data missing rates (0% and 20%), but its accuracy decreases significantly as the data missing rate increases; Informer performs better than Transformer at high data missing rates (60% and 80%).
[0142] To further evaluate the CMT-GAT model, an ablation experiment is conducted to remove the time trend-aware multi-head self-attention mechanism and the graph attention module, respectively. The experimental results show that when the data is complete, the performance difference between the three models is negligible. However, as the data missing rate increases (e.g., 60% and 80%), removing TTA-MHA will cause the accuracy to drop to 0.895, and the loss will increase by 8.4%; removing GAT will cause the accuracy to decrease by 0.036 in the full data scenario, and the performance decay is more significant at low missing rates, which effectively confirms the key role of spatiotemporal feature coordination in prediction robustness.
[0143] Figure 14The performance of the CMT-GAT model under different conditions is intuitively demonstrated. In the case of low data missing rate, the prediction accuracy of the CMT-GAT model remains at a high level, ranging from 0.99 to 0.95. Specifically, the model's prediction results are very close to the true situation, which means that the model can make correct predictions in most cases. For short-term predictions (0.3 seconds and 0.6 seconds), the model can more accurately capture feature information, resulting in relatively higher prediction accuracy. For long-term predictions (2.7 seconds and 3.0 seconds), although the prediction accuracy decreases slightly, the overall change is not significant, showing that the model has stable performance and strong generalization ability when the data is relatively complete. Under moderate data missing rates (40%-60%), the prediction accuracy of the CMT-GAT model decreases, ranging from 0.95 to 0.91. As the prediction time increases, especially for long-term predictions exceeding 2.1 seconds, the accuracy decreases more significantly, but the model still maintains relatively high accuracy, demonstrating good robustness. Under high data missing rates of 80% or more, the prediction accuracy of the CMT-GAT model further decreases to 0.92 to 0.88. At this time, the prediction accuracy changes dramatically with the prediction time, especially in the long prediction time range. This indicates that severe data missing has a significant impact on model performance, but the CMT-GAT still maintains some prediction ability, which is better than other models.
[0144] From the description of the above embodiments, those skilled in the art can know that the present application provides a vehicle lane change intention prediction method based on contrast learning under data missing conditions. The main technical means adopted by the method includes:
[0145] 1. A self-supervised contrast learning framework is built, the upstream task adopts a twin network structure, and the downstream task adopts a graph attention network module. By constructing positive and negative sample pairs, the representation of the data is learned, so that the positive sample pairs are closer in the feature space and the negative sample pairs are farther apart.
[0146] 2. A double-channel trend attention mechanism is used to process complete data samples and missing data samples respectively. This mechanism can effectively capture global trends and local changes in time series data, improving the accuracy and reliability of feature extraction.
[0147] 3. In the data preprocessing stage, random mask processing is performed on the time series data to simulate data loss in the real world, improving the robustness of the model in actual application.
[0148] 4. The model uses a double-loss function design, combining contrast learning loss and intention prediction loss. By jointly optimizing these two loss functions, the prediction ability for the target task is improved.
[0149] The application provides a vehicle lane-changing intention prediction method based on contrast learning under data missing conditions, and the specific advantages are as follows:
[0150] (1) The application achieves excellent prediction accuracy under high missing rate, breaks the limitation that the performance of the traditional model is severely reduced when facing high missing data, and discards the traditional interpolation method, thereby avoiding the information bias and distortion that may be introduced in the interpolation process. Through the innovative contrast learning mechanism, deep and stable feature information is directly mined from the missing data, so that the model can still accurately capture key features when there is a large amount of missing data. It has strong adaptability to random data missing in real scenes, and provides reliable basis for the decision of the automatic driving system in the intelligent transportation scene, effectively improving the running safety and reliability of the system in a relatively complex and unstable data environment.
[0151] (2) The application proposes a deep collaborative modeling of space-time features, and adopts a composite model combining a time trend perception multi-head self-attention (TTA-MHA) module and a graph attention network (GAT) module. The isolation of the previous model in space-time feature processing is broken, and deep fusion and collaborative optimization of time and space features are realized. Among them, TTA-MHA can effectively solve the deficiency of the traditional self-attention mechanism in capturing local time trend details, and GAT innovatively introduces a graph structure into vehicle interaction modeling, overcoming the problem that the traditional method is not flexible and comprehensive in describing the spatial relationship of vehicles. Deep fusion of the two can more truly and comprehensively reflect the complex state of vehicles in the actual driving process, accurately analyze the space-time correlation between vehicles in complex scenes, and improve the accuracy of vehicle lane-changing intention prediction.
[0152] (3) The application improves the stability of long-time prediction and breaks the bottleneck that the information is lost and the accuracy is greatly reduced in the long-time prediction of the traditional model due to the lengthening of the time sequence. Through the unique network structure design and training mechanism, the key information in the long sequence data is effectively retained and utilized, maintaining the stability of long-time span prediction. This makes the automatic driving system have more time for path planning, speed adjustment and other operations, greatly improving the safety and smoothness of automatic driving in complex road conditions and reducing the risk of traffic accidents caused by decision delay.
[0153] (4) The application proposes a dual loss joint optimization strategy, which innovatively combines self-supervised contrast learning with supervised intention prediction loss, solving the problem that the traditional model cannot balance feature robustness and task accuracy under single loss optimization. The contrast learning loss makes the embedding vectors obtained after processing the complete sample and the mask sample by the model similar, strengthens the feature extraction ability of the model for missing data, ensures the consistency and stability of the features under data missing conditions, and improves the practicability and reliability of the model.
[0154] (5) The application improves the generalization of vehicle intention prediction technology, and can dynamically adjust the attention weight of different vehicle interaction relationships according to real-time traffic conditions in complex scenes. It breaks through the dependence of traditional models on specific scenes, and can adapt to various scenes such as interweaving areas of urban expressways, traffic systems in different geographical areas, various weather conditions, and complex traffic flow. It changes the limitation that the previous model needs to be retrained a lot before it can be used in new scenes. It makes the model maintain stable prediction performance when facing data of different sources and different qualities, improves the generalization ability of vehicle intention prediction technology at the data level, and avoids performance fluctuations caused by differences in data characteristics.
[0155] Further, referring to Figure 15 The electronic device can include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and can further include a computer program stored in the memory 11 and executable on the processor 10.
[0156] In some embodiments, the processor 10 can be composed of integrated circuits, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple packaged integrated circuits with the same function or different functions. It includes one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core of the electronic device. It connects all components of the electronic device through various interfaces and lines, and executes programs or modules stored in the memory 11 and calls data stored in the memory 11 to perform various functions and process data of the electronic device.
[0157] Those skilled in the art should understand that the embodiments of the application can be provided as methods, electronic devices, or computer program products. Therefore, the application can be in the form of a complete software embodiment, a complete hardware embodiment, or an embodiment combining software and hardware aspects.
[0158] It should be noted that the word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" before the components does not exclude the presence of multiple such components. The application can be implemented by means of hardware comprising several distinct components, and by means of a suitably programmed computer.
[0159] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0160] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting vehicle lane-changing intentions based on contrastive learning under conditions of missing data, characterized in that, The method includes: Collect vehicle trajectory data and environmental data around the vehicle in the scene, and preprocess the collected data; A self-supervised contrastive learning framework is constructed, in which the upstream task adopts a Siamese network structure. This structure includes two trend attention mechanism sub-modules with shared weights. The input of each sub-module is the collected complete or missing data samples, and the output is... The temporal feature vector is generated; the downstream task uses a graph attention network module to extract spatial features from the graph-based temporal feature vector, integrates it with environmental features, and then performs dimensionality reduction; finally, after nonlinear mapping processing, the vehicle lane-changing intention is generated. We establish data augmentation strategies, encoder selection strategies, graph attention network architecture, similarity metrics, and loss functions within a self-supervised contrastive learning framework, and train it until the training objective is achieved. A vehicle lane-change intention prediction model is built using a pre-trained self-supervised contrastive learning framework to predict lane-change intentions. Spatial features are extracted by adaptively learning the interaction graph between vehicles to construct a graph attention network. The specific method is as follows: A dynamic interaction graph is constructed by taking the target lane-changing vehicle as the central node and surrounding vehicles as neighboring nodes. Spatial feature vectors of the central node are generated through graph attention calculation. Multi-head attention is used for parallel computation and fusion to capture spatial dependencies, including the relative distance and speed changes between vehicles. The specific calculation process is as follows: ① Feature transformation: transforming the input time-series feature vector Perform a linear transformation, the calculation method is as follows: in, This represents the feature vector of node i after the linear transformation by the k-th attention head, where k is the number of attention heads. Let represent the learnable weight matrix of the k-th attention head; ② Attention Weight Calculation: The unnormalized attention coefficients between the center node and its neighboring nodes are obtained by calculating the attention weights. The calculation method is as follows: Where i represents the lane-changing vehicle, serving as the central node, and j represents the surrounding vehicles, serving as neighboring nodes; This indicates the importance of nodes i to j in the k-th attention head; Here is the attention parameter vector; ∥ is the vector concatenation operation; LeakyReLU is the activation function; This represents the feature vector of node j after the linear transformation of the k-th attention head; ③ Normalization: The attention coefficients are normalized using the softmax function to obtain the final neighborhood weight distribution. The calculation method is as follows: in, This indicates the importance of neighbor node j to center node i; Let i be the set of neighboring nodes of the central node; aggregate the features of the neighboring nodes according to the normalized weights to generate new features for the central node. The calculation method is as follows: in, This represents a new feature of the central node; ④ Feature aggregation: The attention heads are computed in parallel, and the results are spliced or averaged to generate the final spatial feature vector, thus realizing multi-attention head fusion.
2. The method for predicting vehicle lane-changing intentions based on contrastive learning under data-missing conditions as described in claim 1, characterized in that, The collected vehicle trajectory data includes the lateral / lateral velocity, lateral / lateral acceleration, heading angle, lateral / lateral position, and vehicle type of lane-changing vehicles and surrounding vehicles; The collected environmental data surrounding the vehicle in the scenario includes interaction information between lane-changing vehicles and surrounding vehicles, road information, and environmental factors, among which: The interaction information between the lane-changing vehicle and surrounding vehicles includes the relative distance change rate and the relative speed change rate; Road information includes lane ID, lane direction, and lane node information; Environmental factors include weather conditions and traffic flow.
3. The method for predicting vehicle lane-changing intentions based on contrastive learning under data-missing conditions according to claim 2, characterized in that, The data augmentation strategy is used to process vehicle trajectory time series data, specifically including: The vehicle trajectory time series data is randomly masked, and a portion of the trajectory features of each vehicle is randomly extracted as the time series data to be input. The loss ratio is randomly generated to simulate real traffic scenarios involving random data loss. Generate datasets with varying proportions of missing trajectories to simulate traffic scenarios involving vehicles of different intelligence levels.
4. The method for predicting vehicle lane-changing intentions based on contrastive learning under data-missing conditions according to claim 1, characterized in that, The encoder selection strategy employs a time-trend-aware multi-head attention mechanism to capture the global trend and local changes of time-series data; and uses a fully connected network as a representation extraction module to obtain deeper correlations between features.
5. The method for predicting vehicle lane-changing intentions based on contrastive learning under data-missing conditions according to claim 1, characterized in that, The similarity metric used is Euclidean distance similarity, calculated as follows: in, Euclidean distance similarity of sample pairs and This represents the embedding representation of two samples.
6. The method for predicting vehicle lane-changing intentions based on contrastive learning under data-missing conditions according to claim 1, characterized in that, The loss function is a total loss function jointly optimized by two losses, which is a weighted sum of the contrastive learning loss and the intent prediction loss, and is calculated as follows: in, L Represents the total loss function. These are the weighting coefficients; This is the contrastive learning loss function, used in contrastive learning to calculate the similarity loss between the feature vectors of the complete sample and the masked sample. Let N be the target label and N be the total number of sample pairs. This is the intent prediction loss function, used for intent prediction tasks. Indicates the number of lane change intention categories; Indicates the true label; This represents the class probability predicted by the model.
7. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement a vehicle lane-changing intention prediction method based on contrastive learning under data-missing conditions as described in any one of claims 1-6.
Citation Information
Patent Citations
Automatic driving vehicle behavior prediction method and system fusing complex network and graph Transformer
CN116853272A
Method and system for predicting surrounding vehicle behavior of automatic driving emergency rescue vehicle based on multi-intention guiding comparative learning
CN118193953A