Traffic state prediction method and system based on deep learning

By using a deep learning-based traffic condition prediction method, a grid map of the traffic condition prediction space is obtained and divided. A model is built by combining historical and real-time data, which solves the problem that existing technologies cannot accurately predict traffic conditions in real time. This enables accurate, real-time, and intuitive prediction of traffic conditions, supporting traffic management decisions.

CN117037490BActive Publication Date: 2026-04-24INTELLIGENT INTER CONNECTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INTELLIGENT INTER CONNECTION TECH CO LTD
Filing Date
2023-08-11
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies cannot accurately predict traffic conditions in real time, making it difficult for traffic management departments to effectively alleviate and prevent traffic congestion.

Method used

Using a deep learning-based approach, a top-down view of the traffic condition prediction space is obtained and divided into a grid. Historical traffic data is acquired through an interactive traffic control center to build a traffic condition prediction model. Real-time traffic data is collected and input into the model for prediction, and the results are displayed on the map using color shades.

Benefits of technology

It enables accurate, real-time, and intuitive prediction of traffic conditions, providing decision support for traffic management departments and improving the efficiency and effectiveness of traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117037490B_ABST
    Figure CN117037490B_ABST
Patent Text Reader

Abstract

The application discloses a traffic state prediction method and system based on deep learning, and belongs to the field of intelligent traffic, wherein the method comprises the following steps: obtaining an overhead view of a traffic state prediction space, and dividing the overhead view into an M-row and N-column grid map; interacting with a traffic control center, obtaining historical traffic data of the traffic state prediction space, and combining the grid map to obtain a historical traffic jam atlas; based on the historical traffic jam atlas, constructing a traffic state prediction model; collecting traffic state data of each grid to obtain real-time traffic data; obtaining a real-time traffic map according to the real-time traffic data and the grid map, and inputting the real-time traffic map into the traffic state prediction model to obtain a traffic state prediction result, and displaying the traffic jam state of the traffic state prediction space on a map by color depth. The application solves the technical problem that the traffic state cannot be intuitively and accurately predicted in the prior art, and achieves the technical effect that the traffic state can be accurately, timely and intuitively predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation, specifically to a traffic state prediction method and system based on deep learning. Background Technology

[0002] With traffic congestion becoming increasingly severe, accurate traffic condition prediction has become crucial to help traffic management departments make timely decisions and alleviate and prevent traffic congestion. Currently, traffic condition prediction methods mainly include rule-based methods and machine learning-based methods, but both of these methods struggle to achieve accurate and practical traffic condition predictions. Summary of the Invention

[0003] This application provides a traffic state prediction method and system based on deep learning, aiming to solve the technical problem that existing technologies cannot predict traffic states intuitively and accurately.

[0004] In view of the above problems, this application provides a traffic state prediction method and system based on deep learning.

[0005] The first aspect disclosed in this application provides a traffic state prediction method based on deep learning. This method includes: acquiring a top-down view of the traffic state prediction space; dividing the top-down view into a grid map with M rows and N columns, where the traffic state prediction space is a road intersection space, and the grid map contains X grids, X = M * N; interacting with a traffic control center to acquire historical traffic data of the traffic state prediction space; acquiring a historical traffic congestion atlas based on the historical traffic data and the grid map; constructing a traffic state prediction model based on the historical traffic congestion atlas; acquiring real-time traffic data by collecting traffic state data from each grid in real time using a data acquisition device; acquiring a real-time traffic map based on the real-time traffic data and the grid map; inputting the real-time traffic map into the traffic state prediction model to obtain the traffic state prediction result; and displaying the traffic congestion status of the traffic state prediction space on a map using varying color intensity.

[0006] Another aspect of this application discloses a deep learning-based traffic state prediction system, which includes: a spatial grid division module for acquiring a top-down view of the traffic state prediction space and dividing the top-down view into a grid diagram with M rows and N columns, wherein the traffic state prediction space is a road intersection space, and the grid diagram contains X grids, X = M * N; a historical data acquisition module for interacting with a traffic command center to acquire historical traffic data of the traffic state prediction space; a congestion atlas acquisition module for acquiring a historical traffic congestion atlas based on historical traffic data and the grid diagram; a prediction model construction module for constructing a traffic state prediction model based on the historical traffic congestion atlas; a real-time data acquisition module for acquiring real-time traffic state data of each grid through a data acquisition device; a real-time traffic map module for acquiring a real-time traffic map based on real-time traffic data and the grid diagram; and a traffic prediction display module for inputting the real-time traffic map into the traffic state prediction model, acquiring the traffic state prediction result, and displaying the traffic congestion status of the traffic state prediction space on a map using color intensity.

