Traffic flow prediction method and device based on time sequence perception graph generation and online potential diffusion

By using a joint framework of time-aware graph generation and online latent state diffusion, the traffic network topology is dynamically constructed, multi-level latent state features are generated and denoised, solving the problems of topological mutation and data distribution drift in existing models, achieving efficient and accurate traffic flow prediction, and supporting real-time intelligent traffic management.

CN121505873APending Publication Date: 2026-02-10HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511809651.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing traffic flow prediction models struggle to adapt to sudden changes in road topology, experience a surge in parameters leading to inference delays, and suffer from drift in training-inference data distribution, resulting in insufficient generalization capabilities and high maintenance costs.

Method used

A joint framework of time-aware graph generation and online latent state diffusion is adopted. By dynamically constructing the time-aware graph, multi-level latent state features are generated using the forward diffusion process, and denoising is performed through a graph conditional inverse network. Combined with an online update mechanism, fast and robust multi-step prediction is achieved.

Benefits of technology

It significantly improves the accuracy and adaptability of traffic flow prediction, enabling rapid response and stable performance in complex traffic environments, and supports real-time intelligent traffic management and travel information services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505873A_ABST
    Figure CN121505873A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic flow prediction method and device based on time sequence perception graph generation and online potential diffusion. Time sequence slicing and normalization processing are carried out on multi-source traffic data, and a time sequence sensing graph capable of reflecting node time correlation and a spatial adjacency relation is constructed. In the diffusion modeling part, improvement is carried out on the basis of a DiffSTWave potential diffusion framework, and a graph convolution residual error and a graph condition reverse network are introduced, so that a dynamic graph structure can be fully utilized in the forward and reverse diffusion processes to represent the space-time dependency relationship of traffic. After multi-order latent state features are generated through forward diffusion, high-dimensional space-time representation is recovered step by step through a graph condition denoising network, and finally a future multi-step traffic flow state is generated through a prediction decoder. Compared with the prior art, the method has higher prediction accuracy and adaptivity in the aspects of diffusion modeling and dynamic graph fusion, can better adapt to rapid dynamic change of traffic flow, and can effectively adapt to real-time terminal equipment application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent traffic management and big data analysis, in particular to a spatio-temporal sequence prediction method and device based on multi-scale time series image and multi-modal feature fusion, which can be used for traffic flow prediction, congestion warning and scheduling optimization in urban road, public transportation network and other scenarios. BACKGROUND

[0002] With the continuous rise of urban road network scale and traffic density, traffic authorities are deploying a large number of fixed perception devices, floating car GPS, mobile phone signaling and Internet of Things sensors in order to obtain high-resolution spatio-temporal traffic state and make predictions accordingly. Graph convolution network, spatio-temporal graph convolution network and self-attention model based on Transformer have become the mainstream solution in the academic and industrial communities in recent years. They can capture both road topology and time series dependence, and have shown better accuracy and stability than traditional autoregressive integral moving average model and long short-term memory network method in the prediction tasks of expressway, urban arterial road and even subway passenger flow. At the same time, the fusion of cross-modal environment-weather-event data further improves the warning ability of sudden congestion.

[0003] However, the existing models still face three major bottlenecks: first, most methods assume that the road topology remains static within the prediction window, making it difficult to adapt to edge weight mutations caused by construction control or temporary events, thereby weakening the discriminability of extreme working conditions; second, in order to consider multi-scale dependence, the model often stacks deep convolution or multi-head self-attention, resulting in a sharp increase in parameter quantity and a rising inference delay, which makes it difficult to iterate in real time in the traffic guidance system with second-level update; third, random missing and cross-modal noise cause the data distribution to drift between training and inference stages, and the traditional offline training mode lacks generalization ability for new scenarios, requiring frequent offline fine-tuning and high operating cost.

