Road congestion prediction system based on spatial-temporal feature extraction and control method

By using a dual-stream spatiotemporal feature extraction network and a two-level spatiotemporal attention mechanism, combined with multi-source data and an edge-cloud collaborative architecture, the limitations of existing technologies in road congestion prediction in terms of multi-source data utilization, spatiotemporal feature fusion, and real-time response are solved, achieving high-precision congestion prediction and intelligent traffic management.

CN121564976APending Publication Date: 2026-02-24HEBEI DAZHONG TRANSPORTATION PLANNING & DESIGN CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511940949.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing methods for predicting road congestion have limitations in utilizing multi-source heterogeneous data, spatial feature modeling, time series modeling, and spatiotemporal feature fusion, resulting in insufficient prediction accuracy. Furthermore, existing systems present contradictions in terms of computational resources versus real-time response, model deployment, and robustness to abnormal events.

Method used

We employ a dual-stream spatiotemporal feature extraction network (GCN + Bi-GRU) and a two-level spatiotemporal attention mechanism, combined with multi-source data acquisition, data preprocessing, and an edge-cloud collaborative architecture, to achieve efficient spatiotemporal feature fusion and dynamic focusing. We design a composite loss function to optimize model performance and integrate anomaly detection and emergency response modules.

Benefits of technology

It achieves high-precision prediction of congestion probability at the road segment level, reduces prediction error and emergency response time, improves the intelligent management and control level of urban road networks, and enhances the robustness and generalization ability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564976A_ABST
    Figure CN121564976A_ABST
Patent Text Reader

Abstract

The invention discloses a road congestion prediction system and method based on spatial-temporal feature extraction, and belongs to the field of intelligent traffic. The system adopts a layered distributed architecture, and comprises a multi-source data acquisition module, a data preprocessing unit, a double-flow spatio-temporal feature extraction network, a two-stage spatio-temporal attention mechanism module, a congestion prediction model and a result feedback interface. Multi-modal data such as a vehicle-mounted GPS track, checkpoint flow, video monitoring and meteorological data are integrated, a double-flow feature extraction network is constructed by adopting a graph convolutional network and a bidirectional gating circulation unit, and a key space-time region is dynamically focused in combination with a multi-head self-attention and time weighted dot product attention mechanism; and finally, optimizing the generalization ability of the model through a composite loss function. According to the method, a dynamic adaptive learning framework and multi-source data combined modeling mode is adopted for urban road traffic flow characteristics, the space-time precision and the real-time response capability of road network congestion prediction are remarkably improved, and reliable decision support is provided for intelligent traffic control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation, and in particular to a road congestion prediction system and control method based on spatiotemporal feature extraction. Background Technology

[0002] Urban traffic congestion management has become a global challenge, particularly in the context of urban traffic arteries. Existing research largely focuses on ordinary urban roads or highways, but these scenarios have inherent limitations: ① Urban roads suffer from severe interference from traffic lights and non-motorized vehicles at intersections, leading to frequent traffic flow disruptions; ② While highways offer good enclosure, their wide spacing and low density make it difficult to create a dense road network cascading effect. Roads, on the other hand, combine both enclosure and road network density, making their congestion evolution patterns more representative and challenging, and providing an ideal scenario for verifying the effectiveness of spatiotemporal attention mechanisms.

[0003] The current mainstream congestion prediction methods mainly suffer from the following technical bottlenecks: (1) Limited single-modal data analysis capabilities, which cannot fully explore the potential correlations of multi-source heterogeneous data (such as GPS trajectory, loop detection, video surveillance, and meteorological data); (2) Coarse-grained spatial feature modeling, which makes it difficult to accurately represent the topology and adjacency relationships of road networks using conventional grid division; (3) Significant lag in time series modeling, which makes it difficult for simple recursive networks to capture the long-term evolution of traffic conditions; (4) Lack of spatiotemporal feature fusion mechanism, which leads to insufficient feature interaction between spatial and temporal dimensions, thus restricting the improvement of prediction accuracy.