[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0008] This technical solution addresses the technical problem of existing technologies failing to provide intuitive and accurate traffic condition prediction. It employs a method that first acquires a top-down view of the traffic condition prediction space and divides it into an M-row, N-column grid; then interacts with the traffic control center to obtain historical traffic data; based on this historical traffic data and the grid map, it obtains a historical traffic congestion set; and constructs a traffic condition prediction model based on this set. Real-time traffic data from each grid is collected and input into the prediction model. The traffic condition prediction model automatically captures traffic congestion patterns based on historical learning, and combined with real-time input, predicts traffic conditions, displaying the prediction results intuitively on a map using color. This provides support for traffic management decision-making and solves the technical problem of existing technologies being unable to predict traffic conditions intuitively and accurately, achieving the technical effect of accurate, real-time, and intuitive traffic condition prediction.

[0009] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0010] Figure 1 A possible flowchart of a traffic state prediction method based on deep learning is provided for embodiments of this application;

[0011] Figure 2 This application provides a schematic diagram of a possible process for obtaining historical traffic data in a traffic state prediction method based on deep learning.

[0012] Figure 3 This application provides a schematic diagram of a possible process for obtaining historical traffic congestion atlases in a traffic state prediction method based on deep learning;

[0013] Figure 4 This application provides a schematic diagram of a possible structure for a traffic state prediction system based on deep learning.

[0014] Figure labeling: Spatial grid division module 11, historical data acquisition module 12, congestion atlas acquisition module 13, prediction model construction module 14, real-time data acquisition module 15, real-time traffic map module 16, traffic prediction display module 17. Detailed Implementation

[0015] The overall concept of the technical solution provided in this application is as follows:

[0016] This application provides a traffic state prediction method and system based on deep learning. A top-down view of the traffic state prediction area is obtained and divided into a grid. Historical traffic data is obtained through interaction with a traffic control center. Based on a large amount of historical traffic data and the grid map, a deep learning model is constructed. The model is trained to automatically learn complex traffic flow and congestion patterns within the area. During prediction, traffic data from each grid is acquired in real time through a data acquisition device and input into the deep learning model. The deep learning model, based on historical learning, automatically analyzes real-time traffic data and predicts the traffic state for the current and future periods. Finally, the prediction results are displayed on a map using intuitive colors to support decision-making by traffic management departments.

[0017] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0018] Example 1

[0019] like Figure 1 As shown in the embodiments of this application, a traffic state prediction method based on deep learning is provided, the method comprising:

[0020] Step S100: Obtain a top view of the traffic state prediction space, and divide the top view into a grid diagram with M rows and N columns, wherein the traffic state prediction space is a road intersection space, and the grid diagram contains X grids, X = M * N;

[0021] Specifically, the traffic state prediction space is the road intersection area. To facilitate modeling and displaying the prediction results, a top-down view of this space is obtained, i.e., an image viewed vertically from above. This top-down view reflects the road structure and shape of the space. The obtained top-down view is further divided into an M-row, N-column grid, with each grid representing a region within the space. The grid contains X = M*N grids, each with unique row and column coordinates to represent its position in space.

[0022] First, map service interfaces, such as Baidu Maps, Gaode Maps, and Tencent Maps, are invoked, providing the latitude and longitude range of the prediction area to download digital map data for that area, obtaining road structure and image information. Second, road vector data within the prediction area is extracted from the digital map, constructing the area's bounding rectangle or other polygonal outline. This outline reflects the extent and shape of the prediction area. Then, based on the obtained area outline, a matching raster map is generated on the digital map, with each raster representing a region. Next, the centerline vector data of the main roads within the prediction area is extracted from the digital map, and a road network topology is constructed. Based on the road centerlines and the raster map, the prediction area is divided into an M-row, N-column grid, with each grid assigned a unique row and column number as an ID, representing its spatial location. A spatial index is constructed based on the grid IDs for quickly finding the grid containing a specific geographic coordinate or road segment. The generated grid IDs, road centerlines, and other data are visualized on the digital map, displaying the final grid map and providing spatial basis for model construction and prediction result presentation.

[0023] Step S200: Interact with the traffic command center to obtain historical traffic data of the traffic state prediction space;

[0024] Specifically, the system queries the data service interface opened by the traffic control center. Based on the API, it calls the relevant API, inputting the latitude and longitude range and time range of the prediction area to obtain raw traffic flow, speed, and other data. The raw data obtained from the interface is cleaned, filtering out invalid and abnormal data to ensure data quality. Simultaneously, the raw data is structured and organized into a three-dimensional dataset with date, time, and grid as dimensions. Next, the cleaned raw data is converted into discrete states of each grid at different times, such as congestion, slow traffic, and smooth flow. Finally, the discretized and normalized data is arranged in chronological order to form a sequence of state changes for each grid from morning to night, constituting historical traffic data.

[0025] By interacting with the traffic control center, historical traffic data for a certain period of time in the prediction area was obtained, reflecting the spatiotemporal changes in traffic conditions in the area. This provided samples for model training and is an important input and foundation for realizing traffic condition prediction.

[0026] Step S300: Obtain a historical traffic congestion atlas based on the historical traffic data and the grid map;