[0004] In view of the above problems, the academic community has begun to explore generative graph learning and diffusion prediction framework that can reconstruct topology online and model time series evolution explicitly. Among them, the time series perception graph generation technology can dynamically update the dependence relationship between nodes according to real-time speed-flow-event signals, thereby capturing topology mutations caused by road construction, accidents, etc.; and the latent state diffusion model can efficiently model the complex nonlinear distribution of traffic flow in a low-dimensional latent space through step-by-step noise injection and reverse denoising-resampling mechanism, and achieve fast inference through fewer diffusion steps. In this direction, the latent state diffusion spatio-temporal prediction model represented by DiffSTWave has verified the feasibility of diffusion mechanism in traffic flow prediction task, but it does not fuse dynamic graph structure and lacks online updating ability, and its adaptability to rapidly evolving traffic topology and distribution drift is still limited.

[0005] The "time sequence perception graph generation + online latent state diffusion" joint framework proposed by the application is a systematic landing of the above-mentioned trend: through online graph generation, the evolution of the traffic network is described in real time, and through latent state diffusion, multi-step prediction is realized with lightness, speed and robustness, which takes into account accuracy, efficiency and scalability, and can effectively support the real-time decision-making needs of city-level intelligent traffic management and travel information services. SUMMARY

[0006] The application aims to solve the above problems, and provides a traffic flow prediction method and device based on time sequence perception graph generation and online latent state diffusion, which dynamically constructs a time sequence perception graph reflecting the time correlation and spatial adjacency relationship between nodes by performing time sequence slicing and normalization processing on multi-source traffic data, gradually adds noise to the latent state traffic representation by using a forward diffusion process, generates multi-order latent state features, and then gradually denoises the noise latent state by using a graph conditional reverse network, restores high-dimensional spatio-temporal features, and inputs a prediction decoder to generate future multi-step traffic flow states, thereby improving the accuracy and adaptability of traffic flow prediction and effectively adapting to real-time end device applications.

[0007] Technical scheme: The application provides a traffic flow prediction method based on time sequence perception graph generation and online latent state diffusion, comprising the following steps:

[0008] Step 1: Collecting and preprocessing original time sequence data of traffic flow, vehicle speed and occupancy rate, and dynamically generating a time sequence perception graph according to the flow correlation and geographical proximity of each node in the preprocessed data set , which is used for structural constraint in the subsequent diffusion and denoising stages;

[0009] Step 2: Taking the preprocessed data set as input, constructing latent state input required for diffusion and setting noise increment of each diffusion step; then injecting Gaussian noise into the latent state representation within diffusion steps t, generating a multi-order latent state sequence, and taking the latent state representation, position encoding and graph structure generated in step 2 as joint input, and using a diffusion reverse order iteration mechanism to recover the latent state features layer by layer, and simultaneously capturing the spatio-temporal coupling relationship between nodes;

[0010] Step 3: Under the condition of time sequence perception graph, a graph conditional U-Net denoising network is constructed, and the latent state representation, position encoding and graph structure generated in step 2 are taken as joint input, and a diffusion reverse order iteration mechanism is used to recover the latent state features layer by layer, and simultaneously capture the spatio-temporal coupling relationship between nodes;

[0011] Step 4: Inputting the recovered latent state features into a prediction decoder, outputting future Q-step traffic flow and vehicle speed prediction results, and combining error feedback in the decoding stage to quickly correct the prediction accuracy.

[0012] Further, the specific method of step 1 is:

[0013] Step 1.1: Collect original time series data, generate original dataset D1, perform linear interpolation when the length of missing data is below the system threshold, and call the median value of the adjacent time window to replace it when it is above the threshold;

[0014] Step 1.2: Perform Z-Score standardization on the completed sequence to obtain the pretreated initial dataset D2;

[0015] Step 1.3: Based on the time series data of dataset D2 within the current sliding window, calculate the correlation coefficient between nodes and traffic, and dynamically generate a time-aware graph combined with the geographical adjacency matrix weight ;

