Gate dam safety monitoring multi-factor collaborative prediction and early warning method based on deep learning

The deep learning-based multi-element collaborative prediction and early warning method for dam safety monitoring solves the problem of low efficiency in single-station modeling in traditional dam safety prediction, realizes multi-element collaborative prediction and early warning, and improves prediction accuracy and reliability.

CN121594974AActive Publication Date: 2026-03-03GUANGDONG RES INST OF WATER RESOURCES & HYDROPOWER

Patent Information

Application Number
CN202610120910.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-03-03
Estimated Expiration
2046-01-29

AI Technical Summary

Technical Problem

Traditional dam safety prediction and early warning analysis models suffer from problems such as one-sided single-station modeling, lack of integration of global correlation and local dependence, short model prediction period, and unsatisfactory prediction accuracy. In particular, in large-scale water conservancy projects with dense monitoring points, modeling efficiency and prediction accuracy cannot be balanced.

Method used

A deep learning-based multi-element collaborative prediction and early warning method for dam safety monitoring is adopted. Monitoring data is collected through automated facilities, and collaborative data quality correction processing is performed to construct a unified spatiotemporal feature modeling framework. By utilizing the Transformer model and autocorrelation attention mechanism, joint modeling of multiple measuring points and multiple monitoring elements is achieved, thereby improving the ability to integrate correlations between the sequence and the external environment.

Benefits of technology

While ensuring modeling efficiency, it significantly improves the ability to characterize long-term evolution trends and prediction accuracy in non-stationary monitoring sequences, thereby enhancing the reliability and engineering applicability of early warning systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121594974A_ABST
    Figure CN121594974A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence and hydraulic engineering, in particular to a gate dam safety monitoring multi-element collaborative prediction and early warning method based on deep learning. The method comprises the following steps: synchronously collecting monitoring data such as displacement, osmotic pressure and temperature of a gate dam through an automatic safety monitoring facility, carrying out collaborative correction processing on the monitoring data, and converting the monitoring data into a standardized sequence sample; intercepting the standardized sequence sample into a source sequence and a target sequence, constructing a model sample library, and dividing the model sample library into a training set and a verification set; training a pre-constructed gate dam safety monitoring multi-element collaborative prediction and early warning model by using the training set, evaluating the precision of the model by using the verification set, and automatically calibrating model parameters; and utilizing the determined model to execute prediction so as to prompt early warning. According to the method, the problems of lack of fusion of global association and local dependence, short model prediction period and the like of traditional safety monitoring single-station modeling can be solved, the limitation of single-element threshold alarm is broken through, and the multi-element cooperative monitoring and early warning precision and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and water conservancy engineering technology, and in particular to a multi-factor collaborative prediction and early warning method for dam safety monitoring based on deep learning. Background Technology

[0002] Traditional dam safety prediction and early warning analysis models generally construct single-station prediction and early warning models using monitoring points as units. Prediction methods primarily rely on statistical methods or machine learning models, with classic examples including moving average (MA), autoregressive (AR), and autoregressive moving average (ARMA). These models fully utilize the autocorrelation characteristics of monitoring data and are suitable for short-term prediction of stationary series, but struggle to meet the medium- and long-term prediction needs of non-stationary series. While machine learning models, represented by support vector machines (SVM), random forests (RF), and backpropagation neural networks (BP), can adapt to non-stationary time series, they are limited to single-station modeling due to model output limitations, and their input features heavily rely on expert experience, neglecting the autocorrelation characteristics between different monitoring elements. In summary, both types of methods suffer from problems such as inefficient single-station modeling, a lack of integration between global correlation and local dependence, short model prediction periods, and unsatisfactory prediction accuracy. These limitations lead to numerous constraints in practical applications, particularly for large-scale water conservancy projects with dense monitoring points, where modeling efficiency and prediction accuracy cannot be simultaneously achieved. Currently, deep learning methods such as LSTM have achieved better results than statistical methods in time series data prediction. This method mainly captures the long-term dependencies of time series data through four gating units: forget gate, input gate, output gate, and cell state. However, it is insufficient in mining the global correlation features between sequences from different stations and cannot accurately capture the autocorrelation features and long-term trends of time series. Summary of the Invention

[0003] Therefore, it is necessary for the present invention to provide a multi-factor collaborative prediction and early warning method for dam safety monitoring based on deep learning, in order to solve at least one of the above-mentioned technical problems.

[0004] To achieve the above objectives, a multi-factor collaborative prediction and early warning method for dam safety monitoring based on deep learning is proposed, comprising the following steps: Step S1: Collect monitoring data of the dam synchronously through automated safety monitoring facilities, and use historical monitoring data of no less than three years as the original data; Step S2: Perform data quality co-correction on the original data, and use the sliding window technique to transform the co-corrected original data into standardized sequence samples; Step S3: According to the preset truncation length, the standardized sequence samples are truncated into source sequences and target sequences to build a model sample library, and the sequences in the model sample library are divided into training set and validation set; Step S4: Train the pre-built multi-element collaborative prediction and early warning model for dam safety monitoring using the training set, evaluate the accuracy of the trained multi-element collaborative prediction and early warning model for dam safety monitoring using the validation set, and optimize the multi-element collaborative prediction and early warning model for dam safety monitoring by configuring the optimal model parameters obtained through automatic calibration. Step S5: Obtain real-time monitoring data from each measuring point, and use the optimized multi-element collaborative prediction and early warning model for dam safety monitoring to perform multi-element prediction for safety monitoring; compare the prediction results of each measuring point with the preset safety monitoring threshold indicators to execute a prompting warning.

[0005] This application introduces a unified spatiotemporal feature modeling framework to jointly model historical sequences of multiple monitoring points and multiple monitoring elements under the same model structure, effectively overcoming the fragmented and inefficient problems of traditional single-station modeling methods. During the extraction of time-series features, this method simultaneously considers the autocorrelation characteristics within the sequence and the global correlation between different monitoring elements and different monitoring points, achieving the synergistic fusion of local time dependence and cross-series correlation information, thereby significantly improving the ability to characterize the long-term evolution trend of non-stationary monitoring sequences. Based on this, by uniformly outputting multi-element prediction results, it reduces the reliance on manual feature construction and empirical rules, improving the model's generalization ability and prediction stability. This enables it to improve prediction accuracy and early warning reliability while ensuring modeling efficiency in large-scale dam engineering scenarios with dense monitoring points and complex operating conditions, demonstrating good engineering applicability and promotional value. Attached Figure Description

[0006] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the steps of the deep learning-based multi-factor collaborative prediction and early warning method for dam safety monitoring in this invention. Figure 2 This is a schematic diagram illustrating the extraction of the source sequence and the target sequence in an embodiment of the present invention; Figure 3 This is a simulation result of the future 3-day prediction of a water conservancy hub monitoring point in an embodiment of the present invention; Figure 4 This is a simulation result of the prediction of the next 7 days for a water conservancy hub monitoring point in a certain location, as shown in an embodiment of the present invention. The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0007] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0008] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0009] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0010] To achieve the above objectives, please refer to Figures 1 to 4 This invention provides a multi-factor collaborative prediction and early warning method for dam safety monitoring based on deep learning, the method comprising the following steps: Step S1: Collect monitoring data of the dam synchronously through automated safety monitoring facilities, and use historical monitoring data of no less than three years as the original data; Step S2: Perform data quality co-correction on the original data, and use the sliding window technique to transform the co-corrected original data into standardized sequence samples; Step S3: According to the preset truncation length, the standardized sequence samples are truncated into source sequences and target sequences to build a model sample library, and the sequences in the model sample library are divided into training set and validation set; Step S4: Train the pre-built multi-element collaborative prediction and early warning model for dam safety monitoring using the training set, evaluate the accuracy of the trained multi-element collaborative prediction and early warning model for dam safety monitoring using the validation set, and optimize the multi-element collaborative prediction and early warning model for dam safety monitoring by configuring the optimal model parameters obtained through automatic calibration. Step S5: Obtain real-time monitoring data from each measuring point, and use the optimized multi-element collaborative prediction and early warning model for dam safety monitoring to perform multi-element prediction for safety monitoring; compare the prediction results of each measuring point with the preset safety monitoring threshold indicators to execute a prompting warning.

