A deep learning-based water conservancy project safety risk early warning method and system

By using data preprocessing based on Gaussian process and wavelet threshold filtering, combined with the SlowFast-Transformer model, the problem of underutilization of data features in water conservancy project safety risk early warning was solved, achieving efficient risk early warning and accurate risk level classification.

CN122390489APending Publication Date: 2026-07-14HUNAN CHENGDE CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN CHENGDE CONSTR CO LTD
Filing Date
2026-06-17
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing methods for early warning of safety risks in water conservancy projects have poor data preprocessing effects, fail to fully explore the spatial correlation and temporal dynamic features of the data, are difficult to adapt to the modeling requirements of deep learning models for spatiotemporal information, and cannot simultaneously take into account the high-frequency instantaneous features and low-frequency trend features of water conservancy risks, thus affecting the accuracy of early warning.

Method used

An adaptive interpolation algorithm based on Gaussian process is used to fill in missing data values. Wavelet threshold denoising and adaptive threshold filtering are combined to filter noisy data, which is then transformed into a two-dimensional matrix structure. The SlowFast-Transformer hybrid model is used for feature extraction and risk prediction, and warning signals are output by classifying the risk into no risk, low risk, medium risk and high risk levels.

Benefits of technology

It improves the accuracy and purity of preprocessed data, enables the simultaneous capture of high and low frequency risk characteristics and long-term time-series dependency modeling, improves the accuracy of risk prediction and the efficiency of early warning response, and enhances the accuracy and practicality of water conservancy project safety risk early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390489A_ABST
    Figure CN122390489A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of water conservancy engineering safety, and discloses a water conservancy engineering safety risk early warning method and system based on deep learning, which collects water conservancy engineering structure parameters, hydrological parameters and environmental parameters, obtains monitoring original data, fills in missing values of the data by adopting a self-adaptive interpolation algorithm based on a Gaussian process, filters noise data by adopting an algorithm combining wavelet threshold denoising and adaptive threshold filtering, and obtains pretreatment data; the pretreatment data are converted into a two-dimensional matrix structure, a sliding window is adopted to divide space-time samples to construct an input data set; the input data set is transmitted into a SlowFast-Transformer hybrid model, a risk probability value is output through a risk prediction layer; the risk probability value is compared with a preset threshold value, and is divided into four levels of no risk, low risk, medium risk and high risk, corresponding early warning signals are output for different risk levels; and the application enhances the accuracy, timeliness and practicability of water conservancy engineering safety risk early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water conservancy engineering safety technology, specifically to a water conservancy engineering safety risk early warning method and system based on deep learning. Background Technology

[0002] As core infrastructure for ensuring water resource allocation, flood control and drought relief, and energy supply, the safe and stable operation of water conservancy projects is extremely important. However, water conservancy projects operate in complex and ever-changing natural environments for extended periods, and are subject to multiple factors such as hydrological fluctuations, geological activities, environmental erosion, and structural aging, which can easily lead to safety hazards. If timely warnings and responses are not provided, major safety accidents such as dam failures and dike breaches may occur. Existing water conservancy project safety risk early warning methods have poor data preprocessing effects, affecting the accuracy of subsequent warnings. They do not fully explore the spatial correlation and temporal dynamic characteristics of the data, making it difficult to adapt to the modeling requirements of deep learning models for spatiotemporal information. Traditional early warning models can only capture spatial features or can only depict temporal dependencies, and cannot simultaneously take into account the high-frequency instantaneous characteristics and low-frequency trend characteristics of water conservancy risks due to long-term aging. Summary of the Invention

[0003] The purpose of this invention is to solve the above problems by designing a method and system for early warning of safety risks in water conservancy projects based on deep learning.

[0004] The first aspect of this invention provides a method for early warning of safety risks in water conservancy projects based on deep learning, the method comprising the following steps: Structural parameters, hydrological parameters, and environmental parameters of water conservancy projects are collected to obtain raw monitoring data. An adaptive interpolation algorithm based on Gaussian process is used to fill in missing data values. Noise data is filtered by an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The preprocessed data is transformed into a two-dimensional matrix structure, and the input dataset is constructed by dividing the spatiotemporal samples using a sliding window. The input dataset is fed into the SlowFast-Transformer hybrid model, and the risk probability value is output through the risk prediction layer. The risk probability value is compared with a preset threshold and divided into four levels: no risk, low risk, medium risk, and high risk. Corresponding warning signals are output for different risk levels.