[0016] Step 1.4: Divide the standardized sequence into short-term subsequences and write the batch of subsequences into the sliding window subsequence pool as input for the subsequent diffusion and denoising stage.

[0017] Further, the initial time-aware graph is only based on sliding window statistics, and for this purpose, self-supervised contrastive learning is further introduced for graph structure optimization, while keeping the temperature coefficient stable, the graph contrastive loss is minimized to update the adjacency matrix weight, obtaining a graph structure representation that better fits real-time traffic changes, where is the node correlation, and the optimized graph structure is input in the form of in the backward diffusion.

[0018] Further, the specific method of step 2 is:

[0019] Step 2.1: Prepare noise parameters for the subsequent forward diffusion process, use cosine scheduling to set the noise increment of each diffusion step , so that the diffusion noise is distributed smoothly and increases in the entire sequence. The noise increment of the t-th diffusion step is set using cosine scheduling:

[0020] ;

[0021] where , , is the period parameter in d-dimensional time position encoding;

[0022] Step 2.2: At each diffusion step t, based on the noise increment , inject Gaussian noise into the latent state representation to obtain the intermediate latent state representation in forward diffusion ;

[0023] Step 2.3: Introduce a graph convolution residual block at each diffusion step to make ​, to strengthen the spatial information transmission and suppress the structural distortion in the noise injection process, is the time-aware graph structure, i.e., the adjacency matrix weight;

[0024] Step 2.4: Write the generated latent state sequence into the cache queue together with the corresponding time embedding, ensuring that the subsequent reverse process can be read smoothly;

[0025] Step 2.5: At each diffusion step t, combine the latent state input representation of the preprocessed data set D2 with the time position encoding and input it into the diffusion network; if t = 1, initialize it as the original sequence; otherwise, continuously inject Gaussian noise and superimpose graph convolution residuals until the diffusion step reaches the set T steps, forming a complete latent state diffusion trajectory.

[0026] Further, the specific method of step 3 is:

[0027] Step 3.1: At the diffusion step input the latent state representation , the time position encoding and the time-aware graph structure into the graph-conditioned U-Net denoising network, output the noise estimate: , and the diffusion reverse step is denoted as ;

[0028] Step 3.2: Update iteratively until = 1, obtaining the final recovered latent state feature;

[0029] Step 3.3: Train the reverse network parameters by minimizing the denoising reconstruction loss function , where is the random noise sampled from the standard normal distribution, is the output of the noise prediction network, is the average expectation of the three random variables;

[0030] Step 3.4: In the denoising process, introduce the spatio-temporal coupling weight to dynamically balance the temporal dependence and spatial correlation, and the spatio-temporal coupling weight is embedded into the spatio-temporal attention layer and convolution channel weight of the graph-conditioned U-Net to adjust the contribution proportion of temporal dependence and spatial adjacency features.

[0031] Further, the specific method of step 4 is:

[0032] Step 4.1: denoising the latent state features Input decoder Get the hidden representation ;

[0033] Step 4.2: use a linear output head Predict the future Traffic flow and speed prediction values ;

[0034] Step 4.3: use a combined loss function , and update the decoder weights in the opposite direction, where is the actual observation, is the loss balancing coefficient;

[0035] Step 4.4: After the decoder outputs the prediction results, introduce an accuracy determination mechanism after the decoder output. Compare the current prediction results with the historical baseline or validation set error. If the set accuracy requirement is not met, dynamically adjust the decoder parameters and re-execute the training correction.

[0036] Further, after outputting the future Q-step traffic flow and speed prediction results in step 4, new observation data is continuously received, incremental learning is performed, and the time series perception graph weight and the graph condition U-Net denoising network parameter set are updated to generate an online update dataset. When the error exceeds the threshold or structural disturbance occurs, trigger fast adaptive learning to maintain the real-time adaptability of the model to dynamic traffic environments.

[0037] The application also discloses a traffic flow prediction device based on time series perception graph generation and online latent state diffusion, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0038] Advantages:

[0039] The application can fully capture the spatio-temporal dependence between multiple nodes in a complex traffic network. By dynamically constructing and optimizing the time series perception graph, combining the latent state diffusion and conditional denoising mechanism, the noise interference and structural distortion are effectively suppressed, and the prediction accuracy and robustness are significantly improved. At the same time, the application introduces an online update mechanism, which can perform incremental learning and graph weight adaptive adjustment in real time when receiving new observation data, so that the prediction model can still maintain fast response and stable performance when the traffic environment is disturbed or the mode changes, thereby realizing efficient and reliable prediction of future multi-step traffic states, and providing strong support for intelligent traffic scheduling and management. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of the overall method;

[0041] Figure 2 This is a diagram illustrating the collaboration between system modules;

[0042] Figure 3 Flowchart for data preprocessing and graph construction;

[0043] Figure 4 Flowchart for modeling forward diffusion;

[0044] Figure 5 This is a flowchart of the denoising and prediction process. Detailed Implementation

[0045] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0046] This invention discloses a traffic flow prediction method based on time-series sensing map generation and online latent state diffusion, comprising the following steps:

[0047] Step 1: Collect raw time-series data such as traffic flow, vehicle speed, and occupancy from road sensors to form the raw dataset D1; perform missing value imputation and time alignment on D1 to obtain preprocessed data, and then standardize the preprocessed data to form the preprocessed dataset D2; subsequently, dynamically generate a time-series sensing map based on the traffic correlation and geographical proximity of each node in D2. This is used for structural constraints in subsequent diffusion and denoising stages. The specific method is as follows:

[0048] Step 1.1: Collect raw time-series data such as traffic flow, vehicle speed and occupancy from road sensors to generate raw dataset D1, and detect missing segments in the raw sequence; when the missing length is lower than the system threshold, perform linear interpolation; when it is higher than the threshold, call the median value of the adjacent time window for replacement to avoid abnormal fluctuations causing offsets to subsequent predictions.

[0049] Step 1.2: Perform Z-Score normalization on the completed sequence. In the formula For the mean, The standard deviation is used to obtain the preprocessed initial dataset D2; where and For nodes The mean and standard deviation within the most recent observation window are updated in real time within the sliding statistical window to ensure that the normalized parameters remain consistent with the latest data distribution. To characterize the spatiotemporal dependencies between nodes, the traffic correlation coefficient between nodes is calculated based on the time-series data of D2 within the current sliding window, and a time-series-aware map is dynamically generated by combining the weights of the geographic adjacency matrix. This provides structural constraints for the subsequent diffusion and denoising stages.

[0050] Step 1.3: Based on window length Divide the standardized sequence into short subsequences The batch of subsequences is then written into a sliding window subsequence pool as input for subsequent diffusion and denoising stages. Let k be the subsequence of the sliding window.

[0051] Step 1.4: Due to the initial Based solely on sliding window statistics, graph structures are highly sensitive to time window length and local perturbations. To improve graph structure stability and generalization ability, and to enhance structural robustness by utilizing temporal consistency signals between nodes, self-supervised contrastive learning is further introduced for graph structure optimization. Using the self-supervised contrastive learning strategy, the following objective function is minimized. Maintaining temperature coefficient While maintaining stability, the adjacency matrix weights are dynamically updated to obtain a graph structure representation that better reflects real-time traffic changes. In the formula... For node correlation, For temperature coefficient. The optimized graph structure in the back diffusion step uses... The conditional network is entered step by step in the form of input.

[0052] Step 2: Using the preprocessed dataset D2 as input, based on the preset sliding window length... Latent state representation is performed, followed by forward diffusion noise injection within diffusion steps T to obtain a multi-order latent state sequence. The specific method is as follows:

[0053] Step 2.1: Prepare noise parameters for the subsequent forward diffusion process, and use cosine scheduling to set the noise increment for each diffusion step. To ensure that the diffusion noise has a smooth, increasing distribution throughout the sequence, cosine scheduling is used to set the diffusion noise increment at step t. ,in , ,in The periodic parameters are encoded in the d-dimensional space for time location.

[0054] Step 2.2: At each diffusion step t, based on the noise increment Injecting Gaussian noise into the latent state representation yields a forward-diffused intermediate representation. .

[0055] Step 2.3: To avoid noise damaging the spatial structure, a graph convolution residual block is introduced in each diffusion step. ,make This enhances spatial information transmission and suppresses structural distortion during noise injection, among which For time-aware graph weights.

[0056] Step 2.4: Write the generated latent sequence and the corresponding time embedding together into the cache queue to ensure that the subsequent reverse process can be read smoothly.

[0057] Step 2.5: At each diffusion step t, the latent input representation from the preprocessed dataset D2 is combined with the temporal location encoding and input into the diffusion network; if t=1, it is initialized as the original sequence; otherwise, Gaussian noise is continuously injected and graph convolution residuals are superimposed until the number of diffusion steps reaches the set T steps, forming a complete latent diffusion trajectory.

[0058] Step 3: Under the temporal-aware graph conditional constraints, construct a graph-conditional U-Net denoising network. Use the latent state sequence, positional encoding, and graph structure generated in Step 2 as joint inputs. Employ a diffusion-reverse-order iterative mechanism to recover latent features layer by layer, simultaneously capturing the spatiotemporal coupling relationships between nodes. Spatiotemporal coupling weight parameters are introduced during this process. and with the overall network parameters Join in the optimization process. The specific method is as follows:

[0059] Step 3.1: In the diffusion step Input latent state representation Time and location coding With graph structure To the conditional U-Net, output noise estimation U-Net is a conditional denoising network.

[0060] Step 3.2: Iterate and update in reverse order Iterative denoising until = 1.

[0061] Step 3.3: Minimize the denoising and reconstruction loss function Training the backpropagation network parameters ,in Includes all learnable parameters of the graph-conditional U-Net denoising network and its associated linear layers; introduces spatiotemporally coupled weights. By dynamically balancing temporal dependence and spatial correlation, the value of which is adaptively updated during backpropagation with training iterations, the model can capture global and local dependencies in different traffic modes.

[0062] Step 3.4: Spatiotemporal coupling weights during denoising. The weights are embedded into the spatiotemporal attention layer and convolutional channel weights of the graph-conditional U-Net to adjust the contribution ratio of temporal dependence and spatial adjacency features. These weights are adaptively updated according to gradient changes in each backpropagation cycle, enabling the model to capture global and local dependencies under different traffic patterns, thereby enhancing prediction robustness.

[0063] Step 4: Input the recovered latent features into the prediction decoder, and output the future... The method for predicting pedestrian traffic flow and vehicle speed is as follows:

[0064] Step 4.1: Denoise the latent state Input Decoder Obtain hidden representation ;

[0065] Step 4.2: Using a linear output head Predicting the future Traffic flow and speed forecasts ;

[0066] Step 4.3: Use the combined loss function And use this to adjust the decoder weights Perform a reverse update, where For actual observed values, This is the loss balancing coefficient, and its value can be dynamically adjusted based on the performance of the validation set.

[0067] Step 4.4: To avoid prediction bias caused by abnormal data, an accuracy judgment mechanism is introduced after the decoder outputs the data. The error between the current prediction result and the historical baseline or validation set is compared. If the set accuracy requirements are not met, the decoder parameters (such as the learning rate or regularization coefficient) are dynamically adjusted, and training correction is re-executed to ensure that the final output result reaches the expected accuracy.

[0068] Step 4.5: In conjunction with external traffic event information (such as construction, accidents, etc.), correct some node results during the prediction phase to ensure that the prediction results are interpretable and robust.

