Tunnel surrounding rock time sequence deformation monitoring data anomaly detection method and device combined with LSTM and auto-encoder, and medium

By combining the deep learning model of LSTM and autoencoder, the problem of low threshold warning reliability caused by poor data quality and high noise in tunnel automation monitoring is solved, and automatic and accurate abnormal detection of tunnel surrounding rock monitoring data is realized, and the reliability of construction safety is improved.

CN120145119APending Publication Date: 2025-06-13CENT SOUTH UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510304890.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the existing tunnel automation monitoring, traditional threshold warning has low reliability due to poor data quality and high noise, making it difficult to achieve automatic and accurate abnormal detection of tunnel surrounding rock monitoring data.

Method used

A deep learning model combining LSTM and autoencoder was designed to realize abnormal detection of tunnel surrounding rock monitoring data by comparing the errors of the original monitoring data with the reconstruction signal.

Benefits of technology

Automatic and accurate abnormal detection of tunnel surrounding rock monitoring data is realized, the construction safety reliability is improved, and the problem of low reliability of traditional threshold warning is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145119A_ABST
    Figure CN120145119A_ABST
Patent Text Reader

Abstract

The invention provides a tunnel surrounding rock time sequence deformation monitoring data anomaly detection method and device combined with an LSTM and an auto-encoder, and a medium. The tunnel surrounding rock time sequence deformation monitoring data anomaly detection method combining the LSTM and the auto-encoder comprises the following steps: step 1, cleaning original monitoring data; 2, constructing a data set; step 3, constructing a self-encoding LSTM neural network model; 4, model training; 5, performing model testing and performance evaluation; and 6, deploying the model. According to the tunnel surrounding rock time sequence deformation monitoring data anomaly detection method and device combined with the LSTM and the auto-encoder and the medium, the problem that in existing tunnel automatic monitoring, due to the fact that the data quality is poor and noise is large, traditional threshold value early warning is low in reliability can be solved, the efficient deep learning model is constructed, and the reliability of the tunnel surrounding rock time sequence deformation monitoring data anomaly detection is improved. And automatic and accurate anomaly detection of tunnel surrounding rock monitoring data is realized, so that reliable guarantee is provided for tunnel construction safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of abnormal detection of tunnel surrounding rock time-series deformation monitoring data, and particularly relates to a method, device and medium for abnormal detection of tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder. Background Technique

[0002] During the excavation process of tunnel engineering, the deformation of the surrounding rock is the main cause of accidents such as collapses and water inrushes. According to statistics, about 30% of global tunnel construction accidents are related to the out-of-control deformation of the surrounding rock. In the complex process of tunnel excavation, ensuring construction safety has always been the top priority, and carrying out monitoring and measurement on the tunnel surrounding rock is the key means to ensure construction safety. By monitoring parameters such as the displacement and stress of the tunnel surrounding rock, the deformation trend and potential risks of the surrounding rock can be detected in time, providing a strong basis for construction decision-making.

[0003] Early monitoring and measurement mainly relied on manual operation. Monitoring personnel needed to regularly go to the tunnel construction site to collect data using measuring instruments such as level gauges and total stations. This method not only consumed a large amount of manpower, material resources and time, but also had a low monitoring frequency and was difficult to capture the dynamic changes of the surrounding rock in real time.

[0004] With the rapid development of sensor technology and Internet of Things technology, tunnel monitoring and measurement has gradually achieved automation. Nowadays, various sensors such as displacement sensors and pressure sensors can be easily installed on the surface or key internal parts of the tunnel surrounding rock. These sensors can collect monitoring data in real time and transmit the data to the data processing center through Internet of Things communication technology. Automated monitoring has greatly improved the degree of automation of data collection, resulting in a significant increase in both the data volume and data frequency. In some large tunnel projects, the automated monitoring system can collect data once a minute. Compared with manual monitoring, the data volume can increase hundreds of times in a day.

[0005] Essentially, the core of monitoring and early warning lies in the abnormal detection of time-series monitoring data. If a computer can automatically and accurately identify the abnormal state in the monitoring data, it can timely and effectively send a prompt to the construction personnel, winning precious time for ensuring construction safety.

[0006] Therefore, in view of the above problems, the present invention preprocesses a large amount of historical monitoring data to carefully create a data set. At the same time, an innovative deep learning model combining LSTM (Long Short-Term Memory Network) and autoencoder is designed. The model accurately realizes the abnormal detection of monitoring data by comparing the error between the original monitoring data and the reconstructed signal, assisting professional personnel in early warning judgment and decision-making to solve its technical problems. Summary of the Invention

