Real-time warning method for casing damage during drilling process based on semi-supervised autoencoder

By processing well recording data during the drilling process based on the semi-supervised autoencoder, an intelligent early warning model for sleeve damage was constructed, which solved the problem of identification and prediction of casing damage during the drilling process, and achieved real-time and accurate casing Status prediction improves the efficiency and accuracy of drilling and plugging operations.

CN117988823BActive Publication Date: 2024-12-03CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410140723.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2024-12-03
Estimated Expiration
2044-01-31

AI Technical Summary

Technical Problem

During the drilling and plugging process, the prior art is difficult to effectively identify and predict casing damage, resulting in low recognition accuracy and delayed time, and the inability to achieve pre-predictions. There are sample imbalance in the dataset, which affects the prediction effect of the model.

Method used

Using a semi-supervised autoencoder method, data preprocessing includes backward differential, normalization, time misalignment and time slice, and divided labeled and unlabeled samples, and constructed Semi-supervised autoencoder classification model uses unsupervised and supervised decoder for pre-training and fine-tuning to build a loss-encapsulated intelligent early warning model.

Benefits of technology

Real-time, efficient and accurate prediction of the casing state is achieved, invalid information in the data is automatically filtered and compressed, and the lossless information is fully utilized, which improves the accuracy and efficiency of early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117988823B_ABST
    Figure CN117988823B_ABST
Patent Text Reader

Abstract

The present invention relates to a real-time early warning method for casing damage in the process of drilling and plugging based on a semi-supervised autoencoder, the method comprising: collecting and collating logging time series data in the process of drilling and plugging; preprocessing the logging time series data: backward difference to obtain incremental changes between single data, normalization to eliminate errors caused by inconsistent dimensions of different data, time dislocation and time slicing to obtain a prediction sample set; constructing a semi-supervised autoencoder network architecture, adding an LSTM network as a time series information extraction layer; adopting a "pre-training + fine-tuning" strategy to train the model, using a large number of unlabeled samples to pre-train the model, and then using a small number of labeled samples for supervised learning fine-tuning, and finally obtaining a real-time early warning model for casing damage in the process of drilling and plugging. The present invention can predict the state of the casing in real time, efficiently and accurately, so as to prepare countermeasures in advance, reduce the risk of drilling and plugging operations, and improve the efficiency of drilling and plugging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of oil and gas well engineering, and in particular to a real-time early warning method for casing damage in a drilling process based on a semi-supervised autoencoder. Background Art

[0002] Due to the requirements of oilfield development sites, the number of completion cement plugs produced by stratified mining and well plugging operations is increasing, and the task of drilling and grinding cement plugs (referred to as drilling plugs) is becoming more and more arduous. During the drilling and plugging operation, due to the interaction of multiple factors such as the long drilling and grinding cycle, large vibration amplitude of the downhole drill bit, eccentric position of the drill bit, and repeated drilling and grinding of cement plug fragments at the bottom of the well, different degrees of casing damage (referred to as casing damage) occur. Casing damage seriously affects the subsequent drilling and plugging operations, resulting in a lot of time waste and unnecessary cost losses.

[0003] Few scholars have conducted relevant research on the casing damage problem that occurs during the drilling process. In addition, the on-site judgment of possible casing damage is based on abnormal changes in a single or a small number of logging data. However, this method has low recognition accuracy, severe time lag, and cannot achieve advance prediction. In addition, it is extremely difficult to determine the time and location of casing damage, which leads to a lack of casing damage labels and an imbalance of samples in the data set, which will cause problems such as poor prediction results in actual deployment of the model. Summary of the invention

[0004] The purpose of the present invention is to provide a real-time warning method for casing damage in the drilling process based on a semi-supervised autoencoder, aiming to solve the problems existing in the prior art such as complex logging data features, insufficient time-dependent extraction, and inability to achieve prior prediction, so as to ensure the integrity of the casing during the drilling operation.

[0005] In order to solve the above problems, the present invention provides a real-time early warning method for casing damage in the drilling process based on a semi-supervised autoencoder, comprising the following steps:

[0006] Obtain logging time series data and corresponding casing damage information during the drilling process;

[0007] Processing the logging time series data and the corresponding casing damage information to obtain a cutting data set;