[0004] In recent years, deep learning technology has made groundbreaking progress in the transportation field. Convolutional Neural Networks (CNNs) excel at extracting spatial features, but they have limitations when dealing with road networks in non-Euclidean spaces. Recurrent Neural Networks (RNNs) and their variants, such as LSTM and GRU, can model temporal dependencies, but they still struggle with long-term memory decay. To overcome the limitations of single-modal network structures, researchers have proposed hybrid architectures, such as ST-ResNet, which fuses spatiotemporal features through residual connections, but its fixed weight allocation mechanism makes it difficult to adapt to dynamic traffic scenarios. The introduction of attention mechanisms provides a new approach to solving this problem. Existing research mostly focuses on single-dimensional attention design, such as pure spatial attention or temporal attention, failing to achieve synergistic enhancement in both spatiotemporal dimensions.

[0005] At the engineering practice level, existing systems generally suffer from two major contradictions: first, the conflict between the computing resources required for high-precision prediction and the real-time response requirements; and second, the challenge of adapting complex model parameter tuning to the actual deployment environment. While the development of edge computing technology has alleviated some of the computing power bottleneck, how to achieve lightweight deployment at the edge while maintaining model performance remains an unsolved problem. Furthermore, existing solutions lack robustness to abnormal events; sudden accidents or extreme weather-induced traffic pattern changes often cause prediction failures, and there is a lack of effective causal reasoning and emergency response mechanisms.

[0006] To address the aforementioned technical challenges, this invention proposes a road congestion prediction system and method based on spatiotemporal feature extraction. This system innovatively employs a dual-stream spatiotemporal feature extraction network, accurately models the road topology through graph convolutional networks, and deeply mines temporal evolution patterns using bidirectional gated recurrent units. It designs a two-level spatiotemporal attention mechanism to dynamically focus on key spatiotemporal regions; constructs a composite loss function to optimize model generalization capabilities; and adopts an edge-cloud collaborative architecture for efficient deployment. Compared to existing technologies, this invention has significant advantages in spatiotemporal feature fusion, multi-source data utilization, real-time prediction accuracy, and system scalability, effectively improving the intelligent management and control level of urban road networks. Summary of the Invention

[0007] To overcome the shortcomings of existing technologies, this application provides a road congestion prediction system and control method based on spatiotemporal feature extraction. This invention focuses on major urban roads, whose unique characteristics as main traffic arteries—high degree of enclosure, high traffic speed, and wide congestion propagation—make traditional traffic management methods insufficient for efficient control. By integrating multi-source heterogeneous data with a spatiotemporal attention mechanism, this invention can accurately capture the spatiotemporal evolution patterns of the road network, providing reliable decision support for dynamic signal control, emergency response, and route guidance.

[0008] To achieve the above objectives, this application provides the following solution: A road congestion prediction system based on spatiotemporal feature extraction, characterized in that it includes: The multi-source data acquisition module is used to collect real-time traffic data, historical traffic data, and environmental correlation data of the target road network; The data preprocessing unit cleans, standardizes, and aligns the collected multimodal data in time and space. A spatiotemporal feature extraction network, constructed based on convolutional neural networks and recurrent neural networks, is used to extract the spatial topological features and temporal dynamic features of road networks, respectively. The spatiotemporal attention mechanism module dynamically focuses on key spatiotemporal regions and time periods through a learnable weight matrix, thereby strengthening the representation of important features. The congestion prediction model receives attention-weighted spatiotemporal feature vectors and outputs the road segment-level congestion probability distribution within a preset future time period. The results output and feedback interface presents the prediction results in a visual form and receives manual correction feedback for model iteration and optimization.

[0009] Furthermore, the multi-source data acquisition module includes, but is not limited to, the following data sources: floating car trajectory data from vehicle-mounted GPS terminals, traffic flow statistics data from road checkpoint loop detectors, video stream image data from high-definition cameras, environmental parameter data from meteorological sensors, and a labeled database of historical traffic events from the same period.

[0010] Furthermore, the data preprocessing unit performs the following operations: S301: Perform Z-score standardization on numerical data, using the following formula: Where μ is the mean and σ is the standard deviation, the mean offset is required to be ≤0.1 and the standard deviation is scaled to 1±0.05; S302: Use linear interpolation algorithm to fill in missing time series data, with a maximum consecutive missing threshold of 3 time steps; S303: Construct a spatiotemporal adjacency matrix based on road topology to achieve spatial alignment of multi-source data; S304: Divide the sliding window at fixed time intervals to form a spatiotemporal cube of input samples.

