Vehicle trajectory and traffic flow prediction method based on checkpoint data

By combining bayonet data and GCN-GRU-KAN model in vehicle trajectory prediction, the problems of insufficient collective trajectory analysis and insufficient computing resources for traffic flow prediction in the prior art are solved, and efficient vehicle trajectory and traffic flow are achieved. Accurate prediction improves the effectiveness of traffic management.

CN119339551BActive Publication Date: 2025-02-25SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411875364.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-02-25
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing vehicle trajectory prediction methods are based on the position prediction of individual trajectories, lack comprehensive analysis of collective trajectories, and traffic flow prediction depends on a large number of computing resources, making it difficult to meet data processing needs.

Method used

The vehicle trajectory prediction method based on bayonet data is used, combined with GCN, GRU and KAN models, vehicle trajectory prediction is carried out, and the traffic flow prediction value of each bayonet is obtained by superimposing the predicted vehicle trajectory.

Benefits of technology

Accurate prediction of vehicle trajectory and traffic flow is achieved, the utilization rate and prediction accuracy of traffic data are improved, road traffic safety is enhanced and traffic congestion is alleviated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339551B_ABST
    Figure CN119339551B_ABST
Patent Text Reader

Abstract

The present invention relates to a vehicle trajectory and traffic flow prediction method based on checkpoint data, which belongs to the field of intelligent transportation. The vehicle trajectory prediction is performed by using checkpoint data and combining GCN, GRU and KAN models. The traffic statistics of each checkpoint are obtained by superimposing the predicted vehicle trajectory, so as to achieve the purpose of accurately reflecting the real traffic situation, enhancing road traffic safety and alleviating traffic congestion problems. The method includes step 1), definition; step 2), data preprocessing; step 3), extracting checkpoint data information; step 4), vehicle trajectory construction and division; step 5), selecting qualified vehicles; step 6), vehicle trajectory prediction; step 7), traffic flow prediction; superimposing the predicted vehicle trajectory to obtain the traffic flow prediction value of each checkpoint in the future.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a vehicle track and traffic flow prediction method based on checkpoint data, belonging to the field of intelligent transportation. Background Art

[0002] With the development of information technology, short-term traffic situation analysis of urban road networks driven by massive traffic data has become a research hotspot for urban traffic management. Existing methods for acquiring vehicle trajectory data include the Beidou Satellite Navigation System (BDS), radar, and high-definition toll booth system (HDBS). The trajectory data collected by GPS equipment is collected too frequently and has data redundancy problems, requiring a large amount of accurate data to complete trajectory prediction. In urban roads, high-definition toll booth systems are widely used, storing massive amounts of vehicle trajectory data, which can be used to analyze road network OD, statistical analysis of traffic flow, etc.

[0003] Among the current vehicle trajectory prediction methods, the Markov model method is widely used, including using the Adaboost algorithm to generate Markov models of different order fusions for trajectory prediction, solving the high sparsity rate of high-order Markov models while improving the prediction accuracy of low-order Markov models; considering the user's position movement sequence and combining time-related information for prediction, a continuous time series Markov model (CTS-MM) is proposed to predict user locations; using historical information and massive data in the GPS trajectory data set, a data-driven weight selection method is used to create a Markov model, and the trajectory of the vehicle is predicted based on the trajectory data of the intersection. The Markov model has limited ability to use historical position sequence information, and most of them are based on individual trajectory position prediction, lacking a comprehensive analysis of collective trajectories, and have strong limitations.

[0004] Existing traffic flow prediction plays an important role in the application of intelligent transportation systems (ITS). Researchers' research on traffic flow prediction includes designing a graph convolution model with an attention mechanism, which can effectively capture the spatiotemporal and dynamic characteristics of nodes and predict traffic flow. However, such research is generally based on existing traffic data and uses machine learning, deep learning and other methods to predict traffic. However, machine learning algorithms usually require a lot of computing resources, which will lead to slow processing speed of checkpoint data in actual operation and make it difficult to meet data processing needs. Due to the complex topological structure of the road network, it cannot meet the needs of trajectory prediction of large-scale urban road networks. The number of parameters of MLP is huge and usually not interpretable.

[0005] In view of this, this application is hereby filed. Summary of the invention

[0006] The present application proposes a vehicle trajectory and traffic flow prediction method based on checkpoint data, which aims to solve the problems existing in the above-mentioned prior art and use checkpoint data in combination with GCN, GRU and KAN models to predict vehicle trajectories. The traffic statistics results of each checkpoint are obtained by superimposing the predicted vehicle trajectories, thereby achieving the purpose of accurately reflecting the real traffic conditions, enhancing road traffic safety and alleviating traffic congestion problems.

[0007] To achieve the above design objectives, the vehicle trajectory and traffic flow prediction method based on checkpoint data includes the following steps:

[0008] Step 1: Definition;

[0009] Obtain the trajectory data of a vehicle from the HDBS; the vehicle trajectory is the route or location of the vehicle on the road;

