Two-way coupling modulation traffic flow space-time prediction method and system

By employing a bidirectional coupling modulation method for traffic flow spatiotemporal prediction, the problem of the bidirectional coupling relationship between the temporal trend and spatial correlation of traffic flow is solved, achieving high-precision and low-latency traffic flow prediction and supporting real-time scheduling and planning of intelligent transportation systems.

CN122290334APending Publication Date: 2026-06-26NANJING COMM INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING COMM INST OF TECH
Filing Date
2026-03-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing traffic flow prediction models cannot adapt to the two-way coupling relationship between the temporal trend and spatial correlation of traffic flow, resulting in low prediction accuracy, large number of parameters, and high inference latency in complex scenarios, making it difficult to meet the real-time scheduling requirements of intelligent transportation systems.

Method used

A bidirectional coupled modulation traffic flow spatiotemporal prediction method is adopted. By acquiring the feature embedding tensor of traffic flow data, multi-scale temporal feature extraction and dynamic spatial feature generation are performed. Combined with dynamic fusion weights and adaptive fusion features, high-precision traffic flow prediction is achieved.

Benefits of technology

It improves the accuracy and real-time performance of traffic flow forecasting, and is suitable for short-term and long-term traffic flow forecasting in urban and highway networks. It supports applications such as dynamic signal control, intelligent route planning, and congestion emergency management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122290334A_ABST
    Figure CN122290334A_ABST
Patent Text Reader

Abstract

This application discloses a bidirectional coupled modulation method and system for spatiotemporal prediction of traffic flow, relating to the field of intelligent transportation. The method includes: acquiring traffic flow data and converting it into a feature embedding tensor; the traffic flow data includes sensing data from several nodes in a road network; extracting multi-scale temporal features from the feature embedding tensor; generating dynamic spatial features forward based on the feature embedding tensor, and reversing the time dependency based on the dynamic spatial features to obtain bidirectional coupled features that fuse spatiotemporal characteristics; obtaining dynamic fusion weights based on differences in sample coupling modes and the spatial correlation strength of nodes; obtaining adaptive fusion features based on the dynamic fusion weights, the feature embedding tensor, and the bidirectional coupled features; and outputting traffic prediction results based on the adaptive fusion features. This invention can improve the accuracy and real-time performance of traffic prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation systems technology, and in particular to a bidirectional coupled modulation method and system for spatiotemporal prediction of traffic flow. Background Technology

[0002] The core challenge of traffic flow prediction lies in accurately modeling the two-way coupling relationship between temporal trend modulation of spatial correlation and spatial event feedback of temporal evolution. Temporal flow fluctuations (such as morning and evening rush hours) dynamically change the spatial dependence between road network nodes, while spatial emergencies (such as traffic accidents and road construction) in turn interfere with the temporal flow evolution rhythm, forming a close interactive closed loop.

[0003] Existing technologies have two major flaws that prevent them from adapting to this core feature:

[0004] 1. Limitations of unidirectional dependency modeling: Traditional models only capture single relationships between time and space or space and time. For example, STGCN (Spatial-Temporal Graph Convolutional Network) adopts a serial architecture of static graph convolution and temporal convolution, which cannot restore the original bidirectional feedback characteristics of traffic flow. Although spatiotemporal Transformer-type models strengthen long-range dependencies, they still follow the logic of first separating the encoding and then statically splicing, resulting in the irreversible loss of coupling information.

[0005] 2. Insufficient adaptation of static fusion: Existing methods fuse spatiotemporal information by splicing together fixed weights or posterior features, which cannot adapt to dynamic changes in coupling strength, such as the time trend dominating during peak hours, the spatial dependence dominating during off-peak hours, and the random fluctuation of spatial-temporal coupling strength during holidays. For example, although the dynamic graph convolution of DGCN-TRL (Dynamic Graph Convolutional Networks with Temporal Representation Learning for Traffic Flow Prediction) can adjust spatial weights, temporal features are still extracted independently without semantic-level interaction.

[0006] The aforementioned shortcomings lead to a significant decrease in the prediction accuracy of existing models in complex scenarios. Furthermore, most models have a large number of parameters and high inference latency, making it difficult to meet the real-time scheduling requirements of ITS (Intelligent Traffic Systems). Summary of the Invention

[0007] Therefore, it is necessary to provide a bidirectional coupled modulation traffic flow spatiotemporal prediction method and system to address the above-mentioned technical problems, thereby improving prediction accuracy and real-time performance.

[0008] Firstly, this application provides a bidirectional coupled modulation method for spatiotemporal prediction of traffic flow. The method includes:

[0009] Traffic flow data is acquired and transformed into a feature embedding tensor; the traffic flow data includes sensor data from several nodes in the road network.

[0010] Multi-scale temporal feature extraction from feature embedding tensors;

[0011] Dynamic spatial features are generated forward based on the feature embedding tensor, and time dependence is corrected backward based on the dynamic spatial features to obtain bidirectional coupled features that fuse spatiotemporal features.

[0012] Based on the differences in sample coupling modes and the strength of node spatial association, dynamic fusion weights are obtained. Adaptive fusion features are obtained based on dynamic fusion weights, feature embedding tensors, and bidirectional coupling features.

[0013] Traffic prediction results are output based on adaptive fusion features.

[0014] In one embodiment, multi-scale temporal feature extraction from the feature embedding tensor includes:

[0015] Initialize the expansion rate and the expansion rate set;

[0016] Entering the iteration process: Using the initial expansion rate as the current expansion rate, add the current expansion rate to the expansion rate set, and calculate the maximum single-branch effective receptive field of the current expansion rate set; if the maximum single-branch effective receptive field meets the preset conditions, update the expansion rate set according to the current expansion rate, and use... To advance to the next iteration at the current expansion rate, The expansion rate used in the current iteration is set; otherwise, the set of expansion rates is not updated. The preset condition is that the maximum effective receptive field of a single branch is not greater than the length of the input sequence of the feature embedding tensor.

[0017] Based on the set of expansion rates at the end of the iteration, multi-scale temporal feature extraction is performed on the feature embedding tensor.

[0018] Based on the set of expansion rates at the end of the iteration, multi-scale temporal feature extraction of the feature embedding tensor includes:

[0019] Based on the set of dilation rates at the end of the iteration, temporal features at the corresponding scale are extracted through parallel dilated convolution branches with causal masks.

[0020] Multi-scale temporal features are concatenated along the channel dimension to obtain multi-scale aggregated features;

