Expressway traffic flow prediction method, storage medium and system
By dynamically calculating node relationships through a shared MLP encoder and attention mechanism, and combining dynamic and static fusion gating and multi-scale feature extraction, an improved spatiotemporal synchronous graph convolutional network is constructed. This solves the problems of insufficient dynamic adaptability and long-period pattern capture in traditional methods for highway traffic flow prediction, and achieves high-precision real-time prediction.
Patent Information
- Application Number
- CN202610090471.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-23
- Publication Date
- 2026-02-24
AI Technical Summary
The traditional STSGCN method cannot adapt to the real-time dynamic changes in highway traffic flow, especially during sudden events or changes in traffic patterns. It cannot accurately capture long-term patterns and long-distance spatial propagation, resulting in insufficient prediction accuracy.
A shared MLP encoder is used to generate node state vectors, and an attention mechanism is used to dynamically calculate the strength of relationships between nodes. A global graph structure is generated by combining static and dynamic fusion gating. Furthermore, fused features are generated through parallel multi-scale feature extraction and attention fusion gating. An improved spatiotemporal synchronous graph convolutional network is constructed for prediction.
It achieves high-precision real-time prediction of highway traffic flow, can quickly respond to emergencies, and adapt to complex traffic patterns such as morning peak and off-peak hours. It breaks through the limitations of traditional methods and improves the adaptability and accuracy of prediction.
Smart Images