[0011] Furthermore, the spatiotemporal feature extraction network adopts a dual-stream architecture, including a spatial stream branch and a temporal stream branch. The spatial stream branch uses an improved graph convolutional network to encode the adjacency relationships and geometric attributes of the road network. It contains three GCN layers, each with 128 hidden units and a ReLU activation function. The temporal stream branch uses a bidirectional gated recurrent unit network to capture the temporal evolution of traffic states. It contains two Bi-GRU layers, each with 64 hidden units and a Tanh activation function. The features from the two branches are fused through tensor concatenation to form a joint spatiotemporal feature representation with a total dimension of 256.

[0012] Furthermore, the spatiotemporal attention mechanism module includes a two-level attention structure: the first level is the spatial attention layer, which automatically allocates spatial attention based on the traffic load of each road segment at the current time; the second level is the temporal attention layer, which assigns temporal weights based on the contribution of historical time periods to the current prediction task; the two levels of attention scores are integrated through a multiplicative interaction to generate the final feature enhancement coefficient.

[0013] Furthermore, according to claim 1, the road congestion prediction system based on spatiotemporal feature extraction is characterized in that the loss function of the congestion prediction model is designed as a composite index: the main loss term uses a weighted average absolute error, focusing on the prediction accuracy in low-delay areas; the auxiliary loss term introduces an F1 score to improve the recall rate of severe congestion events; an L2 regularization term is added to constrain model complexity and prevent overfitting; the total loss function... Where: L_MAE is the weighted average absolute error, with a weighting coefficient ω1=0.7; L_F1 is the F1 score loss, with a weighting coefficient ω2=0.3; and L_L2 is the L2 regularization term, with a penalty coefficient λ=1e-4.

[0014] Furthermore, the system further includes: an anomaly detection submodule, which identifies traffic events that deviate from normal patterns using the isolated forest algorithm; a causal reasoning engine, which analyzes the causal relationship between sudden events and congestion propagation paths; and an emergency response suggestion module, which generates traffic control plans based on the prediction results.

[0015] Furthermore, the system is deployed on an edge-cloud collaborative computing platform: the edge is responsible for real-time preliminary data processing and lightweight prediction; the cloud performs deep model training and global optimization; and model compression technology is used to achieve efficient inference at the edge.

[0016] A road congestion prediction method based on spatiotemporal feature extraction, characterized by the following steps: S810: Multi-source data synchronous acquisition, which collects real-time traffic data, historical data and environmental data in parallel through the multi-source data acquisition module; S820: Dynamic data preprocessing, performing Z-score standardization, linear interpolation to fill missing values, and constructing a spatiotemporal adjacency matrix; S830: Dual-stream spatiotemporal feature extraction, extracting joint spatiotemporal features through spatial and temporal stream branches; S840: Two-level attention enhancement: First, the spatial attention layer focuses on key road segments, and then the temporal attention layer strengthens historical associations to generate weighted feature vectors; S850: Congestion probability prediction. Input the weighted features into the congestion prediction model and output the road segment-level congestion probability distribution within a preset time period in the future. S860: Closed-loop feedback optimization compares the predicted results with the actual observed data, calculates the error, and iteratively optimizes the model parameters through backpropagation.

[0017] Furthermore, the congestion prediction model training process adopts a strategy that combines transfer learning and adversarial training: in the pre-training stage, the model parameters are initialized using a public urban traffic dataset, with 50 pre-training rounds; in the fine-tuning stage, local road network-specific data is injected, and a cosine annealing learning rate strategy is adopted; in adversarial training, Gaussian noise is added to the input data to enhance the model's robustness to complex scenarios.

[0018] The beneficial effects of the technical solution in this application are as follows: This invention effectively fuses multi-source heterogeneous data and dynamically focuses on key spatiotemporal regions by employing a dual-stream spatiotemporal feature extraction network (GCN + Bi-GRU) and a two-level spatiotemporal attention mechanism, overcoming the limitations of traditional methods in spatial topology modeling and temporal series dependency capture. Experiments show that the system can achieve high-precision prediction of road segment-level congestion probability in road network scenarios, with a prediction latency of less than 50ms and a response speed improvement of over 40%, providing reliable support for real-time traffic management.