[0005] Optionally, in the first implementation of the first aspect of the present invention, the process of collecting structural parameters, hydrological parameters, and environmental parameters of the water conservancy project to obtain raw monitoring data, using an adaptive interpolation algorithm based on Gaussian processes to fill in missing data values, and filtering noisy data using an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data includes: The missing values ​​in the original data are located and monitored. Data within the spatiotemporal neighborhood of each missing value is selected as training samples. A Gaussian process interpolation model is constructed based on training samples. The interpolation weights of data at different locations in the neighborhood are adaptively assigned in combination with the time series of the data to obtain weighted neighborhood data. Based on the weighted neighborhood data and the prediction results of the Gaussian process model, the imputation value for each missing value is calculated and filled into the corresponding missing position in the original monitoring data. Multi-scale wavelet decomposition is performed on the data with missing value imputation to obtain low-frequency approximation coefficients and high-frequency detail coefficients. Thresholding is performed on the high-frequency detail coefficients obtained by wavelet decomposition. Based on the processed high-frequency detail coefficients and low-frequency approximation coefficients, inverse wavelet transform is performed to reconstruct the preliminary denoised dataset after removing high-frequency noise. Calculate the statistical characteristics of the time series data of each parameter in the preliminary denoised dataset, and dynamically adjust the filtering threshold according to the statistical characteristics. Compare the preliminary denoised data point by point with the adaptively adjusted threshold to filter out abnormal data points that exceed the threshold range and residual low-frequency interference noise. All parameter data after two denoising processes are integrated to form complete preprocessed data.

[0006] Optionally, in a second implementation of the first aspect of the present invention, the step of converting the preprocessed data into a two-dimensional matrix structure and constructing the input dataset by dividing the spatiotemporal samples using a sliding window includes: Using time as the row dimension of the matrix and monitoring parameters as the column dimension, a two-dimensional matrix is ​​formed, where the monitoring parameters include; Based on the preset sliding window length, multiple consecutive rows of data are extracted from the starting row of the two-dimensional matrix as a single spatiotemporal sample. The window moves downward along the time dimension according to the preset sliding step size, and the truncation operation is repeated until the entire two-dimensional matrix is ​​covered. All the captured spatiotemporal samples are aggregated to construct the input dataset.

[0007] Optionally, in a third implementation of the first aspect of the present invention, the SlowFast-Transformer hybrid model includes a dual-branch feature extraction layer, a Transformer global modeling layer, and a risk prediction layer.

