Vehicle track prediction method and device suitable for different driving styles
Through fuzzy C-mean clustering and global-local attention mechanism residual bidirectional long and short-term memory network, the accuracy problem of vehicle trajectory prediction in different driving styles in complex driving environments is solved, and the stability and accuracy of prediction are improved.
Patent Information
- Application Number
- CN202411101676.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The prior art is difficult to accurately predict vehicle trajectories of different driving styles in complex driving environments, especially based on deep learning methods for long calculations when processing long time series, resulting in poor prediction accuracy.
The fuzzy C-mean clustering algorithm is used for soft clustering, obtain the membership of the driving style and add hard labels, and build a two-way long and short-term memory network based on the global-local attention mechanism, and combine the long and short-term memory network and residual structure to carry out Vehicle trajectory prediction.
It improves the accuracy and adaptability of vehicle trajectory prediction, simplifies the training process, enhances the stability and accuracy of prediction, and can effectively extract long-term sequence features.
Smart Images

Figure CN119149905A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a vehicle trajectory prediction method and device adapted to different driving styles. Background Art
[0002] The different driving habits of traffic participants and their complex interactions with the environment make accurate prediction of future trajectories a huge challenge. It is worth noting that human drivers usually observe the traffic participants around them and predict their future states before taking appropriate driving actions, including acceleration, braking, or lane changing. Therefore, how to establish an efficient and accurate trajectory prediction system in a highly complex driving environment has become one of the main challenges facing autonomous vehicles.
[0003] At present, the methods for predicting vehicle trajectories include: methods based on physical models, methods based on classical machine learning, and methods based on deep learning. Among them, methods based on physical models can perform short-term trajectory prediction, but do not consider the impact of driving style on vehicle trajectory. Methods based on classical machine learning use data-driven methods to predict trajectories, but usually require pre-determination or provision of relevant features, which limits their effectiveness in handling tasks in complex environments. Methods based on deep learning predict vehicle trajectories by using large amounts of data for training, but cannot predict vehicle trajectories for different driving styles. In addition, methods based on deep learning take a long time to calculate when processing long sequences, resulting in poor prediction accuracy. Summary of the invention
[0004] In order to solve the technical problems that the existing technology cannot predict vehicle trajectories for different driving styles, and the deep learning-based method takes a long time to calculate when processing long sequences, resulting in poor prediction accuracy, the embodiment of the present invention provides a vehicle trajectory prediction method and device that adapts to different driving styles. The technical solution is as follows:
[0005] On the one hand, a vehicle trajectory prediction method adapted to different driving styles is provided, the method is implemented by a vehicle trajectory prediction device adapted to different driving styles, and the method comprises:
[0006] S1. Obtain a sample dataset of original vehicle trajectories;
[0007] S2, filtering the sample data set to obtain a filtered sample data set;
[0008] S3, according to the sample data set after the filtering process, using the principal component analysis method to perform dimensionality reduction processing to obtain data after dimensionality reduction;
[0009] S4, performing soft clustering processing on the reduced-dimensional data using a fuzzy C-means clustering algorithm to obtain the membership of the reduced-dimensional data to each driving style, determining a hard label of the reduced-dimensional data according to a maximum membership, and adding the hard label to the sample data set after filtering;
[0010] S5. Construct an initial residual bidirectional long short-term memory network based on the global-local attention mechanism;
[0011] S6. According to the sample data set after adding hard labels, the initial global-local attention mechanism-based residual bidirectional long short-term memory network is trained to obtain a trained global-local attention mechanism-based residual bidirectional long short-term memory network;
[0012] S7. Obtain the state information of the target vehicle in the observation time domain; input the state information of the target vehicle at the observation time into the trained residual bidirectional long short-term memory network based on the global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
[0013] On the other hand, a vehicle trajectory prediction device adapted to different driving styles is provided, and the device is applied to a vehicle trajectory prediction method adapted to different driving styles, and the device comprises:
[0014] A first acquisition unit, used to acquire a sample data set of an original vehicle trajectory;
[0015] A preprocessing unit, used for performing filtering processing on the sample data set to obtain a sample data set after filtering processing;
[0016] A second acquisition unit is used to perform dimensionality reduction processing using a principal component analysis method according to the sample data set after the filtering process to obtain data after dimensionality reduction;
[0017] a third acquisition unit, performing soft clustering processing on the reduced-dimensional data using a fuzzy C-means clustering algorithm to obtain the membership of the reduced-dimensional data for each driving style, determining a hard label of the reduced-dimensional data according to a maximum membership, and adding the hard label to the sample data set after filtering;
[0018] Construction unit, used to construct the initial residual bidirectional long short-term memory network based on the global-local attention mechanism;
[0019] A training unit is used to train the initial global-local attention mechanism-based residual bidirectional long short-term memory network according to the sample data set after adding hard labels, so as to obtain a trained global-local attention mechanism-based residual bidirectional long short-term memory network;
[0020] The prediction unit is used to obtain the state information of the target vehicle in the observation time domain; the state information of the target vehicle at the observation time is input into the trained residual bidirectional long short-term memory network based on the global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
[0021] On the other hand, a vehicle trajectory prediction device that is adaptable to different driving styles is provided, and the vehicle trajectory prediction device that is adaptable to different driving styles comprises: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned vehicle trajectory prediction methods that are adaptable to different driving styles is implemented.
[0022] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned vehicle trajectory prediction methods adapted to different driving styles.
[0023] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0024] The method comprises the following steps: obtaining a sample data set of original vehicle trajectories; filtering the sample data set to obtain a sample data set after filtering; performing dimensionality reduction processing by principal component analysis based on the sample data set after filtering to obtain the data after dimensionality reduction; performing soft clustering processing on the data after dimensionality reduction by using fuzzy C-means clustering algorithm to obtain the membership of the data after dimensionality reduction for each driving style, determining the hard label of the data after dimensionality reduction according to the maximum membership, and adding the hard label to the sample data set after filtering; constructing an initial residual bidirectional long short-term memory network based on a global-local attention mechanism; training the initial residual bidirectional long short-term memory network based on a global-local attention mechanism according to the sample data set after adding the hard label to obtain a trained residual bidirectional long short-term memory network based on a global-local attention mechanism; obtaining the state information of the target vehicle in the observation time domain; inputting the state information of the target vehicle at the observation time into the trained residual bidirectional long short-term memory network based on a global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain. The embodiment of the present invention uses the fuzzy C-means algorithm to soft cluster different driver styles and convert the clustering results into clear hard labels; the vehicle trajectory prediction network proposed in the present invention comprehensively considers different driving styles and environmental uncertainties, and improves the accuracy and adaptability of the vehicle trajectory prediction network; in order to effectively extract long-term sequence features, the embodiment of the present invention models the vehicle as a waveform to better understand the long-term sequence features; in addition, the embodiment of the present invention proposes a new attention mechanism to aggregate global features and local features to ensure effective and appropriate use of features. The trajectory prediction network model proposed in the present invention combines the long short-term memory network LSTM encoder-decoder structure with the residual structure, which simplifies the training process and improves the stability and accuracy of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a diagram of an implementation process of vehicle trajectories with different driving styles provided by an embodiment of the present invention;
[0027] Figure 2 is a flow chart of a vehicle trajectory prediction method adapted to different driving styles provided by an embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of a vehicle trajectory labeling algorithm provided by an embodiment of the present invention;
[0029] Figure 4 is a comparison diagram of lane change trajectories of drivers with different styles provided by an embodiment of the present invention;
[0030] Figure 5 is a schematic diagram of a local attention module provided by an embodiment of the present invention;
[0031] Figure 6 is a schematic diagram of a global attention module provided by an embodiment of the present invention;
[0032] Figure 7 It is a schematic diagram of internal variables of an LSTM unit provided by an embodiment of the present invention;
[0033] Figure 8 It is a schematic diagram of a residual bidirectional long short-term memory network structure based on a global-local attention mechanism provided by an embodiment of the present invention;
[0034] Fig. 9 is a schematic diagram of a trajectory prediction scenario provided by an embodiment of the present invention;
[0035] Fig.10 is a left lane change prediction result diagram provided by an embodiment of the present invention;
[0036] Fig.11 is a right lane change prediction result diagram provided by an embodiment of the present invention;
[0037] Fig.12 is a lane keeping prediction result graph provided by an embodiment of the present invention;
[0038] Fig.13 It is a block diagram of a vehicle trajectory prediction device adapted to different driving styles provided by an embodiment of the present invention;
[0039] Fig.14 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0041] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0042] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0043] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0044] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0045] The embodiment of the present invention provides a vehicle trajectory prediction method adapted to different driving styles. The method can be implemented by a vehicle trajectory prediction device adapted to different driving styles. The vehicle trajectory prediction device adapted to different driving styles can be a terminal or a server. Figure 1 The implementation process diagram of vehicle trajectories for different driving styles is shown in FIG. Figure 1 The overall framework of vehicle trajectory prediction is presented, including: Wavelet Denoising (WD); Sliding Window Method (SWM); Principal Component Analysis (PCA); Fuzzy c-Means Clustering (FCM); Residual Structure (Res). Figure 2 The vehicle trajectory prediction method adapted to different driving styles is shown in the flowchart, and the processing flow of the method may include the following steps:
[0046] S1. Obtain a sample dataset of original vehicle trajectories.
[0047] Among them, the original vehicle trajectory sample data set can use the public traffic safety data set (Next Generation Simulation, NGSIM) launched by the Federal Highway Administration of the United States, which is widely used in the field of transportation to study driving behaviors such as vehicle following and lane changing, vehicle motion trajectory prediction, and decision planning. The data set includes areas where vehicles and roads are coordinated, including intersections on structured roads and highway ramps; the data set has been exported to .csv format for subsequent use.
[0048] The driving style refers to the driving method selected or habitually used by the driver, including slow and steady driving, fast driving, and smooth driving.
[0049] S2. Filter the sample data set to obtain a filtered sample data set.
[0050] Optionally, the specific implementation process of S2 may include S21-S22:
[0051] S21, denoising the sample data set using a five-iteration wavelet transform denoising algorithm to obtain a denoised sample data set;
[0052] S22. According to the denoised sample data set, the denoised sample data set is balanced by calculating the heading angle as a measurement indicator of the trajectory annotation to obtain a balanced sample data set.
[0053] Among them, trajectory labels are used to balance the denoised dataset, and driving style labels are annotated on the denoised dataset to enhance the network's adaptability to diverse driving behaviors.
[0054] In a feasible implementation manner, the embodiment of the present invention considers that the sample data set is concentrated on the lane keeping trajectory, and there are few trajectories for left and right lane changes. The sample data set is balanced by trajectory label annotation, and the heading angle is used as the measurement indicator of trajectory annotation; wherein the heading angle can be expressed by the following formula (1):
[0055] (1)
[0056] in, Indicates the lateral position of the trajectory point; Indicates the longitudinal position of the trajectory point; represents the current time step; represents the next time step; Indicates the heading angle.
[0057] In a feasible implementation manner, the present invention regards the lane changing process as a continuous action across the lane boundary, specifically including:
[0058] Filter the trajectory characteristics of the target vehicle according to the vehicle ID information; Figure 3 The following is a schematic diagram of the vehicle trajectory annotation algorithm, where lane changes are confirmed by lane ID information and the definition points are is the position where the trajectory crosses the lane boundary; the heading angle is calculated at the intersection, and if the heading angles of three consecutive points are between 0 degrees and 90 degrees, the first point that meets the condition is marked as the starting point of the right lane change. The last point that meets the conditions is marked as the end point of the right lane change , at the starting point and end point All trajectory points between are marked as part of the right lane change; similarly, the left lane change is also marked: if the heading angle of three consecutive points is between -90 degrees and 0 degrees, the first point that meets the condition is marked as the starting point of the left lane change. The last point that meets the conditions is marked as the end point of the left lane change , at the starting point and end point All trajectory points between are marked as part of the left lane change. Among them, the points that are not identified as lane changes are marked as lane keeping. Optionally, Table 1 shows the steps of the trajectory labeling algorithm for the NGSIM dataset.
[0059] Table 1
[0060]
[0061] The final labeled dataset is presented in the first row of Table 2. Obviously, the number of samples of right lane change is relatively small. To ensure data balance, the lane keeping and left lane change data are randomly sampled to make their sample size equal to the right lane change data. The resulting balanced dataset is presented in the second row of Table 2.
[0062] Among them, Table 2 shows the balanced data obtained after the trajectory labeling algorithm processes the sample data set.
[0063] Table 2
[0064]
[0065] S3. According to the sample data set after filtering, principal component analysis is used to perform dimensionality reduction processing to obtain data after dimensionality reduction.
[0066] In a feasible implementation, the embodiment of the present invention selects driving behavior parameters as characteristic parameters of sample data, and performs dimensionality reduction processing on the sample data set after filtering by using principal component analysis; wherein the driving behavior parameters include: average speed, speed standard deviation, average absolute acceleration, and average headway distance, etc.
[0067] Among them, principal component analysis is used to reduce the dimension of the data set, which enables the vehicle trajectory prediction network to better understand the structure and pattern of the data.
[0068] S4. Use the fuzzy C-means clustering algorithm to perform soft clustering processing on the reduced-dimensional data to obtain the membership of the reduced-dimensional data for each driving style, determine the hard label of the reduced-dimensional data according to the maximum membership, and add the hard label to the sample data set after filtering.
[0069] Among them, the clustering results are usually deterministic, such as distinguishing between males and females. Driving style represents a fuzzy concept, and the boundaries between different driving behaviors are not clear. Traditional hard clustering algorithms, such as k-means and Gaussian mixture models, face challenges in dealing with the uncertainty of driving style. In contrast, the fuzzy C-means clustering algorithm effectively solves these problems by utilizing membership, where the membership degree represents the degree to which each data point belongs to each cluster center. This method can accurately capture the fuzziness of driving style and can adapt well to the complex structure of trajectory data.
[0070] Optionally, the specific implementation process of S4 may include S41-S43:
[0071] S41, using a fuzzy C-means clustering algorithm to calculate the fuzzy clustering center of the data after dimensionality reduction;
[0072] In a feasible implementation, in the fuzzy C-means clustering algorithm, the fuzzy cluster center can be determined by minimizing the objective function, where the objective function can be expressed by the following formula (2):
[0073] (2)
[0074] in, The fuzziness coefficient that controls the degree of fuzziness in the clustering process affects the way in which membership values are assigned to each driving style in the trajectory sample data. ; Represents the number of vehicle trajectory samples; represents the number of driving style categories, that is, the number of cluster centers; Indicates Cluster centers; Representation sample Belongs to the cluster center probability; Indicates the dimension of the sample; Representation sample In the The value of the dimension; Represents the cluster center In the The value of the dimension; Represents the Euclidean norm used to measure the distance between driving samples and cluster centers.
[0075] Among them, the membership It can be expressed by the following formula (3):
[0076] (3)
[0077] Among them, the cluster center It can be expressed by the following formula (4):
[0078] (4)
[0079] S42, iteratively calculating the membership distribution of the dimension-reduced data in different driving styles according to the fuzzy clustering center and the preset iteration conditions;
[0080] In a feasible implementation, the membership distribution of each sample data in different driving styles is obtained by iterative calculation. When the iteration termination condition is reached, the iteration is stopped to obtain the clustering result. The preset iteration termination condition can be expressed by the following formula (5):
[0081] (5)
[0082] in, represents the number of iterations, is a small constant representing the error threshold; when The maximum change in consecutive iterations does not exceed When , the iteration stops.
[0083] S43. According to the membership distribution, the membership of each data point in all clusters is calculated, and the data point is assigned to the corresponding cluster center according to the maximum membership, so as to obtain the hard label of the sample data, and add the hard label to the sample data set after filtering.
[0084] The maximum membership is obtained, and the maximum membership of all data points is averaged to obtain the fuzzy partition coefficient; the maximum membership can be expressed by the following formula (6):
[0085] (6)
[0086] in, Represents the total number of data points; the closer the FPC value is to 1, the better the clustering effect.
[0087] The process of obtaining hard labels for sample data can be expressed as follows (7):
[0088] (7)
[0089] in, Representation sample Hard tag.
[0090] Among them, the fuzzy C-means clustering algorithm performs soft clustering processing on the sample data set, which enhances the accuracy and applicability of the vehicle trajectory prediction network.
[0091] The fuzzy C-means clustering algorithm is used to evaluate the impact of different cluster numbers on clustering performance; Table 3 shows the impact of different numbers on clustering effects; the results shown in Table 3 show that clustering achieves the best performance when there are three categories. In order to assign accurate driving style labels, each data point is assigned to the cluster center corresponding to its maximum membership. The concepts of soft clustering and hard labels are used to convert fuzzy clustering results into accurate hard labels, and the accurate hard labels are recorded in the data set.
[0092] Table 3
[0093]
[0094] Among them, Figure 4 A comparison of lane change trajectories from three different driving style categories is shown. Obviously, cluster 1 has a relatively smooth trajectory curve with a small lane change angle, which is classified as a conservative driving style. Cluster 2 shows a moderate lane change angle and a medium trajectory length, which indicates a neutral driving style. Cluster 3 shows fast lane change actions and a short trajectory length, which is defined as an aggressive driving style.
[0095] The data is divided into training set, test set and validation set in a ratio of 6:2:2. In order to improve the prediction ability and training efficiency of the model, data difference and feature scaling regularization methods are used to reduce noise and fluctuations in the sequence.
[0096] S5. Construct an initial residual bidirectional long short-term memory network based on the global-local attention mechanism.
[0097] Optionally, the initial global-local attention mechanism-based residual bidirectional long short-term memory network of S5 includes: a global attention module, a local attention module and a residual bidirectional long short-term memory network;
[0098] Among them, the global attention module adopts the improved multi-head self-attention mechanism, residual gating mechanism and global context attention mechanism to enhance the extracted global features;
[0099] Local attention module, used to enhance the extracted local features;
[0100] Residual Bidirectional Long Short-Term Memory Network for identifying long-term dependencies in input sequence data.
[0101] S6. According to the sample data set after adding hard labels, the initial residual bidirectional long short-term memory network based on the global-local attention mechanism is trained to obtain a trained residual bidirectional long short-term memory network based on the global-local attention mechanism.
[0102] Optionally, the specific implementation process of S6 may include S61-S65:
[0103] S61, inputting the sample data set after adding hard labels into the initial residual bidirectional long short-term memory network based on the global-local attention mechanism, modeling the vehicle as a waveform according to the principle of quantum mechanics, and determining the amplitude and phase of the vehicle wave by analyzing the superposition effect of the vehicle wave, thereby obtaining characteristic data with the vehicle wave and phase;
[0104] In a feasible implementation, when the waves of two or more vehicles meet at the same point, the wave superposition principle is followed; at this point, the superposition effect of the vehicle waves can be represented by the resultant vector sum of their respective displacements, and the superposition effect can be expressed by the following formula (8):
[0105] (8)
[0106] in, represents an imaginary unit; Represents absolute value operation; represents element-wise multiplication; represents the amplitude, Indicates the phase, Represents a selected positive integer.
[0107] The amplitude of the vehicle wave is affected by the speed difference, and the phase of the wave indicates the vehicle position. When two vehicle waves are displayed in the same direction and with the same displacement at a certain point, the phase difference caused by constructive interference can be expressed by the following formula (9):
[0108] (9)
[0109] in, Indicates the corresponding selected integer multiple; Represents the phase difference between two vehicle waves.
[0110] Among them, when the two vehicle waves have opposite displacements at a certain point, the phase difference between the two vehicle waves can determine the occurrence of destructive interference, which can be expressed by the following formula (10):
[0111] (10)
[0112] Among them, when vehicles of different speeds interfere with each other, the superposition effect of waves can show how waves of different amplitudes and phases interfere with each other. By analyzing the superposition effect of vehicles, the interaction between different vehicles can be inferred and the dynamic behavior in traffic scenes can be understood.
[0113] The amplitude and phase of the vehicle wave can be expressed by the following formula (11):
[0114] (11)
[0115] in, represents a standard fully connected layer; represents the first learning parameter; represents the second learning parameter; Represents input features; represents the amplitude of the vehicle wave; represents the phase of the vehicle wave; represents a selected positive integer; wherein the first learning parameter and the second learning parameter can be adjusted according to the input features to obtain the optimal weights of the amplitude and phase embedding of the vehicle wave; wherein the representation of the phase and amplitude of the vehicle wave in the negative domain can be expressed by the following formula (12):
[0116] (12)
[0117] In one possible implementation, in the interaction of all vehicles in the driving scene, the n vehicle waves can be expressed as , the aggregation of vehicle waves can be expressed by the following formula (13):
[0118] (13)
[0119] in, represents the complex domain representation after aggregating vehicle waves;
[0120] In a feasible implementation manner, the real number after the aggregated vehicle wave can be obtained by weighted summation; wherein the real number after the aggregated vehicle wave can be expressed by the following formula (14):
[0121] (14)
[0122] in, represents the real number after the aggregated vehicle wave; represents the first learning weight; represents the first learned weight.
[0123] S62, inputting the characteristic data of vehicle wave and phase into the local attention module, The convolution layer performs initial dimension conversion to obtain the converted feature map; the converted feature map is processed using an adaptive convolution layer and a weighting mechanism to obtain local features;
[0124] Among them, Figure 5 The schematic diagram of the local attention module framework is shown in Figure 1. The input data is input into the local attention module and then The convolution, batch normalization and ReLU functions are processed to obtain the first processing result; The convolution is used to calculate the first processing result to obtain the second processing result; the second processing result is further processed by the softmax function and the Dropout regularization method to obtain local features.
[0125] S63, inputting the feature data with vehicle wave and phase into the global attention module, determining the feature relationship between the time steps of the feature data with vehicle wave and phase through improved multi-head self-attention and global context attention, and obtaining the global feature;
[0126] Among them, Figure 6 The schematic diagram of the global attention module framework is shown in the figure; the input data is input into the global attention module, processed by the multi-head attention mechanism, and the processing result is obtained; the residual gating mechanism further processes the processing result, and extracts features through the global context attention to obtain global features. The global attention module includes improved multi-head self-attention and global context attention. The improved multi-head self-attention adds a gating mechanism and residual connection. By activating GLU, the network can selectively enhance input features or reduce the adverse effects of input features; residual connections help to achieve efficient information transmission and integration between different attention heads; by processing multiple attention heads at the same time, the network can effectively capture the feature relationship of each time step in the time series. Among them, the global context attention aggregates the global context information, so that the interdependence between features in all time series can be fully understood.
[0127] Among them, the global attention module integrates the features of each local time window and obtains global structural information by considering the relationship between the features of the current time step and all other time steps.
[0128] In a feasible implementation, let the given first time step be p, and the feature of the first time step be ; Let the given second time step be q, and the characteristics of the second time step be , the above variables are mapped into a common feature space through the feature mapping function, which can be expressed by the following formula (15):
[0129] (15)
[0130] in, represents the feature mapping function; Represents the first time step and the second time step The relationship between features.
[0131] Among them, the feature of the first time step p The relationship vector can be expressed by the following formula (16):
[0132] (16)
[0133] in, Represents the first time step p and feature The relationship vector.
[0134] In a feasible implementation, the features of the time step and the relationship vector are combined into a paired representation, and the global feature representation at the first time step p is obtained as ; According to the above steps, the global feature representation at the second time step q can be obtained; wherein, the specific implementation steps for obtaining the global feature representation at the second time step q are the same as the steps for obtaining the global feature representation at the first time step p, and are not elaborated in this embodiment of the present invention.
[0135] S64, fusing the local features with the global features to obtain fused features;
[0136] In a feasible implementation, the fused features can be expressed by the following formula (17):
[0137] (17)
[0138] in, Represents the fused features; Represents local features; Represents global features.
[0139] Among them, by fusing local features with global features, the vehicle trajectory prediction network can fully understand the overall traffic scene and accurately determine the subtle changes between individual vehicles.
[0140] S65. Input the fused features into the residual bidirectional long short-term memory network, construct a residual block through jump connection to calculate the input fused features, and output the prediction result.
[0141] The bidirectional long short-term memory network is constructed on the basis of the long short-term memory network LSTM; the long short-term memory network LSTM includes: a forget gate, an input gate and an output gate; Figure 7 is a schematic diagram of the internal variables of the LSTM unit; the relationship between the internal variables of the short-term memory network LSTM unit can be expressed by the following formula (18):
[0142] (18)
[0143] in, express Activation function; represents the hyperbolic tangent activation function; Represents the time step The hidden state vector at , includes the accumulated memory and information from previous time steps; Indicates the current time step The input vector is Export; represents element-wise multiplication; represents the first weight matrix, represents the second weight matrix, represents the third weight matrix, represents the fourth weight matrix; represents the bias term of the first weight matrix, represents the bias term of the second weight matrix, represents the bias term of the third weight matrix, Represents the bias term of the fourth weight matrix; the weight matrix and the bias term are used to calculate the forget gate, the input gate, the candidate cell state, and the output gate.
[0144] Among them, the bidirectional long short-term memory network includes an additional reverse recurrent layer, which enables the network to access forward and reverse time step sequence data at the same time. This bidirectional recursive structure can effectively integrate past and future information, enabling the model to more accurately determine long-term dependencies in sequence data.
[0145] In a feasible implementation, Figure 8 The residual bidirectional long short-term memory network structure is shown in FIG. 1 ; the residual bidirectional long short-term memory network is a bidirectional long short-term memory network with a residual structure added thereto; wherein the residual bidirectional long short-term memory network uses skip connections to construct residual blocks, so that the network can simultaneously utilize the original input data and residual information of the previous layer to enhance the performance of the network; wherein the calculation formula of the residual block can be expressed by the following formula (19):
[0146] (19)
[0147] in, represents the input sequence, Represents the output after network processing.
[0148] In a feasible implementation, when training the residual bidirectional long short-term memory network based on the global-local attention mechanism, the PyTorch deep learning framework is used on the NVIDIA GeForce RTX 4060 Ti GPU. The training process includes 500 iterations, the batch size is 1024; the loss function used is the mean square error MSE, the optimizer is Adam, the learning rate is 0.001, and the weight decay is 0.0001; the encoder and decoder use the residual bidirectional long short-term memory network of the structure, each module includes 2 layers, the hidden dimension is 128, and the drop rate is set to 0.2.
[0149] S7. Obtain the state information of the target vehicle in the observation time domain; input the state information of the target vehicle at the observation time into the trained residual bidirectional long short-term memory network based on the global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
[0150] Optionally, the state information of the target vehicle in S7 within the observation time domain includes: the type of the target vehicle, the running state of the target vehicle, and the temporal and spatial relationship between the target vehicle and surrounding obstacle vehicles.
[0151] Among them, Fig. 9 The figure shows a schematic diagram of the trajectory prediction scenario, including six obstacle vehicles with longitudinal displacements in the range of [-100,100] meters. The goal of trajectory prediction is to predict the spatial coordinates of road participants, including cars, pedestrians, and animals, at different time periods, including short-term and long-term intervals. The short-term interval is 1-3 seconds, and the long-term interval is 3-5 seconds.
[0152] Among them, in a complex traffic environment, the surrounding environment information and the target vehicle's own operating status can be used to accurately predict the future trajectory of the target vehicle.
[0153] Among them, the state information of the target vehicle in the observation time domain can be expressed by the following formula (20):
[0154] (20)
[0155]
[0156]
[0157] in, Indicates the target vehicle in the observation time domain The input status within Indicates the predicted length of the target vehicle; Indicates the predicted width of the target vehicle; Represents the horizontal coordinate of the predicted target;
[0158] Indicates the vertical coordinate of the predicted target; Indicates its driving style label. Indicates the speed of the predicted target; Indicates the acceleration of the predicted target; Represents the predicted target vehicle and The headway between the vehicles that are obstacles, represents the headway distance between them, represents the observation time domain; Indicates the number of obstacle vehicles.
[0159] Among them, the future trajectory of the target vehicle in the prediction time domain can be expressed by the following formula (21):
[0160] (twenty one)
[0161]
[0162] in, Represents the time domain from the current time to the predicted time domain The lateral coordinates of the predicted trajectory of the internal target vehicle; Represents the time domain from the current time to the predicted time domain The longitudinal coordinate of the predicted trajectory of the internal target vehicle; represents the prediction time domain; Represents the future trajectory of the target vehicle in the prediction time domain.
[0163] In a feasible implementation, the embodiment of the present invention uses the historical 3-second trajectory to predict the trajectory of the next 5 seconds, wherein the evaluation index is the root mean square error of the predicted trajectory within 1 to 5 seconds; the root mean square error evaluates the prediction accuracy of the entire trajectory sequence by calculating the average root mean square error between the predicted value and the actual value, which can reflect the overall accuracy of the vehicle trajectory prediction network; wherein the calculation formula of the root mean square error can be expressed by the following formula (22):
[0164] (twenty two)
[0165] in, represents the number of samples, The real trajectory The coordinates of the points, Represents the predicted trajectory The coordinates of a point.
[0166] In order to evaluate the performance of the proposed model, the present invention compares it with several advanced models proposed in recent years, including:
[0167] 1) GSTCN (Graph Spatial-Temporal Convolutional Network): combines graph convolutional network (GCN) and CNN for temporal feature extraction.
[0168] 2) STDAN (Spatial-Temporal Dynamic Attention Network): uses self-attention mechanism for multi-dimensional feature extraction to capture temporal and spatial interaction features.
[0169] 3) FHIFN (History Interaction Feature Fusion Network): A multi-head attention mechanism is used to encode the interaction features between the target vehicle and surrounding vehicles.
[0170] 4) IHN (Intent-Aware Hybrid Convolutional and Attention Network): The intention-aware convolutional social pooling module and the hybrid attention mechanism module are used to consider the trajectory periodicity affected by road geometry constraints.
[0171] 5) MTF-LSTM (Mixed Teaching Force Long Short-Term Memory Network): A hybrid imitation learning decoding method based on LSTM network for vehicle trajectory prediction.
[0172] 6) IMM (Interactive Multi-Model): combines LSTM behavior recognition and Gaussian process motion modeling for accurate lane change trajectory prediction.
[0173] 7) GLEA-ResBiLSTM (Residual Bidirectional Long Short-Term Memory Network based on Global-Local Attention Mechanism): a vehicle trajectory prediction model proposed in this paper.
[0174] Among them, the comparison results are shown in Table 4. It can be seen that the GLEA-ResBiLSTM model shows excellent prediction ability. Especially in the medium and long-term prediction, the GSTCN, STDAN and FHIFN methods show significant errors, and their RMSE values for 5-second predictions are 2.95, 3.57 and 3.63 respectively. In contrast, the IHN and MTF-LSTM methods show better performance. Although the IMM method has a slight advantage in the first 2 seconds of prediction (RMSE is less than 0.22), the proposed framework shows very stable prediction accuracy in the short term. As the prediction time increases, the prediction accuracy of the proposed GLEA-ResBiLSTM framework gradually emerges, and finally the RMSE for 5 seconds is kept within 0.56. This result clearly demonstrates the robustness of the proposed GLEA-ResBiLSTM framework in handling complex scene trajectory prediction.
[0175] Table 4
[0176]
[0177] In order to further intuitively demonstrate the prediction performance of the GLEA-ResBiLSTM model in different driving behaviors, the present invention selects trajectory samples of different driving behaviors from the balanced dataset shown in Table 2. Fig.10 The left lane change prediction results are shown in Fig.11 The right lane change prediction results shown in Fig.12 The prediction results of lane keeping behaviors are shown in FIG. 1. It can be observed again that the model proposed in the present invention shows excellent performance in predicting these behaviors with high accuracy and stability.
[0178] The embodiment of the present invention obtains a sample data set of original vehicle trajectories; performs filtering processing on the sample data set to obtain a sample data set after filtering processing; performs dimensionality reduction processing by using the principal component analysis method according to the sample data set after filtering processing to obtain data after dimensionality reduction; performs soft clustering processing on the data after dimensionality reduction by using the fuzzy C-means clustering algorithm to obtain the membership degree of the data after dimensionality reduction for each driving style, determines the hard label of the data after dimensionality reduction according to the maximum membership degree, and adds the hard label to the sample data set after filtering processing; constructs an initial residual bidirectional long short-term memory network based on a global-local attention mechanism; trains the initial residual bidirectional long short-term memory network based on a global-local attention mechanism according to the sample data set after adding the hard label, and obtains a trained residual bidirectional long short-term memory network based on a global-local attention mechanism; obtains the state information of the target vehicle in the observation time domain; inputs the state information of the target vehicle at the observation time into the trained residual bidirectional long short-term memory network based on a global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
[0179] The embodiment of the present invention uses the fuzzy C-means algorithm to soft cluster different driver styles and convert the clustering results into clear hard labels; the vehicle trajectory prediction network proposed in the present invention comprehensively considers different driving styles and environmental uncertainties, and improves the accuracy and adaptability of the vehicle trajectory prediction network; in order to effectively extract long-term sequence features, the embodiment of the present invention models the vehicle as a waveform to better understand the long-term sequence features; in addition, the embodiment of the present invention proposes a new attention mechanism to aggregate global features and local features to ensure effective and appropriate use of features. The trajectory prediction network model proposed in the present invention combines the long short-term memory network LSTM encoder-decoder structure with the residual structure, which simplifies the training process and improves the stability and accuracy of the prediction.
[0180] Fig.13 1 is a block diagram of a vehicle trajectory prediction device adapted to different driving styles according to an exemplary embodiment, wherein the device is used for a vehicle trajectory prediction method adapted to different driving styles. Fig.13 The device includes a first acquisition unit 310, a preprocessing unit 320, a second acquisition unit 330, a third acquisition unit 340, a construction unit 350, a training unit 360 and a prediction unit 370. Among them:
[0181] A first acquisition unit 310 is used to acquire a sample data set of an original vehicle trajectory;
[0182] A preprocessing unit 320 is used to perform filtering processing on the sample data set to obtain a sample data set after filtering processing;
[0183] A second acquisition unit 330 is used to perform dimensionality reduction processing using a principal component analysis method according to the sample data set after the filtering process to obtain data after dimensionality reduction;
[0184] a third acquisition unit 340, configured to perform soft-soft clustering processing on the reduced-dimensional data by using a fuzzy C-means clustering algorithm to obtain the membership of the reduced-dimensional data for each driving style, determine a hard label of the reduced-dimensional data according to a maximum membership, and add the hard label to the sample data set after filtering;
[0185] A construction unit 350 is used to construct an initial residual bidirectional long short-term memory network based on a global-local attention mechanism;
[0186] A training unit 360 is used to train the initial global-local attention mechanism-based residual bidirectional long short-term memory network according to the sample data set after adding hard labels, so as to obtain a trained global-local attention mechanism-based residual bidirectional long short-term memory network;
[0187] The prediction unit 370 is used to obtain the state information of the target vehicle in the observation time domain; the state information of the target vehicle at the observation time is input into the trained global-local attention mechanism-based residual bidirectional long short-term memory network to obtain the future trajectory of the target vehicle in the prediction time domain.
[0188] Fig.14 It is a structural schematic diagram of an electronic device 1400 provided in an embodiment of the present invention. The electronic device 1400 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 1401 and one or more memories 1402, wherein at least one instruction is stored in the memory 1402, and the at least one instruction is loaded and executed by the processor 1401 to implement the steps of the above-mentioned vehicle trajectory prediction method adapted to different driving styles.
[0189] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to complete the above-mentioned Chinese text spelling check method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0190] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0191] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A vehicle trajectory prediction method adapted to different driving styles, characterized in that: The method comprises: S1. Obtain a sample dataset of original vehicle trajectories; S2, performing filtering processing on the sample data set to obtain a filtered sample data set; S3, according to the sample data set after the filtering process, using the principal component analysis method to perform dimensionality reduction processing to obtain data after dimensionality reduction; S4, performing soft clustering processing on the reduced-dimensional data using a fuzzy C-means clustering algorithm to obtain the membership of the reduced-dimensional data to each driving style, determining a hard label of the reduced-dimensional data according to a maximum membership, and adding the hard label to the sample data set after filtering; S5. Construct an initial residual bidirectional long short-term memory network based on the global-local attention mechanism; S6. According to the sample data set after adding hard labels, the initial global-local attention mechanism-based residual bidirectional long short-term memory network is trained to obtain a trained global-local attention mechanism-based residual bidirectional long short-term memory network; S7. Obtain the state information of the target vehicle in the observation time domain; input the state information of the target vehicle at the observation time into the trained residual bidirectional long short-term memory network based on the global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
2. The vehicle trajectory prediction method adapted to different driving styles according to claim 1, characterized in that: The step S2 of filtering the sample data set to obtain the filtered sample data set includes: S21, denoising the sample data set using a five-iteration wavelet transform denoising algorithm to obtain a denoised sample data set; S22. According to the denoised sample data set, the denoised sample data set is balanced by calculating the heading angle as a measurement indicator of the trajectory annotation to obtain a balanced sample data set.
3. The vehicle trajectory prediction method adapted to different driving styles according to claim 2 is characterized in that: The step S4 uses a fuzzy C-means clustering algorithm to perform soft clustering processing on the reduced-dimensional data to obtain the membership of the reduced-dimensional data for each driving style, determines the hard label of the reduced-dimensional data according to the maximum membership, and adds the hard label to the sample data set after filtering, including: S41, using a fuzzy C-means clustering algorithm to calculate the fuzzy clustering center of the data after dimensionality reduction; S42, iteratively calculating the membership distribution of the dimension-reduced data in different driving styles according to the fuzzy cluster center and a preset iteration condition; S43. According to the membership distribution, the membership of each data point in all clusters is calculated, and the data point is assigned to the corresponding cluster center according to the maximum membership, so as to obtain the hard label of the sample data, and the hard label is added to the sample data set after filtering.
4. The vehicle trajectory prediction method adapted to different driving styles according to claim 1, characterized in that: The initial global-local attention mechanism-based residual bidirectional long short-term memory network of S5 includes: a global attention module, a local attention module and a residual bidirectional long short-term memory network; The global attention module adopts an improved multi-head self-attention mechanism, a residual gating mechanism and a global context attention mechanism to enhance the extracted global features; The local attention module is used to enhance the extracted local features; The residual bidirectional long short-term memory network is used to determine the long-term dependencies in the input sequence data.
5. The vehicle trajectory prediction method adapted to different driving styles according to claim 4, characterized in that: The step S6 trains the initial global-local attention mechanism residual bidirectional long short-term memory network according to the sample data set after adding the hard label to obtain a trained global-local attention mechanism residual bidirectional long short-term memory network, including: S61, inputting the sample data set after adding hard labels into the initial global-local attention mechanism-based residual bidirectional long short-term memory network, modeling the vehicle as a waveform according to the principle of quantum mechanics, and determining the amplitude and phase of the vehicle wave by analyzing the superposition effect of the vehicle wave, thereby obtaining feature data with the vehicle wave and phase; S62, inputting the feature data with vehicle wave and phase into the local attention module, performing initial dimension conversion through a 1×1 convolution layer to obtain a converted feature map; using an adaptive convolution layer and a weighting mechanism to process the converted feature map to obtain local features; S63, inputting the feature data with vehicle wave and phase into the global attention module, determining the feature relationship between the time steps of the feature data with vehicle wave and phase through improved multi-head self-attention and global context attention, and obtaining global features; S64, fusing the local feature with the global feature to obtain a fused feature; S65, input the fused features into the residual bidirectional long short-term memory network, construct a residual block through skip connection to calculate the input fused features, and output a prediction result.
6. The vehicle trajectory prediction method adapted to different driving styles according to claim 1, characterized in that: The state information of the target vehicle in the observation time domain in S7 includes: the type of the target vehicle, the running state of the target vehicle, and the temporal and spatial relationship between the target vehicle and surrounding obstacle vehicles.
7. A vehicle trajectory prediction device adapted to different driving styles, the vehicle trajectory prediction device adapted to different driving styles is used to implement the vehicle trajectory prediction method adapted to different driving styles as claimed in any one of claims 1 to 6, characterized in that: The device comprises: A first acquisition unit, used to acquire a sample data set of an original vehicle trajectory; A preprocessing unit, used for performing filtering processing on the sample data set to obtain a sample data set after filtering processing; A second acquisition unit is used to perform dimensionality reduction processing using a principal component analysis method according to the sample data set after the filtering process to obtain data after dimensionality reduction; a third acquisition unit, configured to perform soft clustering processing on the reduced-dimensional data by using a fuzzy C-means clustering algorithm to obtain the membership of the reduced-dimensional data to each driving style, determine a hard label of the reduced-dimensional data according to a maximum membership, and add the hard label to the sample data set after filtering; Construction unit, used to construct the initial residual bidirectional long short-term memory network based on the global-local attention mechanism; A training unit is used to train the initial global-local attention mechanism-based residual bidirectional long short-term memory network according to the sample data set after adding hard labels, so as to obtain a trained global-local attention mechanism-based residual bidirectional long short-term memory network; The prediction unit is used to obtain the state information of the target vehicle in the observation time domain; the state information of the target vehicle at the observation time is input into the trained residual bidirectional long short-term memory network based on the global-local attention mechanism to obtain the future trajectory of the target vehicle in the prediction time domain.
8. The vehicle trajectory prediction device adapted to different driving styles according to claim 7, characterized in that: The pre-processing unit is used for: De-noising the sample data set using a five-iteration wavelet transform denoising algorithm to obtain a denoised sample data set; According to the denoised sample data set, the heading angle is calculated as a measurement indicator of trajectory annotation, and the denoised sample data set is balanced to obtain a balanced sample data set.
9. A vehicle trajectory prediction device adapted to different driving styles, characterized in that: The vehicle trajectory prediction device adapted to different driving styles includes: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Target trajectory recognition method based on residual network and attention mechanism
CN115048870A
Traffic mode recognition method and system based on global and local spatial-temporal feature fusion
CN116595410A
Vehicle track prediction model construction method combining data driving and knowledge guiding
CN117141517A
Automatic driving vehicle behavior prediction method and system fusing complex network and graph Transformer
CN118025203A
Vehicle track prediction and behavior decision-making method and system considering driving style
CN118306403A
Cited By
Self-supervised trajectory classification method and system based on multilevel feature extraction
CN119357751A
Photovoltaic power generation power prediction model training method, prediction method, device, equipment and medium
CN119853033A
Photovoltaic power generation power prediction model training method, prediction method, device, equipment and medium
CN119853033B
Driving style identification method and device combined with graph convolutional network and long and short term memory network, and medium
CN121682428A
