Traffic prediction method based on mixed LSTM-GCN architecture

Through the traffic prediction method of hybrid LSTM-GCN architecture and combined with the Dijkstra algorithm, the problem that existing traffic prediction models are difficult to capture the complex dynamic and nonlinear characteristics of traffic flow is solved, and more accurate traffic flow prediction and path planning is achieved, which has important social and economic value.

CN119992833APending Publication Date: 2025-05-13DIGITAL TWIN (WUXI) TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510150650.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing traffic prediction models are difficult to accurately capture the complex dynamic and nonlinear characteristics of traffic flow, and are difficult to adapt to changes in actual traffic systems.

Method used

The traffic prediction method with a hybrid LSTM-GCN architecture is adopted to build a traffic prediction model by extracting and integrating historical GPS trajectory data and vehicle feature data. The LSTM model captures long-term dependencies in the time series, while the GCN model processes the topology of the road network through graph convolution networks and combines the Dijkstra algorithm for path planning.

Benefits of technology

It significantly improves the accuracy of traffic flow forecasting, can flexibly respond to traffic fluctuations, provides drivers with more accurate navigation suggestions, improves the intelligence level of urban traffic management, and reduces vehicle emissions, which has important social and economic value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992833A_ABST
    Figure CN119992833A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic prediction method, belongs to the technical field of traffic flow and trajectory optimization, and particularly relates to a traffic prediction method based on a hybrid LSTM-GCN architecture. A data set is preprocessed, and a solid data foundation is provided for a model through data cleaning, integration and feature engineering; meanwhile, a traffic prediction model based on LSTM and GCN effectively captures the dynamic change and long-term dependence of traffic flow by virtue of the excellent time sequence analysis capability, the GCN model improves the accuracy of traffic flow change prediction by analyzing the topological structure of a road network, and meanwhile, the Dijkstra algorithm is adjusted and optimized by dynamic weight, so that the traffic flow change prediction accuracy is improved. According to the method and the system, path planning can adapt to real-time traffic conditions, the practicability of the model is further improved, the method and the system have important significance in improving the intelligent level of an urban traffic system, and powerful support can be provided for urban traffic management through traffic prediction and path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic flow and its trajectory optimization, and specifically relates to a traffic prediction method based on a hybrid LSTM-GCN architecture. Background Art

[0002] With the acceleration of urbanization, traffic congestion and road complexity are becoming increasingly serious. Therefore, establishing an accurate traffic prediction model is of great practical significance for improving urban traffic and facilitating travel.

[0003] In the process of urbanization, traffic congestion and complex road conditions are becoming increasingly serious, bringing many inconveniences to people's travel. With the increase of urban traffic flow, traditional traffic management and prediction methods can no longer meet current needs. Therefore, developing and establishing an accurate traffic prediction model is of great practical significance for improving urban traffic and facilitating travel. In recent years, traffic flow prediction and traffic planning based on vehicle trajectories have received widespread attention.

[0004] Many traffic prediction models have been established for this purpose, but most of them have inherent limitations. Simple models such as rule-based systems or linear regression methods often have difficulty capturing the complex dynamics of actual traffic flows because they rarely consider the nonlinear characteristics of traffic systems. Some traditional models, such as vector autoregression (VAR) or autoregression integrated moving average (ARIMA) models, focus more on the statistical analysis of historical data and are difficult to adapt to changes in actual traffic systems. Therefore, it remains a challenge to develop a traffic prediction model that can both accurately predict traffic flow and adapt to complex changes. Summary of the invention

[0005] Purpose of the invention: To provide a traffic prediction method based on a hybrid LSTM-GCN architecture to solve the above-mentioned problems.

[0006] Technical solution: A traffic prediction method based on a hybrid LSTM-GCN architecture, the traffic prediction method comprising the following steps:

[0007] Step 1: Collect data sets and perform data cleaning;

[0008] Step 2: Integrate data sources by extracting features from data sets;

[0009] Step 3: Build a traffic prediction model, evaluate the model and extract the innovative points of the model; model evaluation includes: using K-means, LSTM, GCN and Dijkstra models for path planning and traffic trajectory prediction, using MSE, RMSE and MAPE evaluation indicators to evaluate the model, and proposing the innovative points of the model.

[0010] In a further embodiment, the traffic prediction method performs data cleaning processing on four data sets, the data sets include: a T-Drive trajectory data set, a regional data set, and a highway (PeMS) data set; the data sets include GPS trajectories of vehicles, real-time traffic conditions on several working days, and traffic flow information on highways;

[0011] The traffic prediction method first uses the K-means algorithm to cluster multiple landmark points by integrating the vehicle trajectories for the T-Drive trajectory dataset, and then uses the LSTM model to predict the next position of the vehicle, and uses the Dijkstra algorithm for path planning; then, for the regional dataset, a road network model is constructed according to the provided road coordinates, and the shortest path is planned for the vehicle according to the provided time weight; for the highway dataset (PeMS), a graph convolutional network (GCN) is used to predict and analyze the traffic flow of different sections; finally, the test dataset is used to comprehensively evaluate the final performance of the model, and multiple evaluation indicators are calculated, including root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).

[0012] In a further embodiment, in step 1, the data cleaning process includes the following:

[0013] The T-Drive trajectory dataset was processed by first cleaning the data thoroughly, including removing anomalous GPS points that deviated significantly from the expected trajectory and deleting duplicate entries. Then, the GPS points were mapped onto the urban road network using the map matching function of the osmnx library and the data was integrated. Different data sources were merged into a unified CSV file for comprehensive analysis, while encoding the timestamp and geographic coordinate data elements.

[0014] The processing of the highway data set (PeMS) first cleans the data set, including filtering the noise of the data set to identify and mitigate data anomalies caused by sensor failures, and clarify outliers. Then, missing data is processed by filling the gaps in traffic data using the average of adjacent sensor data. Secondly, data integration is performed to aggregate data from multiple sensors based on geographic proximity and time alignment. When processing gaps in data input, a time series prediction model is used to fill the missing parts of sensor data. Finally, in the data encoding stage, timestamps are encoded as periodic features representing traffic patterns.

[0015] For regional data set processing, the data set is first cleaned, including noise reduction, identification and correction of erroneous or abnormal road section data; secondly, the GPS points are mapped to the road network through the map matching function of the osmnx library and the missing traffic data are processed, and the missing values ​​are estimated using the data of adjacent road sections. Finally, in the data integration stage, the road data is combined with POI, and K-means clustering analysis is used to identify locations where traffic flow is concentrated in order to analyze the relationship between traffic flow and the geographical environment.