[0010] Step 2: Data preprocessing;

[0011] This includes deleting data that does not meet the requirements, removing duplicate data, and removing redundant fields;

[0012] Step 3, extract the card port data information;

[0013] Step 4: Vehicle trajectory construction and division;

[0014] Analyze and divide vehicle travel trajectory data into one or more independent travel segments from the checkpoint data;

[0015] Step 5: Select a vehicle that meets the requirements;

[0016] Step 6: Vehicle trajectory prediction;

[0017] The GCN-GRU-KAN combined model is used to predict vehicle trajectories, including the following processes:

[0018] Step 6.1, establish the road network topology G and input trajectory data;

[0019] Step 6.2, obtain the adjacency matrix A and the feature matrix X;

[0020] Step 6.3: Using the spectral domain-based graph convolution GCN, first transform the graph structure data using the symmetric normalized Laplacian matrix Encode and calculate the eigenvalue λ of the matrix. The calculation formula is ;in, , represents an adjacency matrix with self-loops added and diagonal 1, is the identity matrix, yes The degree matrix of

[0021] Step 6.4, extract the graph structure features by performing Laplace transform on the matrix;

[0022] Step 6.5: Normalize the processed symmetric Laplace matrix L sym , feature matrix X and parameter matrix W are input into GCN together to perform dot product operation , using the activation function To activate and obtain the feature matrix of neighboring nodes; where, is the feature matrix, is the adjacency matrix, W0 represents the weight from the input layer to the hidden layer, and W1 is the weight from the hidden layer to the output layer;

[0023] Step 6.6: Input the dot product operation output of GCN into the GRU-KAN timing feature analysis module;

[0024] The calculation formulas for the update gate, reset gate, and reset data of the input GCN convolution result are

[0025] , , ; Among them, f(A,X t ) represents the convolution process of the GCN layer, W u , W r , W c is the weight matrix, b u , b r , b c is the bias term;

[0026] Step 6.7, define the GRU-KAN recurrent neural network layer;

[0027] It includes the input layer GRU layer, the KAN layer (fully connected layer), the forward propagation GRU layer and the output layer. The GRU layer dynamically adjusts the information weight of each time step through the gating mechanism. ;

[0028] Step 6.8: The output result h of the last time step of the GRU layer t Through the fully connected layer After processing, output X t ; Among them, Ф L-1 is the B-spline function matrix corresponding to the Lth KAN layer, L=1 layer represents the KAN layer closest to the input vector, i.e. Ф0, 0 represents the stacking operation of the KAN layer;

[0029] Step 6.9: Get the predicted vehicle trajectory data including the off-peak period and the morning and evening peak periods ;

[0030] Step 7: Traffic flow prediction;

[0031] Superimpose the predicted vehicle trajectories to obtain the predicted traffic flow value for each checkpoint in the future.

[0032] Furthermore, the step 2 includes the following process:

[0033] Step 2.1, delete the checkpoint data that only appeared once in the study area or outside the study area;

[0034] Step 2.2: Short trips lasting less than 1 minute or unreasonable long trips lasting more than 12 hours are also excluded from the analysis;

[0035] Step 2.3, remove duplicate data, retain only a single data record, and remove the data that is repeatedly collected when the card gate equipment performs image recognition on vehicles passing through the section;

[0036] Step 2.4: The checkpoint data set includes multiple redundant fields. The redundant fields and the fields with data missing rate exceeding 80% are removed. For data with low missing rate, the median interpolation method is used to complete the data, and the mean square error test method is used to eliminate outliers.

[0037] Furthermore, the step 4, dividing each vehicle's travel trajectory each time to determine whether it is a trip, includes the following algorithm flow:

[0038] Assume that a vehicle passes through i checkpoints in a day, and the time interval between each checkpoint is Δt i ;

[0039] Step 4.1, obtain the checkpoint record information of the analyzed vehicle trajectory, including the collection time, license plate number, checkpoint number, lane number, longitude, latitude, and checkpoint name;

[0040] Step 4.2, sort the acquired trajectory records by time, take the first checkpoint that the vehicle passes as the starting point to obtain all the checkpoints that the analyzed vehicle passes before the calculation starts, and sort the acquired vehicle trajectory records by the collection time to ensure the time sequence of the vehicle trajectory data;

[0041] Step 4.3: Calculate the time interval between adjacent track records and the time interval between vehicles passing through adjacent checkpoints. ;

[0042] Step 4.4, calculating the distance that the vehicle passes through the adjacent checkpoints;

[0043] First, convert the latitude and longitude to radians Then, using the longitude and latitude between the checkpoints, according to the Haversine formula, the actual distance Δs between the adjacent checkpoints is calculated. i ; .

[0044] Among them, φ1 and φ2 are the latitudes of the first and second adjacent checkpoints, in radians; Δφ is the latitude difference between the two checkpoints; Δλ is the longitude difference between the two checkpoints, in radians; R is the average radius of the earth, which is 6371 kilometers;

[0045] Step 4.5, determining the speed threshold;

