Intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis

Through multi-view feature fusion and collision risk analysis, combined with deep learning and graph convolution network, a smart car lane-changing decision model is constructed, which solves the large data demand, poor adaptability and lack of safety of automatic driving lane-changing decision-making in the existing technology. problem, achieving more efficient and safer lane-changing decisions.

CN118627013BActive Publication Date: 2024-10-11SHANDONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411089427.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-10-11
Estimated Expiration
2044-08-09

Smart Images

  • Figure CN118627013B_ABST
    Figure CN118627013B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of autonomous driving technology, and discloses a smart car lane changing method based on multi-view feature fusion and collision risk analysis. The present invention combines prior knowledge and deep learning technology, especially using advanced algorithms such as neural networks, graph convolutional networks GCN and visual transformers ViT to analyze complex traffic conditions, providing a more efficient and safe decision-making framework for autonomous driving car lane changes than traditional methods. By integrating different feature extraction methods, it is possible to accurately grasp vehicle dynamics, road characteristics and the relationship between vehicles, and through the new data set formed by feature fusion technology, the lane changing decision model based on ViT realizes accurate prediction of lane changing behavior, thereby improving the accuracy and reliability of decision-making; at the same time, a collision safety-based method is added to evaluate lane changing decisions, so that the lane changing method can further ensure safety while improving performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous driving, and in particular relates to an intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis. Background Art

[0002] At present, the autonomous driving lane changing decision methods used at home and abroad can be roughly divided into two categories: one is a rule-based decision method, and the other is a learning-based decision method.

[0003] The rule-based decision-making method does not take into account the driver's subjective judgment and driving style. Such rules are only applicable to specific scenarios. For complex traffic environments and uncertain traffic conditions, the rule model may have some limitations.

[0004] Another mainstream lane-changing decision method is a learning-based decision method. Common learning-based decision methods include deep learning and reinforcement learning. Compared with rule methods based on some predefined parameters, learning-based lane-changing decision methods often have stronger generalization capabilities after sufficient data training and are able to handle different situations.

[0005] However, the lane-changing decision method based on learning often has the following defects in practical applications:

[0006] Usually a large amount of data is required for training, and the training time is long and the adaptability is poor. The model often fails to converge, that is, it fails to achieve the expected performance level or fails to converge to the optimal solution. In addition, this method can only guarantee the optimality of the strategy in a statistical sense, and due to its inherent poor interpretability, it is impossible to know when the decision generated by the model is unreasonable. Summary of the invention

[0007] In response to the lane changing decision problem of vehicles in autonomous driving systems, the present invention proposes an intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis. This method utilizes the complementary advantages of multimodal data processing and feature extraction methods, and through the cross-action of deep learning and rule verification, it is beneficial to achieve a significant improvement in lane changing decision performance and safety.

[0008] In order to achieve the above object, the present invention adopts the following technical scheme:

[0009] An intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis comprises the following steps:

[0010] Step 1. Preprocess the trajectory data in the acquired autonomous driving HighD dataset;

[0011] Step 2. Using the trajectory data in the HighD dataset and combining it with the prior knowledge of lane-changing behavior analysis, the key features that affect the lane-changing decision are directly extracted;

[0012] Step 3. Convert the trajectory data in the HighD dataset into image format, use the built environment feature extraction network EFENet to extract the spatiotemporal features of vehicle motion, and reduce the dimension of the feature space through principal component analysis PCA;

[0013] Step 4. Construct a traffic network topology map based on the trajectory data in the HighD dataset, and then use the graph convolutional network (GCN) to extract features from the topology map to capture the complex relationships and interaction patterns between vehicles.

[0014] Step 5. Use feature concatenation to combine the features extracted from step 2 to step 4 into a comprehensive feature vector, and use the data set consisting of the comprehensive feature vector to train the following lane change decision model;

[0015] Step 6. Build a lane-changing decision model based on the visual transformer ViT, and use the data set obtained in step 5 to train the lane-changing decision model to obtain a trained lane-changing decision model;

[0016] The lane changing decision is output based on the trained lane changing decision model, and the lane changing decision is evaluated based on the collision safety method.

[0017] The present invention has the following advantages:

[0018] As described above, the present invention proposes a smart car lane changing method based on multi-view feature fusion and collision risk analysis, which adopts a comprehensive data processing and feature extraction method, combines prior knowledge and deep learning technology, and especially uses the constructed network structure and advanced algorithms such as graph convolution network GCN and vision transformer (ViT) to analyze complex traffic conditions, providing a more efficient and safe decision framework for lane changing for autonomous driving vehicles than traditional methods. By integrating different feature extraction methods, it is possible to accurately grasp vehicle dynamics, road characteristics and vehicle relationships, understand complex traffic scenes more comprehensively, and form a new data set through feature fusion technology, and make lane changing decisions based on the lane changing decision model of ViT. Among them, the VIT model has a self-attention mechanism, which can adaptively adjust the focus area according to the characteristics of the input data, highlight important information and ignore irrelevant information, so as to more accurately infer the vehicle's motion trajectory and the behavior pattern of other vehicles. At the same time, for time series data analysis with real-time and dynamic characteristics, compared with the traditional lane changing decision model using a combination of LSTM and CNN, the VIT model has obvious advantages in lane changing decisions. When processing continuous frames, ViT can directly process the image of each frame by cutting the image into multiple small blocks (words), and inputting these words into the Transformer model for processing, and then inferring the vehicle's motion trajectory and the behavior patterns of other vehicles by comparing the outputs between different frames, and can capture the global information in the image. VIT has an efficient self-attention mechanism and parallel computing capabilities, which can reduce computing costs while maintaining high performance. It also has the advantages of global vision, dynamic weights, long-short distance modeling, flexibility and interpretability. These advantages enable ViT to achieve excellent performance in processing image tasks, can accurately predict lane changing behaviors, and improve the accuracy and reliability of decision-making. At the same time, due to the addition of collision safety-based lane changing decision evaluation, the lane changing method can further reduce unsafe and unreasonable lane changing behaviors while improving performance, improve the long tail effect, and improve overall road safety and traffic efficiency. The multi-level information fusion and decision verification mechanism proposed in the present invention provides a new technical approach for decision-making of complex behaviors in intelligent driving systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 The figure is a general block diagram of the intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis in the present invention;

[0020] Figure 2 It is a flow chart of the intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis in the present invention;

[0021] Figure 3It is a state distribution diagram of the vehicle itself and five surrounding vehicles in the present invention;

[0022] Figure 4 A grayscale image constructed based on speed between vehicles in the present invention;

[0023] Figure 5 A visualized topological structure constructed between vehicles in the present invention;

[0024] Figure 6 This is the overall framework diagram of the neural network structure constructed in the present invention;

[0025] Figure 7 A schematic diagram of the lane-changing safety distance between the host vehicle and the target lane in the present invention;

[0026] Figure 8 It is a schematic diagram of the safe distance between the main vehicle and the vehicle in front of the current lane when changing lanes in the present invention. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0028] The present invention discloses a lane changing method for an intelligent vehicle based on multi-view feature fusion and collision risk analysis. The method combines the ViT framework for lane changing decision making and evaluates the lane changing decision through a collision safety-based method. The general process is as follows: first, the trajectory data is processed by a method based on prior knowledge, including converting the original trajectory information into a structured data format to better understand the movement pattern and behavior characteristics of the vehicle; then, based on the pre-processed data, it is converted into a grayscale image about the speed, and then a new neural network model is proposed to extract the features of the image and reduce the data dimension, in order to identify spatial characteristics and local patterns; then, the graph structure is used to depict the interaction between vehicles and their interaction in the traffic network, and the data is processed through a graph convolutional network to encode complex connection relationships and extract corresponding features; then, the features obtained from these three steps are integrated together to form a comprehensive feature set, which will be used as the input of the ViT framework; finally, the formulated lane changing strategy will undergo a lane changing decision evaluation based on collision safety to ensure that the lane changing action meets the safety requirements. This verification link particularly emphasizes reducing accident risks and enhancing driving safety, thereby ensuring that the decision-making process not only utilizes the deep knowledge obtained through data learning, but also complies with established safety standards.