[0016] In a further embodiment, in step 2, data feature extraction extracts features from four data sets and integrates them into data sources to construct a comprehensive and accurate traffic prediction model, including the following feature engineering:

[0017] For the T-Drive trajectory dataset; firstly, feature extraction is performed on the T-drive trajectory dataset. In the dataset, hourly and weekly time features are extracted from the timestamps. At the same time, the provided vehicle ID is converted into a numerical format. The average speed and driving direction position features of the vehicle are calculated from the provided longitude and latitude coordinate points. Based on the extracted longitude and latitude dense traffic flow coordinate points, the road length and driving direction are calculated to establish a traffic prediction model.

[0018] For the highway dataset (PeMS), traffic features such as traffic flow and vehicle ID changes were extracted from the provided data through PCA, and the number of given features was reduced to reduce computational complexity and prevent overfitting. Z-score standardization was used to identify the periodicity and trend of traffic flow on highways and expressways to analyze the coordinate points with the largest traffic flow.

[0019] For regional data sets, we extract real-time traffic conditions and road section information within a few days, including the average vehicle speed and standard deviation of each section. We extract the quantity and traffic pattern by analyzing the regional traffic flow. We extract the geometric features of the road based on the road network feature information and POI feature quantity provided in the data set to identify the shortest path between two coordinate points and the distribution of surrounding POIs, thereby determining their potential impact on traffic flow.

[0020] In a further embodiment, in step 3, the traffic prediction model is constructed by dividing the data sets into three categories due to the relatively weak correlation between the data sets and constructing a corresponding model for each category, specifically including the following:

[0021] For the T-drive vehicle trajectory dataset, the model is built from two perspectives. One perspective is the trajectory planning model, in which the map matching function of the osmnx library is called to map the GPS points to the road network, and then the landmark points are classified using K-means clustering, and the Dijkstra algorithm is used to plan the appropriate shortest path; the other perspective is trajectory prediction, which uses the LSTM network as the basis to handle the complex dependencies of time series data, so that the model inputs a small number of longitude and latitude sequences to predict the trajectory;

[0022] For the highway dataset (PeMS); an adjacency matrix is ​​constructed based on the distance and connection relationship of the sensors, and a network is constructed using GCN to capture the spatiotemporal dependencies between sensor nodes based on the traffic information stored in each node; the sensor data of each time period is used as the model input during the training process, and the model output is the predicted traffic value for the future time period;

[0023] For regional datasets; use the map matching function to map GPS points to the road network, obtain the average speed of each small road segment based on the speed relationship, and use Dijkstra to plan the shortest path and calculate the estimated time.

[0024] In a further embodiment, in step 3, the optimal path planning first uses the map matching function in the osmnx library to map the GPS points to the city's road network, and calculates the road segment closest to the GPS points, aligns the GPS points with the road network, and thus accurately maps these points to the actual road; secondly, K-means is used to cluster the 500 points so that more GPS tracks pass through these points, and these points are determined as landmark points, i.e., points that the vehicle passes when entering the area. The specific algorithm steps are:

[0025] First, randomly select the initial k points as cluster centers, with the horizontal axis being the GPS longitude and the vertical axis being the latitude; for each data point in the data set, calculate its distance to each cluster center and assign it to the nearest cluster center. The Euclidean distance calculation formula is as follows:

[0026]

[0027] Among them, x data point, c i is the i-th cluster center, d is the dimension of the data, x j and c ij are x and c respectively i The value in the jth dimension;

[0028] After the allocation is completed, the center point of each cluster is recalculated; the new cluster center is the mean of all data points in the cluster, and the calculation formula is as follows:

[0029]

[0030] Among them, S i is the set of data points of the ith cluster, |S i | is the number of data points in the set. The allocation and update steps are repeated until a certain number of iterations are completed;

[0031] Landmarks are marked and drawn on the road network. In order to make the path as short as possible, the Dijkstra algorithm is used to plan the shortest path. At the same time, the path is set to pass through landmark points as much as possible to obtain the fastest and least congested optimal path.

[0032] In a further embodiment, in step 3, traffic trajectory prediction is implemented based on LSTM, specifically including the following:

[0033] Operation of the data loader; convert the original data into sequence data for training the LSTM model. Each sequence contains 5 consecutive coordinate points for predicting the next coordinate point; use MinMaxScaler to standardize the data to the range of 0 to 1;

[0034] Hyperparameter fine-tuning: using different hyperparameter configurations during model training, including the number of units in the LSTM layer and the number of training epochs;

[0035] Model evaluation; the training data was divided into 80% training set and 20% test set to monitor the changing pattern of the loss function; the MSE and RMSE indicators were evaluated, and a continuous downward trend in the loss function was observed.

[0036] In a further embodiment, the traffic flow prediction in step 3 is based on GCN updating the representation of its own node by aggregating the information of neighboring nodes so that the neural network can capture and understand the complex dependencies between nodes; the update rule of GCN is expressed as:

[0037]

[0038] in, represents the feature representation of node i in the lth layer, N(i) is the set of neighbor nodes of node i, c ij is the normalization coefficient, W (l) is the weight matrix of the lth layer, σ is the activation function;

[0039] Hyperparameter configuration: Use Adam optimizer for training, set the learning rate to 0.03, and train the model for 30 epochs.

[0040] Model Evaluation; We evaluate MSE, RMSE, MAPE, and loss values ​​on the test machine.

[0041] In a further embodiment, in step 3, the dynamic time weight adjustment is integrated into the Dijkstra algorithm based on the regional data set; the weight is calculated using the following formula:

[0042]

[0043] Among them, w ij is the weight of the road segment from node i to node j, d ij is the length of the road segment, v ij is the average speed on the road segment.

[0044] The present invention has the following beneficial effects:

[0045] 1. Innovation and creativity; The present invention constructs a traffic prediction model, which significantly improves the accuracy of traffic flow prediction by comprehensively analyzing and processing historical GPS trajectory data as well as vehicle and road feature data. The model uses a multi-model approach of long short-term memory network (LSTM) and graph convolution network (GCN) to process complex time series data and graph structure data. The LSTM model captures long-term dependencies in time series, which is crucial for predicting dynamic changes in traffic flow. At the same time, the GCN model can update node representations by aggregating information from adjacent nodes, thereby effectively processing the topological structure of the road network. In addition, the Dijkstra algorithm is used to accurately plan the path. Considering the actual road network conditions, the algorithm can effectively calculate the optimal path for the vehicle. In addition, the path weight is dynamically adjusted to adapt to real-time traffic changes, so that the model can flexibly respond to fluctuations in traffic conditions and provide drivers with more accurate navigation suggestions. The model of the present invention is not only innovative in technology, but also has strong practicality in application. It provides strong support for intelligent transportation systems and can be used for real-time traffic navigation and path planning of autonomous driving vehicles. These application scenarios can not only improve road use efficiency and reduce traffic congestion, but also reduce vehicle emissions, which has a positive impact on environmental protection. In addition, by optimizing traffic flow, the model also helps to improve the level of intelligence in urban traffic management and provide data support for urban traffic planning and policy making, which has important social and economic value.

[0046] 2. Practicality and impact; The traffic prediction model established by the present invention has a wide range of application scenarios. First of all, the establishment of the prediction model is helpful to optimize urban traffic management, and can be used for real-time navigation of intelligent transportation systems and shortest path planning of autonomous driving vehicles, saving people's travel time and facilitating people's lives. By analyzing the vehicle GPS trajectory data in the trajectory data set, the model can effectively identify traffic congestion points and provide optimization solutions for traffic signal control. At the same time, according to the real-time traffic conditions and road network characteristics provided by the regional data set, the model can optimize the prediction results and provide more accurate route suggestions for travelers. The sensor records in the data set provide dynamic traffic data for the model, thereby enhancing its responsiveness to changes in traffic flow; the model of the present invention can be applied to this emerging technology industry to help it intelligently plan the shortest path, improve energy utilization and driving efficiency, and provide passengers with more comfortable and reliable travel services. From the potential impact of the model of the present invention, first of all, by intelligently planning the shortest path of the vehicle, the model can effectively alleviate road traffic congestion, improve people's travel efficiency, reduce vehicle exhaust emissions, thereby reducing pollution to the environment and realizing the concept of green development. Secondly, by predicting traffic conditions in real time, it can effectively improve road safety, prevent traffic accidents, and optimize overall traffic flow. In addition, the application of the model can effectively promote the development of the field of transportation technology innovation and promote the progress of related technologies such as unmanned driving and artificial intelligence. In short, this traffic prediction model not only effectively improves the efficiency and safety of the transportation system, but also contributes to environmental protection and the development of emerging technology industries, with dual social and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the trajectory planning model framework of the present invention.

[0048] Figure 2 It is a map matching schematic diagram on the road network of the present invention (the red dots are GPS points).

[0049] Figure 3 It is a schematic diagram of K-means clustering on the road network of the present invention (the blue intersection points are landmarks).

[0050] Figure 4 It is a schematic diagram of the optimal path on the road network of the present invention (the red line is the path).

[0051] Figure 5 It is a schematic diagram of LSTM traffic prediction of the present invention.

[0052] Figure 6 It is a schematic diagram of the error visualization of the LSTM of the present invention (see the yellow area).

[0053] Figure 7 It is a schematic diagram of the framework of the GCN of the present invention.

[0054] Figure 8 It is a visualization diagram of the traffic flow prediction of node 5 on the first day in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] The present invention is based on traffic flow and its trajectory optimization. With the acceleration of urbanization, traffic congestion and road complexity are becoming increasingly serious. Therefore, establishing an accurate traffic prediction model is of great practical significance for improving urban traffic and facilitating travel.

[0057] The present invention below studies four datasets: Microsoft T-Drive trajectory dataset, PeMS04 and PeMS08 datasets, and Beijing_sevenpart dataset. The datasets include GPS trajectories of more than 10,000 taxis, real-time traffic conditions for two working days, and highway traffic information.

[0058] First, through road network matching, the present invention uses K-means and Dijkstra algorithms to calculate the optimal path of the vehicle and gives a visualization effect. Then the present invention uses LSTM to predict the next point by inputting a sequence of five points and verifies its reliability in the test set. Then the model is trained and its effect is evaluated by adjusting the hyperparameters of the model. The present invention gives a visual display of the prediction effect. After that, the present invention uses GCN to analyze and predict traffic flow data, monitors the rate of change of the loss function, increases the generalization of the model by adding random seeds, and uses MSE, RMSE, MAPE and total loss to evaluate the effectiveness and reliability of the model. Finally, based on the speed data in the Beijing_sevenpart data, the average speed of each segment is inferred and assigned as a time weight. Then the Dijkstra algorithm is used to plan a variable shortest path with time weight. In summary, based on the given data set, the present invention constructs a traffic prediction model that is not only innovative in technology but also has practical significance in application. The traffic prediction model provides strong support for intelligent transportation systems by planning the shortest path for vehicles. In addition, the model can be used for real-time vehicle navigation, improve the level of intelligence in urban transportation, and has important social and economic practical value.

[0059] A traffic prediction method based on a hybrid LSTM-GCN architecture, the traffic prediction method comprising the following steps:

[0060] Step 1: Collect data sets and perform data cleaning;

[0061] Step 2: Integrate data sources by extracting features from data sets;

[0062] Step 3: Build a traffic prediction model, evaluate the model and extract the innovative points of the model; model evaluation includes: using K-means, LSTM, GCN and Dijkstra models for path planning and traffic trajectory prediction, using MSE, RMSE and MAPE evaluation indicators to evaluate the model, and proposing the innovative points of the model.

[0063] In one embodiment, the traffic prediction method performs data cleaning processing on four data sets, the data sets include: T-Drive trajectory data set, regional data set and highway (PeMS) data set; the data sets include GPS trajectories of vehicles, real-time traffic conditions on several working days and traffic flow information on highways;

[0064] The traffic prediction method first uses the K-means algorithm to cluster multiple landmark points by integrating the vehicle trajectories for the T-Drive trajectory dataset, and then uses the LSTM model to predict the next position of the vehicle, and uses the Dijkstra algorithm for path planning; then, for the regional dataset, a road network model is constructed according to the provided road coordinates, and the shortest path is planned for the vehicle according to the provided time weight; for the highway dataset (PeMS), a graph convolutional network (GCN) is used to predict and analyze the traffic flow of different sections; finally, the test dataset is used to comprehensively evaluate the final performance of the model, and multiple evaluation indicators are calculated, including root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).

[0065] In one embodiment, in step 1, the data cleaning process includes the following:

[0066] The T-Drive trajectory dataset was processed by first cleaning the data thoroughly, including removing anomalous GPS points that deviated significantly from the expected trajectory and deleting duplicate entries. Then, the GPS points were mapped onto the urban road network using the map matching function of the osmnx library and the data was integrated. Different data sources were merged into a unified CSV file for comprehensive analysis, while encoding the timestamp and geographic coordinate data elements.

[0067] The processing of the highway data set (PeMS) first cleans the data set, including filtering the noise of the data set to identify and mitigate data anomalies caused by sensor failures, and clarify outliers. Then, missing data is processed by filling the gaps in traffic data using the average of adjacent sensor data. Secondly, data integration is performed to aggregate data from multiple sensors based on geographic proximity and time alignment. When processing gaps in data input, a time series prediction model is used to fill the missing parts of sensor data. Finally, in the data encoding stage, timestamps are encoded as periodic features representing traffic patterns.

[0068] For regional data set processing, the data set is first cleaned, including noise reduction, identification and correction of erroneous or abnormal road section data; secondly, the GPS points are mapped to the road network through the map matching function of the osmnx library and the missing traffic data are processed, and the missing values ​​are estimated using the data of adjacent road sections. Finally, in the data integration stage, the road data is combined with POI, and K-means clustering analysis is used to identify locations where traffic flow is concentrated in order to analyze the relationship between traffic flow and the geographical environment.

[0069] In one embodiment, in step 2, data feature extraction extracts features from four data sets and integrates them into data sources to construct a comprehensive and accurate traffic prediction model, including the following feature engineering:

[0070] For the T-Drive trajectory dataset; firstly, feature extraction is performed on the T-drive trajectory dataset. In the dataset, hourly and weekly time features are extracted from the timestamps. At the same time, the provided vehicle ID is converted into a numerical format. The average speed and driving direction position features of the vehicle are calculated from the provided longitude and latitude coordinate points. Based on the extracted longitude and latitude dense traffic flow coordinate points, the road length and driving direction are calculated to establish a traffic prediction model.

[0071] For the highway dataset (PeMS), traffic features such as traffic flow and vehicle ID changes were extracted from the provided data through PCA, and the number of given features was reduced to reduce computational complexity and prevent overfitting. Z-score standardization was used to identify the periodicity and trend of traffic flow on highways and expressways to analyze the coordinate points with the largest traffic flow.

[0072] For regional data sets, we extract real-time traffic conditions and road section information within a few days, including the average vehicle speed and standard deviation of each section. We extract the quantity and traffic pattern by analyzing the regional traffic flow. We extract the geometric features of the road based on the road network feature information and POI feature quantity provided in the data set to identify the shortest path between two coordinate points and the distribution of surrounding POIs, thereby determining their potential impact on traffic flow.

[0073] In one embodiment, in step 3, the traffic prediction model is constructed by dividing the data sets into three categories due to the relatively weak correlation between the data sets and constructing a corresponding model for each category, specifically including the following:

[0074] For the T-drive vehicle trajectory dataset, the model is built from two perspectives. One perspective is the trajectory planning model, in which the map matching function of the osmnx library is called to map the GPS points to the road network, and then the landmark points are classified using K-means clustering, and the Dijkstra algorithm is used to plan the appropriate shortest path; the other perspective is trajectory prediction, which uses the LSTM network as the basis to handle the complex dependencies of time series data, so that the model inputs a small number of longitude and latitude sequences to predict the trajectory;

[0075] For the highway dataset (PeMS); an adjacency matrix is ​​constructed based on the distance and connection relationship of the sensors, and a network is constructed using GCN to capture the spatiotemporal dependencies between sensor nodes based on the traffic information stored in each node; the sensor data of each time period is used as the model input during the training process, and the model output is the predicted traffic value for the future time period;

[0076] For regional datasets; use the map matching function to map GPS points to the road network, obtain the average speed of each small road segment based on the speed relationship, and use Dijkstra to plan the shortest path and calculate the estimated time.

[0077] In one embodiment, in step 3, the optimal path planning first uses the map matching function in the osmnx library to map the GPS points to the city's road network, and calculates the road segment closest to the GPS points, aligns the GPS points with the road network, and thus accurately maps these points to the actual road; secondly, K-means is used to cluster 500 points so that more GPS tracks pass through these points, and these points are determined as landmark points, i.e., points that the vehicle passes when entering the area. The specific algorithm steps are as follows:

[0078] First, randomly select the initial k points as cluster centers, with the horizontal axis being the GPS longitude and the vertical axis being the latitude; for each data point in the data set, calculate its distance to each cluster center and assign it to the nearest cluster center. The Euclidean distance calculation formula is as follows:

[0079]

[0080] Among them, x data point, c i is the i-th cluster center, d is the dimension of the data, x j and c ij are x and c respectively i The value in the jth dimension;

[0081] After the allocation is completed, the center point of each cluster is recalculated; the new cluster center is the mean of all data points in the cluster, and the calculation formula is as follows:

[0082]

[0083] Among them, S i is the set of data points of the ith cluster, |S i | is the number of data points in the set. The allocation and update steps are repeated until a certain number of iterations are completed;

[0084] Landmarks are marked and drawn on the road network. In order to make the path as short as possible, the Dijkstra algorithm is used to plan the shortest path. At the same time, the path is set to pass through landmark points as much as possible to obtain the fastest and least congested optimal path.

[0085] In one embodiment, in step 3, traffic trajectory prediction is implemented based on LSTM, which specifically includes the following:

[0086] Operation of the data loader; convert the original data into sequence data for training the LSTM model. Each sequence contains 5 consecutive coordinate points for predicting the next coordinate point; use MinMaxScaler to standardize the data to the range of 0 to 1;

[0087] Hyperparameter fine-tuning: using different hyperparameter configurations during model training, including the number of units in the LSTM layer and the number of training epochs;

[0088] Model evaluation; the training data was divided into 80% training set and 20% test set to monitor the changing pattern of the loss function; the MSE and RMSE indicators were evaluated, and a continuous downward trend in the loss function was observed.

[0089] In one embodiment, the traffic flow prediction in step 3 is based on GCN updating the representation of its own node by aggregating the information of neighboring nodes so that the neural network can capture and understand the complex dependencies between nodes; the update rule of GCN is expressed as:

[0090]

[0091] in, represents the feature representation of node i in the lth layer, N(i) is the set of neighbor nodes of node i, c ij is the normalization coefficient, W (l) is the weight matrix of the lth layer, σ is the activation function;