[0019] By employing a composite loss function (weighted MAE + F1 loss + L2 regularization) and an adversarial training strategy, combined with transfer learning and data augmentation techniques, the model's adaptability to different traffic scenarios, such as extreme weather and sudden accidents, is significantly improved. The system has been validated in multiple real-world scenarios, achieving an anomaly detection accuracy of over 95% and reducing congestion prediction error by 18.7%. It effectively avoids overfitting and exhibits strong generalization and stability.

[0020] The system adopts a layered distributed architecture, with the edge handling real-time data processing and lightweight inference, while the cloud performs deep training and global optimization, supporting dynamic model updates and iterations. Combined with anomaly detection, causal reasoning, and emergency response modules, it forms a complete closed loop from data collection and predictive analysis to decision feedback. In practical applications, emergency response time is reduced by 40%, and the secondary accident rate is reduced by 60%, significantly improving the intelligent management and control level of urban road networks. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is an overall architecture diagram of a road congestion prediction system based on spatiotemporal feature extraction; Figure 2 This is a flowchart of a road congestion prediction method based on spatiotemporal feature extraction; Figure 3This is a spatiotemporal feature extraction network structure diagram of a road congestion prediction system based on spatiotemporal feature extraction. Figure 4 This is a schematic diagram illustrating a scenario where vehicles at an intersection use the technology of this invention to pass through in an orderly manner; Figure 5 These are two illustrations depicting a scenario where vehicles at an intersection use the technology of this invention to pass through in an orderly manner; Figure 6 These are three illustrations depicting a scenario where vehicles at an intersection use the technology of this invention to pass through in an orderly manner; Figure 7 The four figures illustrate a scenario where vehicles at an intersection use the technology of this invention to pass through in an orderly manner. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] like Figure 1 As shown, the road congestion prediction system proposed in this invention adopts a hierarchical distributed architecture, mainly consisting of six core modules: a multi-source data acquisition module, a data preprocessing unit, a spatiotemporal feature extraction network, a spatiotemporal attention mechanism module, a congestion prediction model, and a result output and feedback interface. These modules work collaboratively to form a complete closed loop from data acquisition to prediction output.

[0026] The multi-source data acquisition module is responsible for collecting multi-dimensional data of the target road network, including but not limited to floating car trajectory data from vehicle-mounted GPS terminals, traffic flow statistics from road checkpoint loop detectors, video stream image data from high-definition cameras, environmental parameter data from meteorological sensors, and a labeled database of historical traffic events from the same period. This module achieves comprehensive data coverage through various sensors and data interfaces. The configurations of each device are as follows:

[0027] Data synchronization and storage utilize message queue middleware, such as Apache Kafka, to achieve real-time synchronization of multi-source data, ensuring timestamp alignment across different data sources. Data storage employs a combination of the distributed file system HDFS and the relational database PostgreSQL, supporting efficient storage and retrieval of massive amounts of data.

[0028] The data preprocessing unit cleans, standardizes, and aligns the collected multimodal data in a spatiotemporal manner. Specifically, this includes removing outliers, correcting format errors, performing Z-score standardization, filling in missing values ​​using linear interpolation, constructing a spatiotemporal adjacency matrix based on road topology, and dividing the data into a spatiotemporal cube input sample by dividing the window at fixed time intervals.

[0029] Data cleaning includes outlier detection, duplicate record handling, and format correction. For numerical data, such as vehicle speed and traffic flow, box plots are used to identify outliers, with upper and lower bounds set as Q1-1.5IQR and Q3+1.5IQR, respectively. Values ​​outside these ranges are marked as outliers. Data uploaded repeatedly by the same device within a short period is deduplicated, retaining only the latest record. The timestamp format is standardized to ISO 8601, and errors in the latitude and longitude order of GPS coordinates are corrected.