Figure CN121564995A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of highway traffic flow prediction technology, and in particular to a method, storage medium and system for predicting highway traffic flow. Background Technology
[0002] Traditional STSGCN uses a predefined static adjacency matrix. This graph structure, based on distance or connectivity, cannot reflect the real-time dynamic changes in traffic flow. Its main drawback is that spatial relationships are fixed, making it difficult to adapt to sudden events. For example, when a traffic accident occurs or traffic control is implemented, the actual impact relationships between road segments change drastically, and static graphs cannot capture such abrupt changes. Furthermore, this method ignores the impact of traffic conditions. During morning rush hour tidal flow and off-peak flow patterns, the spatial correlation between road segments differs significantly, and static graphs also fail to reflect these changes.
[0003] The original STSGCN's local spatiotemporal synchronous convolution module has certain limitations. On the one hand, its sensing range is limited, and the fixed local time window makes it difficult to capture long-period patterns, such as morning and evening rush hours and weekend effects. On the other hand, its spatial range is limited, and it can only capture the influence of directly adjacent road segments, making it unable to model long-distance spatial propagation. Summary of the Invention
[0004] This invention aims to at least solve the technical problem in the prior art where spatial relationships are fixed and difficult to adapt to the needs of sudden events. In particular, it innovatively proposes a method, storage medium and system for predicting highway traffic flow.
[0005] To achieve the above-mentioned objectives of the present invention, the present invention provides a method for predicting highway traffic flow, the method comprising: S1. Based on the multi-dimensional feature data of traffic flow, speed and occupancy rate collected in real time on highway sections, a shared MLP encoder is used to generate node state vectors. S2. Based on the node state vector, use the attention mechanism to dynamically calculate the real-time relationship strength between any nodes and generate dynamic graph weight relationships; S3. Using dynamic-static fusion gating, the dynamic graph weight relationship is adaptively fused with the prior static graph structure to generate a global graph structure; S4. Based on the global graph structure, multi-scale spatiotemporal features are generated using parallel multi-scale feature extraction pathways. S5. Align the dimensions of the multi-scale spatiotemporal features, and then calculate adaptive weights through attention fusion gating to generate fused features; S6. Based on the fusion features, construct an improved spatiotemporal synchronous graph convolutional network to generate real-time traffic flow prediction results for highways.
[0006] In another aspect, the present invention also provides a computer-readable storage medium comprising: A memory on which computer programs are stored; A processor is configured to execute the program in the memory to implement the highway traffic flow prediction method.
[0007] On the other hand, the present invention also provides a highway traffic flow prediction system based on an improved spatiotemporal synchronous graph convolutional network, the system comprising: processor; Memory used to store processor-executable instructions; The processor is configured to implement the highway traffic flow prediction method when executing the executable instructions.
[0008] The beneficial effects of this invention are as follows: This invention effectively solves the technical defects of traditional STSGCN in terms of solidified spatial relationships and insufficient capture of long-term patterns by using a dynamic graph learning mechanism and multi-scale feature fusion technology. Specifically, it utilizes a shared MLP encoder to generate node state vectors, and combines an attention mechanism to calculate the strength of relationships between nodes in real time, forming dynamic graph weight relationships. This enables rapid response to sudden changes in road segment correlation caused by traffic accidents or traffic control. By using dynamic-static fusion gating, the dynamic graph and the prior static graph are adaptively fused, preserving the basic topology while taking into account real-time traffic state differences, thus solving the problem of spatial correlation changes between morning peak tidal flow and off-peak flow patterns. At the same time, the parallel multi-scale feature extraction pathway captures instantaneous fluctuations, daily cycle patterns, and long-term dependency features through micro, meso, and macro dimensions, respectively. Combined with attention fusion gating and adaptive weighting, it breaks through the fixed window limitation of local spatiotemporal convolution, achieving effective modeling of long-term patterns and long-distance spatial propagation such as morning and evening peaks and weekend effects. Finally, the improved spatiotemporal synchronous graph convolutional network generates high-precision real-time traffic flow prediction results, significantly improving the adaptability and accuracy of highway traffic flow prediction.
[0009] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0010] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart of a highway traffic flow prediction method according to the present invention; Figure 2 This is a flowchart of the global graph structure construction process of the present invention.
[0011] Figure 3 This is a diagram of the multi-scale feature fusion architecture of the present invention. Detailed Implementation
[0012] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0013] Example 1 like Figure 1 As shown, a method for predicting highway traffic flow includes: S1. Based on the multi-dimensional feature data of traffic flow, speed and occupancy rate collected in real time on highway sections, a shared MLP encoder is used to generate node state vectors. In step S1, it is necessary to explain in detail the preprocessing of the three types of multidimensional feature data collected: traffic flow (the total number of vehicles passing through the road segment in every 5-minute period), speed (the average speed of vehicles in the road segment), and occupancy rate (the proportion of time that vehicles occupy the effective length of the road segment). First, missing values are filled using linear interpolation, and outliers are identified and filtered using the 3σ principle. Then, Min-Max normalization is used to map each feature value to the [0,1] interval to eliminate the dimensional differences between different features. The shared MLP encoder contains two fully connected layers and a corresponding batch normalization layer: the first fully connected layer has an input dimension of 3 (matching three types of features), an output dimension of 64, and uses ReLU as the activation function; the second fully connected layer has an input dimension of 64 and an output dimension of 128, and also uses ReLU as the activation function; the batch normalization layer is used to standardize the input data of each layer, avoid gradient vanishing, and accelerate model convergence. Each highway segment corresponds to an independent node. The shared MLP encoder performs the same encoding operation on the preprocessed feature data of each node, and the output 128-dimensional vector is the state vector of that node, which comprehensively represents the current traffic flow operation status of the segment.
[0014] S2. Based on the node state vector, use the attention mechanism to dynamically calculate the real-time relationship strength between any nodes and generate dynamic graph weight relationships; The expression for calculating the real-time relationship strength between any nodes is: , ;in, This indicates that in the attention mechanism, from the node To the node The original attention score, Represents a non-linear activation function. This represents a learnable attention vector. Represents the learnable weight matrix. , Representing nodes respectively and The state vector, Represents the standardized nodes in a dynamic graph. To the node Attention weight score Indicates the number of nodes. This indicates that in the attention mechanism, from the node To the node The original attention score.
[0015] In step S2, it is important to explain in detail that by dynamically calculating the strength of relationships between nodes, the changes in the connections between highway segments can be reflected in real time. This establishment of dynamic graph weight relationships not only considers the physical distance between segments but also incorporates the actual operational status of traffic flow, thereby more accurately capturing the impact of sudden events or periodic traffic patterns on segment connectivity. For example, during traffic accidents or traffic control measures, the flow and speed of certain segments may fluctuate significantly. The dynamic graph weight relationships can quickly respond to these changes, adjusting the connection strength between nodes to ensure the model's sensitivity and adaptability to real-time traffic conditions.
[0016] Furthermore, the generation process of dynamic graph weight relationships incorporates an optimization mechanism for learnable parameters. Through iterative training of the attention vector and weight matrix, the model can gradually improve the accuracy of calculating the strength of relationships between nodes. In practical applications, this mechanism enables the model to exhibit strong generalization ability in different traffic scenarios, maintaining high prediction accuracy whether dealing with daily traffic flow changes or responding to abnormal situations caused by holiday peaks or special events.
[0017] S3. Using dynamic-static fusion gating, the dynamic graph weight relationship is adaptively fused with the prior static graph structure to generate a global graph structure; The expression for adaptively fusing the dynamic graph weight relationship with the prior static graph structure using dynamic-static fusion gating is as follows: , ; in, Represents the adaptive fusion coefficient. This represents the activation function. This represents the learnable weight matrix in fusion gating. Represents the state vector. Represents the global state vector. Represents the feature vector of a dynamic graph. express The node embedding matrix at time step is the result output by the node state encoder in the dynamic graph learning module. This indicates a global pooling operation. This indicates the corresponding bias term. This represents the final adjacency matrix after static and dynamic graph fusion, which is the output of the static and dynamic graph fusion gating in the dynamic graph learning module. This represents the weight relationship in a dynamic graph. This represents the weight relationships in a static graph.
[0018] like Figure 2 As shown, step S3 requires detailed explanation of the dynamic-static fusion gating design, which aims to organically combine the real-time calculated dynamic graph weight relationships with the predefined static graph structure by dynamically adjusting the weights. This method not only preserves the inherent topological information in the static graph but also dynamically adjusts the global graph structure according to changes in the current traffic state, thereby improving the model's adaptability to complex traffic scenarios. Specifically, the adaptive fusion coefficients automatically adjust the contribution ratio of the dynamic and static graphs through a learning mechanism, making the static graph more reliable when traffic flow is stable, and the dynamic graph more favorable during sudden events or drastic traffic fluctuations. This flexible fusion strategy effectively solves the limitations of traditional methods in handling changes in spatial correlation, especially demonstrating stronger robustness during peak hours, holidays, and other special periods.
[0019] Furthermore, global pooling further enhances the expressive power of the global graph structure. By aggregating the state vectors of all nodes, global information reflecting the characteristics of the overall traffic network is extracted and fed back into the representation of each node. This process ensures the coordination and unity between local and global features. Simultaneously, the learnable parameters in the fusion gating are continuously optimized through end-to-end training, enabling the model to gradually adapt to traffic characteristics in different regions and time periods, significantly improving the accuracy and reliability of the prediction results.
[0020] S4. Based on the global graph structure, multi-scale spatiotemporal features are generated using parallel multi-scale feature extraction pathways. S5. Align the dimensions of the multi-scale spatiotemporal features, and then calculate adaptive weights through attention fusion gating to generate fused features; The expression for generating the fusion feature in step S5 is: , ; in, Representation of features The weighting coefficients, Representation of features The weighting coefficients, Representation of features The weighting coefficients, Represents the normalization function. This represents the learnable weight matrix for attention fusion gating. Indicates the section of road time Features of time , On the road section time Features of time , On the road section time Features of time , This indicates the fusion feature.
[0021] like Figure 3 As shown, step S5 requires detailed explanation, as dimensional alignment is a prerequisite for multi-scale feature fusion. Because the features captured by the micro, meso, and macro pathways differ in temporal span and spatial coverage, their output feature dimensions are often inconsistent. This step introduces a 1×1 convolutional layer to unify the dimensions of the features from each pathway, mapping features at different scales to the same dimensional space, laying the foundation for subsequent adaptive weighted fusion. This dimensional alignment operation ensures the comparability of features at each scale during fusion, avoiding information loss or weight imbalance caused by dimensional differences.
[0022] Next, attention fusion gating learns the weight coefficients of features at each scale to achieve dynamic weighted fusion of multi-scale spatiotemporal features. In the formula, the weight coefficients of each feature are automatically optimized and generated by the model based on the current traffic conditions, which can accurately identify the contribution of features at different scales in specific scenarios. For example, during morning and evening rush hours, long-term dependent features captured by macroscopic pathways (such as the changing trend of peak traffic flow in the same period of history) have a more significant impact on the prediction results, and the model will assign them higher weights; while when a momentary traffic accident occurs on a road segment, the instantaneous traffic fluctuation features captured by microscopic pathways become key information, and the corresponding weight coefficients will increase accordingly. This dynamic weight allocation mechanism allows the model to flexibly adapt to different traffic scenarios and give full play to the advantages of features at each scale.
[0023] Furthermore, the learnable parameters of the attention fusion gating are continuously iterated and optimized through an end-to-end training process, further improving the accuracy and generalization ability of feature fusion. In practical applications, this mechanism can effectively handle complex traffic scenarios such as weekend effects and holiday peaks: for example, during weekends, the diurnal cycle patterns captured by meso-level pathways (weekend traffic peaks are delayed and less intense than weekdays) are given higher weights, helping the model accurately predict weekend-specific traffic patterns; while in long-distance traffic congestion propagation scenarios, the weights of long-distance spatial propagation features of macro-level pathways are significantly increased, ensuring the model accurately models the congestion spread trend. Through this adaptive fusion of multi-scale features, the model breaks through the fixed window limitation of traditional local spatiotemporal convolution, achieving comprehensive capture of short-term instantaneous fluctuations, medium-term diurnal cycle patterns, and long-term dependent features.
[0024] S6. Based on the fusion features, construct an improved spatiotemporal synchronous graph convolutional network to generate real-time traffic flow prediction results for highways.
[0025] The principle of a highway traffic flow prediction method in this embodiment is as follows: First, the multi-dimensional features of highway traffic flow, such as average driving speed and occupancy rate, are preprocessed. A shared MLP encoder transforms the features of each road segment into node state vectors. Then, an attention mechanism is used to dynamically calculate the real-time relationship strength between nodes to generate dynamic graph weight relationships. These weights are then adaptively fused with a predefined static graph structure using a dynamic-static fusion gating system, forming a global graph structure that considers both topological information and real-time traffic conditions. Next, parallel multi-scale feature extraction paths capture short-term instantaneous fluctuations, medium-term daily cycle patterns, and long-term dependency features of traffic flow. After dimensional alignment, the attention fusion gating system dynamically allocates feature weights at each scale according to the current scenario, generating fused features. Finally, an improved spatiotemporally synchronized graph convolutional network is constructed based on these fused features. The spatiotemporally synchronized graph convolutional operation deeply models the spatiotemporal correlation of traffic flow, outputting the real-time highway traffic flow prediction results. This method overcomes the limitation of traditional static graphs in adapting to changes in spatial correlation through the organic fusion of dynamic and static graphs. The adaptive fusion of multi-scale features achieves comprehensive coverage of different levels of traffic patterns, significantly improving the prediction accuracy and robustness of the model in complex traffic scenarios.
[0026] As an optional embodiment of the present invention, optionally, generating multi-scale spatiotemporal features based on the global graph structure using parallel multi-scale feature extraction pathways in step S4 includes: S401. Based on the global graph structure, the micro-path uses 3-5 time-step local spatiotemporal convolution to capture instantaneous changes, short-term fluctuations, and micro-spatiotemporal pattern generation features. ; In step S401, it is necessary to explain in detail that the micro-path selects 3-5 consecutive time steps as the local convolution window. The design of this window length is based on the typical time scale of instantaneous changes in highway traffic flow. It can effectively capture short-term (usually 5-25 minutes) traffic fluctuations such as sudden vehicle deceleration and partial lane occupancy, without introducing irrelevant historical noise due to an excessively large window. The local spatiotemporal convolution operation, based on the global graph structure, fuses the temporal features of each node within a short time window with the spatial correlation features of adjacent nodes: on the one hand, the temporal convolutional layer extracts the changing trends of indicators such as traffic flow and speed of the road segment within consecutive time steps; on the other hand, combined with the dynamically adjusted inter-node weight relationship in the global graph, the instantaneous state features of neighboring road segments are integrated into the representation of the current node, thereby accurately modeling the spatiotemporal interaction patterns at the micro level (such as the instantaneous impact of adjacent ramp merging / exiting on the main road traffic flow, and the traffic flow propagation effect over short distances). For example, when a lane on a main road section of a highway is temporarily closed due to construction, the 3-5 time-step convolution of the micro-path will quickly capture the decrease in traffic flow and speed in that section and the two adjacent upstream sections in the next 3 time steps, and encode these local anomalies as features. .
[0027] S402. Based on the aforementioned global graph structure, the mesoscopic pathway employs dilated spatiotemporal convolution to capture diurnal cycle patterns and generate features. ; In step S402, it is necessary to explain in detail that the mesoscopic pathway employs dilated spatiotemporal convolution. Its core principle is to expand the receptive field of the convolution by introducing a controllable dilation rate, while avoiding the addition of extra model parameters or computational complexity. For the diurnal cycle of highway traffic flow (typically manifested as an alternating pattern of peak, off-peak, and low-peak hours within 24 hours), this pathway sets the dilation rate to a value matching the diurnal time scale (for example, depending on the time step, the dilation rate can be adjusted to 4-8 to cover a time span of 1-2 hours), enabling the convolution operation to effectively capture periodic correlation features across time steps.
[0028] Based on the global graph structure, dilated spatiotemporal convolution fuses the long-term temporal features (covering a time range of several hours) of each node with the periodic variation features of spatially adjacent nodes. On the one hand, the dilated temporal convolutional layer extracts the traffic flow trend of the road segment at different times of the day (such as the periodic fluctuations of morning peak, evening peak, and nighttime off-peak). On the other hand, combined with the dynamically adjusted inter-node weight relationship in the global graph, the daily periodic propagation features of adjacent road segments (such as the gradual diffusion of peak traffic flow from upstream to downstream road segments) are integrated into the representation of the current node, thereby accurately modeling the spatiotemporal interaction patterns at the meso-level (such as the daily traffic flow distribution pattern of the highway network in the region, and the synchronicity or lag of peak periods of adjacent road segments).
[0029] For example, during the morning rush hour on weekdays, the mesoscopic pathway uses dilated convolution to capture the trend of gradually increasing traffic flow from suburban connecting roads to urban main roads—the traffic flow on the suburban connecting roads begins to rise at 6:30 AM, and after about an hour of propagation, the traffic flow on the urban main roads reaches its peak at 7:30 AM. This periodic propagation characteristic across time steps is encoded as a feature. On weekends, the mid-level channel can identify daily cycle patterns where peak hours are delayed (e.g., peaking around 9:00) and traffic intensity is lower than on weekdays.
[0030] The advantage of this design is that dilated spatiotemporal convolution can effectively cover the time range required for diurnal cycles without increasing the physical size of the convolution window, while preserving fine-grained correlations between time steps, avoiding the temporal resolution degradation problem caused by ordinary long-window convolution. By capturing meso-level periodic spatiotemporal patterns, features... It can provide medium-term pattern support for traffic flow changes in the model, complementing the instantaneous fluctuation characteristics of micro-pathways.
[0031] S403. Based on the global graph structure, the macroscopic pathway uses a spatial graph Transformer and a temporal Transformer sequential structure to capture long-term dependency generation features. The spatial graph Transformer captures long-range spatial dependencies by computing self-attention on the global graph structure.
[0032] The expression for calculating self-attention is: ; in, This represents the attention mechanism. Represents the query vector. Represents the key vector. Represents a value vector. Represents the normalization function. The dimension parameter represents the key vector. This represents a mask based on a static graph, which allows attention computation to preserve topological priors.
[0033] In step S403, it is necessary to explain in detail that the input of the spatial graph Transformer is a sequence of node features under the global graph structure. First, the node features are mapped to a query vector Q, a key vector K, and a value vector V through three independent linear transformation layers. For any node pair (u,v), the self-attention mechanism calculates the similarity between Qu and Kv to obtain the attention weight, and then combines it with the value vector V to generate the spatial augmentation features of the node. Among them, the static graph-based mask Muv plays a key role: if nodes u and v in the static graph have no direct road connection or are not major associated road segments, Muv will constrain the attention weight of that position to a very low value, effectively preserving the prior knowledge of road topology and avoiding the model learning false spatial dependencies that do not conform to the actual traffic network structure. For example, when capturing long-distance congestion propagation on inter-provincial highway trunk lines, the spatial graph Transformer can identify the association between road segments in upstream provinces and road segments in downstream provinces through self-attention, while the static graph mask ensures that road segments that are not adjacent and have no traffic flow interaction will not generate unnecessary attention weights.
[0034] Following the Spatial Graph Transformer, the Temporal Transformer module takes its output spatial augmentation features as input and captures long-term temporal dependencies through a self-attention mechanism in the temporal dimension. This module employs long-term time windows covering weeks to months, enabling it to identify traffic flow patterns across days, weeks, and even seasons, such as the peak traffic trends of a road segment during the National Day holiday in previous years, or the long-term traffic decline patterns caused by winter snow and ice. The self-attention calculation of the Temporal Transformer introduces a future time step mask to prevent the model from using future data for prediction, ensuring the rationality of the training process. For example, when predicting traffic during the New Year's Day holiday, the Temporal Transformer can capture the traffic change trends of that road segment before and after New Year's Day over the past three years, providing long-term temporal support for the current prediction.
[0035] The sequential structure of the spatial graph Transformer and the temporal Transformer enables collaborative modeling of long-distance spatial associations and long-term temporal dependencies: first, the spatial module breaks through local neighborhood limitations to capture cross-regional spatial interactions; then, the temporal module mines long-term patterns in historical data, covering macro-scale spatiotemporal features. This design allows for the generation of features from macro-level pathways. It can effectively supplement the limitations of micro and meso-level pathways, for example, when dealing with cross-regional holiday traffic migration scenarios. It can simultaneously capture the dual characteristics of "spatial propagation along inter-provincial trunk lines" and "temporal trends of holidays over the years," providing comprehensive macroscopic support for subsequent multi-scale fusion. Features generated through this serial structure... The instantaneous fluctuation characteristics of microscopic pathways Diurnal characteristics of mesoscopic pathways Together, they constitute a feature system covering different spatiotemporal scales.
[0036] As an optional embodiment of the present invention, optionally, in step S6, constructing an improved spatiotemporal synchronous graph convolutional network based on the fusion features to generate real-time traffic flow prediction results for highways includes: S601. Based on the fusion features, an improved spatiotemporal synchronous graph convolutional network is constructed using a multi-scale feature fusion graph convolutional module to generate a node embedding sequence. In step S601, it is necessary to explain in detail that the multi-scale feature fusion graph convolution module consists of stacked spatiotemporal synchronous convolutional layers and residual connection units. Its core function is to achieve synchronous modeling of spatial graph convolution and time-series convolution to deeply mine the complex spatiotemporal interaction relationships hidden in the fused features. Specifically, the module's input is a multi-scale fused feature sequence generated through attention fusion gating. The feature vector of each node integrates short-term instantaneous fluctuations, medium-term daily cycle patterns, and long-term dependency information. The spatiotemporal synchronous convolutional layer first performs graph convolution operations on the spatial dimension: based on the dynamic-static fusion global graph structure, by calculating the attention weights between nodes (inherited from the previous dynamic graph relationships), the fused features of adjacent nodes are weighted and aggregated to the current node, capturing the instantaneous propagation and correlation of traffic flow in space; simultaneously, it performs 1D convolution operations on the temporal dimension, using a temporal convolution kernel of size 3-5 to extract the temporal evolution trend of node features within continuous time steps, achieving synchronous feature enhancement in the spatiotemporal dimension. This synchronous operation breaks through the limitations of traditional spatiotemporal separation modeling and can more accurately depict the coupling relationship of traffic flow's "spatial propagation-temporal evolution".
[0037] To avoid the vanishing gradient problem in deep networks and preserve original feature information, a residual connection unit is connected after each spatiotemporally synchronized convolutional layer. The output features of the convolutional layer are element-wise added to the input features, and then the feature distribution is stabilized through layer normalization, which significantly improves the training efficiency and feature transfer capability of the model. For example, in the scenario of cross-segment congestion propagation during the morning rush hour, the spatiotemporally synchronized convolutional layer can simultaneously capture the spatial diffusion of upstream congested segments to adjacent downstream segments (spatial graph convolution) and the increasing trend of congestion intensity over time (temporal convolution). The residual connection retains the details of instantaneous traffic fluctuations captured by the micro-paths in the fused features, enabling the model to accurately predict the speed and range of congestion spread. During the weekend off-peak hours, the module effectively identifies the weekend-specific "sparse distribution of long-distance traffic flow during off-peak hours" pattern by simultaneously modeling the daily cycle of meso-paths (temporal convolution) and the spatial linkage pattern of each segment (spatial graph convolution) and combining the initial features of the residual connection.
[0038] All learnable parameters in the module (including the kernel weights of the spatiotemporally synchronized convolutional layers and the scaling factors of residual connections) are continuously optimized through an end-to-end backpropagation process. These parameters are updated collaboratively with those in the preceding attention fusion gating and dynamic graph generation modules, further enhancing the overall consistency and generalization ability of the model. After 3-5 layers of stacked spatiotemporally synchronized convolutions and residual connections, the fused features are deeply encoded into a sequence of node embeddings containing multi-level spatiotemporal associations. Each node's embedding vector retains the feature details of its own road segment while integrating the spatial interactions and long- and short-term temporal patterns of surrounding road segments.
[0039] S602. Based on the node embedding sequence, the spatiotemporal synchronous convolutional layer of the improved spatiotemporal synchronous graph convolutional network is used to aggregate neighborhood information and capture temporal dependencies to generate a spatiotemporal synchronous feature map. In step S602, it is necessary to explain in detail that the input to the spatiotemporal synchronous convolutional layer is the node embedding sequence output from S601. This sequence integrates the original feature details of microscopic instantaneous fluctuations, mesoscopic diurnal cycle patterns, macroscopic long-term dependencies, and residual preservation. This layer deeply mines the coupled spatiotemporal patterns of traffic flow through synchronous operations of spatial neighborhood aggregation and temporal dependency capture. In the spatial neighborhood aggregation stage, based on a dynamic and static integrated global graph structure, the weighted sum of the embedding vectors of each node's directly adjacent nodes (including key related nodes with dynamically adjusted weights, such as upstream and downstream main road segments and adjacent ramps) is calculated. The weights are determined by the dynamic spatial attention coefficient between nodes, which integrates the static relationship of road topology and the spatial propagation intensity of real-time traffic flow (such as the direction and rate of congestion spread) to ensure that core neighborhood information is aggregated first. For example, when a highway ramp is closed due to an accident, spatial neighborhood aggregation will weight and integrate the "flow backlog" embedding feature of the upstream main road segment and the "flow drop" feature of the downstream main road segment into the ramp node, accurately depicting the spatial radiation effect of the accident.
[0040] The temporal dependency capture stage employs 1D causal convolution (utilizing only past time step features), with the convolution kernel size set to 2-4 time steps to match the typical timescale of short-term propagation in highway traffic flow (e.g., the average propagation time from upstream to downstream is 10-20 minutes). Causal convolution extracts the temporal evolution trend of node embedding sequences, avoiding future information leakage. For example, during the morning rush hour, temporal dependency capture identifies the traffic flow increase trend starting at 6:00 AM on upstream suburban road sections and predicts the transmission rhythm of this trend to urban main road sections, providing temporal support for subsequent traffic peak prediction.
[0041] The spatiotemporal synchronization operation performs element-wise weighted fusion of spatial neighborhood aggregation results and temporal causal convolution results. The fusion weights are dynamically optimized through end-to-end model training to ensure the coupling and consistency of spatiotemporal information. For example, during peak holiday return travel periods, this layer synchronously captures: spatially, the merging of traffic flow from suburban connecting lines to urban main lines (neighborhood aggregation); temporally, the gradually increasing trend of merging traffic flow over time (temporal dependence), and fuses the two into a high-response feature region in the spatiotemporal synchronization feature map.
[0042] The final spatiotemporal synchronization feature map is presented in the form of a three-dimensional tensor of "time step × road segment node × feature dimension". Each position corresponds to the coupled spatiotemporal features of a certain road segment at a specific time step, which not only preserves the temporal continuity of a single node, but also reflects the spatial correlation of multiple nodes.
[0043] S603. Based on the spatiotemporal synchronization feature map, configure the loss function and optimizer of the improved spatiotemporal synchronization graph convolutional network using an end-to-end training framework to generate the optimized network parameters of the improved spatiotemporal synchronization graph convolutional network. In step S603, it is necessary to explain in detail that the end-to-end training framework takes the spatiotemporal synchronous feature map as input and real traffic flow data as labels, and achieves global optimization of network parameters by configuring loss function, optimizer and training strategy.
[0044] First, let's discuss the design of the loss function. The design of the loss function may vary depending on the actual training needs, and this embodiment will not provide a detailed explanation, as it is a conventional technical choice for those skilled in the art. For example, mean squared error (MSE) can be chosen as the loss function to measure the difference between the predicted traffic and the actual traffic.
[0045] Secondly, regarding the optimizer and learning rate scheduling: the AdamW optimizer was chosen, which combines Adam's adaptive learning rate characteristics with the regularization capability of weight decay to effectively alleviate overfitting. The initial learning rate was set to 0.0001, and a cosine annealing scheduling strategy was adopted: in each training cycle, the learning rate gradually decreased from the initial value to 0.00006, and then increased back to 10% of the initial value, repeating this cycle to ensure rapid convergence in the early stages while supporting fine-tuning of parameters in the later stages.
[0046] Training Process and Regularization: Batch training (batch size 32) was used with 200 iterations. Every 5 iterations, MAE and RMSE metrics were calculated on the validation set (the calculation process is based on existing technology and will not be detailed here). If the MAE on the validation set showed no improvement for 10 consecutive iterations, an early stopping strategy was triggered, and the current optimal parameters were saved. Simultaneously, a dropout layer (dropout rate 0.15) was inserted after the spatiotemporal synchronous convolutional layer to randomly discard some feature nodes, enhancing the model's generalization ability. For example, during training for weekday morning rush hour scenarios, the weighted mechanism of the loss function focused the model on learning the temporal and spatial relationships of traffic flow propagation from suburbs to main urban roads. On the validation set, the MAE during the morning rush hour decreased by 18% compared to the unweighted version, significantly improving prediction accuracy during key periods.
[0047] Through the coordinated configuration of the loss function, optimizer, and training strategy, the model can efficiently learn multi-scale spatiotemporal patterns of traffic flow and ultimately output optimized network parameters.
[0048] S604. Based on the optimized network parameters, a dynamic learning rate adjustment strategy and gradient clipping mechanism are used to generate stable model weights for training. In step S604, it is necessary to explain in detail the introduction of the dynamic learning rate adjustment strategy and gradient pruning mechanism, which aim to further improve the stability and convergence efficiency of model training. The dynamic learning rate adjustment strategy adaptively adjusts the learning rate according to the changing trend of the loss function during training. Specifically, at the end of each training cycle, the relative rate of change between the current loss value and the loss value of the previous cycle is calculated. If the rate of change is lower than a preset threshold (e.g., 0.001), the learning rate is reduced to 80% of the current value to refine parameter updates; if the rate of change is high and the loss shows an oscillating trend, the learning rate is appropriately increased to avoid getting trapped in local optima. For example, in dealing with cross-regional long-distance traffic flow prediction scenarios, dynamic learning rate adjustment can effectively address the problem of uneven data distribution, enabling the model to exhibit higher accuracy in traffic flow prediction on complex road sections.
[0049] Gradient clipping mechanisms prevent gradient explosion during training by limiting the norm range of the gradient. Specifically, after each backpropagation, the L2 norm of the gradients of all parameters is calculated. If this norm exceeds a preset threshold (e.g., 5.0), the gradient is scaled proportionally to within the threshold range. This mechanism is particularly suitable for highway traffic flow prediction tasks, where the time-series nature of the data can lead to significant gradient accumulation effects. For example, in traffic flow prediction during peak holiday periods, gradient clipping ensures that the model maintains stable parameter updates even when facing extreme traffic fluctuations, avoiding training crashes caused by gradient anomalies.
[0050] S605. Based on the stable model weights, use a multi-scale feature fusion verification mechanism to monitor the contribution of features at each scale and generate a basis for structural adjustment. In step S605, it is necessary to explain in detail that the core of the multi-scale feature fusion verification mechanism lies in quantifying the contribution of features at each scale to the final prediction result. Specifically, this mechanism evaluates the performance of micro-level instantaneous fluctuation features, meso-level daily cycle features, and macro-level long-term dependent features under different traffic scenarios by designing a feature importance scoring function. For example, in the morning rush hour congestion propagation scenario, micro-level features may play a significant role in capturing short-term traffic flow changes, while macro-level features are more suitable for predicting the trend of cross-regional holiday traffic migration.
[0051] To achieve this goal, the validation mechanism introduces a gradient-based feature importance analysis method. By calculating the gradient of the model's predicted results relative to features at various scales, the influence of different features on the final decision is measured. Simultaneously, the feature importance scores are further corrected by incorporating the spatiotemporal distribution characteristics of actual traffic flow data. For example, when dealing with scenarios of long-term traffic flow decline due to winter snow and ice, the validation mechanism prioritizes increasing the weight of macroscopic features to better reflect the impact of seasonal trends on traffic flow.
[0052] The verification mechanism also dynamically adjusts the proportion of multi-scale feature fusion through comparative experiments. For example, in traffic prediction tasks for specific road segments, if the contribution of meso-level diurnal cycle features is found to be significantly higher than that of other features, its weight in the fusion process is appropriately increased, and the interference of redundant features is reduced. This dynamic adjustment strategy not only improves the model's prediction accuracy but also effectively reduces computational complexity.
[0053] Finally, the structural adjustment criteria generated by the multi-scale feature fusion verification mechanism are presented in the form of a visualization report, including the importance score distribution of features at each scale, adjustment suggestions, and corresponding traffic scenario examples. This information provides clear directions for subsequent model optimization. For example, when dealing with complex holiday traffic peaks, the model's modeling effect on long-distance spatial correlations and long-term temporal dependencies can be further improved by enhancing the expressive power of macroscopic features.
[0054] S606. Based on the aforementioned structural adjustment criteria, the fused features are mapped to future time windows using the prediction output layer of the improved spatiotemporal synchronous graph convolutional network to generate a sequence of traffic prediction values. In step S606, it is necessary to explain in detail that the prediction output layer of the improved spatiotemporal synchronous graph convolutional network generates a sequence of traffic flow prediction values by mapping the fused features to future time windows. Specifically, this output layer is based on the optimized multi-scale fused features in S605, combined with the deep encoding information of the spatiotemporal synchronous feature map, and uses a fully connected neural network or convolutional projection module to achieve accurate inference of future traffic flow.
[0055] In the feature mapping process, the spatiotemporal synchronous feature map is first transformed in dimension to extract the potential trend features of each road segment node within the future time window. These trend features include both the continuous prediction of short-term instantaneous fluctuations and the extrapolation results of medium- and long-term dependent patterns. For example, in the scenario of peak return travel during holidays, the output layer can capture the increasing trend of traffic flow from suburbs to main urban roads and extend it to several future time steps to form a continuous traffic flow change curve.
[0056] To improve prediction accuracy, a temporal attention mechanism is introduced in the output layer to dynamically adjust the weight of the influence of different historical time steps on the future window. For example, in the scenario of morning rush hour congestion propagation, features from recent time steps (such as the surge in traffic in the first 5 minutes) are given higher weight, while features from more distant time steps gradually decay, thus more accurately reflecting the changing patterns of real-time traffic conditions. Furthermore, a similar attention mechanism is employed in the spatial dimension, prioritizing neighborhood information with high relevance to the target node and avoiding interference from irrelevant road segments.
[0057] The final generated traffic flow forecast sequence is presented as a two-dimensional matrix of "time window × road segment node", where each element represents the predicted traffic flow value for a specific road segment at a future time step. These forecasts can be used for real-time traffic monitoring and scheduling. For example, in response to sudden congestion events, the forecast sequence can identify potential bottleneck road segments in advance and guide the implementation of dynamic traffic restriction or diversion measures.
[0058] S607. Based on the traffic flow prediction value sequence, the optimal model weights are loaded using an online inference process to generate traffic flow prediction results for each section of the highway within the next n minutes.
[0059] In step S607, it is necessary to explain in detail that the core of the online inference process lies in efficiently loading the optimal model weights and combining them with real-time input data to generate traffic flow predictions for each section of the highway within the next n (15) minutes. Specifically, the process first starts from the sequence of traffic flow prediction values obtained in step S606 and passes it as the initial input to the inference module. The inference module ensures that the prediction results reflect the model's optimal performance on the validation set by calling the best model weights saved during training.
[0060] In practice, the online inference process employs a lightweight design to meet real-time requirements. For example, for each round of inference, the system only extracts the latest observation data within the current time window (such as actual traffic flow, weather conditions, and event information in the last 10 minutes) and concatenates it with historical features to form a complete input tensor. This dynamic update mechanism not only reduces redundant computation but also enhances the model's responsiveness to sudden traffic events. For instance, when a road segment is temporarily closed due to an accident, the inference process can quickly capture this change and adjust the traffic flow prediction results for the relevant road segment.
[0061] Furthermore, to further improve prediction accuracy, an adaptive correction mechanism is introduced into the online inference process. This mechanism performs post-processing corrections on the output results based on the residual distribution between actual observation data and predicted values. For example, if the prediction error is found to be high during certain specific time periods (such as evening rush hour), the error pattern is determined through statistical analysis, and the prediction weights of the corresponding road segments are adjusted accordingly in subsequent inference. This method is particularly suitable for long-term prediction tasks in complex scenarios, such as traffic fluctuations during holiday return peaks or severe weather conditions.
[0062] The final traffic flow prediction results are output in a structured format, including the time-step flow values and confidence intervals for each road segment over the next n minutes. For example, in terms of congestion warning, the system can identify potential bottlenecks in advance based on the prediction results and trigger emergency plans; in terms of resource scheduling, it can effectively alleviate traffic pressure by optimizing traffic light timings or guiding vehicles to detour.
[0063] Step 1: Traditional STSGCN uses a predefined static adjacency matrix. This graph structure, based on distance or connectivity, cannot reflect the real-time dynamic changes in traffic flow. Its main drawback is the rigidity of spatial relationships, making it difficult to adapt to sudden events. For example, when a traffic accident or traffic control occurs, the actual impact relationships between road segments change drastically, and the static graph cannot capture such abrupt changes. Furthermore, it ignores the impact of traffic conditions. During peak-hour tidal flow and off-peak flow patterns, the spatial correlation between road segments differs significantly, and the static graph also fails to reflect these changes. Therefore, this paper designs a data-driven dynamic graph learning module, including three sub-modules: a node state encoder, a dynamic relationship calculation layer, and a dynamic-static fusion gating system.
[0064] 1) The role of the node state encoder is to encode the multidimensional features (flow, speed, occupancy) of each road segment within the most recent time window into a high-dimensional state vector. A shared MLP is used to encode the temporal features of each node, outputting the node embedding. ,in It is the number of nodes. It is the embedded dimension.
[0065] 2) The dynamic relationship calculation layer is used to calculate the real-time relationship strength between any two nodes.
[0066] Attention mechanism: , ; 3) Dynamic-static fusion gating adaptively fuses dynamically learned graph structures with prior static graph structures, taking into account both the basic topology and the real-time state.
[0067] , ; Step 2: The local spatiotemporal synchronous convolution module of the original STSGCN has limitations. Firstly, its receptive field is limited, and the fixed local time window makes it difficult to capture long-term patterns, such as morning and evening rush hours and weekend effects. Secondly, its spatial range is limited, only capturing the influence of directly adjacent road segments and failing to model long-distance spatial propagation. Therefore, this paper designs a hierarchical multi-scale spatiotemporal feature fusion architecture to extract and adaptively fuse spatiotemporal features of different scales in parallel.
[0068] The core architecture is a Multi-Scale Fusiongraph Convolutional Module (MSFGCM), which includes three parallel feature extraction pathways: 1) A micro-scale pathway describes local details, maintaining the local spatiotemporal synchronous convolution of the original STSGCN, using a small time window (3-5 time steps) to capture instantaneous changes, short-term fluctuations, and micro-spatiotemporal patterns of traffic flow, and outputting features as follows: 2) Capturing diurnal cyclical patterns through mesoscale pathways, using dilated spatiotemporal convolution to expand the receptive field and capture diurnal cyclical patterns, such as the continuous upward trend of the morning rush hour, with the output feature being... 3) Macro-scale pathways capture long-term dependencies and global context, employing a serial structure of spatial graph Transformer + temporal Transformer. The spatial graph Transformer computes self-attention on the global graph structure to capture long-distance spatial dependencies: ;in For static graph-based masking, attention computation preserves topological priors; the temporal Transformer processes long sequences, capturing long-term trends and periodic patterns, and outputs features. .
[0069] The feature fusion strategy is an attention-based, multi-scale fusion gating adaptive weight fusion method. First, scale feature alignment is performed, and then... , , Alignment to the same dimension is achieved through 1×1 convolution; then context weights are calculated for each position. (Road segment I, time t), calculate the weights of features at each scale: The weighted fusion yields the final features: Step 3: Replace the original spatiotemporal synchronization graph convolutional module (STSGCM) with MSFGCM to obtain a new network structure.
[0070] This invention effectively solves two core problems in existing traffic flow prediction technologies: insufficient capture of dynamic spatial relationships and inadequate utilization of multi-scale temporal features. Through the synergistic effect of dynamic graph learning and multi-scale spatiotemporal feature fusion, it effectively addresses these issues. The resulting improvements in prediction accuracy, enhanced scenario robustness, deeper dynamic relationship modeling, and improved engineering applicability enable this invention to provide a more powerful, reliable, and intelligent "predictive brain" for modern intelligent traffic management systems, possessing significant practical application value and market potential.
[0071] Example 2 A computer-readable storage medium comprising: A memory on which computer programs are stored; A processor is configured to execute the program in the memory to implement a highway traffic flow prediction method as described in Embodiment 1.
[0072] It should be noted that the electronic device disclosed in this embodiment includes a processor and a memory for storing processor-executable instructions. The processor is configured to implement any of the aforementioned highway traffic flow prediction methods when executing the executable instructions.
[0073] It should be noted here that the number of processors can be one or more. Furthermore, the electronic device in this embodiment may also include input devices and output devices. The processor, memory, input devices, and output devices can be connected via a bus or other means, without specific limitations herein.
[0074] As a computer-readable storage medium, the memory can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the highway traffic flow prediction method in this disclosure. The processor executes various functional applications and data processing of the electronic device by running the software programs or modules stored in the memory.
[0075] Input devices can be used to receive input digital numbers or signals. These signals can be key signals related to user settings and function control of the device / terminal / server. Output devices can include display devices such as screens.
[0076] Example 3 A highway traffic flow prediction system based on an improved spatiotemporal synchronous graph convolutional network includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement a highway traffic flow prediction method when executing executable instructions.
[0077] It should be noted that the computer device includes a processor, a memory, and may also include one or more of a multimedia component, an input / output (I / O) interface, and a communication component.
[0078] The processor controls the overall operation of the computer device to complete all or part of the steps in the above-mentioned highway traffic flow prediction method.
[0079] Memory is used to store various types of data to support the operation of the computer device. This data may include, for example, instructions for any application or method used to operate on the computer device, as well as application-related data. Memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0080] The multimedia component may include a screen and an audio component, wherein the screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals; for example, the audio component may include a microphone for receiving external audio signals, the received audio signals may be further stored in memory or transmitted via a communication component; the audio component may also include at least one speaker for outputting audio signals.
[0081] I / O interfaces provide interfaces between the processor and other interface modules, such as keyboards, mice, buttons, etc.; these buttons can be virtual buttons or physical buttons.
[0082] The communication component is used for wired or wireless communication between the computer device and other devices; wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G or 5G, or one or more combinations thereof, and the corresponding communication component may include: Wi-Fi module, Bluetooth module, NFC module, mobile communication module.
[0083] As a preferred embodiment, the computer device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-described highway traffic flow prediction method.
[0084] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for predicting highway traffic flow, characterized in that, The method includes: Based on multi-dimensional feature data of traffic flow, speed, and occupancy rate collected in real time on highway sections, a shared MLP encoder is used to generate node state vectors. Based on the node state vector, the real-time relationship strength between any nodes is dynamically calculated using an attention mechanism to generate dynamic graph weight relationships. The dynamic graph weight relationship is adaptively fused with the prior static graph structure using dynamic-static fusion gating to generate a global graph structure. Based on the global graph structure, multi-scale spatiotemporal features are generated using parallel multi-scale feature extraction pathways. The multi-scale spatiotemporal features are dimensionally aligned, and then adaptive weights are calculated through attention fusion gating to generate fused features; An improved spatiotemporal synchronous graph convolutional network is constructed based on the fusion features to generate real-time traffic flow prediction results for highways.
2. The method for predicting highway traffic flow as described in claim 1, characterized in that, The expression for calculating the real-time relationship strength between any nodes is: in, This indicates that in the attention mechanism, from the node To the node The original attention score, Represents a non-linear activation function. This represents a learnable attention vector. Represents the learnable weight matrix. , Representing nodes respectively and The state vector, Represents the standardized nodes in a dynamic graph. To the node Attention weight score Indicates the number of nodes. This indicates that in the attention mechanism, from the node To the node The original attention score.
3. The method for predicting highway traffic flow as described in claim 1, characterized in that, The expression for adaptively fusing the dynamic graph weight relationship with the prior static graph structure using dynamic-static fusion gating is as follows: in, Represents the adaptive fusion coefficient. This represents the activation function. This represents the learnable weight matrix in fusion gating. Represents the state vector. Represents the global state vector. Represents the feature vector of a dynamic graph. surface The node embedding matrix at time step, This indicates a global pooling operation. This indicates the corresponding bias term. This represents the final adjacency matrix after the static and dynamic elements are merged. This represents the weight relationship in a dynamic graph. This represents the weight relationships in a static graph.
4. The method for predicting highway traffic flow as described in claim 1, characterized in that, Generating multi-scale spatiotemporal features includes: Based on the global graph structure, the micro-paths employ 3-5 time-step local spatiotemporal convolution to capture instantaneous short-term fluctuations and generate micro-spatiotemporal patterns. ; Based on the aforementioned global graph structure, the mesoscopic pathway employs dilated spatiotemporal convolution to capture diurnal periodic patterns and generate features. ; Based on the aforementioned global graph structure, the macroscopic pathway employs a spatial graph Transformer and a temporal Transformer sequential structure to capture long-term dependency generation features. .
5. The method for predicting highway traffic flow as described in claim 4, characterized in that, The spatial graph Transformer captures long-range spatial dependencies by computing self-attention on the global graph structure.
6. The method for predicting highway traffic flow as described in claim 5, characterized in that, The expression for calculating self-attention is: in, This represents the attention mechanism. Represents the query vector. Represents the key vector. Represents a value vector. Represents the normalization function. The dimension parameter represents the key vector. This represents a mask based on a static graph, which allows attention computation to preserve topological priors.
7. The method for predicting highway traffic flow as described in claim 1, characterized in that, The expression for generating fused features is: in, Representation of features The weighting coefficients, Representation of features The weighting coefficients, Representation of features The weighting coefficients, Represents the normalization function. This represents the learnable weight matrix for attention fusion gating. Indicates the section of road time Characteristics of time , On the road section time Characteristics of time , On the road section time Characteristics of time , This indicates the fusion feature.
8. The method for predicting highway traffic flow as described in claim 1, characterized in that, An improved spatiotemporal synchronous graph convolutional network is constructed based on the aforementioned fusion features to generate real-time traffic flow prediction results for highways, including: Based on the fusion features, an improved spatiotemporal synchronous graph convolutional network is constructed using a multi-scale feature fusion graph convolutional module to generate a node embedding sequence. Based on the node embedding sequence, the spatiotemporal synchronous convolutional layer of the improved spatiotemporal synchronous graph convolutional network is used to aggregate neighborhood information and capture temporal dependencies to generate a spatiotemporal synchronous feature map. Based on the aforementioned spatiotemporal synchronization feature map, the loss function and optimizer of the improved spatiotemporal synchronization graph convolutional network are configured using an end-to-end training framework to generate the optimized network parameters of the improved spatiotemporal synchronization graph convolutional network. Based on the optimized network parameters, a dynamic learning rate adjustment strategy and gradient clipping mechanism are used to generate stable model weights for training. Based on the stable model weights, a multi-scale feature fusion verification mechanism is used to monitor the contribution of features at each scale and generate a basis for structural adjustment. Based on the aforementioned structural adjustment criteria, the prediction output layer of the improved spatiotemporal synchronous graph convolutional network is used to map the fused features to future time windows to generate a sequence of traffic prediction values. Based on the traffic flow prediction sequence, the optimal model weights are loaded using an online inference process to generate traffic flow prediction results for each section of the highway within the next n minutes.
9. A computer-readable storage medium, characterized in that, include: A memory on which computer programs are stored; A processor for executing the program in the memory to implement a highway traffic flow prediction method according to any one of claims 1 to 8.
10. A highway traffic flow prediction system based on an improved spatiotemporal synchronous graph convolutional network, characterized in that, The system includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement the highway traffic flow prediction method according to any one of claims 1 to 8 when executing the executable instructions.
Citation Information
Patent Citations
Space-time adaptive dynamic graph convolutional network traffic flow prediction method
CN118629226A
Traffic flow prediction method based on adaptive dynamic multi-scale space-time hypergraph convolution
CN120340245A
Road traffic flow prediction method based on space-time mixed attention network
CN120526608A
Adaptive graph learning traffic flow prediction system and method based on multi-dimensional time
CN120873472A
Cited By
Traffic network scheduling control method and system based on space-time big data, and electronic equipment
CN121963509A