[0008] Dividing the cutting data set into labeled samples and unlabeled samples according to casing damage information;

[0009] The labeled samples are randomly sampled in a ratio of 8:2, of which 80% and the unlabeled samples form training samples and 20% form test samples;

[0010] A semi-supervised autoencoder classification model is constructed, and after training with the training samples and testing with the test samples, a real-time intelligent early warning model for casing damage in the drilling process based on the semi-supervised autoencoder is finally obtained.

[0011] Furthermore, the logging data includes: time, drilling speed, drilling pressure, torque, rotation speed, drilling time, hook load, drill bit position, hook position, outlet density, inlet density, outlet conductivity, inlet conductivity, etc.

[0012] Furthermore, the method for processing the sleeve damage information is label coding: a value of 1 indicates that the sleeve in the label sample is worn, and a value of 0 indicates that the sleeve in the label sample is not worn.

[0013] Furthermore, the method for processing the logging time series data and the corresponding casing damage labels includes backward difference, normalization, time dislocation and time slicing.

[0014] The backward difference formula is:

[0015] Δx t =x t -x t-1

[0016] In the formula, x t is the value at time t, x t-1 is the value at time t-1, Δx t is the value increment at time t.

[0017] The normalization formula is:

[0018]

[0019] Where X is a vector of all values, x is the original value, and x' is the normalized value;

[0020] The time misalignment is to subtract a certain value from the time corresponding to all casing damage labels, so that the time corresponding to the casing damage labels is advanced to the time corresponding to the logging data, and the casing damage labels with the advanced time are re-correlated with the logging time series data at the same time to form a misaligned data set;

[0021] The time slice refers to cutting the dislocated data set according to a certain time length and time interval, each slice is a sample, and each sample includes multiple sub-samples to form a cut data set.

[0022] Furthermore, the cutting data set is divided into labeled samples and unlabeled samples according to the casing damage information.

[0023] Furthermore, the semi-supervised autoencoding classification model is composed of an encoder, an unsupervised decoder and a supervised decoder:

[0024] According to the connection order from left to right, the encoder includes an input layer, an LSTM layer, an activation layer, a fully connected layer, a Dropout layer, and an output layer, wherein the activation layer uses ReLU as the activation function:

[0025] ReLU(z)=max(0,z)

[0026] Where z is the output of the previous layer;

[0027] The output layer uses the Sigmoid function to activate each node:

[0028]

[0029] The encoder input is a labeled sample or an unlabeled sample, and the output is labeled sample information or unlabeled sample information;

[0030] According to the connection order from left to right, the unsupervised decoder includes an unlabeled sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as the activation function:

[0031]

[0032] The output layer uses the Sigmoid function to activate each node:

[0033]

[0034] The unsupervised decoder inputs unlabeled sample information and outputs unlabeled sample reconstruction;

[0035] According to the connection order from left to right, the supervised decoder includes a label sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as the activation function:

[0036]

[0037] The output layer uses the Sigmoid function to activate each node:

[0038]

[0039] The supervised decoder inputs labeled sample information and outputs predicted labels.

[0040] Furthermore, the training samples are trained using a “pre-training + fine-tuning” strategy, where:

[0041] Unlabeled samples are pre-trained on the encoder and unsupervised decoder, using mean square error as the loss function, the formula is:

[0042]

[0043] In the formula, s is the sample size, n is the number of components in each subsample, and x ij is the true value of the jth component of the ith subsample, is the predicted value of the jth component of the i-th subsample;

[0044] Within the preset iteration period T1, when the loss no longer decreases, the training is terminated and the sub-model of the last training is saved;

[0045] The labeled samples are fine-tuned on the encoder and unsupervised decoder, and pre-trained on the supervised encoder. The weighted sum of the binary cross entropy and the mean square error is used as the loss function. The formula is:

[0046]

[0047] In the formula, y i is the true label of the sample, is the model prediction label, α is the weight coefficient, and its value range is [0,1];

[0048] Within the preset iteration period T2, when the loss no longer decreases, the training is terminated and the model of the last training is saved;

[0049] Import the test samples into the saved model for evaluation, and continuously fine-tune the model until the prediction effect is good and stable, and save the final model as the intelligent early warning model for casing loss.