[0030] Z-score standardization was performed on numerical data using the formula: x̂ᵢ = (xᵢ − μ) / σ, where μ is the mean within the sliding window and σ is the standard deviation. The mean offset was required to be ≤0.1, and the standard deviation was scaled to 1±0.05 to ensure comparability of data with different dimensions. Linear interpolation was used to impute missing time-series data, with a maximum consecutive missing threshold of 3 time steps. If the missing data exceeded 3 time steps, forward or backward imputation strategies were employed. A spatiotemporal adjacency matrix was constructed based on road topology, with a spatial granularity of 50 meters per segment and a temporal granularity of 5 minutes per frame. Matrix element A[i][j] represents the spatial adjacency relationship between road segment i and road segment j (1 indicates adjacent, 0 indicates non-adjacent), and the temporal correlation is superimposed, with stronger correlations observed during morning rush hours. The sliding window was divided into fixed time intervals, with a window length T=30 minutes and a step size Δt=5 minutes. Each sliding window contains spatiotemporal data for 6 time steps, forming a spatiotemporal cube input sample (shape [6, N, F], where N is the number of road segments and F is the feature dimension).

[0031] The spatiotemporal feature extraction network adopts a dual-stream architecture, consisting of a spatial stream branch and a temporal stream branch. Preprocessed road segment-level spatial features, such as road length, lane number, and adjacency relationships, are input into the spatial stream branch. This branch uses an improved Graph Convolutional Network (GCN), comprising three GCN layers, each with 128 hidden units and a ReLU activation function, to encode the adjacency relationships and geometric attributes of the road network. Information from neighboring nodes is aggregated through graph convolution operations to update the feature representation of the current node. The output of the l-th layer is H⁽ˡ⁾ = ReLU( H⁽ˡ⁻¹⁾ W⁽ˡ⁾), where  is the normalized adjacency matrix and W⁽ˡ⁾ is a learnable weight matrix. This effectively captures the spatial topology of the road network, overcoming the limitations of traditional CNNs in non-Euclidean spaces.

[0032] Preprocessed time-series features, such as historical sequences of vehicle speed and traffic flow, are input into the time-stream branch. This branch employs a bidirectional gated recurrent unit (Bi-GRU) network, consisting of two Bi-GRU layers, each with 64 hidden units and a Tanh activation function, to capture the temporal evolution of traffic conditions. The bidirectional GRU extracts temporal features from front to back and from back to front, respectively, and the output is a concatenation of the hidden states from both directions. The output of the l-th layer is h. t = [h t →; h t ←], where h t → represents the output of the forward GRU, h t ← represents the output of the backward GRU. It can capture long-term dependencies in traffic states, solving the long-range gradient vanishing problem of traditional RNNs. The features from the two branches are fused through tensor concatenation operations to form a joint spatiotemporal feature representation with a total dimension of 256.

[0033] The spatiotemporal attention mechanism module comprises a two-level attention structure. The first level is the spatial attention layer, employing a multi-head self-attention mechanism (number of heads H=8, dropout rate 0.2). For each head, the query matrix Q, key matrix K, and value matrix V are calculated, and then the attention score is calculated. , where d k is the key vector dimension. Spatial attention is automatically allocated based on the traffic load of each road segment at the current time, and a weighted spatial feature matrix is ​​output.

[0034] The second level is the temporal attention layer. The spatial feature matrix output from the spatial attention layer is input into the temporal attention layer, using weighted dot-product attention. The query vector has a 32-dimensional dimension. An attention score is calculated for each time step using the formula: score = q·kᵀ, where q is the query vector and k is the key vector. Temporal weights are assigned based on the contribution of historical time periods to the current prediction task. The weighted result is the temporal feature matrix. The attention scores from both levels are integrated through a multiplicative interaction to generate the final feature enhancement coefficients. Specifically, the spatial attention score and the temporal attention score are multiplied to obtain a comprehensive attention score, which is used to weight the spatiotemporal features.

[0035] The congestion prediction model receives attention-weighted spatiotemporal feature vectors and outputs a road segment-level congestion probability distribution over a preset future time period. The model's loss function is designed as a composite index. The main loss term uses the weighted average absolute error (MAE), emphasizing prediction accuracy in low-delay areas. The auxiliary loss term incorporates the F1 score to improve the recall rate of severe congestion events. An L2 regularization term is added, with the formula: L_L2 = λ||W||², where W represents the model parameters, and the penalty coefficient λ = 1e-4 constrains model complexity and prevents overfitting. The total loss function is: L = ω1·L_MAE + ω2·L_F1 + λ·L_L2.