[0029] The following is a detailed description of the intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis in this embodiment. Figure 1 and Figure 2 As shown, the intelligent vehicle lane changing method in this embodiment includes the following steps:

[0030] Step 1. Preprocess the trajectory data in the acquired autonomous driving HighD dataset.

[0031] Data preprocessing is a critical step in data analysis and machine learning projects, especially when the project relies on large-scale and complex datasets, such as the High-Dimensional Trajectory Dataset (HighD).

[0032] In this stage, the HighD dataset is first selected, cleaned, and standardized to ensure the quality and consistency of the input data. This ensures that the data received by the model is purified and unified, laying the foundation for high-quality model training.

[0033] Specifically, the data preprocessing process can be divided into the following steps:

[0034] Step 1.1. Relative coordinate transformation.

[0035] In order to uniformly describe the trajectories of different driving and lane-changing directions in the HighD dataset, a coordinate system conversion method is adopted, where the lane-changing starting position is set as the new coordinate origin, the driving direction is the positive direction of the x-axis, and the lane-changing direction is the positive direction of the y-axis.

[0036] This helps standardize lane change trajectory data and simplifies subsequent analysis.

[0037] Step 1.2. Filter the data and select the data that is helpful for lane-changing decision.

[0038] Step 1.2.1. Filter vehicle types. Currently, sedans are more concerned about vehicle lane changing. There are differences in the lane changing methods of sedans and trucks, so only sedans are considered when filtering data.

[0039] Step 1.2.2. Filter the vehicle data with free lane-changing behavior in the HighD dataset.

[0040] Since the left-going sections have frequent forced lane changes due to external interference introduced by the ramp, they are excluded from the analysis, and only the data of vehicles traveling to the right are considered, and the trajectories with more than 1 lane change are eliminated.

[0041] Continuous lane changes may have different behavioral characteristics compared to single lane changes.

[0042] Step 1.3. Clean the data to remove erroneous data or outliers.

[0043] Step 1.3.1. Identify outliers: Use statistical analysis methods, such as calculating the mean, median, standard deviation, etc., to identify records that do not conform to normal physical laws, such as data points with abnormally high speed or acceleration.

[0044] Step 1.3.2. Delete or correct outliers: Depending on the source and nature of the outliers, decide whether to delete them directly or correct them through algorithms, such as the mean, median, etc.

[0045] Step 1.3.3. Remove duplicate records: Check the duplicate records in the dataset and delete them to ensure the uniqueness of the dataset.

[0046] Step 1.3.4. Handling missing values: For missing data, you can choose to delete the rows where the missing values ​​are located, or use methods such as interpolation to fill in the missing values.

[0047] Step 1.4. Convert data from different sources or formats into a unified format for subsequent processing.

[0048] Step 1.4.1. Unify data formats: Ensure that all data follow the same format standards, such as the format of timestamps, units of speed (km / h or m / s), etc., to facilitate unified data processing and analysis.

[0049] Step 1.4.2. Feature scale adjustment: Standardizing or normalizing data from different sources or different magnitudes to a uniform scale, such as scaling all feature values ​​to the [0,1] interval or standard normal distribution, will help the subsequent model training and performance.

[0050] Step 1.4.3. Create feature vectors: For some non-numeric data, such as road type, one-hot encoding and other methods can be used to convert them into numerical features.

[0051] Step 1.5. Filter and sort the trajectory data that meet the conditions, and manually label the data for each lane change behavior type. When the longitudinal speed of the vehicle exceeds 0.2m / s, it indicates the start of the lane change intention.

[0052] In order to eliminate the misjudgment of vehicles that have not changed lanes, whether the lateral movement distance exceeds 0.4m within 1 second after the lateral speed exceeds 0.2m / s is used as the basis for lane change judgment. When the lateral movement distance exceeds 0.4m, it indicates a lane change; if it does not exceed 0.4m, it indicates no lane change.

[0053] Step 2. Trajectory data processing based on prior knowledge: First, the original vehicle trajectory information in the highD dataset is used, and the key features that affect the decision are directly extracted in combination with the prior knowledge of lane-changing behavior analysis.

[0054] Consider the key factors of lane-changing decisions, such as vehicle driving characteristics, road environment information, driver behavior, etc. List a series of prior knowledge features that may affect lane-changing behavior, such as vehicle speed, acceleration, relative position, relative speed, lane width, vehicle spacing, etc. If these features show significant differentiation ability between categories, this will further confirm that the image data constructed from these features also has the potential to distinguish different lane-changing scenarios.

[0055] Step 2.1.1. Use the statistical analysis feature extraction method to extract a 10-dimensional feature vector, including mean feature, variance feature, median feature, standard deviation feature, mean absolute deviation, quartile (4 dimensions), and kurtosis.

[0056] Step 2.1.2. Feature standardization. Normalize or standardize the proposed features so that all features are in the same numerical range, which is conducive to the comparison between features.

[0057] Step 2.1.3. Feature encoding. Perform appropriate encoding processing, such as one-hot encoding, on categorical features (such as lane change type, etc.) so that these features can be used correctly in the subsequent machine learning process.

[0058] Therefore, the output dimension of trajectory data processing based on prior knowledge is 22 dimensions, including the main vehicle speed, main vehicle acceleration, vehicle speed in front, left front, right front, and right rear of the current lane, acceleration, longitudinal relative distance, and lateral relative distance.

[0059] Step 3. Feature extraction and PCA dimensionality reduction based on the environmental feature extraction network (EFENet) of the image trajectory data.

[0060] The present invention first converts the trajectory data into image format and uses EFENet to extract the spatiotemporal characteristics of vehicle motion; then reduces the dimension of the feature space through principal component analysis (PCA) to improve computational efficiency while reducing noise.

[0061] The step 3 specifically includes the following steps:

[0062] Step 3.1. Perform image modeling based on the data preprocessed in step 1 to obtain a grayscale image, such as Figure 4 shown.

[0063] Step 3.1.1. Data preparation.

[0064] In the present invention, the data set in step 1 has been cleaned and formatted.

[0065] The dataset consists of multiple observation scenes, each of which includes the speed and relative position information of the main vehicle and its surrounding vehicles; each row of data in the dataset represents an independent lane changing scene.

[0066] The first two columns of data include the speed and position information of the main vehicle (the position here is the coordinate origin), and each column of data thereafter reflects the relative longitudinal distance, lateral distance and speed information of the surrounding vehicles relative to the position of the main vehicle.

[0067] MATLAB software is used for data visualization to intuitively display the interaction dynamics between the main vehicle and surrounding vehicles, such as Figure 3 The visual interaction dynamics between the host vehicle and surrounding vehicles are shown.

[0068] in, Figure 3 SV stands for the vehicle itself. Figure 3 TF, TP, and PV in represent surrounding vehicles.

[0069] Step 3.1.2. Define a drawing function; define a MATLAB function to generate an image of a single scene; the function receives a row of data as input and draws the main vehicle and surrounding vehicles based on this data.

[0070] Each vehicle is represented by a rectangle containing speed information, and the center position of the rectangle corresponds to the relative position of the vehicle.