[0027] Specifically, historical traffic data reflects the changes in traffic conditions across various grids within a predicted area over a certain period. Based on this data, a historical traffic congestion map is generated for that area at a given time. The historical traffic congestion atlas is a collection of traffic congestion maps from multiple historical moments.

[0028] Heatmaps are generated based on historical traffic data at different times, with heat values ​​corresponding to the traffic status of each grid. Grids in a congested state have the highest heat values, indicating severe congestion; grids in a free-flowing state have the lowest heat values. By integrating heatmaps from multiple times, a historical traffic congestion atlas is formed, converting non-image-format historical traffic data into an intuitive heatmap format, thus achieving data format conversion.

[0029] By using heat mapping technology, traffic congestion maps at multiple times are generated on a grid map based on historical traffic data. These maps are then integrated into a historical traffic congestion atlas, achieving data format conversion and providing intuitive prediction samples and references, thus laying the foundation for model training and result visualization.

[0030] Step S400: Based on the historical traffic congestion atlas, construct a traffic state prediction model;

[0031] Specifically, first, a convolutional neural network model, such as VGG16, ResNet34, or Inception V3, is selected as the deep learning model architecture as the base model structure. Second, the historical traffic congestion image set is divided, with 70%-80% of the data used as the training set for model training, and the remainder used as the test set to evaluate model performance. Then, labels are defined for each sample image based on traffic status, such as congestion, slow traffic, and smooth traffic. Next, according to the selected model architecture, the network layers are defined, including an input layer, convolutional layers, pooling layers, fully connected layers, and an output layer. The input layer receives sample images, and the output layer outputs three types of prediction results. Simultaneously, a loss function, such as cross-entropy loss, and an optimizer, such as Adam or RMSprop, are selected, and the model is compiled. Then, the training set is input into the model, and the network weights are continuously updated using the backpropagation algorithm, gradually bringing the model's predictions on the training set closer to the label values, thus reducing the loss function value. After each training step, the model is input into the test set, and metrics such as accuracy, recall, and F1-score are calculated to evaluate model performance. Training is complete when the model's performance metrics on the training and test sets meet the preset requirements.

[0032] A traffic condition prediction model is built using deep learning technology. Historical traffic congestion maps are used as samples to train a convolutional neural network, ultimately resulting in a model that can predict real-time inputs, thus achieving intelligent prediction of traffic conditions.

[0033] Step S500: Collect traffic status data of each grid in real time through the data acquisition device to obtain real-time traffic data;

[0034] Specifically, real-time traffic data predicts the traffic status of each grid within a given area at the current moment, including information such as current traffic flow and speed. Data acquisition devices typically include cameras and sensors. Cameras capture traffic image information within the area, while sensors detect information such as the number and speed of vehicles on the road.

[0035] First, data acquisition devices such as cameras and radars are installed on major roads and intersections within the prediction area to monitor vehicles and roads in real time. Then, the monitoring data is preprocessed to remove invalid and abnormal data, and the data is structured to generate traffic status data for each grid at the current moment, serving as real-time traffic data.

[0036] Real-time traffic data for the current moment within the prediction area is acquired through data acquisition devices, reflecting the real-time traffic status of each grid within the area and providing input for real-time traffic status prediction.

[0037] Step S600: Obtain a real-time traffic map based on the real-time traffic data and the grid map;

[0038] Specifically, real-time traffic data refers to the traffic status data of each grid obtained through data acquisition devices at the current moment, including information such as current traffic flow and speed. A real-time traffic map is a visualization of the current traffic situation obtained by mapping and encoding real-time traffic data onto a grid map.

[0039] First, the current traffic status of each grid is determined based on real-time traffic data, such as congestion, slow traffic, or smooth flow. Then, the location and extent of each grid on the map are defined according to the grid map, with each grid corresponding to a region within the prediction area. Next, the traffic status of each grid is coded using color, such as red for congestion, yellow for slow traffic, and green for smooth flow. On the grid map, each grid is filled with a color block corresponding to its traffic status, generating the original map of real-time traffic conditions. Finally, the original map is smoothed and optimized to remove spikes, resulting in the final real-time traffic map. This map visually displays the current traffic status of each grid and is used to determine the traffic conditions and congestion hotspots within the region.

[0040] By mapping real-time traffic status data onto a grid map and using color coding for status, a clear and intuitive real-time traffic map is generated, realizing the transformation of data into charts and providing input content for traffic status prediction models.

[0041] Step S700: Input the real-time traffic map into the traffic state prediction model, obtain the traffic state prediction results, and display the traffic congestion status of the traffic state prediction space on the map using color depth.