[0007] The technical problem solved by the present invention is to provide a method, device and medium for anomaly detection of time-series deformation monitoring data of tunnel surrounding rock, which combines LSTM and autoencoder, and can solve the problem of low reliability of traditional threshold warning in existing tunnel automatic monitoring due to poor data quality and a lot of noise. By constructing an efficient deep learning model, automatic and accurate anomaly detection of tunnel surrounding rock monitoring data is realized, thus providing a reliable guarantee for tunnel construction safety.

[0008] To solve the above technical problem, the method for anomaly detection of time-series deformation monitoring data of tunnel surrounding rock, which combines LSTM and autoencoder, provided by the present invention includes the following steps: Step 1: Cleaning of original monitoring data;

[0009] Step 2: Construction of a data set;

[0010] Step 3: Construction of an autoencoding LSTM neural network model;

[0011] Step 4: Model training;

[0012] Step 5: Model testing and performance evaluation;

[0013] Step 6: Model deployment.

[0014] As a further solution of the present invention, the cleaning of the original monitoring data in the above Step 1 includes the following steps:

[0015] S1. Outlier removal: Using the 3σ criterion, for a set of monitoring data, calculate its mean μ and standard deviation σ. The 3σ criterion, also known as the Pauta criterion, is a discrimination criterion based on the normal distribution. In the normal distribution, the probability that the data falls within the range of about 3 times the standard deviation σ on both sides of the mean μ is very high, about 99.73%. Therefore, in the production process, experiment or other practical applications, if a data point exceeds this range, it is considered that the data point may be an outlier or there is a special situation. This is the basic idea of the 3σ criterion. The calculation formulas for the mean and standard deviation of the data are as follows:

[0016]

[0017]

[0018] In the above two formulas, X i is the specific data, μ is the mean, σ is the standard deviation, and n is the number of data. According to the 3σ criterion, the reasonable range of the data should be between [μ - 3σ, μ + 3σ]. If it is outside this range, the data point is determined to be an outlier and is removed;

[0019] S2. Missing value handling: For a small number of missing values, linear interpolation is used for filling. The principle of linear interpolation is based on the mathematical principle that two points determine a straight line. Suppose in a set of data, two adjacent data points (x1, y1) and (x2, y2) are known, and there is a missing value y at a certain x between x1 and x2. A straight line can be determined through these two known points, and the equation of this straight line can be expressed as:

[0020]

[0021] Using this equation, the missing y value can be calculated based on the value of x, thereby realizing the estimation and filling of the missing value;

[0022] S3. Equal-spacing processing: Since there may be inconsistent data acquisition time intervals in the automated monitoring system, it is necessary to perform equal-spacing processing on the monitoring data. Based on time, the non-equal-spacing data is resampled by the linear interpolation (Formula 3) method to make it an equal-time interval data sequence, and unified processing is carried out at 10-minute intervals.

[0023] As a further solution of the present invention, the dataset construction in step 2 includes the following steps:

[0024] S1. Select data under normal working conditions from the historical tunnel surrounding rock monitoring data. The judgment basis for normal working condition data can be the data within the time period when various parameters during construction are stable and there is no obvious abnormal deformation of the surrounding rock. For example, the data collected within the time period when the surrounding rock displacement rate is stable at 0.1 - 0.3 mm / d and the stress change is within a reasonable range can be identified as normal working condition data. In addition, it is also necessary to use the monitoring data under abnormal working conditions to generate an abnormal dataset, which is merged with 20% of the normal working conditions to construct a test set for evaluating the model detection performance;

[0025] S2. Segment the normal working condition data in a sliding window manner. The window length is set to 24h, that is, 144 data points, and the sliding step is 1h. Starting from the starting position of the data sequence, data subsequences with a length of 24h are intercepted in turn, and each time it slides backward by 1 hour until the entire normal working condition data sequence is traversed. These subsequences constitute the dataset for model training and testing.

[0026] As a further solution of the present invention, the construction of the autoencoder LSTM neural network model in step 3 includes the following steps:

[0027] S1. Aiming at the problem of anomaly detection in tunnel surrounding rock deformation monitoring data, a neural network called Autoencoder LSTM is designed. This network consists of two parts: an encoder and a decoder. The encoder compresses the input tunnel surrounding rock deformation monitoring data into a low-dimensional feature representation, and the decoder then restores this low-dimensional feature back to the dimension of the original data, attempting to reconstruct the original input data. After training the network on normal data, when new data is input, the error between the reconstructed original data and the reconstructed data is calculated to determine whether the data is abnormal. If the reconstruction error exceeds a certain threshold, the data is considered abnormal.

