A tailings dam phreatic line anomaly identification method, system, device and medium
By using the CT-MHA-GRU model and Bootstrap resampling technology, static and dynamic confidence intervals were constructed, solving the problem of anomaly identification in non-stationary and nonlinear data in tailings dam phreatic line monitoring, and achieving anomaly detection with high sensitivity and low false alarm rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH LIAONING
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional tailings dam seepage line monitoring methods are unable to effectively identify anomalies when faced with non-stationary or non-linearly abruptly changing data, resulting in the suppression of early, subtle anomaly signals and the inability to achieve effective early warning.
The CT-MHA-GRU model is combined with Bootstrap resampling technology to construct static and dynamic confidence intervals. The model's ability to focus on key temporal features is enhanced through a channel-by-channel time attention mechanism, and high-precision prediction is achieved by combining it with a GRU network, thus constructing a dual early warning mechanism.
It achieves highly sensitive anomaly identification of tailings dam seepage lines, reduces false alarm rate, and can promptly capture long-term trend and short-term sudden anomalies, thus improving the timeliness and robustness of monitoring.
Smart Images

Figure CN122174105A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of tailings dam safety monitoring technology, specifically relating to a method, system, equipment and medium for identifying anomalies in the seepage line of a tailings dam. Background Technology
[0002] With the rapid development of the global economy, people's demand for mineral resources is increasing. Tailings dams are a key infrastructure for safe production in mines, and the phreatic line inside the dam is known as the "lifeline" of the dam. An abnormal rise or fall in the phreatic line may not only lead to a decrease in the anti-sliding stability of the dam slope, but may also indicate the emergence of new hidden seepage channels or early signs of piping inside the dam body.
[0003] In recent years, data-driven methods have received widespread attention in the field of anomaly identification. Traditional anomaly detection methods are often applied to dam displacement monitoring, and their core relies heavily on static threshold determination based on the normal distribution assumption (such as 3). (The rule). However, this assumption faces severe challenges in tailings dam phreatic line monitoring. Actual phreatic line monitoring data are affected by the coupling of multiple environmental factors, often exhibiting non-stationary characteristics of long-period quasi-steady state and short-term nonlinear abrupt changes, and does not follow a strict normal distribution law, and the sample is scarce. If the traditional 3... The rule forces the model to construct statistical boundaries based on global dispersion, which can lead to misjudgments of the true range of data fluctuations and drastically widen the confidence interval and control limits. This broad threshold will produce a significant masking effect, causing early, minor anomalies to be submerged within excessively large safety margins, thus failing to provide effective early warning of potential risks to the tailings dam seepage line. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a method, system, equipment, and medium for identifying anomalies in the seepage lines of tailings dams.
[0005] To achieve the above objectives, the present invention provides a method for identifying anomalies in the seepage line of a tailings dam, comprising: Data on the seepage line and environmental factors at different times were collected from the target tailings dam to construct a time tensor matrix.
[0006] The time tensor matrix is input into the trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam. Based on the seepage line monitoring data and the predicted value of the seepage line, the prediction residuals at each time point are obtained to form a residual sequence. The residual sequence is resampled using Bootstrap to obtain resampled samples, and the percentiles of the resampled samples are used to construct a static confidence interval. A sliding window is used to extract residual subsequences from the residual sequence, and the residual subsequences are resampled using Bootstrap. Based on the percentiles of the resampled results, a dynamic confidence interval is constructed.
[0007] Anomaly identification and judgment are performed on the prediction results of the CT-MHA-GRU model based on static confidence intervals and dynamic confidence intervals.
[0008] Preferably, the CT-MHA-GRU model is constructed by introducing a channel-wise temporal attention mechanism CT-MHA before the GRU layer of the traditional GRU model. The CT-MHA mechanism changes the multi-channel unified projection of the input projection layer in the traditional multi-head attention mechanism MHA to channel-wise independent projection; changes the high-dimensional subspace partitioning of the multi-head computation layer in the traditional multi-head attention mechanism MHA to a single-channel independent head, and the number of heads is strictly consistent with the number of channels; changes the high-dimensional feature stitching of the output layer in the traditional multi-head attention mechanism MHA to channel-wise temporally weighted feature stitching, and designs a cross-channel fusion linear layer.
[0009] Preferably, the time tensor matrix is input into a pre-trained CT-MHA-GRU model to obtain the predicted value of the phreatic line of the target tailings dam. Specifically, this includes: independently projecting the time tensor matrix channel by channel using CT-MHA; then using multiple parallel single-channel independent heads to adaptively weight the projection results of each input channel independently in the time dimension to obtain the output of each attention head; concatenating the outputs of all attention heads and performing a linear transformation to obtain a time step feature matrix with the same shape as the time tensor matrix; using a gated recurrent unit (GRU) to capture the long-term dependencies and dynamic changes of the time step feature matrix in chronological order, and outputting the hidden state of the last time step of the time step feature matrix; mapping the hidden state to a scalar value, which is the predicted value of the phreatic line of the target tailings dam at the next moment; and using the predicted value to identify anomalies in the target tailings dam.
[0010] Preferably, before training the CT-MHA-GRU model using the time tensor matrix, a data preprocessing step is also included: using the maximum mutual information coefficient to screen the features of the original collected infiltration line monitoring data and environmental factor data, and removing features with low correlation to the infiltration line; then normalizing the screened feature data; and constructing a time tensor matrix from the normalized data at different times according to a fixed sliding time window, which serves as the training input for the CT-MHA-GRU model.
[0011] Preferably, the step of judging the anomaly warning based on the prediction results of the CT-MHA-GRU model according to the static confidence interval and the dynamic confidence interval specifically includes: comparing the real-time prediction residual with the static control limit of the static confidence interval; if it exceeds the static control limit, a long-term trend anomaly alarm is triggered; comparing the real-time prediction residual with the dynamic control limit of the dynamic confidence interval; if it exceeds the dynamic control limit, a short-term mutation anomaly alarm is triggered; and when the real-time prediction residual exceeds both the static control limit and the dynamic control limit, an emergency anomaly alarm is triggered.
[0012] Preferably, the method for constructing the static confidence interval is as follows: based on all predicted residuals from the training phase, perform B bootstrap resamplings with replacement, extracting n residual samples each time; calculate the specified quantiles of each resampled sample to obtain the B group quantile values; take the average or median of the B group quantile values to determine the upper and lower bounds of the static confidence interval; the method for constructing the dynamic confidence interval is as follows: set the sliding window length, extract the residual subsequence within the most recent fixed number of days from the residual sequence; perform bootstrap resampling on the residual subsequence, calculate the specified quantiles of the resampled samples, and determine the upper and lower bounds of the dynamic confidence interval at the current time; as new monitoring data is collected, the sliding window moves forward, the residual subsequence is re-extracted, and the dynamic confidence interval is updated.
[0013] Preferably, the Bootstrap resampling number B is 1000 times. For the static confidence interval, the percentiles are 2.5% and 97.5%, constructing a 95% confidence level; for the dynamic confidence interval, the percentiles are 0.15% and 99.85%, constructing a 99% confidence level.
[0014] The present invention also provides an anomaly identification system for tailings dam seepage lines, comprising: The data acquisition module is used to collect phreatic line monitoring data and environmental factor data of the target tailings dam at different times and construct a time tensor matrix.
[0015] The calculation module is used to input the time tensor matrix into the pre-trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam; to obtain the prediction residuals at each time step based on the seepage line monitoring data and the predicted value of the seepage line, thus forming a residual sequence; to perform Bootstrap resampling on the residual sequence to obtain resampled samples, and to construct a static confidence interval based on the percentiles of the resampled samples; to extract residual subsequences from the residual sequence using a sliding window, to perform Bootstrap resampling on the residual subsequences, and to construct a dynamic confidence interval based on the percentiles of the resampling results.
[0016] The identification module is used to identify and judge anomalies in the prediction results of the CT-MHA-GRU model based on static confidence intervals and dynamic confidence intervals.
[0017] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps in the tailings dam phreatic line anomaly identification method.
[0018] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, can execute any of the steps in the tailings dam phreatic line anomaly identification method.
[0019] The anomaly identification method for tailings dam seepage lines provided by this invention has the following beneficial effects: This invention constructs a CT-MHA-GRU prediction model and employs Bootstrap resampling technology to directly extract percentiles from the empirical distribution of residuals to construct confidence intervals. The static confidence interval is based on the residuals of the entire training set, reflecting the overall historical fluctuation range; the dynamic confidence interval is based on recent residuals within a sliding window, adapting to the current local distribution in real time, thus solving the problems of excessively wide global thresholds and distribution mismatch. The combination of Bootstrap nonparametric estimation and sliding window enables the threshold to automatically adjust with data fluctuations, avoiding false alarms during stable periods while maintaining high sensitivity during periods of fluctuation. Attached Figure Description
[0020] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating an anomaly identification method for the seepage line of a tailings dam according to an embodiment of the present invention; Figure 2 This is an embodiment of the CT-MHA-GRU-based infiltration line anomaly detection model of the present invention; Figure 3 The monitoring data is from an embodiment of the present invention; Figure 4 Comparison of predicted residuals for monitoring point model in embodiment of the present invention; Figure 5 Comparison of prediction residuals of the S2 monitoring point model in embodiments of the present invention; Figure 6 The prediction results and confidence intervals of the CT-MHA-GRU model in this embodiment of the invention are shown below. Figure 7The control limits for the predicted residuals of the CT-MHA-GRU model in this embodiment of the invention; Figure 8 The dynamic window control limit for the CT-MHA-GRU model in this embodiment of the invention. Detailed Implementation
[0022] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0023] This invention proposes an unsupervised anomaly detection framework that integrates Channel-wise Temporal Multi-Head Attention (CT-MHA) and Bootstrap. First, the CT-MHA module dynamically weights multi-source heterogeneous features, enhancing the model's ability to focus on key temporal features. A high-precision prediction model is then constructed using a GRU network to address the lag and smoothing issues of traditional models. Subsequently, a Bootstrap resampling technique is introduced to perform non-parametric estimation of the prediction residuals, constructing a dual early warning mechanism of "static global control limits and dynamic window control limits." The static threshold provides a long-term stable safety boundary, while the dynamic threshold, based on a 30-day sliding window, can sensitively capture local abrupt changes when the infiltration line transitions from a stable state to a fluctuating phase, thereby achieving highly sensitive anomaly identification and effectively controlling the false alarm rate.
[0024] Based on this, the present invention provides a method for identifying anomalies in the seepage lines of tailings dams, specifically as follows: Figure 1 As shown, it includes the following steps: S1. Collect phreatic line monitoring data and environmental factor data of the target tailings dam at different times, and construct a time tensor matrix.
[0025] In this embodiment, the dataset uses phreatic line monitoring data from a tailings dam in a mine in a certain province to verify the feasibility of the constructed anomaly detection model. Figure 3 As can be seen, the seepage line data showed a relatively stable trend from January 2022 to August 2023. However, starting from August 2023, the seepage line experienced frequent abrupt changes, resulting in significant phased differences in the data before and after this point in time. In other words, the data characteristics before and after August 2023 differed significantly, and can be considered as monitoring data from two different dam bodies. This disconnect between the two periods makes it difficult for the model to effectively learn the intrinsic relationships between variables.
[0026] Therefore, the research data was selected from August 1, 2023 to February 28, 2025, totaling 578 daily monitoring data points, and the dataset was divided into 8:1:1 ratios. The seepage lines detected in this anomaly detection were located at elevations S1, S2, S3, and S4 at 155m, 135m, 122m, and 108m of the tailings dam.
[0027] The original input variables considered features such as reservoir water level, dam displacement, rainfall, and dry beach line. However, these features have varying degrees of correlation with the seepage line, and most are nonlinear relationships. Therefore, this embodiment uses the Maximum Information Coefficient (MIC), a statistical indicator for measuring the correlation between variables, proposed by Reshef et al. in 2011. Unlike the traditional Pearson correlation coefficient, MIC can simultaneously detect linear, nonlinear, monotonic, or complex functional relationships. Its core idea is to divide the data points into different grids on a two-dimensional plane, calculate the mutual information between variables under different grids, standardize the results, and take the maximum value as the MIC. Its universality is broader than the Pearson coefficient. Based on the MIC correlation analysis results and combined with the performance of the deep learning model training, feature selection was performed, and the input variables were finally determined to be a time tensor matrix, including: seepage line monitoring points S1-S4, reservoir water level (RWL), dry beach monitoring points (GT1, GT2), and the horizontal displacement of dam displacement monitoring points (internal displacement NW1 / NW4, external displacement W3).
[0028] The infiltration line monitoring data is collected once a day. For missing data, linear interpolation is used to complete the data. Then, all filtered feature data are normalized to eliminate the influence of dimensions. Using a fixed sliding time window, the normalized data from different time steps are sequentially constructed into a three-dimensional time tensor matrix (number of samples × time step × number of features), which serves as the input to the CT-MHA-GRU model. The sliding window mechanism adaptively assigns weights to data at different time steps, effectively reducing the interference of outliers and noise.
[0029] S2. Input the time tensor matrix into the trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam; obtain the prediction residuals at each time point based on the seepage line monitoring data and the predicted value of the seepage line to form a residual sequence; perform Bootstrap resampling on the residual sequence to obtain resampled samples, and construct a static confidence interval based on the percentiles of the resampled samples; extract residual subsequences from the residual sequence using a sliding window, perform Bootstrap resampling on the residual subsequences, and construct a dynamic confidence interval based on the percentiles of the resampling results.
[0030] S201, CT-MHA-GRU Model Construction and Prediction The CT-MHA-GRU model of this invention is constructed by introducing a channel-wise temporal attention mechanism CT-MHA before the GRU layer of the traditional GRU model. The CT-MHA mechanism changes the multi-channel unified projection of the input projection layer in the traditional multi-head attention mechanism MHA to a channel-wise independent projection, thereby achieving decoupling between channels. It changes the high-dimensional subspace partitioning of the multi-head computation layer in the traditional multi-head attention mechanism MHA to a single-channel independent head, and the number of heads is strictly consistent with the number of channels. It changes the high-dimensional feature stitching of the output layer in the traditional multi-head attention mechanism MHA to a channel-wise temporally weighted feature stitching, and designs a cross-channel fusion linear layer.
[0031] The specific process of prediction using the CT-MHA-GRU model is as follows: First, the time tensor matrix is input into the CT-MHA module. CT-MHA performs independent channel-by-channel projection on the matrix, and then uses multiple parallel single-channel independent heads to adaptively weight the projection results of each input channel independently in the time dimension, obtaining the output of each attention head. The outputs of all attention heads are concatenated and linearly transformed to obtain a time-step feature matrix with the same shape as the input tensor. Subsequently, this feature matrix is input into a gated recurrent unit (GRU). The GRU captures the long-term dependencies and dynamic changes of the features in time sequence and outputs the hidden state of the last time step. Finally, the hidden state is mapped to a scalar value through a fully connected layer, which is the predicted value of the seepage line of the target tailings dam at the next time step.
[0032] By introducing a channel-wise temporal attention mechanism (CT-MHA) and a sliding window as the model input module, weights can be adaptively assigned to data at different time steps, effectively reducing the interference of outliers and noise on the prediction results. Simultaneously, the MHA structure enhances the model's ability to capture short-term abrupt changes. Furthermore, by combining the GRU model's ability to model long-term temporal dependencies, a synergistic characterization of short-term fluctuations and long-term trends in infiltration line changes is achieved. This method, while considering sensitivity to local changes, possesses strong noise robustness and engineering adaptability, and can better reflect the complex dynamic processes in actual monitoring environments.
[0033] The input variables considered features such as reservoir water level, dam displacement, rainfall, and dry beach line. However, these features have varying degrees of correlation with the seepage line, and inputting too many low-correlation features can affect prediction accuracy. Furthermore, the correlation between the seepage line and reservoir water level is not a simple linear relationship; there is a complex nonlinear relationship between them. Therefore, the maximum mutual information coefficient was used to perform correlation analysis on the features and select the input features. The root mean squared error (MSE) was used to define the loss function for model training, as shown in the formula below.
[0034] ; in, MSE This represents the mean square error value. M The total number of samples, i The index is the sample sequence number, representing the traversal from the first data point to the second. M One data point, For the first i The true value of each sample For the first i The predicted value for each sample, The residual represents the degree to which the predicted value of a single data point deviates from the true value.
[0035] Figure 4 and Figure 5 The comparison of prediction residuals for different models (CT-MHA-GRU, GRU, LSTM, MHA-LSTM) at monitoring points S1 and S2 for certain time periods in the test set is presented separately, combined with... Figure 4 and Figure 5 As can be seen from the curve trends, the residual curves of CT-MHA-GRU show higher peaks and more timely responses near the mutation points, and return to the zero axis more quickly after mutation, with a narrower overall fluctuation range. This confirms the enhancing effect of the multi-head attention mechanism on key temporal features and the robustness of the GRU structure with limited samples, providing a more stable and accurate residual sequence for subsequent confidence interval construction based on Bootstrap.
[0036] Table 1. Prediction performance of different models for the infiltration line As shown in Table 1, the prediction residual distributions of different deep learning models exhibit significant differences. For example, the residual fluctuations of the LSTM and GRU models even exceed ±0.2m, revealing that simple deep learning models have a significant lag when dealing with nonlinear abrupt changes such as the infiltration line. In contrast, the introduction of MHA significantly improves the model's prediction accuracy. It not only assigns different weights to features affecting the infiltration line but also reduces noise interference, accurately captures key feature changes, and enhances robustness. Comparing the prediction and anomaly detection results of the LSTM and MHA-LSTM models clearly demonstrates the substantial improvement in prediction accuracy brought about by the attention mechanism. For the limited monitoring data samples in this experiment, the compact GRU model effectively avoids the overfitting phenomenon caused by parameter redundancy in LSTM, exhibiting superior generalization performance while maintaining feature extraction capabilities.
[0037] S202, Confidence Interval Construction Based on Bootstrap After model training is complete, the trained CT-MHA-GRU model is used to predict the training set data, obtaining the prediction residuals at each time step, forming a residual sequence. Based on this residual sequence, this invention employs Bootstrap resampling technology to construct two sets of confidence intervals: static and dynamic.
[0038] Static confidence interval construction: Based on all prediction residuals from the training phase, perform B (B=1000 times in this embodiment) Bootstrap resampling with replacement, sampling n residual samples each time. Calculate the specified quantiles (2.5% and 97.5% in this embodiment, constructing a 95% confidence level) for each resampled sample to obtain the B-group quantile values. Take the average or median of the B-group quantile values to determine the upper and lower bounds of the static confidence interval. This interval reflects the overall error fluctuation range of the model under historical normal operating conditions.
[0039] Dynamic confidence interval construction: A sliding window length is set (30 days in this example), and a residual subsequence within the most recent fixed number of days is extracted from the residual sequence. Bootstrap resampling is performed on this subsequence, and the specified quantiles of the resampled samples are calculated (0.15% and 99.85% in this example, constructing a 99% confidence level), thereby determining the upper and lower bounds of the dynamic confidence interval at the current moment. As new monitoring data is collected, the sliding window moves forward, and the dynamic confidence interval is updated accordingly. This interval can adapt in real time to the local distribution characteristics of the current data.
[0040] S3. Based on the static confidence interval and dynamic confidence interval, perform anomaly identification and judgment on the prediction results of the CT-MHA-GRU model.
[0041] During the real-time monitoring phase, environmental factors and other data at the current moment are input into the trained CT-MHA-GRU model to obtain the real-time predicted value of the seepage line, and the real-time prediction residual between the predicted and measured values is calculated. In this invention, the detection interval is the normal fluctuation range composed of the static confidence interval and the dynamic confidence interval. If the real-time prediction residual falls within this interval, the dam body is determined to be in a normal state; if it exceeds this interval, an anomaly warning of the corresponding level is triggered.
[0042] Long-term trend anomaly assessment: The real-time predicted residuals are compared with the static control limits of the static confidence interval. If the residuals exceed the static control limits, a long-term trend anomaly alarm is triggered. This indicates that the current residuals statistically deviate significantly from the normal fluctuation range of the historical whole, potentially suggesting a long-term trend shift in the infiltration line. Figure 7 As shown, static control limits (such as the 99% control limit of ±0.09m) serve as fixed safety boundaries to capture global anomalies.
[0043] Figure 7The prediction residuals of the CT-MHA-GRU model on the S1 monitoring point test set and their corresponding static control limits are shown. The 99% control limit, constructed using Bootstrap based on all residuals from the training set, is ±0.09m, and the 95% control limit is ±0.04m. These two fixed thresholds serve as global statistical boundaries, reflecting the range of prediction error fluctuations under historical normal operating conditions. During the stable period (early January), the residual sequence of the CT-MHA-GRU model generally fluctuated slightly around the zero axis, but some points exceeded the 95% control limit; during the abrupt change period (late January), a significant peak appeared, far exceeding the 99% control limit; and during the subsequent volatile period (mid-to-late February), the residuals continued to oscillate significantly, frequently breaking through the static control limit. This phenomenon reveals the limitations of the static control limits: after structural changes occur in the sequence, the static thresholds constructed based on historical stable periods cannot adapt to the current high-frequency fluctuations, easily misjudging normal fluctuations as abnormalities, or losing their discriminative significance for continuous fluctuations. This is the core motivation for introducing dynamic window control limits in this invention. By updating the threshold in real time through a sliding window, the anomaly detection criteria can be adaptively adjusted according to the local features of the data, thereby reducing the false alarm rate while ensuring sensitivity.
[0044] It is worth noting the error threshold of CT-MHA-GRU The CT-MHA-GRU model outperforms the MHA-LSTM model. This phenomenon actually demonstrates that CT-MHA-GRU is more adaptable to this dataset. It accurately captures the true trend and its corresponding change characteristics in the training set, avoiding the problem of overly smooth predictions due to insufficient capture of short-term fluctuations. In contrast, MHA-LSTM follows the overall trend more strongly on this dataset, resulting in smoother predictions and thus compressed control limits. Taking the continuous upward trend starting on December 19, 2025 in the test set as an example, the peak value of this data segment did not break the historical extreme value of the training set and falls within the normal fluctuation range. However, the MHA-LSTM model, due to its excessively low control limits, misclassified it as a red alert. In contrast, the CT-MHA-GRU model, with its more reasonable threshold width, effectively avoids such false alarms. This indicates that CT-MHA-GRU significantly reduces the false alarm rate caused by improper threshold settings while maintaining sensitivity.
[0045] In-depth analysis of historical monitoring data at point S1 reveals that during the long period from January 2022 to August 2023, the infiltration line exhibited an approximately quasi-linear pattern with extremely low long-term fluctuations. This likely resulted in a narrow control limit for the static confidence interval estimated based on the full-sequence bootstrap. However, since August 2023, the sequence has entered a period of high-frequency fluctuations, with a significant increase in variance. Continuing to use the statically narrow threshold determined by stable data from the steady-state period would easily exceed the control limit, even for fluctuations under normal operating conditions, leading to a significant increase in the false alarm rate. To address this mismatch between historical steady-state and current dynamic distributions, a dynamic threshold based on a 30-day sliding window is introduced. This method can quickly "forget" distant, stable historical distributions and adaptively adjust the threshold width based on recent fluctuation levels, allowing the system to focus on sudden changes relative to the current baseline without being diluted by earlier stable samples. Dynamic thresholds, while maintaining long-term fixed control limits as the overall safety interface, provide more sensitive short-term early warning capabilities, thereby effectively reducing false alarms when structural mutations occur in the sequence and improving the timeliness and robustness of anomaly detection.
[0046] Short-term mutation anomaly detection. The real-time predicted residual is compared to the dynamic control limits of the dynamic confidence interval. If the dynamic control limits are exceeded, a short-term mutation anomaly alarm is triggered. Figure 8 As shown, the width of the dynamic control limit will adaptively adjust with the volatility of recent data. It is narrower during stable periods to improve sensitivity and moderately wider during volatile periods to avoid false alarms, which can effectively capture local abrupt changes in the infiltration line. Figure 8The dynamic control limits of the CT-MHA-GRU model, constructed using a 30-day sliding window, were demonstrated on the S1 monitoring point test set. The static 99.7% control limit, constructed based on the entire historical residuals, was a fixed value of ±0.04m, and the 95% control limit was ±0.05m. During stable periods (e.g., early January), the residuals generally fluctuated around the static control limits. However, on January 14th, the residual of -0.06m exceeded the static 99% control limit, which would trigger false alarms if relying solely on the static threshold. During periods of fluctuation (mid-to-late February), the static control limits were too narrow, leading to consecutive residual exceedances (e.g., -0.11m on February 10th and -0.14m on February 28th), making it impossible to distinguish between normal fluctuations and true anomalies. The dynamic control limit width, constructed based on a 30-day sliding window, changes in real time with the level of local fluctuations: during the stable period (early January), the residual variance within the window is small, and the dynamic control limit is relatively narrow (±0.04m), comparable to the static limit. The residual of -0.04m does not exceed the limit, ensuring accurate discrimination. The dynamic control limit (the upper and lower boundary curves in the figure) changes dynamically over time, being narrower during the stable period (early January), rapidly responding and appropriately widening during the abrupt change period (late January), and adaptively widening to a reasonable range during the period of sustained fluctuation (February). Compared with the static control limit (the horizontal line in the figure), the dynamic control limit can both sensitively capture sudden anomalies (such as January 23) and accommodate normal fluctuations with increased sequence variance (such as mid-to-late February), perfectly solving the false alarm problem caused by the mismatch between historical steady state and current dynamic distribution. This verifies the core value of the dynamic window mechanism in the detection of anomalies in non-stationary sequences, ensuring that the discrimination criteria are always consistent with recent data characteristics, achieving a balance between high sensitivity and low false alarm rate.
[0047] To evaluate the reliability of the prediction interval, the anomaly rate (AR) is introduced as an evaluation metric. AR measures the proportion of samples in the test set not covered by the prediction interval (PI), and is defined as the ratio of the number of sample points falling outside the prediction interval to the total number of samples in the test set. A lower AR value indicates that the prediction interval has higher coverage and can more accurately reflect the uncertainty range of the model.
[0048] ; N out To determine the number of sample points in the test set that fall outside the prediction interval; N total This represents the total number of samples in the test set; the value of AR typically ranges from 0% to 100%.
[0049] When the prediction interval is defined by the upper and lower bounds ( L t , U t When denoted as ), whether the t-th sample is an outlier can be expressed as: ; ; in, It is a Boolean indicator function used to identify whether a sample falls outside the prediction interval.
[0050] The CT-MHA-GRU achieved completely consistent static AR2 values (3.64%) at both measurement points S1 and S2, indicating that its prediction error exhibits significant statistical consistency across different scenarios. Despite significant differences in the dynamic characteristics among the monitoring points, the model prediction residuals stably conform to the same statistical paradigm characterized by the global bootstrap confidence interval. This cross-point monitoring robustness implies that the model possesses strong endogenous robustness in its structure, enabling it to maintain stable error constraints under heterogeneous operating conditions, thereby effectively suppressing systematic false alarms driven by environmental noise.
[0051] Figure 6The results show the predictions of the CT-MHA-GRU model on the S1 monitoring point test set and the 95% confidence interval constructed based on Bootstrap. During the stationary period (e.g., January 5, 2025), the predicted value (16.62m) is very close to the actual value (16.60m), with a narrow confidence interval (16.58~16.62m), accurately covering the actual value and reflecting the model's accurate predictive ability during the stationary phase. Before the abrupt change (e.g., January 14, 2025), the actual value begins to rise slowly (16.70m), while the predicted value (16.65m) is slightly lower than the actual value but still falls within the confidence interval (16.65~16.75m), indicating that the model has already begun to respond to the trend change. During the abrupt change period (e.g., January 23, 2025), the actual value reached 16.55m, while the predicted value was 16.45m, resulting in a prediction bias of 0.10m. However, the actual value still fell within the upper boundary of the confidence interval (16.45~16.55m), indicating that the confidence interval successfully covered the actual value at the time of the abrupt change without any systematic shift. During the subsequent fluctuation period (e.g., February 19 to February 28, 2025), the actual value rose from 16.25m to 17.70m, while the predicted value rose from 16.15m to 17.60m. The two values showed good synchronization, and the confidence interval width adaptively adjusted with the fluctuation amplitude, consistently covering the actual value, demonstrating the model's adaptability to dynamic changes. The prediction curve (dashed line) and the actual value curve (solid line) of the CT-MHA-GRU model maintained a high degree of consistency throughout the entire period, especially during the sharp increase at the end of February 2025, where the predicted value promptly followed the actual changes without significant lag. The 95% confidence interval (shaded area) constructed based on Bootstrap has a moderate width, neither too broad and distorted due to excessive conservatism nor too aggressive and prone to frequent underreporting; the true value curve always lies within the shaded area. This verifies the high accuracy of the CT-MHA-GRU model's predictions and the reliability of the Bootstrap confidence interval in uncertainty quantification, providing an accurate statistical benchmark for subsequent residual-based anomaly detection.
[0052] Meanwhile, the introduction of the Bootstrap method effectively overcomes the limitations of the traditional static threshold-dependent normal distribution assumption, enabling confidence intervals to adapt to the prevalent non-normal and abrupt changes in infiltration line sequences. The evolution of the confidence intervals shows that the residual distribution of CT-MHA-GRU is more concentrated, ensuring that the intervals generated by Bootstrap maintain a central position consistent with the actual dynamics during abrupt changes. For example, during the abrupt increase phase on February 15, 2025, CT-MHA-GRU can track changes quickly with smaller prediction bias; therefore, the Bootstrap confidence interval did not experience a systematic shift and still covered the actual observations for that period. In contrast, MHA-LSTM, due to its delayed response to abrupt changes, experiences a shift in its prediction residuals within the abrupt change interval, causing the overall confidence interval to deviate from the true value, thus reducing the coverage for that period. Although the overall evaluation metrics (R², RMSE) of the two are only slightly different, the coverage performance of the confidence intervals at abrupt change points reveals the essential difference in their "dynamic adaptability," further highlighting the reliability of CT-MHA-GRU in uncertainty quantification.
[0053] The so-called anomaly detection framework essentially constructs a dynamic safety boundary based on the quantification of uncertainty in model predictions. Here, the residual control limit is not an independently set static threshold, but a dynamic boundary derived mathematically from the Bootstrap prediction confidence interval. For LSTM and GRU models, due to their insufficient ability to extract nonlinear abrupt changes in the infiltration line, the Bootstrap algorithm constructs a broad confidence interval to cover higher prediction uncertainties. In contrast, the CT-MHA-GRU model, with its simpler gating structure and channel-by-channel temporal attention feature weighting, performs better in capturing dynamic trends and responding to abrupt changes.
[0054] When the real-time predicted residual exceeds both the static and dynamic control limits simultaneously, an emergency anomaly alarm is triggered, indicating a serious anomaly that deviates from both historical patterns and recent trends. The core function of the short-term detection mechanism is that, as the wetting line transitions from a stable to a fluctuating state, the dynamic threshold can avoid frequent false alarms caused by overly narrow control limits during the stable period, while providing timely anomaly identification capabilities in the early stages of fluctuation. Furthermore, tailings dams may gradually increase in height as dry beach deposits accumulate, and the dam structure's operating conditions evolve over time, causing models trained based on historical data to become less suitable for the new operating conditions. Compared to static thresholds, dynamic thresholds can maintain stable and timely anomaly detection capabilities in the early stages of dam condition changes, providing a supplementary early warning framework for long-term monitoring.
[0055] This invention establishes a tailings dam seepage line anomaly detection model based on CT-MHA-GRU, such as... Figure 2As shown. The first step involves inputting historical data on the infiltration line into the CT-MHA-GRU model for training, establishing a high-precision infiltration line prediction model. The second step is to calculate the prediction residual sequence and construct a static anomaly baseline using the Bootstrap percentile method. And combine the dynamic window method to determine the adaptive dynamic error threshold. The third step involves inputting real-time monitoring data into the model to obtain the predicted value for the current moment. This predicted value is then combined with a pre-calculated error threshold to construct a prediction interval (PI) for final judgment. If the real-time predicted seepage line falls within this prediction interval (PI), the dam is deemed safe; otherwise, an alarm is issued.
[0056] Tailings dam seepage lines are long-term, continuous monitoring targets. However, on-site personnel often lack the expertise to label data for anomalies, thus necessitating an unsupervised or weakly supervised anomaly detection mechanism suitable for real-world conditions. This invention addresses the non-stationarity and structural abrupt changes in tailings dam seepage line monitoring data, proposing an unsupervised anomaly detection framework based on the CT-MHA-GRU prediction model and Bootstrap confidence intervals. This method enhances the GRU's feature attention capability in multivariate sequences through a multi-head attention mechanism and constructs a dual-scale early warning mechanism consisting of a static global control limit and a dynamic sliding window short-term threshold. Experimental results show that this framework can simultaneously identify long-term shift trends and short-term abrupt changes under label-free conditions, exhibiting excellent stability under complex operating conditions. The main conclusions are as follows:
[0057] (1) Thanks to the effective capture of key feature changes by the attention mechanism, CT-MHA-GRU achieved the lowest RMSE (0.0783) and the highest R² (0.9369) at the S1 measurement point, demonstrating the best prediction performance. The prediction error was significantly lower than the baseline models LSTM (RMSE=0.1094), GRU (RMSE=0.0864), and MHA-LSTM (RMSE=0.0822). Its prediction sequence was able to better follow the high-frequency fluctuations at the beginning of 2025, effectively alleviating the lag problem commonly found in deep models during periods of drastic change, and providing a more stable baseline for subsequent residual-based anomaly detection.
[0058] (2) Under the condition that the short-term change trends of the data vary at different monitoring points in the test set, the residuals of CT-MHA-GRU still converge within a narrow statistical range. Its static red alarm rate at monitoring points S1 and S2 is as low as 3.64%, which is much lower than the 27.27% of the benchmark model LSTM and the 10.91% of MHA-LSTM. This result shows that CT-MHA-GRU exhibits good global robustness under global sample bootstrap statistics and effectively reduces systematic false alarms caused by model fitting errors.
[0059] (3) The dynamic confidence interval constructed based on the 30-day sliding window can characterize the local statistical structure of recent data, enabling CT-MHA-GRU to adjust the discrimination boundary in a timely manner when structural mutations occur, thus achieving an adaptive response to anomalies. In the experiment, its dynamic red alarm rate reached 21.82%, effectively identifying anomalous mutations on a short time scale under label-free conditions.
[0060] Based on the same inventive concept, this invention also provides an anomaly identification system for tailings dam seepage lines, comprising: The data acquisition module is used to collect phreatic line monitoring data and environmental factor data of the target tailings dam at different times and construct a time tensor matrix.
[0061] The calculation module is used to input the time tensor matrix into the pre-trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam; to obtain the prediction residuals at each time step based on the seepage line monitoring data and the predicted value of the seepage line, thus forming a residual sequence; to perform Bootstrap resampling on the residual sequence to obtain resampled samples, and to construct a static confidence interval based on the percentiles of the resampled samples; to extract residual subsequences from the residual sequence using a sliding window, to perform Bootstrap resampling on the residual subsequences, and to construct a dynamic confidence interval based on the percentiles of the resampling results.
[0062] The identification module is used to identify and judge anomalies in the prediction results of the CT-MHA-GRU model based on static confidence intervals and dynamic confidence intervals.
[0063] This invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned method for identifying anomalies in the seepage lines of tailings dams.
[0064] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described method for identifying anomalies in tailings dam seepage lines.
[0065] Specific limitations regarding the calculation system for the anomaly identification method of tailings dam seepage lines can be found in the limitations of the anomaly identification method for tailings dam seepage lines mentioned above, and will not be repeated here. Each module in the aforementioned anomaly identification system for tailings dam seepage lines can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0066] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. Furthermore, the above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for identifying anomalies in the seepage line of a tailings dam, characterized in that, Includes the following steps: Collect seepage line monitoring data and environmental factor data of the target tailings dam at different times, and construct a time tensor matrix; The time tensor matrix is input into the trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam; the prediction residuals at each time point are obtained based on the seepage line monitoring data and the predicted value of the seepage line to form a residual sequence; the residual sequence is resampled using Bootstrap to obtain resampled samples, and the percentiles of the resampled samples are obtained to construct a static confidence interval. A sliding window is used to extract residual subsequences from the residual sequence, and Bootstrap resampling is performed on the residual subsequences. Dynamic confidence intervals are constructed based on the percentiles of the resampling results. Anomaly identification and judgment are performed on the prediction results of the CT-MHA-GRU model based on static confidence intervals and dynamic confidence intervals.
2. The method for anomaly identification of tailings dam seepage lines according to claim 1, characterized in that, The CT-MHA-GRU model is constructed by introducing a channel-wise temporal attention mechanism (CT-MHA) before the GRU layer in the traditional GRU model. The CT-MHA mechanism changes the multi-channel unified projection of the input projection layer in the traditional multi-head attention mechanism (MHA) to channel-wise independent projection; it changes the high-dimensional subspace partitioning of the multi-head computation layer in the traditional multi-head attention mechanism (MHA) to a single-channel independent head, and the number of heads is strictly consistent with the number of channels; it changes the high-dimensional feature stitching of the output layer in the traditional multi-head attention mechanism (MHA) to channel-wise temporally weighted feature stitching, and designs a cross-channel fusion linear layer.
3. The method for identifying anomalies in the seepage line of a tailings dam according to claim 2, characterized in that, The time tensor matrix is input into a pre-trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam. Specifically, this involves: independently projecting the time tensor matrix channel by channel using CT-MHA; then using multiple parallel single-channel independent heads to adaptively weight the projection results of each input channel independently in the time dimension to obtain the output of each attention head; concatenating the outputs of all attention heads and performing a linear transformation to obtain a time step feature matrix with the same shape as the time tensor matrix; using a gated recurrent unit (GRU) to capture the long-term dependencies and dynamic changes of the time step feature matrix in chronological order, and outputting the hidden state of the last time step of the time step feature matrix; mapping the hidden state to a scalar value, which is the predicted value of the seepage line of the target tailings dam at the next moment; and using the predicted value to identify anomalies in the target tailings dam.
4. The method for identifying anomalies in the seepage line of a tailings dam according to claim 1, characterized in that, Before training the CT-MHA-GRU model using the time tensor matrix, a data preprocessing step is also included: using the maximum mutual information coefficient to screen the features of the original collected infiltration line monitoring data and environmental factor data, and removing features with low correlation to the infiltration line; then normalizing the screened feature data; and constructing a time tensor matrix from the normalized data at different times according to a fixed sliding time window, which serves as the training input for the CT-MHA-GRU model.
5. The method for identifying anomalies in the seepage line of a tailings dam according to claim 1, characterized in that, The method of judging anomalies in the prediction results of the CT-MHA-GRU model based on static and dynamic confidence intervals specifically includes: comparing the real-time prediction residuals with the static control limits of the static confidence interval; if the residuals exceed the static control limits, a long-term trend anomaly alarm is triggered; comparing the real-time prediction residuals with the dynamic control limits of the dynamic confidence interval; if the residuals exceed the dynamic control limits, a short-term mutation anomaly alarm is triggered; and when the real-time prediction residuals exceed both the static and dynamic control limits, an emergency anomaly alarm is triggered.
6. The method for anomaly identification of tailings dam seepage lines according to claim 1, characterized in that, The method for constructing the static confidence interval is as follows: based on all prediction residuals during the training phase, perform B bootstrap resamplings with replacement, and extract n residual samples each time. Calculate the specified quantiles of each resampled sample to obtain the B group quantile values; take the average or median of the B group quantile values to determine the upper and lower bounds of the static confidence interval; the method for constructing the dynamic confidence interval is as follows: set the sliding window length, extract the residual subsequence within the most recent fixed number of days from the residual sequence; perform Bootstrap resampling on the residual subsequence, calculate the specified quantiles of the resampled samples, and determine the upper and lower bounds of the dynamic confidence interval at the current time; as new monitoring data is collected, the sliding window moves forward, the residual subsequence is re-extracted, and the dynamic confidence interval is updated.
7. The method for anomaly identification of tailings dam seepage lines according to claim 6, characterized in that, The Bootstrap resampling frequency B is 1000 times. For the static confidence interval, the percentiles are 2.5% and 97.5%, constructing a 95% confidence level; for the dynamic confidence interval, the percentiles are 0.15% and 99.85%, constructing a 99% confidence level.
8. An anomaly identification system for the seepage line of a tailings dam, characterized in that, include: The data acquisition module is used to collect phreatic line monitoring data and environmental factor data of the target tailings dam at different times and construct a time tensor matrix; The calculation module is used to input the time tensor matrix into the trained CT-MHA-GRU model to obtain the predicted value of the seepage line of the target tailings dam; to obtain the prediction residuals at each time point based on the seepage line monitoring data and the predicted value of the seepage line, and to form a residual sequence; to perform Bootstrap resampling on the residual sequence to obtain resampled samples, and to obtain the percentiles of the resampled samples to construct a static confidence interval. A sliding window is used to extract residual subsequences from the residual sequence, and Bootstrap resampling is performed on the residual subsequences. Dynamic confidence intervals are constructed based on the percentiles of the resampling results. The identification module is used to identify and judge anomalies in the prediction results of the CT-MHA-GRU model based on static confidence intervals and dynamic confidence intervals.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to perform the steps of the method according to any one of claims 1 to 7.