[0071] Step 3.1.3. Convert speed to grayscale value.

[0072] Grayscale values ​​are used to represent the brightness of each pixel in the image. A mapping relationship is defined to convert speed to grayscale values ​​so that all possible speed values ​​are normalized to the range of 0 to 255. The conversion process is as follows:

[0073] Step 3.1.3.1. Data analysis.

[0074] First determine the minimum speed in the data set and maximum speed , used for the normalization process.

[0075] Step 3.1.3.2. Normalize the velocity values.

[0076] For each velocity value v in the dataset, the following formula mapping is applied to normalize to the range of 0 to 1:

[0077] ;

[0078] Where v is the original velocity value, is the normalized velocity value.

[0079] Step 3.1.3.3. Mapping to grayscale.

[0080] Then the normalized speed value Mapped to the grayscale range 0 to 255, the mapping formula is as follows:

[0081] .

[0082] The round function is used to ensure that the grayscale value is an integer. Represents grayscale value.

[0083] Step 3.1.3.4. Handle edge cases.

[0084] When the velocity value is normalized to the range of 0 to 1, the value 1 is at the upper end of this range. Regarding the case where the velocity value may be exactly equal to 1 after normalization. This will result in 255 being multiplied by 255, reaching the upper limit of the grayscale value.

[0085] If the velocity value of each data point in the preprocessed HighD dataset is exactly equal to , after normalization it may be exactly equal to 1, but after multiplying by 255 it may result in a value out of range.

[0086] To ensure that the grayscale values ​​are in the correct range, a minimum and maximum function are applied to limit the final grayscale values:

[0087] .

[0088] This formula can be used to process extreme values ​​or special values ​​that may appear in the data set, ensuring that the grayscale values ​​of all data are within the correct range.

[0089] Step 3.1.4. Loop through the dataset.

[0090] Before traversing the data set, you need to get the number of rows in the data set, that is, the number of scenes; then use a loop to read the data row by row, process one row of data each time, and call the drawing function defined in the previous step for each scene to generate a picture.

[0091] Step 3.1.5. Plot and save images; each scene in the dataset will generate a corresponding image, so that the lane-changing behavior patterns in traffic flow can be intuitively analyzed through this series of images.

[0092] Step 3.2. Augment the grayscale image and train it with EFENet to obtain a lane change type recognition classification model. Use the trained classification model to extract features from images of different lane change types to obtain a high-dimensional feature vector.

[0093] The step 3.2 specifically includes the following steps:

[0094] Step 3.2.1. In order to increase the training data, prevent overfitting in model training, and improve the accuracy of model training, four image processing methods such as image rotation, scaling, changing contrast, and changing brightness are used to augment the grayscale image dataset obtained in step 3.1 to help the model learn more robust feature expressions.

[0095] Step 3.2.2. Build the environment feature extraction network EFENet, whose model framework is as follows Figure 6 As shown in Figure 2, the EFENet model includes an input layer, a convolutional module, a global maximum pooling layer, a fully connected layer, and an output layer.

[0096] The input layer is used to receive the original image data, which specifically refers to the grayscale image obtained in step 3.1. Since the input of this model is a grayscale image, the size of the input data is changed from 227×227×3 to 227×227×1.

[0097] The convolution module consists of six layers of convolution stacked in sequence, such as Figure 6 As shown in the figure, each convolution layer includes a convolution layer, a normalization layer, an activation function layer, and a maximum pooling layer. The following is an explanation of the parameter settings of each convolution layer.

[0098] The parameters of the first convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 32, the convolution kernel size is set to 3×3, the stride is set to 1×1, and the output is 227×227×32. A normalization layer and an activation function layer are added after the convolution layer, and the output is 227×227×32. In the maximum pooling layer, the pool size is set to 5×5, the stride is set to 1×1, and the output is 227×227×32.

[0099] The parameters of the second convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 32, the convolution kernel size is set to 3×3, and the stride is set to 2×2. The other parameters remain unchanged, and the output is 114×114×32. A normalization layer and an activation function layer are added after the convolution layer, and the output is 114×114×32. The pool size of the maximum pooling layer is set to 5×5, the stride is set to 1×1, and the output is 114×114×32.

[0100] The parameters of the third convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 64, the convolution kernel size is set to 3×3, and the stride is set to 2×2. The other parameters remain unchanged, and the output is 57×57×64. A normalization layer and an activation function layer are added after the convolution layer, and the output is 57×57×64. In the maximum pooling layer, the pool size is set to 5×5, the stride is set to 1×1, and the output is 57×57×64.

[0101] The parameters of the fourth convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 128, the convolution kernel size is set to 3×3, and the stride is set to 2×2. The other parameters remain unchanged, and the output is 29×29×128. A normalization layer and an activation function layer are added after the convolution layer, and the output is 29×29×128. In the maximum pooling layer, the pool size is set to 5×5, the stride is set to 1×1, and the output is 29×29×128.

[0102] The fifth convolution layer parameters are set as follows: the number of convolution kernels in the convolution layer is set to 256, the convolution kernel size is set to 3×3, and the stride is set to 1×1. The other parameters remain unchanged, and the output is 29×29×256. A normalization layer and an activation function layer are added after the convolution layer, and the output is 29×29×256. In the maximum pooling layer, the pool size is set to 5×5, the stride is set to 1×1, and the output is 29×29×256.

[0103] The sixth convolution parameters are set as follows: the number of convolution kernels in the convolution layer is set to 512, the convolution kernel size is set to 3×3, and the stride is set to 2×2. The other parameters remain unchanged, and the output is 15×15×512. A regularization layer is added after the normalization layer of this layer, and the drop ratio is set to 0.5. The output of the normalization layer, regularization layer, and activation function layer are all 15×15×512.

[0104] The above convolutional modules can gradually extract higher-level features, and deep features can represent more complex patterns.

[0105] The size of the global max pooling layer is 1×1×512, and features are extracted from this layer.

[0106] Finally, the output data size of the fully connected layer is changed to 3.

[0107] The fully connected layer transforms the extracted feature map into the final output of the network, which is a classification label result. The output results are divided into three categories: left lane change, right lane change, and keep going straight. The final output dimension is 512.

[0108] Step 3.2.3. Use RTX3080tiGPU to train the EFENet model, set the Mini-Batch Size to 32, the maximum iteration cycle to 10, and the initial learning rate to 10 -3 , after every two iterations, the learning rate is reduced to 0.5 times the original learning rate.

[0109] The EFENet model is trained based on the augmented dataset, with 90% of the data used as a training set and 10% of the data used as a test set.

[0110] Step 3.3. Use the principal component analysis (PCA) algorithm to reduce the dimensionality of the high-dimensional feature vector. The specific process is as follows:

[0111] Step 3.3.1. Standardize the dataset.

[0112] First, the high-dimensional feature vector dataset extracted based on the EFENet model is normalized, such as Z-score normalization. For each dimension of the data, the mean value of the feature is subtracted from each value of the feature, and then divided by the standard deviation of the feature. This step is to make all features have the same importance.

[0113] Step 3.3.2. Then construct the covariance matrix based on the standardized data set.

[0114] The covariance matrix reveals the covariance between the dimensions (features) of the data, that is, how one feature changes as another feature increases or decreases. For each pair of features in the data, the covariance is contained in the matrix.

[0115] Step 3.3.3. Calculate the eigenvalues ​​and eigenvectors of the covariance matrix.

[0116] The eigenvalue represents the variance in a certain direction, and the eigenvector is that direction.

[0117] Step 3.3.4. Select the principal component. Sort the eigenvalues ​​in step 3.3.3 from large to small, and put the largest eigenvalue first.