[0028] S2. In the encoder part, it mainly includes an input layer, an LSTM layer, and a fully connected layer (encoding layer). The input layer receives the tunnel surrounding rock deformation monitoring data, and the data dimension is usually [batch_size, sequence_length, n_features]. The batch_size is set to 64, the sequence_length is 144, and n_features is 3 (horizontal displacement, vertical displacement, temperature). The LSTM layer uses one or more LSTM units to process the input data. The LSTM can effectively handle the long-term dependencies in time series data and is very suitable for data such as tunnel surrounding rock deformation that changes over time. Each layer of LSTM receives the output of the previous layer as input and outputs a hidden state, and its output shape is [batch_size, sequence_length, n_hidden]. The LSTM layer is set to 2 layers, with n_hidden of the first layer set to 64 and n_hidden of the second layer set to 32. The fully connected layer (encoding layer) part reduces the dimension of the output of the LSTM layer through a fully connected layer to obtain a low-dimensional encoded representation. The number of neurons in the fully connected layer is usually much smaller than the number of features of the input data. Then, the high-dimensional features output by the LSTM layer are compressed into a 16-dimensional code, and the output shape is [batch_size, 16].

[0029] As a further solution of the present invention, the decoder part mainly includes a fully connected layer (decoding layer), an LSTM layer, and an output layer. The fully connected layer (decoding layer) corresponds to the encoding layer of the encoder, takes the low-dimensional code as input, and increases the dimension through the fully connected layer, and the output shape of this layer is [batch_size, sequence_length * 32]. The LSTM layer takes the output of the fully connected layer as input and gradually restores the time series features of the data, and the output shape is [batch_size, sequence_length, 64]. The output layer is a fully connected layer for integrating the output into the same dimension as the output, that is, [batch_size, 144, 3].

[0030] As a further solution of the present invention, the model training in step 4 includes the following steps:

[0031] S1. Divide the constructed data set into a training set, a validation set, and a normal working condition test set according to a ratio of 6:2:2. The normal working condition test set and the abnormal working condition test set are combined to form a test set. The training set is used for learning and optimizing the model parameters, the validation set is used to evaluate the performance of the model during training to prevent overfitting of the model, and the test set is used to finally evaluate the generalization ability of the trained model;

[0032] S2. Use the training set to train the autoencoder LSTM neural network model. During the training process, the Adam algorithm is used to update the model parameters. Set the learning rate to 0.001 and the number of training epochs to 10,000. To improve the prediction effect, the following loss function is designed:

[0033]

[0034] In the formula, loss is the loss value, R 2 is the goodness of fit, Y true is the true output value of the model, Y predict is the predicted output value of the model;

[0035] S3. In each round of training, input the training set data into the model in sequence, calculate the loss function between the model output and the true label, calculate the gradient through the backpropagation algorithm, and update the model parameters to make the loss of the model on the training set gradually decrease.

[0036] As a further solution of the present invention, the model testing and performance evaluation in step 5 include the following steps:

[0037] S1. The trained neural network calculates the loss of the training set using formula (4), and statistically analyzes the range of the loss value to obtain the loss threshold under normal working conditions. Then, calculate the loss of all samples in the test set using formula (4), and combine the loss threshold to judge whether the sample category in the test set is normal or abnormal, and calculate the performance indicators of classification accuracy, precision, recall, and F1-score, which can intuitively evaluate the performance of the anomaly detection model proposed by the present invention. The formula is as follows:

[0038]

[0039]

[0040] In the above formula, TP (True Positive) represents the true positive example, that is, the number of samples that are actually positive examples and are predicted as positive examples by the model. TN (True Negative) represents the true negative example, that is, the number of samples that are actually negative examples and are predicted as negative examples by the model. FP (False Positive) represents the false positive example, that is, the number of samples that are actually negative examples but are predicted as positive examples by the model. FN (False Negative) represents the false negative example, that is, the number of samples that are actually positive examples but are predicted as negative examples by the model;

[0041] S2. A higher classification accuracy indicates that the overall prediction accuracy of the model is relatively high. A high precision means that among the data predicted as abnormal by the model, the proportion of truly abnormal data is relatively large, and the false alarm rate is low. A high recall rate indicates that the model can detect as many real abnormal data as possible, and the miss rate is low. The F1-score comprehensively considers precision and recall and can more comprehensively reflect the performance of the model.

[0042] As a further solution of the present invention, the model deployment in step 6 includes the following steps:

[0043] S1. The trained model is saved in the.pth format, and engineering code is built to construct an abnormal detection service for the time-series deformation data of tunnel surrounding rock. This service is deployed in a cloud-edge collaboration manner. The sensor data is first sent to the edge computing device in the tunnel. The edge computing device can receive the monitoring data collected by the sensor in real time. After the data is cleaned using step 1, it is directly input into the locally deployed model for abnormal detection. This deployment method has the advantages of fast response speed and small data transmission volume, and can meet the real-time requirements of tunnel construction. The identified normal working condition data is only stored locally, while if abnormal working condition data is identified, it needs to be sent to the cloud server for further analysis and treatment;