[0011] In this embodiment, monitoring data such as time, displacement, seepage pressure, temperature, and water level of the dam are synchronously collected through automated safety monitoring facilities and stored in a structured form in a database management system. Historical monitoring data from the past three years are used as raw data. Preprocessing operations such as outlier repair, missing value imputation, noise smoothing, and data normalization are then performed. A sliding window technique is used to transform the raw data into standardized sequence samples. Subsequently, based on each continuous monitoring time sequence, a sliding window length of n (e.g., n=48, meaning 48 time points constitute one sample segment) and a sliding step size s of 1 to 5 time points are used to extract time series segments from the standardized sequence samples. The first m time points (e.g., m=36) within each sliding window are truncated as the source sequence X, used to input the historical features of the model, and the last nm time points are truncated as the target sequence Y, used to train the model's predictive output. By sliding the window, multiple source-target sequence pairs can be generated from the same monitoring sequence, thereby enriching the number of training samples for the model. All generated samples record the correspondence between source and target sequences in chronological order and are uniformly stored in a relational database or sequence data table to form a complete model sample library. The time series samples are then divided into training and validation sets according to a certain ratio (e.g., 7:3, 8:2), ensuring that both sets contain the same monitoring quantities such as time, displacement, seepage pressure, water level, and temperature. Each sequence sample in both sets has the same length. The training set is used for model building, and the validation set is used for model accuracy evaluation. This multi-element collaborative prediction and early warning model for dam safety monitoring uses a Transformer model as its framework and replaces the original attention mechanism with an autocorrelation attention mechanism to fully capture the global correlation and dependency features between sequences. The encoder extracts the temporal dependency and autocorrelation attention features of the input sequence, while the decoder performs cross-correlation attention modeling between the encoder's attention output and the autocorrelation features of the predicted sequence, achieving efficient fusion of temporal dependency features within sequences and global correlation features between sequences. Finally, a fully connected layer is added to the output of the decoder to control the output dimension to match the safety monitoring elements, thereby achieving medium- and long-term synchronous simulation and prediction of various safety monitoring elements. After the model passes accuracy testing and meets business requirements, real-time monitoring data from each monitoring point can be obtained by reading the monitoring database. Then, pre-simulation is performed using measured data from the past period (e.g., 7 days), followed by forecasting for future times to improve the reliability of model predictions. During model prediction, the starting prediction time is used as a baseline. Monitoring data with a time length of at least seq_len is retrieved forward as the starting sequence. The sequence to be predicted with a time length of pred_len is padded with zeros (if predicting the next 3 days, three zeros are added to the end of the prediction sequence). This padded sequence is then appended to the end of the starting sequence. Finally, a time sliding window method is used to divide the sequence into test samples.Test samples are input sequentially into the trained model for recursive prediction until the end of the test sequence is reached. The last `pre_len` values ​​are then taken as the model's multi-factor safety monitoring prediction output, thus completing the collaborative multi-factor safety monitoring prediction for all sites for the next `pred_len` days. Based on this, the prediction results are compared with preset safety monitoring threshold indicators to provide early warnings of future safety risks.

[0012] It's worth noting that `seq_len` is the start sequence length. Assuming we use monitoring data from the past 7 days as the model's start sequence, then `seq_len = 7 × number of monitoring times per day`. For example, if monitoring data is collected hourly, there are 24 records per day, and over 7 days, `seq_len = 7 × 24 = 168`. `pred_len` is the prediction sequence length. Assuming we want to predict the security monitoring situation for the next 3 days, then `pred_len = 3 × number of monitoring times per day`. Taking hourly data collection as an example, `pred_len = 3 × 24 = 72`.

[0013] It is worth noting that the safety monitoring thresholds include at least one of the following threshold types: absolute safety thresholds set according to the dam design parameters and operating specifications (if the absolute value of the cumulative horizontal displacement of a certain monitoring section of the dam body is ≥15mm, it is determined that the upper limit of the design allowable deformation is exceeded; if the cumulative settlement value per unit time is ≥8mm, it is determined that there is a risk to structural stability; if the dam foundation seepage pressure value is ≥0.85×design seepage resistance pressure value), and dynamic safety thresholds constructed based on the statistical distribution characteristics of historical monitoring data (assuming the mean of the historical displacement sequence is 15mm). The standard deviation is The dynamic security threshold can then be set as follows: The system includes trend-based safety thresholds set based on the rate and trend of change of monitoring elements (e.g., the rate of increase of horizontal displacement of the dam body ≥ 0.35 mm / day within 7 consecutive days; the seepage pressure shows a monotonous increase within 5 consecutive time windows, and the cumulative increase is ≥ 12%; the temperature change range is < 5℃, but the displacement change rate is > 0.3 mm / day); and correlation-based safety thresholds constructed based on the synergistic response relationship of multiple monitoring elements (e.g., when the upstream water level rises by 1m, the corresponding seepage pressure increment should be ≤ 0.05 MPa; if the seepage pressure increment is ≥ 0.08 MPa, the correlation is considered abnormal). When the prediction result of any monitoring element or the synergistic relationship of multiple elements meets the preset safety monitoring threshold triggering conditions, a potential safety risk is determined and an early warning information is output.

[0014] Of particular importance is the evaluation of the accuracy of the multi-factor collaborative prediction and early warning model for dam safety monitoring using the validation set, specifically as follows: The error between the model prediction and the actual value in the current iteration of the multi-element collaborative prediction and early warning model for dam safety monitoring is calculated using the validation set, so as to obtain the loss value of the current iteration process; Backpropagation is performed on the multi-element collaborative prediction and early warning model for dam safety monitoring based on the loss value, the gradient of the parameters of each layer of the network is calculated, and the weights and bias parameters of the multi-element collaborative prediction and early warning model for dam safety monitoring are updated. The process of extracting the temporal dependency features of the source sequence, calculating the autocorrelation attention of the source sequence, calculating the autocorrelation attention of the target sequence, calculating the cross-correlation attention between the source and target sequences, calculating the loss value, and backpropagation is performed as one round of training. The training process is executed iteratively. After each round of training, the performance of the updated multi-element collaborative prediction and early warning model for dam safety monitoring is evaluated using the validation set, and the hyperparameters are adjusted until the preset maximum number of training rounds is reached or the training accuracy no longer improves. Then, the training is stopped and the final multi-element collaborative prediction and early warning model for dam safety monitoring is saved. The training accuracy of the multi-element collaborative prediction and early warning model for dam safety monitoring is evaluated by comprehensively and quantitatively assessing the predictive effect of the model using average accuracy error, root mean square error, and Nash efficiency coefficient, in order to obtain the training accuracy of the multi-element collaborative prediction and early warning model for dam safety monitoring.

[0015] In this embodiment, a multi-factor collaborative prediction and early warning model for dam safety monitoring is trained and validated using a validation set. During the training phase, mean squared error (MSE) is used as the loss metric. The squared error is calculated for each prediction result output by the model in the current iteration and the corresponding real monitoring value in the validation set. The errors of samples from the same batch are averaged to obtain the validation loss value for the current training iteration. After the loss calculation, the gradient of the validation loss with respect to the model output is propagated layer by layer to the network parameters at each level within the encoder and decoder via backpropagation to calculate the gradient values ​​of each parameter relative to the loss function. During parameter updates, the Adam optimization strategy is employed, adaptively adjusting the gradient through first-order moment estimation and second-order moment estimation. The initial learning rate can be set to 0.001, and combined with an automatic gradient update step size adjustment mechanism, differentiated update magnitudes are assigned to different parameters, thereby improving model convergence speed and training stability. To mitigate the risk of overfitting on limited historical samples, a weight decay constraint is introduced into the network weights during parameter updates. This involves adding a penalty term proportional to the weight magnitude during gradient updates to keep the weight parameters within a reasonable range. Simultaneously, a random deactivation strategy is introduced in the intermediate feature mapping layer between the encoder and decoder. In each training round, a predetermined proportion (e.g., 0.1–0.3) of neurons is randomly disabled from computation, enhancing the model's generalization ability to different monitoring conditions and reducing the risk of abnormal gradient amplification. The model construction process is treated as forward propagation, and the model training process consists of one complete data forward propagation, loss calculation, and backward gradient update as a training round, which is repeated. After each training round, the model's performance is evaluated using a validation set, and the corresponding validation loss value and prediction error metric changes are recorded. When the validation loss no longer decreases significantly in multiple training rounds, or the decrease in loss is below a preset threshold (e.g., less than 1%), the learning rate is automatically reduced for fine-tuning of parameters. When the number of training rounds reaches the preset maximum (e.g., 200 rounds), or the validation set error remains stable and no longer improves within several consecutive rounds, the model training process is considered converged, parameter updates are stopped, and the current model parameters are saved as the final multi-element collaborative prediction and early warning model for dam safety monitoring. To comprehensively evaluate the model's prediction performance, three indicators—mean absolute error (MAE), root mean square error (RMSE), and Nash efficiency coefficient (NSE)—are used to quantitatively evaluate the model's prediction performance. The mean absolute error measures the average deviation between the predicted result and the actual monitored value; the root mean square error reflects the overall dispersion of the prediction error and is more sensitive to larger deviations; the Nash efficiency coefficient assesses the model's ability to fit the predicted sequence to the changing trend of the actual monitored sequence, with a value ranging from negative infinity to 1. When this coefficient is close to 1, it indicates that the model has high predictive reliability for the temporal changes of dam safety monitoring elements.