[0046] Calculate the average speed between each pair of adjacent checkpoints based on the time and distance that vehicles pass through the checkpoints ;

[0047] Step 4.6, determine the conditions;

[0048] For each pair of adjacent records, based on the time interval Δt i , average speed and distance, determine whether to regard adjacent records as part of the same trip. The judgment formula is: ; If the condition is met, execute the following step 4.7; if the condition is not met, return to the above step 4.3;

[0049] Step 4.7, trajectory division;

[0050] According to the judgment condition of step 4.6, it is obtained that the checkpoint i+1 is the end point of the vehicle trajectory, and the vehicle's driving trajectory is divided into one or more independent travel segments;

[0051] Step 4.8: Output the results.

[0052] For each independent travel segment, output its start time, end time, start and end checkpoint information, and number of checkpoints passed.

[0053] Furthermore, the step 5, selecting vehicles that pass through checkpoints more than the average checkpoint number each month as experimental objects, includes the following execution process:

[0054] Step 5.1, traverse the total data of original vehicle trajectories;

[0055] Step 5.2, group by license plate number and sort by time;

[0056] Step 5.3, calculate the time t for each vehicle to pass through two adjacent checkpoints;

[0057] Step 5.4, calculate the average one-way commuting time T of the city;

[0058] Step 5.5: Calculate the average number of checkpoints that vehicles pass through ;

[0059] Step 5.6: Calculate the average number of checkpoints that vehicles pass through each month ;

[0060] Step 5.7: Select vehicles with more than the average number of checkpoints as experimental subjects.

[0061] Furthermore, in step 6, the GCN-GRU-KAN combined model for vehicle trajectory prediction includes the following structure: the adjacency matrix A is composed of , used to represent the spatial connection relationship between road checkpoints. Each row represents a checkpoint. The values ​​in the matrix are 0 and 1 to represent the connectivity between road checkpoints. 0 means that the checkpoints are not connected, and 1 means that the checkpoints are connected.

[0062] The identity matrix I is a matrix whose diagonal is all 1 and other entries are 0. The graph convolution layer represents each node as an aggregation of its neighboring nodes;

[0063] The degree matrix D describes the connection status of each checkpoint in a road network, and the values ​​on the diagonal of the matrix represent the number of checkpoints connected to each checkpoint;

[0064] The feature matrix X represents the complete travel trajectory of the vehicle over time Each row represents the trajectory of a vehicle trip, and each column represents a checkpoint. If the vehicle passes through the checkpoint during the trip, the corresponding row value is 1, otherwise it is 0;

[0065] The parameter matrix W contains the weights and bias terms of the neural network;

[0066] Road network topology G, , is the set of all checkpoints represented as vertices in the road network, that is, there are n checkpoints in the road network; is the set of edges connecting road segments in the road network, and A is the adjacency matrix.

[0067] In summary, the vehicle trajectory and traffic flow prediction method based on checkpoint data has the following advantages and beneficial effects:

[0068] 1. This application uses vehicle trajectory prediction technology to accurately count the traffic flow at the checkpoints and compare it with the actual traffic flow at the checkpoints, thereby effectively and accurately reflecting the actual traffic situation. The checkpoint data used in this application has a wider collection scope. The checkpoint system covers the main intersections in the city. Compared with floating car GPS data, it is easier to obtain and covers more comprehensive types of vehicles. In addition, the data dimension of the checkpoint data is lower, and experimental analysis can be performed without extracting a large number of features;

[0069] 2. This application proposes a vehicle trajectory prediction model of GCN-GRU-KAN combination to capture the spatiotemporal characteristics of traffic checkpoint data; the GCN model is used to fully consider the road network topology structure to extract the relationship between each road network node; the GRU-KAN time series feature analysis module is used to fully explore the time variation characteristics of vehicle trajectories. Compared with existing GCN, GCN-GRU and other models, the GCN-GRU-KAN model proposed in this application improves the accuracy of the prediction model and optimizes the running time, reduces the number of parameters, and provides better local fitting ability and nonlinear expression ability in vehicle trajectory prediction, with higher and more significant effectiveness;

[0070] 3. This application fully exploits the spatiotemporal characteristics of checkpoint data, preprocesses traffic checkpoint data, constructs complete vehicle trajectories, and analyzes road network structures and vehicle trajectories, thereby significantly improving the utilization rate and prediction accuracy of trajectory data, and has the characteristics of enhancing road traffic safety and alleviating traffic congestion problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The present application is further described with reference to the following drawings:

[0072] Figure 1 It is a schematic diagram of vehicle trajectories based on the bayonet data;

[0073] Figure 2 It is a flow chart of vehicle trajectory division;

[0074] Figure 3 It is a flow chart for screening eligible vehicles;

[0075] Figure 4 This is the structure diagram of the GCN-GRU-KAN combined model;

[0076] Figure 5 It is the vehicle trajectory prediction flow chart;

[0077] Figure 6 It is a flow chart of traffic flow prediction based on trajectory prediction;