[0044] S2. After the model is deployed, a complete maintenance and update mechanism needs to be established. The performance of the deployed model is evaluated regularly. By collecting the monitoring data and detection results in actual operation, the performance indicators of the model, such as classification accuracy, precision, recall rate, and F1-score, are calculated and compared with the performance during model training to determine whether the performance of the model has decreased. If it is found that the performance of the model has decreased, it may be due to changes in the tunnel construction environment or data distribution. It is necessary to collect data again, fine-tune or retrain the model, and then deploy the updated model to the corresponding device to ensure that the model can continuously and accurately detect abnormal situations in the time-series deformation monitoring data of tunnel surrounding rock and provide a stable and reliable guarantee for tunnel construction safety.

[0045] The present invention also provides an abnormal detection device for tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder, which is characterized in that: it includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the abnormal detection method for tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder.

[0046] The present invention also provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the abnormal detection method for tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder.

[0047] Compared with the related technologies, the abnormal detection method, device and medium for tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder provided by the present invention have the following beneficial effects:

[0048] 1. The present invention can solve the problem of low reliability of traditional threshold warning due to poor data quality and many noises in existing tunnel automatic monitoring. By constructing an efficient deep learning model, it realizes automatic and accurate abnormal detection of tunnel surrounding rock monitoring data, thus providing a reliable guarantee for tunnel construction safety;

[0049] 2. The present invention preprocesses a large amount of historical monitoring data, carefully creates a data set, and at the same time, designs an innovative deep learning model combining LSTM (Long Short-Term Memory Network) and autoencoder. This model accurately realizes abnormal detection of monitoring data by comparing the error between the original monitoring data and the reconstructed signal, assisting professional personnel in early warning judgment and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings.

[0051] Figure 1 is the flow schematic diagram of the present invention;

[0052] Figure 2 is the equal-spacing processing schematic diagram of the present invention;

[0053] Figure 3 is the data segmentation schematic diagram of the sliding window method of the present invention;

[0054] Figure 4 is the model network structure schematic diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] Please refer to Figures 1 to 4 , wherein, Figure 1 is the flow schematic diagram of the present invention; Figure 2 is the equal-spacing processing schematic diagram of the present invention;Figure 3 Schematic diagram of data segmentation by the sliding window method of the present invention; Figure 4 Schematic diagram of the model network structure of the present invention. The abnormal detection method for the time series deformation monitoring data of tunnel surrounding rock combining LSTM and autoencoder includes the following steps: Step 1: Cleaning of the original monitoring data;

[0056] Step 2: Construction of the data set;

[0057] Step 3: Construction of the autoencoding LSTM neural network model;

[0058] Step 4: Model training;

[0059] Step 5: Model testing and performance evaluation;

[0060] Step 6: Model deployment.

[0061] The cleaning of the original monitoring data in the said Step 1 includes the following steps:

[0062] S1. Outlier removal: Adopting the 3σ criterion, for a set of monitoring data, calculate its mean μ and standard deviation σ. The 3σ criterion is also known as the Pauta criterion, which is a discrimination criterion based on the normal distribution. In the normal distribution, the probability that the data falls within the range of about 3 times the standard deviation σ around the mean μ is very high, about 99.73%. Therefore, in the production process, experiment or other practical applications, if the data point exceeds this range, it is considered that the data point may be an outlier or there is a special situation. This is the basic idea of the 3σ criterion. The calculation formulas for the mean and standard deviation of the data are as follows:

[0063]

[0064] In the above two formulas, X i is the specific data, μ is the mean, σ is the standard deviation, n is the number of data. According to the 3σ criterion, the reasonable range of the data should be between [μ - 3σ, μ + 3σ]. If it is outside this range, then determine that the data point is an outlier and eliminate it;

[0065] S2. Missing value processing: For a small number of missing values, use the linear interpolation method to fill them. The principle of linear interpolation is based on the mathematical principle that two points determine a straight line. Assume that in a set of data, two adjacent data points (x1, y1) and (x2, y2) are known, and there is a missing value y at a certain x between x1 and x2. A straight line can be determined through these two known points, and the equation of this straight line can be expressed as:

[0066]

[0067] Using this equation, the missing y value can be calculated according to the value of x, thereby realizing the estimation and filling of the missing value;

[0068] S3. Equal interval processing: Since there may be inconsistent data collection time intervals in the automated monitoring system, it is necessary to process the monitoring data at equal intervals. Based on time, the non-equal interval data is resampled by linear interpolation (Formula 3) to make it an equal time interval data sequence (see attachment Figure 2 ), and unified processing is carried out at 10-minute intervals.