[0118] Step 3.3.5. Calculate the cumulative variance contribution rate. Add up the eigenvalues ​​in order of size to get a cumulative variance contribution rate sequence, which indicates the contribution of each principal component to the total variance.

[0119] Step 3.3.6. Select the final dimension for dimensionality reduction.

[0120] According to the set cumulative variance contribution rate threshold of 95%, the minimum dimension that makes the cumulative variance contribution rate close to or exceed the threshold is found as the final dimension after dimensionality reduction. After PCA dimensionality reduction, the final dimension is 58.

[0121] Step 4. Graph-based GCN feature extraction.

[0122] First, we construct a traffic network topology map based on the trajectory data in the HighD dataset, and then use the graph convolutional network (GCN) to extract features from the topology map to capture the complex relationships and interaction patterns between vehicles. Figure 5 As shown, the constructed topological graph can describe the spatial adjacency relationship between vehicles, allowing the model to learn high-order interaction features.

[0123] The step 4 specifically includes the following steps:

[0124] Step 4.1. Build the topology structure based on the preprocessed HighD dataset.

[0125] Step 4.1.1. Data preparation and preprocessing. Since the HighD dataset contains a large amount of data, sampling may be performed according to the needs of analysis, and trajectory data of a certain time period or a certain area may be selected for analysis.

[0126] Step 4.1.2. Conversion of trajectory points to nodes; Node creation: define the vehicle and its surrounding vehicles as nodes. The node attributes or features contain basic information about the vehicle, such as speed, acceleration, lateral and longitudinal distances, etc.

[0127] Step 4.1.3. Define the edges between nodes;

[0128] The edge is defined according to the horizontal and vertical distances between vehicles; a distance threshold is preset, and if the distance between vehicles is less than this distance threshold, an edge is established between the corresponding vehicles.

[0129] The weight of the edge is set according to the distance. The closer the distance, the greater the weight. The establishment of the adjacency relationship depends on the set distance threshold. An edge is connected between the two vehicles only when the distance between them is less than this threshold.

[0130] Step 4.1.4. Construct the adjacency matrix.

[0131] Adjacency matrix initialization: Initialize an adjacency matrix to represent the connection between vehicles. If there is an edge between vehicle i and vehicle j, the corresponding element in the adjacency matrix is ​​set to 1, otherwise it is set to 0.

[0132] Of course, the corresponding elements in the adjacency matrix can also be assigned according to the weight of the edge, which will not be described in detail here.

[0133] Step 4.1.5. Weight assignment.

[0134] Assign weights to edges. The weights of edges are defined as a function of distance; as shown in the formula:

[0135] ;

[0136] in, represents the weight of the edge between node i and node j, Represents the distance between node i and node j.

[0137] Step 4.1.6. Construct feature vector. For each node, construct a feature vector that contains various attributes of the vehicle, such as speed, acceleration, lane, etc.

[0138] Step 4.1.7. Visualization and storage.

[0139] Use graph theory methods and tools (such as NetworkX or Gephi) or deep learning graph processing tools (such as PyTorch Geometric, DGL) to create graphs; analyze and visualize the constructed traffic network topology graph, such as calculating the degree of nodes in the graph, path length and other indicators to extract information about traffic flow characteristics.

[0140] Store the graph in a structured format such as edge lists, adjacency matrices or directly using library-specific data structures.

[0141] Step 4.2. Input the constructed topology into the built GCN model for training and feature extraction.

[0142] The step 4.2 specifically includes the following steps:

[0143] Step 4.2.1. Define the graph convolutional network GCN model architecture. The GCN model defines multiple multiplication layers. Each layer performs weight multiplication operations through the adjacency matrix and feature matrix, and applies the activation function ReLU. The output of the last layer passes through the softmax function to obtain the probability distribution of each node corresponding to different categories. The specific model architecture content is as follows:

[0144] The first GCN layer (graph convolution layer): performs the first graph convolution operation, mapping the input features to a high-dimensional space to capture the initial relationship between features. The four input features, including the speed, acceleration, and lateral and longitudinal distances of each vehicle to the nearest vehicle, are expanded to 128 dimensions to capture the initial complex features. The output of this layer is a 128-dimensional feature representation of each node (vehicle). The weight matrix size is set to 4×128, and the activation function is set to .

[0145] In order to promote the network to learn more generalized feature representations and improve its generalization performance on unknown data, and at the same time to enhance the robustness of the model to overfitting, the Dropout regularization mechanism is considered to be integrated. Under this mechanism, each neuron has a probability of p being randomly removed in each training iteration. The parameter p is called the drop probability.

[0146] For example, if p = 0.5 is set, it means that in each iteration of model training, each neuron has a 50% chance of not participating in the forward and backward propagation processes, thereby reducing the dependence of a single neuron on local training data features.

[0147] The parameters of the first GCN layer (graph convolutional layer) are designed as follows: input dimension: 4; output dimension: 128; weight matrix size: 4×128; activation function: ReLU; Dropout probability: 0.5.

[0148] The second layer of GCN: further processes the output of the first layer and maps the 128-dimensional features to 64 dimensions to refine the features and reduce the amount of calculation. The parameters of the second layer of GCN (graph convolution layer) are designed as follows: input dimension: 128; output dimension: 64; weight matrix size: 128×64; activation function: ReLU; Dropout probability: 0.5.

[0149] The third layer of GCN: further processes the output of the second layer and maps the 64-dimensional features to 32 dimensions to refine the features and reduce the amount of calculation. The parameters of the second layer of GCN (graph convolution layer) are designed as follows: input dimension: 64; output dimension: 32; weight matrix size: 64×32; activation function: ReLU; Dropout probability: 0.5.

[0150] Output layer GCN: The last layer maps the 32-dimensional features to 3 output nodes, corresponding to the three categories of lane change decisions, namely left lane change, right lane change, and following the car. The output layer parameters are designed as follows: input dimension: 32; output dimension: 3; weight matrix size: 32×3; activation function: Softmax.

[0151] Define the activation function. The first, second, and third layers use the ReLU activation function to process nonlinear features. The softmax function is used before the output of the last layer to obtain the probability distribution of the final lane change decision.

[0152] Define the loss function and use classification cross entropy:

[0153] ;

[0154] in, represents the loss value, represents the total number of samples, is the total number of categories, represents a binary indicator (0 or 1), The model predicts that sample i belongs to category probability.

[0155] If the category is the true category of sample i, then is 1 if the value is true, otherwise it is 0.

[0156] Use a custom training loop to train the model with the Adam optimizer. During the training process, record the training loss and validation loss, and evaluate the performance of the model regularly. The learning rate is set to 0.01.

[0157] Step 4.2.2. Use the topological structure data obtained in step 4.1 to train the GCN model. The topological structure data set is divided into training set, validation set and test set to evaluate the performance and generalization ability of the model. The number of training rounds is set to 200 and the training batch is set to 32.

[0158] In the iterative training phase, the GCN model will be trained multiple times using the training data. In each training, the model weights are continuously updated through forward propagation and back propagation, and the error is evaluated using the loss function.

[0159] In order to prevent overfitting, Dropout and L2 regularization techniques are used. During the training process, the performance of the model is monitored on the validation set, and an early stopping strategy is adopted when the performance stops improving to avoid overfitting. Finally, the performance of the model will be evaluated on the test set, and various evaluation indicators (such as accuracy, precision, etc.) will be used to measure the generalization ability of the model.

[0160] In terms of feature extraction, GCN mainly uses graph convolutional layers to aggregate and update node features.

[0161] The calculation process of the GCN layer:

[0162] Assuming the use of The GCN output of the layer is expressed as ,in represents the node index, Represents a hierarchy.