[0078] Figure 7 This is a schematic diagram of the impact of different numbers of hidden layer units on vehicle trajectory prediction results;

[0079] Figure 8 This is a schematic diagram of the impact of different numbers of hidden layer units on traffic flow prediction results;

[0080] Fig. 9 It is a comparison chart between the original data of the checkpoint and the predicted flow rate;

[0081] Fig.10 This is a comparison chart of the original and predicted path traffic. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0083] Embodiment 1, as Figures 1 to 10 As shown, the vehicle trajectory and traffic flow prediction method based on checkpoint data proposed in this application includes the following steps:

[0084] Step 1: Definition;

[0085] Obtain the trajectory data of a vehicle from the HDBS; the vehicle trajectory is the route or location of the vehicle on the road;

[0086] As attached Figure 1 As shown in the figure, when a vehicle passes through the road, the checkpoint system captures the vehicle moment with high-definition images. When a vehicle passes through multiple checkpoints, its trajectory can be seen as a trajectory point composed of countless checkpoints. ; Where L represents a trajectory sequence of vehicle travel, Vn represents the number of the nth checkpoint that the vehicle passes through, and these trajectory points contain the vehicle position information at a certain moment;

[0087] Step 2: Data preprocessing;

[0088] This includes deleting data that does not meet the requirements, removing duplicate data, and removing redundant fields; including the following processes:

[0089] Step 2.1, delete the checkpoint data that only appeared once in the study area or outside the study area;

[0090] Step 2.2: Short trips lasting less than 1 minute or unreasonable long trips lasting more than 12 hours are also excluded from the analysis;

[0091] Step 2.3, remove duplicate data, retain only a single data record, and remove the data that is repeatedly collected when the card gate equipment performs image recognition on vehicles passing through the section;

[0092] Step 2.4: The checkpoint data set includes multiple redundant fields, which are not involved in the present invention. Redundant fields and fields with a data missing rate of more than 80% are eliminated; for data with a low missing rate, the median interpolation method is used to complete the data, and the mean square error test method is used to eliminate outliers;

[0093] Step 3, extract the card port data information;

[0094] Extract the acquisition time, license plate number, checkpoint number, lane number, longitude, latitude and checkpoint name required to construct trajectory data from the checkpoint data;

[0095] Step 4: Vehicle trajectory construction and division;

[0096] Analyze and divide vehicle travel trajectory data into one or more independent travel segments from the checkpoint data;

[0097] like Figure 2 As shown, the travel trajectory of each vehicle is divided to determine whether it is a trip;

[0098] Assume that a vehicle passes through i checkpoints in a day, and the time interval between each checkpoint is Δt i , execute the following algorithm flow:

[0099] Step 4.1, obtain the checkpoint record information of the analyzed vehicle trajectory, including the collection time, license plate number, checkpoint number, lane number, longitude, latitude, and checkpoint name;

[0100] Step 4.2, sort the acquired trajectory records by time, take the first checkpoint that the vehicle passes as the starting point to obtain all the checkpoints that the analyzed vehicle passes before the calculation starts, and sort the acquired vehicle trajectory records by the collection time to ensure the time sequence of the vehicle trajectory data;

[0101] Step 4.3: Calculate the time interval between adjacent trajectory records and the time interval Δt between vehicles passing through adjacent checkpoints. i ;

[0102] Step 4.4, calculating the distance that the vehicle passes through the adjacent checkpoints;

[0103] First, convert the latitude and longitude to radians Then, using the longitude and latitude between the checkpoints, according to the Haversine formula, the actual distance Δs between the adjacent checkpoints is calculated. i ; .

[0104] Among them, φ1 and φ2 are the latitudes of the first and second adjacent checkpoints, in radians; Δφ is the latitude difference between the two checkpoints; Δλ is the longitude difference between the two checkpoints, in radians; R is the average radius of the earth, about 6371 kilometers;

[0105] Step 4.5, determining the speed threshold;

[0106] Calculate the average speed between each pair of adjacent checkpoints based on the time and distance that vehicles pass through the checkpoints ;

[0107] Step 4.6, determine the conditions;

[0108] For each pair of adjacent records, based on the time interval Δt i, average speed and distance, determine whether to regard adjacent records as part of the same trip. The judgment formula is: ; If the condition is met, execute the following step 4.7; if the condition is not met, return to the above step 4.3;

[0109] Step 4.7, trajectory division;

[0110] According to the judgment condition of step 4.6, it is obtained that the checkpoint i+1 is the end point of the vehicle trajectory, and the vehicle's driving trajectory is divided into one or more independent travel segments;

[0111] Step 4.8: Output the results.

[0112] For each independent trip segment, output its start time, end time, start and end checkpoint information, number of checkpoints passed, etc.

[0113] Step 5: Select a vehicle that meets the requirements;

[0114] As attached Figure 3 As shown, vehicles that pass through checkpoints more than the average checkpoint number each month are selected as experimental objects, including the following execution process:

[0115] Step 5.1, traverse the total data of original vehicle trajectories;

[0116] Step 5.2, group by license plate number and sort by time;

[0117] Step 5.3, calculate the time t for each vehicle to pass through two adjacent checkpoints;

[0118] Step 5.4, calculate the average one-way commuting time T of the city;

[0119] Step 5.5: Calculate the average number of checkpoints that vehicles pass through ;

[0120] Step 5.6: Calculate the average number of checkpoints that vehicles pass through each month ;

[0121] Step 5.7: Select vehicles with more than the average number of checkpoints as experimental subjects.

[0122] Step 6: Vehicle trajectory prediction;

[0123] Use the GCN-GRU-KAN combined model to predict vehicle trajectories;

[0124] The algorithm model diagram is as attached Figure 4 As shown, the GCN-GRU-KAN combined model includes the following structure:

[0125] Adjacency matrix A is composed of dimensional matrix, used to represent the spatial connection relationship between road checkpoints. Each row represents a checkpoint. The values ​​in the matrix are 0 and 1 to represent the connectivity between road checkpoints. 0 means that the checkpoints are not connected, and 1 means that the checkpoints are connected.

[0126] The identity matrix I is a matrix whose diagonal is all 1 and other entries are 0. The graph convolution layer represents each node as an aggregation of its neighboring nodes;

[0127] The degree matrix D describes the connection status of each checkpoint in a road network, and the values ​​on the diagonal of the matrix represent the number of checkpoints connected to each checkpoint;

[0128] The feature matrix X represents the complete travel trajectory of the vehicle over time Each row represents the trajectory of a vehicle trip, and each column represents a checkpoint. If the vehicle passes the corresponding checkpoint during the trip, the corresponding row value is 1, otherwise it is 0;

[0129] The parameter matrix W contains the weights and bias terms of the neural network;

[0130] Road network topology G, , is the set of all checkpoints represented as vertices in the road network, that is, there are n checkpoints in the road network; is the set of edges connecting road segments in the road network, and A is the adjacency matrix.

[0131] As attached Figure 5 As shown in the figure, the vehicle trajectory prediction using the GCN-GRU-KAN combination includes the following process:

[0132] Step 6.1, establish the road network topology G and input trajectory data;

[0133] Step 6.2, obtain the adjacency matrix A and the feature matrix X;

[0134] Step 6.3: Using the spectral domain-based graph convolution GCN, first transform the graph structure data using the symmetric normalized Laplacian matrix Encode and calculate the eigenvalue λ of the matrix. The calculation formula is ;in, , represents an adjacency matrix with self-loops added and diagonal 1, is the identity matrix, yes The degree matrix of

[0135] Step 6.4, extract the graph structure features by performing Laplace transform on the matrix;

[0136] Step 6.5: Normalize the processed symmetric Laplace matrix Lsym , feature matrix X and parameter matrix W are input into GCN together to perform dot product operation , using the activation function To activate and obtain the feature matrix of neighboring nodes; where, is the feature matrix, is the adjacency matrix, W0 represents the weight from the input layer to the hidden layer, and W1 is the weight from the hidden layer to the output layer;

[0137] Step 6.6: Input the dot product operation output of GCN into the GRU-KAN timing feature analysis module;

[0138] The calculation formulas for the update gate, reset gate, and reset data of the input GCN convolution result are , , ; Among them, f(A,X t ) represents the convolution process of the GCN layer, W u , W r , W c is the weight matrix, b u , b r , b c is the bias term;

[0139] Step 6.7, define the GRU-KAN recurrent neural network layer;

[0140] It includes the input layer GRU layer, the KAN layer (fully connected layer), the forward propagation GRU layer and the output layer. The GRU layer dynamically adjusts the information weight of each time step through the gating mechanism. ;

[0141] Step 6.8: The output result h of the last time step of the GRU layer t Through the fully connected layer After processing, output X t ; Among them, Ф L-1 is the function matrix (B-spline function matrix) corresponding to the Lth KAN layer, L=1 layer represents the KAN layer closest to the input vector, i.e. Ф0, 0 represents the stacking operation of the KAN layer;

[0142] Step 6.9: Get the predicted vehicle trajectory data x including the off-peak period and the morning and evening peak periods t ;

[0143] Step 7: Traffic flow prediction;

[0144] Superimpose the predicted vehicle trajectories to obtain the predicted traffic flow value for each checkpoint in the future;

[0145] As attached Figure 6As shown in the figure, the vehicle trajectories during off-peak hours and morning and evening peak hours are predicted based on the GCN-GRU-KAN combined deep learning model. By superimposing the vehicle trajectories and counting the number of vehicles passing through each checkpoint, the traffic flow forecast value of each checkpoint in the future is obtained.

[0146] The vehicle trajectory and traffic flow prediction method based on checkpoint data proposed in this application is applied to prove the effectiveness of the above GCN-GRU-KAN combination model through the following actual verification process.

