Physical information enhanced space-time diagram network trusted computing method for traffic flow anomaly prediction
By combining traffic flow physical laws and graph structure data, a spatio-temporal graph convolution network is built and trusted computing is deployed, the instability and safety problems of traffic flow prediction are solved, and high-precision and high-rootability traffic flow prediction are achieved.
Patent Information
- Application Number
- CN202510513325.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-04
AI Technical Summary
The existing traffic flow prediction model lacks physical law embedding, insufficient graph structure modeling, lagging exception responses and insufficient trusted calculations, resulting in unstable, inaccurate and poor safety.
Through the LWR equation and micro IDM model embedded in traffic flow, macro CTM and micro IDM models are built, multi-scale fusion is combined with spatiotemporal graph convolution networks, TEE and blockchain are deployed for trusted calculations, and real-time anomaly detection and response are realized.
It improves the accuracy and safety of traffic flow forecasting, ensures the reliability and credibility of forecast results, and is suitable for urban traffic management and intelligent transportation systems.
Smart Images

Figure CN120260283A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic management and intelligent transportation, and particularly to a trusted computing method for physical information enhanced spatio-temporal graph network for abnormal traffic flow prediction. Background Art
[0002] Currently, with the acceleration of urbanization and the rapid increase in traffic flow, problems such as traffic congestion, frequent accidents, and environmental pollution have become increasingly serious. To relieve traffic pressure and improve the operation efficiency of the traffic system, a variety of traffic flow prediction technologies have been proposed. Most of these technologies rely on historical data, machine learning, or deep learning models for prediction, but they still have some problems:
[0003] Lack of physical laws: Existing prediction models such as Long Short-Term Memory (LSTM) usually only rely on the statistical characteristics of historical traffic data and do not embed the basic physical laws of traffic flow. The lack of physical laws makes the performance of traditional models unstable and inaccurate in some extreme or abnormal situations.
[0004] Insufficient graph structure modeling: The traffic network of modern cities usually presents a complex graph structure (nodes represent intersections and roads are edges), while existing models fail to fully consider the mutual relationships between different roads and different intersections in the graph structure, affecting the accuracy of prediction results.
[0005] Lagged abnormal response: Traditional traffic flow prediction methods are based on fixed thresholds (such as the 3σ principle), and the response to abnormal fluctuations in traffic flow (such as sudden traffic accidents, unexpected traffic jams, etc.) is not timely enough, lacking an effective abnormal point detection and early warning mechanism.
[0006] Insufficient trusted computing: The results of traffic flow prediction are usually processed by a central server, which is prone to data privacy and security risks. Problems such as data leakage and model result tampering may affect traffic safety and management decisions.
[0007] Therefore, how to combine physical laws with graph structure data, improve the accuracy of traffic flow prediction, and introduce trusted computing technology to ensure the security and reliability of results has become a technical problem to be solved urgently. Summary of the Invention
[0008] Objective of the Invention: Aiming at the deficiencies in the prior art, the present invention proposes a physical information enhanced spatio-temporal graph network trusted computing method for traffic flow anomaly prediction by utilizing the physical laws of traffic flow and the graph structure data of the traffic road network. This method integrates the trusted computing system, physical law modeling, and spatio-temporal graph structure analysis, improves the accuracy of traffic flow prediction by identifying abnormal fluctuations in traffic flow through real-time prediction of traffic flow changes, and ensures the security and reliability of the prediction results through anomaly point detection and trusted computing.
[0009] Technical Solution: The physical information enhanced spatio-temporal graph network trusted computing method for traffic flow anomaly prediction of the present invention includes the following steps:
[0010] Step (1), construct the physical constraint of the LWR model by embedding the LWR equation of traffic flow, correct the critical density and free flow speed parameters through the Kruithof curve, and improve the traffic density of the LWR model; discretize the road and establish the macroscopic CTM model: divide the target road network by a fixed length, discretize the road into cells, and each cell contains the density ρ i (t) and the transmission flow Q i→j (t) between adjacent cells. The transmission flow between adjacent cells is: Q i→j (t) = min{D i (t), S j (t)}, where D i (t) = v i ·ρ i is the demand flow of cell i, and S j (t) = ρ jam - ρ i is the supply flow of cell j. Update the traffic flow of the macroscopic CTM model over time to obtain the prediction result Q CTM : Q CTM = Q i→j (t); then generate a correction factor Q micro through the microscopic IDM model: Q micro = Q CTM ·(1 + β·local congestion coefficient - γ·acceleration variability); where β and γ are weight coefficients;
[0011] Fuse the prediction result Q CTM of the macroscopic CTM model and the correction factor Q micro generated by the microscopic IDM model through the dynamic weight λ, and calculate the fusion result Q fuse : Q fuse = λ·Q CTM + (1 - λ)·Q micro ;
[0012] Step (2), construct a spatio-temporal graph convolutional network model: convert the traffic road network into an edge-node graph structure, and embed the time dimension into the graph structure to construct a time-varying graph; construct a spatial graph convolutional module and a temporal convolutional module through convolution, and extract the spatial feature matrix and the temporal feature matrix; use a gated recurrent unit to fuse and update the spatio-temporal features, and map the traffic network features to spatio-temporal convolutional predicted traffic; based on the predicted traffic Q of the mean square error pred and the measured traffic Q real , combined with the physical constraint loss, construct the loss function of the spatio-temporal graph convolutional network;
[0013] Step (3), perform dynamic anomaly detection and hierarchical response, adjust the anomaly threshold according to the period sensitivity, and perform a closed-loop process of residual analysis - threshold adaptation - classification warning - measure feedback through the anomaly response mechanism;
[0014] Step (4), deploy TEE in the traffic network edge sensing device and store evidence through the blockchain.
[0015] In step (1), the LWR equation is: where ρ is the vehicle density, v is the average speed, x is the spatial position, and t is the time.
[0016] In step (1), correct the critical density and the free flow speed through the Kruithof curve, and improve the traffic density Q(ρ) of the LWR model:
[0017]
[0018] where ρ c is the critical density; When ρ ≤ ρ c , it is the free flow stage, and v f is the free flow speed at the current moment; when ρ > ρ c , it is the congestion stage, and α is the capacity correction factor.
[0019] In step (1), the process of generating the correction factor Q micro through the microscopic IDM model is: determine the behavior of a single vehicle through the microscopic IDM model: where a is the acceleration, s is the distance to the vehicle ahead, is the expected safety distance; statistically count the microscopic indicators every set time, and quantify the microscopic indicators into the correction factor Q micro of the microscopic IDM model.
[0020] The microscopic indicators are as follows: the proportion of the decrease in the average vehicle speed is the local congestion coefficient, the standard deviation of the vehicle acceleration is the acceleration variability, and the deviation ratio of the actual distance to the expected safety distance is the following vehicle distance outlier.
[0021] The process of step (2) is as follows:
[0022] In step (2.1), the intersections of the traffic road network are defined as nodes, the roads are defined as edges, and the traffic capacity of the roads is the dynamic edge weight.
[0023] In step (2.2), time slices are constructed by dividing time periods with a set time granularity. Each time slice in the time-varying graph contains the dynamic attributes of nodes and edges at the current moment.
[0024] In step (2.3), a spatial graph convolutional module is constructed, using the K-order Chebyshev polynomial as the graph convolution kernel to capture the spatial positions of network nodes:
[0025]
[0026] where Θ = {θ0, θ1,..., θ K-1} is the convolution kernel parameter, representing the weight parameter of the traffic network; θ k is the weight of the k-th order polynomial, that is, the k-th coefficient of the Chebyshev polynomial, *G is the graph convolution operation, x is the input feature, T k is the Chebyshev polynomial I is the identity matrix, is the normalized Laplacian matrix, K is the convolution order; the graph convolution operation is decomposed into a weighted combination of multi-order neighborhood features through the Chebyshev polynomial, and the spatial feature matrix X spt is output;
[0027] In step (2.4), a temporal convolution module is constructed, using a one-dimensional convolution kernel to process the original temporal data X in the time dimension:
[0028] H t = Conv1D(X t-K:t , W conv )
[0029] where is the output feature after the convolution operation, F is the number of output channels, X t-K:t is the input feature sequence from time step t - K to t, K represents the size of the convolution kernel, and the feature dimension of each time step is D, that is is the weight matrix of the convolution kernel; a temporal feature matrix X T based on the state sequence {H1, H2,..., H temp} is generated, X temp = {H1, H2,..., H T};
[0030] In step (2.5), the gated recurrent unit dynamically controls the information flow through the update gate and the reset gate. In STGCN, the output spatial feature matrix X sptand the time feature matrix X temp Align with the time slices divided in step (2.2) and splice them into the joint feature matrix X fusion , as the input sequence of the GRU; X fusion ={x1, x2,..., x T}, where x t represents the features of all nodes at the t-th time step, and update the GRU hidden state through the formula:
[0031] h t = GRU(x t , h t-1 ):
[0032]
[0033] Candidate hidden state:
[0034] Final hidden state:
[0035] Among them, the hidden state of the previous time step and the node features of the current time step are used as inputs, and the weight matrices W z and W r control the past information h t-1 , retain the influence on the candidate hidden state , where σ is the sigmoid activation function, r t ⊙h t-1 is the historical information filtered by the reset gate. According to the update gate z t , the past state h t-1 is weighted and fused with the candidate state to update the hidden state h t ; map the final hidden state h T to the spatio-temporal convolution prediction flow through the fully connected layer of the spatio-temporal convolution network:
[0036] Q pred = W out ·h T + b out
[0037] Among them, W out is the output weight matrix, b out is the output bias, and Q pred is the spatio-temporal convolution prediction flow;
[0038] Step (2.6), based on the mean square error, the spatio-temporal convolution prediction flow Q pred and the measured flow Q real :
[0039]
[0040] Combined physical constraint loss:
[0041] Construct the loss function of the spatio-temporal graph convolutional network:
[0042] L = L pred + γL physics
[0043] where γ is the physical loss constraint weight,
[0044] In step (2.1), the nodes include static attributes and dynamic attributes. The static attributes include signal light cycle, number of lanes, and historical average traffic flow. The dynamic attributes include real-time traffic density, queue length, and delay time.
[0045] In step (2.1), the edges include physical attributes and dynamic attributes. The physical attributes are length, speed limit, and lane type. The dynamic attributes are real-time traffic capacity weight and congestion propagation speed.
[0046] The process of step (3) is as follows:
[0047] In step (3.1), when performing dynamic anomaly detection, calculate the actual traffic flow Q real and the residual of the prediction ε = |Q real - Q pred |. Divide the historical residual data by time period, and calculate the mean μ(t) and standard deviation σ(t) of each time period;
[0048] Dynamically adjust the coefficient k according to the time period sensitivity, and adjust the anomaly threshold T dynamic (t):
[0049] T dynamic (t) = μ(t) + k·σ(t)
[0050] In step (3.2), if the residual exceeds twice the dynamic threshold T, it is a sudden increase type anomaly. If the residual continuously exceeds the threshold for more than the set time, it is a continuous anomaly. Report according to the anomaly type, duration, and anomaly data, trigger a first-level warning, and activate the opening of the emergency lane and the adjustment of bus dispatching.
[0051] The process of step (4) is as follows:
[0052] In step (4.1), deploy TEE in roadside units, cameras, and traffic network edge sensing devices such as geomagnetic sensors to encrypt the original traffic data;
[0053] In step (4.2), write the traffic flow prediction result and the root hash of the anomaly event log into the consortium blockchain for blockchain evidence storage.
[0054] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0055] (1) The present invention integrates a trusted computing system, physical law modeling, and spatio-temporal graph structure analysis. By predicting traffic flow changes in real time and identifying abnormal fluctuations in traffic flow, it improves the accuracy of traffic flow prediction, and ensures the security and reliability of the prediction results through anomaly detection and trusted computing. It is widely applied in the fields of urban traffic management, intelligent transportation systems, and traffic safety monitoring.
[0056] (2) The present invention incorporates trusted computing around physical law modeling, graph structure data processing, and real-time anomaly detection. Through the integration of multi-disciplinary methods, it realizes high-precision and high-robustness traffic flow prediction and anomaly response. While ensuring traffic prediction accuracy, it constructs an end-to-end trusted chain, providing a security foundation for the large-scale implementation of intelligent transportation systems and reliable technical support for smart city traffic management. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flowchart of a trusted computing method for a physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] As Figure 1 shown, the trusted computing method for a physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction according to the present invention includes the following steps:
[0059] (1) Construct a macroscopic LWR model physical constraint by embedding the LWR equation of traffic flow, correct the critical density and free flow speed parameters in combination with the Kruithof curve, and improve the flow density of the LWR model; perform cross-scale fusion of the driving behaviors of the macroscopic cell transmission model (macroscopic CTM model) and the microscopic intelligent driving model (microscopic IDM model) and model complex traffic scenarios;
[0060] The prediction result Q CTM of the macroscopic CTM model and the correction factor Q micro generated by the microscopic IDM model are fused through a dynamic weight λ to calculate the fusion result Q fuse : Q fuse = λ·Q CTM + (1 - λ)·Q micro ;
[0061] Step (1.1), construct an LWR model physical constraint by embedding the LWR equation of traffic flow. The LWR equation is: where ρ is the vehicle density (number of vehicles per unit length of road), v is the average speed (vehicle driving state), x is the spatial position, and t is the time;
[0062] Step (1.2) improves the flow-density relationship Q(ρ) of the LWR model by extending the flow-density relationship through the Kruithof curve to adapt to traffic characteristics in different stages:
[0063]
[0064] where ρ c is the critical density, which is related to the current time period and is reduced by 15% during morning and evening rush hours; When ρ ≤ ρ c , it is the free flow stage, v f is the free flow speed at the current moment, which is corrected according to the current weather conditions, with a 20% decrease in rain and snow weather; ρ > ρ c is the congestion stage, and α is the capacity correction factor, which is adjusted according to the vehicle type mixing ratio. For every 10% increase in the proportion of trucks, α is reduced by 5%. Through correction, the LWR model dynamically adapts to various weather and road conditions.
[0065] Step (1.3), perform road discretization and establish a macroscopic CTM model: Divide the target road network by a fixed length, discretize the road into cells, and each cell contains two state variables: density ρ i (t) and the transmission flow Q i→j (t) between adjacent cells. The flow transmission between adjacent cells is:
[0066] Q i→j (t) = min{D i (t), S j (t)}, where D i (t) = v i ·ρ i is the demand flow of cell i, and S j (t) = ρ jam -ρ i is the supply flow of cell j, and the macroscopic CTM model flow is dynamically updated over time to obtain the prediction result Q CTM : Q CTM = Q i→j (t).
[0067] Step (1.4), generate the correction factor of the microscopic IDM model through data aggregation: Describe the behavior of a single vehicle through the microscopic IDM model (Intelligent Driver Model): where a IDM is the vehicle acceleration based on the microscopic IDM model, the maximum value, a max is the maximum acceleration, s is the distance to the vehicle in front, and a IDM represents the vehicle acceleration calculated according to the microscopic IDM model. Is the expected safety distance.
[0068] In this embodiment, the following microscopic indicators are statistically analyzed every five minutes: the proportion of the average vehicle speed decrease - the local congestion coefficient, the standard deviation of the vehicle acceleration - the acceleration variability, the deviation proportion of the actual distance from the expected safety distance - the following vehicle distance outlier. Aggregate the above indicators and quantify them as the correction factor of the microscopic IDM model:
[0069] Q micro = Q CTM ·(1 + β·local congestion coefficient - γ·acceleration variability)
[0070] where β and γ are the weight coefficients calibrated through historical data (in this embodiment, β = 0.6, γ = 0.3), Q micro is the correction factor of the microscopic IDM model, and Q CTM is the prediction result of the macroscopic CTM model in step (1.3).
[0071] Step (1.5), perform macro - microscopic multi - scale modeling and introduce a dynamic weight fusion mechanism: fuse the prediction result Q CTM of the macroscopic CTM model and the correction factor Q micro generated by the microscopic IDM model through the dynamic weight λ, and calculate the fusion result Q fuse , to complete the macro - microscopic multi - scale modeling:
[0072] Q fuse = λ·Q CTM + (1 - λ)·Q micro
[0073] where the dynamic weight is updated based on the historical prediction error (i.e., the average absolute error MAE between the predicted value and the true value) of the sliding window (set to the past hour in this embodiment) where MAE CTM is the historical prediction error of the macroscopic CTM model, and MAE micro is the historical prediction error of the microscopic IDM model.
[0074] Step (2), construct a spatio - temporal graph convolutional network STGCN model: abstract the traffic road network into a graph structure of edges - nodes, and embed the time dimension into the graph structure to construct a time - varying graph; use convolutional operations to construct a spatial graph convolutional module and a temporal convolutional module, and extract the spatial feature matrix and the temporal feature matrix; use a gated recurrent unit to fuse and update the spatio - temporal features, and finally map the traffic network features to the global traffic prediction, that is, the spatio - temporal convolutional predicted traffic; based on the predicted traffic Q pred and the measured traffic Q real , combined with the physical constraint loss, construct the loss function of the spatio - temporal graph convolutional network STGCN.
[0075] Step (2.1): Define the intersections of the traffic road network as nodes, the roads as edges, and define the real-time calculated traffic capacity of the roads as dynamic edge weights; the nodes include static attributes and dynamic attributes. The static attributes include signal light cycle, number of lanes, and historical average traffic flow. The dynamic attributes include real-time traffic flow density, queue length, and delay time; the edges include physical attributes and dynamic attributes. The physical attributes are length, speed limit, and lane type (such as bus lane), and the dynamic attributes are real-time traffic capacity weights (based on flow / capacity ratio) and congestion propagation speed.
[0076] Step (2.2): Embed the time dimension into the graph structure: In this embodiment, a time-varying graph structure is constructed by dividing time periods at a granularity of 5 minutes. Each time slice contains the dynamic attributes of nodes and edges at the current moment. Through the graph sequence of historical time periods (such as the previous 1 hour), the time sequence of congestion propagation and signal light cycle changes is captured.
[0077] Step (2.3): Construct a spatial graph convolution module: Use the K-order Chebyshev polynomial to approximate the graph convolution kernel to capture the spatial dependencies of network nodes and reduce the computational complexity:
[0078]
[0079] where Θ = {θ0, θ1,..., θ K-1} represents the weight parameters of the traffic network as the convolution kernel parameters, θ k is the weight of the k-th order polynomial, that is, the k-th coefficient of the Chebyshev polynomial, *G is the graph convolution operation, x is the input feature, T k is the Chebyshev polynomial, and its recurrence formula is I is the identity matrix, is the normalized Laplacian matrix, and K is the convolution order; through the approximation of the Chebyshev polynomial, the graph convolution operation is decomposed into a weighted combination of multi-order neighborhood features, improving the modeling ability of the spatial graph convolution for complex traffic networks, and finally outputting the spatial feature matrix X spt ;
[0080] Step (2.4): Construct a temporal convolution module: Use a one-dimensional convolution kernel to process the original temporal data X in the time dimension:
[0081] H t = Conv1D(X t-K:t , W conv )
[0082] where, is the output feature after the convolution operation, where F is the number of output channels (number of filters), and X t-K:tis the input feature sequence from time step t-K to t, where K represents the size of the convolutional kernel (in step (2.3)), and the feature dimension at each time step is D, that is is the weight matrix of the convolutional kernel. Through this one-dimensional causal convolution operation, features are extracted using a sliding window based on time steps, and finally a temporal feature matrix X based on the state sequence {H1, H2,..., H T} is generated temp , X temp = {H1, H2,..., H T}.
[0083] Step (2.5), Gated Recurrent Unit Fusion: The Gated Recurrent Unit GRU dynamically controls the flow of information through update gates and reset gates. In STGCN, the spatial feature matrix X spt and the temporal feature matrix X temp output from steps (2.3) and (2.4) are aligned according to the time slices divided in step (2.2) and concatenated into a joint feature matrix X fusion , which is used as the input sequence of the GRU; X fusion = {x1, x2,..., x T}, where x t represents the features of all nodes at the t-th time step, and the GRU hidden state is updated through the formula:
[0084] h t = GRU(x t , h t-1 ):
[0085]
[0086] Candidate hidden state:
[0087] Final hidden state:
[0088] Among them, the hidden state of the previous time step and the node features of this time step are used as inputs, and the weight matrices W z and W r of the update gate and the reset gate control the retention of past information h t-1 and its influence on the candidate hidden state , where σ is the sigmoid activation function, representing element-wise multiplication; r t ⊙ h t-1 is the historical information filtered by the reset gate, and according to the update gate z t the past state h t-1 is weighted and fused with the candidate state to update the hidden state h t ; the final hidden state hT Map to the prediction result through the fully connected layer of the spatio-temporal convolutional network STGCN:
[0089] Q pred = W out ·h T + b out
[0090] where W out is the output weight matrix, b out is the output bias, and Q pred is the spatio-temporal convolutional predicted flow of STGCN.
[0091] Step (2.6), based on the predicted flow Q pred based on the mean square error MSE and the measured flow Q real :
[0092]
[0093] where L pred is the loss function based on data prediction
[0094] Combine the physical constraint loss:
[0095] where L physics is the loss function based on physical constraints
[0096] Construct the loss function L of the spatio-temporal graph convolutional network STGCN:
[0097] L = L pred + γL physics
[0098] where γ is the physical loss constraint weight, Use the Adam optimizer, set the initial learning rate to 1e-3, decay by 50% every 10 epochs, and complete the architecture of the spatio-temporal graph convolutional network model.
[0099] Step (3), perform dynamic anomaly detection and hierarchical response: Combine time-sensitive residual analysis to dynamically adjust the anomaly threshold, match response resources based on the anomaly severity through the anomaly response mechanism, and implement a closed-loop process of residual analysis - threshold adaptation - classification warning - measure feedback, completing the real-time full-cycle management of traffic anomalies from discovery to disposal. The process is as follows:
[0100] Step (3.1), dynamic anomaly detection: Calculate the residual ε = |Q real of the actual flow Q real and the prediction - Q pred |, divide the historical residual data by time period (such as morning rush hour, flat peak, evening rush hour), and calculate the mean μ(t) and standard deviation σ(t) of each time period;
[0101] Dynamically adjust the coefficient k according to the time period sensitivity, such as during the morning and evening rush hours. The k value is larger during the rush hours (in this embodiment, k = 3 during the morning and evening rush hours, and k = 1.5 during the off-peak hours), and set the dynamic adaptive threshold T dynamic (t):
[0102] T dynamic (t)=μ(t)+k·σ(t)
[0103] In step (3.2), identify the abnormal type and adopt a hierarchical response mechanism: if the residual exceeds twice the dynamic threshold T within a short period (less than 5 minutes), it is a sudden increase type of abnormality; if the residual continuously exceeds the threshold for more than 10 minutes, it is set as a continuous abnormality. According to the abnormal type, duration, and abnormal data reporting (such as traffic accident) data information, trigger a first-level warning: signal timing optimization, navigation path planning detour suggestions, etc. or a second-level warning: link the traffic management center to start the opening of the emergency lane and adjust the bus dispatching.
[0104] In step (4), perform trusted computing and data protection: ensure the security and immutability of the original data through TEE hardware, enhance the security and feasibility of the log system through blockchain evidence storage, and build a full-process security protection system from data collection to result application and finally operation records.
[0105] In step (4.1), deploy TEE (Intel SGX) in roadside units RSU, cameras, and traffic network edge sensing devices such as geomagnetic sensors to encrypt the original traffic data.
[0106] In step (4.2), write the traffic flow prediction results and the root hash of the abnormal event log into the consortium blockchain (Hyperledger Fabric) every 10 minutes to ensure the immutability of the data and use blockchain evidence storage.
Claims
1. A trustworthy computing method for a physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction, characterized in that: It includes the following steps: Step (1): Construct the physical constraints of the LWR model by embedding the LWR equation of traffic flow, correct the critical density and free-flow speed parameters through the Kruithof curve, and improve the flow density of the LWR model; discretize the road and establish a macroscopic CTM model: divide the target road network by a fixed length, discretize the road into cells, and each cell contains the density ρ i (t) and the transmission flow Q i→j (t) between adjacent cells. The transmission flow between adjacent cells is: Q i→j (t) = min{D i (t), S j (t)}, where D i (t) = v i ·ρ i is the demand flow of cell i, and S j (t) = ρ jam - ρ i is the supply flow of cell j. Update the flow of the macroscopic CTM model over time to obtain the prediction result Q CTM : Q CTM = Q i→j (t); then generate a correction factor Q micro through the microscopic IDM model: Q micro = Q CTM ·(1 + β · local congestion coefficient - γ · acceleration variability); where β and γ are weighting coefficients; The prediction result Q of the macroscopic CTM model CTM and the correction factor Q generated by the microscopic IDM model micro are fused through the dynamic weight λ to calculate the fusion result Q fuse : Q fuse = λ · Q CTM + (1 - λ) · Q micro ; Step (2), construct a spatio-temporal graph convolutional network model: convert the traffic road network into an edge-node graph structure, and embed the time dimension into the graph structure to construct a time-varying graph; construct a spatial graph convolutional module and a temporal convolutional module through convolution, and extract a spatial feature matrix and a temporal feature matrix; use a gated recurrent unit to fuse and update spatio-temporal features, and map the traffic network features to spatio-temporal convolutional predicted traffic; based on the predicted traffic Q of mean square error pred and the measured traffic Q real , combined with the physical constraint loss, construct the loss function of the spatio-temporal graph convolutional network; Step (3), perform dynamic anomaly detection and hierarchical response, adjust the anomaly threshold according to the time period sensitivity, and perform a closed-loop process of residual analysis - threshold self-adaptation - classification warning - measure feedback through the anomaly response mechanism; Step (4), deploy TEE in the traffic network edge sensing devices and use blockchain for evidence storage.
2. The physical information enhanced spatio-temporal graph network trustworthy computing method for traffic flow anomaly prediction according to claim 1, wherein: In step (1), the LWR equation is as follows: where ρ is the vehicle density, v is the average speed, x is the spatial position, and t is the time.
3. The trusted computing method for the physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction according to claim 1, characterized in that: In step (1), correct the critical density and free flow speed through the Kruithof curve and improve the traffic density Q(ρ) of the LWR model: where ρ c is the critical density; is the dynamic blocking density: when ρ ≤ ρ c , it is in the free flow stage, and v f is the free flow speed at the current moment; when ρ > ρ c , it is in the congestion stage, and α is the capacity correction factor.
4. The trusted computing method for physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction according to claim 1, characterized in that: In step (1), a correction factor Q is generated through a microscopic IDM model micro The process is as follows: determining the behavior of a single vehicle through a microscopic IDM model: where a is the acceleration, s is the distance to the vehicle ahead, is the desired safety distance; the microscopic indicators are statistically analyzed every set time, and the microscopic indicators are quantified into the correction factor Q of the microscopic IDM model micro .
5. The physical information enhanced spatio-temporal graph network trustworthy computing method for traffic flow anomaly prediction according to claim 4, characterized in that: The micro indicators are as follows: the proportion of the average vehicle speed drop is the local congestion coefficient, the standard deviation of the vehicle acceleration is the acceleration variability, and the deviation proportion of the actual distance from the expected safety distance is the following-distance outlier.
6. The physical information enhanced spatio-temporal graph network trustworthy computing method for traffic flow anomaly prediction according to claim 1, characterized in that: The process of step (2) is: Step (2.1), define the intersections of the traffic road network as nodes, the roads as edges, and the traffic capacity of the roads as dynamic edge weights; Step (2.2), divide the time period with a set time as the granularity to construct a time-varying graph, and each time slice in the time-varying graph contains the dynamic attributes of the nodes and edges at the current moment; Step (2.3), construct a spatial graph convolution module, use the K-order Chebyshev polynomial as the graph convolution kernel to capture the spatial positions of the network nodes: Among them, Θ = {θ0, θ1,..., θ K-1} are the convolution kernel parameters, representing the weight parameters of the traffic network; θ k is the weight of the k-th order polynomial, that is, the k-th coefficient of the Chebyshev polynomial, *G is the graph convolution operation, x is the input feature, and T k is the Chebyshev polynomial I is the identity matrix, is the normalized Laplacian matrix, and K is the convolution order; the graph convolution operation is decomposed into a weighted combination of multi-order neighborhood features through the Chebyshev polynomial, and the output spatial feature matrix X spt ; Step (2.4), construct a temporal convolution module, and use a one-dimensional convolution kernel to process the original temporal data X in the time dimension: H t = Conv1D(X t-K:t , W conv ) Among them, is the output feature after convolution operation, F is the number of output channels, and X t-K:t is the input feature sequence from time step t - K to t. K represents the size of the convolution kernel, and the feature dimension of each time step is D, that is is the weight matrix of the convolution kernel; generate the temporal feature matrix X T based on the state sequence {H1, H2,..., H temp}, X temp = {H1, H2,..., H T}; Step (2.5), the gated recurrent unit dynamically controls the information flow through the update gate and the reset gate. In STGCN, the output spatial feature matrix X spt and the temporal feature matrix X temp are aligned according to the time slices divided in step (2.2) and concatenated into a joint feature matrix X fusion , which serves as the input sequence of the GRU; X fusion = {x1, x2,..., x T}, where x t represents the features of all nodes at the t-th time step, and the GRU hidden state is updated through the formula: h t = GRU(x t , h t-1 ): GRU: Candidate hidden state: Final hidden state: Among them, the hidden state of the previous time step and the node features of the current time step are used as inputs, and the weight matrices W z and W r control the past information h t-1 and retain the influence on the candidate hidden state . Among them, σ is the sigmoid activation function, and r t ⊙h t-1 is the historical information filtered by the reset gate. According to the update gate z t , the past state h t-1 is weighted and fused with the candidate state to update the hidden state h t . The final hidden state h T is mapped to the spatio-temporal convolution prediction flow through the fully connected layer of the spatio-temporal convolution network: Q pred = W out ·h T + b out Among them, W out is the output weight matrix, b out is the output bias, and Q pred is the spatio-temporal convolutional predicted flow rate; Step (2.6), predict the flow rate Q based on spatio-temporal convolution of mean square error pred and the measured flow rate Q real : Combined physical constraint loss: Construct the loss function of the spatio-temporal graph convolutional network: L = L pred + γL physics where γ is the physical loss constraint weight, 7. The physical information enhanced spatio-temporal graph network trusted computing method for traffic flow anomaly prediction according to claim 1, characterized in that: In step (2.1), the nodes include static attributes and dynamic attributes. The static attributes include the signal light cycle, the number of lanes, and the historical average traffic flow, and the dynamic attributes include the real-time traffic density, the queue length, and the delay time.
8. The physical information enhanced spatio-temporal graph network trusted computing method for traffic flow anomaly prediction according to claim 1, characterized in that: In step (2.1), the edges include physical attributes and dynamic attributes. The physical attributes are the length, speed limit, and lane type, and the dynamic attributes are the real-time traffic capacity weight and the congestion propagation speed.
9. The physical information enhanced spatio-temporal graph network trusted computing method for traffic flow anomaly prediction according to claim 1, wherein: The process of step (3) is: Step (3.1), when performing dynamic anomaly detection, calculate the actual flow rate Q real and the residual ε = |Q real - Q pred |. Divide the historical residual data by time period, and calculate the mean μ(t) and standard deviation σ(t) for each time period; Dynamically adjust the coefficient k according to the time period sensitivity and adjust the anomaly threshold T dynamic (t): T dynamic (t) = μ(t) + k·σ(t) Step (3.2), if the residual exceeds twice the dynamic threshold T, it is a sudden increase type of anomaly. If the residual continuously exceeds the threshold for a set time, it is a continuous anomaly. Report according to the anomaly type, duration, and anomaly data, trigger a first-level warning, and start the opening of the emergency lane and the adjustment of bus scheduling.
10. The trusted computing method for physical information enhanced spatio-temporal graph network for traffic flow anomaly prediction according to claim 1, characterized in that: The process of step (4) is as follows: Step (4.1), deploy TEE in the roadside unit, camera, and geomagnetic sensor traffic network edge sensing devices to encrypt the original traffic data; Step (4.2), write the traffic flow prediction result and the root hash of the anomaly event log into the consortium blockchain and use blockchain for evidence storage.
Citation Information
Cited By
Abnormal node detection method for financial transaction information based on attribute enhancement
CN120597179A
Method and system for controlling dynamic hard shoulder of expressway
CN120599833A
Coastal wave forecasting correction method based on physical factor coupling ChebNet
CN120744405A