[0092] Hyperparameter configuration: Use Adam optimizer for training, set the learning rate to 0.03, and train the model for 30 epochs.

[0093] Model Evaluation; We evaluate MSE, RMSE, MAPE, and loss values ​​on the test machine.

[0094] In one embodiment, in step 3, the dynamic time weight adjustment is integrated into the Dijkstra algorithm based on the regional data set; the weight is calculated using the following formula:

[0095]

[0096] Among them, w ij is the weight of the road segment from node i to node j, d ij is the length of the road segment, v ij is the average speed on the road segment.

[0097] Hereinafter, the feasibility and authenticity of the traffic prediction method of the present invention are specifically described based on the embodiments and the four data sets provided.

[0098] Embodiment 1:

[0099] Four data sets are provided. These data sets include the Microsoft T-Drive trajectory data set, the Beijing_sevenpart data set, and the PeMS04 and PeMS08 data sets on highways in Beijing. The data sets include the GPS trajectories of more than 10,000 taxis, the real-time traffic conditions of two working days, and the traffic flow information on highways. For the "Microsoft T-Drive trajectory data set", by integrating the trajectories of multiple taxis, the present invention uses the K-means algorithm to perform cluster analysis on multiple landmark points. After that, the present invention uses the LSTM model to predict the next position of the vehicle and uses the Dijkstra algorithm for path planning. For the "Beijing_sevenpart data set", the present invention first constructs a road network model based on the provided road coordinates, and plans the shortest path for the vehicle based on the provided time weight. For the data sets "PeMS04" and "PeMS08", the present invention uses a graph convolutional network (GCN) to predict and analyze the traffic flow of different sections. Finally, the present invention uses a test data set to comprehensively evaluate the final performance of the model and calculates a variety of evaluation indicators, including root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), etc. The stability and reliability of the model were verified, and the positive impact of the traffic prediction model on traffic management and planning was summarized as follows:

[0100] Data cleaning and integration of Beijing-Sevenpart, PeMS, and T-drive trajectory datasets.

[0101] Use K-means, LSTM, GCN and Dijkstra models for path planning and traffic flow prediction.

[0102] The model was evaluated using evaluation indicators such as MSE, RMSE, and MAPE, and the innovative points of the model were proposed.

[0103] Example 2: Data processing

[0104] Microsoft T-Drive trajectory dataset First, the data was thoroughly cleaned, including removing abnormal GPS points that deviated significantly from the expected trajectory and deleting duplicate entries. Then, the GPS points were mapped to the urban road network using the map matching function of the osmnx library to ensure the consistency of the data with the actual roads. Then the data was integrated to merge different data sources into a unified CSV file for comprehensive analysis. In addition, data elements such as timestamps and geographic coordinates were appropriately encoded to ensure data consistency.

[0105] PeMS04 and PeMS08 datasets First, the present invention cleans the dataset, mainly including noise filtering of the dataset to identify and mitigate data anomalies caused by sensor failures, while clarifying outliers. Then, missing data is processed by filling the gaps in traffic data using the average of adjacent sensor data. Next, data integration is performed to aggregate data from multiple sensors based on geographic proximity and time alignment. When processing gaps in data input, the present invention uses a time series prediction model to fill in the missing parts of sensor data. Finally, in the data encoding stage, timestamps are encoded as periodic features representing traffic patterns to better capture and represent temporal information.

[0106] Beijing_sevenpart dataset First, the present invention cleans the dataset, including noise reduction, identification and correction of erroneous or abnormal road section data. Then, using a method similar to the T-Drive dataset, the GPS points are mapped to the road network through the map matching function of the osmnx library. Next, the missing traffic data is processed and the missing values ​​are estimated using the data of adjacent road sections. Finally, in the data integration stage, the road data is combined with POI, and K-means clustering analysis is used to identify locations where traffic flow is concentrated to analyze the relationship between traffic flow and geographical environment.

[0107] Example 3: Feature Engineering

[0108] For the Microsoft T-Drive trajectory dataset, the feature extraction of the T-drive taxi trajectory dataset is first performed. In the dataset, hourly and weekly time features are extracted from the timestamp. At the same time, the provided taxi ID is converted into a numerical format to better utilize the label encoding. Then, the location features such as the average speed and driving direction of the taxi are calculated from the provided longitude and latitude coordinate points so that they can be better projected onto the corresponding Beijing road network, and the road length and driving direction are calculated based on the longitude and latitude dense traffic flow coordinate points extracted by the present invention, thereby establishing a traffic prediction model.

[0109] For the PeMS04 and PeMS08 datasets, the present invention extracts traffic features such as traffic flow and vehicle ID changes from the provided data through PCA, and reduces the number of given features to reduce computational complexity and prevent overfitting. At the same time, the present invention analyzes the time series of vehicle speed and occupancy rate, and uses Z-score standardization to identify the periodicity and trend of traffic flow on highways and expressways to analyze the coordinate points with the largest traffic flow.

[0110] For the Beijing_sevenpart dataset, the present invention extracts the real-time traffic conditions and road section information within two days, including the average vehicle speed and standard deviation of each section. After that, by analyzing the traffic flow in Beijing, the present invention extracts its quantity and traffic pattern. In addition, based on the road network feature information and POI feature quantity provided in the dataset, the present invention extracts the geometric features of the road to identify the shortest path between two coordinate points and the distribution of surrounding POIs, so as to determine their potential impact on traffic flow.

[0111] By extracting features from four data sets, the present invention successfully integrated the data sources, laying a solid foundation for the subsequent construction of a comprehensive and accurate traffic prediction model. These features cover traffic flow information from macro to micro, which helps the present invention predict actual traffic conditions from multiple aspects.

[0112] Example 4: Model development and evaluation

[0113] Since the correlation between data sets is relatively weak, the present invention divides them into three categories and builds corresponding models for each category;

[0114] For the T-drive taxi trajectory dataset, the present invention builds models from two perspectives. The first perspective is the trajectory planning model, in which the present invention calls the map matching function of the osmnx library to map GPS points to the road network. Then K-means clustering is used to classify the landmark points, and the Dijkstra algorithm is used to plan the appropriate shortest path. The other perspective is trajectory prediction. The present invention uses the LSTM network as the basis, which is able to handle the complex dependencies of time series data, allowing the model to input a small number of longitude and latitude sequences to predict the trajectory.