[0147] In order to verify the prediction effect through experimental result analysis and model comparison, a place in northern China was selected. The data set of the tollgate system covers the period from December 4 to December 31, 2023. A total of 40,269,306 vehicle trajectory data were collected and preprocessed by 85 high-definition tollgate devices.

[0148] Taking the travel trajectory of one of the experimental subject vehicles for one day as an example, the vehicle had a total of 109 travel trajectories on December 4, 2023, and a total of 2058 data records in one month. Some specific data information is shown in Table 1 below. Car ID represents the vehicle license plate number. To protect user privacy, it has been changed to the vehicle number. Collect Time represents the time when the vehicle passes a checkpoint. Ints Id represents the number of the checkpoint device. Ints Name represents the location name of the intersection where the checkpoint device is located. Laneno represents the lane where the vehicle is located when passing a checkpoint. Longitude represents the longitude of the checkpoint where the vehicle is located. Latitude represents the latitude of the checkpoint where the vehicle is located.

[0149] Table 1 Experimental vehicle data example

[0150] Car ID Collect Time Ints Id Ints Name Laneno Longitude Latitude 0001 2023-12-4 6:05:09 100007 Ningxia-Nanjing Road 1 120.38021 36.08261 0001 2023-12-4 6:15:36 100004 Jiangxi -Nanjing Road 2 120.38294 36.07402 0001 2023-12-4 6:28:04 100061 Hong Kong - Fuzhou South Road 3 120.3903 36.06493 0001 2023-12-4 6:29:26 100611 West Donghai - Zhanghua Road 1 120.29532 36.06217 0001 2023-12-4 6:30:05 100077 Donghai Middle-Taiwan Road 3 120.29638 36.05681 0001 2023-12-4 6:34:24 100060 Hong Kong Middle-Nanjing Road 3 120.39182 36.07116

[0151] In order to evaluate the performance of the prediction model, the present invention uses mean absolute error (MAE) and root mean square error (RMSE) to verify the vehicle trajectory prediction model, and uses mean absolute percentage error (MAPE) to verify the traffic flow prediction results, as shown in the following formulas (1) to (3).

[0152] (1)

[0153] (2)

[0154] (3)

[0155] Among them, T(i) and T*(i) are the actual value and predicted value of vehicle trajectory prediction, respectively, n is the total number of vehicle trajectories selected in the experiment, and i is the sequence number in the vehicle trajectory.

[0156] The preprocessed data set is divided into three subsets, 70% of the data is selected as the training set, 20% of the data is selected as the test set, and 10% of the data is selected as the validation set. Through experiments, it is determined that using the 10 historical trajectory steps to predict the 11th step is the best. When tuning the hyperparameters, in order to find the best balance between memory efficiency and capacity, the batch size is set to 64, the Adam optimizer is selected, and the number of training epochs is set to 72. As the number of training rounds increases, the number of iterations updated in the model increases, gradually changing from the initial unfitting state to the optimized fitting state. The model hyperparameter settings are shown in Table 2 below.

[0157] Table 2 Hyperparameter settings

[0158] Hyperparameters Parameter range Optimal parameters Number of hidden unit layers [4,8,16,32,64,128] 32 Learning speed [0.0001-0.1] 0.001 Batch size [16,32,64,128] 64 Number of training rounds [50,200] 72 Training rate [0%-100%] 85% Loss function hyperparameter λ [0.0001-0.01] 0.0005

[0159] The optimal model was determined by adjusting the number of units in the hidden layer, and the effects of different numbers of hidden layer units (4, 8, 16, 32, 64, and 128) on MAE, RMSE, and MAPE during the training process were recorded.

[0160] like Figure 7 The figure shows the influence of different numbers of hidden layer units on the vehicle trajectory prediction results. As the number of hidden layer units increases, MAE and RMSE first drop rapidly, reach a minimum value, and then start to rise. When the number of hidden layer units is 32, both MAE and RMSE reach the minimum value. Although RMSE is the lowest when the number of hidden layers is 16, the value of MAE is relatively high. Figure 8 The influence of different numbers of hidden layer units on the traffic flow prediction results is shown. As the number of hidden layer units increases, MAPE also decreases rapidly at first, reaches a minimum value, and then starts to rise. When the number of hidden layer units is 32, MAPE reaches the minimum value. Under the change of evaluation indicators, the optimal value of the number of hidden layer units selected by the present invention is 32, at which time the prediction performance of the model is optimal, and the optimal prediction result is achieved when Epoch is 72.

[0161] According to the above experimental results, for vehicle trajectory prediction results, the GCN-GRU-KAN combined model can accurately predict the trajectory of most vehicles from one checkpoint to the next, with only a few 1 to 2 checkpoint errors, and the overall prediction accuracy reaches more than 95%. The predicted path accurately covers the key areas of the real trajectory, and the spatial distribution is highly overlapped with the real trajectory, showing a small average deviation. This shows that the vehicle trajectory prediction model used has good generalization ability in complex road networks, can effectively predict vehicle driving paths, and does not need to rely on a large number of feature inputs, demonstrating its strong performance;