[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the dual-branch feature extraction layer includes a Slow branch and a Fast branch, the Slow branch and the Fast branch are connected laterally to achieve feature fusion, and the Transformer global modeling layer consists of four stacked Transformer coding blocks.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the step of feeding the input dataset into the SlowFast-Transformer hybrid model and outputting a risk probability value through a risk prediction layer includes: The Slow branch extracts low-frequency macroscopic features through 16-channel two-dimensional convolution, capturing information including dam aging, long-term water level trends, and cumulative leakage. After convolution, it is restored to 60 time steps through upsampling, aligning with the time dimension of the Fast branch. The Fast branch extracts high-frequency dynamic features through 8-channel 2D convolution, focusing on information including sudden rises in water level, abrupt changes in crack width, and impacts from torrential rain. The features output from the Slow and Fast branches are fused by concatenating the channel dimensions, and then transformed into a fused feature vector through a Reshape operation. The fused feature vectors are mapped to a 256-dimensional embedding space through a linear transformation and input into four stacked Transformer encoding blocks. The long-range dependencies of the features are modeled through a multi-head self-attention mechanism to obtain temporal features. Each Transformer encoding block includes a 4-head self-attention mechanism and a 512-dimensional feedforward network. In the risk prediction layer, the temporal features are compressed into a 256-dimensional vector through global average pooling, overfitting is suppressed through the Dropout layer, and finally the risk probability in the 0-1 interval is output through a fully connected layer and a Sigmoid activation function.

[0010] Optionally, in the sixth implementation of the first aspect of the present invention, the step of comparing the risk probability value with a preset threshold and classifying it into four levels—no risk, low risk, medium risk, and high risk—and outputting corresponding warning signals for different risk levels includes: Based on the relevant requirements for safety management of water conservancy projects and historical accident data, probability thresholds corresponding to four risk levels were determined. The risk probability value is compared with the preset probability threshold one by one to determine the risk level range to which the risk probability value belongs, so as to determine the corresponding risk level. Corresponding warning signals are output for different risk levels: no warning signal for no risk level, blue warning signal for low risk level, yellow warning signal for medium risk level, and red warning signal for high risk level.

[0011] A second aspect of the present invention provides a deep learning-based early warning system for safety risks in water conservancy projects, the system comprising: The data processing module is used to collect structural parameters, hydrological parameters, and environmental parameters of water conservancy projects to obtain raw monitoring data. It uses an adaptive interpolation algorithm based on Gaussian process to fill in missing data values ​​and filters noisy data through an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The data transformation module is used to transform preprocessed data into a two-dimensional matrix structure, and uses a sliding window to divide spatiotemporal samples to construct the input dataset; The risk prediction module is used to feed the input dataset into the SlowFast-Transformer hybrid model and output risk probability values ​​through the risk prediction layer; The risk warning module compares the risk probability value with a preset threshold and classifies it into four levels: no risk, low risk, medium risk, and high risk. It then outputs corresponding warning signals for each risk level.

[0012] A third aspect of the present invention provides a deep learning-based water conservancy project safety risk early warning device, the deep learning-based water conservancy project safety risk early warning device comprising a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the deep learning-based water conservancy project safety risk early warning device to perform the various steps of the deep learning-based water conservancy project safety risk early warning method as described in any of the preceding claims.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the deep learning-based water conservancy engineering safety risk early warning method as described in any of the preceding claims.

[0014] The technical solution provided by this invention involves collecting structural parameters, hydrological parameters, and environmental parameters of water conservancy projects to obtain raw monitoring data. An adaptive interpolation algorithm based on Gaussian processes is used to fill in missing data values. Noise data is filtered using an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The preprocessed data is then transformed into a two-dimensional matrix structure, and a sliding window is used to divide spatiotemporal samples to construct an input dataset. This input dataset is fed into a SlowFast-Transformer hybrid model, which outputs risk probability values ​​through a risk prediction layer. The risk probability values ​​are compared with preset thresholds to classify the risk into four levels: no risk, low risk, medium risk, and high risk. Corresponding risk levels are then output for each level. This invention significantly improves the accuracy and purity of preprocessed data through a Gaussian process-based adaptive interpolation and wavelet threshold-adaptive threshold combination denoising algorithm. A highly adaptable spatiotemporal dataset is then constructed using two-dimensional matrix transformation and sliding window partitioning. Combined with a SlowFast-Transformer hybrid model, it achieves simultaneous capture of high- and low-frequency risk features and long-term temporal dependency modeling. Coupled with a dynamically adjusted four-level risk classification mechanism, this not only significantly improves the accuracy of risk prediction and data utilization compared to traditional methods, but also optimizes the efficiency of early warning response and the scientific nature of classification. This comprehensively enhances the accuracy, timeliness, and practicality of water conservancy project safety risk early warning, providing reliable technical support for project safety protection. Attached Figure Description

[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.

[0016] Figure 1 A flowchart of a deep learning-based water conservancy engineering safety risk early warning method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a deep learning-based water conservancy engineering safety risk early warning system provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a water conservancy project safety risk early warning device based on deep learning provided in an embodiment of the present invention. Detailed Implementation

[0017] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0018] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The flowchart of the water conservancy project safety risk early warning method based on deep learning provided in this embodiment of the invention includes the following steps: Step 101: Collect structural parameters, hydrological parameters, and environmental parameters of the water conservancy project to obtain raw monitoring data. Use an adaptive interpolation algorithm based on Gaussian process to fill in missing data values. Filter noisy data using an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. In this embodiment, missing values ​​in the original monitoring data are located. Data within the spatiotemporal neighborhood of each missing value is selected as training samples. A Gaussian process interpolation model is constructed based on the training samples. The interpolation weights of data at different neighborhood locations are adaptively assigned based on the time series data, resulting in weighted neighborhood data. Based on the weighted neighborhood data and the prediction results of the Gaussian process model, the imputation value for each missing value is calculated and filled into the corresponding missing position in the original monitoring data. Multi-scale wavelet decomposition is performed on the imputed data to obtain low-frequency approximation coefficients and high-frequency detail coefficients. Thresholding is applied to the high-frequency detail coefficients obtained from the wavelet decomposition. An inverse wavelet transform is performed based on the processed high-frequency detail coefficients and low-frequency approximation coefficients to reconstruct a preliminary denoised dataset after removing high-frequency noise. The statistical characteristics of the time series data of each parameter in the preliminary denoised dataset are calculated, and the filtering threshold is dynamically adjusted based on the statistical characteristics. The preliminary denoised data is compared point-by-point with the adaptively adjusted threshold to filter out abnormal data points exceeding the threshold range and residual low-frequency interference noise. All parameter data after the two denoising processes are integrated to form the completed preprocessed data.

[0019] Step 102: Transform the preprocessed data into a two-dimensional matrix structure, and use a sliding window to divide the spatiotemporal samples to construct the input dataset; In this embodiment, a two-dimensional matrix is ​​formed by using the time dimension as the row dimension of the matrix and the monitoring parameters as the column dimension of the matrix. The monitoring parameters include: extracting multiple consecutive rows of data from the starting row of the two-dimensional matrix as a single spatiotemporal sample according to a preset sliding window length; moving the window down along the time dimension according to a preset sliding step size and repeating the extraction operation until the entire two-dimensional matrix is ​​covered; and summarizing all the extracted spatiotemporal samples to construct the input dataset.

[0020] In this embodiment, the dimensional division rules of the two-dimensional matrix are determined and the matrix is ​​constructed. The time dimension is used as the row dimension of the matrix. Following the order of data collection, each collection time node is sequentially assigned to a row in the matrix, ensuring that the row arrangement is completely consistent with the time flow. Monitoring parameters are then used as the column dimension of the matrix. These monitoring parameters include hydraulic engineering structural parameters, hydrological parameters, and environmental parameters. Each type of parameter is treated as an independent column and arranged sequentially according to a preset parameter sorting rule. Finally, the specific values ​​of each type of monitoring parameter at each time node are filled into the corresponding row and column intersection positions of the matrix, forming a well-organized row and column structure. The data corresponds to an accurate two-dimensional matrix, where each cell stores the value of a single monitoring parameter at a single time point. The sample truncation operation is performed according to the preset sliding window length. First, the number of time steps corresponding to the preset sliding window length is confirmed, that is, the number of consecutive collection time points contained in the window. Then, starting from the first row of the constructed two-dimensional matrix, multiple consecutive rows of data are truncated. The number of rows truncated is consistent with the preset window length. During the truncation process, the column dimension remains unchanged. The truncated part of the matrix is ​​taken as a single spatiotemporal sample, which completely contains the continuous data of all monitoring parameters within the corresponding time span. The window is moved and repeatedly captured according to a preset sliding step size. The sliding step size is determined by the set number of time steps, that is, the number of collection time nodes that the window moves across each time step. Based on the window captured in the first step, the window is moved down along the time dimension by the set step size so that the starting row of the new window corresponds to the time node after the moving step size. Then, following the same rules as the second step, multiple consecutive rows of data in the new window are captured as another spatiotemporal sample. The above operations of moving the window and capturing samples are repeated until the window moves to the last row of the matrix, ensuring that the capture range covers all rows of data in the entire two-dimensional matrix and that no monitoring data corresponding to the time nodes is missed. All captured spatiotemporal samples are summarized and an input dataset is constructed. The spatiotemporal samples generated by each capture are collected and organized one by one, and all samples are sorted according to the time sequence of the sample capture to form a sample set. Then, the sample set is basically normalized to remove abnormal samples that may be generated by window boundary capture.

[0021] Step 103: Input the dataset into the SlowFast-Transformer hybrid model and output the risk probability value through the risk prediction layer; In this embodiment, the SlowFast-Transformer hybrid model includes a dual-branch feature extraction layer, a Transformer global modeling layer, and a risk prediction layer; the dual-branch feature extraction layer includes a Slow branch and a Fast branch, and the Slow branch and Fast branch achieve feature fusion through horizontal connection; the Transformer global modeling layer consists of 4 stacked Transformer coding blocks.

[0022] In this embodiment, the Slow branch extracts low-frequency macroscopic features through 16-channel 2D convolution, capturing information including dam aging, long-term water level trends, and accumulated leakage. After convolution, it is upsampled to restore 60 time steps, aligning with the time dimension of the Fast branch. The Fast branch extracts high-frequency dynamic features through 8-channel 2D convolution, focusing on information including sudden rises in water level, abrupt changes in crack width, and rainstorm impact. The features output by the Slow and Fast branches are fused by concatenating the channel dimensions, and transformed into a fused feature vector by a Reshape operation. The fused feature vector is mapped to a 256-dimensional embedding space through linear transformation and input into four stacked Transformer encoding blocks. The long-range dependency of features is modeled through a multi-head self-attention mechanism to obtain temporal features, where each Transformer encoding block includes a 4-head self-attention mechanism and a 512-dimensional feedforward network. In the risk prediction layer, the temporal features are compressed into a 256-dimensional vector through global average pooling, overfitting is suppressed through a Dropout layer, and finally, a risk probability value in the 0-1 interval is output through a fully connected layer and a Sigmoid activation function.

[0023] In this embodiment, the Slow branch performs feature extraction and dimension alignment. The Slow branch uses a 16-channel two-dimensional convolution to extract features from the input spatiotemporal samples. By setting a convolution kernel of a fixed size, it traverses the sample matrix to capture low-frequency information in the samples. It focuses on extracting macroscopic features such as the slow changes in structural parameters during dam aging, the long-term trend of water level changes, and the cumulative changes in leakage over time. After the convolution operation is completed, an upsampling method is used to expand the time dimension of the feature map, gradually restoring it to 60 time steps to ensure consistency with the time dimension of the output features of the Fast branch, thus achieving time alignment of the features of the two branches. The Fast branch is configured with an 8-channel two-dimensional convolution structure and selects convolution kernel parameters adapted to capture high-frequency information. It performs convolution operations on the input samples, focusing on extracting sudden dynamic features in the operation of water conservancy projects. It focuses on capturing short-term high-frequency information such as sudden rises in water level, sudden changes in crack width, and violent fluctuations in parameters caused by rainstorms. It fully preserves the feature details corresponding to these sudden situations and forms an independent high-frequency feature map. By employing a channel-dimensional concatenation approach, the low-frequency macroscopic feature map output from the Slow branch and the high-frequency dynamic feature map output from the Fast branch are integrated, so that the fused feature map contains both long-term trend information and short-term burst information. After concatenation, a Reshape operation is performed to reshape the fused feature map according to preset dimensional rules, transforming the two-dimensional feature map into a one-dimensional fused feature vector. Feature mapping and Transformer global modeling are then performed. First, the fused one-dimensional feature vector is mapped to a 256-dimensional embedding space through a linear transformation, completing the unification and optimization of feature dimensions. Then, the embedded feature vector is input into four stacked Transformer encoding blocks. Each encoding block sequentially performs a four-head self-attention mechanism and a 512-dimensional feedforward network operation. The self-attention mechanism calculates the correlation weights between each position of the feature vector to model the long-range dependency relationship of the feature. Then, the feedforward network performs a nonlinear transformation on the feature, finally outputting the enhanced temporal feature. The risk prediction layer outputs risk probability values. First, global average pooling is performed on the temporal features output by the Transformer encoding block to compress the features according to the channel dimension, resulting in a 256-dimensional fixed-length vector. Then, this vector is input into the Dropout layer to randomly block the output of some neurons. Subsequently, the processed vector is fed into the fully connected layer, where the features are dimension-mapped using a weight matrix. Finally, the output is normalized using the Sigmoid activation function to obtain the risk probability value in the 0-1 interval.

[0024] Step 104: Compare the risk probability value with the preset threshold and divide it into four levels: no risk, low risk, medium risk, and high risk. Output corresponding warning signals for different risk levels.

[0025] In this embodiment, based on the relevant requirements for safety management of water conservancy projects and historical accident data, probability thresholds corresponding to four risk levels are determined; the risk probability values ​​are compared one by one with the preset probability thresholds to determine the risk level range to which the risk probability value belongs, so as to determine the corresponding risk level; corresponding warning signals are output for different risk levels, wherein no warning signal is output for no risk level, blue warning signal is output for low risk level, yellow warning signal is output for medium risk level, and red warning signal is output for high risk level.

[0026] Please see Figure 2 A schematic diagram of the structure of a deep learning-based water conservancy engineering safety risk early warning system provided in this embodiment of the invention. The system includes: The data processing module is used to collect structural parameters, hydrological parameters, and environmental parameters of water conservancy projects to obtain raw monitoring data. It uses an adaptive interpolation algorithm based on Gaussian process to fill in missing data values ​​and filters noisy data through an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The data transformation module is used to transform preprocessed data into a two-dimensional matrix structure, and uses a sliding window to divide spatiotemporal samples to construct the input dataset; The risk prediction module is used to feed the input dataset into the SlowFast-Transformer hybrid model and output risk probability values ​​through the risk prediction layer; The risk warning module compares the risk probability value with a preset threshold and classifies it into four levels: no risk, low risk, medium risk, and high risk. It then outputs corresponding warning signals for each risk level.

[0027] Figure 3 This is a schematic diagram of the structure of a deep learning-based water conservancy engineering safety risk early warning device 300 provided in an embodiment of the present invention. The deep learning-based water conservancy engineering safety risk early warning device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the deep learning-based water conservancy engineering safety risk early warning device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the deep learning-based water conservancy engineering safety risk early warning device 300 to implement the method provided in the above embodiment.

[0028] The deep learning-based water conservancy engineering safety risk early warning device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The structure of the water conservancy project safety risk early warning device based on deep learning shown does not constitute a limitation on the computer device provided by the present invention. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0029] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the various steps of the deep learning-based water conservancy engineering safety risk early warning method provided in the above embodiments.