[0016] Optionally, the data quality co-correction process in step S2 includes: Calculate the standard deviation of the monitoring data at each measuring point in the original data, identify the abnormal monitoring values ​​in the original data based on three times the standard deviation of the monitoring values ​​at each measuring point, and replace the abnormal monitoring values ​​with the average of the monitoring values ​​before and after the corresponding time. Missing values ​​in the original data were detected and replaced after anomaly detection values ​​were replaced, and the missing values ​​were filled using linear interpolation using the Lagrange linear interpolation method. The original data after linear interpolation filling is smoothed and denoised using the exponential moving average method. The same start and end time points are set to unify the time period range of the monitoring data, and the monitoring data within the unified time period range is normalized by the maximum and minimum values.

[0017] In this embodiment, real-time data of various automated safety monitoring facilities is stored in a monitoring database. Historical monitoring data for the dam's displacement, seepage, water level, temperature, and other safety monitoring elements over the past three years are retrieved from the database at 8:00 AM daily. This data serves as the raw data for safety monitoring and predictive analysis. Through 3 ( Outliers in the original data are identified using the standard deviation of the original data, and then replaced with the average value of the preceding and following time points to correct the outliers. Subsequently, Lagrange linear interpolation is used to fill in the missing values ​​of the monitoring data to ensure the continuity of the time series. The exponential moving average method is used to smooth and denoise the data, and then the same start and end time points are set to unify the time range of the input data. The maximum and minimum value normalization method is used to standardize the data to eliminate the influence of differences in data units or magnitudes.

[0018] Optionally, step S2, which converts the co-corrected monitoring data into standardized sequence samples, includes: According to the collection time order of each monitoring element in the monitoring data, the monitoring data that has been normalized is rearranged by time index, and the monitoring values ​​corresponding to the same measuring point at the same time are combined according to the preset element order to obtain multi-element monitoring data. Using multi-element monitoring data from continuous monitoring time series as a time series segment, and extracting each time series segment according to a preset sliding window length, a standardized sequence sample is obtained.

[0019] In this embodiment, the collection results of different monitoring elements are aligned to a unified time base based on the timestamp information carried in the data records. If multiple types of monitoring element data exist at the same monitoring point at a certain collection time, the collection time is used as the main index, and the monitoring values ​​such as displacement, seepage pressure, temperature, and water level are spliced ​​and combined according to a pre-set element arrangement order to form a data vector with fixed dimensions. The element arrangement order is determined according to the installation type of the sensors in the monitoring system and the safety analysis requirements. For example, structural response elements are arranged first, followed by environmental impact elements. When individual elements are missing at a certain time, they are supplemented by linear interpolation results from adjacent times to ensure that the combined vector dimension is consistent, thereby constructing monitoring data reflecting the state of multiple elements at a single time at the same monitoring point. The above-mentioned multi-element data is serialized and organized using a continuous monitoring time sequence as a time axis constraint. Specifically, the sliding window length is set to a fixed number of steps (e.g., 24, 48, or 72 consecutive sampling times), and it slides gradually along the time axis with a preset step size (e.g., 1 or 2 sampling times). At each sliding position, a multi-element data sequence of corresponding length is extracted as a complete time series segment. The time series segment is structurally represented as a two-dimensional matrix, where the row direction represents the time evolution sequence and the column direction represents the numerical changes of different monitoring elements.

[0020] Optionally, the methods for dividing the continuous monitoring time series include: The acquisition time difference between two adjacent monitoring records in the monitoring data is compared sequentially, and two adjacent monitoring records with an acquisition time difference not greater than the preset maximum allowable time interval are determined to be adjacent monitoring times. Calculate the magnitude of change of the corresponding monitoring elements in adjacent monitoring times. If the magnitude of change of each monitoring element does not exceed the preset fluctuation threshold, then the adjacent monitoring times are determined to belong to the same continuous monitoring time sequence. If the time difference between two adjacent monitoring records is greater than the maximum allowable time interval, or if the change in any monitoring element exceeds the fluctuation threshold, the current continuous monitoring time sequence will end, and the monitoring record that exceeds the limit will be used as the starting point for the new continuous monitoring time sequence, and the continuous monitoring time sequence will be re-divided.

[0021] In this embodiment, for monitoring data records at the same measuring point, the records are first sorted chronologically based on the timestamp information stored in the database. Then, the time difference between adjacent records is calculated and compared with a pre-set maximum allowable time interval. This maximum allowable time interval is determined based on the sampling frequency of the monitoring system; for example, under a 10-minute sampling period, the maximum allowable time interval is set to 15 minutes to accommodate slight communication delays. When the time difference between adjacent records does not exceed this threshold, the corresponding two records are marked as time-continuous. Further analysis is performed on the numerical changes of each monitoring element at adjacent monitoring times. Specifically, the absolute change or relative rate of change of monitoring elements such as displacement, seepage pressure, temperature, and water level between adjacent times is calculated, and the results are compared with the corresponding fluctuation thresholds. The fluctuation thresholds for each monitoring element are determined based on historical operational data statistics; for example, the displacement change threshold is set to 0.2 mm, the seepage pressure change threshold to 5 kPa, and the water level change threshold to 0.05 m. When the changes in all monitored elements within adjacent timeframes are within their respective threshold ranges, the adjacent monitoring timeframes are considered physically continuous, providing a basis for constructing stable time series. Corresponding monitoring records are continuously merged into the same continuous monitoring time series, and the start time and cumulative length of the series are recorded. If the time difference between adjacent monitoring records exceeds the maximum allowable time interval, or the change in any monitored element exceeds a preset fluctuation threshold, the current continuous monitoring time series is immediately terminated, and the monitoring record that exceeded the limit is used as the new sequence starting point to reinitialize the continuous monitoring time series. This method avoids forcibly splicing data with abnormal fluctuations, sampling interruptions, or sudden changes in operating conditions, thereby ensuring the reliability of the time series samples extracted by the subsequent sliding window in terms of temporal continuity and physical consistency.

[0022] Optionally, step S3, which involves truncating the standardized sequence sample into a source sequence and a target sequence, includes: The first m sequence points in the standardized sequence sample are truncated as the source sequence, and the last nm sequence points are truncated as the target sequence; where m is the preset length of the model input sequence, nm is the length of the model prediction sequence, and n is the total length of the standardized sequence sample.

[0023] In this embodiment, the first m sequence points and the last nm sequence points within the sliding window are used as the source sequence X (corresponding to a length of m) and the target sequence Y (corresponding to a length of nm) of the prediction model, respectively, thus obtaining a series of input-output sequence sample pairs. The preset model input sequence length m can be 30, meaning that monitoring data from 30 consecutive time steps are used as the source sequence X to characterize the changing trend of the dam monitoring elements over the past month. Figure 2 This is a schematic diagram illustrating the extraction of the source and target sequences in an embodiment of the present invention; as shown below. Figure 2 As shown, the first m sequence points and the last nm sequence points within the sliding window are used as the source sequence X (corresponding to a length of m) and the target sequence Y (corresponding to a length of nm) of the prediction model, respectively, thus obtaining a series of source sequences and target sequences.