[0162] For the traffic prediction results, Fig. 9 As shown in the figure, based on the predicted vehicle trajectories, the traffic conditions of 85 checkpoints in the future are counted, and a comparison of the actual traffic conditions of the 85 checkpoints and the traffic conditions based on trajectory prediction statistics is constructed.

[0163] like Fig.10 As shown in the figure, it can be seen from the data in the figure that the future vehicle passing through each checkpoint predicted by the GCN-GRU-KAN model and the future traffic volume thus calculated are highly consistent with the overall trend of the actual traffic volume. The identification and analysis of hot checkpoints are mainly based on the results of the vehicle trajectory prediction model. By comparing the predicted traffic volume with the actual traffic volume, it is found that the hot checkpoints with particularly concentrated traffic volume are mainly distributed in the red area in the figure, such as 100061, 100067 and 100073, which are concentrated in the red hot spot area. This area is mainly a key area with high traffic volume, including hospitals, company office areas, commercial shopping centers and residential areas. The common feature is that not only the residents have high commuting needs, but also due to their superior geographical location, they lead to continuous traffic inflow and outflow, which significantly increases the traffic volume.

[0164] The error between the predicted route flow and the original route flow is extremely small, and the predicted and original route flow trends are roughly the same. The routes where checkpoints 100060, 100061, 100064, 100067, and 100073 are located are frequent routes for future vehicle trajectories in this area because these checkpoints are located on major traffic arteries or major traffic nodes, attracting more vehicles to pass through. Checkpoints 100005, 100057, 100063, 100520, and 200284 have less flow because they are located in more remote or inconvenient areas, or are not major traffic routes.

[0165] In summary, the embodiments given in conjunction with the accompanying drawings are only preferred solutions for achieving the purpose of the present invention. For those skilled in the art, this can be enlightened and directly deduce other alternative structures that conform to the design concept of the present invention. Other structural features obtained thereby should also belong to the scope of the solution described in the present invention.

Claims

1. A vehicle trajectory and traffic flow prediction method based on checkpoint data, characterized by: The following steps are included: Step 1: Definition; Obtain the trajectory data of a vehicle from the HDBS system; A vehicle trajectory is a set of routes or location points that a vehicle travels on a road; Step 2: Data preprocessing; This includes deleting data that does not meet the requirements, removing duplicate data, and removing redundant fields; Step 3, extract the card port data information; Step 4: Vehicle trajectory construction and division; Analyze and divide vehicle travel trajectory data into one or more independent travel segments from the checkpoint data; Step 5: Select a vehicle that meets the requirements; Step 6: Vehicle trajectory prediction; The GCN-GRU-KAN combined model is used to predict vehicle trajectories, including the following processes: Step 6.1, establish the road network topology G and input trajectory data; Step 6.2, obtain the adjacency matrix A and the feature matrix X; Step 6.3: Using the spectral domain-based graph convolution GCN, first transform the graph structure data using the symmetric normalized Laplacian matrix Encode and calculate the eigenvalue λ of the matrix. The calculation formula is ;in, , represents an adjacency matrix with self-loops added and diagonal 1s, is the identity matrix, yes The degree matrix of Step 6.4, extract the graph structure features by performing Laplace transform on the matrix; Step 6.5: Normalize the processed symmetric Laplace matrix L sym , feature matrix X and parameter matrix W are input into GCN together to perform dot product operation , using the activation function To activate and obtain the feature matrix of neighbor nodes; where, is the feature matrix, is the adjacency matrix, W0 represents the weight from the input layer to the hidden layer, and W1 is the weight from the hidden layer to the output layer; Step 6.6: Input the dot product operation output of GCN into the GRU-KAN timing feature analysis module; The calculation formulas for the update gate, reset gate, and reset data of the input GCN convolution result are , , ; Among them, f(A,X t ) represents the convolution process of the GCN layer, W u , W r , W c is the weight matrix, b u , b r , b c is the bias term; Step 6.7, define the GRU-KAN recurrent neural network layer; It includes the input layer GRU layer, the KAN layer (fully connected layer), the forward propagation GRU layer and the output layer. The GRU layer dynamically adjusts the information weight of each time step through the gating mechanism. ; Step 6.8: The output result h of the last time step of the GRU layer t Through the fully connected layer After processing, output X t ; Among them, Ф L-1 is the B-spline function matrix corresponding to the Lth KAN layer, L=1 layer represents the KAN layer closest to the input vector, i.e. Ф0, 0 represents the stacking operation of the KAN layer; Step 6.9: Get the predicted vehicle trajectory data x including the off-peak period and the morning and evening peak periods t ; Step 7: Traffic flow prediction; Superimpose the predicted vehicle trajectories to obtain the predicted traffic flow value for each checkpoint in the future.