[0036] The results output and feedback interface presents the prediction results in a visual format (such as heatmaps and graphs) and receives manual correction feedback for model iteration and optimization.

[0037] This invention integrates three core functional modules: anomaly detection, causal reasoning, and emergency response, forming a closed-loop intelligent traffic incident handling system. The anomaly detection submodule uses the isolated forest algorithm as its basic architecture. This algorithm constructs isolated trees by randomly selecting features and split points, efficiently identifying traffic incidents deviating from normal patterns in the prediction residual (the difference between the actual and predicted values), and sets a pollution rate threshold p. t A confidence threshold of β=0.05 ensures a 95% normal sample ratio, effectively filtering out sudden congestion events caused by accidents, extreme weather, etc. Based on this, the causal inference engine conducts deep correlation analysis using Bayesian networks. When an anomaly is detected, the system uses a confidence threshold of β=0.85 to accurately trace the causal relationship between the sudden event and the congestion propagation path, providing a scientific basis for subsequent decision-making. The emergency response suggestion module, based on the anomaly detection results and causal inference conclusions, can quickly generate traffic control plans within 2 minutes, including temporary road closures, traffic light timing adjustments, and detour route announcements, achieving a fully intelligent response chain from event detection to emergency handling.

[0038] The system employs an edge-cloud collaborative computing platform to construct a distributed intelligent traffic management system. Edge devices are deployed at roadside units (RSUs), toll station servers, or mobile edge computing nodes, directly connecting to front-end sensing devices to perform real-time data cleaning and standardization. Knowledge distillation technology is used to compress large cloud models into lightweight models, and TensorRT optimization achieves inference latency ≤50ms. Based on prediction results, the system can autonomously generate local traffic control commands such as traffic light timing adjustments and early warning information dissemination. The entire system achieves high-speed, low-latency data transmission between the edge and cloud via 5G / fiber optic networks. The cloud periodically pushes update packages to the edge, continuously improving edge model performance and forming a complete intelligent traffic management ecosystem with data closure and model iteration.

[0039] The system constructs a training set using high-quality, long-term real-world traffic data. The data is collected from multiple sensors on the target road network, spanning at least three years and covering complete traffic patterns across different seasons, weekdays / holidays, and peak / off-peak hours. The original data is divided chronologically into a 70% training set, a 20% validation set, and a 10% test set. Data augmentation techniques such as random pruning, time-space flipping, and Gaussian noise injection are used to expand the training sample size, effectively improving the model's generalization ability to complex traffic scenarios.

[0040] Deep model training is performed on a cloud-based GPU server cluster using a transfer learning strategy. This is implemented in a multi-stage, refined manner: In the pre-training stage, model parameters are initialized using a public urban traffic dataset, with 50 pre-training epochs and an initial learning rate η=1e-3; in the fine-tuning stage, local road network-specific data is loaded, the parameters of the underlying general feature extraction layers are frozen, and only the top-level task-specific modules are trained. A cosine annealing learning rate strategy is used to dynamically adjust and optimize the step size. To enhance model robustness, Gaussian noise (σ=0.1) is added to the input data during training for adversarial training, and an L2 regularization term (penalty coefficient λ=1e-4) is introduced into the loss function to constrain model complexity. An early stopping mechanism is incorporated into the training process; training is automatically terminated when the validation set loss does not decrease for 10 consecutive training epochs to prevent overfitting.

[0041] Key hyperparameters were determined through systematic experiments. The learning rate was selected optimally within the range [1e-4, 1e-3, 1e-2] using a grid search method. The cloud training batch size was set to BatchSize=64 to balance computational efficiency and gradient stability, while the edge inference batch size was set to BatchSize=16 to meet real-time requirements. The number of attention heads H=8 in the spatiotemporal attention mechanism was determined using cross-validation to achieve the best balance between computational complexity and performance. After experimental verification, the number of hidden units in the network structure was set to 128 dimensions per layer for the spatial flow branch and 64 dimensions per layer for the temporal flow branch. This configuration achieves the optimal trade-off between feature representation capability and model lightweighting.