[0021] Multi-scale aggregated features are subjected to dimensionality compression and context information extraction to obtain contextual features;

[0022] Based on the gated fusion weights, context features and orthogonal complement features of context features are weighted and fused to obtain multi-scale temporal features; wherein, the gated fusion weights are determined by the multi-scale aggregated features.

[0023] In one embodiment, forward generation of dynamic space features based on feature embedding tensors includes:

[0024] A dynamic adjacency matrix is ​​generated, and spatial features are aggregated on the feature embedding tensor based on the dynamic adjacency matrix to obtain dynamic spatial features.

[0025] In one embodiment, generating a dynamic adjacency matrix includes:

[0026] Generate a corresponding modulation weight for each edge in the road network, and generate a dynamic adjacency matrix based on the modulation weight;

[0027] The modulation weights are jointly determined by the low-rank representations of the nodes at both ends of the corresponding edge, and the low-rank representations are generated by embedding tensors based on the features of the corresponding nodes.

[0028] In one embodiment, reverse correction of time dependency based on dynamic space characteristics includes:

[0029] The temporal attention weights are adaptively adjusted based on the dynamic spatial characteristics.

[0030] In one embodiment, obtaining the bidirectional coupling features of the fused spatiotemporal features includes:

[0031] The gating fusion mechanism is used to fuse multi-scale temporal features and dynamic spatial features to obtain bidirectional coupled features.

[0032] In one embodiment, obtaining dynamic fusion weights based on differences in sample coupling patterns and the strength of node spatial associations includes:

[0033] Select a sample time period and calculate the sample feature distribution entropy based on the bidirectional coupling characteristics of the traffic flow data within the sample time period, which is used to quantify the differences in sample coupling patterns.

[0034] The degree centrality of nodes is calculated based on the dynamic adjacency matrix, which is used to quantify the spatial association strength of nodes.

[0035] Dynamic fusion weights are obtained based on the sample feature distribution entropy and node degree centrality.

[0036] In one embodiment, obtaining adaptive fusion features based on dynamic fusion weights, feature embedding tensors, and bidirectional coupled features includes:

[0037] Based on dynamic fusion weights, the bidirectional coupling features and the orthogonal complement features of the bidirectional coupling features relative to the feature embedding tensor are weighted and fused to obtain adaptive fusion features.

[0038] Secondly, this application also provides a bidirectional coupled modulated traffic flow spatiotemporal prediction system. The system includes:

[0039] The data preprocessing module is used to acquire traffic flow data and convert it into a feature embedding tensor; the traffic flow data includes data from several sensor nodes.

[0040] The multi-scale temporal feature extraction module is used to extract multi-scale temporal features from the feature embedding tensor.

[0041] The long-range bidirectional coupled coding module is used to generate dynamic spatial features forward based on multi-scale temporal features, and to correct the temporal dependence in reverse based on the dynamic spatial features, so as to obtain bidirectional coupled features that fuse spatiotemporal features.

[0042] The sample-node adaptive fusion module is used to obtain dynamic fusion weights based on the differences in sample coupling modes and the strength of node spatial associations, and to obtain adaptive fusion features based on the dynamic fusion weights, feature embedding tensors, and bidirectional coupling features.

[0043] The prediction output module is used to output traffic prediction results based on adaptive fusion features.

[0044] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the aforementioned bidirectional coupled modulation traffic flow spatiotemporal prediction method.

[0045] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the aforementioned bidirectional coupled modulation traffic flow spatiotemporal prediction method.

[0046] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in the bidirectional coupled modulation traffic flow spatiotemporal prediction method described above.

[0047] The aforementioned bidirectional coupled modulation traffic flow spatiotemporal prediction method and system acquires traffic flow data and transforms it into a feature embedding tensor. The traffic flow data includes sensing data from several nodes in the road network. Multi-scale temporal features are extracted from the feature embedding tensor. Dynamic spatial features are generated forward based on the feature embedding tensor, and temporal dependencies are corrected backward based on these dynamic spatial features to obtain bidirectional coupled features that fuse spatiotemporal characteristics. Dynamic fusion weights are obtained based on differences in sample coupling patterns and the spatial correlation strength of nodes. Adaptive fusion features are obtained based on the dynamic fusion weights, the feature embedding tensor, and the bidirectional coupled features. Traffic prediction results are output based on the adaptive fusion features. This method is applicable to short-term (5-60 minutes) and long-term (60-120 minutes) traffic flow and speed prediction in scenarios such as urban road networks and highways, providing high-precision, low-latency data support for applications such as dynamic signal control, intelligent path planning, congestion emergency management, and optimal allocation of road network resources. Attached Figure Description

[0048] Figure 1 This is an overall flowchart of a bidirectional coupled modulation traffic flow spatiotemporal prediction method in one embodiment;

[0049] Figure 2 Here is a flowchart of multi-scale temporal feature extraction in one embodiment;

[0050] Figure 3 This is a detailed diagram of a long-range bidirectional coupling coding module in one embodiment;

[0051] Figure 4 Here is a detailed diagram of the sample-node adaptive fusion module in one embodiment;

[0052] Figure 5 This is a visualization of the embedded features and adaptive fusion features processed by the sample-node adaptive fusion module in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] This application provides a bidirectional coupled modulation traffic flow spatiotemporal prediction method, such as... Figure 1 As shown, it includes the following steps:

[0055] S1. Acquire traffic flow data and convert it into a feature embedding tensor; the traffic flow data includes sensing data from several nodes in the road network.

[0056] A road network is a system composed of interconnected roads, containing nodes and edges. Nodes are typically key locations in the road network, such as intersections and road endpoints. An edge is a segment of road connecting two nodes, containing path information from a source node to a destination node. In this embodiment, traffic flow data is acquired through sensor arrays deployed at each node.

[0057] Taking PEMS (Performance Measurement System) 08 city traffic flow data as an example, the dataset details are as follows:

[0058] Number of sensor nodes: 170;

[0059] Time range: July 1, 2016 - August 31, 2016 (60 days);

[0060] Sampling frequency: 5 minutes / time, total time steps: 17856;

[0061] Feature dimensions: 3 dimensions (traffic, speed, market share);

[0062] Data partitioning: The data was partitioned into training, validation, and test sets in a 7:1.5:1.5 ratio according to time sequence.

[0063] Input / prediction time step: (60 minutes) (60 minutes).

[0064] In this embodiment, the original traffic flow data, after Z-score standardization and invalid sample filtering, is transformed into a feature embedding tensor through linear transformation. (170 nodes, 64-dimensional embedding, 12 input time steps) are used as inputs for subsequent steps.

