1. Introduction
As the development of conventional oil and gas resources continues to deepen, the oil and gas exploration and development industry is gradually expanding into complex areas, including unconventional, deep, and deep-sea resources. As a crucial step in oil and gas exploration and development, drilling consistently emphasizes safe and efficient drilling, a primary concern for domain experts. Complex oil and gas formations, characterized by high temperatures, high pressures, intricate layers, and instability, lead to high risks and a concealed nature of lost circulation. Identifying lost circulation risks is further complicated by data noise, real-time fluctuations, and nonlinear mapping relationships. If not detected in time, delays in handling can easily result in severe loss and blowout accidents. Therefore, accurate and effective monitoring of lost circulation risks is significant for safe and efficient drilling.
Lost circulation monitoring methods are mainly divided into traditional and intelligent methods. Traditional methods primarily utilize sensor equipment to monitor various parameters during the drilling process, with engineers then determining whether lost circulation has occurred based on real-time changes in these parameters. For example, Shoujun Liu [
1] used the mud pit page method and ultrasonic sensors to monitor changes in the mud pit page to determine well leakage; Dong Tan [
2] chose the flow difference method and proposed a combination of surface flow monitoring and downhole pressure prediction to monitor and predict drilling overflow in pressure-sensitive formations. Limited by the sensors’ precision and engineers’ experience, traditional methods have drawbacks such as intense subjectivity, low accuracy, and poor timeliness.
In recent years, with the rapid development of machine learning technology, intelligent monitoring methods have gradually become a research hotspot in drilling risk monitoring. For instance, Liu Biao et al. [
3] analyzed various parameters and formation characteristics during the drilling process and used support vector regression to build an intelligent prediction model for lost circulation, achieving early identification of lost circulation risks. Yingzhuo X et al. [
4] developed an innovative lost circulation prediction model based on deep learning and conducted a quantitative analysis of the impact of each feature on the model’s prediction results. Song Yan [
5] proposed an intelligent recognition method for lost circulation risk status based on extreme learning machines, achieving high-accuracy identification of lost circulation risks. Baek S et al. [
6] established a lost circulation correlation model by analyzing formation conditions, engineering parameters, and operational dynamic parameters related to lost circulation, using this model to achieve a lost circulation risk response and early warning for data anomalies with different weights. Li Changhua et al. [
7] employed convolutional neural networks and multidimensional data fusion algorithms to establish a lost circulation prediction model, enhancing the reliability of lost circulation identification and prediction. Zheng Zhuo et al. [
8] used the XGBoost algorithm to construct a real-time lost circulation early warning model tailored to the specific geological conditions of the Bohai Bay Basin, improving the accuracy of formation loss judgments. Sun Weifeng et al. [
9] effectively realized accurate monitoring of minor drilling fluid losses by combining dilated causal convolutional networks and long short-term memory networks. Luo Ming et al. [
10] proposed a lost circulation prediction method based on deep convolutional feature reconstruction by extracting key characterization parameters of lost circulation and constructing a temporal feature matrix, improving the prediction accuracy of lost circulation risks. For time series learning methods, Li et al. [
11] used LSTM and Bi-LSTM for leakage monitoring in 2023, achieving an identification accuracy between 88.93% and 98.38%.
Currently, traditional methods for intelligently monitoring lost circulation mainly focus on supervised learning algorithms, which are extremely dependent on a large amount of well-leakage risk data during the model training process; in addition, they show apparent limitations in parsing well leakage data with complex and nonlinear characteristics. Moreover, accessing a large amount of labeled risk data is often tricky in practical applications. Secondly, since the traditional supervised model relies on training data, if the training data does not adequately cover all possible lost circulation scenarios, the model may exhibit poor generalization ability in practical applications and fail to accurately identify new lost circulation risks. Therefore, an unsupervised learning approach can overcome the limitations of traditional models that rely on a large amount of risk data.
For the non-temporal learning method, it is often difficult to effectively reveal the changing rule of parameters over time, and the temporal continuity and sequence of data are neglected when analyzing the data. Therefore, this study focuses on considering time-sequential data in the drilling process to explore the relationship of parameter changes over time.
To address the shortcomings of the supervised learning and non-time series autoencoder model algorithms mentioned above in lost circulation monitoring studies, an unsupervised bi-directional long and short time series autoencoder model based on bi-directional long and short time series memory networks (BiLSTM-AE) is used in this study. The encoder and decoder of the model are BiLSTM, which can capture temporal correlations. When the time series data is input into the model, it encodes, compresses and decodes the data, then calculates the reconstruction error between the output data and the input data. If the reconstruction error is larger than a threshold, it is risky data, and vice versa; it is normal and risk-free data. BiLSTM-AE is more comprehensive in the contextual understanding of sequence data and can extract the characteristics of temporal variations. This method can identify lost circulation risk in real-time in practical applications, make up for the lack of relying on a large amount of lost circulation risk data, mine the changing law of data, improve real-time monitoring, and provide an efficient and accurate method for lost circulation monitoring.
4. Model Construction
4.1. Evaluation Metrics
An important part of applying machine learning methods to solve engineering problems is evaluating the performance of the algorithm models. This study uses four evaluation metrics to assess the performance of different models in identifying lost circulation risks: accuracy, recall, missing alarm rate, and false alarm rate [
21]. The calculation formula for each evaluation metric is shown in
Table 1 and Formulas (8)–(11).
is the number of samples that predict the true positive class as a positive class;
is the number of samples that predict the true positive class as a negative class;
is the number of samples that predict the true negative class as a positive class;
is the number of samples to predict the true negative class as a negative class.
: Equation (
8) is the ratio of the number of correctly predicted samples inside the classification model to the overall number of predicted samples.
: Equation (
9) is the ratio of predicted positive samples to actual positive samples.
: Equation (
10) is the proportion of actual lost circulation samples that are predicted to be non-lost circulation samples in the classification model, i.e., the proportion of lost circulation samples that are missed.
: Equation (
11) is the proportion of samples that are actually non-lost circulation but are predicted as lost circulation by the classification model. In other words, it is the ratio of samples that are predicted to be lost circulation but are actually non-lost circulation within the total samples predicted as lost circulation.
4.2. Model Structure
The structure of the proposed BiLSTM-AE model is shown in
Figure 5. The model structure consists of two parts: the encoder part and the decoder part. The BiLSTM-AE model uses BiLSTM networks as both the encoder and the decoder.
First, the input layer receives the time series data, which then passes through an encoder that contains a BiLSTM layer. Next, a fully connected layer maps the encoded vectors to a low-dimensional encoding. The encoded data are then expanded through a repeat vector layer to match the input requirements of the decoder.
The decoder consists of two BiLSTM layers, which aim to reconstruct the original input sequence into a high-dimensional space, thus completing the process of data encoding compression and decoding reconstruction.
4.3. Parameter Settings
In the proposed BiLSTM-AE model, there are a total of five layers in addition to the input and output layers. The input layer consists of three neurons. The first BiLSTM layer processes each time step with 32 units and returns the full sequence, outputting a 32-dimensional vector for each time step. The second LSTM layer processes the sequence with four units and returns only the output of the last time step. The third Repeat Vector layer repeats the output of the second layer for the entire sequence length, making its dimension match the sequence length. The fourth BiLSTM layer processes the input from the third layer and returns an eight-dimensional vector sequence. The fifth layer is an LSTM layer that processes the output from the fourth layer and returns a 16-dimensional vector sequence.
The output layer is a TimeDistributed Dense Layer that applies a Dense layer at each time step of the fifth layer, outputting vectors that match the number of input features. The loss function used during the training process is the mean absolute error (MAE), which is the average of the absolute differences between the predicted values and the true values. The formula is shown as (12):
1. For each sample i, calculate the absolute error between the true value and the predicted value , that is | − |.
2. Sum the absolute errors for all samples.
3. Divide the total error by the total number of to obtain the mean absolute error.
The Adam optimizer was used with a learning rate of 0.001, 50 epochs, and a batch size of 32. The specific model parameters are shown in
Table 2.
4.4. Model Training
Figure 6 shows the change in the loss value of a training model over epochs. During the first 10 epochs, the training loss decreases rapidly, indicating that the model learns a substantial amount of information during this period. As the epochs increase, the training loss converges to 0.0188 and gradually stabilizes, showing no significant signs of overfitting or underfitting.
6. Conclusions
In this paper, a lost circulation monitoring model based on an unsupervised time series autoencoder (BiLSTM-AE) is proposed. This model comprehensively extracts contextual information from time series data. The experimental results show that the model achieves an accuracy of 92.51% on the test set, demonstrating its high accuracy and reliability in practical applications. The relevant patterns and insights obtained during the research can be summarized as follows:
1. Lost circulation exhibits significant temporal evolution characteristics. Compared to non-sequential algorithms, sequential algorithms that consider the temporal variation of sequence data perform better in lost circulation monitoring and diagnosis.
2. Existing data issues severely limit the effectiveness of supervised intelligent algorithms. The proposed unsupervised model effectively overcomes data limitations. One important advantage is that the training set of the model consists of normal drilling time series data. Therefore, the model can detect anomalies by identifying deviations from normal patterns, showing flexibility and adaptability in handling lost circulation risks.
The data used in this study primarily come from normal drilling processes, with relatively fewer well leakage data. Although unsupervised models can partially overcome this issue, the diversity and representativeness of the data remain essential factors affecting the model’s generalization ability. In future research, we will further improve and optimize the model to meet the lost circulation monitoring needs under different complex working conditions.