[0069] The dataset construction in step 2 includes the following steps:

[0070] S1. Select data under normal working conditions from the historical tunnel surrounding rock monitoring data. The judgment basis for normal working condition data can be the data within the time period when various parameters are stable during the construction process and there is no obvious abnormal surrounding rock deformation. For example, the data collected within the time period when the surrounding rock displacement rate is stable at 0.1 - 0.3 mm / d and the stress change is within a reasonable range can be identified as normal working condition data. In addition, it is also necessary to use the monitoring data under abnormal working conditions to generate an abnormal dataset, which is combined with 20% of the normal working conditions to construct a test set for evaluating the model detection performance;

[0071] S2. Use the sliding window method (see attachment Figure 3 ) to segment the normal working condition data. The window length is set to 24h, that is, 144 data points, and the sliding step is 1h. Starting from the starting position of the data sequence, data subsequences with a length of 24h are intercepted in turn, and each time it slides backward by 1 hour until the entire normal working condition data sequence is traversed. These subsequences form the dataset for model training and testing.

[0072] The construction of the autoencoder LSTM neural network model in step 3 includes the following steps:

[0073] S1. For the problem of abnormal detection of tunnel surrounding rock deformation monitoring data, a neural network called autoencoder LSTM is designed, as shown in attachment Figure 4 . This network consists of an encoder and a decoder. The encoder compresses the input tunnel surrounding rock deformation monitoring data into a low-dimensional feature representation, and the decoder then restores this low-dimensional feature back to the dimension of the original data, attempting to reconstruct the original input data. After training the network on normal data, when new data is input, the data is judged whether it is abnormal by calculating the error between the reconstructed original data and the reconstructed data. If the reconstruction error exceeds a certain threshold, the data is considered abnormal;

[0074] S2. In the encoder part, it mainly includes three parts: the input layer, the LSTM layer, and the fully connected layer (encoding layer). The input layer receives the tunnel surrounding rock deformation monitoring data, and the data dimension is usually [batch_size, sequence_length, n_features]. The batch_size is set to 64, sequence_length is 144, and n_features is 3 (horizontal displacement, vertical displacement, temperature). The LSTM layer uses one or more LSTM units to process the input data. The LSTM can effectively handle the long-term dependencies in time series data and is very suitable for data that changes over time such as tunnel surrounding rock deformation. Each layer of LSTM receives the output of the previous layer as input and outputs a hidden state, and its output shape is [batch_size, sequence_length, n_hidden]. The LSTM layer is set to 2 layers. The n_hidden of the first layer is set to 64, and the n_hidden of the second layer is set to 32. The fully connected layer (encoding layer) part reduces the dimension of the output of the LSTM layer through a fully connected layer to obtain a low-dimensional encoded representation. The number of neurons in the fully connected layer is usually much smaller than the number of features of the input data. Then, the high-dimensional features output by the LSTM layer are compressed into a 16-dimensional code, and the output shape is [batch_size, 16].

[0075] The decoder part mainly includes three parts: the fully connected layer (decoding layer), the LSTM layer, and the output layer. The fully connected layer (decoding layer) corresponds to the encoding layer of the encoder, takes the low-dimensional code as input, and increases the dimension through the fully connected layer. The output shape of this layer is [batch_size, sequence_length * 32]. The LSTM layer takes the output of the fully connected layer as input and gradually restores the time series features of the data. The output shape is [batch_size, sequence_length, 64]. The output layer is a fully connected layer, which is used to integrate the output into the same dimension as the output, that is, [batch_size, 144, 3].

[0076] The model training in step 4 includes the following steps:

[0077] S1. Divide the constructed dataset into a training set, a validation set, and a normal working condition test set according to the ratio of 6:2:2. The normal working condition test set and the abnormal working condition test set are combined to form the test set. The training set is used for learning and optimizing the model parameters. The validation set is used to evaluate the performance of the model during training to prevent overfitting. The test set is used to finally evaluate the generalization ability of the trained model.

[0078] S2. Use the training set to train the auto-encoding LSTM neural network model. During the training process, the Adam algorithm is used to update the model parameters. Set the learning rate to 0.001 and the number of training epochs to 10,000. To improve the prediction effect, the following loss function is designed:

[0079]

[0080] In the formula, loss is the loss value, and R 2 is the goodness of fit, Y true is the true output value of the model, and Y predict is the predicted output value of the model;

[0081] S3. In each round of training, input the training set data into the model in sequence, calculate the loss function between the model output and the true label, calculate the gradient through the backpropagation algorithm, and update the model parameters to gradually reduce the loss of the model on the training set.