[0065] S2. Perform multi-scale temporal feature extraction on the feature embedding tensor.

[0066] Traditional multi-scale temporal convolution methods use a fixed set of dilation rates, which makes it difficult to adapt to the temporal scale coverage requirements of different input sequence lengths, and are prone to future information leakage due to improper receptive field design. At the same time, traditional methods only focus on the extraction of temporal features in a single dimension, ignoring the coupling compatibility between temporal features and subsequent spatial features, resulting in information disconnection in the spatiotemporal fusion stage.

[0067] To address the aforementioned issues, this embodiment proposes an adaptive-scale multi-scale temporal convolution module. This module dynamically adapts to different input sequence lengths through an adaptive dilation rate generation mechanism, ensuring zero future leakage while accurately capturing multi-scale temporal evolution patterns. Simultaneously, a gated coupling preprocessing mechanism enhances the correlation between temporal and spatial features, laying the foundation for subsequent bidirectional coupling modeling. This module mainly comprises two core parts: adaptive multi-scale temporal feature extraction and a gated coupling mechanism.

[0068] Firstly, in the adaptive multi-scale temporal feature extraction module, an adaptive dilation rate generation and parallel dilated convolution structure are used to achieve multi-scale temporal feature extraction: firstly, a dilation rate set is dynamically generated based on the length of the input sequence, and then the output features of the embedding layer are embedded into a tensor. Input the corresponding number of parallel dilated convolution branches to ensure that the temporal evolution patterns of different periods can be fully captured, while strictly avoiding the leakage of future information.

[0069] To adapt to different input sequence lengths and ensure that the receptive field does not exceed the length of the input sequence (zero future leakage), this embodiment designs an adaptive expansion rate generation algorithm, such as... Figure 2 As shown, the process is as follows:

[0070] S2011, Input: Input sequence length kernel size Maximum receptive field ratio (Default 1.0);

[0071] S2012, Initialization: Expansion Rate Set Current expansion rate ;

[0072] S2013, Iterative Generation: From At the beginning, each time Double the current expansion rate and calculate the effective receptive field of a single branch. ,like Then join in Otherwise, stop the iteration;

[0073] S2014, Output: Final Expansion Rate Set (like If empty, the default value will be used. ).

[0074] This mechanism ensures that the expansion rate set is dynamically adjusted according to the length of the input sequence, avoiding both insufficient receptive field coverage caused by a fixed expansion rate and preventing future information leakage caused by overexpansion.

[0075] Expansion rate set based on adaptive generation Multi-scale temporal features are extracted through parallel dilated convolutional branches. The feature extraction process of each dilated convolutional branch can be formally defined as follows:

[0076]

[0077] in, For the first Temporal feature extraction operators at various scales; To ensure the accuracy of capturing local temporal features by fixing the kernel size; For the first Adaptive generation expansion rate of each branch; These are learnable convolutional weight parameters used to achieve linear transformations of temporal features. To ensure causality and avoid future information leakage, the above equation applies only if... Convolution calculation is performed at (i.e., corresponding to the historical observation time step), if (corresponding to the future time step), then the corresponding position weight is reset to 0 to achieve causal mask constraint.

[0078] The effective receptive field of each dilated convolution branch can be quantified and calculated using a formula, the mathematical expression of which is:

[0079]

[0080] This formula clarifies the time coverage corresponding to different adaptive expansion rates: when At that time, effectively experience the wild It focuses on capturing short-term traffic flow fluctuation characteristics; when the input sequence length is long enough, It can adaptively grow to 15, at which point the effective receptive field... It can cover long-cycle time patterns of 31 time steps (corresponding to 155 minutes). This adaptive expansion rate and multi-branch parallel design ensures comprehensive coverage of multi-scale time patterns, providing rich time dimension support for subsequent spatiotemporal bidirectional coupling modeling.

[0081] Secondly, this embodiment introduces a gating coupling mechanism, which dynamically adjusts feature weights to better adapt the extracted multi-scale temporal features to the subsequent spatial feature fusion process, enhances the correlation between temporal and spatial features, improves the coupling compatibility of spatiotemporal features, and avoids semantic gaps in spatiotemporal features during the fusion stage.

[0082] like Figure 2 As shown, the execution process of this mechanism can be divided into three steps:

[0083] S2021, Multi-scale Feature Aggregation: The output features of all adaptively generated dilated convolution branches are concatenated along the channel dimension to obtain multi-scale aggregated features. Its expression is:

[0084]

[0085] in, The number of elements in the adaptively generated expansion rate set is typically 2-4, dynamically adjusted according to the length of the input sequence.

[0086] S2022, Contextual Feature Extraction: Multi-scale aggregated features are compressed in dimensionality and contextual information is extracted through 1×1 convolution, achieving effective fusion of multi-scale features and obtaining contextual features. Its mathematical definition is:

[0087]

[0088] in, and These are learnable parameters, which achieves compression of the feature dimension (from...). Restore to Furthermore, it completed the contextual fusion of multi-scale temporal information.

[0089] S2023, Dynamic Weight Adjustment: Calculate the coupling gating weights and dynamically allocate the weight ratios of context features and orthogonal complementary features. The relevant expression is:

[0090]

[0091]

[0092] in, This is the Sigmoid activation function, used to constrain the output value to the interval [0,1]. The average value is taken along the time dimension to capture the global trend of the time pattern; for Orthogonal complement features, projection operator Implemented independently per time step: For each time step ,Pick and Projection is defined as:

[0093]

[0094] in, The numerical stability constant is used to avoid singularities in matrix inversion; the projection results of all time steps are concatenated along the time dimension to obtain... . The gating weight matrix effectively enhances the coupling compatibility between temporal and spatial features by dynamically adjusting the proportion of contextual features and orthogonal complementary features.

[0095] The multi-scale temporal convolution module ultimately outputs multi-scale temporal features. This feature tensor not only contains a comprehensive multi-scale temporal evolution pattern, but also has the coupling friendliness of efficient fusion with spatial features, providing high-quality input for the subsequent modeling of dynamic topological graph convolution module.

[0096] To further illustrate the data processing procedure, we will use the adaptively generated expansion rate set as an example. For example, the input is the preprocessed road network traffic flow feature embedding tensor. ,in This represents the total number of sensor nodes in the road network. For fixed feature embedding dimensions, The input time step corresponds to 60 minutes; four dilated convolutional branches extract multi-scale temporal features, with the kernel size of each branch varying. Convolution weights The specific extraction details are as follows, as these are learnable parameters:

[0097] 1. Expansion Rate Configuration: Set of Expansion Rates The corresponding effective receptive field formula is: The effective receptive fields corresponding to the four branches are 3 (15 minutes), 5 (25 minutes), 9 (45 minutes), and 17 (85 minutes), respectively, which together cover the key traffic flow time scale of 15 to 85 minutes and capture short-term fluctuations in traffic flow. Mid-time cycle Long-term trend Long-term patterns ;

[0098] 2. Feature extraction formula: Only for Historical time steps are calculated to avoid future information leaks;

[0099] 3. Output: Generate multi-scale temporal features through feature concatenation and dimensionality adjustment. It covers key traffic flow timescales of 15 to 85 minutes, providing a time dimension basis for long-distance two-way coupling.

[0100] S3. Generate dynamic spatial features forward based on the feature embedding tensor, and correct the time dependency backward based on the dynamic spatial features to obtain bidirectional coupled features that fuse spatiotemporal features.

[0101] This step achieves deep fusion of spatiotemporal characteristics through a closed-loop coupling logic of "time-space" modulation and "space-time" feedback, via the dynamic interaction of the two paths. The two paths interact dynamically through a gating unit. For example... Figure 3 As shown, the specific details are as follows:

[0102] S301, Path 1: Time-Space Modulation: Modulating Multi-Scale Temporal Features Input the dynamic graph generation module, adjust the long-range dependency weights of the adjacency matrix, and generate the dynamic adjacency matrix. The formula is:

[0103]

[0104] Among them, the road network augmented adjacency matrix , A fixed static topology matrix for the road network is determined by the actual road network distances and connectivity relationships between sensor nodes; for (identity matrix of order 1) is the Sigmoid activation function (value range [0,1]), the modulation coefficient value range is [0,1], and the influence strength of the dynamic matching time trend on spatial dependence is ; , These are the learnable parameters for the dynamic graph generation module.

[0105] based on Aggregate spatial features, the formula is:

[0106]

[0107] in, , Satisfying spectral norm constraints (Used to avoid gradient explosion during model training) , Learnable bias parameters for spatial aggregation, outputting dynamic spatial features. .

[0108] In one embodiment, to address the problem that existing dynamic adjacency matrices cannot simultaneously accommodate fine-grained edge-level modeling, topological physical constraints, and lightweight models, a time-modulated edge-specific dynamic adjacency matrix is ​​proposed. This matrix generates a time-evolving, time-specific modulation weight for each connection in the road network, accurately capturing dynamic spatial dependencies while controlling computational overhead.

[0109] Dynamic adjacency matrix The formula is:

[0110]

[0111] in, For element-wise product; To augment the adjacency matrix of the road network; Use the Sigmoid activation function; and It consists of two independent linear projection layers, with tensors embedded based on node features. The temporal aggregation results generate low-rank representations of the source node and the target node, defined as:

[0112]

[0113] in, , Learnable parameters; low-rank dimension While ensuring representation capabilities, the computational and parameter overhead is reduced; Aggregation along the time dimension yields node-level temporal representations. Outer product operations generate edge-specific modulation matrices, where the weight of each edge is jointly determined by the edge-specific representations of its two endpoints. The modulation matrices are then constrained to the (0,1) interval using a sigmoid function and then... Multiplying each element together yields the final dynamic adjacency matrix.

[0114] This embodiment makes It possesses three stable properties: (1) Non-negativity: by The nonnegativity of and the output range of sigmoid together guarantee that it conforms to the physical meaning of the road network; (2) sparsity is preserved: only when hour, (2) Avoid introducing spurious edges with no physical meaning; (3) Weight boundedness: satisfy This avoids training instability caused by unlimited weight growth.

[0115] In one embodiment, to adapt to message passing in downstream graph convolution, for Normalization yields ,in The degree matrix is ​​used to eliminate the feature scale imbalance caused by the difference in node degree, thus ensuring the stability of message transmission.

[0116] S302, Path 2: Spatial → Temporal Feedback: Incorporating Dynamic Spatial Features Feedback is sent to the time attention module, which adaptively adjusts the long-time step attention weights using the following formula:

[0117]

[0118] in, The preset basic attention weight matrix is ​​used (the initial values ​​are obtained by random initialization and optimized through model training). To adjust the weight matrix for feedback, The bias parameters are adjusted for feedback; both are learnable parameters, enabling inverse optimization of the temporal dependence of spatial events.

[0119] S303, Gating Unit Fusion: Two paths interact dynamically through a gating unit, as shown in the formula:

[0120]

[0121]

[0122] Among them, gating parameters , The learnable parameters of the gating unit are obtained through joint training of historical spatiotemporal features and are synchronized with the overall model training. The threshold value (range [0,1]) can be used to broadcast matching feature dimensions, dynamically balancing the feature contributions of the two coupling paths (approaching 1 during peak hours, with temporal features dominating; approaching 0 during off-peak hours, with spatial features dominating), and outputting long-range bidirectional coupling features. .

[0123] S4. Based on the differences in sample coupling modes and the spatial correlation strength of nodes, obtain dynamic fusion weights. Based on the dynamic fusion weights, feature embedding tensors, and bidirectional coupling features, obtain adaptive fusion features.

[0124] like Figure 4 As shown, the specific steps include:

[0125] S401. Select a sample time period, such as holidays or peak traffic hours, and calculate the sample feature distribution entropy. The formula for quantifying the differences in coupling patterns among samples in the current batch is:

[0126]

[0127] in, , , Indicates the first The mean of the bidirectional coupling features of each node; the larger the entropy value, the more complex the coupling mode of the sample.

[0128] S402. Calculate node degree centrality based on real-time updates of the dynamic adjacency matrix, quantifying the spatial association strength of nodes and their degree centrality. The formula is:

[0129]

[0130] Higher centrality indicates a greater influence of a node on the spatial dependence of the road network. Indicates the first The node and the first Dynamic coupling weights between nodes.

[0131] S403, Dynamic fusion weight generation, the formula is:

[0132]

[0133] in, For learnable weights, For learnable bias parameters, The sample-node level adaptive weights are dynamically matched with traffic scenarios and node types, such as peak hours. Off-peak hours Main road nodes Branch nodes .

[0134] S404, Feature Fusion, the formula is:

[0135]

[0136] in, for Relative to feature embedding tensor orthogonal complement features (p) (For orthogonal projection operation), to supplement the diversity of coupled information, and output adaptive fused features. .