[0030] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment or apparatus / unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0031] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0032] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended technical solutions and their equivalents.

Claims

1. A method for early warning of safety risks in water conservancy projects based on deep learning, characterized in that, The method includes the following steps: Structural parameters, hydrological parameters, and environmental parameters of water conservancy projects are collected to obtain raw monitoring data. An adaptive interpolation algorithm based on Gaussian process is used to fill in missing data values. Noise data is filtered by an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The preprocessed data is transformed into a two-dimensional matrix structure, and the input dataset is constructed by dividing the spatiotemporal samples using a sliding window. The input dataset is fed into the SlowFast-Transformer hybrid model, and the risk probability value is output through the risk prediction layer. The risk probability value is compared with a preset threshold and divided into four levels: no risk, low risk, medium risk, and high risk. Corresponding warning signals are output for different risk levels.

2. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 1, characterized in that, The process involves collecting structural parameters, hydrological parameters, and environmental parameters of the water conservancy project to obtain raw monitoring data. A Gaussian process-based adaptive interpolation algorithm is used to fill in missing data values. Noise is filtered using a combination of wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data, including: The missing values ​​in the original data are located and monitored. Data within the spatiotemporal neighborhood of each missing value is selected as training samples. A Gaussian process interpolation model is constructed based on training samples. The interpolation weights of data at different locations in the neighborhood are adaptively assigned in combination with the time series of the data to obtain weighted neighborhood data. Based on the weighted neighborhood data and the prediction results of the Gaussian process model, the imputation value for each missing value is calculated and filled into the corresponding missing position in the original monitoring data. Multi-scale wavelet decomposition is performed on the data with missing value imputation to obtain low-frequency approximation coefficients and high-frequency detail coefficients. Thresholding is performed on the high-frequency detail coefficients obtained by wavelet decomposition. Based on the processed high-frequency detail coefficients and low-frequency approximation coefficients, inverse wavelet transform is performed to reconstruct the preliminary denoised dataset after removing high-frequency noise. Calculate the statistical characteristics of the time series data of each parameter in the preliminary denoised dataset, and dynamically adjust the filtering threshold according to the statistical characteristics. Compare the preliminary denoised data point by point with the adaptively adjusted threshold to filter out abnormal data points that exceed the threshold range and residual low-frequency interference noise. All parameter data after two denoising processes are integrated to form complete preprocessed data.

3. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 1, characterized in that, The process of transforming preprocessed data into a two-dimensional matrix structure and constructing the input dataset by dividing spatiotemporal samples using a sliding window includes: Using time as the row dimension of the matrix and the monitoring parameters as the column dimension of the matrix, a two-dimensional matrix is ​​formed, where the monitoring parameters include; Based on the preset sliding window length, multiple consecutive rows of data are extracted from the starting row of the two-dimensional matrix as a single spatiotemporal sample. The window moves downward along the time dimension according to the preset sliding step size, and the truncation operation is repeated until the entire two-dimensional matrix is ​​covered. All the captured spatiotemporal samples are aggregated to construct the input dataset.

4. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 1, characterized in that, The SlowFast-Transformer hybrid model includes a two-branch feature extraction layer, a Transformer global modeling layer, and a risk prediction layer.

5. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 4, characterized in that, The dual-branch feature extraction layer includes a Slow branch and a Fast branch. The Slow branch and Fast branch are connected laterally to achieve feature fusion. The Transformer global modeling layer consists of four stacked Transformer coding blocks.

6. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 5, characterized in that, The process of feeding the input dataset into the SlowFast-Transformer hybrid model and outputting risk probability values ​​through the risk prediction layer includes: The Slow branch extracts low-frequency macroscopic features through 16-channel two-dimensional convolution, capturing information including dam aging, long-term water level trends, and cumulative leakage. After convolution, it is restored to 60 time steps through upsampling, aligning with the time dimension of the Fast branch. The Fast branch extracts high-frequency dynamic features through 8-channel 2D convolution, focusing on information including sudden rises in water level, abrupt changes in crack width, and impacts from torrential rain. The features output from the Slow and Fast branches are fused by concatenating the channel dimensions, and then transformed into a fused feature vector through a Reshape operation. The fused feature vectors are mapped to a 256-dimensional embedding space through a linear transformation and input into four stacked Transformer encoding blocks. The long-range dependencies of the features are modeled through a multi-head self-attention mechanism to obtain temporal features. Each Transformer encoding block includes a 4-head self-attention mechanism and a 512-dimensional feedforward network. In the risk prediction layer, the temporal features are compressed into a 256-dimensional vector through global average pooling, overfitting is suppressed through the Dropout layer, and finally the risk probability value in the 0-1 interval is output through a fully connected layer and a Sigmoid activation function.