[0042] This invention has demonstrated significant application value in multiple practical scenarios. In the area of ​​intelligent signal control at urban road intersections, the specific implementation steps are as follows: Radar detection data, camera video streams, and meteorological station environmental data are collected by roadside RSU units. Every minute, the edge device pushes a congestion prediction heatmap for the next 5 minutes to the signal controller. The cloud summarizes the entire road network data weekly, updates the signal timing model, and the edge device converts the prediction results into a signal light timing scheme, dynamically adjusting the phase duration. For example... Figure 4 and Figure 5 As shown in the test results of a pilot application on a certain road, the traffic light cycle is dynamically adjusted according to real-time traffic flow. For example, during peak hours, the left-turn phase duration is increased, and left-turning vehicles pass through in an orderly manner during the green light period without any rushing. Figure 6 The data shows that by analyzing the contribution of historical time periods, peak periods of right-turn traffic are accurately identified, and the corresponding phase duration is dynamically extended. The average waiting time for right-turning vehicles has decreased from 45 seconds to 28 seconds, and the number of stop-start operations has decreased by 60%. After the dedicated right-turn signal light was put into use, the number of weaving and conflict events between right-turning vehicles and oncoming straight-going vehicles decreased by 75%. The causal reasoning engine traces the pedestrian waiting events caused by right turns and adjusts the green light duration of pedestrian crossings in a coordinated manner, forming a "traffic-pedestrian" spatiotemporal coordination scheme. The waiting time for pedestrians crossing the street at the safety island has been shortened to within 15 seconds.

[0043] During peak hours, the average delay at intersections decreased from 120 seconds to 98 seconds (a reduction of 18.7%); the spacing between queuing vehicles was shortened to 1.5 times the vehicle length, a 30% improvement over traditional signal control; the recognition time for sudden congestion events was ≤2 minutes, and the signal adjustment delay was ≤50ms.

[0044] For dynamic route planning scenarios in navigation software, the edge device provides real-time traffic predictions with an update interval of ≤2 seconds, while the cloud device performs global route planning based on the congestion evolution trend over the next 15 minutes. After integration into a navigation software, the route calculation time is ≤2 seconds, the coverage rate reaches over 95% of road sections, and user satisfaction is improved by 32%. In highway accident emergency response, the system can automatically generate temporary control area suggestions, push detour routes to surrounding vehicles, notify rescue vehicles of the optimal passage route within 2 minutes after detecting an accident, and simultaneously initiate cloud-based emergency plan simulation. In actual applications, the emergency response time is shortened by 40%, and the secondary accident rate is reduced by 60%, fully verifying the system's real-time performance and reliability.

[0045] In the description of this application, it should be understood that the terms "front", "rear", "upper", "lower", "outer", "inner", "horizontal", "top", "bottom", "surface", "bottom layer", "top layer", "upper part", "lower part", "bottom", "top", "inner", "surface", "center", "right side", "middle part", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0046] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application shall fall within the protection scope defined by the claims of this application.

Claims

1. A road congestion prediction system based on spatiotemporal feature extraction, characterized in that, include: The multi-source data acquisition module is used to collect real-time traffic data, historical traffic data, and environmental correlation data of the target road network; The data preprocessing unit cleans, standardizes, and aligns the collected multimodal data in time and space. A spatiotemporal feature extraction network, constructed based on convolutional neural networks and recurrent neural networks, is used to extract the spatial topological features and temporal dynamic features of road networks, respectively. The spatiotemporal attention mechanism module dynamically focuses on key spatiotemporal regions and time periods through a learnable weight matrix, thereby strengthening the representation of important features. The congestion prediction model receives attention-weighted spatiotemporal feature vectors and outputs the road segment-level congestion probability distribution within a preset future time period. The results output and feedback interface presents the prediction results in a visual form and receives manual correction feedback for model iteration and optimization.

2. The road congestion prediction system based on spatiotemporal feature extraction according to claim 1, characterized in that, The multi-source data acquisition module includes, but is not limited to, the following data sources: floating car trajectory data from vehicle-mounted GPS terminals, traffic flow statistics from road checkpoint loop detectors, video stream image data from high-definition cameras, environmental parameter data from meteorological sensors, and a labeled database of historical traffic events from the same period.