[0042] Specifically, real-time traffic maps are input into a traffic state prediction model to obtain prediction results, which are then displayed on a map using colors to indicate the traffic congestion situation within the predicted area for a certain period in the future. The traffic state prediction model is built using deep learning methods and trained with a large amount of historical traffic data samples. This model analyzes the input real-time traffic map and predicts the traffic state of each grid within the area based on the periodic patterns of traffic state changes learned by the model, thereby predicting the traffic congestion situation within the area in the short term. The prediction results are displayed on the map using varying shades of color, with darker colors indicating more severe congestion. This display allows traffic management departments and the public to intuitively understand the traffic conditions of each road segment within the predicted area for a certain period in the future, enabling them to make overall judgments and travel decisions.

[0043] First, the real-time traffic map is input into a deep learning model for inference and prediction, obtaining the traffic state distribution of each grid within the prediction period, which serves as the prediction result. Then, based on the prediction result, a prediction confidence value between 0 and 1 is assigned to each grid; a higher confidence value indicates a more accurate prediction. Next, based on the grid map, the location and extent of each grid on the map are determined. Each grid's predicted state is then encoded using color intensity, with dark red representing high congestion and white representing complete free flow. Third, on the grid map, each grid is filled with a color block corresponding to its predicted state, while considering its confidence value, generating a predicted traffic map for a certain future time period. This map visually displays the traffic congestion prediction for each grid within the prediction period. Finally, the predicted traffic map is visualized and overlaid on a digital map, clearly and intuitively showing the traffic conditions of the predicted area in the short term. Traffic management departments can use this information to determine future traffic trends and congestion hotspots within the area, making traffic management decisions and developing emergency plans.

[0044] By inputting real-time traffic maps into a trained deep learning prediction model, the prediction results and confidence levels of traffic conditions for each grid within a certain period of time are obtained. Then, color mapping is performed on the grid map to generate a predicted traffic map for the prediction period, which is then visualized on a digital map. This achieves short-term prediction of traffic conditions, and the prediction results are intuitive and accurate, providing a basis and judgment for traffic management decisions.

[0045] Furthermore, such as Figure 2 As shown, embodiments of this application also include:

[0046] Step S210: Interact with the sensing devices of the traffic command center in the traffic state prediction space;

[0047] Step S220: According to the preset sampling frequency, the traffic state data of the traffic state prediction space is sampled by the sensing device to obtain the spatial traffic flow and average vehicle speed at each sampling time, as the original traffic state dataset;

[0048] Step S230: Discretize the original traffic state dataset, calculate the state of each grid at each sampling time, and form a grid state time series;

[0049] Step S240: Generate historical traffic data based on the obtained grid state time series.

[0050] Specifically, sensing devices, including cameras and radar, are used to detect information such as vehicle flow and speed on the road, and to monitor traffic conditions in the prediction area in real time. Interactive sensing devices can acquire raw traffic state data within a certain period of time in the area, providing a basis for generating historical traffic data. Then, according to a preset sampling frequency, raw traffic state data within the prediction area is collected through connected sensing devices, including information such as traffic flow and average speed of each grid at a certain sampling time. Based on the sampling frequency, raw traffic state data at multiple times can be obtained, forming a raw traffic state dataset. Next, the data in the raw traffic state dataset is discretized, and the traffic state corresponding to each grid at each sampling time is calculated to generate a grid state time series. Discretization converts continuous raw data into discrete states, such as three states: congestion, slow traffic, and smooth traffic. The grid state time series contains the state changes of each grid from morning to night. Finally, historical traffic data is generated based on the grid state time series. Historical traffic data is grid-based, containing information on the state changes of each grid within a certain historical period, reflecting the historical traffic conditions and patterns within the prediction area.

[0051] By interacting with the traffic control center, connecting to the sensing devices deployed in the prediction area, and collecting data according to a preset frequency, the collected data is cleaned and structured, discretized into specified states, and finally generated historical traffic data in grid and time dimensions, providing samples for training the traffic state prediction model.

[0052] Furthermore, such as Figure 3 As shown, embodiments of this application also include:

[0053] Step S310: Sort the historical traffic data in chronological order to obtain a historical time-series traffic dataset;

[0054] Step S320: Obtain the time series table of the historical time series traffic dataset, traverse the time series table, and obtain the first time and the historical data of the first time.

[0055] Step S330: Map the historical data of the first moment onto the grid map using heat mapping to obtain the first historical traffic congestion map;

[0056] Step S340: Add the first historical traffic congestion map to the historical traffic congestion map set.

[0057] Specifically, historical traffic data includes traffic status information for each grid within a certain historical period in the prediction area. This data is sorted chronologically to obtain the status changes of each grid at different times, forming a historical time-series data set, which provides a basis for generating historical traffic congestion atlases. The time-series table records the information for each moment in the historical time-series traffic dataset. Traversing this table allows for the sequential acquisition of historical data for each moment.

[0058] Heat mapping assigns a heat value to each grid cell based on historical data; a higher heat value indicates more severe congestion at that moment. Applying heat mapping to a grid map visually displays the traffic status of each grid cell within a given timeframe, generating a first historical traffic congestion map.