[0137] like Figure 5 As shown, this is a visualization of the fused features. The embedded features and fused features are compared and adaptively modulated by the sample-node adaptive fusion module, exhibiting differences in cluster distribution based on the complexity of the traffic scenario. (a) represents a high-complexity traffic scenario, corresponding to complex road sections with drastic traffic flow fluctuations and frequent incidents. The module significantly enhances the cluster dispersion of the fused features, making the feature boundaries of different traffic states clearer. (b) represents a medium-complexity traffic scenario, corresponding to moderately complex road sections with regular traffic flow fluctuations and occasional congestion. The module can form local feature clusters while preserving the original feature trends, balancing feature stability and discriminability. (c) represents a low-complexity traffic scenario, corresponding to simple road sections with stable traffic flow and no significant fluctuations. The module maintains a high degree of overlap in feature distribution, avoiding over-modulation. This module, through a feature modulation mechanism that dynamically adapts to scenario complexity, effectively improves the model's ability to model complex traffic patterns and its generalization performance, providing more discriminative and robust feature representations for tasks such as traffic flow prediction.

[0138] S5. Output traffic prediction results based on adaptive fusion features.

[0139] Through two-step one-dimensional convolution operations Mapping to the original traffic flow data dimension, the first convolution step will... Feature dimensions expanded to The second step involves mapping the convolution to the original feature dimensions and adjusting the time step, using the following formula:

[0140]

[0141]