[0024] Optionally, the method for constructing the multi-factor collaborative prediction and early warning model for dam safety monitoring in step S4 includes: Using the Transformer model as the backbone, and incorporating LSTM units and autocorrelation attention mechanisms, a safety monitoring, prediction, and early warning model is constructed, consisting of a temporal dependency extraction module, an encoder module, a spatiotemporal embedding module, a decoder module, and a fully connected module. The hyperparameters of the safety monitoring, prediction and early warning model are automatically calibrated based on Bayesian optimization theory, thereby constructing a multi-element collaborative prediction and early warning model for dam safety monitoring.

[0025] In this embodiment, the Transformer model with an encoder-decoder structure is used as the basic network skeleton. The temporal dependency extraction module and the spatiotemporal embedding module are used as pre-feature processing units, and are structurally connected with the encoder module, the decoder module, and the fully connected module at the output end to construct a deep learning model framework for multi-factor collaborative prediction and early warning of dam safety monitoring, namely, the safety monitoring prediction and early warning model. In the initial stage of the model, the weight matrix and bias vector of each layer of the network are initialized using random numbers in the interval [0,1]. The initial learning rate lr, batch size batch_size, number of LSTM layers num_lstm_layer, number of LSTM hidden units lstm_cells, number of attention heads num_heads, model dimension d_model, number of encoder layers num_enc_layers, and number of decoder layers num_dec_layers are set as key hyperparameters to be calibrated. Bayesian optimization theory is introduced to automatically calibrate the hyperparameters mentioned above: First, a reasonable search interval is set for each hyperparameter, and several initial parameter combinations are randomly selected in the parameter space to form an initial parameter point set; then, using the training set, the model under different parameter configurations is sequentially processed to extract time-dependent features, model autocorrelation attention, and calculate cross-correlation attention fusion, outputting the corresponding multi-factor prediction results, and using the root mean square error of prediction as the objective function value; based on the initial parameter point set, a probability distribution model of the objective function in the parameter space is constructed, and the performance improvement potential of different parameter combinations is evaluated accordingly. The optimal parameter points are iteratively selected to update the model configuration until the convergence condition is met or the preset number of iterations is reached. Finally, the parameter combination with the optimal prediction accuracy is output as the optimal hyperparameter configuration of the model, and loaded into each functional module under the constraints of the Transformer model skeleton, thereby completing the construction and finalization of the multi-factor collaborative prediction and early warning model for dam safety monitoring.

[0026] The multi-factor collaborative prediction and early warning model for dam safety monitoring includes the following modules: (1) Spatiotemporal embedding module, used to vectorize the target sequence in the training set to embed time and location information, and analyze the autocorrelation attention output of the target sequence based on the vectorized expression result of the target sequence; The function of the spatio-temporal embedding module is to vectorize the input sequence while embedding time and position information. The implementation process is to perform a high-dimensional linear transformation on the input sequence using a 1×1 convolutional kernel, increasing its feature dimension from the initial number of monitoring elements m to D dimensions (m < D, and D can be taken as 512). This step can enrich the feature expression ability of the input sequence. Then, sine and cosine wave signals are added to the transformed high-dimensional vector to inject position encoding information into the input sequence, thereby obtaining a high-dimensional vector expression containing time information and position information. When the prediction sequence is input into the decoder, the model can remember the forward and backward dependencies of the prediction sequence, making the prediction result have a certain time memory ability.

[0027] (2) The temporal dependence extraction module is used to extract the temporal dependence features of the source sequence in the training set, and perform LSTM temporal feature modeling based on the temporal dependence features to obtain a continuous time feature sequence; The temporal dependence extraction module controls the flow and preservation of information by introducing the cell state and three gating structures: the forget gate , the input gate and the output gate , to selectively retain and update long-term dependence information, avoid information loss in the processing of long sequence data, thereby extracting features from non-stationary time series data, and solving the problem of gradient disappearance or gradient explosion faced by traditional recurrent neural networks when processing long sequence data.

[0028] The calculation method of the forget gate is: ; The expression of the input gate is: ; ; ; The expression of the output gate is: ; ; In the above formula: represents the input vector at time step , in time series prediction, it is the observed feature vector at the current moment, represents the current candidate cell state, that is, the new information content generated by passing through the input gate and the non-linear function , used to determine the information to be added to the cell state The candidate information in the input. It consists of the current input. Hidden state from the previous moment Through linear transformation and The activation function is calculated as follows: The sigmoid activation function is used to compress cell weight values ​​to the range of 0 to 1. , , , Let represent the weight matrix of the forget gate, the weight matrix of the input gate, the weight matrix of the candidate cell state, and the weight matrix of the output gate, respectively. , , , These represent the forget gate bias, input gate bias, candidate cell state bias, and output gate bias, respectively, and tanh represents the tanh activation function. and These represent the outputs of the hidden layer neurons at the previous and current time steps, respectively. and These represent the cell state values ​​at the previous and current time steps, respectively. The forget gate determines which unnecessary information is lost in the previous cell state, the input gate determines how much new information is added to the cell state, and the output gate determines the output information based on the cell state.

[0029] (3) Encoder module, performs autocorrelation attention modeling on continuous time feature sequences and outputs LSTM autocorrelation features; The encoder module consists of an autocorrelation attention module and a feedforward neural network layer connected in series. The core function of autocorrelation attention is dynamic weight allocation and selective focusing. By calculating the autocorrelation coefficient of the input sequence, different weights are assigned to sequences at different time periods to form local dependencies. The main function of the feedforward neural network layer is to add nonlinear expression while performing high-dimensional linear transformation on the attention vector.

[0030] 1) The autocorrelation attention module first obtains the frequency components of the input sequences Y and J through Fourier transform (FFT). Then, it multiplies the frequency components of Y and J point by point. When the two sequences encounter the same frequency, a peak will appear (i.e., the periodic dependence feature of the original sequence is found). Then, the inverse Fourier transform is used to obtain all possible periods of the input sequence itself (let's assume it's...). Then, the top k frequency periods are taken as the latent periods of the input sequence (assuming they are 1, 2, 3, 4). Then, the latent period is used to slide a window through the input sequence to obtain the corresponding... The similarity between the sliding sequence and the original sequence is calculated using the autocorrelation function. Then, the similarity is transformed into a probability distribution using the softmax function to obtain attention weight scores corresponding to different potential cycles. Finally, the attention weight scores are used to perform a weighted summation of the top k sliding sequences and the original input sequence to obtain a fusion sequence that focuses on key information.

[0031] 2) The feedforward neural network layer mainly consists of a linear transformation layer, an activation layer, and a dropout layer connected in series. The first linear transformation layer increases the dimensionality of the autocorrelation attention output (e.g., to 2048 dimensions), enriching the feature representation capability of the input sequence. Then, the ReLU activation function adds non-linear expression to the dimensionality-enhanced result, improving the neural network's ability to fit complex functions. The dropout mechanism selectively ignores some neurons, enhancing the model's generalization ability. Next, layer normalization and residual network structures are used to optimize the gradient flow information. Finally, dimensionality reduction transformation restores the output dimension to the dimension before the input to the feedforward neural network, maintaining the dimensionality information of the vector. The feedforward neural network layer also includes a one-dimensional temporal convolutional structure, which performs local dependency modeling on the sequence features along the time dimension. The temporal convolution uses a kernel size of 3 or 5 and a stride of 1, and padding is used to maintain the sequence length, allowing the features at each time step to fuse with the contextual information of several adjacent time steps, thereby capturing short-term temporal change trends and local dynamic features.

[0032] (4) Decoder module, used to perform cross-correlation attention modeling based on the autocorrelation attention output of the target sequence and the autocorrelation features of LSTM; The decoder module consists of an autocorrelation attention layer, a residual network layer, a cross-correlation attention layer, a residual network layer, a feedforward neural network, and a series of residual network layers. First, the sequence after spatiotemporal embedding is input into the autocorrelation attention module to capture the autocorrelation features within the sequence. Then, gradient flow optimization is performed through the residual network to mitigate the risk of gradient vanishing / exploding. Next, the output optimized by the residual network is used as the Q-vector (query vector), while the encoder output is used as the K-vector (index vector) and V-vector (reference vector). K and V can be the same, and both are input into the cross-correlation attention module for cross-correlation feature extraction, resulting in the attention vector. Gradient flow optimization is then performed again through the residual network, followed by high-dimensional linear transformation and the addition of nonlinear feature representation through the feedforward neural network layer. Finally, the cross-correlation feature fusion result is obtained through residual network optimization.

