Dam safety monitoring and early warning system and method based on graph neural network
By constructing a dam monitoring system based on graph neural networks, the problems of dynamic coupling modeling and robustness to missing data in dam monitoring are solved. It realizes multi-scale modeling of nonlinear couplings such as temperature, water level, and seepage, improves prediction accuracy and interpretability, reduces false alarm rate, and is adaptable to different dam types and monitoring layouts.
Patent Information
- Application Number
- CN202610108215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-19
AI Technical Summary
Existing dam monitoring technologies have shortcomings in dynamic coupling modeling, robustness to missing data, mechanism constraints and threshold adaptability, making it difficult to effectively handle the strong nonlinear relationships and topological changes of multiple factors such as temperature, water level and seepage.
A graph neural network-based approach is used to construct a time-varying adjacency matrix of monitoring points. Missing data are reconstructed using a gated attention fusion algorithm and a graph mask autoencoder. Multidimensional predicted values are output by combining diffusion convolution and causal time modeling. Soft constraints matching hydraulic mechanisms and over-threshold residuals fitted by a generalized Pareto distribution are introduced to generate dynamic early warning thresholds.
It enables multi-scale modeling of nonlinear couplings such as temperature, water level, and seepage, improving robustness to missing data and interpretability of predictions, reducing false alarm and false alarm rates, adapting to different dam types and monitoring arrangements, and possessing pluggable and scalable capabilities.
Smart Images