[0059] The historical traffic congestion atlas contains historical traffic congestion maps at multiple time points, reflecting changes in traffic conditions within the predicted area over a certain historical period. Each newly generated historical traffic congestion map is added to this atlas, ultimately forming a complete historical traffic congestion atlas.

[0060] By performing time-series processing on historical traffic data and heat mapping on a grid map, a single-moment historical traffic congestion map is generated, which is then integrated into a complete historical traffic congestion atlas, providing a basis for model training and prediction result evaluation.

[0061] Furthermore, embodiments of this application also include:

[0062] Step S410: Select a convolutional neural network as the model structure for the spatial state prediction sub-model and a long short-term memory network as the model structure for the temporal state prediction sub-model.

[0063] Step S420: Divide the historical traffic congestion map set into a sample training set and a sample test set;

[0064] Step S430: Train the spatial state prediction sub-model and the temporal state prediction sub-model using the sample training set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model to be used.

[0065] Step S440: Test the spatial state prediction sub-model and the temporal state prediction sub-model using the sample test set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model that meet the test threshold.

[0066] Step S450: The spatial state prediction sub-model and the temporal state prediction sub-model constitute the traffic state prediction model.

[0067] Specifically, convolutional neural networks (CNNs) are suitable for image classification and prediction, and can automatically learn spatial features, making them suitable as the structure for spatial state prediction sub-models. Long Short-Term Memory (LSTM) networks can learn long-term dependencies in time-series data, making them suitable as the structure for temporal state prediction sub-models. Historical traffic congestion atlases are divided into training and testing sets. The training set, comprising 70%-80% of the total samples, is used for model training; the testing set, comprising the remaining 20%-30%, is used to evaluate the model's generalization ability, providing data support for subsequent model training and testing. The spatial and temporal state prediction sub-models are trained using the training set. During training, the model weights are continuously updated using backpropagation, gradually bringing the model's predictions closer to the true labels to achieve higher prediction accuracy. After training, the ready-to-use spatial and temporal state prediction sub-models are obtained.

[0068] Then, the candidate sub-model is tested using a sample test set to obtain a sub-model that meets the testing requirements. The testing process involves inputting a sample test set and calculating metrics such as accuracy, recall, and F1-score on the test set to evaluate the sub-model's generalization ability. When the performance metrics reach a preset threshold, the test passes, and the final sub-model is obtained. Otherwise, the model is retrained using a larger sample training set. The spatial state prediction sub-model is used to predict the traffic state of each grid in space at a given time, while the temporal state prediction sub-model is used to predict the traffic state of a grid over time. Combining the two sub-models allows for the prediction of the traffic state of any grid in space at a given time, achieving traffic state prediction within a region.

[0069] By employing convolutional neural networks and long short-term memory networks as sub-model structures, and using a large number of samples to train and test the model, a sub-model that meets the requirements is finally obtained. The two are then combined to form a complete traffic condition prediction model, which predicts traffic conditions and provides support for traffic situation assessment and management.

[0070] Furthermore, embodiments of this application also include:

[0071] Step S461: Sample the historical traffic congestion map at time intervals of 1 hour, 1 day, and 1 week respectively to obtain the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map;

[0072] Step S462: Use the convolutional neural network to extract features from the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map to obtain the first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature;

[0073] Step S463: Add a weighted fully connected layer to the spatial state prediction sub-model, and use the weighted fully connected layer to weight the first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature to obtain the spatial state distribution result.

[0074] Specifically, historical traffic congestion atlases contain traffic condition information for a region over a relatively long period. Sampling at different time intervals yields traffic congestion atlases at different time scales, reflecting traffic change patterns across different time ranges and providing a data foundation for multi-scale model learning. First, the historical traffic congestion atlases are sorted chronologically to obtain a sequence of traffic congestion maps from morning to night. Second, the total time span of the historical traffic congestion atlases is calculated to determine the number of time intervals that can be divided. For example, if the total time span of the historical data is one year, it can be divided into 365 days or 52 weeks. Then, based on preset time intervals of one hour, one day, and one week, the number of traffic congestion maps that can be sampled is calculated. For example, within one year, 24*365=8760 maps can be sampled at 1-hour intervals, 365 maps at 1-day intervals, and 52 maps at 1-week intervals. Then, based on the time intervals and the number of maps that can be sampled, a corresponding number of maps are sampled at equal intervals from the historical traffic congestion map sequence to form traffic congestion map sets at three time scales. For example, one map is sampled every hour from the sequence, for a total of 8760 maps, forming the first traffic congestion map set at 1-hour intervals; one map is sampled every day from the sequence, for a total of 365 maps, forming the second traffic congestion map set at 1-day intervals; and one map is sampled every week from the sequence, for a total of 52 maps, forming the third traffic congestion map set at 1-week intervals.