[0082] The model testing and performance evaluation in step 5 include the following steps:

[0083] S1. After training, the neural network calculates the loss of the training set using formula (4), statistically analyzes the range of the loss value to obtain the loss threshold under normal working conditions, then calculates the loss of all samples in the test set using formula (4), combines the loss threshold to judge whether the test set samples are normal or abnormal, and calculates the performance indicators of classification accuracy, precision, recall, and F1-score, which can intuitively evaluate the performance of the anomaly detection model proposed by the present invention. The formula is as follows:

[0084]

[0085] In the above formula, TP (True Positive) represents the true positive example, that is, the number of samples that are actually positive examples and are predicted as positive examples by the model. TN (True Negative) represents the true negative example, that is, the number of samples that are actually negative examples and are predicted as negative examples by the model. FP (False Positive) represents the false positive example, that is, the number of samples that are actually negative examples but are predicted as positive examples by the model. FN (False Negative) represents the false negative example, that is, the number of samples that are actually positive examples but are predicted as negative examples by the model;

[0086] S2. A higher classification accuracy indicates that the overall prediction of the model is more accurate. High precision means that among the data predicted as abnormal by the model, a relatively large proportion are truly abnormal, with a low false alarm rate. A high recall rate indicates that the model can detect as many real abnormal data as possible, with a low miss rate. The F1-score comprehensively considers precision and recall and can more comprehensively reflect the performance of the model.

[0087] The model deployment in step 6 includes the following steps:

[0088] S1. The trained model is saved in the.pth format, and engineering code is built to construct an abnormal detection service for the time-series deformation data of tunnel surrounding rock. This service is deployed in a cloud-edge collaboration manner. Sensor data is first sent to the edge computing device in the tunnel. The edge computing device can receive the monitoring data collected by the sensor in real time. After cleaning the data using step 1, it is directly input into the locally deployed model for abnormal detection. This deployment method has the advantages of fast response speed and small data transmission volume, and can meet the real-time requirements of tunnel construction. The identified normal working condition data is only stored locally, while if abnormal working condition data is identified, it needs to be sent to the cloud server for further analysis and treatment;

[0089] S2. After the model is deployed, a complete maintenance and update mechanism needs to be established. Regularly evaluate the performance of the deployed model. By collecting the monitoring data and detection results in actual operation, calculate the performance indicators of the model such as classification accuracy, precision, recall rate, and F1-score, and compare them with the performance during model training to determine whether the model has a performance decline. If it is found that the model performance has declined, it may be due to changes in the tunnel construction environment or data distribution. It is necessary to re-collect data, fine-tune or retrain the model, and then deploy the updated model to the corresponding device to ensure that the model can continuously and accurately detect abnormal conditions in the time-series deformation monitoring data of tunnel surrounding rock, providing a stable and reliable guarantee for tunnel construction safety.

[0090] The present invention also provides an abnormal detection device for the time-series deformation monitoring data of tunnel surrounding rock that combines LSTM and an autoencoder, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the abnormal detection method for the time-series deformation monitoring data of tunnel surrounding rock that combines LSTM and an autoencoder.

[0091] The present invention also provides a computer-readable storage medium that stores computer instructions for causing a computer to execute the abnormal detection method for the time-series deformation monitoring data of tunnel surrounding rock that combines LSTM and an autoencoder.

[0092] The present invention preprocesses a large amount of historical monitoring data to carefully create a data set. At the same time, an innovative deep learning model combining LSTM (Long Short-Term Memory Network) and autoencoder is designed. This model accurately realizes the anomaly detection of the monitoring data by comparing the error between the original monitoring data and the reconstructed signal, assisting professionals in early warning judgment and decision-making.

[0093] The present invention can solve the problem of low reliability of traditional threshold early warning in existing tunnel automatic monitoring due to poor data quality and a lot of noise. By constructing an efficient deep learning model, it realizes the automatic and accurate anomaly detection of the monitoring data of tunnel surrounding rock, thus providing a reliable guarantee for the safety of tunnel construction.

[0094] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and all should be covered within the protection scope of the present invention.

Claims

1. A method for detecting anomalies in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder, characterized in that: The following steps are involved: Step 1: Cleaning of original monitoring data; Step 2: Dataset construction; Step 3: Construction of autoencoder LSTM neural network model; Step 4: Model training; Step 5: Model testing and performance evaluation; Step 6: Model deployment.

2. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The raw monitoring data cleaning in step 1 includes the following steps: S1. Outlier elimination: Using the 3σ criterion, for a set of monitoring data, calculate its mean μ and standard deviation σ. The 3σ criterion is also called the Laida criterion, which is a discrimination criterion based on normal distribution. In normal distribution, the probability that the data falls within the range of 3 times the standard deviation σ around the mean μ is very high, about 99.73%. Therefore, in the production process or experiment and other practical applications, if the data point exceeds this range, it is considered that the data point may be an outlier or there is a special case. This is the basic idea of ​​the 3σ criterion. The mean and standard deviation calculation formulas of the data are as follows: In the above two equations, X i is the specific data, μ is the mean, σ is the standard deviation, and n is the number of data. According to the 3σ criterion, the reasonable range of the data should be between [μ-3σ, μ+3σ]. If it is outside this range, the data point is judged as an outlier and is removed; S2. Missing value processing: For a small number of missing values, linear interpolation is used to fill them. The principle of linear interpolation is based on the mathematical principle that two points determine a straight line. Suppose in a set of data, two adjacent data points (x1, y1) and (x2, y2) are known, and there is a missing value y at a certain x between x1 and x2. A straight line can be determined through these two known points. The equation of the straight line can be expressed as: Using this equation, the missing y value can be calculated based on the value of x, thereby estimating and filling the missing value; S3. Equal-interval processing: Since the automated monitoring system may have inconsistent data collection time intervals, the monitoring data needs to be processed at equal intervals. Based on time, the non-equal-interval data is resampled through linear interpolation (Formula 3) to make it a data series with equal time intervals, and uniformly processed at intervals of 10 minutes.

3. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The data set construction in step 2 includes the following steps: S1. Filter out data under normal working conditions from historical tunnel surrounding rock monitoring data. The basis for judging normal working condition data can be data collected during the period when various parameters are stable and there is no obvious abnormal deformation of surrounding rock during the construction process. For example, data collected during the period when the displacement rate of surrounding rock is stable at 0.1-0.3mm / d and the stress change is within a reasonable range can be identified as normal working condition data. In addition, it is necessary to use monitoring data under abnormal working conditions to generate abnormal data sets, and merge them with 20% of normal working conditions to construct a test set for evaluating model detection performance; S2. The normal operating data is segmented using a sliding window method. The window length is set to 24 hours, which is 144 data points. The sliding step is 1 hour. Starting from the start of the data sequence, data subsequences of 24 hours in length are intercepted in sequence, sliding backward for 1 hour each time until the entire normal operating data sequence is traversed. These subsequences constitute the data set for model training and testing.

4. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The construction of the autoencoder LSTM neural network model in step 3 includes the following steps: S1. Aiming at the problem of anomaly detection of tunnel surrounding rock deformation monitoring data, a neural network named autoencoder LSTM is designed. The network consists of two parts: encoder and decoder. The encoder compresses the input tunnel surrounding rock deformation monitoring data into a low-dimensional feature representation, and the decoder restores the low-dimensional feature back to the dimension of the original data to try to reconstruct the original input data. After the network is trained on normal data, when new data is input, the error between the reconstructed original data and the reconstructed data is calculated to determine whether the data is abnormal. If the reconstruction error exceeds a certain threshold, the data is considered abnormal. S2. In the encoder part, it mainly includes three parts: input layer, LSTM layer and fully connected layer (encoding layer). The input layer receives tunnel surrounding rock deformation monitoring data. The data dimension is usually [batch_size, sequence_length, n_features]. The batch_size is set to 64, the sequence_length is 144, and the n_features is 3 (horizontal displacement, vertical displacement, temperature). The LSTM layer uses one or more layers of LSTM units to process the input data. The LSTM can effectively process the long-term dependencies in time series data, which is very suitable for tunnel surrounding rock deformation data that changes over time. It is often applicable. Each LSTM layer receives the output of the previous layer as input and outputs a hidden state. The shape of its output is [batch_size, sequence_length, n_hidden]. The LSTM layer is set to 2 layers, the first layer n_hidden is set to 64, and the second layer n_hidden is set to 32. The fully connected layer (encoding layer) part reduces the dimension of the output of the LSTM layer through a fully connected layer to obtain a low-dimensional encoding representation. The number of neurons in the fully connected layer is usually much smaller than the number of features of the input data. Then, the high-dimensional features output by the LSTM layer are compressed into a 16-dimensional code, and the output shape is [batch_size, 16].

5. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 4 is characterized in that: The decoder part mainly includes three parts: a fully connected layer (decoding layer), an LSTM layer and an output layer. The fully connected layer (decoding layer) corresponds to the encoding layer of the encoder. It takes the low-dimensional code as input and performs dimensionality increase through the fully connected layer. The output shape of this layer is [batch_size, sequence_length*32]. The LSTM layer takes the output of the fully connected layer as input and gradually restores the time series characteristics of the data. The output shape is [batch_size, sequence_length, 64]. The output layer is a fully connected layer, which is used to integrate the output into the same dimension as the output, that is, [batch_size, 144, 3].

6. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The model training in step 4 includes the following steps: S1. Divide the constructed data set into a training set, a validation set, and a normal working condition test set in a ratio of 6:2:

2. The normal working condition test set and the abnormal working condition test set are combined to form a test set. The training set is used for learning and optimizing model parameters. The validation set is used to evaluate the performance of the model during the training process to prevent the model from overfitting. The test set is used to finally evaluate the generalization ability of the trained model. S2. Use the training set to train the autoencoder LSTM neural network model. During the training process, the Adam algorithm is used to update the parameters of the model. The learning rate is set to 0.001 and the number of training rounds is set to 10,000. To improve the prediction effect, the following loss function is designed: In the formula, loss is the loss value, R 2 is the goodness of fit, Y true is the true output value of the model, Y predict Predict output values ​​for the model; S3. In each round of training, the training set data is input into the model in sequence, the loss function between the model output and the true label is calculated, the gradient is calculated and the model parameters are updated through the back propagation algorithm, so that the loss of the model on the training set gradually decreases.

7. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The model testing and performance evaluation in step 5 includes the following steps: S1. The trained neural network uses formula (4) to calculate the loss of the training set, and the range of the loss value is counted to obtain the loss threshold under normal working conditions. Then, the loss is calculated for all samples in the test set using formula (4), and the test set sample category is judged as normal or abnormal in combination with the loss threshold. The performance indicators of the classification accuracy, precision, recall and F1-score are calculated, which can intuitively evaluate the performance of the anomaly detection model proposed in the present invention. The formula is as follows: In the above formula, TP (True Positive) represents true positive examples, that is, the number of samples that are actually positive examples and predicted as positive examples by the model; TN (True Negative) represents true negative examples, that is, the number of samples that are actually negative examples and predicted as negative examples by the model; FP (False Positive) represents false positive examples, that is, the number of samples that are actually negative examples but predicted as positive examples by the model; FN (False Negative) represents false negative examples, that is, the number of samples that are actually positive examples but predicted as negative examples by the model; S2. A higher classification accuracy rate indicates that the overall prediction accuracy of the model is higher. High precision means that among the data predicted by the model as abnormal, the truly abnormal data accounts for a larger proportion, and the false alarm rate is low. A high recall rate indicates that the model can detect as much real abnormal data as possible, and the false alarm rate is low. The F1-score takes into account both precision and recall rate, and can more comprehensively reflect the performance of the model.

8. The method for detecting abnormality in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder according to claim 1, characterized in that: The model deployment in step 6 includes the following steps: S1. The trained model is saved in .pth format, and the engineering code is built to construct the tunnel surrounding rock time series deformation data anomaly detection service. The service is deployed in an edge-cloud collaborative manner. The sensor data is first sent to the edge computing device in the tunnel. The edge computing device can receive the monitoring data collected by the sensor in real time. After the data is cleaned in step 1, it is directly input into the locally deployed model for anomaly detection. This deployment method has the advantages of fast response speed and small data transmission volume, which can meet the real-time requirements of tunnel construction. The identified normal working condition data is only stored locally, and if abnormal working condition data is identified, it needs to be sent to the cloud server for further analysis and treatment; S2. After the model is deployed, a complete maintenance and update mechanism needs to be established to regularly evaluate the performance of the deployed model. By collecting monitoring data and test results from actual operation, the model's classification accuracy, precision, recall rate and F1 score performance indicators are calculated and compared with the performance during model training to determine whether the model has experienced performance degradation. If the model performance is found to have degraded, it may be due to changes in the tunnel construction environment or changes in data distribution. It is necessary to collect data again, fine-tune or retrain the model, and then deploy the updated model to the corresponding equipment to ensure that the model can continuously and accurately detect abnormal conditions in the tunnel surrounding rock time-series deformation monitoring data, providing stable and reliable protection for tunnel construction safety.

9. A device for detecting abnormalities in tunnel surrounding rock temporal deformation monitoring data combining LSTM and autoencoder, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method for detecting anomaly in tunnel surrounding rock time series deformation monitoring data combining LSTM and autoencoder as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the method for detecting anomalies in tunnel surrounding rock time-series deformation monitoring data combining LSTM and autoencoder as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Intelligent surrounding rock stability monitoring method and system based on artificial intelligence

    CN120706269A

  • Railway tunnel dynamic reliability evaluation method of physical driving time sequence confrontation model

    CN122414270A

  • Railway tunnel dynamic reliability evaluation method based on physical driving timing confrontation model

    CN122414270B