[0050] The present invention has the following beneficial effects: the present invention collects and organizes logging time series data in the process of plugging and drilling, and performs data preprocessing: backward difference is used to obtain incremental changes between single data, normalization is used to eliminate errors caused by inconsistent dimensions of different data, time dislocation and time slicing are used to obtain a prediction sample set, and a semi-supervised autoencoder network architecture is constructed to automatically filter and compress invalid and redundant information in the data, and an LSTM network is added to extract time series information in the data. Due to the lack of casing damage information in the plugging and drilling operation, in order to make full use of a large amount of data without casing damage information, in the training process, unlabeled samples are used to pre-train the model, and then labeled samples are used for supervised learning fine-tuning, so that the trained casing damage warning model can finally predict the casing status in real time, efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Schematic diagram of the process of the real-time early warning method for casing damage in the drilling process based on the semi-supervised autoencoder provided in the embodiment of the present invention Figure 1 ;

[0052] Figure 2 Schematic diagram of the process of the real-time early warning method for casing damage in the drilling process based on the semi-supervised autoencoder provided in the embodiment of the present invention Figure 2 ;

[0053] Figure 3 A schematic diagram of a time misalignment and time slicing method in a data preprocessing process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] To make the purpose and technical solution of the present invention more clearly understood, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0055] Figure 1 A real-time early warning method for casing damage in a drilling process based on a semi-supervised autoencoder provided in an embodiment of the present invention comprises the following steps:

[0056] Step 10, obtaining logging time series data and corresponding casing damage information during the drilling process;

[0057] Step 20, processing the logging time series data and the corresponding casing damage labels to obtain a cutting data set;

[0058] Step 30: divide the cutting data set into labeled samples and unlabeled samples according to the casing damage information.

[0059] Step 40, randomly sampling the labeled samples in a ratio of 8:2, wherein 80% of the samples and the unlabeled samples form training samples and 20% of the samples form test samples;

[0060] Step 50, constructing a semi-supervised autoencoder classification model, and finally obtaining a real-time intelligent prediction model for casing damage in the drilling process based on the semi-supervised autoencoder after training the training samples and testing the test samples.

[0061] In this embodiment, step 10 is mainly used for data collection. This embodiment obtains logging time series data from the database of the drilling operation monitoring center. The logging time series data includes time, drilling speed, drilling pressure, torque, rotation speed, drilling time, hook load, drill bit position, hook position, outlet density, inlet density, outlet conductivity, inlet conductivity, etc. It is worth mentioning that time is not used as an input for the later casing damage warning model, but as an identifier of other logging data. In addition, logging data such as outlet density, inlet density, outlet conductivity, inlet conductivity, etc. can be subjected to difference processing, such as outlet density minus inlet density, because the increase in density is more closely related to drilling and grinding casing.

[0062] In this embodiment, step 20 is mainly used for data preprocessing, including:

[0063] Step S21, label encoding. The algorithm can only process numerical data, and the text needs to be encoded as a numerical type, with a value of 1 indicating that the sleeve in the labeled sample is worn, and a value of 0 indicating that the sleeve in the labeled sample is not worn.

[0064] Step S22, backward difference. Since the different depths of cement plugs during drilling operations will cause differences in various logging data, it is necessary to perform backward difference on each logging data to eliminate the differences caused by the difference. The formula is:

[0065] Δx t =x t -x t-1

[0066] In the formula, x t is the value at time t, x t-1 is the value at time t-1, Δx t is the value increment at time t.

[0067] Step S23, normalization. The dimensions of each logging data are inconsistent, and the range of the data is too different, which will have a serious impact on the prediction performance of the model. It is necessary to scale and project each logging data to a unified interval. The normalization formula is:

[0068]

[0069] In the formula, X is the vector of all values, x is the original value, and x′ is the normalized value;

[0070] It should be noted that the original value in normalization is the value increment after backward difference processing.

[0071] Step S24, time dislocation, such as Figure 3 In order to achieve early warning of casing damage, this embodiment subtracts a certain value from the time corresponding to all casing damage labels, so that the time corresponding to the casing damage labels is ahead of the time corresponding to the logging data, and the casing damage labels with the advanced time are re-correlated with the logging time series data at the same time to form a misaligned data set, so that the model can learn the knowledge related to the labels lagging behind the logging data;