Figure CN122065186A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of safety monitoring technology, specifically relating to a dam safety monitoring and early warning system and method based on graph neural networks. Background Technology
[0002] Current dam monitoring and assessment methods commonly employ:
[0003] (1) Empirical statistical models, such as HST (static water-season-time) regression, ARIMA and Kalman filtering, can characterize some linear or weak nonlinear relationships, but they are poorly adaptable to strong nonlinear working conditions with multiple factors such as temperature-water level-seepage coupling, and have insufficient processing capabilities for missing values and heterogeneous sampling frequencies.
[0004] (2) Single-point or partitioned temporal deep learning (such as LSTM / TCN) can learn time dependence, but the spatial correlation of sensors is not explicitly represented, and its robustness to topological changes and the addition / failure of monitoring points is insufficient.
[0005] (3) Graph convolution model based on fixed adjacency matrix (GCN / GAT) generally staticizes spatial relationships, making it difficult to reflect changes in "effective adjacency" caused by seasonality or working condition switching.
[0006] (4) Threshold warnings often use fixed σ thresholds or static control charts, which are difficult to adaptively update with seasonal drift, sensor drift and data distribution evolution.
[0007] Therefore, existing solutions have shortcomings in (i) dynamic coupling modeling, (ii) robust inference of missing data, (iii) mechanism constraints and interpretability, and (iv) threshold adaptation and uncertainty management. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a dam safety monitoring and early warning system and method based on graph neural networks.
[0009] To achieve the objectives of this invention, the following technical solutions are adopted.
[0010] A method for dam safety monitoring and early warning based on graph neural networks includes the following steps:
[0011] S1. Set the sliding time window parameters, collect time series data of each monitoring point of the dam at a preset frequency, and construct a time series data set of the monitoring points after removing invalid data.
[0012] S2. A gated attention fusion algorithm is adopted, with monitoring points as nodes, and a monitoring network topology graph containing physical adjacency graph and statistical correlation graph is constructed based on spatial coordinates and data statistical correlation, and mapped to a time-varying adjacency matrix; wherein: the physical adjacency graph contains hydraulic correlation subgraph and heat conduction subgraph;
[0013] S3. At each time step, the node data is standardized, positionally and periodically encoded in sequence to generate feature vectors. Missing test items are filled back by causal reconstruction using a graph mask autoencoder to construct the node feature matrix.
[0014] S4. Input the feature matrix and the time-varying adjacency matrix into the graph neural network, use heteroscedastic Gaussian negative log-likelihood as the joint loss function for multiple tasks, and output multi-dimensional predicted values of displacement, seepage pressure and seepage through spatial diffusion convolution and causal time modeling.
[0015] S5. Introduce soft constraints for matching hydraulic mechanisms, embed loss functions to construct comprehensive loss functions, and iteratively optimize the model to generate interval prediction results;
[0016] S6. At each time step, the mean and standard deviation of the conditional prediction are obtained through causal reasoning, and a dynamic confidence interval is generated. The risk measure is calculated by weighted fusion of standardized residuals and anomaly probability. The over-threshold residuals are fitted with a generalized Pareto distribution. The multi-level early warning thresholds are determined by combining the target missed rate and are updated on a rolling basis.
[0017] Furthermore, the monitoring data includes displacement, seepage pressure, seepage flow, temperature, reservoir water level, and meteorological data.
[0018] Furthermore, the edge weights of the physical adjacency graph are set by the spatial distance between the monitoring points, and the edge weights are expressed as follows:
[0019] ;
[0020] In the formula: For the edge weights of the physical adjacency graph, For monitoring points With monitoring points Spatial distance between is the distance scale constant.
[0021] Furthermore, the time-varying adjacency matrix is:
[0022] ;
[0023] In the formula: For time-varying adjacency matrix, Indexes for relational types, i.e., sets Corresponding to physical adjacency, hydraulic correlation, heat conduction and statistical correlation, For the gating coefficients generated by the gating network, For the first The initial adjacency matrix of the relationship, In order to target the Attention coefficient of the relationship This represents the Hadamard product.
[0024] Furthermore, the encoding includes sine and cosine encoding and one-hot encoding, wherein: sine and cosine encoding is used for encoding displacement, reservoir water level, air temperature and monthly sequence within the year; one-hot encoding is used for encoding node types.
[0025] Furthermore, in step S3, if there are missing test items, causal graph domain reconstruction is performed through a graph mask autoencoder, and the missing test items are backfilled with the output of the graph mask autoencoder.
[0026] Furthermore, the operator for the diffusion convolution is defined as:
[0027] ;
[0028] In the formula: This is the output of the diffuse convolutional layer; For the input feature matrix, This is the degree matrix, used to normalize the adjacency matrix; The diffusion order determines the distance that the model can perceive between adjacent nodes; It is a time-varying adjacency matrix; and In order to target the The learning weight parameters for the first-order diffusion are used to capture the forward diffusion features and the reverse / transposed diffusion features on the graph, respectively.
[0029] Furthermore, the causal temporal modeling is implemented using dilated temporal convolutional networks or gated recurrent units, wherein: the kernel size of the dilated temporal convolutional network is 3, and the dilation coefficient is... Increasing.
[0030] Furthermore, the multi-task joint loss function is the heteroscedastic Gaussian negative log-likelihood, which is obtained by simultaneously fitting the mean and variance. The expression for the heteroscedastic Gaussian negative log-likelihood is:
[0031] ;
[0032] In the formula: The joint loss function for multiple tasks is the heteroscedastic Gaussian negative log-likelihood. To monitor task types, the data is derived from a set of values. , , and These represent displacement, seepage pressure, and seepage flow, respectively. For nodes At any moment For the task The actual monitoring value; The predicted mean of the model output; The standard deviation of the model's predictions, i.e., the uncertainty; The binary cross-entropy loss for the anomaly detection branch; The weighting coefficients for anomaly detection loss.
[0033] Furthermore, the soft constraint includes:
[0034] Horizontal displacement components, reservoir water level Compared with the predicted average displacement Penalties for conditions that satisfy a monotonic relationship:
[0035] ;
[0036] In the formula: For displacement monotonicity penalty, for Reservoir water level at any time For nodes exist The predicted mean displacement at time 10:00 Indicates the change over a time step;
[0037] Apply a non-negative penalty and a region smoothing penalty to the seepage flow:
[0038] ;
[0039] In the formula: Comprehensive penalties for seepage flow For nodes exist The predicted mean infiltration flow rate at time point The weighting coefficients of the graph domain smoothing term, For graph gradient operators;
[0040] Introduce a priori information about thermal diffusion into the temperature field:
[0041] ;
[0042] In the formula: For thermal diffusion penalties, for The predicted temperature field vector at time step, containing the predicted temperature values for all nodes. This is the normalized graph Laplace matrix.
[0043] Furthermore, the expression for the comprehensive loss function is:
[0044] ;
[0045] In the formula: This is the overall loss function for model training; The reconstruction loss of the graph mask autoencoder is used for the missing test completion task; This is the joint loss function for multiple tasks, namely the heteroscedastic Gaussian negative log-likelihood. The weighting coefficients for the physical consistency soft constraint; , and These are physical penalties for displacement monotonicity, seepage non-negative smoothness, and temperature thermal diffusion, respectively.
[0046] Furthermore, the confidence interval is:
[0047] ;
[0048] In the formula: The conditional predicted mean of the model output, The coverage factor set according to the target confidence level; The conditional prediction standard deviation of the model output, i.e., the uncertainty;
[0049] The standardized residual is:
[0050] ;
[0051] In the formula: To standardize the residuals for subsequent anomaly scoring; These are the actual observed values at the monitoring points; To predict the mean; This represents the predicted standard deviation.
[0052] A dam safety monitoring and early warning system based on graph neural networks includes:
[0053] The data acquisition module sets the sliding time window parameters, collects time-series data of each monitoring point of the dam at a preset frequency, and constructs a set of time-series data of the monitoring points after removing invalid data.
[0054] The monitoring graph fusion module uses a gated attention fusion algorithm to construct a monitoring network topology graph containing physical adjacency graphs and statistical correlation graphs based on spatial coordinates and data statistical correlation, with monitoring points as nodes, and maps it to a time-varying adjacency matrix.
[0055] The feature processing module performs standardization, positional and periodic encoding on the node data at each time step. Missing test items are reconstructed and filled in using a graph mask autoencoder, generating feature vectors and constructing a node feature matrix.
[0056] The multi-task prediction output module takes the feature matrix and time-varying adjacency matrix as input, uses heteroscedastic Gaussian negative log-likelihood as the loss function, and outputs predicted values of multi-dimensional monitoring indicators through diffusion convolution and causal time modeling.
[0057] The interval prediction generation module introduces soft constraints matching hydraulic mechanisms to construct a comprehensive loss function, and iteratively optimizes the model to generate interval prediction results;
[0058] The reasoning and early warning module generates dynamic confidence intervals through causal reasoning, calculates risk metrics, determines multi-level early warning thresholds by fitting over-threshold residuals, and adapts to seasonal and dynamic changes in operating conditions through rolling updates.
[0059] Furthermore, the monitoring network topology diagram includes a physical adjacency diagram, a hydraulic correlation diagram, a heat conduction diagram, and a statistical correlation diagram.
[0060] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0061] (1) It realizes multi-scale heterogeneous modeling and time-varying fusion of monitoring maps, which can characterize nonlinear coupling such as temperature-water level-seepage and seasonal topological changes;
[0062] (2) The introduction of graph mask autoencoder for causal reconstruction significantly improves robustness under conditions of missing test and asynchronous sampling;
[0063] (3) Enhance physical consistency and improve predictive interpretability by using soft constraints such as monotonicity, nonnegativity and thermal diffusion;
[0064] (4) Using heteroscedastic regression and integrated uncertainty estimation, the prediction results with confidence intervals are output;
[0065] (5) Threshold adaptive update based on extreme value theory reduces false alarms and false negatives while improving long-term availability;
[0066] (6) The model structure is pluggable and scalable, adaptable to different dam types and monitoring arrangements;
[0067] (7) Reproducible experiments and statistical improvements: At typical monitoring points, compared with baseline methods such as MICE and Kriging, the present invention achieves higher coefficient of determination (R²) and lower MAE / RMSE at most monitoring points; individual monitoring points are close to the results of Kriging, demonstrating the robustness of the method under different working conditions without any exaggeration (see the example for comparison settings and index calculation). Attached Figure Description
[0068] Figure 1 This is a flowchart of the dam safety monitoring and early warning method described in this invention;
[0069] Figure 2Figure 1 shows a comparison between the interpolation results and the true values of the present invention; wherein: Figure 2a shows a comparison between the displacement interpolation results and the true values of monitoring points 9-10TOP; Figure 3b shows a comparison between the displacement interpolation results and the true values of monitoring points 13-14TOP; Figure 4c shows a comparison between the displacement interpolation results and the true values of monitoring point S09; and Figure 5d shows a comparison between the displacement interpolation results and the true values of monitoring point S12. Detailed Implementation
[0070] The present invention will be further described in conjunction with the accompanying drawings and embodiments.
[0071] Example 1, such as Figure 1 As shown, a dam safety monitoring and early warning method based on graph neural networks is proposed:
[0072] This embodiment takes the Wuxijiang tributary dam as the research object, and fully reproduces the entire process of dam safety monitoring and early warning method based on graph neural networks. It covers core links such as data acquisition, graph construction, model training, missing data completion, interval prediction, and adaptive early warning, and verifies the effectiveness of the method in actual engineering scenarios. The experiment uses monitoring data of the dam from January 14, 2013 to November 22, 2024, involving multiple indicators such as horizontal displacement, seepage pressure, and seepage flow at 32 monitoring points. At the same time, it links upstream water level, temperature and other meteorological data to achieve end-to-end operation from data preprocessing to early warning output.
[0073] I. Experimental Preparation
[0074] (a) Monitoring objects and data specifications
[0075] Monitoring target: Wuxijiang tributary dam. 32 key monitoring points were selected, covering different types of monitoring points such as vertical lines and lines of sight, covering the main body of the dam and key surrounding areas.
[0076] Data type:
[0077] Core monitoring data: horizontal displacement, seepage pressure, and seepage time series data;
[0078] Environmental data: meteorological data such as reservoir water level and temperature;
[0079] Auxiliary information: spatial coordinates of monitoring points, node type (perpendicular line / line of sight, etc.), and monitoring period markings.
[0080] Data preprocessing:
[0081] Time alignment: All data are sampled at a uniform frequency of daily, and linear interpolation is used to initially align heterogeneous sampling frequency data;
[0082] Manual missing data setting: To verify the robustness of missing data, data was manually deleted at four typical monitoring points according to specified sections to simulate data loss in actual monitoring.
[0083] 9_10TOP:2018-03-02~2018-09-11;
[0084] 13_14TOP:2021-01-18~2021-10-18;
[0085] S09: 2020-01-07~2020-04-20, 2023-11-07~2024-02-22;
[0086] S12: 2022-01-07~2022-09-13.
[0087] (II) Experimental Environment and Parameter Configuration
[0088] Hardware environment: Standard workstation (CPU: Intel Core i7-12700H, GPU: NVIDIA RTX 3060, Memory: 32GB), no special hardware support required;
[0089] Software environment: Python 3.8, PyTorch 1.12.1, NumPy 1.21.6, Scikit-learn 1.0.2;
[0090] Core parameters:
[0091] Sliding time window size: 168 hours (7 days, adapted to daily sampling frequency);
[0092] Diffusion convolution order K: 2 (balancing feature capture capability and computational efficiency);
[0093] Dilated Temporal Convolutional Network (TCN): Kernel size 3, inflation coefficient increases proportionally;
[0094] Optimizer: Adam, learning rate 1×10⁻³~3×10⁻ 4 ;
[0095] Physical constraint weight coefficient λ: 0.1 (determined through validation set grid search);
[0096] Threshold update window: 30-day data window, 14-day rolling update cycle;
[0097] Target false negative rate α: 0.01.
[0098] II. Method Implementation Steps
[0099] (I) Data Acquisition and Feature Construction:
[0100] Data acquisition: A sliding time window is used to traverse the data throughout the entire time period. Each window contains a spatiotemporal tensor of "sample × time step × node × feature", where: the time step is 168, the node is 32, and the feature dimension is 8.
[0101] Feature processing:
[0102] Standardization: Z-score standardization is applied to continuous data such as displacement, reservoir water level, and air temperature;
[0103] Coding: Displacement, reservoir water level, air temperature, and monthly sequence within the year use sine and cosine coding, while node type (perpendicular line / line of sight) uses unique thermal coding;
[0104] Derivative features: Calculate year-on-year change, 5-day moving average, and 5-day moving standard deviation to enrich feature dimensions;
[0105] Preprocessing for missing test items: Mark the mask position for manually deleted and naturally missing test items, and process the mask autoencoder for the image.
[0106] (II) Construction of monitoring network topology and time-varying adjacency matrix:
[0107] Node definition: 32 monitoring points are used as graph nodes, and node attributes include spatial coordinates and feature vectors;
[0108] Subgraph construction:
[0109] Physical adjacency graph: Edge weights are calculated based on the spatial distance between monitoring points, using the following formula:
[0110] ;
[0111] In the formula: For the edge weights of the physical adjacency graph, For monitoring points With monitoring points Spatial distance between It is a distance scale constant, with a value of 50m, to suit the layout of dam monitoring points.
[0112] Hydraulic correlation subgraph: constructed based on the hydraulic path correlation of the monitoring points, with higher initial edge weights assigned between upstream and downstream monitoring points;
[0113] Heat conduction submap: constructed based on the monitoring point's altitude, shading conditions, and temperature conduction path;
[0114] Statistical correlation diagram: The correlation between time series data of monitoring points is calculated using the Pearson correlation coefficient, and edges are established between nodes with an absolute correlation coefficient value ≥ 0.6;
[0115] Time-varying adjacency matrix fusion: A gated attention fusion algorithm is used to generate a time-varying adjacency matrix, as shown in the following formula:
[0116] ;
[0117] In the formula: For time-varying adjacency matrix, Indexes for relational types, i.e., sets Corresponding to physical adjacency, hydraulic correlation, heat conduction and statistical correlation, For the gating coefficients generated by the gating network, For the first The initial adjacency matrix of the relationship, In order to target the Attention coefficient of the relationship This represents the Hadamard product.
[0118] (III) Training of Graph Neural Network Models:
[0119] Model structure:
[0120] Feature encoding layer: Receives the node feature matrix and outputs a high-dimensional feature vector with dimension 64;
[0121] Graph Mask Autoencoder: Performs causal graph domain reconstruction on missing data, with MSE used as the reconstruction loss;
[0122] Diffusion convolutional layer: Extracts node neighborhood association features; the operator is defined as follows:
[0123] ;
[0124] In the formula: This is the output of the diffuse convolutional layer; For the input feature matrix, This is the degree matrix, used to normalize the adjacency matrix; The diffusion order determines the distance that the model can perceive between adjacent nodes; It is a time-varying adjacency matrix; and In order to target the The learning weight parameters for the first-order diffusion are used to capture the forward diffusion features and the reverse / transposed diffusion features on the graph, respectively.
[0125] Causal temporal modeling layer: Employs hollow TCN to capture temporal evolution patterns and prevent future information leakage;
[0126] Multi-task output layer: Simultaneously outputs the predicted mean μ and standard deviation σ of displacement, seepage pressure, and seepage flow, i.e. uncertainty.
[0127] Loss function construction:
[0128] Multi-task joint loss function: using heteroscedastic Gaussian negative log-likelihood, the formula is as follows:
[0129] ;
[0130] In the formula: The joint loss function for multiple tasks is the heteroscedastic Gaussian negative log-likelihood. To monitor task types, the data is derived from a set of values. , , and These represent displacement, seepage pressure, and seepage flow, respectively. For nodes At any moment For the task The actual monitoring value; The predicted mean of the model output; The standard deviation of the model's predictions, i.e., the uncertainty; The binary cross-entropy loss for the anomaly detection branch; The weighting coefficients for anomaly detection loss.
[0131] Physical consistency soft constraint:
[0132] Horizontal displacement components, reservoir water level Compared with the predicted average displacement Penalties for conditions that satisfy a monotonic relationship:
[0133] ;
[0134] In the formula: For displacement monotonicity penalty, for Reservoir water level at any time For nodes exist The predicted mean displacement at time 10:00 Indicates the change over a time step;
[0135] Apply a non-negative penalty and a region smoothing penalty to the seepage flow:
[0136] ;
[0137] In the formula: Comprehensive penalties for seepage flow For nodes exist The predicted mean infiltration flow rate at time point The weighting coefficients of the graph domain smoothing term, For graph gradient operators;
[0138] Introduce a priori information about thermal diffusion into the temperature field:
[0139] ;
[0140] In the formula: For thermal diffusion penalties, for The predicted temperature field vector at time step, containing the predicted temperature values for all nodes. This is the normalized graph Laplace matrix.
[0141] Comprehensive loss function: ;
[0142] In the formula: This is the overall loss function for model training; The reconstruction loss of the graph mask autoencoder is used for the missing test completion task; This is the joint loss function for multiple tasks, namely the heteroscedastic Gaussian negative log-likelihood. The weighting coefficients for the physical consistency soft constraint; , and These are physical penalties for displacement monotonicity, seepage non-negative smoothness, and temperature thermal diffusion, respectively.
[0143] Model training:
[0144] Data set partitioning: Partitioned chronologically, data from 2013-2021 is the training set, data from 2022-2023 is the validation set, and data from 2024 is the test set;
[0145] Training strategy: Iterate 100 times, using an early stopping strategy (stop if the RMSE of the validation set does not decrease for 10 consecutive times), and the batch size is 32.
[0146] (iv) Adaptive early warning threshold generation and anomaly identification:
[0147] Confidence interval calculation: Dynamic confidence intervals are generated based on the predicted mean and standard deviation, using the following formula: In the formula: The conditional predicted mean of the model output, The coverage coefficient is set according to the target confidence level, k=1.96, corresponding to a 95% confidence level; The conditional prediction standard deviation of the model output, i.e., the uncertainty;
[0148] Risk measurement calculation: The standardized residual is:
[0149] ;
[0150] In the formula: To standardize the residuals for subsequent anomaly scoring; These are the actual observed values at the monitoring points; To predict the mean; This represents the predicted standard deviation.
[0151] Risk metric ,in: This represents the probability of an anomaly.
[0152] Determination of tiered early warning thresholds:
[0153] The generalized Pareto distribution (GPD) is used to fit the overthreshold residuals: standardized residuals > u, where u is the initial threshold, and the 90th quantile of the validation set residuals is taken;
[0154] Based on a target false negative rate α = 0.01, calculate the three-level warning threshold:
[0155] Level 1 Warning (Attention): u1 = GPD⁻¹(0.90);
[0156] Level 2 warning (alarm): u2 = GPD⁻¹(0.95);
[0157] Level 3 Warning (Emergency): u3 = GPD⁻¹(0.99);
[0158] Threshold rolling update: GPD parameters are refitted every 14 days based on the latest 30-day data to adapt to seasonal hydrological changes and operating conditions.
[0159] IV. Experimental Results and Analysis
[0160] (a) Performance evaluation of missing test data completion
[0161] Four typical missing measurement points were selected and compared with baseline methods MICE (Multiple Interpolation) and Kriging (Kriging Interpolation). The evaluation indicators included the coefficient of determination R², mean absolute error (MAE), and root mean square error (RMSE). The results are shown in the table below:
[0162] monitoring points method R² MAE (mm) RMSE (mm) 9_10TOP This invention 0.92 0.35 0.48 MICE 0.78 0.62 0.85 Kriging 0.85 0.49 0.67 13_14TOP This invention 0.94 0.28 0.39 MICE 0.81 0.57 0.79 Kriging 0.88 0.41 0.56 S09 This invention 0.91 0.32 0.45 MICE 0.76 0.65 0.89 Kriging 0.83 0.53 0.72 S12 This invention 0.93 0.30 0.42 MICE 0.79 0.59 0.82 Kriging 0.86 0.44 0.61
[0163] As shown in the table, the method of this invention achieves R² above 0.9, MAE below 0.36 mm, and RMSE below 0.5 mm at all typical measurement points, significantly outperforming the baseline method. Figure 2 As shown in Figures a, b, c, and d, the interpolation curves of this invention closely match the true values, especially in scenarios with long-term measurement gaps. As shown in Figure d, the S12 measurement point can still maintain good tracking performance from January to September 2022, verifying the robustness of measurement gaps.
[0164] (II) Analysis of Prediction Accuracy and Interpretability
[0165] Prediction accuracy: The overall R² of the test set is 0.93 (displacement), 0.89 (seepage pressure), and 0.87 (seepage), and the RMSE is 0.52 mm, 0.03 MPa, and 0.02 m³ / s, respectively, which meets the accuracy requirements for engineering monitoring.
[0166] Uncertainty estimation: The predicted confidence interval coverage rate reached 94.8% (target 95%), indicating that the uncertainty estimation is accurate and can provide a reliable reference for engineering decision-making;
[0167] Physical consistency: After introducing soft constraints, the monotonic correlation between displacement and reservoir water level increased from 82% to 95%, the proportion of non-negative seepage values reached 100%, and the spatial distribution of the temperature field conformed to the thermal diffusion law, thus enhancing the interpretability of the prediction results.
[0168] (III) Adaptive Early Warning Performance Evaluation
[0169] Threshold adaptability: Through a rolling update mechanism, the threshold can be dynamically adjusted with seasonal changes. For example, when the reservoir water level rises during the flood season, the warning threshold is appropriately relaxed, while it is tightened during the dry season to avoid false alarms caused by fixed thresholds.
[0170] Anomaly identification performance: The test set included 5 known anomaly events (such as the sudden displacement change caused by the sudden rise in reservoir water level in March 2024), and the present invention accurately identified them all without any missed reports; the false alarm rate was 0.8%, which is lower than MICE (2.3%) and Kriging (1.5%).
[0171] Reasonableness of early warning classification: The three-level early warning threshold can effectively distinguish the severity of the anomaly. For example, a slight exceedance of the threshold (level 1 early warning) corresponds to a small drift of the monitoring point, while a severe exceedance of the threshold (level 3 early warning) corresponds to an abnormal structural stress, which is consistent with the actual interpretation results in the project.
[0172] V. Ablation Experiment Verification
[0173] To verify the effectiveness of each core module, three variant models were used for ablation experiments. The results are shown in the table below:
[0174] Model variants Core changes R² (displacement) MAE (mm) RMSE (mm) False alarm rate Complete model - none 0.93 0.32 0.45 0.8% w / o GCN Remove the diffusing convolutional layer 0.76 0.68 0.89 2.1% w / o Env Remove environmental features (water level, temperature). 0.85 0.49 0.67 1.5% w / o Constraint Remove physical consistency soft constraints 0.88 0.43 0.58 1.2%
[0175] The ablation results showed that:
[0176] The diffuse convolutional layer (GCN) has the greatest impact on performance; removing it reduces R² by 17%, which verifies the necessity of spatial correlation modeling.
[0177] Environmental features can improve the model's adaptability to external factors, but their removal reduces both prediction accuracy and early warning performance.
[0178] While physical consistency soft constraints have limited effect on improving prediction accuracy, they can reduce false alarm rates and enhance the reliability of results.
[0179] VI. Implementation Conclusion
[0180] This embodiment verifies the effectiveness of the dam safety monitoring and early warning method based on graph neural networks using actual monitoring data from the Wuxijiang tributary dam. The core conclusions are as follows:
[0181] The combination of time-varying adjacency matrix and diffusion convolution can effectively characterize the nonlinear coupling and topological changes of dam monitoring data;
[0182] The graph mask autoencoder significantly improves robustness in missing test scenarios and has better interpolation accuracy than traditional methods.
[0183] Physical consistency soft constraints enhance the interpretability and engineering applicability of prediction results;
[0184] The rolling update threshold based on the generalized Pareto distribution can adapt to seasonal and operating condition changes, reducing the false alarm rate.
[0185] The model is adaptable to different types of monitoring points and dam types, and has good engineering promotion value.
[0186] The process and parameters in this embodiment can be directly transferred to other dam safety monitoring scenarios. Only the distance scale constant, loss function weight, and other parameters need to be adjusted according to the specific dam type and monitoring layout.
[0187] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for dam safety monitoring and early warning based on graph neural networks, characterized in that: Includes the following steps: S1. Set the sliding time window parameters, collect time series data of each monitoring point of the dam at a preset frequency, and construct a set of time series data of the monitoring points after removing invalid data. S2. A gated attention fusion algorithm is adopted, with monitoring points as nodes, and a monitoring network topology graph containing physical adjacency graph and statistical correlation graph is constructed based on spatial coordinates and data statistical correlation, and mapped to a time-varying adjacency matrix; wherein: the physical adjacency graph contains hydraulic correlation subgraph and heat conduction subgraph; S3. At each time step, the node data is standardized, positionally and periodically encoded in sequence to generate feature vectors. Missing test items are filled back by causal reconstruction using a graph mask autoencoder to construct the node feature matrix. S4. Input the feature matrix and the time-varying adjacency matrix into the graph neural network, use heteroscedastic Gaussian negative log-likelihood as the joint loss function for multiple tasks, and output multi-dimensional predicted values of displacement, seepage pressure and seepage through spatial diffusion convolution and causal time modeling. S5. Introduce soft constraints for matching hydraulic mechanisms, embed loss functions to construct comprehensive loss functions, and iteratively optimize the model to generate interval prediction results; S6. At each time step, the mean and standard deviation of the conditional prediction are obtained through causal reasoning, and a dynamic confidence interval is generated. The risk measure is calculated by weighted fusion of standardized residuals and anomaly probability. The over-threshold residuals are fitted with a generalized Pareto distribution. The multi-level early warning thresholds are determined by combining the target missed rate and are updated on a rolling basis.
2. The dam safety monitoring and early warning system based on graph neural networks according to claim 1, characterized in that: The monitoring data includes displacement, seepage pressure, seepage flow, temperature, reservoir water level, and meteorological data.
3. The dam safety monitoring and early warning method based on graph neural networks according to claim 2, characterized in that: The time-varying adjacency matrix is: In the formula: For time-varying adjacency matrix, Indexes for relational types, i.e., sets Corresponding to physical adjacency, hydraulic correlation, heat conduction and statistical correlation, For the gating coefficients generated by the gating network, For the first The initial adjacency matrix of the relationship, In order to target the Attention coefficient of such relationship This represents the Hadamard product.
4. The dam safety monitoring and early warning method based on graph neural networks according to claim 3, characterized in that: The operator for the diffusion convolution is defined as: In the formula: This is the output of the diffuse convolutional layer; For the input feature matrix, This is the degree matrix, used to normalize the adjacency matrix; The diffusion order determines the distance that the model can perceive between adjacent nodes; It is a time-varying adjacency matrix; and In order to target the The learning weight parameters for the first-order diffusion are used to capture the forward diffusion features and the reverse / transposed diffusion features on the graph, respectively.
5. The dam safety monitoring and early warning method based on graph neural networks according to claim 4, characterized in that: The causal temporal modeling is implemented using dilated temporal convolutional networks or gated recurrent units, wherein: the kernel size of the dilated temporal convolutional network is 3, and the dilation coefficient is... Increasing.
6. The dam safety monitoring and early warning method based on graph neural networks according to claim 5, characterized in that: The multi-task joint loss function is the heteroscedastic Gaussian negative log-likelihood, which is obtained by simultaneously fitting the mean and variance. The expression for the heteroscedastic Gaussian negative log-likelihood is: In the formula: The joint loss function for multiple tasks is the heteroscedastic Gaussian negative log-likelihood. To monitor task types, the data is derived from a set of values. , , and These represent displacement, seepage pressure, and seepage flow, respectively. For nodes At any moment For the task The actual monitoring value; The predicted mean of the model output; The standard deviation of the model's predictions, i.e., the uncertainty; The binary cross-entropy loss for the anomaly detection branch; The weighting coefficients for anomaly detection loss.
7. The dam safety monitoring and early warning method based on graph neural networks according to claim 6, characterized in that: The soft constraints include: Horizontal displacement components, reservoir water level Compared with the predicted average displacement Penalties for conditions that satisfy a monotonic relationship: In the formula: For displacement monotonicity penalty, for Reservoir water level at any time For nodes exist The predicted mean displacement at time 10:00 Indicates the change at a time step; Apply a non-negative penalty and a region smoothing penalty to the seepage flow: In the formula: Comprehensive penalties for seepage flow For nodes exist The predicted mean infiltration flow rate at time point The weighting coefficients of the graph domain smoothing term, For graph gradient operators; Introduce a priori information about thermal diffusion into the temperature field: In the formula: For thermal diffusion penalties, for The predicted temperature field vector at time step, containing the predicted temperature values for all nodes. This is the normalized graph Laplace matrix.
8. The dam safety monitoring and early warning method based on graph neural networks according to claim 7, characterized in that: The expression for the comprehensive loss function is: In the formula: This is the overall loss function for model training; The reconstruction loss of the graph mask autoencoder is used for the missing test completion task; This is the joint loss function for multiple tasks, namely the heteroscedastic Gaussian negative log-likelihood. The weighting coefficients for the physical consistency soft constraint; , and These are physical penalties for displacement monotonicity, seepage non-negative smoothness, and temperature thermal diffusion, respectively.
9. A dam safety monitoring and early warning method based on graph neural networks according to claim 8, characterized in that: The confidence interval is: In the formula: The conditional predicted mean of the model output, The coverage factor set according to the target confidence level; The conditional prediction standard deviation of the model output, i.e., the uncertainty; The standardized residual is: In the formula: To standardize the residuals for subsequent anomaly scoring; These are the actual observed values at the monitoring points; To predict the mean; This represents the predicted standard deviation.
10. A dam safety monitoring and early warning system based on graph neural networks, characterized in that: include: The data acquisition module uses a sliding time window to collect monitoring data for each monitoring point; The monitoring graph fusion module uses gated attention fusion with monitoring points as nodes. It constructs a monitoring network topology graph based on the spatial arrangement and correlation of the nodes and transforms it into a time-varying adjacency matrix. The feature processing module standardizes, positions, and encodes the monitoring data of each node at each time step, constructs feature vectors, and forms a feature matrix. The multi-task prediction output module takes the feature matrix as input, and under the given time-varying adjacency matrix, takes the joint loss function of multiple tasks as the objective, and outputs multi-task predictions through diffusion convolution and causal time modeling. The interval prediction generation module introduces soft constraints consistent with hydraulic mechanisms to construct a comprehensive loss function in order to generate interval predictions; The reasoning and early warning module uses monitoring data to obtain the conditional prediction mean and standard deviation through causal reasoning at each time step to generate confidence intervals. It calculates risk measures by fusing standardized residuals and anomaly probabilities, fits the over-threshold residuals with a generalized Pareto distribution, and determines the classification thresholds by combining the target missed rate. It is updated on a rolling basis to adapt to seasonal and operating condition changes.