[0033] 1) The autocorrelation attention layer has the same structure as the feedforward neural network layer of the encoder. Its main function is to add non-linear expressive power to the attention output.

[0034] 2) Residual Network Layer. This module optimizes the gradient flow, mitigating the vanishing or exploding gradient problems caused by the chain rule when updating weight parameters using gradient flow during the backpropagation phase of deep neural networks during learning and training. First, variance normalization is applied to the matrix vector in each dimension, and then the result is summed with the input matrix vector to obtain the current network output.

[0035] 3) Cross-correlation attention layer. Similar to the autocorrelation attention mechanism of the encoder, its main function is to obtain the contextual association between different sequences. The main difference is that the inputs Q (query vector), K (index vector), and V (reference vector) of the autocorrelation attention layer are all the same matrix vector (high-dimensional temporal vector), while the input Q (query vector) of the cross-correlation attention layer comes from the output of the autocorrelation attention module of the encoder, and K (index vector) and V (reference vector) come from the output of the autocorrelation attention module of the decoder.

[0036] 4) Feedforward Neural Network Layer. With the same structure as the encoder's feedforward neural network layer, its main function is to add non-linear expressive power to the attention output.

[0037] (5) Fully connected module, used to map the cross-correlation attention modeling results to the number of target features corresponding to the number of monitored elements.

[0038] The main function of the fully connected module is to globally integrate all local features of the previous layer, and realize the mapping transformation of the high-dimensional feature space through linear weighting and nonlinear activation, extract higher-level abstract features or map the learned features to the target space. This process realizes the mapping from the input space to the feature space, thereby completing the collaborative prediction and output of multiple elements of safety monitoring.

[0039] Optionally, step S4 involves training a pre-built multi-factor collaborative prediction and early warning model for dam safety monitoring using the training set, including: The source sequences in the training set are input into the time-series dependency extraction module, and LSTM units are used to model the time-series features and extract the time-series dependency features of the source sequences. The temporal dependency features of the source sequence are used as the input sequence of the encoder module. After autocorrelation attention calculation and feedforward network transmission, the autocorrelation temporal features of the fused sequence are obtained. The target sequence in the training set is input to the spatiotemporal embedding module and vectorized to embed time and location information. This vectorized representation is then used as input to the decoder module. The decoder module then performs autocorrelation attention calculation and feedforward network propagation on the vectorized representation of the target sequence to obtain the autocorrelation attention output of the target sequence. The autocorrelation attention output of the target sequence is used as the query vector of the monitoring element to be predicted. The autocorrelation time series features of the fused sequence are used as the monitoring element time series association index vector of each historical moment in the original data and the multi-element response reference vector corresponding to each historical moment. They are jointly input into the cross-correlation attention layer of the decoder module to perform cross-correlation attention calculation, so as to fuse the time series dependency features and the global association features between the sequences. The output of the decoder module is mapped to the number of target features corresponding to the number of monitored elements through a fully connected module, thereby completing the training of the multi-element collaborative prediction and early warning model for dam safety monitoring.