[0072] Step S25, time slicing, such as Figure 3 As shown in the figure, there will be signs of casing damage some time before it occurs, which is manifested as abnormal fluctuations in the logging data. Therefore, it can be considered that the occurrence of casing damage is related to the logging data in the previous period of time. The dislocation data set is cut according to a certain time length and time interval. Each slice is a sample, and each sample includes multiple sub-samples to form a cut data set.

[0073] In this embodiment, step 30 is mainly used to divide the samples into labeled samples and unlabeled samples. It should be noted that the segmentation data set should be formed through step 20 first, and then the samples should be divided through step 30. If the processing steps are exchanged, some valuable labeled sample information will be lost.

[0074] In this embodiment, step 40 is mainly used for dividing training samples and test samples.

[0075] In this embodiment, step 50 is mainly used for training and testing the semi-supervised autoencoder classification model, which can be used to perform Figure 2 The technical solution of the method embodiment shown.

[0076] In this step, the semi-supervised autoencoder classification model consists of an encoder, an unsupervised decoder and a supervised decoder:

[0077] Specifically, in the connection order from left to right, the encoder includes an input layer, an LSTM layer, an activation layer, a fully connected layer, a Dropout layer, and an output layer, wherein the activation layer uses ReLU as the activation function:

[0078] ReLU(z)=max(0,z)

[0079] Where z is the output of the previous layer;

[0080] The output layer uses the Sigmoid function to activate each node:

[0081]

[0082] The encoder input is a labeled sample or an unlabeled sample, and the output is labeled sample information or unlabeled sample information;

[0083] Specifically, according to the connection order from left to right, the unsupervised decoder includes an unlabeled sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as the activation function:

[0084]

[0085] The output layer uses the Sigmoid function to activate each node:

[0086]

[0087] The unsupervised decoder inputs unlabeled sample information and outputs unlabeled sample reconstruction;

[0088] Specifically, according to the connection order from left to right, the supervised decoder includes a label sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as the activation function:

[0089]

[0090] The output layer uses the Sigmoid function to activate each node:

[0091]

[0092] The supervised decoder inputs labeled sample information and outputs labels.

[0093] In this step, the training samples are trained using the strategy of "pre-training + fine-tuning", and the steps are as follows:

[0094] Step S51, the unlabeled samples are pre-trained on the encoder and the unsupervised decoder, using the mean square error as the loss function, the formula is:

[0095]

[0096] In the formula, s is the sample size, n is the number of components in each subsample, and x ij is the true value of the jth component of the ith subsample, is the predicted value of the jth component of the i-th subsample;

[0097] Within the preset iteration period T1, when the loss no longer decreases, the training is terminated and the sub-model of the last training is saved;

[0098] Step S52: fine-tune the labeled samples on the encoder and unsupervised decoder, pre-train on the supervised encoder, and use the sum of the binary cross entropy and the mean square error as the loss function. The formula is:

[0099]

[0100] In the formula, y i is the true label of the sample, is the model prediction label, α is the weight coefficient, and its value range is [0,1];

[0101] Within the preset iteration period T2, when the loss no longer decreases, the training is terminated and the model of the last training is saved.

[0102] Specifically, in the actual training process, the following settings can be made: iteration period T1 is 200, iteration period T2 is 50, and the Adam optimizer is used to update the network parameters each time, with a learning rate of 0.001.

[0103] In this step, the test samples are imported into the saved model for evaluation, and the model is continuously fine-tuned until the prediction effect is good and stable, and the final model is saved as the casing loss intelligent early warning model.

[0104] The embodiments described above are merely descriptions of preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the scope of protection determined by the claims of the present invention.

Claims