[0069] Step 5: After outputting the predicted traffic flow and vehicle speed for the next Q steps in Step 4, new observation data is continuously received, incremental learning is performed, and the weights of the temporal perception graph are updated. And the parameter set of the U-Net denoising network under graphical conditions This involves generating an online updated dataset and triggering rapid adaptive learning when errors exceed a threshold or structural disturbances occur, thereby maintaining the model's real-time adaptability to dynamic traffic environments. The specific method is as follows:

[0070] Step 5.1: The system continuously receives the latest observation data and writes it into the online update buffer pool D3 in chronological order.

[0071] Step 5.2: Periodically read the nearest window sample in D3, calculate the real-time prediction error, and when the error exceeds the adaptive threshold or a significant change in the adjacent edge weights is detected, perform incremental learning to update the weights of the time-aware graph. and model parameter set .

[0072] Step 5.3: After the update is complete, retain the latest window data and clean up expired entries to ensure that the overall adaptive learning cycle is always maintained within the preset fast response time limit.

[0073] Step 5.4: Before performing an online update, first check the integrity of the input data. If it is missing, trigger a request to resend or a cache waiting strategy to ensure the continuity of the input data.

[0074] Step 5.5: After the data is complete, parse and extract key features, calculate node flow changes, detect structural disturbances by combining external factors such as construction / accidents, and update the edge weights of the adjacency matrix accordingly. If the disturbance is not enough to exceed the threshold, skip the update and only log it.

[0075] Step 5.6: If the update threshold is met, perform incremental training based on the cached data, dynamically adjust the weights of the denoising network and the predictive decoder, and update the learning rate or regularization strategy to improve the model's adaptability.

[0076] Step 5.7: After the update is completed, the feedback controller will summarize the anomaly detection and prediction error information to provide auxiliary decision-making information for traffic management departments.

[0077] This invention can be integrated with a computer system to form an intelligent auxiliary device for traffic flow state prediction and scheduling. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements the aforementioned traffic flow prediction method based on time-series perception map generation and online latent state diffusion. This device enables real-time processing and prediction of traffic flow, vehicle speed, and occupancy data in road traffic, supporting high-precision and robust prediction performance even in complex scenarios such as traffic surges, road construction, or emergencies, providing reliable technical support for intelligent traffic management, congestion control, and emergency dispatch.

[0078] The experimental dataset used in this embodiment of the invention is a self-built dataset, CityFlow-100. CityFlow-100 contains 5-minute granular traffic time-series data (flow rate, vehicle speed, occupancy rate) for 100 road network nodes, totaling 30 days and 8640 time steps. It is divided into a training set (60%), a validation set (20%), and a test set (20%). Missing data was imputed and Z-score normalized to obtain dataset D2. Using a sliding window length of P=12 (corresponding to historical observation data from the past 60 minutes) as input, it predicts the traffic status for the next Q=12 time steps (corresponding to the traffic status in the next 60 minutes).

[0079] Comparative experiment:

[0080] This study compares several mainstream traffic flow prediction models, including STGCN, DCRNN, GraphWaveNet, and DiffSTGNN. STGCN and DCRNN are typical spatiotemporal convolutional and recurrent structure models, GraphWaveNet introduces an adaptive graph learning mechanism, and DiffSTGNN represents a state-of-the-art method based on diffusion modeling. Experiments were conducted on the same dataset and with the same parameter settings. Evaluation metrics included MAE, RMSE, MAPE, and latency. MAE represents the mean absolute error, used to measure the average deviation between predicted and actual values; RMSE represents the root mean square error, used to reflect the stability of the overall prediction error; and MAPE represents the mean absolute percentage error, used to evaluate the relative error ratio. Results show that the proposed method outperforms the comparison models in prediction accuracy, reducing the average MAE by approximately 13.1% and the MAPE by approximately 18.6% compared to the optimal baseline, maintaining high accuracy while balancing real-time performance and stability.

[0081] Table 1. Comparison of this invention with other models