[0075] Convolutional neural networks can automatically learn the spatial features of images. Inputting traffic congestion atlases at different time intervals, they extract traffic congestion features at different time scales, providing feature vectors for feature fusion in subsequent steps. A weighted fully connected layer is added to the spatial state prediction sub-model. This weighted fully connected layer can sum multiple feature vectors with weights to generate new feature vectors. Here, traffic congestion features at three time scales are weighted, fusing multi-scale feature information to obtain comprehensive features, which are then input into the spatial state prediction sub-model for prediction to obtain the spatial state distribution results.

[0076] By sampling historical traffic congestion maps at preset time intervals, traffic congestion maps at different time scales are obtained. A convolutional neural network is used to extract features from each traffic congestion map, obtaining first, second, and third traffic congestion features. Finally, a weighted fully connected layer is added before the fully connected layer of the spatial state prediction sub-model to sum the three features in a weighted manner, obtaining a comprehensive feature, which is then input into the sub-model for spatial state prediction to obtain the spatial state distribution result. This approach enables multi-time interval analysis of historical traffic congestion maps, obtaining traffic congestion features at different time scales, and fusing feature information through a weighted fully connected layer to predict the spatial state distribution, thus improving the model's generalization ability.

[0077] Furthermore, embodiments of this application also include:

[0078] Step S710: The traffic state prediction result is a set of predicted feature images;

[0079] Step S720: Sort the predicted feature image set according to time and obtain the predicted feature images at K time points;

[0080] Step S730: Based on the K time points, traverse the predicted feature image set to obtain the first predicted feature image;

[0081] Step S740: Divide the first predicted feature image using the grid diagram to obtain X first predicted features;

[0082] Step S750: Traverse the X first prediction features. When the first prediction feature is greater than or equal to the first congestion threshold, mark the corresponding grid in red. When the first prediction feature is less than the first congestion threshold but greater than the second congestion threshold, mark the corresponding grid in orange. When the first prediction feature is less than or equal to the second congestion threshold, mark the corresponding grid in green. Obtain the first prediction result map.

[0083] Step S760: Map the first prediction result map onto the map of the traffic state prediction space to obtain the first predicted traffic map;

[0084] Step S770: Add the first predicted traffic map to the traffic state prediction results for display.

[0085] Specifically, the prediction feature image set contains the predicted features of each grid in the prediction area within a future time period. The prediction feature image set contains prediction results from multiple time points. Predictive feature images, sorted by future prediction time, are used for traffic map generation. Based on K time points, the prediction feature image set is traversed to obtain the prediction feature images. Each prediction feature image corresponds to the prediction result at one time point within the prediction time period, containing the first prediction features of each grid, and is used for generating the first predicted traffic map.

[0086] The grid map defines the range of each grid within the prediction area. Dividing the first predicted feature image yields the first predicted feature corresponding to each grid, resulting in a total of X first predicted features. For each first predicted feature, its value is evaluated: when it exceeds a first congestion threshold, the corresponding grid is mapped to red, indicating congestion; when it is less than the first threshold but greater than a second threshold, the corresponding grid is mapped to orange, indicating slow traffic; and when it is less than or equal to the second threshold, the corresponding grid is mapped to green, indicating unobstructed traffic. This yields the first predicted result map.

[0087] The first prediction result map shows the state of each grid at a future point in time within the prediction period. Spatially mapping this data onto a digital map allows for a direct assessment of the traffic situation at that moment, generating the first predicted traffic map. This first predicted traffic map is then added to the results, comparing it with predicted traffic data from other times. Figure 1 This constitutes a complete forecast result, allowing us to observe changes in traffic conditions during the forecast period and provide an intuitive reference for traffic management decisions.

[0088] In summary, the traffic state prediction method based on deep learning provided in this application has the following technical effects:

[0089] A top-down view of the traffic state prediction space is obtained and divided into a grid of M rows and N columns. The traffic state prediction space is the road intersection space, and the grid contains X grids (X = M * N), providing a spatial foundation for subsequent modeling and prediction. Historical traffic data of the traffic state prediction space is obtained from the interactive traffic control center and used as input for model training and prediction. Historical traffic congestion maps are obtained based on the historical traffic data and the grid map, reflecting traffic conditions at different times and providing samples for model training. A traffic state prediction model is constructed based on the historical traffic congestion maps. Real-time traffic state data is collected from each grid using data acquisition devices to obtain real-time traffic data reflecting the current traffic state. A real-time traffic map is obtained based on the real-time traffic data and the grid map. The real-time traffic map is input into the traffic state prediction model to obtain the traffic state prediction results. The traffic congestion status of the traffic state prediction space is displayed on a map using varying colors, providing traffic state information for decision-makers and achieving the technical effect of accurate, real-time, and intuitive traffic state prediction.

[0090] Example 2

[0091] Based on the same inventive concept as the deep learning-based traffic state prediction method in the foregoing embodiments, such as Figure 4 As shown in the embodiment of this application, a traffic state prediction system based on deep learning is provided. The system includes:

[0092] The spatial grid division module 11 is used to obtain a top view of the traffic state prediction space and divide the top view into a grid diagram divided into M rows and N columns. The traffic state prediction space is a road intersection space, and the grid diagram contains X grids, where X = M * N.

[0093] Historical data acquisition module 12 is used to interact with the traffic command center and acquire historical traffic data of the traffic state prediction space;

[0094] The congestion map acquisition module 13 is used to acquire a historical traffic congestion map based on the historical traffic data and the grid map;

[0095] The prediction model building module 14 builds a traffic state prediction model based on the historical traffic congestion map.

[0096] The real-time data acquisition module 15 is used to collect traffic status data of each grid in real time through the data acquisition device to obtain real-time traffic data.

[0097] Real-time traffic map module 16 is used to obtain a real-time traffic map based on the real-time traffic data and the grid map;

[0098] The traffic prediction display module 17 is used to input the real-time traffic map into the traffic state prediction model, obtain the traffic state prediction results, and display the traffic congestion status of the traffic state prediction space on the map with varying shades of color.

[0099] Furthermore, the historical data acquisition module 12 includes the following execution steps:

[0100] The traffic control center interacts with the sensing devices corresponding to the traffic state prediction space.

[0101] According to the preset sampling frequency, the traffic state data of the traffic state prediction space is sampled by the sensing device to obtain the spatial traffic flow and average vehicle speed at each sampling time, which is used as the original traffic state dataset.

[0102] The original traffic state dataset is discretized, and the state of each grid at each sampling time is calculated to form a grid state time series.

[0103] Historical traffic data is generated based on the obtained grid state time series.

[0104] Furthermore, the congestion atlas acquisition module 13 includes the following execution steps:

[0105] The historical traffic data is sorted in chronological order to obtain a historical time-series traffic dataset.

[0106] Obtain the time series table of the historical time series traffic dataset, traverse the time series table, and obtain the first time and the historical data of the first time.

[0107] The historical data at the first moment is heat-mapped onto the grid map to obtain the first historical traffic congestion map;

[0108] Add the first historical traffic congestion map to the historical traffic congestion map set.

[0109] Furthermore, the prediction model building module 14 includes the following execution steps:

[0110] Convolutional neural networks were selected as the model structure for the spatial state prediction sub-model, and long short-term memory networks were selected as the model structure for the temporal state prediction sub-model.

[0111] The historical traffic congestion map set is divided into a sample training set and a sample test set;

[0112] The spatial state prediction sub-model and the temporal state prediction sub-model are trained using the sample training set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model to be used.

[0113] The spatial state prediction sub-model and the temporal state prediction sub-model are tested using the sample test set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model that meet the test threshold.

[0114] The spatial state prediction sub-model and the temporal state prediction sub-model constitute the traffic state prediction model.

[0115] Furthermore, the prediction model building module 14 also includes the following execution steps:

[0116] The historical traffic congestion maps were sampled at time intervals of 1 hour, 1 day, and 1 week to obtain the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map.

[0117] The convolutional neural network is used to extract features from the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map to obtain the first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature.

[0118] A weighted fully connected layer is added to the spatial state prediction sub-model. The first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature are weighted by the weighted fully connected layer to obtain the spatial state distribution result.

[0119] The further traffic prediction display module 17 includes the following execution steps:

[0120] The traffic condition prediction result is a set of predicted feature images;

[0121] The predicted feature image set is sorted by time to obtain the predicted feature images at K time points;

[0122] Based on the K time points, the predicted feature image set is traversed to obtain the first predicted feature image;

[0123] The first predicted feature image is divided using the grid diagram to obtain X first predicted features;

[0124] Traverse the X first prediction features. When the first prediction feature is greater than or equal to the first congestion threshold, mark the corresponding grid in red. When the first prediction feature is less than the first congestion threshold but greater than the second congestion threshold, mark the corresponding grid in orange. When the first prediction feature is less than or equal to the second congestion threshold, mark the corresponding grid in green. Obtain the first prediction result map.

[0125] Map the first prediction result map onto the map of the traffic state prediction space to obtain the first predicted traffic map;

[0126] The first predicted traffic map is added to the traffic state prediction results for display.

[0127] In summary, any step of the method described above can be stored as a computer instruction or program in an unrestricted computer memory, and can be called and identified by an unrestricted computer processor to implement any method in the embodiments of this application, without any additional restrictions.

[0128] Furthermore, the "first" or "second" mentioned above may not only represent a sequential relationship, but may also represent a specific concept, and / or refer to the individual or collective selection of multiple elements. Clearly, those skilled in the art can make various modifications and variations to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.

Claims