[0115] For the PeMS dataset, the present invention constructs an adjacency matrix based on the distance and connection relationship of the sensors, and uses GCN to build a network to capture the spatiotemporal dependencies between sensor nodes based on the traffic information stored in each node. During the training process, the present invention uses the sensor data of each time period as the model input, and the model output is the predicted traffic value of the future time period.

[0116] For the Beijing_Sevenpart dataset, the present invention uses a map matching function similar to T-drive to map GPS points onto the road network. Based on the speed relationship, the average speed of each small road segment is obtained, and Dijkstra is used to plan the shortest path and estimate the estimated time. Unlike T-drive, the present invention not only considers the distance of the path, but also dynamically adjusts the weight of each road based on historical and current speed data to facilitate path planning under different road conditions.

[0117] Example 4-1: Optimal Path Planning

[0118] Figure 1 The basic structure of the trajectory planning model of the present invention is shown. Although the original GPS data in the T-drive dataset records the driving path of the vehicle, due to the accuracy of the GPS signal, these points cannot accurately reflect the road where the vehicle actually travels. To eliminate this deviation, the present invention uses the map matching function in the osmnx library to map the GPS points to the city's road network, calculate the road segment closest to the GPS points, align the GPS points with the road network, and thus accurately map these points to the actual road ( Figure 2 ). Next, the present invention uses K-means to cluster the 500 points so that more GPS trajectories can pass through these points. The present invention determines these points as landmark points, that is, the points that taxi drivers pass when entering the area. Since taxi drivers are more aware of whether the road is congested and whether they can reach the destination faster, their trajectories are often the fastest, shortest, and least congested routes. The following are the specific algorithm steps of K-means: First, randomly select the initial k points as cluster centers, with the horizontal axis being the longitude of the GPS and the vertical axis being the latitude, such as Figure 1For each data point in the data set, the distance to each cluster center is calculated and assigned to the nearest cluster center. The present invention uses the following formula to calculate its Euclidean distance (as explained above and will not be repeated here). The present invention marks the landmarks in blue and draws them on the road network, as shown in Figure 3 As shown. In order to make the path as short as possible, the present invention uses the Dijkstra algorithm to plan the shortest path, and at the same time sets the path to pass through landmark points as much as possible. The path planned in this way is the fastest and least congested path. The following is the pseudo code of the Dijkstra algorithm, in the weighted graph G = (V, E), where V is the vertex set and E is the edge set. The weight weight(u,v) of each edge (u,v)∈E is a non-negative value, which represents the distance between node u and node v.

[0119]

[0120] On this basis, the present invention conducted an experiment, inputting arbitrary longitude and latitude coordinates of the starting point and the end point, and the algorithm can plan the optimal path, such as Figure 4 shown.

[0121] Example 4-2: Traffic trajectory prediction based on LSTM

[0122] This paper will demonstrate a solution for traffic trajectory prediction based on LSTM ( Figure 5 ); When discussing the trajectory prediction problem of time series data, the present invention selects LSTM (Long Short-Term Memory Network) as the core algorithm. LSTM is an advanced recurrent neural network (RNN) architecture that can effectively process time-dependent data and predict future events. Compared with traditional RNN, LSTM significantly improves the ability to capture long-term dependencies through its unique gating mechanism, effectively solving the gradient vanishing problem encountered by traditional RNN in long sequence learning, and therefore has been widely used in the field of time series analysis.

[0123] Data loader operation:

[0124] (1) To train the LSTM model, the present invention converts the original data into sequence data. Each sequence contains 5 consecutive coordinate points for predicting the next coordinate point.

[0125] (2) Due to the LSTM’s sensitivity to scaling of input data, the present invention uses MinMaxScaler to normalize the data to the range of 0 to 1.

[0126] Hyperparameter fine-tuning:

[0127] During the model training process, the author tried different hyperparameter configurations, including the number of units in the LSTM layer and the number of epochs for training. Finally, 50 units and 5 epochs were selected, and the rationality of the hyperparameter configuration was verified in the test set.

[0128] Model Evaluation:

[0129] To ensure the generalization ability of the model, the present invention needs to ensure that the test set contains data that has not participated in the training. Therefore, the present invention divides the training data into 80% training set and 20% test set to monitor the change pattern of the loss function. The present invention evaluates the MSE and RMSE indicators and observes a continuous downward trend of the loss function in the experiment.

[0130] Table 1: Evaluation metrics of LSTM

[0131]

[0132] Figure 6 Visualization and error graph of predicted and actual points are shown. Since the longitude range is between 39-41, the yellow area is the accurate point. It can be observed that most of the predicted points coincide with the actual points, which proves the strong robustness of the model.

[0133] Example 4-3: Traffic flow prediction based on GCN

[0134] Figure 7 is the structure of the GCN model. GCN (Graph Convolutional Network) is an advanced neural network architecture designed specifically for processing graph structured data. Its core advantage is to update the representation of its own nodes by aggregating the information of neighboring nodes. This process enables the neural network to capture and understand the complex dependencies between nodes. The update rule of GCN can be expressed as (explained above, not repeated here);

[0135] Hyperparameter configuration:

[0136] The present invention uses the Adam optimizer for training, and the learning rate is set to 0.03. The model is trained for 30 epochs. To ensure the repeatability of the experiment, the present invention uses the same random seed in all experiments.

[0137] Model Evaluation:

[0138] The present invention evaluates MSE, RMSE, MAPE and loss value on the test machine. During the experiment, it was found that all four indicators decreased significantly, indicating that the model of the present invention is reasonable in predicting traffic flow. Table 1 gives the results of 30 epochs.

[0139] Table 2: Evaluation metrics of GCN

[0140]

[0141] Prediction Visualization:

[0142] The present invention visualizes the one-day prediction performance of node 5, where the horizontal axis and vertical axis represent time (5-minute intervals) and traffic flow ( Figure 8 ). As you can see, the model’s predictive performance is excellent and it can clearly predict future trends.

[0143] Example 4-4: Dynamic time weight adjustment

[0144] According to the beijing_sevenpart dataset, the present invention can integrate speed-based dynamic weight adjustment into the Dijkstra algorithm. The following is the pseudo code for weight adjustment:

[0145]