[0082] Model MAE↓ RMSE↓ MAPE(%)↓ Latency(ms) STGCN 5.12 8.93 14.8 22 DCRNN 4.68 8.21 13.5 35 GraphWaveNet 4.41 7.95 12.9 45 DiffSTGNN 4.05 7.12 11.8 60 Invention 3.52 6.21 9.6 52

[0083] Ablation experiment:

[0084] Ablation experiments were conducted on the same CityFlow-100 dataset and parameter settings. The effects of these components were analyzed by progressively removing core components from the model, including removing the spatiotemporal coupling weights Xi, removing graph convolution residual blocks, and disabling the online update module.

[0085] Table 2 Ablation Experiment

[0086] Model MAE↓ Relative Increase Invention (complete) 3.52 — Remove Xi (fixed spatio-temporal weights) 3.90 +10.8% Remove GCN residual block 3.84 +9.1% Turn off online update module 4.10 +16.5%

[0087] Ablation experiments show that the spatiotemporal coupling weights Xi and graph convolutional residual blocks both play a key role in improving prediction accuracy; the online update mechanism significantly enhances the long-term stability of the model and its adaptability to distribution drift.

[0088] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A traffic flow prediction method based on time-series sensing map generation and online latent state diffusion, characterized in that, Includes the following steps: Step 1: Collect raw time-series data on traffic flow, vehicle speed, and occupancy, and preprocess them. Based on the traffic flow correlation and geographical proximity of each node in the preprocessed dataset, dynamically generate a time-series sensing map. , used for structural constraints in subsequent diffusion and denoising stages; Step 2: Using the preprocessed dataset as input, construct the latent state input required for diffusion and set the noise increment for each diffusion step; Subsequently, Gaussian noise is injected into the latent state representation stepwise within diffusion steps t to generate a multi-order latent state sequence, which serves as the input for the reverse denoising stage. Step 3: Under the constraints of time-aware graph conditions, construct a graph-conditional U-Net denoising network, and use the latent state representation, position encoding and graph structure generated in Step 2 as joint inputs. Use a diffusion reverse order iterative mechanism to recover latent state features layer by layer and capture the spatiotemporal coupling relationship between nodes simultaneously. Step 4: Input the recovered latent features into the prediction decoder, output the future Q-step traffic flow and vehicle speed prediction results, and combine error feedback to quickly correct the prediction accuracy during the decoding stage.

2. The traffic flow prediction method based on time-series sensing map generation and online latent diffusion according to claim 1, characterized in that, The specific method for step 1 is as follows: Step 1.1: Collect raw time series data and generate raw dataset D1. When the missing length is lower than the system threshold, perform linear interpolation; when it is higher than the threshold, use the median value of the nearest time window for replacement. Step 1.2: Perform Z-Score normalization on the completed sequence to obtain the preprocessed initial dataset D2; Step 1.3: Based on the time-series data of dataset D2 within the current sliding window, calculate the traffic correlation coefficient between nodes, and dynamically generate a time-series-aware map by combining the weights of the geographical adjacency matrix. ; Step 1.4: Based on window length The standardized sequence is divided into short subsequences and the batch of subsequences is written into the sliding window subsequence pool as input for the subsequent diffusion and denoising stages.

3. The traffic flow prediction method based on time-series sensing map generation and online latent state diffusion according to claim 2, characterized in that, Initial time-aware graph Based solely on sliding window statistics, self-supervised contrastive learning is further introduced to optimize the graph structure while maintaining the temperature coefficient. Under stable conditions, minimize the graph contrast loss. Update the adjacency matrix weights to obtain a graph structure representation that better reflects real-time traffic changes, where, For node correlation, the optimized graph structure in back diffusion... Enter the information step by step in the form of [the input method].