[0142] In the first step, the kernel size is 3 and the stride is 1. For the prediction time step (short-term prediction takes...) Long-term forecasting ), The original traffic flow feature dimensions (including at least one of volume and speed, and optionally occupancy) are used to output the final result. ( These are the original feature dimensions, such as traffic, speed, and occupancy.

[0143] In one embodiment, by setting a hybrid loss function Optimize the prediction model, balance outlier robustness with large error constraints, improve prediction accuracy, and avoid overfitting through reasonable optimization strategies. The formula is as follows:

[0144]

[0145] in, The model uses real traffic flow data. MAE (Mean Absolute Error) is used to suppress outlier interference, and RMSE (Root Mean Square Error) is used to strengthen the constraint of large errors. The model training uses the AdamW optimizer (weight decay of 5e-5), the learning rate strategy is CAWR, the number of training epochs is 200, and the early stopping patience value is 20 to avoid model overfitting.

[0146] In one embodiment, taking the area covered by 170 sensor nodes of a highway network as the application scenario, the traffic flow in the next 60 minutes (12 time steps, 1 step every 5 minutes) is predicted. The entire implementation process is completely reproduced using simulated data. All simulated data are consistent with the real distribution pattern of the PEMS08 dataset, ensuring that the process is reproducible and the values ​​are reasonable.

[0147] The coverage areas of 170 sensors are numbered 1-170, with nodes 32, 33, and 34 being main road nodes (average daily traffic ≥ 4000 pcu / h) and nodes 156, 157, and 158 being branch road nodes (average daily traffic ≤ 1500 pcu / h). The target of prediction is the traffic flow of the morning peak (7:00-8:00) for 12 time steps (T1-T12, corresponding to 7:00, 7:05, ..., 7:55), supporting real-time scheduling of the highway network.

[0148] The original traffic flow data is shown in Table 1:

[0149] Table 1. Raw traffic flow data for nodes 32, 33, and 156

[0150]

[0151] Using the traffic flow data in Table 1 as input, the specific spatiotemporal traffic prediction operation for this highway network is as follows:

[0152] S1. Data Acquisition Preprocessing and Feature Embedding Z-score Standardization: Based on the statistical parameters of the training set (mean μ=28.6, standard deviation σ=12.3), the raw traffic data is standardized using the following formula: For example, the 6:55 traffic of node 32 is (53-28.6) / 12.3≈2.0; the 6:55 traffic of node 156 is (21-28.6) / 12.3≈-0.62.

[0153] Invalid sample filtering: Simulates sensorless failure, all data are valid and do not need to be discarded;

[0154] Feature embedding: through linear transformation (Learnable weights, values ​​obtained after simulation training:) , , and bias ( ), generate feature embedding tensor The core node embedding values ​​are as follows: the first 5 dimensions of the T12 (6:55) embedding vector of node 32 are [0.72, 0.68, 0.65, 0.62, 0.59]; the first 5 dimensions of the T12 embedding vector of node 156 are [0.28, 0.26, 0.24, 0.22, 0.20].

[0155] S2, Multi-scale temporal feature extraction dilation rate configuration: The convolution kernel K=3, and the effective receptive fields are 3 (15 minutes), 5 (25 minutes), 9 (45 minutes), and 17 (85 minutes), respectively.

[0156] Branch convolution calculation (simulation):

[0157] Branch 1 (Δ=1): Captures short-term fluctuations, convolution weights , , T12 output of node 32 ;

[0158] Branch 2 (Δ=2): Captures the mid-time period, T12 output of node 32 ;

[0159] Branch 3 (Δ=4): Captures long-term trends, T12 output of node 32 ;

[0160] Branch 4 (Δ=8): Captures patterns over very long periods, T12 output of node 32. ;

[0161] Final output: Multi-scale temporal features The mean of the time features of the core nodes is 42.6 for node 32 (after denormalization) and 18.3 for node 156 (after denormalization). The first 5 dimensions of the T12 time feature vector of node 32 are [0.68, 0.66, 0.64, 0.62, 0.60].

[0162] S3, long-range bidirectional coupled coding, includes:

[0163] S301, Time-Space Modulation, including:

[0164] S3011, Calculation Time dimension mean: The first 5 dimensions of the mean vector of node 32 are [0.65, 0.63, 0.61, 0.59, 0.57], and the first 5 dimensions of the mean vector of node 156 are [0.25, 0.24, 0.23, 0.22, 0.21].

[0165] S3012, Generate a dynamic adjacency matrix Simulated static adjacency matrix In the diagram, the weights of nodes 32 and 33 are 0.21, and the weights of nodes 156 and 157 are 0.18; using the formula... calculate( After simulation training ; , σ is the Sigmoid function), resulting in dynamic weights: nodes 32 and 33 increase to 0.45, nodes 156 and 157 increase to 0.29, and the weights of other adjacent nodes all increase to varying degrees (the time trend during peak periods strengthens spatial correlation).

[0166] S3013, Aggregation Space Characteristics: Through formula calculate( , All satisfy the spectral norm constraint. ; , ), output The mean of the spatial features of the core nodes is 48.2 for node 32 (after denormalization) and 21.7 for node 156 (after denormalization). The first 5 dimensions of the T12 spatial feature vector of node 32 are [0.75, 0.73, 0.71, 0.69, 0.67].

[0167] S302, Space-Time Feedback, including:

[0168] S3021, Calculation Time dimension mean: The first 5 dimensions of the mean vector of node 32 are [0.72, 0.70, 0.68, 0.66, 0.64], and the first 5 dimensions of the mean vector of node 156 are [0.28, 0.27, 0.26, 0.25, 0.24].

[0169] S3022. Adjusting Time Attention Weight: via formula calculate( Based on the attention weight matrix, simulation ; ,simulation After adjustment, the attention weight of node 32 for the long time step (T8-T12, corresponding to 6:40-6:55) is increased to [0.52,0.52,0.52,0.52,0.52], and the attention weight of node 156 for the long time step is increased to [0.36,0.36,0.36,0.36,0.36].

[0170] S303, gated fusion, including:

[0171] S3031, Calculate gating parameters : Through formula calculate( ,simulation ; , The G value of node 32 was 0.72 (time features dominate fusion), and the G value of node 156 was 0.38 (spatial features dominate fusion).

[0172] S3032, Fusion Calculation: via formula The first 5 dimensions of the T12 coupling feature vector of node 32 are obtained as 0.72×[0.68,0.66,0.64,0.62,0.60]+0.28×[0.75,0.73,0.71,0.69,0.67]≈[0.70,0.68,0.66,0.64,0.62]. The final output is the long-range bidirectional coupling feature vector. .

[0173] S4, Sample-Node Adaptive Fusion. Includes:

[0174] S401, Sample Feature Distribution Entropy: The current batch is during the morning peak, calculated using simulation. (Node 32) Node 156 ),satisfy Normalization constraints, substitute into the formula ,get (High entropy value, complex sample coupling mode).

[0175] S402, Node Degree Centrality: Determined by the formula... Calculate node 32. , (High centrality); Node 156 , (Low centrality).

[0176] S403, Dynamic Fusion Weights: Calculated using the formula... calculate( ,simulation ; , We obtained α=0.71 for node 32 (dominated by time-space coupling features) and α=0.39 for node 156 (supplemented by orthogonal complement features).

[0177] S404, Feature Fusion: Calculating Orthogonal Complementary Features Simulation node 32 The first 5 dimensions are [0.05, 0.04, 0.03, 0.02, 0.01]; substituting these values ​​into the formula... The first 5 dimensions of the T12 fusion feature of node 32 are obtained as 0.71×[0.70,0.68,0.66,0.64,0.62]+0.29×[0.05,0.04,0.03,0.02,0.01]≈[0.51,0.50,0.48,0.47,0.45]. The output is... .

[0178] S5. Predicted output and optimized prediction mapping.

[0179] The convolution calculation is performed in two steps, the first step of which involves convolution. ,get Second step convolution , to obtain the predicted output (3-dimensional features: flow, speed, occupancy), the predicted flow of the core node (after denormalization) is shown in Table 2:

[0180] Table 2 Output of Expressway Network Prediction Results

[0181]

[0182] Simulated real traffic flow data (Following the peak distribution), the predicted MAE of node 32 is 8.23. Substituting this into the mixed loss function... Calculations yielded The value converged to 4.87 in the later stages of training.

[0183] This embodiment reproduces the entire process using complete simulation data. The MAE of prediction node 32 is 7.25, the overall average error is 8.23, the single sample inference time is 1.31ms, the prediction results closely match the traffic flow change pattern during the morning peak, and support the second-level response of the real-time dispatch system of the highway network, thus verifying the high accuracy and real-time performance of the method of this invention.

[0184] In one embodiment, taking the coverage area of ​​207 sensor nodes in the urban road network as the application scenario, the traffic speed is predicted for the next 120 minutes (24 time steps, 1 step every 5 minutes) during holidays. The entire implementation process is reproduced using simulated data, and the simulated data closely matches the real distribution of the METR-LA dataset to ensure the integrity of the process and the rationality of the data.

[0185] The city's road network has 207 sensor nodes numbered 1-207. Among them, nodes 88 and 89 are nodes around scenic spots, and nodes 101 and 102 are ordinary urban road nodes. The target is to predict the traffic speed of the 24 time steps on the third day of the National Day holiday, supporting the dynamic planning of the city's road network.

[0186] The original traffic flow data is shown in Table 3:

[0187] Table 3. Raw traffic flow data for nodes 88, 89, and 101

[0188]

[0189] Using the traffic flow data in Table 3 as input, the specific spatiotemporal prediction operation for the city's road network is as follows:

[0190] S1. Preprocessing and Feature Embedding (Implementation Prerequisites) Z-score Standardization: Based on the statistical parameters of the training set (mean velocity μ=42.5, standard deviation σ=10.8), the original velocity data is standardized using the formula... For example, the speed at 10:55 for node 88 is (30-42.5) / 10.8≈-1.16; the speed at 10:55 for node 101 is (51-42.5) / 10.8≈0.79.

[0191] Invalid sample filtering: Simulates sensorless failure, all data are valid and do not need to be discarded;

[0192] Feature embedding: through linear transformation (Values ​​obtained after simulation training:) , , and bias ( ), generate feature embedding tensor 4The core node embedding values ​​are as follows: the first 5 dimensions of the T24 (10:55) embedding vector of node 88 are [0.28, 0.26, 0.24, 0.22, 0.20]; the first 5 dimensions of the T24 embedding vector of node 101 are [0.65, 0.63, 0.61, 0.59, 0.57].

[0193] S2, Multi-scale temporal feature extraction dilation rate configuration:

[0194] With Δ=[1,2,4,8] and kernel K=3, the effective receptive fields are 3 (15 minutes), 7 (35 minutes), 15 (75 minutes), and 31 (155 minutes).

[0195] Branch convolution calculation:

[0196] Branch 1 (Δ=1): T24 output of node 88 ;

[0197] Branch 2 (Δ=2): T24 output of node 88 ;

[0198] Branch 3 (Δ=4): T24 output of node 88 ;

[0199] Branch 4 (Δ=8): T24 output of node 88 ;

[0200] Final output: Multi-scale temporal features The mean time features of the core nodes (speed after denormalization) are: 31.5 km / h for node 88 and 52.8 km / h for node 101. The first 5 dimensions of the T24 time feature vector of node 88 are [0.26, 0.25, 0.24, 0.23, 0.22].

[0201] S3, long-range bidirectional coupled coding, includes:

[0202] S301, Time-Space Modulation, including:

[0203] S3011, Calculation Time dimension mean: The first 5 dimensions of the mean vector of node 88 are [0.25, 0.24, 0.23, 0.22, 0.21], and the first 5 dimensions of the mean vector of node 101 are [0.62, 0.60, 0.58, 0.56, 0.54].

[0204] S3012, Generate a dynamic adjacency matrix Simulated static adjacency matrix In the diagram, the weights of nodes 88 and 89 are 0.23, and the weights of nodes 101 and 102 are 0.19; calculated using the formula ( ,simulation ; , The dynamic weights were obtained as follows: nodes 88 and 89 increased to 0.51 (strengthening the spatial association between scenic area nodes), and nodes 101 and 102 increased to 0.38.

[0205] S3013, Aggregation Space Characteristics: Calculated using the formula ( , (satisfying spectral norm constraints), output The mean spatial features of the core nodes (speed after denormalization) are as follows: 29.7 km / h for node 88 and 50.3 km / h for node 101. The first 5 dimensions of the T24 spatial feature vector of node 88 are [0.23, 0.22, 0.21, 0.20, 0.19].

[0206] S302, Space-Time Feedback, including:

[0207] S3021, Calculation Time dimension mean: The first 5 dimensions of the mean vector of node 88 are [0.24, 0.23, 0.22, 0.21, 0.20], and the first 5 dimensions of the mean vector of node 101 are [0.59, 0.57, 0.55, 0.53, 0.51].

[0208] S3022, Adjusting Time Attention Weight: Calculated using the formula ( Based on the attention weight matrix, simulation ; ,simulation After adjustment, the attention weight of node 88 for the long time step (T18-T24, corresponding to 10:30-10:55) is increased to [0.49,0.49,0.49,0.49,0.49,0.49], and the attention weight of node 101 for the long time step is increased to [0.41,0.41,0.41,0.41,0.41,0.41,0.41].

[0209] S303, gated fusion, including:

[0210] S3031, Calculate gating parameters : Calculated using the formula ( ,simulation ; , The G value of node 88 was 0.32 (spatial features dominate fusion, and the spatial correlation of scenic area nodes is stronger), and the G value of node 101 was 0.67 (temporal features dominate fusion).

[0211] S3032, Fusion Calculation: The first 5 dimensions of the T24 coupling feature vector of node 88 are 0.32×[0.26,0.25,0.24,0.23,0.22] + 0.68×[0.23,0.22,0.21,0.20,0.19]≈[0.24,0.23,0.22,0.21,0.20]. The final output is the long-range bidirectional coupling feature vector. .

[0212] S4, Sample-Node Adaptive Fusion, including:

[0213] S401, Sample Feature Distribution Entropy: The current batch is a holiday period, simulated calculation. (Node 88) ; Node 101 ),satisfy Normalization constraints, substituted into the formula, yield (High entropy value, complex sample coupling patterns during holidays).

[0214] S402, Node Degree Centrality: Calculated using the formula, the degree centrality of node 88... , (High centrality, significant impact on scenic area nodes); Node 101 , .

[0215] S403, Dynamic Fusion Weight: Calculated using a formula ( ,simulation ; , ), to obtain node 88 (Orthogonal complementary feature supplement), node 101 (Coupling characteristics dominate).

[0216] S404, Feature Fusion: Calculating Orthogonal Complementary Features Simulation node 88 The first 5 dimensions are [0.04, 0.03, 0.02, 0.01, 0.008]; substituting these into the formula, the first 5 dimensions of the T24 fusion feature for node 88 are 0.36×[0.24,0.23,0.22,0.21,0.20]+0.64×[0.04,0.03,0.02,0.01,0.008]≈[0.11,0.10,0.09,0.08,0.07]. The output is... .

[0217] S5. Prediction Output and Optimized Prediction Mapping:

[0218] The convolution calculation is performed in two steps, the first step of which involves convolution. ,get Second step convolution , to obtain the predicted output The prediction speed of core nodes (after destandardization) is shown in Table 4:

[0219] Table 4 Output of Urban Road Network Prediction Results

[0220]

[0221] Simulated real traffic flow data The predicted MAE for node 88 is 2.87. Substituting this into the mixed loss function yields the following result. The value converged to 1.95 in the later stages of training.

[0222] This embodiment reproduces the entire process of long-term prediction of urban road networks using complete simulation data, with a prediction MAE of 2.97. The model has only 0.43M parameters. When deployed on an edge computing device (NVIDIA Jetson Xavier NX), the single-sample inference time is 1.83ms. The prediction results closely match the traffic speed change patterns around scenic spots during holidays, meeting the needs of dynamic planning of urban road networks.

[0223] In summary, this invention proposes a bidirectional coupling modulation model to achieve three core objectives:

[0224] (1) Break through the limitations of unidirectional modeling and construct a closed-loop coupling logic of "time modulating space and space feeding back time" to accurately restore the original dynamic characteristics of traffic flow;

[0225] (2) By using the sample-node adaptive fusion mechanism, the coupling strength differences of different scenarios and different nodes are dynamically adapted to improve the robustness of prediction in complex scenarios;

[0226] (3) While ensuring prediction accuracy, the number of model parameters is reduced and the inference delay is decreased, taking into account both engineering practicality and real-time deployment requirements.

[0227] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0228] Based on the same inventive concept, this application also provides a bidirectional coupled modulation traffic flow spatiotemporal prediction system. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations of one or more bidirectional coupled modulation traffic flow spatiotemporal prediction system embodiments provided below can be found in the limitations of the bidirectional coupled modulation traffic flow spatiotemporal prediction method described above, and will not be repeated here.

[0229] In one embodiment, a bidirectional coupled modulated traffic flow spatiotemporal prediction system is provided, comprising:

[0230] The data preprocessing module is used to acquire traffic flow data and convert it into a feature embedding tensor; the traffic flow data includes data from several sensor nodes.

[0231] The multi-scale temporal feature extraction module is used to extract multi-scale temporal features from the feature embedding tensor.

[0232] The long-range bidirectional coupled coding module is used to generate dynamic spatial features forward based on multi-scale temporal features, and to correct the temporal dependence in reverse based on the dynamic spatial features, so as to obtain bidirectional coupled features that fuse spatiotemporal features.

[0233] The sample-node adaptive fusion module is used to obtain dynamic fusion weights based on the differences in sample coupling modes and the strength of node spatial associations, and to obtain adaptive fusion features based on the dynamic fusion weights, feature embedding tensors, and bidirectional coupling features.

[0234] The prediction output module is used to output traffic prediction results based on adaptive fusion features.

[0235] In addition, the system also includes:

[0236] The storage module is used to store training data, validation data, and test data during the model training process, all learnable parameters after the model training is completed (including the weight matrix and bias vector of each module), and the prediction results output by the prediction module. This module supports real-time reading and writing of data and can be adapted to both cloud storage and local storage modes to ensure data security and traceability.

[0237] The deployment module is used to deploy the entire prediction system to real-world application scenarios, supporting multi-platform deployment on cloud servers and edge computing devices. During deployment, the model inference accuracy can be adjusted according to the hardware environment to ensure that the model's single-sample inference time is ≤2ms, meeting the low-latency requirements of real-time scheduling and dynamic path planning in intelligent transportation systems. This module also includes a model update sub-module, which supports fine-tuning of model parameters based on new traffic flow data to improve the model's generalization ability in different scenarios.

[0238] Each module in the aforementioned bidirectional coupled modulated traffic flow spatiotemporal prediction system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0239] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in all of the above method embodiments.

[0240] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in all of the above method embodiments.

[0241] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in all of the above method embodiments.

[0242] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0243] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0244] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0245] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A bidirectional coupled modulation method for spatiotemporal prediction of traffic flow, characterized in that, The method includes: Traffic flow data is acquired and transformed into a feature embedding tensor; the traffic flow data includes sensor data from several nodes in the road network. Multi-scale temporal feature extraction is performed on the feature embedding tensor; Based on the aforementioned feature embedding tensor, dynamic spatial features are generated forward, and the time dependency is corrected backward based on the aforementioned dynamic spatial features to obtain bidirectional coupled features that fuse spatiotemporal features. Based on the differences in sample coupling modes and the strength of node spatial association, dynamic fusion weights are obtained, and adaptive fusion features are obtained according to the dynamic fusion weights, the feature embedding tensor, and the bidirectional coupling features. Traffic prediction results are output based on the adaptive fusion features.

2. The method according to claim 1, characterized in that, The multi-scale temporal feature extraction of the feature embedding tensor includes: Initialize the expansion rate and the expansion rate set; Entering the iteration process: Using the initial expansion rate as the current expansion rate, add the current expansion rate to the expansion rate set, and calculate the maximum single-branch effective receptive field of the current expansion rate set; if the maximum single-branch effective receptive field meets the preset conditions, update the expansion rate set according to the current expansion rate, and use... To advance to the next iteration at the current expansion rate, The expansion rate used in the current iteration is set; otherwise, the set of expansion rates is not updated. The preset condition is that the maximum effective receptive field of a single branch is not greater than the length of the input sequence of the feature embedding tensor. Based on the set of expansion rates at the end of the iteration, multi-scale temporal feature extraction is performed on the feature embedding tensor.

3. The method according to claim 2, characterized in that, The multi-scale temporal feature extraction of the feature embedding tensor based on the expansion rate set at the end of the iteration includes: Based on the set of dilation rates at the end of the iteration, temporal features at the corresponding scale are extracted through parallel dilated convolution branches with causal masks. The multi-scale temporal features are concatenated along the channel dimension to obtain multi-scale aggregated features; The multi-scale aggregated features are subjected to dimensionality compression and context information extraction to obtain context features; Based on the gated fusion weights, the context features and the orthogonal complement features of the context features are weighted and fused to obtain the multi-scale temporal features; wherein, the gated fusion weights are determined by the multi-scale aggregated features.

4. The method according to claim 1, characterized in that, The step of forward generating dynamic space features based on the embedding tensor of the features includes: A dynamic adjacency matrix is ​​generated, and spatial features are aggregated on the feature embedding tensor based on the dynamic adjacency matrix to obtain the dynamic spatial features.

5. The method according to claim 4, characterized in that, The generation of the dynamic adjacency matrix includes: Generate a corresponding modulation weight for each edge in the road network, and generate the dynamic adjacency matrix based on the modulation weight; The modulation weights are jointly determined by the low-rank representations of the nodes at both ends of the corresponding edge, and the low-rank representations are generated based on the feature embedding tensors of the corresponding nodes.

6. The method according to claim 1, characterized in that, The step of reverse-correcting the time dependency based on the dynamic spatial characteristics includes: The temporal attention weights are adaptively adjusted based on the dynamic spatial characteristics.

7. The method according to claim 1, characterized in that, The bidirectional coupling features for acquiring the fused spatiotemporal features include: The multi-scale temporal features and the dynamic spatial features are fused based on a gating fusion mechanism to obtain the bidirectional coupled features.

8. The method according to claim 1, characterized in that, The process of obtaining dynamic fusion weights based on differences in sample coupling patterns and the strength of spatial association between nodes includes: Select a sample time period, and calculate the sample feature distribution entropy based on the bidirectional coupling characteristics corresponding to the traffic flow data within the sample time period, which is used to quantify the differences in the sample coupling patterns. The degree centrality of nodes is calculated based on the dynamic adjacency matrix to quantify the spatial association strength of the nodes; The dynamic fusion weights are obtained based on the sample feature distribution entropy and the node degree centrality.

9. The method according to claim 1, characterized in that, The step of obtaining adaptive fusion features based on the dynamic fusion weights, the feature embedding tensor, and the bidirectional coupling features includes: Based on the dynamic fusion weights, the bidirectional coupling features and the orthogonal complement features of the bidirectional coupling features relative to the feature embedding tensor are weighted and fused to obtain the adaptive fusion features.

10. A bidirectional coupled modulated traffic flow spatiotemporal prediction system, characterized in that, The system includes: The data preprocessing module is used to acquire traffic flow data and convert the traffic flow data into a feature embedding tensor; the traffic flow data includes data from several sensor nodes. A multi-scale temporal feature extraction module is used to extract multi-scale temporal features from the feature embedding tensor; The long-range bidirectional coupling coding module is used to generate dynamic spatial features forward based on the multi-scale temporal features, and to correct the temporal dependence backward based on the dynamic spatial features, so as to obtain bidirectional coupling features that fuse spatiotemporal features. The sample-node adaptive fusion module is used to obtain dynamic fusion weights based on the differences in sample coupling modes and the spatial correlation strength of nodes, and to obtain adaptive fusion features based on the dynamic fusion weights, the feature embedding tensor, and the bidirectional coupling features. The prediction output module is used to output traffic prediction results based on the adaptive fusion features.