1. A traffic state prediction method based on deep learning, characterized in that, The method includes: Obtain a top view of the traffic state prediction space, and divide the top view into a grid diagram with M rows and N columns. The traffic state prediction space is the road intersection space, and the grid diagram contains X grids, where X = M * N. The interactive traffic control center obtains historical traffic data for the traffic state prediction space. Based on the historical traffic data and the grid map, obtain a historical traffic congestion atlas; Based on the historical traffic congestion atlas, a traffic condition prediction model is constructed; Real-time traffic data is obtained by collecting traffic status data from each grid in real time through data acquisition devices; A real-time traffic map is obtained based on the real-time traffic data and the grid map; The real-time traffic map is input into the traffic state prediction model to obtain the traffic state prediction results, and the traffic congestion status of the traffic state prediction space is displayed on the map with varying shades of color. The construction of a traffic state prediction model based on the historical traffic congestion atlas includes: Convolutional neural networks were selected as the model structure for the spatial state prediction sub-model, and long short-term memory networks were selected as the model structure for the temporal state prediction sub-model. The historical traffic congestion map set is divided into a sample training set and a sample test set; The spatial state prediction sub-model and the temporal state prediction sub-model are trained using the sample training set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model to be used. The spatial state prediction sub-model and the temporal state prediction sub-model are tested using the sample test set to obtain the spatial state prediction sub-model and the temporal state prediction sub-model that meet the test threshold. The spatial state prediction sub-model and the temporal state prediction sub-model constitute the traffic state prediction model; The spatial state prediction sub-model includes: The historical traffic congestion maps were sampled at time intervals of 1 hour, 1 day, and 1 week to obtain the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map. The convolutional neural network is used to extract features from the first traffic congestion map, the second traffic congestion map, and the third traffic congestion map to obtain the first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature. A weighted fully connected layer is added to the spatial state prediction sub-model. The first traffic congestion feature, the second traffic congestion feature, and the third traffic congestion feature are weighted by the weighted fully connected layer to obtain the spatial state distribution result. The step of inputting the real-time traffic map into the traffic state prediction model to obtain the traffic state prediction results, and displaying the traffic congestion status of the traffic state prediction space on the map using color intensity, includes: The traffic condition prediction result is a set of predicted feature images; The predicted feature image set is sorted by time to obtain the predicted feature images at K time points; Based on the K time points, the predicted feature image set is traversed to obtain the first predicted feature image; The first predicted feature image is divided using the grid diagram to obtain X first predicted features; Traverse the X first prediction features. When the first prediction feature is greater than or equal to the first congestion threshold, mark the corresponding grid in red. When the first prediction feature is less than the first congestion threshold but greater than the second congestion threshold, mark the corresponding grid in orange. When the first prediction feature is less than or equal to the second congestion threshold, mark the corresponding grid in green. Obtain the first prediction result map. Map the first prediction result map onto the map of the traffic state prediction space to obtain the first predicted traffic map; The first predicted traffic map is added to the traffic state prediction results for display.

2. The method as described in claim 1, characterized in that, The interactive traffic control center acquires historical traffic data for the traffic state prediction space, including: The traffic control center interacts with the sensing devices corresponding to the traffic state prediction space. According to the preset sampling frequency, the traffic state data of the traffic state prediction space is sampled by the sensing device to obtain the spatial traffic flow and average vehicle speed at each sampling time, which is used as the original traffic state dataset. The original traffic state dataset is discretized, and the state of each grid at each sampling time is calculated to form a grid state time series. Historical traffic data is generated based on the obtained grid state time series.

3. The method as described in claim 1, characterized in that, The step of obtaining the historical traffic congestion atlas based on the historical traffic data and the grid map includes: The historical traffic data is sorted in chronological order to obtain a historical time-series traffic dataset. Obtain the time series table of the historical time series traffic dataset, traverse the time series table, and obtain the first time and the historical data of the first time. The historical data at the first moment is heat-mapped onto the grid map to obtain the first historical traffic congestion map; Add the first historical traffic congestion map to the historical traffic congestion map set.

4. A traffic state prediction system based on deep learning, characterized in that, The system is used to implement the deep learning-based traffic state prediction method according to any one of claims 1-3, the system comprising: A spatial grid partitioning module is used to obtain a top view of the traffic state prediction space and partition the top view into a grid diagram with M rows and N columns. The traffic state prediction space is a road intersection space, and the grid diagram contains X grids, where X = M * N. The historical data acquisition module is used to interact with the traffic command center and acquire historical traffic data of the traffic state prediction space. A congestion atlas acquisition module is used to acquire historical traffic congestion atlases based on the historical traffic data and the grid map. A prediction model building module, which constructs a traffic state prediction model based on the historical traffic congestion atlas; A real-time data acquisition module is used to collect traffic status data of each grid in real time through a data acquisition device to obtain real-time traffic data. A real-time traffic map module, which is used to obtain a real-time traffic map based on the real-time traffic data and the grid map; The traffic prediction and display module is used to input the real-time traffic map into the traffic state prediction model, obtain the traffic state prediction results, and display the traffic congestion status of the traffic state prediction space on the map with varying shades of color.

Citation Information

Patent Citations

  • Space-time traffic flow prediction method based on cross attention mechanism

    CN114692964A