4. The traffic flow prediction method based on time-series sensing map generation and online latent state diffusion according to claim 1, characterized in that, The specific method for step 2 is as follows: Step 2.1: Prepare noise parameters for the subsequent forward diffusion process, and use cosine scheduling to set the noise increment for each diffusion step. To ensure a smooth, increasing distribution of diffuse noise throughout the sequence, cosine scheduling is used to set the diffuse noise increment at step t: ; in, , , Encode the periodic parameters in d dimensions for time position; Step 2.2: At each diffusion step t, based on the noise increment Injecting Gaussian noise into the latent state representation yields a forward-diffused intermediate latent state representation. ; Step 2.3: Introduce graph convolution residual blocks at each diffusion step ,make This enhances spatial information transmission and suppresses structural distortion during noise injection. This is a time-aware graph structure, i.e., adjacency matrix weights; Step 2.4: Write the generated latent sequence and the corresponding time embedding together into the cache queue to ensure smooth reading in the subsequent reverse process; Step 2.5: At each diffusion step t, the latent input representation of the preprocessed dataset D2 is combined with the temporal location encoding and input into the diffusion network; if t=1, it is initialized as the original sequence; otherwise, Gaussian noise is continuously injected and graph convolution residuals are superimposed until the number of diffusion steps reaches the set T steps, forming a complete latent diffusion trajectory.

5. The traffic flow prediction method based on time-series sensing map generation and online latent diffusion according to claim 4, characterized in that, The specific method for step 3 is as follows: Step 3.1: In the diffusion step Input latent state representation Time and location coding With time-aware graph structure The output noise estimate of the conditional U-Net denoising network is as follows: In the diffusion reverse step, when inputting the conditional network according to diffusion step t, it is denoted as... ; Step 3.2: Iterate and update in reverse order Iterative denoising until = 1, thus obtaining the final recovered latent state features; Step 3.3: Minimize the denoising and reconstruction loss function Training the backpropagation network parameters , Includes all learnable parameters of the graph-conditional U-Net denoising network and its associated linear layers, where For random noise sampled from a standard normal distribution, The output of the noise prediction network, It is the average expected value of three random variables; Step 3.4: In the denoising process, introduce spatiotemporal coupling weights. To dynamically balance time dependence and spatial correlation, spatiotemporal coupling weights It is embedded into the spatiotemporal attention layer and convolutional channel weights of the graph conditional U-Net to adjust the contribution ratio of temporal dependence and spatial adjacency features.

6. The traffic flow prediction method based on time-series sensing map generation and online latent diffusion according to claim 1, characterized in that, The specific method for step 4 is as follows: Step 4.1: Denoise the latent state features Input Decoder Obtain hidden representation ; Step 4.2: Using a linear output head Predicting the future Pedestrian traffic flow and speed forecasts ; Step 4.3: Employ the combined loss function And use this to adjust the decoder weights Perform a reverse update, where These are actual observed values. This is the loss balance coefficient; Step 4.4: After the decoder outputs the prediction result, an accuracy determination mechanism is introduced after the decoder output. The error of the current prediction result is compared with the historical baseline or validation set. If the set accuracy requirement is not met, the decoder parameters are dynamically adjusted and the training correction is re-executed.

7. The traffic flow prediction method based on time-series sensing map generation and online latent diffusion according to claim 5, characterized in that, After outputting the predicted traffic flow and vehicle speed for the next Q steps in step 4, the system continues to receive new observation data, perform incremental learning, and update the weights of the temporal perception graph. And the parameter set of the U-Net denoising network under graphical conditions It generates an online updated dataset and triggers rapid adaptive learning when the error exceeds a threshold or structural disturbances occur, thereby maintaining the model's real-time adaptability to dynamic traffic environments.

8. A traffic flow prediction device based on time-series perception map generation and online latent state diffusion, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed, implements the traffic flow prediction method based on time-series perception map generation and online latent state diffusion as described in any one of claims 1-7.

Citation Information

Cited By

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

    CN121963489A

  • A method and system for predicting urban road network traffic state and congestion propagation probability

    CN121963489B