7. The method for early warning of safety risks in water conservancy projects based on deep learning as described in claim 1, characterized in that, The risk probability value is compared with a preset threshold and divided into four levels: no risk, low risk, medium risk, and high risk. Corresponding warning signals are output for each risk level, including: Based on the relevant requirements for safety management of water conservancy projects and historical accident data, probability thresholds corresponding to four risk levels were determined. The risk probability value is compared with the preset probability threshold one by one to determine the risk level range to which the risk probability value belongs, so as to determine the corresponding risk level. Corresponding warning signals are output for different risk levels: no warning signal for no risk level, blue warning signal for low risk level, yellow warning signal for medium risk level, and red warning signal for high risk level.

8. A deep learning-based early warning system for safety risks in water conservancy projects, characterized in that, The system includes: The data processing module is used to collect structural parameters, hydrological parameters, and environmental parameters of water conservancy projects to obtain raw monitoring data. It uses an adaptive interpolation algorithm based on Gaussian process to fill in missing data values ​​and filters noisy data through an algorithm combining wavelet threshold denoising and adaptive threshold filtering to obtain preprocessed data. The data transformation module is used to transform preprocessed data into a two-dimensional matrix structure, and uses a sliding window to divide spatiotemporal samples to construct the input dataset; The risk prediction module is used to feed the input dataset into the SlowFast-Transformer hybrid model and output risk probability values ​​through the risk prediction layer; The risk warning module compares the risk probability value with a preset threshold and classifies it into four levels: no risk, low risk, medium risk, and high risk. It then outputs corresponding warning signals for each risk level.

9. A water conservancy project safety risk early warning device based on deep learning, characterized in that, The deep learning-based water conservancy project safety risk early warning device includes a memory and at least one processor. The memory stores instructions. The at least one processor invokes the instructions in the memory to cause the deep learning-based water conservancy project safety risk early warning device to execute each step of the deep learning-based water conservancy project safety risk early warning method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement each step of the deep learning-based water conservancy engineering safety risk early warning method as described in any one of claims 1-7.