[0163] Neighbor aggregation:

[0164] For each node , collect all its neighbor nodes Features , and calculate the aggregate information of neighbor node features.

[0165] ;

[0166] in, is the neighbor set of node i, is a normalization coefficient, usually chosen to be the node degree.

[0167] The following are the specific steps for feature extraction by GCN model:

[0168] Step 4.2.2.1. Node representation initialization: The feature vector of each node needs to be initialized first, directly using the attributes of the nodes in the graph (such as text, label, value, etc.) or converting the node attributes into a fixed-length vector through embedding technology.

[0169] Node feature matrix X: Each node represents a vehicle. The features include the vehicle status information, such as speed, acceleration, lateral and longitudinal distance. The size is N×D, where N is the number of nodes and D is the feature dimension of each node.

[0170] Step 4.2.2.2. Graph structure preprocessing.

[0171] Represent the vehicle as a node and construct an adjacency matrix containing N nodes. The specific steps are as follows:

[0172] ;

[0173] In the formula, is the original adjacency matrix, , represents the connection relationship between nodes in the graph; is the adjacency matrix after adding self-loops. It is the identity matrix, which is used to add self-loops in the adjacency matrix so that each node can consider its own characteristics.

[0174] Normalize the adjacency matrix.

[0175] ;

[0176] in, is the symmetric normalized adjacency matrix, is the degree matrix.

[0177] ;

[0178] Among them, the element Indicates whether there is an edge connection between node i and node j (usually takes the value 0 or 1). The diagonal elements Represents the degree of node i (the number of connections to node i). It is The activation matrix of the layer, where: .

[0179] In the formula is the feature matrix of the input node, and the node features are expressed as:

[0180] X = [ x e g o , x i ] .

[0181] In the formula, is the node feature of the ego vehicle; is the node feature of the surrounding vehicles, which is specifically expressed as:

[0182] { x e g o = [ d x , d y , v , a ] x i = [ d x i , d y i , v i , a i ] .

[0183] in, , is the lateral distance of the centerline of the original lane before the lane change (in order to be consistent with the structure of other node feature matrices, the actual value is 0), It is the longitudinal distance of the center line of the original lane before changing lanes.

[0184] is the speed of the car, is the vehicle's acceleration, is the lateral distance of the other car relative to the own car, is the longitudinal distance of the other vehicle relative to the vehicle itself, It's the speed of his car. It's the acceleration of his car.

[0185] Step 4.2.2.3. Graph convolution operation.

[0186] In each layer of graph convolution, the features of the nodes are updated according to the adjacency relationship and the weight matrix; specifically, the new feature of a node is the weighted sum of its own features and the features of its neighbors, and the weights are learned during the training process.

[0187] The feature update formula is:

[0188] ;

[0189] in is the adjacency matrix with self-loops added, is the corresponding degree matrix, is the feature matrix of the first layer, is the weight matrix of this layer, is the activation function, usually RELU is used.

[0190] In each graph convolution layer, the features of neighbor nodes are aggregated by multiplying the adjacency matrix and the node feature matrix, and then nonlinear transformation is performed through the weight matrix and activation function to extract more advanced features layer by layer.

[0191] The specific feature extraction process is as follows:

[0192] The first layer of graph convolution;

[0193] Input node feature matrix , calculate the output features of the first layer:

[0194] ;

[0195] The second layer of graph convolution;

[0196] Input is the output feature of the first layer , calculate the output features of the second layer:

[0197] ;

[0198] The third layer of graph convolution;

[0199] Input is the output feature of the second layer , calculate the output features of the third layer :

[0200] .

[0201] Step 4.2.2.4. Add a nonlinear activation function after the graph convolution operation to increase the expressive power of the model.

[0202] Step 4.2.2.5. Feature aggregation and output.

[0203] In the last layer of GCN, a global average pooling operation is used to aggregate the features of all vehicles, and the output dimension is 32 dimensions.

[0204] Step 5. Use feature concatenation to combine the features extracted in steps 2 to 4 into a comprehensive feature vector; the dataset consisting of the comprehensive feature vector is used to train the lane change decision model described below.

[0205] Before concatenating feature vectors, preprocessing steps are usually necessary, especially standardization and normalization.

[0206] These steps ensure that feature vectors of different magnitudes and distributions can be better handled by machine learning models.

[0207] Step 5.1. Standardization.

[0208] Convert the data to a form with a mean of 0 and a standard deviation of 1 to conform to the standard normal distribution. This process helps reduce the scale differences between different features and is often used in scenarios where the data range is unknown or the standard deviation is far from 1.

[0209] ;

[0210] in, is the original data point, is the mean, is the standard deviation.

[0211] Step 5.2. Normalization. Scale the value of the feature vector to between [0,1]. The specific formula is as follows:

[0212] ;

[0213] in, is the original eigenvector, is the scaled eigenvector, whose value is in the range [0,1], express The minimum value, express The maximum value.

[0214] This process is particularly suitable for features measured at different metric scales and helps to optimize the convergence speed of the algorithm.

[0215] Step 5.3. Concatenate feature vectors.

[0216] First, the feature vectors from various sources are concatenated into a single long vector. Specifically, for a specific sample (such as a single vehicle instance), the feature vectors corresponding to this vehicle are held. These feature vectors each capture part of the information about the vehicle state. Each feature vector is concatenated end-to-end, for a total of 112 dimensions.

[0217] By fusing multiple feature extractions, the present invention can increase the dimension and richness of the feature space, provide a comprehensive data perspective for the model, and thus significantly improve the ability to represent data. In addition, multi-feature integration helps to reveal the inherent complexity of the data and improve the generalization ability of the model under different data distributions. By integrating features from different sources, the limitations of single feature extraction methods can be alleviated, the negative impact of noise and outliers on prediction performance can be reduced, and the robustness of the model can be enhanced.

[0218] In terms of model performance, this multi-feature integration method can significantly improve prediction accuracy, especially when dealing with data with many implicit patterns and complex structures. It also helps to provide a more complete explanation of model decisions, thereby providing additional value in tasks that require deep domain knowledge explanations. Further, multiple feature extraction methods can significantly improve the performance of models on specific tasks by combining their respective advantages, especially when faced with complex tasks and pattern recognition scenarios. It can make up for the limitations that may exist in a single feature extraction method and reduce the adverse effects of noise or outliers in specific data on model accuracy. In addition, the combination of multiple features not only enhances the model's ability to describe the data, but also provides more sufficient decision-making basis for model predictions, which is of great value in providing model decision interpretability.

[0219] Step 6. Build a lane-changing decision model based on the visual transformer ViT, and use the data set obtained in step 5 to train the lane-changing decision model to obtain a trained lane-changing decision model.

[0220] Adapt the feature vector to the input format expected by the ViT (Vision Transformer) model.

[0221] Since the ViT model is designed to process image data segmented into patches, the input is usually three-dimensional (i.e., it has height, width, and color channels), so the feature vector needs to undergo some processing to adapt it to this structure.

[0222] Step 6.1. Reshape the feature vector.

[0223] ViT requires the input to be a 2D image divided into multiple patches, and the 112-dimensional vector needs to be expanded into a 2D structure. The 112-dimensional vector is expanded to an 8×14 image (assuming there is a ViT configuration that accepts so many patches, and each patch is 1-dimensional), and then these "pixels" can be divided into multiple patches according to the ViT settings.

[0224] Reshape the 112-dimensional feature vector into a nearly square "virtual" two-dimensional image format to simulate the image patches required by ViT as much as possible. Since 112 is not a perfect square number, it cannot be directly reshaped into a square image, but a dimension combination [1, 112, 1] can be selected, where the first dimension is assumed to be a single-channel image, the second dimension is 112 elements representing the pixels of the image, and the third dimension is also simulated as a single-channel image.

[0225] Step 6.2. Linear mapping.

[0226] Because ViT needs to process images in blocks, the data needs to be mapped to a higher dimension. Design a fully connected layer (linear layer) to map the "virtual" pixel values ​​to a high-dimensional space to meet the specific expectations of the model, mapping the 112-dimensional features to a 768-dimensional space, which is a common dimension for transformer models.

[0227] Step 6.3. Add position encoding. Since the Transformer architecture (including ViT) relies on position encoding to maintain sequence information, it is necessary to add position encoding to the mapped feature vector.

[0228] Since the input is a single feature vector rather than multiple patches, a single positional encoding can be used directly.

[0229] Step 6.4. Pass the linearly mapped patch sequence with position encoding as input to the ViT model, train the ViT model, and use the pre-trained ViT model to make lane change decisions.

[0230] The process of training the ViT model is as follows: the model is retrained using a dual-core RTX 3080ti GPU, with the Mini-Batch Size set to 32, the maximum iteration cycle to 10, and the initial learning rate to 10 -3 After every two iterations, the learning rate is reduced to 0.5 times the original learning rate. The ViT model is trained based on the feature fused data set, 90% of which is used as a training set and 10% of which is used as a test set. After training, the ViT model is tested using the test set.

[0231] After the lane-changing decision is output based on the trained lane-changing decision model, a safety assessment is performed based on the lane-changing decision assessment for collision safety. The specific process of the safety assessment is as follows:

[0232] Step I. Minimum safety distance modeling. In this embodiment, the headway safety distance model is selected.

[0233] The headway safety distance model is based on the time difference between the adjacent front and rear vehicles passing through the specified point in sequence. When the relative speed of the two vehicles is small, the headway time and the distance between the two vehicles are approximately linearly related. On this basis, the following model is established:

[0234] .

[0235] in, Based on the safety distance of the headway, is the headway time, usually 1.2-2.0 seconds, is the speed of the following vehicle, It is a safe distance, usually 2-5 meters.

[0236] Considering that in the following vehicle condition, the speed of the rear vehicle often changes with the speed of the front vehicle, a safety distance margin is required. When the braking distance model of the driver's emergency braking is applied to the following vehicle scenario, we get:

[0237] .

[0238] in, is the speed of the preceding vehicle; is the braking distance; It is the sum of the driver's reaction time and the braking system coordination time, generally 0.8-1.0s; The braking deceleration growth time is generally 0.1-0.2s; It is the maximum braking deceleration that can be achieved during braking, usually 6-8m / s 2 .

[0239] It can be seen that the main influencing factor of the safety distance model based on headway time is the speed of the main vehicle, without considering the relative speed of adjacent vehicles. The braking distance model focuses on the relationship with the relative speed and is insensitive to the speed of the main vehicle.

[0240] In order to make up for the shortcomings of the two models and achieve complementary advantages, the fusion safety distance (FSD) is obtained as follows:

[0241] .

[0242] in, It is a fusion of safe distance. is the safety distance weight coefficient based on the headway distance. is the weight coefficient of the braking distance model. ≤ , the safety distance is used instead of the braking distance model.

[0243] In actual driving, left and right lane changes often occur, and the steering characteristics of left and right lane changes are similar. Based on the specific left lane change scenario, the safe distance between the vehicle and other vehicles is analyzed in detail, such as Figure 7 and Figure 8 shown.

[0244] Based on the Fusion Safety Distance (FSD) formula, the possible rear-end collision between the vehicle and the preceding vehicle during lane change is analyzed. It is necessary to consider the safety distance during emergency braking and lane change, as well as the safety distance to avoid rear-end collision.

[0245] .

[0246] in, is the safe distance between the vehicle in front and the vehicle in front. is the speed of the car, is the speed of the car in front, is the time for the vehicle to change lanes, L is the length of the two vehicles, H is the width of the two vehicles, is the heading angle when the vehicle collides with the vehicle in front. Since the vehicle is usually close to the center line of the lane at this time, α The maximum heading angle is reached, and MAX means taking the maximum value.

[0247] The collision between the vehicle and the left front vehicle occurred after the lane change began. Therefore, while ensuring the safe distance for lane change, a safe following distance should be reserved for the vehicle after entering the target lane to avoid subsequent rear-end collisions.

[0248] According to FSD's analysis of possible collisions, the vehicle is within a safe distance to avoid a rear-end collision or a side scrape with the left front vehicle. It is the FSD between the vehicle and the left front vehicle. is the speed of the left front car.

[0249] .

[0250] The collision between the left rear vehicle and the vehicle occurs at the end of the lane change. At this time, the vehicle has entered the target lane, the steering wheel angle is about to return to zero, and the heading angle of the vehicle α Taking the above into account, based on FSD analysis of possible collisions with the left rear vehicle, the safe distance to avoid rear-end collisions with the left rear vehicle can be expressed by the following formula:

[0251] .

[0252] in, is the safe distance between the vehicle and the left rear vehicle. is the speed of the left rear car, It is the headway time.

[0253] Step II. Verify lane change safety.

[0254] For each lane-changing decision made by the model, a defined safety distance is used to verify the safety of the lane-changing behavior.

[0255] The necessary safety distance is calculated based on the current scene data and the safety distance definition.

[0256] Compare actual distance with safe distance: Compare the actual distance to surrounding vehicles before and after the lane change with the calculated safe distance. If the actual distance is less than the safe distance, the lane change is considered unsafe.

[0257] Safety verification result statistics: Statistics on the ratio of safe to unsafe lane changing behaviors in all test scenarios.

[0258] Step III. Analysis and adjustment. If the actual distance is greater than the safe distance, the lane change decision is executed. If the actual distance is less than the safe distance, the vehicle continues to drive. If it is found that the lane change decision model cannot guarantee the safe distance for lane change in many scenarios, it is necessary to return to the model design and training stage for adjustment.

[0259] Step IV. Repeat the validation. After the model is appropriately tuned, repeat the testing and validation process using a new or expanded lane-changing scenario dataset until the model can make safe lane-changing decisions in most scenarios.

[0260] The present invention uses a collision safety-based method to evaluate lane-changing decisions and conducts a post-check on the lane-changing decisions made by the ViT model to ensure that each decision can meet safety requirements in actual applications.

[0261] The present invention uses advanced data processing methods to convert the original trajectory information into a structured data format, which can more accurately capture and understand the vehicle's motion pattern and behavior characteristics; by converting the trajectory data into a grayscale image of speed, and using the constructed neural network to extract spatial characteristics and local patterns, the understanding of vehicle dynamics is deepened, providing an important basis for lane change decisions. In addition, the present invention also combines the visual transformer ViT framework and the lane change decision evaluation based on collision safety. ViT uses a self-attention mechanism to allow the model to self-focus, that is, to distinguish which specific areas are more important for the task. This makes the output results of the model more interpretable, which helps to further optimize the model. While ensuring that the lane change decision complies with traffic rules and meets safety requirements, it also considers reducing accident risks and improving driving safety. In addition, the present invention also models the interactive behaviors between vehicles and their interactions in the traffic network, and uses the graph convolutional network GCN to encode these complex interactive relationships, so that more accurate and safe lane change decisions can be made.

[0262] The intelligent automobile lane changing method based on multi-view feature fusion and collision risk analysis in the present invention can be well used to improve the accuracy and robustness of lane changing decisions of the automatic driving system in a highway environment, and therefore has practical significance.

[0263] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.

Claims

1. Intelligent car lane changing method based on multi-view feature fusion and collision risk analysis, It is characterized in that The steps include: Step 1. Preprocess the trajectory data in the acquired autonomous driving HighD dataset; Step 2. Using the trajectory data in the HighD dataset and combining it with the prior knowledge of lane-changing behavior analysis, the key features that affect the lane-changing decision are directly extracted; Step 3. Convert the trajectory data in the HighD dataset into grayscale image format, use the built environment feature extraction network EFENet to extract the spatiotemporal features of vehicle motion, and use principal component analysis PCA to reduce the dimension of the feature space; Step 4. Construct a traffic network topology map based on the trajectory data in the HighD dataset, and then use the graph convolutional network (GCN) to extract features from the topology map to capture the complex relationships and interaction patterns between vehicles. Step 5. Use feature concatenation to combine the features extracted from step 2 to step 4 into a comprehensive feature vector, and use the data set consisting of the comprehensive feature vector to train the following lane change decision model; Step 6. Build a lane-changing decision model based on the visual transformer ViT, and use the data set obtained in step 5 to train the lane-changing decision model to obtain a trained lane-changing decision model; The lane changing decision is output based on the trained lane changing decision model, and the lane changing decision is evaluated based on the collision safety method.

2. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 1, It is characterized in that The step 3 is specifically as follows: Step 3.

1. Perform image modeling based on the data set preprocessed in step 1 to obtain a grayscale image; Step 3.

2. Use image processing methods to augment the grayscale image obtained in step 3.1, load the environmental feature extraction network EFENet, train EFENet, and obtain a lane change type recognition and classification model; The lane-changing type recognition and classification model is used to extract features from images of different lane-changing types to obtain high-dimensional feature vectors. Step 3.

3. Use the principal component analysis (PCA) algorithm to reduce the dimensionality of the high-dimensional feature vector.

3. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 2, It is characterized in that The step 3.1 is specifically as follows: Step 3.1.

1. Data preparation: The original highD dataset has been cleaned and formatted. The dataset consists of multiple observation scenes, each of which includes the speed and relative position information of the main vehicle and its surrounding vehicles. Each row of data in the dataset represents an independent lane-changing scenario; The first two columns of data in the preprocessed data set include the speed and position information of the main vehicle, and each column of data thereafter reflects the relative longitudinal distance, lateral distance and speed information of the surrounding vehicles relative to the position of the main vehicle; MATLAB software is used for data visualization to intuitively display the interaction dynamics between the main vehicle and surrounding vehicles; Step 3.1.

2. Define a drawing function; define a MATLAB function for generating an image of a single scene; the function receives a row of data as input and draws the main vehicle and surrounding vehicles based on the data; Each vehicle is represented by a rectangle containing speed information, and the center position of the rectangle corresponds to the relative position of the vehicle; Step 3.1.

3. Convert speed to grayscale value; Grayscale values ​​are used to represent the brightness of each pixel in the image. Define a mapping relationship that converts speed to grayscale values ​​so that all possible speed values ​​are normalized to the range of 0 to 255. The specific steps are as follows: Step 3.1.3.

1. Data analysis; First determine the minimum speed in the data set and maximum speed , used for the normalization process; Step 3.1.3.

2. Normalize the speed value; For each velocity value v in the dataset, the following formula mapping is applied to normalize to the range of 0 to 1: ; Where v is the original velocity value, is the normalized velocity value; Step 3.1.3.

3. Map to grayscale; Then the normalized speed value Mapped to the grayscale range 0 to 255, the mapping formula is as follows: ; in Represents the grayscale value, and the round function is to ensure that the grayscale value is an integer value; Step 3.1.3.

4. If the velocity value of each data point in the preprocessed HighD dataset is exactly equal to , which is exactly equal to 1 after normalization, and multiplied by 255 to obtain an out-of-range value; To ensure that the grayscale value is in the correct range, a minimum function and a maximum function are applied to limit the final grayscale value; ; Step 3.1.

4. Loop through the data set; Before traversing the data set, you need to obtain the number of rows in the data set, that is, the number of scenes; Then use a loop to read the data line by line, process one line of data each time, and call the drawing function defined in the previous step for each scene to generate a picture; Step 3.1.

5. Plot and save images; each scene in the dataset will generate a corresponding image, so that the lane-changing behavior patterns in traffic flow can be intuitively analyzed through a series of images.

4. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 2, It is characterized in that The step 3.2 is specifically as follows: Step 3.2.

1. Use four image processing methods, namely image rotation, scaling, contrast change and brightness change, to augment the grayscale image obtained in step 3.1, i.e., the training sample, to obtain an augmented grayscale image dataset; Step 3.2.

2. Build the environment feature extraction network EFENet; EFENet includes input layer, convolution module, maximum pooling layer, fully connected layer and output layer; the output results of EFENet are three categories: left lane change, right lane change, and keep going straight; Step 3.2.

3. Train EFENet, where the number of samples in each training batch is set to 32, the maximum iteration cycle is 10, and the initial learning rate is 10 -3 , after every two iterations, the learning rate is reduced to 0.5 times the original learning rate; When training the model, based on the augmented data set, 90% of the data is used as a training set and 10% of the data is used as a test set.

5. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 4, It is characterized in that The convolution module consists of six layers of convolution stacked in sequence; Each convolution layer includes a convolution layer, a normalization layer, an activation function layer, and a maximum pooling layer; The parameters of the first convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 32, the convolution kernel size is set to 3×3, the stride is set to 1×1, and the output is 227×227×32; a normalization layer and an activation function layer are added after the convolution layer, and the output is 227×227×32; in the maximum pooling layer, the pool size is set to 5×5, the stride is set to 1×1, and the output is 227×227×32; The parameters of the second convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 32, the convolution kernel size is set to 3×3, and the stride is set to 2×2; the other parameters remain unchanged, and the output is 114×114×32; a normalization layer and an activation function layer are added after the convolution layer, and the output is 114×114×32; the pool size of the maximum pooling layer is set to 5×5, the stride is set to 1×1, and the output is 114×114×32; The parameters of the third convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 64, the convolution kernel size is set to 3×3, and the stride is set to 2×2; The rest of the parameters remain unchanged, and the output is 57×57×64; a normalization layer and an activation function layer are added after the convolution layer, and the output is 57×57×64; the pool size of the maximum pooling layer is set to 5×5, the stride is set to 1×1, and the output is 57×57×64; The parameters of the fourth convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 128, the convolution kernel size is set to 3×3, and the stride is set to 2×2; the other parameters remain unchanged, and the output is 29×29×128; a normalization layer and an activation function layer are added after the convolution layer, and the output is 29×29×128; the pool size of the maximum pooling layer is set to 5×5, the stride is set to 1×1, and the output is 29×29×128; The parameters of the fifth convolution layer are set as follows: the number of convolution kernels in the convolution layer is set to 256, the convolution kernel size is set to 3×3, and the stride is set to 1×1; the other parameters remain unchanged, and the output is 29×29×256; a normalization layer and an activation function layer are added after the convolution layer, and the output is 29×29×256; the pool size of the maximum pooling layer is set to 5×5, the stride is set to 1×1, and the output is 29×29×256; The sixth convolution parameters are set as follows: the number of convolution kernels in the convolution layer is set to 512, the convolution kernel size is set to 3×3, and the stride is set to 2×2; the other parameters remain unchanged, and the output is 15×15×512; a regularization layer is added after the normalization layer of this layer, and the discard ratio is set to 0.5; The output of the normalization layer, regularization layer, and activation function layer are all 15×15×512.

6. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 4, It is characterized in that The step 3.3 is specifically as follows: Step 3.3.

1. Perform Z-score normalization on the high-dimensional feature vector dataset extracted by EFENet features; Step 3.3.

2. Then construct the covariance matrix based on the standardized data set; Step 3.3.

3. Calculate the eigenvalues ​​and eigenvectors of the covariance matrix; Step 3.3.

4. Select the principal component; sort the eigenvalues ​​obtained in step 3.3.3 from large to small, and put the largest eigenvalue first; Step 3.3.

5. Calculate the cumulative variance contribution rate; add up the eigenvalues ​​in order of size to obtain a cumulative variance contribution rate sequence, which indicates the contribution of each principal component to the total variance; Step 3.3.

6. Select the final dimension of dimensionality reduction; According to the set cumulative variance contribution rate threshold of 95%, the minimum dimension that makes the cumulative variance contribution rate exceed the threshold is found as the final dimension after dimensionality reduction.

7. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 1, It is characterized in that In step 4, the process of constructing the topological structure based on the preprocessed HighD dataset is as follows: Step 4.1.

1. Select trajectory data of a certain time period or a certain area from the HighD dataset for analysis; Step 4.1.

2. Conversion of trajectory points to nodes; Node creation: define the vehicle and its surrounding vehicles as nodes, and the node attributes or features contain the basic information of the vehicle; Step 4.1.

3. Define the edges based on the horizontal and vertical distances between vehicles; A distance threshold is preset. If the distance between vehicles is less than this threshold, an edge is established between the corresponding vehicles. The weight of the edge is set according to the distance. The closer the distance, the greater the weight. Step 4.1.

4. Initialize an adjacency matrix to represent the connection between vehicles; if there is an edge between vehicle i and vehicle j, the corresponding element in the adjacency matrix is ​​set to 1 or assigned a value according to the weight of the edge, otherwise it is set to 0; Step 4.1.

5. Assign weights to the edges. The weights of the edges are defined as a function of the distance, as shown in the formula: ; in, represents the weight of the edge between node i and node j, Represents the distance between node i and node j; Step 4.1.

6. For each node, construct a feature vector that contains various attributes of the vehicle; Step 4.1.

7. Use graph theory methods and tools or deep learning graph processing tools to create a traffic network topology map, analyze and visualize the traffic network topology map, extract information about traffic flow characteristics, and store the map in a structured format.

8. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 7, It is characterized in that In step 4, the process of feature extraction using the built GCN model is as follows: Step 4.2.

1. Define the graph convolutional network GCN model architecture; The graph convolutional network GCN model architecture includes: The first GCN layer: performs the first graph convolution operation, maps the input features to a high-dimensional space to capture the initial relationship between features; expands the four input features, including the speed, acceleration, and lateral and longitudinal distances of each vehicle to the nearest vehicle, to 128 dimensions to capture the initial complex features. The output of this layer is a 128-dimensional feature representation of each node, the weight matrix size is set to 4×128, and the activation function is set to ; The second layer of GCN: further processes the output of the first layer of GCN and maps the 128-dimensional features to 64 dimensions; The third layer GCN: further processes the output of the second layer and maps the 64-dimensional features to 32 dimensions; the third layer GCN parameter design is: input dimension: 64; output dimension: 32; weight matrix size: 64×32; activation function: ReLU; Dropout probability: 0.5; Output layer GCN: The last layer maps the 32-dimensional features output by the third layer GCN to three output nodes, corresponding to the three categories of lane change decisions, namely left lane change, right lane change, and following the car; the output layer parameters are designed as follows: input dimension: 32; output dimension: 3; weight matrix size: 32×3; activation function: Softmax; Define the activation function. The first layer GCN, the second layer GCN, and the third layer use the ReLU activation function to process nonlinear features. The softmax function is used before the output layer GCN output to obtain the probability distribution of the final lane change decision. Step 4.2.

2. Use the topological structure data set obtained from step 4.1.1 to step 4.1.7 to train the GCN model. The specific steps for feature extraction using the GCN model are as follows: Step 4.2.2.

1. Node representation initialization: The feature vector of each node needs to be initialized first, directly using the attributes of the topology map nodes or converting them into a fixed-length vector through embedding technology. Define the node feature matrix X, where each node represents a vehicle and the features include the vehicle's status information. The size is N×D, where N is the number of nodes and D is the feature dimension of each node. Step 4.2.2.

2. Graph structure preprocessing; Represent the vehicle as a node and construct an adjacency matrix containing N nodes. The specific steps are as follows: ; In the formula, is the original adjacency matrix, , represents the connection relationship between the nodes in the topology graph; is the adjacency matrix after adding the self-loop; It is the identity matrix, which is used to add self-loops in the adjacency matrix so that each node can consider its own characteristics; Normalize the adjacency matrix; ; In the formula, is the symmetric normalized adjacency matrix, is the degree matrix; ; Among them, the element Indicates whether there is an edge connection between node i and node j; diagonal elements represents the degree of node i, It is The activation matrix of the layer, where: ; In the formula is the feature matrix of the input node, and the node features are expressed as: ; In the formula, is the node feature of the ego vehicle; is the node feature of the surrounding vehicles, which is specifically expressed as: ; in, , is the lateral distance of the centerline of the original lane before changing lanes, is the longitudinal distance of the centerline of the original lane before changing lanes; is the speed of the car, is the vehicle's acceleration, is the lateral distance of the other car relative to the own car, is the longitudinal distance of the other vehicle relative to the vehicle itself, It's the speed of his car. It is the acceleration of his car; Step 4.2.2.

3. Graph convolution operation; In each layer of graph convolution, the features of the nodes are updated according to the adjacency relationship and the weight matrix; the new feature of a node is the weighted sum of its own features and the features of its neighbors, and the weights are learned during the training process; Step 4.2.2.

4. Add a nonlinear activation function after the graph convolution operation to increase the expressive power of the model; Step 4.2.2.

5. Feature summary and output; In the last layer of GCN, a global average pooling operation is used to aggregate the features of all vehicles, and the output dimension is 32 dimensions.

9. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 8, It is characterized in that In step 4.2.2.3, the feature update formula of the node is: ; in is the adjacency matrix with self-loops added, is the corresponding degree matrix, It is The feature matrix of the layer, is the weight matrix of this layer, is the activation function; In each graph convolution layer, the features of neighbor nodes are aggregated by multiplying the adjacency matrix and the node feature matrix, and then nonlinear transformation is performed through the weight matrix and activation function to extract more advanced features layer by layer; The extraction process is as follows: The first layer of graph convolution; Input node feature matrix , calculate the output features of the first layer: ; The second layer of graph convolution takes the output features of the first layer as input , calculate the output features of the second layer: ; The third layer of graph convolution; Input is the output feature of the second layer , calculate the output features of the third layer : 。 10. The intelligent vehicle lane changing method based on multi-view feature fusion and collision risk analysis according to claim 1, It is characterized in that The step 6 is specifically as follows: Step 6.

1. Reshape the feature vector; the ViT model requires that the input is a two-dimensional image divided into multiple patches, so the multi-dimensional comprehensive feature vector obtained in step 5 needs to be expanded into a two-dimensional structure; Step 6.

2. Linear mapping: Map the reshaped feature vector to a higher dimension and design a fully connected layer to map the "virtual" pixel values ​​in the reshaped feature vector to the high-dimensional space; Step 6.

3. Add position encoding; the Transformer architecture used by the ViT model relies on position encoding to maintain sequence information, so position encoding is added to the feature vector after linear mapping; Step 6.

4. Pass the linearly mapped patch sequence with position encoding as input to the ViT model, train the ViT model, and use the pre-trained ViT model to make lane change decisions.