2. The vehicle trajectory and traffic flow prediction method based on checkpoint data according to claim 1 is characterized by: The step 2 includes the following process: Step 2.1, delete the checkpoint data that only appeared once in the study area or outside the study area; Step 2.2: Short trips lasting less than 1 minute or unreasonable long trips lasting more than 12 hours are also excluded from the analysis; Step 2.3, remove duplicate data, retain only a single data record, and remove the data that is repeatedly collected when the card gate equipment performs image recognition on vehicles passing through the section; Step 2.4: The checkpoint data set includes multiple redundant fields. The redundant fields and the fields with data missing rate exceeding 80% are removed. For data with low missing rate, the median interpolation method is used to complete the data, and the mean square error test method is used to eliminate outliers.

3. The vehicle trajectory and traffic flow prediction method based on checkpoint data according to claim 1 is characterized by: The step 4 is to divide the travel trajectory of each vehicle each time and determine whether it is a trip, including the following algorithm flow: Assume that a vehicle passes through i checkpoints in a day, and the time interval between each checkpoint is Δt i ; Step 4.1, obtain the checkpoint record information of the analyzed vehicle trajectory, including the collection time, license plate number, checkpoint number, lane number, longitude, latitude, and checkpoint name; Step 4.2, sort the acquired trajectory records by time, take the first checkpoint that the vehicle passes as the starting point to obtain all the checkpoints that the analyzed vehicle passes before the calculation starts, and sort the acquired vehicle trajectory records by the collection time to ensure the time sequence of the vehicle trajectory data; Step 4.3: Calculate the time interval between adjacent trajectory records and the time interval Δt between vehicles passing through adjacent checkpoints. i ; Step 4.4, calculating the distance that the vehicle passes through the adjacent checkpoints; First, convert the latitude and longitude to radians Then, using the longitude and latitude between the checkpoints, the actual distance Δs between the adjacent checkpoints is calculated according to the Haversine formula below: i ; ; Among them, φ1 and φ2 are the latitudes of the first and second adjacent checkpoints, in radians; Δφ is the latitude difference between the two checkpoints; Δλ is the longitude difference between the two checkpoints, in radians; R is the average radius of the earth, which is 6371 kilometers; Step 4.5, determining the speed threshold; Calculate the average speed between each pair of adjacent checkpoints based on the time and distance that vehicles pass through the checkpoints ; Step 4.6, determine the conditions; For each pair of adjacent records, based on the time interval Δt i , average speed and distance, determine whether to regard adjacent records as part of the same trip. The judgment formula is: ; If the condition is met, execute the following step 4.7; if the condition is not met, return to the above step 4.3; Step 4.7, trajectory division; According to the judgment condition of step 4.6, it is obtained that the checkpoint i+1 is the end point of the vehicle trajectory, and the vehicle's driving trajectory is divided into one or more independent travel segments; Step 4.8: Output the results. For each independent travel segment, output its start time, end time, start and end checkpoint information, and number of checkpoints passed.

4. The vehicle trajectory and traffic flow prediction method based on checkpoint data according to claim 1 is characterized by: The step 5, selecting vehicles that pass through checkpoints more than the average checkpoint number each month as experimental objects, includes the following execution process: Step 5.1, traverse the total data of original vehicle trajectories; Step 5.2, group by license plate number and sort by time; Step 5.3, calculate the time t for each vehicle to pass through two adjacent checkpoints; Step 5.4, calculate the average one-way commuting time T of the city; Step 5.5: Calculate the average number of checkpoints that vehicles pass through ; Step 5.6: Calculate the average number of checkpoints that vehicles pass through each month ; Step 5.7: Select vehicles with more than the average number of checkpoints as experimental subjects.

5. The vehicle trajectory and traffic flow prediction method based on checkpoint data according to claim 1 is characterized by: In step 6, the GCN-GRU-KAN combined model for vehicle trajectory prediction includes the following structure: the adjacency matrix A is composed of dimensional matrix, used to represent the spatial connection relationship between road checkpoints. Each row represents a checkpoint. The values ​​in the matrix are 0 and 1 to represent the connectivity between road checkpoints. 0 means that the checkpoints are not connected, and 1 means that the checkpoints are connected. The identity matrix I is a matrix whose diagonal is 1 and other entries are 0. The graph convolution layer represents each node as an aggregation of its neighboring nodes; The degree matrix D describes the connection status of each checkpoint in a road network, and the values ​​on the diagonal of the matrix represent the number of checkpoints connected to each checkpoint; The feature matrix X represents the change of the vehicle's complete travel trajectory over time t. Each row represents the trajectory of a vehicle trip, and each column represents a checkpoint. If the vehicle passes through a checkpoint during the trip, the corresponding row value is 1, otherwise it is 0; The parameter matrix W contains the weights and bias terms of the neural network; Road network topology G, , is the set of all checkpoints represented as vertices in the road network, that is, there are n checkpoints in the road network; is the set of edges connecting road segments in the road network, and A is the adjacency matrix.

Citation Information

Patent Citations

  • Large-scale traffic data completion method and system based on space-time semantic understanding

    CN117523561A

  • Vehicle trajectory data complementing method based on space-time diagram embedding

    CN118779595A