[0040] In this embodiment, for the target sequence in the training set, the monitoring elements (such as displacement, seepage pressure, water level, and temperature) at each time point are mapped to a high-dimensional vector (dimension D=512) through a 1×1 convolutional layer. Simultaneously, the timestamp and measurement point location information are encoded as sine-cosine vectors and added to the high-dimensional vector, resulting in a high-dimensional time-series vector representation with spatiotemporal information. This high-dimensional time-series vector is then transformed into three high-dimensional time-series vectors, Q, K, and V, through three linear projection transformations. Q and K are then input into the autocorrelation layer of the decoder module. Frequency components are extracted using discrete Fourier transform, and then multiplied point-by-point to obtain the frequency amplitude spectrum. Next, the autocorrelation coefficients for each time period are calculated using inverse Fourier transform. Based on the autocorrelation coefficients, the top k potential periods are selected. The autocorrelation coefficients are normalized using the Softmax function, and the top k are used as weight coefficients (k can be 5). The corresponding sliding sequence is then weighted and summed with the high-dimensional time-series vector sequence to obtain the autocorrelation features of key time-dependent factors in the focused sequence. The "Top k" refers to the k time periods with the highest autocorrelation strength (correlation coefficient) among all candidate time periods. The source sequence X from the training set is input into a bidirectional LSTM network, with 128 hidden units and a time step length equal to the source sequence length m. LSTM utilizes a forget gate, an input gate, and an output gate (f... t i t O t This method controls information flow, preserves long-term dependent features, and mitigates the gradient vanishing problem. The continuous-time feature sequence output by the LSTM is processed by batch normalization, dropout (0.2), and residual connections to provide stable and smooth sequence features. The continuous-time feature sequence output by the LSTM is input into the encoder module. The frequency components of each feature are calculated using FFT and multiplied point-by-point to obtain the latent period. The algorithm employs a sliding window approach to extract the corresponding sliding sequence. The autocorrelation coefficient between the sliding sequence and the original sequence is calculated and normalized using softmax to generate attention weights. The sliding sequence is then weighted and summed using these weights, followed by a high-dimensional linear transformation to increase the dimensionality to 2048, ReLU activation, dropout, and layer normalization to output the encoder's autocorrelation attention features. The encoder's autocorrelation attention output is used as the temporal correlation index vector of the monitored elements and the multi-element response reference vector. The decoder's autocorrelation attention output is used as the query vector of the monitored elements to be predicted, and input into the decoder's cross-correlation attention layer to calculate the contextual correlation features between sequences. For the target sequence and source sequence features within the window, the difference in slope, amplitude ratio, and temporal offset are calculated, weighted, and transformed into contextual correlation strength, generating weighted fusion coefficients. These coefficients are then weighted and summed. The resulting cross-correlation feature matrix, after nonlinear mapping and dimensionality reduction, captures global dependencies and local changes between sequences. The cross-correlation feature matrix output from the decoder module is input into the fully connected layer module, linearly mapped to the target space dimension (length equal to the number of monitored elements, such as 5 types of safety monitoring elements), and enhanced with ReLU activation to improve the nonlinear expression. The weight matrix W and bias b are updated through training to map high-dimensional features to the target space, enabling collaborative prediction of multiple safety monitoring elements. The output vector represents the predicted values ​​of each monitoring element at future time steps, which can be used for safety threshold comparison and early warning. After model training is complete, the model is saved for real-time monitoring data prediction.

[0041] It is worth noting that the Transformer model skeleton refers to the basic network structure framework used to organize and constrain the collaborative operation of various functional modules of the multi-element collaborative prediction and early warning model for dam safety monitoring. It is centered on an encoder-decoder structure, with temporal dependency extraction and spatiotemporal embedding modules as pre-processing units, structurally connected to the encoder and decoder modules. A fully connected module is configured at the decoder output to complete feature mapping. This model skeleton specifies the data flow, hierarchical connection relationships, and feature interaction methods between modules, without limiting specific parameter values. The optimal network structure parameters obtained from parameter calibration, along with the training parameters, are loaded into the corresponding modules under the constraints of this skeleton, thereby constructing a complete multi-element collaborative prediction and early warning model for dam safety monitoring.

[0042] Optionally, methods for obtaining the autocorrelation attention output of the target sequence include: The vectorized representation of the target sequence is embedded with temporal and positional encoding information and input into the autocorrelation attention layer in the decoder module for autocorrelation attention modeling to capture the autocorrelation features within the vectorized representation. Gradient flow optimization and feature enhancement are performed on the autocorrelation features within the vectorized representation to obtain the autocorrelation attention output of the target sequence.

[0043] In this embodiment, the target sequences in the training set are input into a 1×1 convolutional structure of the spatiotemporal embedding module in chronological order. A linear projection transformation is performed on each monitoring element, uniformly mapping the features of the monitoring elements at each time step to a 512-dimensional feature space. Simultaneously, the acquisition time and station location information corresponding to the sequence are encoded and embedded using a sine and cosine method to form a time-encoded vector and a location-encoded vector. The projection features, time codes, and location codes are added point-by-point to form a high-dimensional temporal vector representation of the target sequence containing temporal and spatial constraints. This high-dimensional temporal vector representation is used as the input feature of the autocorrelation attention layer of the decoder, and the temporal relationship of the target sequence is modeled within this layer using a sequence dependency modeling structure. Residual connections and layer normalization are performed on the sequence modeling output, and a random deactivation ratio of 0.2 is introduced to enhance feature stability. Subsequently, the feature dimension is expanded to 1024 dimensions through a feedforward neural network layer, and nonlinear activation is applied to obtain a temporal autocorrelation attention representation for characterizing the target sequence.

[0044] Optionally, methods for obtaining the autocorrelation time-series features of the fused sequence include: The input sequence of the encoder module is transformed by three different linear projections to generate a continuous-time high-dimensional time vector; The discrete Fourier transform is performed on the high-dimensional time series vector of continuous time, and the frequency components obtained after the Fourier transform of each time series are multiplied point by point to obtain the frequency amplitude spectrum of the input sequence. Before selecting the peak frequency in the frequency amplitude spectrum The time period is the potential period, and the autocorrelation coefficient of the input sequence is obtained by performing a discrete inverse Fourier transform; where The preset filtering threshold; By sliding a window through a high-dimensional time-series vector using each potential period, the sliding sequence corresponding to each potential period is obtained in turn. The similarity between each sliding sequence and the high-dimensional time-series vector is calculated to convert the similarity into a probability distribution, thereby obtaining the attention weight score corresponding to each potential period. The fused sequence is obtained by weighting and summing the sliding sequence and the high-dimensional time vector using attention weight scores. The fused sequence is updimensionalized, a nonlinear expression is added to the updimensionalization result, and gradient flow optimization and dimensionality reduction transformation are performed to obtain the autocorrelation time series characteristics of the fused sequence.

[0045] In this embodiment, the continuous time feature sequence output by the input encoder module (or decoder module) is arranged according to time steps. and monitoring element dimensions Constructing a matrix Then, a high-dimensional time series vector is generated through three high-dimensional linear projection transformations. , and High-dimensional time-series vectors are processed through an autocorrelation attention module. and The frequency components are obtained by performing a Fast Discrete Fourier Transform (FFT). The frequency components of each time period sequence are multiplied point-by-point to obtain the frequency amplitude spectrum, which is used to identify the periodicity of the sequence. The frequency amplitude values ​​are then selected from the frequency amplitude spectrum. The selected peak frequencies are used as candidate periods to ensure the capture of the main periodic signals while reducing the impact of noise. An inverse discrete Fourier transform is performed on the selected peak frequencies to obtain the corresponding time periods. ,in Set a preset potential periodicity threshold (e.g., 10% of the sequence length). For each potential period... As the sliding window length, in high-dimensional time-series vectors Extract the sliding sequence sequentially, and the window step size can be set to... This ensures the preservation of local features of the covered sequence while maintaining the integrity of periodic information. For each sliding sequence, a high-dimensional time vector is used. Cosine similarity is calculated, and after normalization, it is transformed into a probability distribution using a softmax function to generate attention weight scores for each latent period. This probability distribution quantifies the contribution of different latent periods to the overall sequence dependence, ensuring that periodic features are effectively captured in subsequent feature fusion. The sliding sequence is weighted and summed using attention weights to obtain the fused sequence, which is then upscaled to 2048 dimensions (linear layer) using a feedforward neural network. ReLU activation is used to add non-linear expression, and a dropout rate of 0.2 is set to prevent overfitting. Finally, residual connections and layer normalization are used to optimize the gradient flow, and the sequence is then downscaled back to the original feature dimensions. This yields an output sequence with fused self-attention features of the same dimension as the input sequence, which is used for cross-correlation attention modeling in the decoder.

[0046] Optionally, fusing temporal dependency features with global association features between sequences includes: A nonlinear expression is added to the autocorrelation attention output of the target sequence, and gradient flow optimization and dimensionality reduction transformation are performed to output the autocorrelation time-series features of the target sequence. The autocorrelation time series features of the target sequence are used as the query vector of the monitoring elements of the dam body to be predicted, and the autocorrelation time series features of the fused sequence are used as the time series association index vector of the monitoring elements at each historical moment in the original data and the multi-element response reference vector corresponding to each historical moment. They are jointly input into the autocorrelation attention layer to perform cross-correlation attention calculation on the two different types of autocorrelation time series features. Add a nonlinear representation to the cross-correlation attention calculation results and perform gradient flow optimization and dimensionality reduction transformation.

[0047] In this embodiment, the target sequence attention output from the autocorrelation attention layer of the decoder module is used as input. First, a high-dimensional vector is generated through a linear projection transformation layer, mapping the feature dimension from D to 2D (e.g., from 512 dimensions to 1024 dimensions), and a ReLU activation function is introduced to enhance nonlinear expressive power. Subsequently, residual connections and layer normalization structures are used to superimpose and normalize the features before and after the transformation, where the normalization dimension is consistent with the time step to stabilize the gradient flow during backpropagation. Finally, a linear dimensionality reduction transformation layer restores the feature dimension to D dimensions, obtaining the target sequence autocorrelation features of the decoder. Then, the target sequence autocorrelation attention features of the decoder module are used as the query vector of the monitoring elements to be predicted for the dam body, and the autocorrelation attention features of the encoder module are used as the temporal correlation index vector of the monitoring elements and the multi-element response reference vector. These are input into the autocorrelation attention layer for calculation, obtaining the cross-correlation attention result between the encoder output sequence and the decoder output sequence. The obtained cross-correlation attention results are input into the feedforward neural network layer. First, the feature dimension is increased to an intermediate dimension (e.g., 1024 dimensions) through a linear transformation layer, and a non-linear expression is introduced through the ReLU activation function. Then, a dropout layer with a dropout rate of 0.2 is set to suppress overfitting. On this basis, residual connections and layer normalization are introduced to optimize the gradient flow of the cross-correlation features. Finally, the original feature dimension is restored through a linear dimensionality reduction transformation.

[0048] It is worth noting that when entering the dam monitoring element prediction stage, the general setting of treating query vectors, key vectors and numerical vectors as common features in the existing technology is no longer adopted. Instead, based on the functional division of labor among "target to be predicted - historical correlation - multi-element response reference" in the dam safety monitoring scenario, the physical meaning of the three types of vectors is functionally distinguished and set. Specifically, the autocorrelation feature of the target sequence output by the decoder is set as the query vector for the monitoring elements of the dam body to be predicted. This is because the feature directly corresponds to the core safety indicators such as dam displacement, seepage pressure, or strain at the current prediction time. Its essence reflects the retrieval needs of historical information for the current state to be determined. If this feature is used as the query vector, the historical working condition segments most relevant to the current structural state can be actively retrieved during the attention calculation process. At the same time, the autocorrelation time series feature output by the encoder is set as the time series association index vector for monitoring elements. This is because the feature has been modeled by autocorrelation and has depicted the periodicity and lag relationship between each historical moment. Using it as an index vector can provide a stable time association index in the matching stage, thereby avoiding the defect of relying only on instantaneous feature similarity and ignoring the long-term slow-changing characteristics of the dam body in the existing technology. Furthermore, the response feature obtained by multi-element fusion in the output of the same encoder is set as the multi-element response reference vector. This is because the feature simultaneously contains multi-source observations such as water level, temperature, seepage, and structural response. Using it as a reference vector can output a comprehensive response result with physical meaning in the weighting stage, thereby ensuring that the prediction result not only has time correlation, but also conforms to the coupling mechanism of stress and seepage in the dam structure. Compared with the existing general sequence prediction methods that simply obtain Q, K, and V by linear mapping of the same feature, this embodiment introduces a functional separation mechanism of "prediction target orientation - temporal correlation index - multi-element physical reference" to the three types of vectors at the attention input level. This makes the attention weights simultaneously constrained by the current safety risk status, historical evolution law, and multi-source operating conditions. In this way, it effectively suppresses the impact of water level changes, sensor noise, and long-term drift on prediction stability in the dam safety monitoring scenario, improves the ability to perceive abnormal evolution trends in advance, and demonstrates a targeted improvement for engineering safety monitoring scenarios.

[0049] Of particular importance, obtaining cross-correlated attention includes: The autocorrelation attention output of the decoder is transformed by linear projection to generate a continuous-time high-dimensional time vector Q1. The autocorrelation attention output of the encoder is transformed by linear projection to generate continuous-time high-dimensional time vectors K1 and V1. Then, discrete Fourier transform is performed on Q1 and K1, and the frequency components obtained after the Fourier transform of each time series are multiplied point by point to obtain the frequency amplitude spectrum of the input sequence. Before selecting the peak frequency in the frequency amplitude spectrum The time period is the potential period, and the autocorrelation coefficient of the input sequence is obtained by performing a discrete inverse Fourier transform; where The preset filtering threshold; By sliding a window through the high-dimensional time-series vector V1 using each potential period, the sliding sequence corresponding to the potential period is obtained in turn. The similarity between each sliding sequence and the high-dimensional time-series vector V1 is calculated to convert the similarity into a probability distribution, thereby obtaining the attention weight score corresponding to each potential period. The sliding sequence and the high-dimensional time vector sequence V1 are weighted and summed using attention weight scores to obtain the fused sequence. The fused sequence is updimensionalized, a nonlinear expression is added to the updimensionalization result, and gradient flow optimization and dimensionality reduction transformation are performed to output cross-correlation attention features.

[0050] In this embodiment, the autocorrelation attention output of the decoder is transformed into a continuous-time high-dimensional time-series vector Q1 through linear projection transformation. The autocorrelation attention output of the encoder is also transformed into continuous-time high-dimensional time-series vectors K1 and V1 through linear projection transformation. Then, discrete Fourier transforms are performed on Q1 and K1, and the frequency components obtained from the Fourier transforms of each time series are multiplied point-by-point to obtain the frequency amplitude spectrum of the input sequence. The peak frequency is then selected from the frequency amplitude spectrum. The time period is the potential period, and the autocorrelation coefficient of the input sequence is obtained by performing a discrete inverse Fourier transform; where A preset screening threshold (e.g., 10% of the sequence length) is used. A window is slidable through the high-dimensional temporal vector V1 using each latent period to obtain the sliding sequence corresponding to each latent period. The similarity between each sliding sequence and the high-dimensional temporal vector V1 is calculated to convert the similarity into a probability distribution, thus obtaining the attention weight score corresponding to each latent period. The attention weight scores are then used to perform a weighted summation of the sliding sequence and the high-dimensional temporal vector sequence V to obtain a fused sequence. The fused sequence is then up-dimensioned, a nonlinear expression is added to the up-dimension result, and gradient flow optimization and dimensionality reduction transformation are performed. After weighted and constrained integration, a cross-correlation attention result that simultaneously reflects the temporal consistency and contextual relevance of two types of autocorrelation features is obtained, which is used in the subsequent fully connected process.

[0051] Optionally, automatic calibration includes: The parameters to be calibrated are determined based on the network structure parameters and training parameters in the temporal dependency extraction module, encoder module, spatiotemporal embedding module, decoder module, and fully connected module. Set up the parameter search space corresponding to each parameter to be calibrated, and randomly select a number of parameter combinations from the parameter search space as the initial parameter point set; Using the training set as input, the safety monitoring prediction and early warning model is executed using the model configuration corresponding to the initial parameter point set to obtain the corresponding prediction results. The prediction accuracy index is then calculated as the objective function value based on the prediction results. The statistical characteristics of the objective function value are calculated based on the initial parameter point set, and a probability distribution model of the objective function value in the parameter search space is constructed based on the statistical characteristics to calculate the predicted mean and predicted covariance of each parameter combination in the parameter search space. Using the predicted mean and predicted covariance as inputs, the performance improvement potential of each parameter combination in the parameter search space is evaluated, the parameter combination with the greatest performance improvement potential is selected as the calibration parameter point, and the calibration parameter point is added to the parameter point set. The safety monitoring, prediction and early warning model is recalculated for the model configuration corresponding to the calibration parameter points to obtain new objective function values, thereby updating the parameter point set, optimal accuracy index and corresponding optimal parameter solution; The process of iteratively evaluating and updating the performance improvement potential continues until the preset number of evaluations is reached or the convergence condition is met, thereby outputting the optimal model parameter configuration as the automatic calibration result.

[0052] In this embodiment, the key parameters involved in temporal feature extraction and attention modeling of the multi-element collaborative prediction and early warning model for dam safety monitoring are sorted out to form a unified set of parameters to be calibrated. The network structure parameters include the LSTM hidden state dimension (e.g., 32-128), the number of potential periods K in autocorrelation attention (e.g., 10-50), the feature fusion weight mapping dimension in cross-correlation attention (e.g., 256 or 512), and the output dimension of the fully connected mapping layer; the training parameters include the learning rate (e.g., 1e-4-1e-2), the weight decay coefficient (e.g., 1e-5-1e-3), and the dropout ratio (e.g., 0.1-0.3). The above parameters together constitute the object space for subsequent calibration. For each parameter to be calibrated, a continuous or discrete search interval is defined, and a unified parameter encoding method is used to construct the parameter search space. For example, the network structure parameters and training parameters are concatenated into a parameter vector of fixed length. Within this search space, a random uniform sampling strategy is used to select several sets of parameter combinations. The initial parameter point set can be set to 20-30 sets, and each set of parameters corresponds to a complete model configuration for subsequent prediction performance evaluation, so as to avoid bias of the calibration results by a single initial setting. The monitoring sequence of the training set is input into the model configured by the initial parameter point set, and LSTM time-series feature extraction, autocorrelation attention calculation, and cross-correlation attention fusion are completed in sequence, and the corresponding multi-factor prediction results are output. Then, the prediction results are compared with the real monitoring values ​​in the training set, and the mean square error or root mean square error is calculated as the prediction accuracy index. This index is used as the objective function value and associated with the corresponding parameter points one by one to form the basic sample set of "parameter combination - prediction accuracy". Based on the objective function values ​​corresponding to each parameter combination in the initial parameter point set, the mean, variance, and covariance information among the parameters are calculated. A multivariate Gaussian distribution is used to model the distribution characteristics of the objective function within the parameter search space. This probability distribution model takes the parameter vector as input and outputs the expected value of the corresponding prediction accuracy and a measure of uncertainty, thus providing a statistical basis for subsequent parameter performance improvement evaluation. The predicted mean and prediction covariance output by the probability distribution model are used as evaluation criteria, and a performance improvement potential index is introduced to screen unevaluated parameter combinations within the parameter search space. This index comprehensively considers the expected prediction accuracy and the magnitude of uncertainty, prioritizing parameter combinations near the current optimal accuracy with significant improvement potential as new calibration parameter points, which are then added to the existing parameter point set to gradually approach the optimal solution region.The model configuration is rebuilt for the newly added calibration parameter points, and the complete cross-correlation attention modeling and prediction calculation process is performed using the training set to obtain a new objective function value. Then, the parameter point set and the current best prediction accuracy are updated, and the probability distribution model is corrected accordingly. The above evaluation and update process is executed cyclically, and the number of evaluations can be set to 50 to 100 times, or the iteration is terminated when the improvement of the best accuracy is less than a preset threshold (such as 1%) in several consecutive iterations. Finally, the parameter combination corresponding to the best accuracy is output as the automatic calibration result.

[0053] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.

[0054] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A multi-factor collaborative prediction and early warning method for dam safety monitoring based on deep learning, characterized in that, Includes the following steps: Step S1: Collect monitoring data of the dam synchronously through automated safety monitoring facilities, and use historical monitoring data of no less than three years as the original data; Step S2: Perform data quality co-correction on the original data, and use the sliding window technique to transform the co-corrected original data into standardized sequence samples; Step S3: According to the preset truncation length, the standardized sequence samples are truncated into source sequences and target sequences to build a model sample library, and the sequences in the model sample library are divided into training set and validation set; Step S4: Train the pre-built multi-element collaborative prediction and early warning model for dam safety monitoring using the training set, evaluate the accuracy of the trained multi-element collaborative prediction and early warning model for dam safety monitoring using the validation set, and optimize the multi-element collaborative prediction and early warning model for dam safety monitoring by configuring the optimal model parameters obtained through automatic calibration. Step S5: Obtain real-time monitoring data from each measuring point, and use the optimized multi-element collaborative prediction and early warning model for dam safety monitoring to perform multi-element prediction for safety monitoring; The prediction results of each measuring point are compared with the preset safety monitoring threshold indicators to execute prompt warnings.

2. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 1, characterized in that, The data quality co-correction process in step S2 includes: Calculate the standard deviation of the monitoring data at each measuring point in the original data, identify the abnormal monitoring values ​​in the original data based on three times the standard deviation of the monitoring values ​​at each measuring point, and replace the abnormal monitoring values ​​with the average of the monitoring values ​​before and after the corresponding time. Missing values ​​in the original data were detected and replaced after anomaly detection values ​​were replaced, and the missing values ​​were filled using linear interpolation using the Lagrange linear interpolation method. The original data after linear interpolation filling is smoothed and denoised using the exponential moving average method. The same start and end time points are set to unify the time period range of the monitoring data, and the monitoring data within the unified time period range is normalized by the maximum and minimum values.

3. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 1, characterized in that, Step S2, which converts the co-calibrated monitoring data into standardized sequence samples, includes: According to the collection time order of each monitoring element in the monitoring data, the monitoring data that has been normalized is rearranged by time index, and the monitoring values ​​corresponding to the same measuring point at the same time are combined according to the preset element order to obtain multi-element monitoring data. Using multi-element monitoring data from continuous monitoring time series as a time series segment, and extracting each time series segment according to a preset sliding window length, a standardized sequence sample is obtained.

4. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 1, characterized in that, Step S3, which involves truncating the standardized sequence sample into source and target sequences, includes: The first m sequence points in the standardized sequence sample are truncated as the source sequence, and the last nm sequence points are truncated as the target sequence; where m is the preset length of the model input sequence, nm is the length of the model prediction sequence, and n is the total length of the standardized sequence sample.

5. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 1, characterized in that, The method for constructing the multi-factor collaborative prediction and early warning model for dam safety monitoring in step S4 includes: Using the Transformer model as the backbone, and incorporating LSTM units and autocorrelation attention mechanisms, a safety monitoring, prediction, and early warning model is constructed, consisting of a temporal dependency extraction module, an encoder module, a spatiotemporal embedding module, a decoder module, and a fully connected module. The hyperparameters of the safety monitoring, prediction and early warning model are automatically calibrated based on Bayesian optimization theory, thereby constructing a multi-element collaborative prediction and early warning model for dam safety monitoring.

6. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 1, characterized in that, Step S4 involves training a pre-built multi-factor collaborative prediction and early warning model for dam safety monitoring using the training set, including: The source sequences in the training set are input into the time-series dependency extraction module, and LSTM units are used to model the time-series features and extract the time-series dependency features of the source sequences. The temporal dependency features of the source sequence are used as the input sequence of the encoder module. After autocorrelation attention calculation and feedforward network transmission, the autocorrelation temporal features of the fused sequence are obtained. The target sequence in the training set is input to the spatiotemporal embedding module and vectorized to embed time and location information. This vectorized representation is then used as input to the decoder module. The decoder module then performs autocorrelation attention calculation and feedforward network propagation on the vectorized representation of the target sequence to obtain the autocorrelation attention output of the target sequence. The autocorrelation attention output of the target sequence is used as the query vector of the monitoring element to be predicted. The autocorrelation time series features of the fused sequence are used as the monitoring element time series association index vector of each historical moment in the original data and the multi-element response reference vector corresponding to each historical moment. They are jointly input into the cross-correlation attention layer of the decoder module to perform cross-correlation attention calculation, so as to fuse the time series dependency features and the global association features between the sequences. The output of the decoder module is mapped to the number of target features corresponding to the number of monitored elements through a fully connected module, thereby completing the training of the multi-element collaborative prediction and early warning model for dam safety monitoring.

7. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 6, characterized in that, Methods for obtaining the autocorrelation attention output of the target sequence include: The vectorized representation of the target sequence is embedded with temporal and positional encoding information and input into the autocorrelation attention layer in the decoder module for autocorrelation attention modeling to capture the autocorrelation features within the vectorized representation. Gradient flow optimization and feature enhancement are performed on the autocorrelation features within the vectorized representation to obtain the autocorrelation attention output of the target sequence.

8. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 6, characterized in that, Methods for obtaining the autocorrelation time-series features of fused sequences include: The input sequence of the encoder module is transformed by three different linear projections to generate a continuous-time high-dimensional time vector; The discrete Fourier transform is performed on the high-dimensional time series vector of continuous time, and the frequency components obtained after the Fourier transform of each time series are multiplied point by point to obtain the frequency amplitude spectrum of the input sequence. Before selecting the peak frequency in the frequency amplitude spectrum The time period is the potential period, and the autocorrelation coefficient of the input sequence is obtained by performing a discrete inverse Fourier transform; where The preset filtering threshold; By sliding a window through a high-dimensional time-series vector using each potential period, the sliding sequence corresponding to each potential period is obtained in turn. The similarity between each sliding sequence and the high-dimensional time-series vector is calculated to convert the similarity into a probability distribution, thereby obtaining the attention weight score corresponding to each potential period. The fused sequence is obtained by weighting and summing the sliding sequence and the high-dimensional time vector using attention weight scores. The fused sequence is updimensionalized, a nonlinear expression is added to the updimensionalization result, and gradient flow optimization and dimensionality reduction transformation are performed to obtain the autocorrelation time series characteristics of the fused sequence.

9. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning as described in claim 7, characterized in that, The fusion of temporal dependency features and global association features between sequences includes: A nonlinear expression is added to the autocorrelation attention output of the target sequence, and gradient flow optimization and dimensionality reduction transformation are performed to output the autocorrelation time-series features of the target sequence. The autocorrelation time series features of the target sequence are used as the query vector of the monitoring elements of the dam body to be predicted, and the autocorrelation time series features of the fused sequence are used as the time series association index vector of the monitoring elements at each historical moment in the original data and the multi-element response reference vector corresponding to each historical moment. They are jointly input into the autocorrelation attention layer to perform cross-correlation attention calculation on the two different types of autocorrelation time series features. Add a nonlinear representation to the cross-correlation attention calculation results and perform gradient flow optimization and dimensionality reduction transformation.

10. The method for multi-factor collaborative prediction and early warning of dam safety monitoring based on deep learning according to claim 5, characterized in that, Automatic calibration includes: The parameters to be calibrated are determined based on the network structure parameters and training parameters in the temporal dependency extraction module, encoder module, spatiotemporal embedding module, decoder module, and fully connected module. Set up the parameter search space corresponding to each parameter to be calibrated, and randomly select a number of parameter combinations from the parameter search space as the initial parameter point set; Using the training set as input, the safety monitoring prediction and early warning model is executed using the model configuration corresponding to the initial parameter point set to obtain the corresponding prediction results. The prediction accuracy index is then calculated as the objective function value based on the prediction results. The statistical characteristics of the objective function value are calculated based on the initial parameter point set, and a probability distribution model of the objective function value in the parameter search space is constructed based on the statistical characteristics to calculate the predicted mean and predicted covariance of each parameter combination in the parameter search space. Using the predicted mean and predicted covariance as inputs, the performance improvement potential of each parameter combination in the parameter search space is evaluated, the parameter combination with the greatest performance improvement potential is selected as the calibration parameter point, and the calibration parameter point is added to the parameter point set. The safety monitoring, prediction and early warning model is recalculated for the model configuration corresponding to the calibration parameter points to obtain new objective function values, thereby updating the parameter point set, optimal accuracy index and corresponding optimal parameter solution; The process of iteratively evaluating and updating the performance improvement potential continues until the preset number of evaluations is reached or the convergence condition is met, thereby outputting the optimal model parameter configuration as the automatic calibration result.

Citation Information

Patent Citations

  • Mutual information multi-source data fusion-based sluice safety state evaluation method

    CN115796015A

  • Dam deformation deep learning prediction method fusing hysteretic HST and interpretable hybrid convolution attention mechanism

    CN120951746A

  • Systems, methods, devices, and platforms for industrial internet of things

    EP4652552A1

Cited By

  • Millikan oil drop experiment control method and system based on multi-voltage sampling

    CN122131637A