A deep learning-based multi-element collaborative prediction and early warning method for dam safety monitoring
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. It realizes multi-element collaborative prediction and early warning, improves prediction accuracy and reliability, and is applicable to large-scale water conservancy projects with complex working conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG RES INST OF WATER RESOURCES & HYDROPOWER
- Filing Date
- 2026-01-29
- Publication Date
- 2026-04-10
AI Technical Summary
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.
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 measurement points and multiple monitoring elements is achieved, thereby improving the ability to integrate correlations between the sequence and the external environment.
While ensuring modeling efficiency, it significantly improves the ability to characterize the long-term evolution trend of non-stationary monitoring sequences, enhances prediction accuracy and early warning reliability, and is suitable for large-scale dam engineering scenarios with dense monitoring points and complex operating conditions.
Smart Images

Figure CN121594974B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the fields of artificial intelligence and hydraulic engineering, and particularly relates to a dam safety monitoring multi-element collaborative prediction and early warning method based on deep learning. BACKGROUND
[0002] Traditional dam safety prediction and early warning analysis models generally construct single-station prediction and early warning models with measuring points as units, and the prediction methods are mainly based on statistical methods or machine learning models. More classical ones are moving average model (MA), autoregressive model (AR), autoregressive moving average model (ARMA), etc. These models make full use of the autocorrelation characteristics of monitoring data, and are suitable for short-term prediction of stationary sequences, but are difficult to meet the medium and long-term prediction needs of non-stationary sequences. Although machine learning models represented by support vector machine (SVM), random forest (RF) and back propagation neural network (BP) can adapt to non-stationary time series, they can only be modeled at a single station due to the limitation of model output, and the model input features are heavily dependent on expert experience, ignoring the autocorrelation characteristics between different monitoring elements. In general, both types of methods have problems such as single-station modeling, lack of integration of global correlation and local dependence, short prediction period, and unsatisfactory prediction accuracy, which leads to many limitations in the actual application of the model, especially for large-scale water conservancy hub projects with dense monitoring points, where modeling efficiency and prediction accuracy cannot be balanced. At present, 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 dependence of time series data through four gate units: forget gate, input gate, output gate and cell state. However, it does not adequately mine the global correlation characteristics between different measuring station sequences, and cannot accurately capture the autocorrelation characteristics and long-term trends of time series. SUMMARY
[0003] Therefore, it is necessary to provide a dam safety monitoring multi-element collaborative prediction and early warning method based on deep learning to solve at least one of the above technical problems.
[0004] To achieve the above-mentioned purpose, a dam safety monitoring multi-element collaborative prediction and early warning method based on deep learning comprises the following steps:
[0005] Step S1: Synchronously collecting monitoring data of the dam through automatic safety monitoring facilities, and taking not less than three years of historical monitoring data in the monitoring data as original data;
[0006] Step S2: Collaboratively correcting the original data, and converting the collaboratively corrected original data into standardized sequence samples by using a sliding window technique;
[0007] Step S3: The standardized sequence sample is cut into a source sequence and a target sequence according to a preset cutting length, so as to construct a model sample library, and the sequences in the model sample library are divided into a training set and a verification set;
[0008] Step S4: The pre-constructed gate dam safety monitoring multi-element collaborative prediction and early warning model is trained by using the training set, the accuracy of the trained gate dam safety monitoring multi-element collaborative prediction and early warning model is evaluated by using the verification set, and the optimal model parameter configuration obtained through automatic rate setting is used to optimize the gate dam safety monitoring multi-element collaborative prediction and early warning model;
[0009] Step S5: Real-time monitoring data of each measuring point is obtained, and safety monitoring multi-element prediction is performed by using the optimized gate dam safety monitoring multi-element collaborative prediction and early warning model; the prediction results of each measuring point are compared with preset safety monitoring threshold indicators to perform prompt early warning.
[0010] The application introduces a unified space-time feature modeling framework, jointly models the historical sequences of multiple measuring points and multiple monitoring elements under the same model structure, effectively overcomes the problems of fragmentation and low efficiency of the traditional single-station modeling method, and simultaneously considers the autocorrelation characteristics of the sequence and the global correlation between different monitoring elements and different measuring points in the time sequence feature extraction process, realizes the collaborative fusion of local time dependence and cross-sequence correlation information, and significantly improves the description ability of the long-term evolution trend of the non-stationary monitoring sequence. On this basis, by uniformly outputting the multi-element prediction results, the dependence on artificial feature construction and experience rules is reduced, the generalization ability and prediction stability of the model are improved, so that in the large gate dam engineering scene with dense monitoring points and complex working conditions, the prediction accuracy and early warning reliability can be improved while ensuring the modeling efficiency, and the application has good engineering applicability and promotion value. BRIEF DESCRIPTION OF DRAWINGS
[0011] Other features, objects and advantages of the application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:
[0012] Figure 1 A step flowchart of the gate dam safety monitoring multi-element collaborative prediction and early warning method based on deep learning of the application;
[0013] Figure 2 A schematic diagram of the application for cutting the source sequence and the target sequence in the embodiment;
[0014] Figure 3 A future 3d prediction simulation result graph of a certain water conservancy hub measuring point in the embodiment of the application;
[0015] Figure 4 A future 7d prediction simulation result graph of a certain water conservancy hub measuring point in the embodiment of the application;
[0016] The objectives, features and advantages of the present application will be further illustrated in conjunction with the embodiments, with reference to the accompanying drawings. DETAILED DESCRIPTION
[0017] The technical method of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0018] In addition, the accompanying drawings are only schematic illustrations of the present application, and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities. The functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0019] It should be understood that although the terms "first", "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the example embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the associated associated items.
[0020] To achieve the above-mentioned purpose, please refer to Figures 1 to 4 The present application provides a deep learning-based dam safety monitoring multi-element collaborative prediction and early warning method, which comprises the following steps:
[0021] Step S1: synchronously collecting monitoring data of the dam through an automatic safety monitoring facility, and taking historical monitoring data of no less than three years in the monitoring data as original data;
[0022] Step S2: performing data quality collaborative correction processing on the original data, and converting the original data after the collaborative correction processing into standardized sequence samples by using a sliding window technology;
[0023] Step S3: cutting the standardized sequence samples into source sequences and target sequences according to a preset cutting length, thereby constructing a model sample library, and dividing the sequences in the model sample library into a training set and a validation set;
[0024] Step S4: training the pre-constructed dam safety monitoring multi-element collaborative prediction and early warning model using the training set, evaluating the accuracy of the trained dam safety monitoring multi-element collaborative prediction and early warning model using the validation set, and optimizing the dam safety monitoring multi-element collaborative prediction and early warning model through the optimal model parameter configuration obtained by automatic parameter tuning;
[0025] Step S5: obtaining real-time monitoring data of each measuring point and executing safety monitoring multi-element prediction using the optimized dam safety monitoring multi-element collaborative prediction and early warning model; comparing the prediction results of each measuring point with preset safety monitoring threshold indicators to execute prompt early warning.
[0026] In this embodiment, the time, displacement, seepage pressure, temperature, water level and other monitoring data of the gate dam are synchronously collected by the automated safety monitoring facility, and are stored in a structured form into a database management system. The historical monitoring data of nearly 3 years are taken as original data, and then through preprocessing operations such as outlier repair, missing value interpolation, noise smoothing and data normalization, the original data are converted into standardized sequence samples by using a sliding window technology. Then, based on each continuous monitoring time sequence, a sliding window length of n (for example, n = 48, indicating that 48 time points are taken as a sample segment) and a sliding step s of 1 to 5 time points are set to extract the time sequence fragments in the standardized sequence samples. The first m time point data (for example, m = 36) in each sliding window are intercepted as a source sequence X for inputting the historical features of the model, and the last n-m time point data are intercepted as a target sequence Y for training the model to predict the output. By sliding the window, multiple source sequence-target sequence pairs can be generated from the same monitoring sequence, thereby enriching the number of model training samples. The correspondence relationship between the source sequence and the target sequence of all generated samples is recorded in time sequence, and is uniformly stored in a relational database or a sequence data table to form a complete model sample library. The time sequence samples are divided into a training set and a validation set in a certain proportion (for example, 7:3, 8:2), and the data of the training set and the validation set both contain the same monitoring quantities such as time, displacement, seepage pressure, water level and temperature, and the length of each sequence sample in the training set and the validation set is the same. The training set is used for model construction, and the validation set is used for model accuracy evaluation. The safety monitoring multi-element collaborative prediction and early warning model of the gate dam takes a Transformer model as a skeleton, adopts a self-correlation attention mechanism to replace the original attention mechanism to fully capture the global correlation and dependence features between sequences, extracts the time sequence dependence and self-correlation attention features of the input sequence through an encoder, and models the cross-correlation attention between the attention output of the encoder and the self-correlation features of the predicted sequence through a decoder to efficiently fuse the time sequence dependence features within the sequence and the global correlation features between the sequences. Finally, a fully connected layer is added at the output end of the decoder to control the output dimension to match the safety monitoring elements, thereby realizing the medium and long term synchronous simulation and prediction of various safety monitoring elements. After the model meets the business requirements through accuracy evaluation, the real-time monitoring data of each measuring point can be obtained by reading the monitoring database, the measured data in the past period (such as 7 days) is used for warm-up simulation, and the future time is predicted to improve the reliability of the model prediction. When the model is predicted, the monitoring data with a time length not less than seq_len is taken as a start sequence from the starting prediction time, the sequence with a time length of pred_len to be predicted is filled with 0 values (if the next 3 days are predicted, 3 0s are added at the end of the predicted sequence), and then the start sequence is spliced at the end of the start sequence. Then, the sequence is divided into test samples in a time sliding window manner.The test samples are input into the trained model one by one in chronological order for recursive prediction until the end of the test sequence is reached, and finally the last pre_len values are taken as the safety monitoring multi-element prediction output results of the model, so as to complete the safety monitoring multi-element collaborative prediction of all stations in the future pred_len days. On this basis, finally, the prediction results are compared with the preset safety monitoring threshold indicators, so as to make a prompt early warning on the safety risk in the future period of time.
[0027] It is worth noting that seq_len is the start sequence length, assuming that the monitoring data of the past 7 days is taken as the model start sequence, then seq_len = 7 x monitoring times per day. For example, if the monitoring data is collected once an hour, then there are 24 records per day, and 7 days are seq_len = 7 x 24 = 168. pred_len is the prediction sequence length, assuming that the safety monitoring situation in the future 3 days is to be predicted, then pred_len = 3 x monitoring times per day. Taking the example of collecting once an hour, then pred_len = 3 x 24 = 72.
[0028] It is worth noting that the safety monitoring threshold includes at least one of the following threshold types: an absolute safety threshold set according to the design parameters and operation specifications of the gate dam (if the absolute value of the cumulative horizontal displacement of a monitoring section of the dam body is ≥ 15 mm, it is determined that the upper limit of the design allowable deformation is exceeded; if the cumulative value of the settlement per unit time is ≥ 8 mm, it is determined that there is a risk of structural stability; if the seepage pressure value of the dam foundation is ≥ 0.85 x the design anti-seepage pressure value), a dynamic safety threshold constructed based on the statistical distribution characteristics of historical monitoring data (assuming that the mean value of the historical displacement sequence is , and the standard deviation is , then the dynamic safety threshold can be set as: ), a trend safety threshold set based on the change rate and trend of the monitoring elements (such as the growth rate of the horizontal displacement of the dam body being ≥ 0.35 mm / day for 7 consecutive days; the seepage pressure is monotonically increasing in 5 time windows, and the cumulative amplitude is ≥ 12%; the temperature change amplitude is < 5℃, but the displacement change rate is > 0.3 mm / day), a correlation safety threshold constructed based on the collaborative response relationship of multiple monitoring elements (such as when the upstream water level rises by 1 m, the corresponding seepage pressure increment should be ≤ 0.05 MPa; if the seepage pressure increment is ≥ 0.08 MPa, it is determined that there is a correlation anomaly); when the prediction results of any monitoring element or the collaborative relationship of multiple elements meet the preset safety monitoring threshold triggering conditions, it is determined that there is a potential safety risk and the warning information is output.
[0029] Especially important is that the accuracy of the safety monitoring multi-element collaborative prediction and early warning model of the gate dam is evaluated by using the validation set, which is specifically:
[0030] The error between the model prediction value and the true value in the current iteration process of the dam safety monitoring multi-element collaborative prediction and early warning model is calculated by using the verification set to obtain the loss value of the current iteration process.
[0031] The loss value is used to perform back propagation on the dam safety monitoring multi-element collaborative prediction and early warning model, calculate the gradient of each layer parameter of the network, and update the weight and bias parameters of the dam safety monitoring multi-element collaborative prediction and early warning model.
[0032] The time series dependent feature extraction of the source sequence, the autocorrelation attention calculation of the source sequence, the autocorrelation attention calculation of the target sequence, the cross-correlation attention calculation of the source sequence and the target sequence, the loss value calculation and the back propagation are taken as a round of training process, and the training process is iteratively executed. After each round of training, the performance of the updated dam safety monitoring multi-element collaborative prediction and early warning model is evaluated using the verification set, and the hyperparameters are adjusted until the maximum training round is reached or the training accuracy no longer improves, the training is stopped and the final dam safety monitoring multi-element collaborative prediction and early warning model is saved.
[0033] The average precision error, root mean square error and Nash efficiency coefficient are used to evaluate the training accuracy of the dam safety monitoring multi-element collaborative prediction and early warning model to obtain the training accuracy of the dam safety monitoring multi-element collaborative prediction and early warning model.
[0034] In this embodiment, the validation set is used to input the gate safety monitoring multi-element collaborative prediction and early warning model for model training and verification. In the training stage, the mean square error is used as the loss measurement method. The error squares of the prediction results output by the model in the current iteration round and the corresponding true monitoring values in the validation set are calculated one by one, and the errors of the same batch of samples are averaged to obtain the validation loss value in the current training round. After the loss calculation is completed, the gradient of the validation loss to the model output is transmitted to the network parameters at each level inside the encoder and decoder through the back propagation mechanism, which is used to calculate the gradient value of each parameter with respect to the loss function. In the parameter updating process, the Adam optimization strategy is adopted, and the gradient is adaptively adjusted through the first-order moment estimation and the second-order moment estimation, wherein the initial learning rate can be set to 0.001, and the gradient update step automatic adjustment mechanism is combined to give different update amplitudes to different parameters, thereby improving the model convergence speed and training stability. In order to suppress the overfitting risk of the model on the limited historical samples, a weight decay constraint is introduced to the network weight in the parameter updating process, that is, a penalty term proportional to the weight amplitude is added when the gradient is updated, so that the weight parameter is kept within a reasonable range; at the same time, a random inactivation strategy is introduced in the middle feature mapping layer of the encoder and the decoder, and in each training round, a part of neural units are randomly shielded to participate in the calculation at a preset proportion (for example, 0.1-0.3), which enhances the generalization ability of the model to different monitoring conditions and reduces the risk of abnormal amplification of the gradient. The model construction process is regarded as forward propagation, and the model training process takes one complete data forward propagation, loss calculation and backward gradient update as a training round, and the above process is repeatedly executed. After each training round is completed, the performance of the model is evaluated by using the validation set, and the corresponding validation loss value and the change of the prediction error index are recorded. When the validation loss does not decrease significantly in continuous multiple training rounds, or the loss decrease amplitude is less than a preset threshold (for example, less than 1%), the learning rate is automatically reduced for fine parameter adjustment; when the training round reaches a preset maximum training number (for example, 200 rounds), or the validation set error remains stable and does not improve in continuous rounds, it is determined that the model training process converges, the parameter updating is stopped, and the current model parameter is saved as the final gate safety monitoring multi-element collaborative prediction and early warning model. In order to comprehensively evaluate the prediction effect of the model, three indicators, including mean absolute error (MAE), root mean square error (RMSE) and Nash efficiency coefficient (NSE), are used to quantitatively evaluate the prediction effect of the model. Among them, the mean absolute error is used to measure the average deviation amplitude between the prediction result and the true monitoring value; the root mean square error is used to reflect the overall dispersion degree of the prediction error, which is more sensitive to large deviations; the Nash efficiency coefficient is used to evaluate the fitting ability of the model prediction sequence to the true monitoring sequence trend, and its value range is between negative infinity and 1. When the coefficient is close to 1, it indicates that the model has high prediction reliability for the time series change of the gate safety monitoring elements.
[0035] Optionally, the data quality collaborative correction processing in step S2 includes:
[0036] The standard deviation of the monitoring data of each measuring point in the original data is calculated, the abnormal monitoring value of the original data is identified according to three standard deviations of the monitoring value of each measuring point, and the abnormal monitoring value is replaced by the average value of the monitoring value of the time point before and after the corresponding time point of the abnormal monitoring value;
[0037] The missing value of the original data after replacing the abnormal monitoring value is detected, and the linear interpolation filling is performed on the missing value by using the Lagrange linear interpolation method;
[0038] The original data after linear interpolation filling is smoothed and denoised by using the exponential moving average method, the time period range of the monitoring data is unified by setting the same start and end time points, and the monitoring data in the unified time period range is normalized by the maximum and minimum value.
[0039] In this embodiment, the real-time data of various types of automatic safety monitoring facilities is stored in the monitoring database, the historical monitoring data of safety monitoring elements such as displacement, seepage, water level and temperature of the dam in the past three years at 8 o'clock every day is obtained from the monitoring database, which is used as the original data for safety monitoring prediction and analysis; through 3 ( The standard deviation of the original data is identified according to the principle of identifying the abnormal value of the original data, and then the average value of the time point before and after is used for replacement and correction of the abnormal value; then the missing value of the monitoring data is interpolated and filled by using the Lagrange linear interpolation method, so as to ensure the continuity of the time sequence; the data is smoothed and denoised by using the exponential moving average method, and then the time period range of the input data is unified by setting the same start and end time points; the data is standardized by using the maximum and minimum value normalization method, so as to eliminate the influence of the difference of data dimension or order of magnitude.
[0040] Optionally, the step S2 includes converting the monitoring data after the collaborative correction processing into a standardized sequence sample.
[0041] According to the collection time sequence of each monitoring element in the monitoring data, the monitoring data after data normalization is time-indexed and rearranged, the monitoring values of the same measuring point at the same time are combined according to the preset element order, and the multi-element monitoring data of the continuous monitoring time sequence is obtained.
[0042] The multi-element monitoring data of the continuous monitoring time sequence is taken as a time sequence segment, and each time sequence segment is extracted according to the preset sliding window length, so as to obtain the standardized sequence sample.
[0043] In this embodiment, the collection results of different monitoring elements are aligned according to the timestamp information carried in the data records. If there are multiple types of monitoring element data at a certain collection time for the same measurement point, the collection time is taken 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 of fixed dimension. 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, the structural response type elements are arranged first, and then the environmental action type elements are arranged. When there is missing data of an individual element at a certain time, the missing data is completed by linear interpolation of the adjacent time points to ensure the consistency of the combined vector dimension, thereby constructing monitoring data reflecting the multi-element state of the same measurement point at a single time. The above multi-element data is sequentially organized with a continuous sequence of monitoring time as the time axis constraint. Specifically, the sliding window length is set to a fixed time step (for example, 24, 48, or 72 consecutive sampling times), and the multi-element data sequence of the corresponding length is intercepted at each sliding position as a complete time sequence segment with a pre-set step size (for example, 1 or 2 sampling times) along the time axis direction. The time sequence segment is in the form of a two-dimensional matrix, where the row direction represents the time evolution order, and the column direction represents the numerical change of different monitoring elements.
[0044] Alternatively, the division method of the continuous monitoring time sequence includes:
[0045] The collection time difference of adjacent two monitoring records in the monitoring data is compared in sequence, and the adjacent two monitoring records with a collection time difference not greater than a pre-set maximum allowed time interval are determined as adjacent monitoring times;
[0046] The numerical change amplitudes of the corresponding monitoring elements in the adjacent monitoring times are calculated, and if the change amplitudes of all monitoring elements do not exceed a pre-set fluctuation threshold, it is determined that the adjacent monitoring times belong to the same continuous monitoring time sequence;
[0047] If the collection time difference of the adjacent two monitoring records is greater than the maximum allowed time interval, or the change amplitude of any monitoring element exceeds the fluctuation threshold, the current continuous monitoring time sequence is ended, and the monitoring record that occurs the overrun is taken as the starting point of the new continuous monitoring time, and the continuous monitoring time sequence is re-divided.
[0048] In this embodiment, for the monitoring data records of the same monitoring point, first, according to the acquisition time stamp information stored in the database, the monitoring records are sorted in chronological order. Then, the acquisition time difference between adjacent monitoring records is calculated one by one, and the time difference is compared with the pre-set maximum allowed time interval; wherein the maximum allowed time interval is determined according to the sampling frequency of the monitoring system, for example, under the condition of 10 minutes sampling period, the maximum allowed time interval is set to 15 minutes to be compatible with slight communication delay. When the time difference of adjacent records does not exceed the threshold, the corresponding two records are marked as time continuous state. Further, the value change of each monitoring element in the adjacent monitoring time is analyzed. Specifically, the absolute change or relative change rate of displacement, seepage pressure, temperature, water level and other monitoring elements between adjacent time is calculated, and the calculation result is compared with the fluctuation threshold of the corresponding element; wherein the fluctuation threshold of each monitoring element is determined according to the historical operation data statistics, for example, the displacement change threshold is set to 0.2mm, the seepage pressure change threshold is set to 5kPa, and the water level change threshold is set to 0.05m. When the change amplitude of all monitoring elements in the adjacent time is within the threshold range of each element, it is determined that the adjacent monitoring time maintains continuity in physical state, which provides a basis for constructing stable time series. The corresponding monitoring records are continuously merged into the same continuous monitoring time sequence, and the starting time and cumulative length of the sequence are recorded; once it is detected that the acquisition time difference of adjacent monitoring records exceeds the maximum allowed time interval, or the change amplitude of any monitoring element exceeds the pre-set fluctuation threshold, the current continuous monitoring time sequence is terminated immediately, and the monitoring record exceeding the limit is reinitialized as the starting point of the new sequence. By the above method, the abnormal fluctuation, sampling interruption or working condition mutation data are avoided to be forcibly spliced, so as to ensure the reliability of the time series samples extracted by the subsequent sliding window in time continuity and physical consistency.
[0049] Optionally, the step S3 of cutting the standardized sequence sample into the source sequence and the target sequence comprises:
[0050] The first m sequence point data in the standardized sequence sample are cut as the source sequence, and the last n-m sequence point data are cut as the target sequence; wherein m is a pre-set model input sequence length, n-m is a model prediction sequence length, and n is a total length of the standardized sequence sample.
[0051] In this embodiment, the first m sequence point data and the last n-m sequence point data in the sliding window are taken as the source sequence X (corresponding to the length of m) and the target sequence Y (corresponding to the length of n-m) of the prediction model respectively, so as to obtain a series of input-output sequence sample pairs. The pre-set model input sequence length m can be 30, that is, the monitoring data of 30 consecutive time steps are taken as the source sequence X, which is used to represent the change trend of the monitoring elements of the gate dam in the last month.
[0052] Figure 2 Figure 1 is a schematic diagram of intercepting source sequence and target sequence in an embodiment of the present application; as shown, the first m sequence point data and the last n-m sequence point data in the sliding window are taken as the source sequence X (corresponding to the length m) and the target sequence Y (corresponding to the length n-m) of the prediction model respectively, thereby obtaining a series of source sequence and target sequence. Figure 2
[0053] Optionally, the method for constructing the gate dam safety monitoring multi-element collaborative prediction and early warning model in step S4 comprises:
[0054] Taking the Transformer model as the skeleton, the LSTM unit and the autocorrelation attention mechanism are integrated to construct a safety monitoring prediction and early warning model composed of a time series dependence extraction module, an encoder module, a space-time embedding module, a decoder module and a full connection module;
[0055] Based on the Bayesian optimization theory, the hyperparameters of the safety monitoring prediction and early warning model are automatically calibrated, thereby constructing the gate dam safety monitoring multi-element collaborative prediction and early warning model.
[0056] In this embodiment, the Transformer model with an encoder-decoder structure is taken as the basic network framework, the time series dependence extraction module and the space-time embedding module are taken as the front feature processing unit, and the encoder module, the decoder module and the full connection module at the output end are structurally connected to construct a deep learning model framework for the dam safety monitoring multi-element collaborative prediction and early warning, i.e., a safety monitoring prediction and early warning model. In the initial stage of the model, the network weight matrix and the bias vector of each layer are initialized by using random numbers with an interval of [0, 1], and the initial learning rate lr, the batch size batch_size, the number of LSTM layers num_lstm_layer, the number of LSTM hidden units lstm_cells, the number of attention heads num_heads, the model dimension d_model, the number of encoder layers num_enc_layers and the number of decoder layers num_dec_layers are set as key hyperparameters to be rated. The Bayesian optimization theory is introduced to automatically rate the above hyperparameters: first, reasonable search intervals are set for each hyperparameter, and a plurality of initial parameter combinations are randomly selected in the parameter space to form an initial parameter point set; then, the model under different parameter configurations is sequentially completed for time series dependence feature extraction, autocorrelation attention modeling and cross-correlation attention fusion calculation using the training set, and the corresponding multi-element prediction results are output, and the root mean square error of prediction is taken 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 based on this, and the optimal parameter point is selected iteratively to update the model configuration until the convergence condition is met or the preset iteration number is reached, and finally the parameter combination corresponding to the optimal prediction accuracy is output as the optimal hyperparameter configuration of the model, and is loaded into each functional module under the constraint of the Transformer model framework, thereby completing the construction and shaping of the dam safety monitoring multi-element collaborative prediction and early warning model.
[0057] The dam safety monitoring multi-element collaborative prediction and early warning model includes the following modules:
[0058] (1) a space-time embedding module for vectorizing the target sequence in the training set to embed time and location information, and analyzing the autocorrelation attention output of the target sequence according to the vectorization result of the target sequence;
[0059] The function of the spatio-temporal embedding module is to vectorize the input sequence and embed time and position information simultaneously. 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 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.
[0060] (2) The time series dependence extraction module is used to extract the time dependence features of the source sequence in the training set, and perform LSTM time series feature modeling based on the time dependence features to obtain a continuous time feature sequence;
[0061] The time series 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.
[0062] The calculation method of the forget gate is:
[0063] ;
[0064] The expression of the input gate is:
[0065] ;
[0066] ;
[0067] ;
[0068] The expression of the output gate is:
[0069] ;
[0070] ; <input vector, in time series prediction, is the observed feature vector at the current time, denotes the current candidate cell state, that is, the cell state after the input gate and the nonlinear function The generated new information content is used to determine the information added to the cell state The candidate information in it is calculated by linear transformation and activation function of the current input and the hidden state at the last time, is a sigmoid activation function used to compress the cell weight value to the interval 0~1, , , , respectively 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 represent the bias of the forget gate, the bias of the input gate, the bias of the candidate cell state, and the bias of the output gate, and tanh represents the tanh activation function, and respectively represent the hidden layer neuron output at the previous time and the current time, and respectively represent the cell state value at the previous time and the current time. The forget gate determines which unnecessary information is lost in the last 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.
[0072] (3) The encoder module models the autocorrelation attention of the continuous time feature sequence, and outputs the LSTM autocorrelation feature;
[0073] The encoder module is composed of an autocorrelation attention module and a feedforward neural network layer in series. The core function of the autocorrelation attention is dynamic weight distribution and selective focusing. By calculating the autocorrelation coefficients of the input sequence, different weights are given to sequences of 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.
[0074] 1) Autocorrelation attention module, first obtain the frequency components corresponding to the input sequence Y and J through Fourier transform (FFT), then multiply the frequency components of Y and J point by point, the same frequency of the two sequences will produce a peak value (that is, the periodic dependent feature of the original sequence is found), and then use the inverse Fourier transform to get all possible periods of the input sequence (assuming ), and then take the top k frequency periods as the potential periods of the input sequence (assuming ), and then slide the window using the potential periods to obtain the sliding sequences corresponding to , calculate the similarity between the sliding sequences and the original sequence through the autocorrelation function, then convert the similarity into a probability distribution through the softmax function to obtain the attention weight scores corresponding to different potential periods, and finally weight sum the top k sliding sequences and the original input sequence using the attention weight scores to obtain the fusion sequence focusing on the key information.
[0075] 2) The feedforward neural network layer is mainly composed of a linear transformation layer, an activation layer and a dropout layer in series. The result of the autocorrelation attention output is up-sampled (such as 2048 dimensions) through the first linear transformation layer to enrich the feature expression capability of the input sequence, and then the up-sampled result is added with a nonlinear expression through the ReLU activation function to enhance the fitting capability of the neural network to complex functions. Through the dropout mechanism, part of the neurons is selectively ignored to enhance the generalization capability of the model. Then, layer normalization and residual network structure are used to optimize the gradient flow information. Finally, the output dimension is reduced to the dimension before the input of the feedforward neural network to keep the dimension information of the vector unchanged. At the same time, the feedforward neural network layer also includes a one-dimensional time convolution structure, which performs local dependence modeling on the sequence features along the time dimension. The time convolution uses a convolution kernel size of 3 or 5 with a step size of 1, and the sequence length is kept unchanged through padding, so that the features at each time step can fuse the context information of the adjacent time steps, thereby capturing the short-term trend and local dynamic features.
[0076] (4) A decoder module for performing cross-correlation attention modeling according to the autocorrelation attention output of the target sequence and the LSTM autocorrelation features;
[0077] The decoder module is composed of an autocorrelation attention layer, a residual network layer, a cross-correlation attention layer, a residual network layer, a feedforward neural network, and a residual network layer in series. First, the sequence after spatio-temporal embedding is input into the autocorrelation attention module to capture the autocorrelation features within the sequence. Then, the gradient flow is optimized through the residual network to alleviate the risk of gradient vanishing / exploding. Next, the output after residual network optimization is taken as the Q vector (query vector), while the output of the encoder is taken as the K vector (index vector) and the V vector (reference vector). K and V can be the same and are input into the cross-correlation attention module for cross-correlation feature extraction to obtain the attention vector result. The gradient flow is further optimized through the residual network, and then the high-dimensional linear transformation and nonlinear feature expression are performed through the feedforward neural network layer. Finally, the cross-correlation feature fusion result is obtained through the residual network optimization.
[0078] 1) Self-attention layer, consistent with the feedforward neural network layer structure of the encoder, mainly to add nonlinear expression capability to the attention output result.
[0079] 2) Residual network layer. The role of this module is to optimize the gradient flow and alleviate the gradient vanishing or gradient explosion problem caused by the chain rule when updating the weight parameters using gradient flow in the back propagation phase during the learning and training process of deep neural network. First, the variance normalization form is used to normalize the matrix vector in each dimension, and then it is added to the matrix vector before input as the output of the current network.
[0080] 3) Cross-correlation attention layer. Similar to the self-correlation attention mechanism of the encoder, the main role is to obtain the context association between different sequences, the main difference is that the input Q (query vector), K (index vector) and V (reference vector) of the self-correlation attention layer are all the same matrix vector (high-dimensional time sequence vector), while the input Q (query vector) of the cross-correlation attention layer comes from the output of the self-correlation attention module of the encoder, K (index vector) and V (reference vector) come from the output of the self-correlation attention module of the decoder.
[0081] 4) Feedforward neural network layer. Consistent with the feedforward neural network layer structure of the encoder, mainly to add nonlinear expression capability to the attention output result.
[0082] (5) Fully connected module, used to map the cross-correlation attention modeling result to the target feature number corresponding to the number of monitoring elements.
[0083] The main role of the fully connected module is to globally integrate all local features of the previous layer, 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 the safety monitoring multi-element.
[0084] Optionally, the step S4 of training the pre-constructed gate dam safety monitoring multi-element collaborative prediction and early warning model using the training set comprises:
[0085] When the source sequence input time sequence dependence extraction module in the training set is input, the LSTM unit is used to model the time sequence features, and the time sequence dependence features of the source sequence are extracted;
[0086] The time sequence dependence features of the source sequence are used as the input sequence of the encoder module, and the self-correlation time sequence features of the fusion sequence are obtained through self-correlation attention calculation and feedforward network transmission.
[0087] The spatio-temporal embedding module is inputted with the target sequence in the training set to express the vectorization, embed the time and position information, and serve as the input of the decoder module. The decoder module is used to perform autocorrelation attention calculation and feedforward network transmission on the vectorization result of the target sequence to obtain the autocorrelation attention output of the target sequence.
[0088] The autocorrelation attention output of the target sequence is taken as a to-be-predicted monitoring element query vector, and the autocorrelation time sequence features of the fusion sequence are taken as the monitoring element time sequence correlation index vector of each historical moment in the original data and the multi-element response reference vector corresponding to each historical moment. The autocorrelation attention calculation is performed on the autocorrelation attention layer of the decoder module by jointly inputting the autocorrelation time sequence features of the fusion sequence to fuse the time sequence dependent features and the global correlation features between sequences.
[0089] The output result of the decoder module is mapped to the target feature number corresponding to the monitoring element number through the full connection module, so as to complete the training of the gate dam safety monitoring multi-element collaborative prediction and early warning model.
[0090] 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 high-dimensional vectors (dimension D = 512) through a 1 × 1 convolution layer, and the time stamp and the measurement point position information are encoded into a sine-cosine vector and added to the high-dimensional vector to obtain a high-dimensional time sequence vector representation with spatio-temporal information. The high-dimensional time sequence vector is converted into three high-dimensional time sequence vectors Q, K and V through three linear projection transformations, then Q and K are inputted into the autocorrelation layer of the decoder module, the frequency components are extracted through discrete Fourier transform, then the frequency amplitude spectrum is obtained by point-by-point multiplication, then the autocorrelation coefficients of each time period are calculated through inverse Fourier transform, the top k potential periods are selected according to the autocorrelation coefficients, the autocorrelation coefficients are normalized by using the Softmax function and the first k are taken as the weight coefficients (the value of k can be 5), the corresponding sliding sequence and the high-dimensional time sequence vector sequence are weighted and summed to obtain the autocorrelation features of the key time sequence dependence in the focused sequence. The top k means that among all the candidate times (periods), the first k time periods with the largest autocorrelation strength (correlation coefficient) value. The source sequence X in the training set is inputted into the bidirectional LSTM network, the number of hidden units is set to 128, and the time step length is equal to the source sequence length m. The LSTM uses the forget gate, the input gate and the output gate (f t , i t , O t ) to control the flow of information, retain long-term dependence features and alleviate the gradient vanishing problem. The continuous time feature sequence output by the LSTM is processed through batch normalization, dropout (0.2) and residual connection to provide stable and smooth sequence features. The continuous time feature sequence output by the LSTM is inputted into the encoder module. The frequency components of each feature are calculated through FFT and multiplied point by point to obtain potential periods The autocorrelation coefficient of the sliding sequence and the original sequence is calculated, which is normalized by softmax to generate the attention weight. The sliding sequence is weighted and summed using the weight, and then upgraded to 2048 dimensions through high-dimensional linear transformation, ReLU activation, dropout and layer normalization processing to output the encoder autocorrelation attention feature. The encoder autocorrelation attention output is used as the monitoring element time sequence correlation index vector and the multi-element response reference vector, and the decoder autocorrelation attention output is used as the query vector of the predicted monitoring element, which is input into the cross-correlation attention layer of the decoder to calculate the inter-sequence context correlation feature. The change slope difference, amplitude ratio and time sequence offset of the target sequence and the source sequence features in the window are calculated, which are weighted and converted into context correlation strength to generate a weighted fusion coefficient, and the features are weighted and summed. The cross-correlation feature matrix output after nonlinear mapping and dimension reduction captures the global dependence and local change information between sequences. The cross-correlation feature matrix output by the decoder module is input into the fully connected layer module, which is linearly mapped to the target space dimension (length equal to the number of monitoring elements, such as 5 types of safety monitoring elements), and the nonlinear expression is enhanced through ReLU activation. The weight matrix W and the bias b are updated through training to complete the mapping of high-dimensional features to the target space, and realize the collaborative prediction of safety monitoring multi-elements. The output vector is the predicted value of each monitoring element at the future time step, which can be used for safety threshold comparison and early warning. After the model training is completed, the model is saved for real-time monitoring data prediction.
[0091] It is worth noting that the Transformer model skeleton refers to the basic network structure framework for organizing and constraining the collaborative operation of each functional module of the gate dam safety monitoring multi-element collaborative prediction and early warning model. It takes the encoder-decoder structure as the core, and uses the time sequence dependence extraction module and the spatio-temporal embedding module as the front feature processing unit, which is structurally connected with the encoder module and the decoder module, and the fully connected module is configured at the output end of the decoder to complete the feature mapping. The model skeleton is used to specify the data flow, hierarchical connection relationship and feature interaction mode between the modules, without limiting the specific parameter values. The optimal network structure parameters and training parameters obtained by parameter calibration are loaded into the corresponding modules under the constraint of the skeleton, thereby constructing a complete gate dam safety monitoring multi-element collaborative prediction and early warning model.
[0092] Optionally, the method for obtaining the autocorrelation attention output of the target sequence comprises:
[0093] The vectorized expression result of the target sequence is embedded with time encoding and position encoding information, and is input into the autocorrelation attention layer in the decoder module for autocorrelation attention modeling to capture the autocorrelation features in the vectorized expression result;
[0094] Gradient flow optimization and feature enhancement processing are performed on the autocorrelation features in the vectorization expression result, so as to obtain the autocorrelation attention output of the target sequence.
[0095] In this embodiment, the target sequence in the training set is input into the 1*1 convolution structure of the spatio-temporal embedding module in time sequence, linear projection transformation is performed on each monitoring element, the monitoring element features at each time step are uniformly mapped to a 512-dimensional feature space; at the same time, the collection time and station position information corresponding to the sequence are encoded and embedded in a sine-cosine manner to form a time encoding vector and a position encoding vector. The projected features, time encoding and position encoding are added point by point to form a target high-dimensional time sequence vector representation containing time and space constraints. The high-dimensional time sequence vector representation is taken as the input feature of the decoder autocorrelation attention layer, and the sequence dependence modeling structure is used to model the time sequence relationship of the target sequence inside the layer. The sequence modeling output is subjected to residual connection and layer normalization processing, and a random inactivation rate of 0.2 is introduced to enhance the stability of the features; then the feature dimension is expanded to 1024 by a feedforward neural network layer, and a nonlinear activation is applied to obtain the time autocorrelation attention representation for describing the target sequence.
[0096] Optionally, the method for obtaining the autocorrelation time sequence features of the fused sequence comprises:
[0097] The input sequence of the encoder module is subjected to three different linear projection transformations to generate high-dimensional time sequence vectors of consecutive time;
[0098] The high-dimensional time sequence vectors of consecutive time are subjected to discrete Fourier transform, and the frequency components obtained after Fourier transform of each time sequence are multiplied point by point to obtain the frequency amplitude spectrum of the input sequence;
[0099] In the frequency amplitude spectrum, the peak frequency is selected time periods are potential periods, and the autocorrelation coefficients of the input sequence are obtained by performing inverse discrete Fourier transform; wherein is a preset screening threshold;
[0100] The high-dimensional time sequence vectors are windowed using each potential period to sequentially obtain sliding sequences corresponding to the potential periods, and the similarity between each sliding sequence and the high-dimensional time sequence vector is calculated to convert the similarity into a probability distribution, so as to obtain the attention weight score corresponding to each potential period;
[0101] The sliding sequences and the high-dimensional time sequence vectors are weighted and summed using the attention weight score to obtain a fused sequence;
[0102] The fused sequence is dimensioned, a nonlinear expression is added to the dimensioning result, and gradient flow optimization and dimension reduction transformation are performed, so as to obtain the autocorrelation time sequence features of the fused sequence.
[0103] In this embodiment, the continuous time feature sequence output by the input encoder module (or decoder module) is divided into time steps and monitoring element dimensions Constructing a matrix Then generate high-dimensional time series vectors 、 and Perform fast discrete Fourier transform (FFT) on high-dimensional time series vectors and to obtain frequency components. Multiply the frequency components of each time period sequence point by point to obtain the frequency amplitude spectrum, which is used to identify the periodic dependence of the sequence. Select the top points of the frequency amplitude spectrum as candidate periods to capture the main periodic signal while reducing noise. Perform inverse discrete Fourier transform on the selected peak frequencies to obtain the corresponding time periods , where is a preset potential period threshold (e.g., 10% of the sequence length). Use each potential period as a sliding window length to extract sliding sequences from high-dimensional time series vectors , and the window step can be set to to ensure that the local features of the sequence are covered and the periodic information is complete. Calculate the cosine similarity between each sliding sequence and high-dimensional time series vector , normalize the similarity, and convert it to a probability distribution using the softmax function to generate the attention weight score corresponding to each potential period. This probability distribution is used to quantify the contribution of different potential periods to the overall sequence dependence, ensuring that periodic features are effectively captured in subsequent feature fusion. Weighted sum the sliding sequences using the attention weights to obtain a fused sequence, then upgrade it to 2048 dimensions (linear layer) using a feedforward neural network, add a ReLU activation to add a nonlinear expression, set the dropout rate to 0.2 to prevent overfitting, and finally use residual connection and layer normalization to optimize the gradient flow, and then reduce the dimension to map back to the original feature dimension to obtain an output sequence of fused self-attention features with the same dimension as the input sequence, which is used for decoder cross-correlation attention modeling.
[0104] Optionally, the fused time series dependence features and the global association features between sequences include:
[0105] Add a nonlinear expression to the autocorrelation attention output of the target sequence and perform gradient flow optimization and dimension reduction transformation to output the autocorrelation time series features of the target sequence.
[0106] The autocorrelation time sequence features of the target sequence are taken as the predicted dam monitoring element query vector, the autocorrelation time sequence features of the fusion sequence are taken as the monitoring element time sequence correlation index vector of each historical moment in the original data, and the multi-element response reference vector corresponding to each historical moment is input into the autocorrelation attention layer, and the autocorrelation time sequence features of the two types are correlated and attention is calculated.
[0107] The cross-correlation attention calculation result is added with a nonlinear expression, and gradient flow optimization and dimension reduction transformation are performed.
[0108] In this embodiment, the target sequence attention output from the autocorrelation attention layer of the decoder module is taken as input, and a high-dimensional vector is first generated by a linear projection transformation, the feature dimension is mapped from D to 2D (for example, from 512 dimensions to 1024 dimensions), and a ReLU activation function is introduced to enhance the nonlinear expression ability; then the residual connection and layer normalization structure are used to superimpose and normalize the features before and after transformation, and the normalization dimension and time step are consistent to stabilize the gradient flow in the back propagation process; finally, a linear dimension reduction transformation is performed to restore the feature dimension to D dimensions, and the target sequence autocorrelation features of the decoder are obtained. Then, the target sequence autocorrelation attention features of the decoder module are taken as the predicted dam monitoring element query vector, and the autocorrelation attention features of the encoder module are taken as the monitoring element time sequence correlation index vector and the multi-element response reference vector, which are input into the autocorrelation attention layer for calculation to obtain the cross-correlation attention result of the mutual correlation between the fusion encoder output sequence and the decoder output sequence. The obtained cross-correlation attention result is input into the feedforward neural network layer, first the feature dimension is increased to the intermediate dimension (such as 1024 dimensions) through the linear transformation layer, and the nonlinear 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, the residual connection and layer normalization are introduced to optimize the gradient flow of the cross-correlation features, and finally the linear dimension reduction transformation is performed to restore the original feature dimension.
[0109] It is worth noting that in the dam monitoring element prediction stage, the existing technology does not use the unified view of query vector, key vector and numerical vector as homologous features, but according to the functional division between the "to-be-predicted target-historical correlation-multiple element response reference" in the dam safety monitoring scene, the physical meaning of the three types of vectors is functionally distinguished and set. Specifically, the target sequence autocorrelation feature output by the decoder is set as the query vector of the dam monitoring element to be predicted, because this feature directly corresponds to the core safety indicators such as dam displacement, seepage pressure or strain at the current prediction time, and its essence reflects the search demand of the current to-be-judged state on historical information. If this feature is used as a query vector, it can actively search for the historical working condition segment most relevant to the current structure state during attention calculation; At the same time, the autocorrelation time series feature output by the encoder is set as the monitoring element time series correlation index vector, because this feature has described the periodicity and lag relationship between each historical time after autocorrelation modeling, and is used as an index vector to provide stable time correlation index in the matching stage, thereby avoiding the defect that the existing technology only relies on instantaneous feature similarity and ignores the long-term slowly varying characteristics of the dam; Further, the response feature obtained by multi-element fusion in the same encoder output is set as the multi-element response reference vector, because this feature contains multiple source observations such as water level, temperature, seepage and structural response, and is used as a reference vector to output a comprehensive response result with physical meaning in the weight weighting stage, thereby ensuring that the prediction result not only has time correlation, but also conforms to the stress and seepage coupling mechanism of the dam structure. Compared with the technical route in which Q, K and V are simply linearly mapped from the same feature in the existing general sequence prediction method, the embodiment introduces a "prediction target oriented-time series correlation index-multi-element physical reference" functional separation mechanism to the three types of vectors at the attention input level, so that the attention weight is constrained by the current safety risk state, historical evolution law and multi-source working condition at the same time, thereby effectively suppressing the influence of water level mutation, sensor noise and long-term drift on prediction stability in the dam safety detection scene, improving the early perception ability of abnormal evolution trend, and reflecting the targeted improvement for the engineering safety monitoring scene.
[0110] Especially important is that the cross-correlation attention includes:
[0111] The autocorrelation attention output of the decoder is transformed into a continuous-time high-dimensional time series vector Q1 by linear projection, the autocorrelation attention output of the encoder is transformed into a continuous-time high-dimensional time series vector K1 and V1 by linear projection, then the Fourier transform of Q1 and K1 is performed, 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;
[0112] In the frequency amplitude spectrum, the peak frequency is selected a time period is a potential period, and an inverse discrete Fourier transform is performed to obtain autocorrelation coefficients of the input sequence; wherein is a preset screening threshold value;
[0113] The high-dimensional time sequence vector V1 is windowed using each potential period, and a sliding sequence corresponding to each potential period is obtained in turn, and the similarity between each sliding sequence and the high-dimensional time sequence vector V1 is calculated, so as to convert the similarity into a probability distribution, thereby obtaining the attention weight score corresponding to each potential period;
[0114] The sliding sequence and the high-dimensional time sequence vector sequence V1 are weighted and summed using the attention weight score, to obtain a fusion sequence.
[0115] The fusion sequence is dimensioned, a nonlinear expression is added to the dimensioning result, and gradient flow optimization and dimension reduction transformation are performed, thereby outputting the cross-correlation attention feature.
[0116] In this embodiment, the autocorrelation attention output of the decoder is generated by linear projection transformation to generate a high-dimensional time sequence vector Q1 of continuous time, the autocorrelation attention output of the encoder is generated by linear projection transformation to generate high-dimensional time sequence vectors K1 and V1 of continuous time, then the Q1 and K1 are subjected to discrete Fourier transform, and the frequency components obtained after the point-by-point multiplication of each time sequence Fourier transform are multiplied, to obtain the frequency amplitude spectrum of the input sequence. In the frequency amplitude spectrum, the peak frequency is selected a time period is a potential period, and an inverse discrete Fourier transform is performed to obtain autocorrelation coefficients of the input sequence; wherein is a preset screening threshold value (such as 10% of the sequence length); the high-dimensional time sequence vector V1 is windowed using each potential period, and a sliding sequence corresponding to each potential period is obtained in turn, and the similarity between each sliding sequence and the high-dimensional time sequence vector V1 is calculated, so as 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 sequence vector sequence V are weighted and summed using the attention weight score, to obtain a fusion sequence; the fusion sequence is dimensioned, a nonlinear expression is added to the dimensioning result, and gradient flow optimization and dimension reduction transformation are performed. After weighted and constrained integration, the cross-correlation attention result reflecting the consistency and context association of the two types of autocorrelation features is obtained, which is used for subsequent full connection process.
[0117] Optionally, the automatic rate setting includes:
[0118] The network structure parameters and training parameters in the time sequence dependence extraction module, the encoder module, the spatiotemporal embedding module, the decoder module and the full connection module are determined to determine the to-be-rated parameters;
[0119] A parameter search space corresponding to each to-be-calibrated parameter is set, and a plurality of sets of parameter combinations are randomly selected from the parameter search space as an initial parameter point set;
[0120] With the training set as input, a safety monitoring prediction and early warning model is calculated by using a model configuration corresponding to the initial parameter point set to obtain a corresponding prediction result, and a prediction accuracy index is calculated as a target function value according to the prediction result;
[0121] Statistical characteristics of the target function value calculated according to the initial parameter point set are calculated, and a probability distribution model of the target function value in the parameter search space is constructed based on the statistical characteristics to calculate a prediction mean and a prediction covariance of each parameter combination in the parameter search space;
[0122] With the prediction mean and the prediction covariance as input, the performance improvement potential of each parameter combination in the parameter search space is evaluated, and a parameter combination with the greatest performance improvement potential is selected as a calibration parameter point, and the calibration parameter point is added to the parameter point set;
[0123] The safety monitoring prediction and early warning model calculation is re-executed for the model configuration corresponding to the calibration parameter point to obtain a new target function value, so as to update the parameter point set, the optimal accuracy index and the corresponding optimal parameter solution;
[0124] The performance improvement potential evaluation and updating process is iteratively executed until a preset evaluation number is reached or a convergence condition is met, so as to output an optimal model parameter configuration as an automatic calibration result.
[0125] In this embodiment, the overall structure of the multi-factor collaborative prediction and early warning model for dam safety monitoring is analyzed, and the key parameters involved in time series feature extraction and attention modeling are sorted out to form a unified set of parameters to be rated. The network structure parameters include the LSTM hidden state dimension (e.g. 32-128), the number of latent periods K in the autocorrelation attention (e.g. 10-50), the feature fusion weight mapping dimension in the 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), which together constitute the object space for subsequent rating. For each parameter to be rated, a continuous or discrete search interval is set, and a unified parameter encoding method is used to construct the parameter search space, such as concatenating the network structure parameters and the training parameters into a fixed-length parameter vector; In this search space, a random uniform sampling strategy is used to select several sets of parameter combinations, and the initial parameter point set size can be set to 20-30 groups. Each set of parameters corresponds to a complete model configuration, which is used for subsequent prediction performance evaluation to avoid bias caused by a single initial setting. The training set monitoring sequence is input into the model configured by the initial parameter point set, and the LSTM time series feature extraction, autocorrelation attention calculation, and cross-correlation attention fusion are sequentially completed, and the corresponding multi-factor prediction results are output; Then compare the prediction results with the true monitoring values in the training set, calculate the mean square error or root mean square error as the prediction accuracy index, and associate this index with the corresponding parameter point as the target function value to form a basic sample set of "parameter combination-prediction accuracy". Based on the target function values corresponding to each parameter combination in the initial parameter point set, calculate their mean, variance, and covariance information between parameters, and use a multivariate Gaussian distribution to model the distribution characteristics of the target function in the parameter search space; This probability distribution model takes the parameter vector as input and can output the expected value and uncertainty measure of the corresponding prediction accuracy, providing statistical basis for subsequent parameter performance improvement evaluation. The prediction mean and prediction covariance output by the probability distribution model are used as evaluation criteria, and the performance improvement potential index is introduced to screen the un-evaluated parameter combinations in the parameter search space; This index considers the prediction accuracy expectation and uncertainty size, and preferentially selects parameter combinations with large improvement space near the current optimal accuracy as new rated parameters, and adds them to the existing parameter point set to gradually approach the optimal solution region.The model configuration is reconstructed for the newly added rating parameter point, and the complete cross-correlation attention modeling and prediction calculation process is performed using the training set to obtain a new target function value; then the parameter point set and the current optimal prediction accuracy are updated, and the probability distribution model is corrected accordingly; the above evaluation and update process is executed in a loop, the evaluation times can be set to 50-100 times, or the iteration is terminated when the optimal accuracy improvement amplitude is less than a preset threshold (such as 1%) in continuous iterations for several times, and finally the parameter combination corresponding to the optimal accuracy is output as the automatic rating result.
[0126] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the application being defined by the appended claims and not by the above description, therefore all variations falling within the meaning and scope of the equivalent elements of the application file are intended to be included in the application.
[0127] The above description is merely a specific implementation of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed 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, using a sliding window technique to transform the co-corrected original data into standardized sequence samples; 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. 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 using the optimal model parameter configuration obtained through automatic calibration. The construction method of the multi-element 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. 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. 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.
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, 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.
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 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.
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, 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.
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, 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.
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, 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.
7. 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, 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