[0146] In this article, the present invention constructs a traffic prediction model, which significantly improves the accuracy of traffic flow prediction by comprehensively analyzing and processing historical GPS trajectory data and Beijing taxi and road feature data. The model of the present invention adopts a multi-model method of long short-term memory network (LSTM) and graph convolution network (GCN) to process complex time series data and graph structure data. The LSTM model captures long-term dependencies in time series, which is crucial for predicting the dynamic changes of traffic flow. At the same time, the GCN model can update the node representation by aggregating the information of adjacent nodes, thereby effectively processing the topological structure of the road network. In addition, the present invention uses the Dijkstra algorithm to accurately plan the path. Considering the actual road network situation, the algorithm can effectively calculate the optimal path of the vehicle. In addition, the present invention dynamically adjusts the path weight to adapt to real-time traffic changes, so that the model can flexibly respond to traffic condition fluctuations and provide more accurate navigation suggestions for drivers. The model of the present invention is not only innovative in technology, but also has strong practicality in application. It provides strong support for intelligent transportation systems and can be used for real-time traffic navigation and path planning of autonomous driving vehicles. These application scenarios can not only improve road use efficiency and reduce traffic congestion, but also reduce vehicle emissions, which has positive significance for environmental protection. In addition, by optimizing traffic flow, the model of the present invention also helps to improve the level of intelligence in urban traffic management and provide data support for urban traffic planning and policy formulation, which has important social and economic value.

[0147] The traffic prediction model established by the present invention has a wide range of application scenarios. First of all, the establishment of the prediction model helps to optimize urban traffic management, and can be used for real-time navigation of intelligent transportation systems and shortest path planning of autonomous driving vehicles, saving people's travel time and facilitating people's lives. By analyzing the GPS trajectory data of Beijing taxis in the "Microsoft T-Drive trajectory dataset", the model can effectively identify traffic congestion points and provide optimization solutions for traffic signal control. At the same time, according to the real-time traffic conditions and road network characteristics provided by the "Beijing_sevenpart dataset", the model can optimize the prediction results and provide more accurate route suggestions for travelers. The sensor records in the "PeMS04" and "PeMS08" datasets provide the model with dynamic traffic data, thereby enhancing its responsiveness to changes in traffic flow. I think the first application scenario of the model can be today's "ApolloGo" driverless car. The model can be applied to this emerging technology industry to help it intelligently plan the shortest path, improve energy utilization and driving efficiency, and provide passengers with more comfortable and reliable travel services, thereby helping companies gain advantages in the highly competitive autonomous driving market. From the perspective of the potential impact of the model, firstly, by intelligently planning the shortest path for vehicles, the model can effectively alleviate road traffic congestion, improve people's travel efficiency, reduce vehicle exhaust emissions, thereby reducing pollution to the environment and realizing the concept of green development. Secondly, by predicting traffic conditions in real time, it can effectively improve road safety, prevent traffic accidents, and optimize overall traffic flow. In addition, the application of this model can effectively promote the development of the field of transportation technology innovation and promote the progress of related technologies such as unmanned driving and artificial intelligence. In short, this traffic prediction model not only effectively improves the efficiency and safety of the transportation system, but also contributes to environmental protection and the development of emerging technology industries, with dual social and economic benefits.

[0148] In the present invention, the present invention preprocesses the Beijing-Sevenpart, PEMS and T-drive trajectory data sets. Through data cleaning, integration and feature engineering, a solid data foundation is provided for the model. On this basis, the present invention successfully develops a traffic prediction model based on LSTM and GCN. The LSTM network effectively captures the dynamic changes and long-term dependencies of traffic flow by virtue of its excellent time series analysis capabilities. At the same time, the GCN model improves the accuracy of traffic flow change prediction by analyzing the topological structure of the road network. In addition, the present invention optimizes the Dijkstra algorithm through dynamic weight adjustment so that path planning can adapt to real-time traffic conditions, further improving the practicality of the model. The model of the present invention has been verified on multiple data sets, and the results show that it exhibits high accuracy and reliability in traffic flow prediction and path planning. This achievement not only realizes technological innovation, but also demonstrates its great potential and value in practical applications. The results of the present invention are of great significance for improving the level of intelligence of urban transportation systems. Through traffic prediction and path planning, the model of the present invention can provide strong support for urban traffic management.

[0149] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. Traffic prediction method based on hybrid LSTM-GCN architecture, characterized by: The traffic prediction method comprises the following steps: Step 1: Collect data sets and perform data cleaning; Step 2: Integrate data sources by extracting features from data sets; Step 3: Build a traffic prediction model, evaluate the model and extract the innovative points of the model; model evaluation includes: using K-means, LSTM, GCN and Dijkstra models for path planning and traffic trajectory prediction, using MSE, RMSE and MAPE evaluation indicators to evaluate the model, and proposing the innovative points of the model.

2. A traffic prediction method based on a hybrid LSTM-GCN architecture according to claim 1, characterized in that: The traffic prediction method performs data cleaning on four data sets, including: T-Drive trajectory data set, regional data set and highway (PeMS) data set; the data set includes GPS trajectory of vehicles, real-time traffic conditions of several working days and traffic flow information on highways; The traffic prediction method first uses the K-means algorithm to cluster multiple landmark points by integrating the vehicle trajectories for the T-Drive trajectory dataset, and then uses the LSTM model to predict the next position of the vehicle, and uses the Dijkstra algorithm for path planning; then, for the regional dataset, a road network model is constructed according to the provided road coordinates, and the shortest path is planned for the vehicle according to the provided time weight; for the highway dataset (PeMS), a graph convolutional network (GCN) is used to predict and analyze the traffic flow of different sections; finally, the test dataset is used to comprehensively evaluate the final performance of the model, and multiple evaluation indicators are calculated, including root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).

3. A traffic prediction method based on a hybrid LSTM-GCN architecture according to claim 2, characterized in that: In step 1, the data cleaning process includes the following: The T-Drive trajectory dataset was processed by first cleaning the data thoroughly, including removing anomalous GPS points that deviated significantly from the expected trajectory and deleting duplicate entries. Then, the GPS points were mapped onto the urban road network using the map matching function of the osmnx library and the data was integrated. Different data sources were merged into a unified CSV file for comprehensive analysis, while encoding the timestamp and geographic coordinate data elements. The processing of the highway data set (PeMS) first cleans the data set, including filtering the noise of the data set to identify and mitigate data anomalies caused by sensor failures, and clarify outliers. Then, missing data is processed by filling the gaps in traffic data using the average of adjacent sensor data. Secondly, data integration is performed to aggregate data from multiple sensors based on geographic proximity and time alignment. When processing gaps in data input, a time series prediction model is used to fill the missing parts of sensor data. Finally, in the data encoding stage, timestamps are encoded as periodic features representing traffic patterns. For regional data set processing, the data set is first cleaned, including noise reduction, identification and correction of erroneous or abnormal road section data; secondly, the GPS points are mapped to the road network through the map matching function of the osmnx library and the missing traffic data are processed, and the missing values ​​are estimated using the data of adjacent road sections. Finally, in the data integration stage, the road data is combined with POI, and K-means clustering analysis is used to identify locations where traffic flow is concentrated in order to analyze the relationship between traffic flow and the geographical environment.

4. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 2 is characterized in that: In step 2, data feature extraction extracts features from four datasets and integrates them into data sources to build a comprehensive and accurate traffic prediction model, including the following feature engineering: For the T-Drive trajectory dataset; firstly, feature extraction is performed on the T-drive trajectory dataset. In the dataset, hourly and weekly time features are extracted from the timestamps. At the same time, the provided vehicle ID is converted into a numerical format. The average speed and driving direction position features of the vehicle are calculated from the provided longitude and latitude coordinate points. Based on the extracted longitude and latitude dense traffic flow coordinate points, the road length and driving direction are calculated to establish a traffic prediction model. For the highway dataset (PeMS), traffic features such as traffic flow and vehicle ID changes were extracted from the provided data through PCA, and the number of given features was reduced to reduce computational complexity and prevent overfitting. Z-score standardization was used to identify the periodicity and trend of traffic flow on highways and expressways to analyze the coordinate points with the largest traffic flow. For regional data sets, we extract real-time traffic conditions and road section information within a few days, including the average vehicle speed and standard deviation of each section. We extract the quantity and traffic pattern by analyzing the regional traffic flow. We extract the geometric features of the road based on the road network feature information and POI feature quantity provided in the data set to identify the shortest path between two coordinate points and the distribution of surrounding POIs, thereby determining their potential impact on traffic flow.

5. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 2 is characterized in that: In step 3, the traffic prediction model is constructed. Since the correlation between the data sets is relatively weak, they are divided into three categories and corresponding models are constructed for each category, including the following: For the T-drive vehicle trajectory dataset, the model is built from two perspectives. One perspective is the trajectory planning model, in which the map matching function of the osmnx library is called to map the GPS points to the road network, and then the landmark points are classified using K-means clustering, and the Dijkstra algorithm is used to plan the appropriate shortest path; the other perspective is trajectory prediction, which uses the LSTM network as the basis to handle the complex dependencies of time series data, so that the model inputs a small number of longitude and latitude sequences to predict the trajectory; For the highway dataset (PeMS), an adjacency matrix is ​​constructed based on the distance and connectivity of sensors, and a network is constructed using GCN to capture the spatiotemporal dependencies between sensor nodes based on the traffic information stored in each node. During the training process, the sensor data of each time period is used as the model input, and the model output is the predicted traffic value for the future time period; For regional datasets; use the map matching function to map GPS points to the road network, obtain the average speed of each small road segment based on the speed relationship, and use Dijkstra to plan the shortest path and calculate the estimated time.

6. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 5 is characterized in that: In step 3, the optimal path planning first uses the map matching function in the osmnx library to map the GPS points to the city's road network, calculates the road segment closest to the GPS points, aligns the GPS points with the road network, and accurately maps these points to the actual road; secondly, K-means is used to cluster the 500 points so that more GPS tracks pass through these points, and these points are determined as landmark points, that is, the points that the vehicle passes when entering the area. The specific algorithm steps are: First, randomly select the initial k points as cluster centers, with the horizontal axis being the GPS longitude and the vertical axis being the latitude; for each data point in the data set, calculate its distance to each cluster center and assign it to the nearest cluster center. The Euclidean distance calculation formula is as follows: Among them, x data point, c i is the i-th cluster center, d is the dimension of the data, x j and c ij are x and c respectively i The value in the jth dimension; After the allocation is completed, the center point of each cluster is recalculated; the new cluster center is the mean of all data points in the cluster, and the calculation formula is as follows: Among them, S i is the set of data points of the ith cluster, |S i | is the number of data points in the set. The allocation and update steps are repeated until a certain number of iterations are completed; Landmarks are marked and drawn on the road network. In order to make the path as short as possible, the Dijkstra algorithm is used to plan the shortest path. At the same time, the path is set to pass through landmark points as much as possible to obtain the fastest and least congested optimal path.

7. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 5 is characterized in that: In step 3, traffic trajectory prediction is implemented based on LSTM, which includes the following: Operation of the data loader; convert the original data into sequence data for training the LSTM model. Each sequence contains 5 consecutive coordinate points for predicting the next coordinate point; use MinMaxScaler to standardize the data to the range of 0 to 1; Hyperparameter fine-tuning; Use different hyperparameter configurations during model training, including the number of units in the LSTM layer and the number of epochs for training; Model evaluation; The training data was divided into 80% training set and 20% test set to monitor the changing pattern of the loss function; the MSE and RMSE indicators were evaluated, and a continuous downward trend of the loss function was observed.

8. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 5 is characterized in that: The traffic flow prediction in step 3 is based on GCN updating the representation of its own nodes by aggregating the information of neighboring nodes so that the neural network can capture and understand the complex dependencies between nodes; the update rule of GCN is expressed as: in, represents the feature representation of node i in the lth layer, N(i) is the set of neighbor nodes of node i, c ij is the normalization coefficient, W (l) is the weight matrix of the lth layer, σ is the activation function; Hyperparameter configuration: Use Adam optimizer for training, set learning rate to 0.03, and train the model for 30 epochs. Model Evaluation; We evaluate MSE, RMSE, MAPE, and loss values ​​on the test machine.

9. The traffic prediction method based on the hybrid LSTM-GCN architecture according to claim 5 is characterized in that: In step 3, dynamic time weight adjustment is integrated into the Dijkstra algorithm based on the regional data set; the weight is calculated using the following formula: Among them, w ij is the weight of the road segment from node i to node j, d ij is the length of the road segment, v ij is the average speed on the road segment.

Citation Information

Cited By

  • Intelligent positioning method and system based on Internet of Things

    CN120812521A

  • Maintenance service green path real-time planning method for urban complex road network

    CN120851327A

  • A green path real-time planning method for maintenance service of a complex urban road network

    CN120851327B

  • Traffic flow prediction method based on deep learning and multi-scale clustering unit

    CN122073077A