1. A real-time early warning method for casing damage in the drilling process based on a semi-supervised autoencoder, characterized in that: The following steps are involved: S1: Obtaining logging time series data during the drilling process and casing damage information corresponding to the logging time series data; S2: Processing the casing damage information and the logging time series data corresponding to the casing damage information to obtain a cutting data set; S3: Divide the cutting data set into labeled samples and unlabeled samples according to the casing damage information; S4: Randomly sample the labeled samples in a ratio of 8:2, of which 80% and the unlabeled samples constitute the training samples and 20% constitute the test samples; S5: constructing a semi-supervised autoencoder classification model, and finally obtaining a real-time intelligent prediction model for casing damage in the drilling process based on the semi-supervised autoencoder after training the training samples and testing the test samples; The semi-supervised autoencoder classification model is composed of an encoder, an unsupervised decoder and a supervised decoder; The encoder includes an input layer, an LSTM layer, an activation layer, a fully connected layer, a Dropout layer, and an output layer arranged in sequence, wherein the activation layer uses ReLU as an activation function: ; Where z is the output of the previous layer; The output layer uses the Sigmoid function to activate each node: ; Where z is the output of the previous layer; The encoder input layer inputs labeled samples or unlabeled samples, and the output layer outputs labeled sample information or unlabeled sample information; The unsupervised decoder includes an unlabeled sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as an activation function: ; The output layer uses the Sigmoid function to activate each node: ; The unlabeled sample information input layer of the unsupervised decoder inputs the unlabeled sample information output by the encoder, and the output layer outputs the unlabeled sample reconstruction; The supervised decoder includes a labeled sample information input layer, a Dropout layer, a fully connected layer, an activation layer, an LSTM layer, and an output layer, wherein the activation layer uses LeakyReLU as the activation function: ; The output layer uses the Sigmoid function to activate each node: ; The labeled sample information input layer of the supervised decoder inputs the labeled sample information output by the encoder, and the output layer outputs the label; The training samples are trained using the "pre-training + fine-tuning" strategy, and the steps are as follows: S51: Unlabeled samples are pre-trained on the encoder and unsupervised decoder, using mean squared error as the loss function; ; Where s is the sample size, n is the number of components in each subsample, is the true value of the jth component of the ith subsample, is the predicted value of the jth component of the i-th subsample; In the preset iteration cycle T 1, when the loss no longer decreases, the training is terminated and the sub-model of the last training is saved; S52: Fine-tune the encoder and unsupervised decoder with labeled samples, pre-train the supervised encoder, and use the sum of binary cross entropy and mean square error as the loss function; ; in, is the true label of the sample, Predict labels for the model, is the weight coefficient, and its value range is [0,1]; In the preset cycle T 2, when the loss no longer decreases, the training is terminated and the model of the last training is saved; The test samples are input into the saved model for evaluation, and the model is continuously fine-tuned until the prediction effect is good and tends to be stable. The final model is saved as the real-time intelligent prediction model for casing damage in the drilling and plugging process based on the semi-supervised autoencoder. The real-time intelligent prediction model for casing damage in the drilling and plugging process based on the semi-supervised autoencoder provides real-time warning for casing damage in the drilling and plugging process.

2. The method for real-time early warning of casing damage in the drilling process based on a semi-supervised autoencoder according to claim 1 is characterized in that: In step S2, the casing damage information is processed into a label code, and a value of 1 is set to indicate that the casing in the labeled sample is worn, and a value of 0 is set to indicate that the casing in the labeled sample is not worn.

3. The method for real-time early warning of casing damage in the drilling process based on a semi-supervised autoencoder according to claim 2 is characterized in that: In step S2, the logging time series data processing includes backward difference, normalization, time dislocation and time slice processing; The backward difference formula is: ; in, is the value at time t, is the value at time t-1, is the value increment at time t; The normalization formula is: ; Among them, X is the vector composed of all values, x is the original value, Normalized value; The time misalignment is to subtract a certain value from the time corresponding to all casing damage information, so that the time corresponding to the casing damage information is advanced to the time corresponding to the logging time series data, and the casing damage information with the advanced time is re-correlated with the logging time series data at the same time to form a misaligned data set; The time slice is to cut the dislocated data set according to a certain time length and time interval, each slice is a sample, and each sample includes multiple sub-samples to form a cut data set.

4. The method for real-time early warning of casing damage in the drilling process based on a semi-supervised autoencoder according to claim 1, 2 or 3, characterized in that: The logging time-effectiveness data include time, drilling speed, drilling pressure, torque, rotation speed, drilling time, hook load, drill bit position, hook position, outlet density, inlet density, outlet conductivity and inlet conductivity.