3. The road congestion prediction system based on spatiotemporal feature extraction according to claim 1, characterized in that, The data preprocessing unit performs the following operations: S301: Perform Z-score standardization on numerical data; S302: Use linear interpolation algorithm to fill in missing time series data, with a maximum consecutive missing threshold of 3 time steps; S303: Construct a spatiotemporal adjacency matrix based on road topology to achieve spatial alignment of multi-source data; S304: Divide the sliding window at fixed time intervals to form a spatiotemporal cube of input samples.

4. The road congestion prediction system based on spatiotemporal feature extraction according to claim 1, characterized in that, The spatiotemporal feature extraction network adopts a dual-stream architecture, including a spatial flow branch and a temporal flow branch. The spatial flow branch uses an improved graph convolutional network to encode the adjacency relationships and geometric attributes of the road network. The temporal flow branch uses a bidirectional gated recurrent unit network to capture the temporal evolution of traffic conditions. The features of the two branches are fused through tensor concatenation operations to form a joint spatiotemporal feature representation with a total dimension of 256.

5. The road congestion prediction method based on spatiotemporal feature extraction according to claim 1, characterized in that, The spatiotemporal attention mechanism module includes a two-level attention structure: the first level is the spatial attention layer, which automatically allocates spatial attention based on the traffic load of each road segment at the current time; The second level is the temporal attention layer, which assigns time weights based on the contribution of historical time periods to the current prediction task. The attention scores from the two levels are integrated through a multiplicative interaction to generate the final feature enhancement coefficient.

6. A road congestion prediction system based on spatiotemporal feature extraction according to claim 1, characterized in that, The loss function of the congestion prediction model is designed as a composite index: the main loss term uses the weighted average absolute error, focusing on the prediction accuracy in low-delay areas; the auxiliary loss term introduces the F1 score to improve the recall rate of severe congestion events; and an L2 regularization term is added to constrain the model complexity and prevent overfitting.

7. A road congestion prediction system based on spatiotemporal feature extraction according to claim 5, characterized in that, The system further includes: an anomaly detection submodule, which identifies traffic events that deviate from normal patterns using the isolated forest algorithm; a causal reasoning engine, which analyzes the causal relationship between sudden events and congestion propagation paths; and an emergency response suggestion module, which generates traffic control plans based on the prediction results.

8. A road congestion prediction system based on spatiotemporal feature extraction according to claim 1, characterized in that, The system is deployed on an edge-cloud collaborative computing platform: the edge is responsible for real-time preliminary data processing and lightweight prediction. Deep model training and global optimization are performed in the cloud; efficient inference at the edge is achieved using model compression technology.

9. A road congestion prediction method based on spatiotemporal feature extraction, characterized in that, Includes the following steps: S810: Multi-source data synchronous acquisition, which collects real-time traffic data, historical data and environmental data in parallel through the multi-source data acquisition module; S820: Dynamic data preprocessing, performing Z-score standardization, linear interpolation to fill missing values, and constructing a spatiotemporal adjacency matrix; S830: Dual-stream spatiotemporal feature extraction, extracting joint spatiotemporal features through spatial and temporal stream branches; S840: Two-level attention enhancement: First, the spatial attention layer focuses on key road segments, and then the temporal attention layer strengthens historical associations to generate weighted feature vectors; S850: Congestion probability prediction. Input the weighted features into the congestion prediction model and output the road segment-level congestion probability distribution within a preset time period in the future. S860: Closed-loop feedback optimization compares the predicted results with the actual observed data, calculates the error, and iteratively optimizes the model parameters through backpropagation.

10. A road congestion prediction method based on spatiotemporal feature extraction according to claim 9, characterized in that, The training process of the congestion prediction model adopts a strategy that combines transfer learning and adversarial training: in the pre-training stage, the model parameters are initialized using a public urban traffic dataset, and the pre-training rounds are 50; in the fine-tuning stage, local road network-specific data is injected, and a cosine annealing learning rate strategy is adopted. Adversarial training adds Gaussian noise to the input data to enhance the model's robustness to complex scenarios.

Citation Information

Cited By

  • Urban road network traffic state and congestion propagation probability prediction method and system

    CN121963489A