Flood disaster resilience diagnosis method for traffic network based on spatio-temporal graph neural network
By constructing a spatiotemporal graph neural network and combining graph convolution and long short-term memory networks, the lag problem of traditional transportation network resilience diagnosis methods is solved, enabling real-time accurate diagnosis and immediate decision support for transportation networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING HYDRAULIC RES INST
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-08
AI Technical Summary
Traditional methods for diagnosing the resilience of transportation networks cannot accurately depict the complex spatial relationships between nodes, edges, and topology, and are unable to reflect the temporal characteristics of traffic flow fluctuations and disaster intensity. This results in delayed diagnostic results and an inability to support real-time decision-making during disasters.
By employing a spatiotemporal graph neural network, a spatiotemporal graph structure reflecting the state of the traffic network is constructed. Combined with graph convolutional networks and long short-term memory networks, the spatiotemporal evolution characteristics of the traffic network are extracted to achieve real-time and accurate diagnosis.
It improves the physical consistency and accuracy of transportation network resilience diagnostics, supporting immediate decision-making during disasters.
Smart Images

Figure CN121615957B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of traffic engineering and artificial intelligence, and in particular, it is a method for diagnosing the resilience of traffic networks under flood disasters based on spatiotemporal graph neural networks. Background Technology
[0002] Floods are a frequent natural disaster in the context of global climate change. They often cause systemic damage to urban transportation networks through torrential rains, flooding, and river overflows. This not only leads to physical damage such as road inundation and bridge collapse, but also causes traffic congestion, disruptions, hinders emergency rescue and evacuation, and threatens socio-economic order. Transportation network resilience refers to the comprehensive ability of a transportation network to withstand damage, adapt to risks, and quickly restore basic traffic functions under the impact of floods. Accurate diagnosis of this resilience is a prerequisite for traffic management departments to formulate emergency strategies and optimize post-disaster reconstruction priorities, and is of crucial value in enhancing urban disaster resilience.
[0003] Traditional transportation network resilience diagnosis relies on empirical models and static statistical analysis, which has several limitations: First, it relies on a single indicator for assessment, which cannot characterize the complex spatial relationships between nodes, edges, and topology of the transportation network, nor can it reflect the temporal characteristics of traffic flow fluctuations and changes in disaster intensity. Second, it relies on offline analysis of historical data, which does not make sufficient use of dynamic disaster data such as real-time rainfall, water levels, and road flooding, resulting in delayed diagnostic results that cannot support real-time decision-making during disasters. Third, the model assumptions are out of touch with actual disaster conditions, and the accuracy and reliability of the diagnosis cannot meet the needs of refined management.
[0004] The development of artificial intelligence technology has driven the widespread application of graph neural networks in complex network analysis, and their ability to process non-Euclidean structured data is well-suited to the characteristics of transportation networks. Spatiotemporal graph neural networks, which combine the spatial topology capture capabilities of graph convolutional networks with the time-series modeling of long short-term memory networks, can accurately extract spatial correlation features between traffic nodes and road segments, dynamically track the temporal evolution of traffic flow and efficiency under the influence of floods, effectively compensate for the shortcomings of traditional methods, and provide a new technical path for real-time and accurate diagnosis of transportation network resilience. Summary of the Invention
[0005] The purpose of this invention is to provide a method for diagnosing the resilience of transportation networks under flood disasters based on spatiotemporal graph neural networks, in order to solve one of the problems mentioned above in the existing technology.
[0006] Technical solution: A method for diagnosing the resilience of transportation networks under flood disasters based on spatiotemporal graph neural networks, including:
[0007] Collect and acquire topological data of the transportation network, dynamic monitoring data of floods, and traffic flow data;
[0008] Preprocessing and multi-source spatiotemporal alignment of traffic network topology data, flood dynamic monitoring data and traffic flow operation data are performed to obtain spatiotemporal sequence data with unified spatiotemporal granularity;
[0009] A spatiotemporal graph structure reflecting the state of the traffic network is constructed. The spatiotemporal graph structure includes a set of nodes, a set of edges, and a weight matrix describing the edge connection relationships. Spatiotemporal sequence data is then mapped to the spatiotemporal graph structure.
[0010] The spatiotemporal graph structure after mapping data is input into a pre-trained spatiotemporal graph neural network model to extract the spatiotemporal evolution features of the traffic network.
[0011] Based on spatiotemporal evolution characteristics, the resilience diagnosis results of the transportation network are calculated and output.
[0012] Beneficial effects: This invention solves the problems of decoupling disaster characteristics from graph structure and unavailability of resilience labels in the prior art, and improves the physical consistency and accuracy of diagnosis. Attached Figure Description
[0013] Figure 1 This is a diagram illustrating the overall logical architecture of the traffic network resilience diagnosis method in this application.
[0014] Figure 2 This is a flowchart illustrating the steps involved in constructing a spatiotemporal graph structure reflecting the state of the traffic network in an embodiment of this application.
[0015] Figure 3 This is a flowchart illustrating the steps for establishing the adjacency weight matrix in an embodiment of this application.
[0016] Figure 4 This is a flowchart illustrating the steps for dynamically establishing the adjacency weight matrix in an embodiment of this application.
[0017] Figure 5 This is a flowchart illustrating the steps of the spatiotemporal graph neural network model in the embodiments of this application. Detailed Implementation
[0018] To solve these problems, combined with Figures 1 to 5 The present invention will be specifically described through the following embodiments.
[0019] Example 1 describes the overall logical architecture of the traffic network resilience diagnosis method. This method constructs a mapping relationship between physical space and data space, utilizes a deep learning model to capture the spatiotemporal evolution of traffic flow under flood disasters, and realizes the computational evaluation of the traffic network's resistance to disturbances.
[0020] Step 101: Acquire topological data of the transportation network, dynamic flood monitoring data, and traffic flow operation data. In this embodiment, data acquisition is the foundation for building the diagnostic system. The topological data of the transportation network mainly refers to data describing the physical connection structure of roads, usually sourced from geographic information systems or road network databases of traffic management departments, defining the basic framework of the transportation network. Dynamic flood monitoring data refers to environmental monitoring data that reflects the occurrence, development, and receding processes of flood disasters. Specifically, it can be obtained through meteorological stations, urban flood monitoring sensor networks, or simulation results from hydrodynamic simulation software, characterizing the intensity of external disaster-causing factors. Traffic flow operation data refers to dynamic data reflecting the actual operating status of the transportation network, typically provided by loop detectors buried in the road surface, roadside microwave radar, or floating car GPS data.
[0021] By simultaneously acquiring the above three types of data, a complete data foundation can be constructed from three dimensions: network structure, disaster-causing factors, and disaster-bearing body response. For example, in an urban rainstorm event, the system can simultaneously read the connectivity of the road network, the real-time water depth in each area, and the real-time driving speed of each road segment, providing raw input for subsequent analysis.
[0022] Step 102 involves preprocessing and multi-source spatiotemporal alignment of traffic network topology data, flood dynamic monitoring data, and traffic flow operation data to obtain spatiotemporal sequence data with unified spatiotemporal granularity.
[0023] Because the raw data acquired is often multi-source and heterogeneous—for example, traffic flow data might be based on discrete sensor time series, while flood data might be based on continuous spatial raster field data, and their sampling frequencies may differ—preprocessing and alignment are essential. Preprocessing mainly includes outlier identification and cleaning, data normalization, and missing value imputation. Multi-source spatiotemporal alignment specifically refers to unifying data from different sources to the same spatial reference and time step.
[0024] Specifically, the system sets a uniform time granularity Δt and resamples or aggregates all dynamic data to this time granularity. After processing, standardized spatiotemporal sequence data is obtained. In some embodiments, to adapt to the input requirements of deep learning models, spatiotemporal sequence data is typically organized into a high-dimensional tensor, which contains the feature sequences of all nodes within the historical time window, ensuring the continuity of data in the time dimension and the correspondence in the spatial dimension.
[0025] Step 103: Construct a spatiotemporal graph structure that reflects the state of the traffic network. The spatiotemporal graph structure includes a set of nodes, a set of edges, and a weight matrix describing the edge connection relationships. Spatiotemporal sequence data is then mapped into the spatiotemporal graph structure.
[0026] The spatiotemporal graph structure G=(V,E,A) is a mathematical abstraction of the traffic physical network. Here, the node set V typically corresponds to road intersections or road segment endpoints; the edge set E corresponds to physical road segments; and the weight matrix A is used to calculate and describe the connection strength or mutual influence between nodes.
[0027] In this embodiment, data mapping refers to using spatiotemporal sequence data as attribute features and associating them with corresponding nodes or edges in a graph structure. For example, the real-time speed and real-time water depth of a certain road segment can be used as the feature vector of the graph element corresponding to that road segment. It should be noted that, depending on the implementation method, the weight matrix can be a static matrix predefined based on the physical attributes of the road network, or it can be a dynamic matrix dynamically calculated based on the real-time disaster status.
[0028] Step 104: Input the spatiotemporal graph structure after mapping data into the pre-trained spatiotemporal graph neural network model to extract the spatiotemporal evolution features of the traffic network.
[0029] The spatiotemporal graph neural network model is a deep learning architecture specifically designed to handle the spatiotemporal dependencies of graph-structured data. This model aggregates spatial neighborhood information through convolutional operations on the graph structure and captures temporal trends through sequence models. After the spatiotemporal graph structure of the input data enters the model, it undergoes multiple nonlinear transformations, transforming the original traffic flow and flood features into high-dimensional latent space features, i.e., spatiotemporal evolution features. These features integrate the topological relationships of the road network, the diffusion patterns of floods, and the propagation characteristics of traffic flow, enabling a deep characterization of the operational status of the transportation network under current disaster conditions.
[0030] Step 105: Based on the spatiotemporal evolution characteristics, calculate and output the resilience diagnosis results of the transportation network.
[0031] The model utilizes extracted spatiotemporal evolution features, through fully connected layers or other mapping components, to obtain resilience diagnostic results via regression or classification. These results can be normalized numerical indicators representing the degree to which the network's current performance level remains relative to normal levels; or they can be hierarchical state labels indicating whether the network is in a high-resilience, medium-risk, or failure state. The results can be visually displayed on the monitoring screen of a traffic control center, providing managers with quantitative decision-making support, such as identifying which areas experience the fastest decline in resilience and require priority allocation of rescue resources.
[0032] Example 2 describes the specific content definition of the data, the basic preprocessing process, and the advanced alignment strategy for heterogeneous flood data. This example provides a specific implementation path for constructing high-quality model input tensors.
[0033] Step 201: Traffic network topology data includes node spatial coordinates and road segment physical attributes; flood dynamic monitoring data includes rainfall, water level elevation and inundation range; traffic flow operation data includes cross-sectional flow, average vehicle speed and travel time.
[0034] In this embodiment, the specific dimensions of the input data are clearly defined. Node spatial coordinates specifically refer to the latitude and longitude (lon, lat) of the intersection, used to determine the spatial location of the graph nodes. Road segment physical attributes include segment length, number of lanes, design speed, and road grade; these attributes are used to calculate the basic capacity of the road segment. Rainfall is typically obtained from hourly rainfall data from meteorological departments; water level elevation and flooding extent reflect the depth and coverage of surface water, and are direct physical constraints affecting traffic flow. Cross-sectional flow rate represents the number of vehicles passing through a certain cross-section per unit time; average vehicle speed is the current average speed of the road segment; and travel time is the average time it takes for vehicles to pass through that road segment.
[0035] To adapt to the subsequent spatiotemporal graph neural network model, the system constructs the above data into a standardized input tensor X. Let B be the batch size, T be the length of the input time step sequence, N be the number of nodes or road segments in the traffic network, and F be the feature dimension. Then the dimension of the input tensor X can be represented as (B, T, N, F). Among them, the feature dimension F includes data from multiple channels such as speed, flow rate, and water depth mentioned above, ensuring that the model can simultaneously learn the interaction between traffic conditions and the disaster environment.
[0036] Step 202: Calculate the statistical distribution characteristics of the collected traffic network topology data, flood dynamic monitoring data, and traffic flow operation data; use the 3σ criterion to identify and remove abnormal data distributed outside the preset interval; normalize the data after removing abnormal data to eliminate the dimensional differences between different data sources; use the K-nearest neighbor algorithm to impute missing values in the data sequence and unify the multi-source data to the same time sampling granularity to obtain spatiotemporal sequence data.
[0037] This embodiment mainly describes a basic preprocessing scheme for conventional data noise, specifically:
[0038] Outliers caused by sensor malfunctions or other reasons are cleaned using the 3σ criterion. Specifically, for a given feature sequence x, its mean μ and standard deviation σ are calculated. If the data value x of a certain sampling point... i If the data is not within the interval [μ-3σ, μ+3σ], it is considered outlier and removed.
[0039] To eliminate the influence of different physical units such as water level (in meters), flow rate (in vehicles per hour), and speed (in kilometers per hour) on model training, the Min-Max normalization method is adopted. The normalization formula is:
[0040] x'=(xx min ) / (x max -x min ); where x' represents the normalized data value, ranging from [0,1]; x represents the original collected feature data value (such as water level, flow rate, or velocity); x min and x max These are the minimum and maximum values of the feature in the historical dataset, respectively.
[0041] To address random missing data in the data sequence, the K-nearest neighbor algorithm is used for imputation. Specifically, K spatially adjacent nodes to the missing node are selected, and the missing value is filled using the weighted average of the observations of these neighbor nodes at the same time. Simultaneously, a uniform time sampling granularity Δt is set, for example, Δt = 10 minutes. For data with a sampling frequency higher than this granularity (e.g., traffic flow data every 5 minutes), mean aggregation is used; for data with a sampling frequency lower than this granularity (e.g., data every 15 minutes), linear interpolation or nearest neighbor imputation is used, ultimately outputting aligned spatiotemporal sequence data.
[0042] Step 203: Based on the spatial coordinates of the traffic network topology data, the raster-format flood dynamic monitoring data is mapped onto the center line of the road segment to obtain the flood status sequence at the road segment level; the flood status sequence and traffic flow operation data are resampled and unified to a preset time granularity; missing time steps in the monitoring data are identified, the corresponding missing measurement mask matrix is generated, and the aligned multi-source data and the missing measurement mask matrix are combined into spatiotemporal sequence data.
[0043] This embodiment mainly describes an advanced solution for aligning heterogeneous data in flood disaster scenarios. This solution focuses on solving the spatial mismatch between raster data and vector road network data, as well as the problem of handling non-random missing data during disasters.
[0044] Regarding spatial alignment, since flood monitoring data is typically two-dimensional raster data H(x,y,t), while traffic data is vector data based on road segment e, a mapping relationship needs to be established. Specifically, the system acquires the centerline vector coordinates of road segment e and identifies all raster cells that the centerline passes through. It then calculates statistics (e.g., maximum or average) of the water depth values of these raster cells as the road segment water depth h at time t. e (t). Preferably, a maximum value mapping is used, i.e., h e (t)=\max(H(x i ,y i ,t)), where (x i ,y i) represents the grid coordinates of road segment e, reflecting the decisive limiting effect of the deepest water accumulation on passage.
[0045] For time-dimensional alignment, considering the relatively slow evolution of floods and the rapid changes in traffic flow, resampling is typically performed based on the sampling period of flood data (e.g., 10 minutes). For traffic flow data, the average value within this 10-minute window is calculated as the aligned data.
[0046] Regarding missing value handling, considering that floods may cause sensors to experience segmented, non-random data loss due to submersion or power outages, simple interpolation might introduce spurious recovery signals. Therefore, this embodiment introduces a missing data mask matrix. The system identifies the time step with missing data and generates a mask matrix M with the same dimension as the input tensor space. In the mask matrix M, normal observation points are marked as 1, and missing points are marked as 0. This mask matrix M is concatenated into the input tensor as an additional feature channel, enabling the subsequent neural network model to perceive which data is truly observed and which is missing, automatically reducing the influence weight of missing data during convolution operations.
[0047] During the model inference phase, the spatiotemporal graph neural network model performs element-wise multiplication of the missing data mask matrix with the node features when performing graph convolution operations, setting the feature values at missing locations to zero. This automatically reduces the contribution weight of missing data during neighbor aggregation. Furthermore, when calculating attention weights or normalization factors, only valid observations with a mask value of 1 are counted, avoiding interference from missing data on feature propagation.
[0048] Example 3 describes the construction principles of a traffic network spatiotemporal graph, particularly the static graph construction method and the dynamic graph construction mechanism based on hydrodynamic response (H2C). This example provides a complete mapping scheme from the physical road network to the mathematical graph structure.
[0049] Step 501: Construct a node set with intersections of the traffic network as nodes, and construct an edge set with physical road segments connecting the intersections as edges; establish an adjacency weight matrix describing the connection relationship between each edge in the edge set; the spatiotemporal graph structure consists of the node set, the edge set, and the adjacency weight matrix; associate the spatiotemporal sequence data as attribute features of the node set or the edge set to complete the data mapping.
[0050] In this embodiment, the basic skeleton of the graph is defined. Each node in the node set V represents a road intersection or road segment endpoint in the real world, and its attributes may include the latitude and longitude coordinates of the intersection, traffic light configuration type, etc. Each edge in the edge set E represents a physical road segment connecting two intersections. The edges are directional, that is, road segment A to B and road segment B to A are considered as two different edges, accurately depicting tidal traffic flow or one-way restrictions. The adjacency weight matrix A is an N×N matrix (N is the number of nodes), and its elements A ij This is used to calculate the direct influence of node i on node j. If there is no directly connected road segment between two nodes, the corresponding weight is usually set to 0. In this way, the physical world's transportation network is formalized as a computer-processable mathematical object G=(V,E,A).
[0051] Step 601: Obtain the number of lanes and design speed of each road segment in the edge set; calculate the baseline capacity of each road segment based on the number of lanes and design speed, and use the baseline capacity as the static weight value of the corresponding edge in the adjacency weight matrix.
[0052] This embodiment describes a graph construction scheme based on static physical properties. This approach is suitable for scenarios with minimal disaster impact or lacking real-time water depth data. Specifically, the traffic capacity of a road segment is directly related to its physical properties. The system extracts the number of lanes L for each edge by consulting the road network database. e and design speed V e .
[0053] In one specific implementation, a linear weighted model can be used to calculate the baseline capacity C. 0,e The calculation formula can be expressed as: C 0,e =α*L e *V e Among them, C 0,e The static baseline capacity of road segment e is expressed in standard vehicle equivalents per hour; α is the road capacity conversion factor, for example, a value of 1500, expressed in standard vehicle equivalents per lane per hour; L e Indicates the number of lanes in road segment e; V e This represents the design speed of road segment e, in kilometers per hour. The calculated C... 0,e The values will be directly normalized and assigned to the corresponding elements of the adjacency weight matrix. For example, if the baseline capacity of the road segment from node i to node j is greater, then A... ij The larger the value of , the easier it is for traffic flow from upstream nodes to propagate to downstream nodes. In this implementation, the weight matrix A remains unchanged throughout the analysis process, i.e., it is a static matrix.
[0054] Step 701 introduces a water depth-traffic capacity response mechanism to determine the real-time water depth of each road section at each time step based on flood dynamic monitoring data.
[0055] This embodiment introduces a second implementation method: a dynamic graph construction scheme based on the H2C mechanism, which can capture the real-time dynamic correction of traffic topology caused by floods. The system uses a mapping method to obtain the real-time water depth h of each edge e at each time step t. e (t).
[0056] Step 702: Calculate the capacity attenuation coefficient corresponding to the real-time water depth using the water depth-capacity response mechanism, and obtain the real-time effective capacity by combining it with the benchmark capacity of the road segment.
[0057] In this embodiment, a response mechanism conforming to physical laws is constructed. The water depth-capacity response mechanism essentially maps water depth to a function of the capacity reduction ratio. The system responds based on the real-time water depth h. e (t), through which the attenuation coefficient φ, which is between 0 and 1, is calculated.
[0058] Step 703: Based on the real-time effective traffic capacity, dynamically update the adjacency weight matrix of the spatiotemporal graph structure at each time step.
[0059] In this embodiment, the graph structure is no longer static but evolves with the flood process. At each time step t, the system utilizes the calculated real-time effective traffic capacity C. e (t) Reconstruct the adjacency weight matrix A(t). The specific update method can be row normalization, as shown in the following formula: A ij (t)=C e (t) / Σ k∈N(i) C k (t); where A ij (t) represents the dynamic connection weight from node i to node j at time step t; C e (t) represents the real-time effective traversal capacity of edge e connecting node i and node j at time step t; N(i) represents the set of all out-degree neighbor nodes of node i; C k (t) represents the real-time effective traffic capacity of the edge connecting node i and its neighbor node k at time step t; Σ represents the summation of the traffic capacities of all neighboring nodes of node i, used for normalization; e is the edge connecting node i to j. Through this dynamic update, the model can detect topological disconnections caused by road segment flooding, automatically adjust the information propagation path, and avoid transmitting traffic information to failed nodes.
[0060] Step 801, the water depth - traffic capacity response mechanism is constructed as a differentiable function that satisfies the non - increasing monotonicity constraint; when calculating the traffic capacity attenuation coefficient, if the real - time water depth of a section exceeds the preset critical threshold, the traffic capacity attenuation coefficient is set to zero; if the real - time water depth of a section does not exceed the critical threshold, the traffic capacity attenuation coefficient is decreased as the real - time water depth increases. Specifically, it is calculated based on the following formula:
[0061] φ(h)=1, when h < h1;
[0062] φ(h)=1-(h - h1) / (h2 - h1), when h1 ≤ h < h2;
[0063] φ(h)=0, when h ≥ h2.
[0064] Among them, φ(h) represents the attenuation coefficient calculated by the water depth - traffic capacity response function, and its value range is [0, 1]; h represents the current real - time water depth of the section, with the unit of cm; h1 represents the starting influence threshold for vehicles to drive through water (for example, 10 cm); h2 represents the critical water depth threshold for the section to interrupt traffic (for example, 30 cm).
[0065] To ensure that the algorithm conforms to the physical common sense of hydrodynamics and vehicle driving, the constructed function φ(h) must satisfy the non - increasing monotonicity constraint, that is, the deeper the water, the smaller or unchanged the traffic capacity, and there will never be a situation where the traffic capacity increases as the water depth increases.
[0066] Step 802, use the water depth - traffic capacity response mechanism to calculate the real - time effective traffic capacity. Specifically, it is calculated based on the following formula: C e (t)=C 0,e *φ(h e (t)); where, C e (t) represents the real - time effective traffic capacity of section e at time step t; C 0,e represents the reference traffic capacity of section e; h e (t) represents the real - time water depth of section e at time step t, with the unit of centimeters; φ(·) represents the water depth - traffic capacity response function; the calculation logic of the water depth - traffic capacity response function φ(h e (t)) satisfies: when h e (t)≥h crit , φ(h e (t)) = 0; when h e (t)<h crit , φ(h e (t))∈(0, 1], and it decreases monotonically as h e (t) increases; among them, h crit represents the critical water depth threshold for the section to allow traffic.
[0067] To more clearly illustrate the implementation process of this embodiment, the following provides a specific numerical calculation example (H2C mechanism demonstration):
[0068] Suppose a main road segment e in a city has a baseline capacity C calculated based on its physical properties. 0,e The system's capacity is 2000 pcu / h (standard vehicle equivalent per hour). The system's preset parameters are as follows: the initial impact threshold h1 for vehicle wading is 10 cm, and the critical water depth threshold h for interrupting passage is... crit The value is 30 cm. The system uses a piecewise linear function as the response function φ(h), and its specific expression is constructed as follows:
[0069] When h < 10, φ(h) = 1 (the water depth is shallow and does not affect passage).
[0070] When 10≤h<30, φ(h)=1-(h-10) / (30-10) (decreases linearly with increasing water depth);
[0071] When h≥30, φ(h)=0 (vehicles cannot pass, road section is interrupted).
[0072] Scenario 1: At time t1, the initial stage of the disaster, the real-time water depth h of this road section is monitored. e (t1) is 20 cm.
[0073] The system is substituted into the formula to calculate the attenuation coefficient: φ(20)=1-(20-10) / 20=0.5.
[0074] At this time, the real-time effective traffic capacity C of this road segment e (t1) = 2000 * 0.5 = 1000 pcu / h.
[0075] When constructing the adjacency matrix A(t1) at time t1, the weight of this road segment will be halved, and the amount of information transmitted by the graph neural network on this edge will also be reduced accordingly.
[0076] Scenario 2: At time t2, during the peak of the disaster, the real-time water depth h of this road section was monitored. e (t2) rose to 35 cm.
[0077] Since 35 > 30, the truncation logic is triggered, and the attenuation coefficient φ(35) = 0.
[0078] At this time, the real-time effective passage capability C e (t2)=0.
[0079] In the adjacency matrix A(t2) at time t2, the weight corresponding to this road segment becomes 0, which is equivalent to the edge being temporarily deleted from the graph structure. The model will automatically block the predicted traffic flow path through this road segment, which is consistent with the physical reality of road closure.
[0080] In this way, this embodiment explicitly embeds external physical environment constraints into the topology generation process of the graph neural network. Compared with the traditional method that only uses water depth as a feature input, it has stronger physical interpretability and robustness under extreme disasters.
[0081] Example 4 describes a deep learning model architecture for extracting spatiotemporal evolution features of traffic networks. This model achieves end-to-end modeling of complex traffic flow dynamics through a cascaded spatial feature extraction module and a temporal feature extraction module.
[0082] Step 901: The spatiotemporal graph neural network model includes a graph convolutional layer, a temporal convolutional layer, and a fully connected layer connected in series. The graph convolutional layer is used to aggregate the features of neighboring nodes in the spatiotemporal graph structure to extract spatial correlation features. The temporal convolutional layer is used to extract the dynamic evolution law of traffic status along the time dimension. The fully connected layer is used to map the extracted features into resilience diagnosis results.
[0083] The formula for feature propagation in a graph convolutional layer is: H (l+1) =σ(D tilde -1 / 2 *A tilde (t)*D tilde -1 / 2 *H (l) *W (l) );
[0084] Among them, H (l+1) A represents the output feature matrix of the (l+1)th graph convolutional layer; σ(·) represents a non-linear activation function (such as ReLU); A tilde (t) represents the dynamic adjacency weight matrix with added self-loops, i.e., A(t) + I, where I is the identity matrix; D tilde A represents tilde The degree matrix (diagonal matrix) of (t); H (l) W represents the input feature matrix of the l-th layer (or the original input X if it is the first layer); (l) This represents the weight parameter matrix to be trained in the l-th layer.
[0085] In this embodiment, the Graph Convolution Layer (GCN) is a component that captures spatial dependencies. This layer uses a (static or dynamic) adjacency weight matrix A to perform weighted aggregation of the neighborhood features of each node.
[0086] Specifically, graph convolution operations can be implemented using Chebyshev polynomial approximation, reducing computational complexity. For the l-th layer of graph convolution, its output Z (l) The calculation formula for Z can be expressed as: (l) =σ(Σk=0 K A' k X (l-1) W k (l) ); where σ is a nonlinear activation function (e.g., ReLU); K is the order of graph convolution, representing the range of hops for aggregating neighbors. In a preferred embodiment of the invention, K=3 is set, and the model can perceive changes in traffic conditions within a 3-hop range around each intersection, which helps to capture the congestion diffusion effect caused by flooding. A' is the normalized adjacency matrix (if the H2C mechanism is used, then the dynamic matrix A(t) is used here); W k This is a learnable weight parameter matrix.
[0087] Temporal convolutional layers (TCNs) are used to capture short- and long-term traffic evolution patterns. Compared to traditional recurrent neural networks (RNNs), TCNs offer superior parallel computing capabilities and are less prone to gradient vanishing. In this embodiment, a one-dimensional causal dilated convolution is used as the structure. The kernel size is set to 5, allowing a single convolutional layer to cover information from five consecutive time steps. By stacking multiple dilated convolutional layers, the model's receptive field can be expanded exponentially, enabling it to simultaneously capture short-term traffic flow abrupt changes (such as sudden stops caused by flooding) and long-term traffic trends.
[0088] The fully connected layer, located at the end of the model, is used for feature space mapping. After graph convolution and temporal convolution, the resulting high-dimensional spatiotemporal feature tensor is flattened and mapped to the final output dimension through the fully connected layer. If the task is to regress a specific resilience value, the output layer dimension is 1, and a sigmoid activation function can be used to constrain the result to the [0,1] interval; if the task is classification (e.g., high / medium / low resilience), the output layer dimension is the number of classes, and a softmax activation function is used to output the probability distribution. Furthermore, to prevent overfitting, a dropout layer (random deactivation) can be added to the model to improve its generalization ability.
[0089] Example 5 describes a training scheme to address the challenge of directly measuring traffic resilience. This example provides a weakly supervised learning framework based on counterfactual reasoning, and a loss function design incorporating physical mechanism constraints, ensuring the trainability and physical interpretability of the deep learning model.
[0090] Step 1101: The spatiotemporal graph neural network model is pre-trained through supervised learning, and the supervision labels used for training are constructed using a counterfactual resilience label generation method. The counterfactual resilience label generation method includes: selecting traffic operation data from historical non-flood periods to construct a counterfactual baseline representing the traffic network operation pattern under disaster-free conditions; obtaining measured traffic data during flood disaster periods and calculating the degree of functional degradation of the measured traffic data relative to the counterfactual baseline; and generating a resilience label for the traffic network based on the cumulative effect of the degree of functional degradation over the duration of the disaster.
[0091] In this embodiment, since there is a lack of readily available datasets in the real world that directly label resilience values, this invention proposes a counterfactual resilience label generation method, abbreviated as CRL. This method calculates the net loss to transportation functions caused by an actual disaster by constructing a parallel world baseline assuming no flood disaster occurred, i.e., a counterfactual baseline.
[0092] Specifically, the process of constructing a counterfactual baseline is achieved by mining the periodic patterns in historical big data. The system filters a set of non-flood samples from the historical database that share similar attributes (such as the same day of the week or the same time period) with favorable meteorological conditions compared to the current disaster period. By calculating the median or quantile (e.g., the 85th percentile) of this set at each moment, a performance curve characterizing the road segment under normal conditions is obtained, denoted as q. base (t). This curve eliminates the impact of daily traffic fluctuations such as morning and evening rush hours, retaining only the basic operational characteristics of the road network, providing a clean reference system for subsequent removal of disaster impacts.
[0093] Step 1201: Calculate the resilience label Re of road segment e using the counterfactual resilience label generation method. Specifically, it is calculated based on the following formula: Re = 1 - 1 / (t2 - t0) * ∫(t0 - t2)(1 - Qe(t))dt; where t0 and t2 represent the start and end times of the flood disaster impact, respectively; Qe(t) represents the normalized functional level of road segment e at time t; the formula for calculating the normalized functional level Qe(t) is: Qe(t) = qe(t) / qe base (t); where qe(t) represents the measured traffic data of road segment e at time t, with road segment speed or traffic efficiency selected as the metric; qe base Qe(t) represents the counterfactual baseline of road segment e at time t, which is obtained by statistically analyzing the median or quantile of historical non-flood samples from the same period; when the result of Qe(t) is greater than 1, it is truncated to 1.
[0094] Road segment resilience label calculation formula: R e =1-(1 / M)*∑ k=0 M-1(1-Q e (t k ));
[0095] Among them, R e The resilience label value of road segment e during this disaster event is used as the target for supervised learning; M represents the total number of time steps during the disaster impact period; t k Q represents the k-th time step during the disaster; e (t k ) indicates at time step t k The normalized function level; ∑ represents the function loss (1-Q) over all time steps during the disaster. e ) to accumulate.
[0096] This embodiment describes a specific algorithm for converting qualitative functional degradation into quantitative resilience labeling. To ensure the sufficiency of the technical solution disclosure, a specific numerical calculation example (CRL label calculation demonstration) is provided below:
[0097] Suppose that a section of a city's expressway, e, experiences a 5-hour period of heavy rain and flooding. We discretize the time into 5 time steps, i.e., T=5, with a time interval Δt=1 hour.
[0098] The system extracts the real-time average speed q of this road segment at these 5 time points. e (t), assuming the sequence is: 40, 30, 20, 10, 40 (unit: km / h). It can be seen that the speed experienced a process of decrease followed by recovery.
[0099] The system simultaneously retrieves historical databases to construct the counterfactual baseline speed q for that road segment at the same time. e base (t). Assume that the normal speed of this road section is constant at 40 km / h when there is no disaster, that is, the sequence is: 40, 40, 40, 40, 40.
[0100] The first step is to calculate the normalized function level Q. e (t). According to formula Q e (t)=q e (t) / q e base (t), the calculated sequence is:
[0101] t=1:40 / 40=1.0;
[0102] t=2:30 / 40=0.75;
[0103] t=3:20 / 40=0.50;
[0104] t=4:10 / 40=0.25;
[0105] t=5:40 / 40=1.0;
[0106] The second step is to calculate the functional loss, i.e., 1-Q. e (t), with the sequence: 0, 0.25, 0.50, 0.75, 0. This represents the proportion of performance loss caused by the disaster at each time step.
[0107] The third step is to calculate the toughness label R. e Here, discrete summation is used to approximate the integral formula, and the total functional loss area is approximately the average value (or trapezoidal area) of the loss at each time step. R e =1-(0+0.25+0.50+0.75+0) / 5=1-0.3=0.7.
[0108] Ultimately, the road segment's resilience in this disaster event was labeled as 0.7. This value will be used as a supervisory signal (Label) input into the neural network to train the model to learn what kind of rainfall and road network structure would result in a resilience value of 0.7.
[0109] It should be noted that in actual engineering implementation, in order to prevent the baseline value q e base When (t) is close to zero, division overflow occurs. This is usually addressed by adding a very small stable term ε (e.g., 1e-5) to the denominator, i.e., Q. e (t)=q e (t) / (q e base (t)+ε); where Q e (t) represents the normalized functional level of road segment e at time step t; if the calculated value is greater than 1, it is truncated to 1; q e (t) represents the measured traffic indicators (such as average speed) of road segment e at time step t; q e base (t) represents the counterfactual baseline value of road segment e at time step t (the median of historical non-flood samples during the same period); ε represents a very small numerical stability constant (e.g., 1e-5) to prevent the denominator from being zero.
[0110] Furthermore, if the measured velocity is slightly higher than the baseline velocity due to accidental factors, resulting in a calculated result greater than 1, it is forcibly truncated to 1, which conforms to the physical definition.
[0111] Step 1301, the training loss function of the spatiotemporal graph neural network model includes a physical constraint term, used to constrain the water depth-passage capacity response function φ(·) to conform to physical laws; the physical constraint term L mono The calculation logic is as follows: L mono =∑ReLU(Ψφ(h) / Ψh);
[0112] Among them, Lmono The physical monotonicity constraint loss value is represented by Ψφ(h) / Ψh; Ψφ(h) / Ψh represents the partial derivative of the water depth-passage capacity response function with respect to water depth; ReLU(·) is the corrected linear unit function, which outputs this value only when the input is greater than 0, otherwise it outputs 0, i.e., it only penalizes positive gradients that violate the monotonically decreasing law; when the response function predicted by the model increases with increasing water depth, the physical constraint term L... mono A positive penalty is generated, forcing the model parameters to be updated in the direction that satisfies the monotonically non-increasing constraint.
[0113] This example describes the physical constraint loss function. If the model's parameters are randomly initialized during the initial training phase, causing the predicted φ to increase with h in certain water depth ranges (i.e., Ψφ / Ψh>0), this is clearly incorrect. In this case, the ReLU function is activated, outputting a positive number as a penalty value, which is included in the total loss. To minimize the total loss, the optimizer will forcefully adjust the model parameters using gradient descent, compelling Ψφ / Ψh to revert to non-positive values, ensuring that the finally trained model strictly adheres to the physical monotonicity constraint that the deeper the water, the more difficult the path.
[0114] Total loss function for model training: L total =L MSE +λ*L mono ;
[0115] Among them, L total L represents the total loss function value during model training. MSE This represents the difference between the predicted toughness value and the actual toughness label R. e Mean square error loss between; L mono λ represents the physical constraint loss term; λ represents the weight hyperparameter of the physical constraint term (e.g., 0.1), used to adjust the strength of the physical mechanism constraint.
[0116] Example 6 describes how to use the calculated indicators output by the model to assist traffic management departments in making emergency decisions.
[0117] Step 1001, after outputting the resilience diagnosis results of the traffic network, also includes: comparing the resilience diagnosis results with preset resilience thresholds to identify weak road sections with resilience values lower than the resilience thresholds; and generating a priority recovery list containing recovery priorities based on the degree of deviation of the resilience values of the weak road sections.
[0118] Set the resilience judgment threshold Rth, traverse each evaluation unit in the traffic network, and screen out the evaluation units whose resilience diagnosis value Ri satisfies Ri < Rth as weak links; calculate the resilience recovery urgency Pi of the weak links, and the calculation formula is Pi = Rth - Ri; sort the weak links in descending order of the resilience recovery urgency Pi to generate a priority recovery list; where, i represents the index of the evaluation unit, and Ri represents the resilience diagnosis value of the i-th evaluation unit.
[0119] Network-level global resilience aggregation formula: R net =(∑e∈E R e *F e ) / (∑e∈E F e );
[0120] Among them, R net represents the global resilience index of the entire traffic network; R e represents the model-predicted resilience value of section e; F e represents the historical average flow weight of section e, which is used to reflect the impact of key sections on the overall road network; E represents the set of all sections in the traffic network.
[0121] Recovery urgency calculation formula: P i =R th -R i ; [[ID=3 | 0]]
[0122] Among them, P i represents the recovery urgency of the weak section i; R th represents the preset resilience safety threshold (such as 0.6); R i represents the model-predicted resilience value of the weak section i (which needs to satisfy R i <R th ).
[0123] In this embodiment, the system not only outputs the resilience score of each section, but also has an automated decision-making assistance function.
[0124] Regarding the aggregation of network-level resilience. In some embodiments, in addition to focusing on individual sections, the system can also calculate the global resilience index R net of the entire traffic network through the weighted average method. The calculation formula can be R net =Σ(R e *W e ), where the weight W e can be set according to the traffic flow volume or road grade of the section, reflecting the leading role of key sections in the overall network performance.
[0125] Regarding the identification and sorting of weak sections. The system presets the resilience safety threshold R<000014 . It seems there is a typo in the last tag in the original text. I've translated it as it is, but it should probably be something like th for the translation to be more complete in that regard.For example, it can be set to 0.6. When the model predicts the resilience value R of a certain road segment i... i When the value is below 0.6, the system identifies it as a weak or high-risk road segment and highlights it in red on the visualization map.
[0126] To guide the allocation of rescue resources, the system calculates the urgency P of restoring each vulnerable road segment. i =R th -R i For example, if road segment A has a resilience value of 0.4, road segment B has a resilience value of 0.2, and the threshold is 0.6, then the urgency of road segment A is 0.2, and the urgency of road segment B is 0.4. Based on this, the system generates a priority recovery list, placing road segment B before road segment A. This instructs emergency departments to prioritize drainage operations or traffic management for road segment B, as its functional loss is the most severe, and restoring this segment has the greatest marginal benefit in improving overall network performance.
[0127] Example 7 describes the system environment and parameter configuration.
[0128] In terms of dataset construction and partitioning, to verify the model's generalization ability, the collected historical spatiotemporal sequence data is typically divided into training, validation, and test sets according to chronological order. As a preferred implementation configuration, the partitioning ratio is set to 7:2:1. That is, the first 70% of the data is used to update model parameters, the middle 20% is used for hyperparameter adjustment and model selection, and the last 10% is used for performance evaluation.
[0129] Regarding the model optimization strategy, this invention preferably employs the Adam optimizer for gradient descent. The initial learning rate can be set to 0.001, coupled with a learning rate decay strategy, i.e., the learning rate is automatically reduced when the validation set loss no longer decreases over several consecutive epochs. Furthermore, to prevent overfitting, an early stopping mechanism is introduced. If the validation set loss function value does not decrease within five consecutive training epochs, the training process is automatically terminated, and the current optimal model parameters are saved.
[0130] Regarding training hyperparameter configuration, as a preferred implementation, the training batch size can be set to 32 or 64, and the total number of training epochs can be set to 100 to 200. The hidden layer dimension of the graph convolutional layer can be set to 64 or 128 dimensions, and the number of convolutional kernels in the temporal convolutional layer can be set to 32 or 64. The weight coefficient λ of the physical constraint loss can be adjusted within the range of 0.05 to 0.2, and the specific value can be selected based on the trade-off between the diagnostic error of the validation set and the degree of violation of physical constraints.
[0131] Regarding the hardware operating environment, considering that spatiotemporal graph neural networks involve a large number of matrix operations, this system is preferably deployed on a computing server equipped with a high-performance graphics processing unit (GPU). The GPU can be a general-purpose graphics processing unit that supports CUDA parallel computing. The software framework can be built on a deep learning framework that supports automatic differentiation, utilizing its built-in automatic differentiation engine to calculate the physical constraint loss and perform backpropagation.
[0132] By configuring the above-mentioned hardware and software environment, it can be ensured that the transportation network resilience diagnosis method based on spatiotemporal graph neural network of the present invention has efficient, stable and real-time operation capabilities in practical applications.
[0133] Example 8 describes the engineering implementation details of real-time system deployment, especially the incremental processing of streaming data and the cross-validation optimization strategy for the model.
[0134] Step 1401: Establish a real-time data access interface compatible with various types of devices such as sensors and monitoring platforms, supporting parallel data transmission, and enabling efficient reception of dynamic monitoring data such as real-time water level, road section water depth, and traffic flow during disasters.
[0135] This embodiment describes the interaction mechanism between the diagnostic system and the external hardware environment, corresponding to the real-time data access link in the original technical solution. In actual deployment, the data sources of traffic networks are extremely complex, involving different hardware manufacturers and communication protocols. Therefore, the system constructs a high-concurrency real-time data access interface. The backend of this interface adopts an asynchronous non-blocking I / O architecture, capable of maintaining long-term connections for thousands of sensors simultaneously. Specifically, for road segment water depth data, the interface supports subscribing to published topics from the urban flooding monitoring platform via the MQTT (Message Queuing Telemetry Transport) protocol; for traffic flow data, the interface supports periodically pulling the latest records from the traffic police command center via a RESTful API (Application Programming Interface) with a descriptive state transition style. Through the parallel data transmission mechanism, it is ensured that massive concurrent monitoring data will not cause system congestion at the moment of a disaster, guaranteeing the timeliness of the diagnosis.
[0136] Step 1402: A simplified anomaly detection algorithm is used on the received real-time data to quickly identify and remove sudden interference data; through incremental normalization, the real-time data format can be kept consistent with the model input requirements without reprocessing historical data.
[0137] This embodiment describes a data processing strategy specific to the online operation phase. In real-time diagnostic scenarios, recalculating the mean and variance of all historical data is both time-consuming and unnecessary. Therefore, this embodiment introduces an incremental normalization method. The system maintains global statistics in memory, namely the current maximum and minimum values. When a new real-time data stream arrives, the system only needs to determine whether the new data exceeds the current extreme value range. If it does not, linear mapping is directly performed using the cached extreme value parameters; if it does, the extreme value parameters are dynamically updated. In addition, to address potential spike noise in real-time data, the system deploys a simplified anomaly detection algorithm, such as a median filter based on a sliding window, which can quickly filter out instantaneous jumps caused by sensor voltage fluctuations, ensuring that the data input to the model is stable and reliable.
[0138] Step 1403: Using mean squared error as the loss function, the Adam algorithm is used to iteratively optimize the model parameters; 5-fold cross-validation is introduced to improve model stability, and combined with early stopping mechanism, overfitting is effectively suppressed and the model's generalization ability is improved.
[0139] This embodiment describes the optimization strategy during model training. To ensure robust performance across different disaster scenarios, in addition to conventional dataset partitioning, this embodiment preferably employs a 5-fold cross-validation strategy. Specifically, the historical flood event dataset is randomly divided into five mutually exclusive subsets. In each training round, one subset is selected alternately as the validation set, and the remaining four subsets are used as the training set. This process is repeated five times, and the average of the five evaluation results is taken as the model's performance metric. This mechanism effectively eliminates bias caused by the randomness of dataset partitioning. Combined with an early stopping mechanism—automatically terminating training when the validation set loss shows no improvement after five consecutive iterations—this maximizes the use of limited disaster samples and improves the model's generalization ability.
[0140] Step 1404: Prioritize the weak links according to their impact range and recovery difficulty, and automatically generate a list of priority road sections for recovery; combine real-time traffic flow data to plan emergency diversion routes, form a calculation and decision-making scheme, and provide direct reference for traffic management departments.
[0141] Based on the generated priority recovery list, the system further integrates real-time traffic flow data to plan emergency diversion routes. For example, when a main road segment is identified as a high-risk weak point and has been interrupted, the system uses graph algorithms to search for alternative routes in the remaining available road network, automatically generates detour plans, and pushes these plans to the traffic management department, thus realizing a closed-loop business process from status diagnosis to action guidance.
[0142] The development of artificial intelligence technology has driven the widespread application of graph neural networks in complex network analysis, and their ability to process non-Euclidean structured data is well-suited to the characteristics of transportation networks. Spatiotemporal graph neural networks, which integrate the spatial topology capture capabilities of graph convolutional networks with the time-series modeling of long short-term memory networks, can accurately extract spatial correlation features between traffic nodes and road segments, dynamically track the temporal evolution of traffic flow and efficiency under the influence of floods, effectively compensate for the shortcomings of traditional methods, and provide a new technical path for real-time and accurate diagnosis of transportation network resilience. The technical solution of this invention will be further described below with reference to specific embodiments.
[0143] Example 9: According to one aspect of this application, the method further includes:
[0144] Data Acquisition and Preprocessing:
[0145] Taking a city's transportation network as an example, the traffic management department collects topological data, real-time data related to floods, and traffic flow data through its database and sensor network.
[0146] The collected data undergoes preprocessing, including data cleaning, normalization, and missing value imputation. For example, traffic flow data is normalized to the range of 0-1, and outliers in real-time flood-related data are removed and imputed.
[0147] Constructing a spatiotemporal graph neural network model:
[0148] The transportation network is represented as a graph structure, where nodes represent transportation nodes and edges represent the connections between nodes. Based on this graph structure, a temporal dimension is introduced to construct a spatiotemporal graph neural network model. This model includes graph convolutional layers, temporal convolutional layers, and fully connected layers.
[0149] The design uses a convolutional kernel size of 3 for the graph convolutional layer, a convolutional kernel size of 5 for the temporal convolutional layer, and the output dimension of the fully connected layer is the resilience state index of the transportation network.
[0150] Model training and optimization:
[0151] The resilience data of the city's transportation network under flood disasters over the past five years were collected as training samples, including the resilience status of the transportation network under different flood disaster scenarios and the corresponding spatiotemporal characteristics data.
[0152] The spatiotemporal graph neural network model is trained using training samples, and the model parameters are adjusted by optimizing the loss function. During training, techniques such as cross-validation and early stopping are employed to prevent overfitting.
[0153] Transportation network resilience diagnosis:
[0154] During floods, real-time spatiotemporal data of the transportation network is collected and input into a trained spatiotemporal graph neural network model. Based on the input spatiotemporal data, the model outputs a resilience diagnosis of the transportation network, including the overall resilience level of the network and the resilience status of key nodes and road segments.
[0155] Based on the resilience assessment results, traffic management departments have formulated corresponding traffic diversion plans and recovery measures, such as prioritizing the restoration of key road sections and adjusting traffic lights.
[0156] By implementing this invention, the accuracy of resilience diagnosis and emergency response capabilities of transportation networks under flood disasters can be effectively improved, providing strong support for the recovery and reconstruction of transportation networks.
[0157] According to one aspect of this application, the method for diagnosing the resilience of transportation networks under flood disasters based on spatiotemporal graph neural networks can also be:
[0158] Step S1: Multi-source heterogeneous data collection and demand matching: Collect traffic network topology data, flood dynamic monitoring data, and traffic flow operation data, covering node spatial coordinates, road segment physical attributes, rainfall, water level elevation, inundation range, cross-sectional flow, average vehicle speed, and travel time. Set the sampling period for traffic data to 5-15 minutes and for flood data to 10 minutes, covering the entire disaster cycle to ensure that the data dimensions meet the requirements for model input and resilience diagnosis.
[0159] Step S2, Data Standardization Preprocessing: Outliers are identified and removed using the 3σ criterion, dimensional differences are eliminated through Min-Max standardization, and missing values are imputed using the K-nearest neighbor algorithm. Simultaneously, spatiotemporal consistency verification is performed, completing timestamp alignment and spatial coordinate unification, constructing a standardized dataset with a standardized structure and meeting quality standards, providing data support for subsequent modeling.
[0160] Resilience label self-generated training sample annotation method (CRL):
[0161] S21: Determine the target and performance energy for resilience calculation. For each road edge e, within a time window [t0,t2] with a uniform time granularity Δt, acquire the traffic observation vehicle speed v. e (t), flow rate f e (t) or travel time τ e At least one of (t), constructing energy q e (t). Example 1: q e (t)=v e (t); Example 2: q e (t)=1 / τ e (t).
[0162] S22: Constructing a counterfactual baseline q ebase (t). From historical non-flood dates, select a sample set of the same week type / time period as t, and calculate the median or quantile as the baseline:
[0163] q e base (t)=median(q e hist (t)), or q e base (t)=Quantile p (q e hist (t)), where p∈[0.5,0.9].
[0164] S23: Calculate the normalized function level Q e (t), and then trim:
[0165] Q e (t)=clip(q e (t) / q e base (t),0,1).
[0166] S24: Calculate the edge-level resilience label R e (Functional loss area method). A discrete approximation is used:
[0167] R e =1-(Δt / (t2-t0))*Σ n=0 T-1 (1-Q e (t0+nΔt)), where T=(t2-t0) / Δt.
[0168] S25: Computing network-level resilience labels R net :
[0169] Example 1 (Weighted Average):
[0170] R net =Σ e ω e R e , and Σ e ω e =1; weight ω e It can be proportional to the road grade, number of lanes, or baseline capacity C0,e.
[0171] Example 2 (weakest link): R net =min e R e .
[0172] S26: Output training sample pairs: Input is (dynamic adjacency matrix sequence A(t), node / edge feature sequence X(t)), label is (R e With / or R net ).
[0173] Specifically, resilience data is not directly collected, but calculated from the functional loss area of the traffic performance curve relative to the baseline; the baseline selection rule (same week / same time period) is used to eliminate daily cycles; the window [t0,t2] can be selected as the time t before the disaster occurs. pre The time to recovery to baseline after the disaster, or a fixed length (e.g., 2–12 hours) is used as the parameter range for the implementation example; when q e base When (t) is too small, causing the proportion to be unstable, a lower limit ε can be set: Q e (t)=clip(q e (t) / (q e base (t)+ε),0,1),ε∈[10 -3 10 -1 (Values are taken after normalization of dimensions).
[0174] Step S3: Dynamic Spatiotemporal Graph Modeling of the Traffic Network: The traffic network is abstracted as a graph structure, with nodes representing intersections and road segments, and edges defined as connections and assigned capacity weights. A time dimension is introduced to divide the time steps, and the flood impact and traffic operation data of each time step are associated with the corresponding graph elements to construct a dynamic spatiotemporal graph that characterizes the spatiotemporal evolution of the network.
[0175] Flood-coupled dynamic edge weight update mechanism (H2C-Graph):
[0176] S31: Define a road graph G=(V,E). Node V represents an intersection, and edge E represents a road segment (directed). Pre-calculate the baseline capacity C for each edge e. 0,e (For example, determined by the number of lanes, design speed, and road grade), serving as a baseline for disaster-free conditions.
[0177] S32: Obtain the flood state quantity h for each edge e at each time step t. e (t). If the flood data is a raster water depth H(x,y,t), then sampling along the centerline of edge e yields k sampling points (x,y,t). i ,y i ),calculate:
[0178] h e (t)=(1 / k)*Σ i=1..k H(x i ,y i ,t), or take the maximum value to represent the most unfavorable segment: h e (t)=maxi H(x i ,y i ,t).
[0179] S33: Define the water depth - traffic capacity degradation function φ(·) to obtain the effective traffic capacity C e (t):
[0180] C e (t)=C 0,e *φ(h e (t); θ), where 0 ≤ φ ≤ 1.
[0181] To reflect the monotonicity that the greater the water depth, the less trafficable, φ satisfies: dφ / dh ≤ 0.
[0182] An implementable piecewise function is:[[]]
[0183] When h e (t) ≤ h1: φ = 1;
[0184] When h1 < h e (t) < h2: φ = 1 - (h e (t) - h1) / (h2 - h1);
[0185] When h e (t) ≥ h2: φ = 0.
[0186] Where h1, h2 are threshold parameters, and 0 ≤ h1 < h2. h2 is used as the non - trafficable threshold.
[0187] S34: Update the dynamic graph adjacency matrix A(t) from C e (t). If the edge e: i → j, then:
[0188] A ij (t)=C e (t) / Σ e'∈Out(i) C e' (t); If Σ is 0, then A ij (t)=0.
[0189] And output A(t) as the structural input of the graph convolutional layer.
[0190] S35: Output the dynamic edge weight sequence C e (t) and the dynamic graph structure A(t) for subsequent model training / inference use.
[0191] Step S4: Spatiotemporal Graph Neural Network Architecture Design and Training Optimization: A three-level architecture is constructed: graph convolutional layer - temporal convolutional layer - fully connected layer. The graph convolutional layer extracts spatial correlation features, the temporal convolutional layer captures dynamic evolution patterns, and the fully connected layer maps to resilience values in the [0,1] interval. Using historical data as samples, the training, validation, and test sets are divided in a 7:2:1 ratio. The mean squared error is used as the loss function, and the Adam algorithm is used to optimize the parameters. Combined with 5-fold cross-validation and early stopping mechanism, overfitting is suppressed, and the model's generalization ability is improved.
[0192] Implementation of K-order neighborhood aggregation in graph convolutional layers:
[0193] S41: Let the node feature matrix at time step t be X(t)∈R. N×F The adjacency matrix of the dynamic graph is A(t)∈R. N×N Normalize A(t) to obtain Ã(t) (e.g., row normalization or symmetric normalization).
[0194] S42: When the graph convolution kernel size is 3, it is defined as K=3 order neighborhood aggregation (including 0, 1, 2, and 3 hop neighborhoods), and the output is:
[0195] H(t) = σ(Σ) k=0..3 (Ã(t)) k X(t)W k ), where W k Let be the trainable weight matrix, and σ be the non-linear activation function.
[0196] S43: Another embodiment is possible: using the 3-hop neighborhood set N3(i,t) as the aggregation field, and employing message passing:
[0197] h i (t)=σ(W0x i (t)+Σ j∈N3(i,t) α ij (t)W1x j (t)), where α ij (t) can be calculated by Ã(t) or the attention mechanism.
[0198] The meaning of the input and output dimensions of a temporal convolutional layer and the convolutional kernel:
[0199] S44: Construct the model input tensor. Taking batch size B, time step length T, number of nodes N, and feature dimension F as an example, the input tensor is X∈R. B×T×N×F The time granularity is Δt (determined by the alignment step, for example, 10 minutes).
[0200] S45: Perform graph convolution at each time step to obtain the spatial embedding tensor Z∈R. B×T×N×Fs .
[0201] S46: When the temporal convolution kernel size is 5, it is defined as performing a one-dimensional convolution in the time dimension, with the receptive field covering 5 consecutive time steps (corresponding to a duration of 5Δt), and performing convolution on each node independently or with shared parameters.
[0202] Y[:,t,:,:]=Σ m=0..4 Z[:,tm,:,:]*W m , where t≥4.
[0203] If same padding is used, the output duration will remain T; if valid padding is used, the output duration will be T-4.
[0204] S47: Output the temporal convolution result Y∈R B×T'×N×Ft Then, it is mapped to a resilient output through a fully connected layer.
[0205] Step S5: Real-time Data Access and Preprocessing Adaptation: Construct a real-time data access interface to receive dynamic monitoring data during disasters, including real-time water levels, road surface water depth, and traffic flow. Perform rapid anomaly detection and incremental normalization on the real-time data to ensure that the data format is consistent with the model input requirements and to guarantee the accuracy of real-time diagnosis.
[0206] Step S6, Resilience Diagnosis and Decision Support Generation: The preprocessed real-time spatiotemporal data is input into the trained model, outputting the overall network resilience value and the resilience status of local elements. Based on the diagnostic results, weak points are identified, and a priority recovery list and emergency evacuation plan are automatically generated, providing computational decision-making support for traffic management departments.
[0207] The natural element model in step S1 includes:
[0208] Step S11: Define the data types and scope: Identify three core data types for collection: traffic network topology data, which covers node spatial coordinates and road segment physical attributes; flood dynamic monitoring data, which includes rainfall, water level elevation, and inundation range; and traffic flow operation data, which involves cross-sectional flow, average vehicle speed, and travel time, to ensure that the data covers the research dimensions.
[0209] Step S12: Set data collection parameters: Based on the timeliness of disaster response and the accuracy requirements of the model, set the sampling period for traffic data to 5-15 minutes and the sampling period for flood data to 10 minutes to ensure that the data can fully cover the entire cycle before, during and after the disaster and meet the needs of dynamic analysis.
[0210] Step S13: Verify the data requirements: Check the completeness and relevance of the collected data one by one against the subsequent model input dimensions and resilience diagnostic indicators, eliminate the problem of missing or redundant data dimensions, and ensure that the data can directly support the subsequent modeling and diagnostic analysis work.
[0211] The natural element model in step S2 includes:
[0212] Step S21, Outlier Detection and Removal: The 3σ criterion is used to systematically screen the collected multi-source data, calculate the mean and standard deviation of each data indicator, identify and remove outlier data that exceed the range of [mean - 3σ, mean + 3σ], and significantly reduce the interference of data noise on subsequent analysis.
[0213] Step S22, Data Normalization and Imputation: Using the Min-Max normalization method, data of different dimensions are uniformly mapped to the [0,1] interval to eliminate the influence of dimension differences; based on the K-nearest neighbor algorithm, missing data are accurately imputed according to the characteristics of similar samples to ensure the continuity of the data sequence.
[0214] Step S23, Spatiotemporal Consistency Verification: Timestamp alignment is performed on the processed data to ensure that the time dimension of data from different sources is consistent; at the same time, spatial coordinate standardization is completed to correct geographical deviations, and finally a standardized dataset with a standard structure and quality is constructed.
[0215] The natural element model in step S3 includes:
[0216] Step S31: Construct a static graph structure: Abstract the traffic network into a graph structure, with intersections and road segments as nodes and the actual connection relationships between road segments as edges; calculate the traffic capacity based on the physical attributes of the road segments (such as the number of lanes and design speed), and assign a corresponding weight value to each edge.
[0217] Step S32: Divide the time dimension: Strictly divide the time steps according to the data collection cycle, and clarify the specific time span of each time step to ensure that the time step setting matches the data update frequency, laying the foundation for accurately capturing the dynamic changes of traffic network and flood impact.
[0218] Step S33: Associate spatiotemporal data: Match the flood impact data (such as water level and inundation range) and traffic operation data (such as flow rate and vehicle speed) at each time step to the corresponding nodes and edges of the static graph to form a spatiotemporal graph that can dynamically reflect the spatiotemporal evolution characteristics of the network.
[0219] The natural element model in step S4 includes:
[0220] Step S41: Build the model architecture: Construct a three-level architecture of graph convolutional layer - temporal convolutional layer - fully connected layer. The graph convolutional layer extracts the spatial correlation features of traffic elements through adjacency matrix operation; the temporal convolutional layer captures the dynamic evolution law of multi-time step data; the fully connected layer integrates spatiotemporal features and maps them to the resilience assessment value in the [0,1] interval.
[0221] Step S42: Divide the sample dataset: Using traffic resilience data corresponding to historical flood events as samples, randomly divide the training set, validation set, and test set in a ratio of 7:2:1 to ensure that the sample distribution characteristics of each dataset are consistent and to avoid affecting the model training effect due to sample bias.
[0222] Step S43, Model Training and Optimization: Using mean squared error as the loss function, the Adam algorithm is used to iteratively optimize the model parameters; 5-fold cross-validation is introduced to improve model stability, and combined with an early stopping mechanism (if the validation set loss does not improve after 5 rounds, training is terminated), overfitting is effectively suppressed and the model's generalization ability is improved.
[0223] The natural element model in step S5 includes:
[0224] Step S51: Build a real-time data interface: Construct a real-time data access interface compatible with various types of devices such as sensors and monitoring platforms, support parallel data transmission, and achieve efficient reception of dynamic monitoring data such as real-time water level, road section water depth, and traffic flow when a disaster occurs.
[0225] Step S52, Real-time Data Fast Processing: A simplified anomaly detection algorithm is used on the received real-time data to quickly identify and remove sudden interference data; through incremental normalization, the real-time data format can be kept consistent with the model input requirements without reprocessing historical data.
[0226] Step S53, Data Quality Verification: Real-time verification of the completeness (no missing key fields) and validity (values within a reasonable range) of the processed data. For unqualified data, trigger a supplementary collection or correction mechanism to ensure the data quality input to the model and guarantee the reliability of real-time diagnostic results.
[0227] The natural element model in step S6 includes:
[0228] Step S61, Real-time Model Inference: Input the preprocessed real-time spatiotemporal data into the trained model. The model calculates through forward propagation and quickly outputs the overall resilience value of the transportation network (reflecting the global disturbance resistance and recovery capability) and the resilience status data of local elements (nodes, road segments).
[0229] Step S62, Weak Link Identification: Set a resilience value threshold (determined based on historical failure case statistics), filter out local elements with resilience values below the threshold, and mark their spatial locations in conjunction with geographic information to identify weak links and their impact range in the transportation network.
[0230] Step S63: Generate decision-making scheme: Prioritize the weak links according to their impact range and recovery difficulty, and automatically generate a list of priority road sections to be restored; combine real-time traffic flow data to plan emergency diversion routes and form a calculation decision-making scheme to provide direct reference for traffic management departments.
[0231] Statistical method for determining the toughness threshold τ:
[0232] S61: Construct a historical case set, which should include at least the failure / regulation case set D. fail With normal operation case set D norm A failure case can be defined as meeting any of the following conditions: road closure record, speed below baseline for a certain percentage continuously exceeding T. fail An event that reduces the passage capacity to 0.
[0233] S62: Calculate the corresponding resilience label or model output resilience value R in each case, and obtain the distribution: R fail With R norm .
[0234] S63: An embodiment for determining the threshold τ (quantile method):
[0235] τ=Quantile p (R fail ), where p∈[0.7,0.95].
[0236] This ensures that most failure cases fall below the threshold, thus improving the conservatism of the screening process.
[0237] S64: Another embodiment for determining the threshold τ (discriminative optimization method): Maximize the discriminant index on the candidate threshold set, for example:
[0238] τ=argmax τ (TPR(τ)-FPR(τ)), where TPR and FPR are determined by D fail D norm The statistics were obtained.
[0239] S65: Output threshold τ, and identify weak points in real-time inference: when R e (t)<τ or R net When (t) < τ, an alarm and recovery list generation are triggered.
[0240] To address the model distortion problem caused by physical-topology decoupling in existing technologies—specifically, the inability to characterize road segment physical blockages by using only water depth as a node feature—this solution employs a water depth-capacity response mechanism (H2C). This mechanism introduces a decay function that satisfies physical monotonicity, directly mapping real-time monitored water depth data to edge weights in the road network graph structure, enabling dynamic updates of the adjacency matrix based on disaster conditions. This allows the model to explicitly capture the topological evolution process of road segment capacity degradation or even physical interruption caused by rising water levels, solving the problem of separating physical state from network structure.
[0241] To address the training challenges arising from the lack of resilience supervision—specifically, the inability to directly observe resilience metrics leading to a lack of objective training targets for models—this solution proposes a counterfactual resilience label generation method (CRL). By constructing a counterfactual baseline under non-flood scenarios and calculating the area of functional loss of the actual performance curve relative to the baseline during a disaster, computable objective resilience labels are automatically generated. This provides accurate supervision signals for deep learning models, enabling end-to-end supervised training.
[0242] To address the issue of models failing to meet common sense due to a lack of physical constraints, this solution introduces a Physical Constraint Loss (PI-Loss) function. A physical monotonicity penalty term is added to the loss function during model training, forcing model parameters to be updated in the direction where increasing water depth leads to decreased or unchanged traffic capacity. This ensures that the diagnostic results strictly conform to the physical laws of hydrodynamics and traffic flow, improving the model's robustness and interpretability in extreme disaster scenarios.
Claims
1. A method for diagnosing the resilience of transportation networks under flood disasters based on spatiotemporal graph neural networks, characterized in that, include: Collect and acquire topological data of the transportation network, dynamic monitoring data of floods, and traffic flow data; Preprocessing and multi-source spatiotemporal alignment of traffic network topology data, flood dynamic monitoring data and traffic flow operation data are performed to obtain spatiotemporal sequence data with unified spatiotemporal granularity; A spatiotemporal graph structure reflecting the state of the traffic network is constructed. The spatiotemporal graph structure includes a set of nodes, a set of edges, and a weight matrix describing the edge connection relationships. Spatiotemporal sequence data is then mapped to the spatiotemporal graph structure. The spatiotemporal graph structure after mapping data is input into a pre-trained spatiotemporal graph neural network model to extract the spatiotemporal evolution features of the traffic network. Based on spatiotemporal evolution characteristics, the resilience diagnosis results of the transportation network are calculated and output. Constructing a spatiotemporal graph structure that reflects the state of the transportation network, including: A set of nodes is constructed using intersections of the traffic network as nodes, and a set of edges is constructed using the physical road segments connecting the intersections as edges; Construct an adjacency weight matrix that describes the connection relationships between edges in the edge set; The spatiotemporal graph structure consists of a set of nodes, a set of edges, and an adjacency weight matrix; The spatiotemporal sequence data is associated with the attribute features of the node set or edge set to complete the data mapping; The adjacency weight matrix is a static matrix; establishing the adjacency weight matrix specifically includes: Obtain the number of lanes and design speed for each road segment in the edge set; The baseline capacity of each road segment is calculated based on the number of lanes and the design speed, and the baseline capacity is used as the static weight value of the corresponding edge in the adjacency weight matrix. The adjacency weight matrix is also configured as a dynamic matrix that changes with time steps; dynamically establishing the adjacency weight matrix specifically includes: A water depth-traffic capacity response mechanism is introduced to determine the real-time water depth of each road section at each time step based on dynamic flood monitoring data; By utilizing the water depth-capacity response mechanism, the capacity attenuation coefficient corresponding to the real-time water depth is calculated, and the real-time effective capacity is obtained by combining it with the benchmark capacity of the road segment. Based on the real-time effective passage capacity, the adjacency weight matrix of the spatiotemporal graph structure is dynamically updated at each time step. The spatiotemporal graph neural network model is pre-trained through supervised learning, and the supervision labels used for training are constructed using a counterfactual resilience label generation method. The counterfactual resilience label generation method includes: selecting traffic operation data from historical non-flood periods to construct a counterfactual baseline representing the traffic network operation pattern under disaster-free conditions; obtaining measured traffic data during flood disaster periods and calculating the functional degradation degree of the measured traffic data relative to the counterfactual baseline; generating a resilience label for the traffic network based on the cumulative effect of the functional degradation degree over the duration of the disaster; and calculating the resilience label Re for road segment e using the counterfactual resilience label generation method. The training loss function of the spatiotemporal graph neural network model includes a physical constraint term to constrain the water depth-capacity response function φ(·) to conform to physical laws.
2. The method according to claim 1, characterized in that, include: Traffic network topology data includes the spatial coordinates of nodes and the physical attributes of road segments; Flood dynamic monitoring data includes rainfall, water level elevation, and inundation area; Traffic flow data includes cross-sectional flow, average vehicle speed, and travel time.
3. The method according to claim 1, characterized in that, Preprocessing and multi-source spatiotemporal alignment of traffic network topology data, flood dynamic monitoring data, and traffic flow operation data, including: Calculate the statistical distribution characteristics of collected traffic network topology data, flood dynamic monitoring data, and traffic flow operation data, and use the 3σ criterion to identify and remove abnormal data distributed outside the preset range; The data after removing outliers is normalized to eliminate the differences in units between different data sources; The K-nearest neighbor algorithm is used to impute missing values in the data sequence, and the multi-source data are unified to the same sampling granularity at the same time to obtain spatiotemporal sequence data.
4. The method according to claim 1, characterized in that, Preprocessing and multi-source spatiotemporal alignment of traffic network topology data, flood dynamic monitoring data, and traffic flow operation data, including: Based on the spatial coordinates of traffic network topology data, the raster-format flood dynamic monitoring data is mapped onto the centerline of road segments to obtain the flood status sequence at the road segment level; Resample the flood status sequence and traffic flow data to a preset time granularity; Identify missing time steps in the monitoring data, generate corresponding missing measurement mask matrices, and combine the aligned multi-source data and missing measurement mask matrices into spatiotemporal sequence data.
5. The method according to claim 1, characterized in that, The real-time effective traffic capacity is calculated using the water depth-capacity response mechanism, specifically based on the following formula: C e (t)=C 0,e *φ(h e (t)); Among them, C e (t) represents the real-time effective traffic capacity of road segment e at time step t; C 0,e Indicates the baseline traffic capacity of road segment e; h e (t) represents the real-time water depth of road segment e at time step t, in centimeters; φ(·) represents the water depth-capacity response function; Water depth-passage capacity response function φ(h) e The computational logic of (t) satisfies: When h e (t)≥h crit At that time, φ(h) e (t))=0; When h e (t) <h crit At that time, φ(h) e (t))∈(0,1], and as h e The increase of (t) is monotonically decreasing; Among them, h crit This indicates the critical water depth threshold at which the road segment is allowed to pass.
6. The method according to claim 1, characterized in that, The spatiotemporal graph neural network model includes a series of connected graph convolutional layers, temporal convolutional layers, and fully connected layers; Graph convolutional layers are used to aggregate features of neighboring nodes in a spatiotemporal graph structure to extract spatial correlation features. Temporal convolutional layers are used to extract the dynamic evolution of traffic conditions along the time dimension; Fully connected layers are used to map the extracted features to resilience diagnostic results.
7. The method according to claim 1, characterized in that, After outputting the resilience diagnosis results of the transportation network, the following is also included: Set the toughness assessment threshold R th By traversing all assessment units in the transportation network, resilience diagnostic values R are selected. i Satisfy R i <R th The assessment unit is identified as a weak link; Calculate the urgency P of restoring the resilience of the weak link i The calculation formula is P i =R th -R i ; According to the urgency of resilience recovery P i Weak points are sorted in descending order to generate a priority recovery list; Where i represents the index of the evaluation unit, R i This represents the toughness diagnostic value of the i-th evaluation unit.
Citation Information
Patent Citations
Space-time diagram node attribute prediction method fusing adaptive graph diffusion convolutional network
CN115828990A
Cross-system fault diagnosis method and system combined with multi-dimensional anomaly detection
CN120780519A