Method for predicting real-time drilling speed of drilling machine based on Transform framework

By simplifying the Transformer model structure, using only the Encoder module and the CLFN module, combined with the multi-head sparse self-attention mechanism, the problem of traditional drilling speed prediction methods being difficult to capture nonlinear relationships is solved, and efficient and real-time drilling speed prediction effects are achieved.

CN118734036AActive Publication Date: 2024-10-01CHINA UNIV OF MINING & TECH

Patent Information

Application Number
CN202410855221.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Traditional penetration rate prediction methods are difficult to capture complex nonlinear relationships, and the complex encoder-decoder structure of the Transformer model affects the real-time performance and computational efficiency of the model.

Method used

A drilling rate prediction method based on the Transformer framework is proposed to simplify the model structure, using only the Encoder module, combined with the Channel-Linear Feed-Forward Network (CLFN) module and the multi-head sparse self-attention mechanism, focusing on capturing the differences between multi-variable sequences. Adaptive correlation, discarding the Decoder module, improves data processing capabilities through independent channel embedding and attention mechanisms.

Benefits of technology

It improves the real-time performance and computing efficiency of the model, and significantly improves the accuracy and performance of drilling rate prediction, which is better than the LSTM, Transformer and Informer models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734036A_ABST
    Figure CN118734036A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time drilling speed prediction method for a drilling machine based on a Transform framework, and the method comprises the steps: 1, constructing a data set which comprises a drilling speed and feature data with a relatively large mutual information value with the drilling speed; 2, the drilling speed and the feature data corresponding to the drilling speed are subjected to standardization processing; step 3, constructing a CLform model, wherein the CLform model comprises a Normlification module, a CLFN module, an Encoder module, a Projector module and a De-Normlification module, and the Normlification module, the CLFN module, the Encoder module, the Projector module and the De-Normlification module are connected in sequence; and 4, dividing data in the data set into a training set, a verification set and a test set, and training, verifying and testing the CLformer model. A mean square error and a mean absolute error are adopted to evaluate the CLform model; a trained CLform model is obtained; the method is used for drilling machine real-time drilling speed prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of drilling, and in particular relates to a real-time drilling speed prediction method for a drilling rig based on a Transformer framework. Background Art

[0002] In drilling operations, the prediction of drilling speed is particularly critical. Accurately predicting drilling speed can not only reduce drilling risks, but also optimize drilling parameters in advance, which is of great significance for improving deep well drilling efficiency. However, there are many parameters that affect the drilling speed, such as power head speed, drilling pressure, pipe pressure, etc. The influence of multiple parameters causes the drilling speed to change nonlinearly, which brings difficulties to prediction. Traditional prediction methods often rely on manual extraction of data features and simple linear models, which cannot capture complex nonlinear relationships well.

[0003] In actual application scenarios, while pursuing the accuracy of the prediction model, real-time performance is usually more valuable and promotable. The Transformer model avoids cumulative errors and ensures high real-time performance with its sequence-to-sequence structure and parallel output. With the advancement of deep learning technology, it has been confirmed that the Transformer performance of long sequence prediction is better than LSTM. In addition, the combination of GRU and Informer, using the GRU module to extract time series features as the input of the Informer module, has achieved significant results in accuracy. More and more drilling speed prediction models use the Transformer architecture. However, the Transformer model uses a complex encoder-decoder structure, which affects the real-time performance and computational efficiency of the model. Summary of the invention

[0004] The technical problem to be solved by the present invention is to simplify the structure of the Transformer model used for drilling speed prediction so that the model can focus more on the prediction task. The present invention proposes a drilling speed prediction method for a drilling rig based on the Transformer framework, comprising the following steps:

[0005] Step 1: Build a dataset

[0006] Including drilling speed, and characteristic data corresponding to the drilling speed;

[0007] Standardizing the drilling speed and characteristic data corresponding to the drilling speed;

[0008] Step 2: Build a drilling speed prediction model

[0009] Step 3: divide the data in the dataset into a training set, a validation set, and a test set, train, validate, and test the drilling speed prediction model, and obtain a trained drilling speed prediction model.

[0010] Furthermore, the characteristic data corresponding to the drilling speed in step 1 refers to characteristic data with a large mutual information value with the drilling speed, such as measured well depth MD, bit pressure WOB, pipe pressure SP, torque TQ, rotation speed RS, mud flow MF, hook load HL and vertical well depth TVD.

[0011] Furthermore, the drilling speed prediction model in step 1 includes a Normalization module, a CLFN module, an Encoder module, a Projector module, and a De-Normlization module connected in sequence; a sliding window method is used to generate an input sequence X=[x1, x2,…, x S ] T ∈R S×C , input to the Normalization module, where S is the input sequence length and C is the number of features of the input data; the Normalization module is used to translate and scale the input sequence X to obtain the sequence X in ; Construct the mask data X0 used to block future information, and the sequence X in Input together into the CLFN module for data embedding and output The Encoder module is used to Perform feature extraction and output H; the Projector module is used to map H to the output Y′=[y1′,y′2,…,y′ P ] T , where P is the predicted sequence length and C is the input feature number; the De-Normlization module is used to perform de-normalization on the sequence Y′ to obtain the output

[0012] Furthermore, in the Normalization module, translation and scaling are processed as follows:

[0013]

[0014] Among them, μ x ∈R 1×C is the mean, σ x ∈R 1×C is the variance, ⊙ represents the element-by-element multiplication operation; X in =[x′1,x′2,…,x′ S ] T ∈R S×C .

[0015] Furthermore, in the De-Normlization module, the de-normalization process is:

[0016]

[0017] Furthermore, the input of the CLFN module is (X in +X0)∈R S×C' , where S refers to the sequence length, C' refers to X in The feature number after adding X0 in the feature number dimension;

[0018] The CLFN module includes two UpLinear layers, two Linear layers, one DownLinear layer and one Dropout layer;

[0019] In the CLFN module X in +X0 passes through an UpLinear layer and a Linear layer in sequence, and then is processed by the GELU activation function to obtain feature f1;

[0020] In the CLFN module X in +X0 passes through another UpLinear layer and another Linear layer in turn to obtain feature f2; feature f1 is multiplied by feature f2, and then passes through the DownLinear layer and the Dropout layer to obtain the output of the CLFN module.

[0021] Furthermore, there are N Encoder modules; each Encoder module includes a multi-head sparse self-attention layer and a feedforward neural network; and residual connections and layer normalization are added after the multi-head sparse self-attention layer and the feedforward neural network.

[0022] Furthermore, mean square error (MSE) and mean absolute error (MAE) were used to evaluate the drilling speed prediction model;

[0023]

[0024] Where: m is the size of the test data set, y i is the true value of drilling speed, Predict ROP values ​​for the model.

[0025] Furthermore, the optimizer uses Adam optimizer and the loss function uses MSELoss.

[0026] Beneficial effects: This study proposes a Transformer-based drilling speed prediction model, CLformer, which only uses the Encoder module in the Transformer model, focuses on capturing the adaptive correlation between multivariate sequences, and abandons the Decoder module, which greatly simplifies the model architecture while making the model more focused on the prediction task. In addition, by constructing a Channel-Linear Feed-Forward Network (CLFN) module, the independent channel embedding of the data is completed, and the multi-head sparse self-attention mechanism accurately captures the complex interactions between variables, allowing the CLformer model to deeply mine the potential information of time series data. Experiments on real data sets show that the drilling speed prediction effect of the CLformer model is better than that of network models such as LSTM, Transformer, and Informer.

[0027] Therefore, the main contributions of the present invention are:

[0028] 1. A Transformer-based drilling speed prediction model CLformer was proposed, which adopted a simplified Encoder architecture to improve the real-time performance and computational efficiency of the model.

[0029] 2. The CLFN module was designed to enhance the model's ability to process multivariate time series data.

[0030] 3. Experimental results show that the prediction accuracy and real-time performance of CLformer on actual data sets are better than those of existing LSTM, Transformer and Informer models. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is the result diagram of the mutual information correlation analysis of drilling characteristics;

[0032] Figure 2 It is a structural diagram of the CLformer model of the present invention;

[0033] Figure 3 It is a CLFN module structure diagram of the present invention;

[0034] Figure 4 This is a diagram showing the effect of step size on the experiment. DETAILED DESCRIPTION

[0035] The present invention will be further described below in conjunction with the accompanying drawings

[0036] A drilling speed prediction method for a drilling rig based on a Transformer framework of the present invention comprises the following steps:

[0037] Step 1, Data Collection

[0038] All data used in the specific implementation of the present invention are from a directional well in a specific block on site, and the logging data in the completed well is analyzed. Deep learning is very sensitive to missing values ​​in incomplete data, and missing values ​​will cause the deep learning model to fail. Since the missing data accounts for a smaller proportion than the overall logging data, a data processing method that ignores incomplete data is adopted. The final data includes various data with a well depth of 500 meters to more than 3,000 meters, such as measured well depth (Measured Depth, MD), drilling pressure (Weight on Bit, WOB), pipe pressure (Standpipe Pressure, SP), torque (Torque, TQ), rotational speed (Rotary Speed, RS), mud flow (Mud Flow, MF), drill pipe diameter (Diameter, D), hook load (HookLoad, HL), vertical well depth (TVD) and target column-drilling rate (Rate of Penetration, ROP), totaling more than 99,000 data. Some of the data are shown in Table 1

[0039] Table 1 Some drilling data

[0040]

[0041] Step 2: Feature Selection

[0042] If all logging data features are input into the deep learning model for training, it may lead to too many model dimensions and poor model prediction effect, so feature selection is very important for the drilling rate prediction model. Traditional feature correlation analysis mainly includes: Pearson correlation coefficient method, Spearman correlation coefficient method and Kendall correlation coefficient method, but these methods can only reflect the linear correlation and simple nonlinear relationship between two features. When there is a complex nonlinear relationship between two features, these methods perform poorly, so the mutual information method is introduced.

[0043] Mutual information is a method used to measure the correlation between two variables. It is usually used for feature selection and feature correlation analysis. When there is a strong nonlinear dependency between two variables, the mutual information value will be far greater than 1. Compared with traditional feature correlation analysis methods, the mutual information method is not limited by linear relationships, can discover nonlinear relationships and complex feature correlations, and is applicable to a wider range of data types and scenarios.

[0044] Assume that the joint distribution of two random variables X and Y is p(x, y), and the marginal distributions are p(x) and p(y), respectively. Then the mutual information I(X, Y) is the relative entropy of the joint distribution p(x, y) and the marginal distributions p(x) and p(y), expressed as follows:

[0045]

[0046] All data were analyzed by mutual information method, and the following results were obtained: Figure 1 The drilling characteristics correlation analysis results shown are Figure 1 It can be seen that the correlation coefficient between the target column drilling rate (ROP) and the drill pipe diameter (D) is low, only 0.78, so this feature is discarded. Therefore, nine features, including measured well depth (MD), bit pressure (WOB), pipe pressure (SP), torque (TQ), rotation speed (RS), mud flow (MF), hook load (HL), vertical well depth (TVD), and drilling rate (ROP), are selected as input variables of the drilling rig drilling rate prediction model.

[0047] Step 3: Data standardization

[0048] The collected data will have large differences in various indicators due to the different measurement units and orders of magnitude between the various features. The data standardization method is used to remove the dimension and convert the data of different orders of magnitude into the same order of magnitude to eliminate the influence of the order of magnitude. The original data of each variable z is preprocessed using the conventional standard deviation method, that is,

[0049]

[0050] Among them, z′ i —normalized data; i —Data before normalization; —The average value of the data before standardization; n—the total number of data.

[0051] After standardization, the data is scaled so that the mean of all features is 0 and the standard deviation is 1, eliminating the impact of dimension.

[0052] Step 4: Drilling rate prediction model construction

[0053] The drilling speed prediction model constructed by the present invention is also called the CLformer model, and its overall architecture is as follows: Figure 2 The CLformer model includes the Normalization module, CLFN module, Encoder module, Projector module, and De-Normlization module connected in sequence. The input and output variables of each module of the CLformer model are listed in Table 2.

[0054] Table 2 Input and output variables of each module in the CLformer model

[0055]

[0056] (1) Normalization module and De-Normalization module

[0057] The stationarity of time series is very important for prediction, and real data often exhibits non-stationarity, and the data distribution is offset: their statistical properties, such as mean and variance, will change over time. Classic statistical methods, such as ARIMA, stabilize the data by differencing. For deep learning models, the Series-Stationarization method is widely used to deal with non-stationary problems. This study uses this method to process non-stationary input data, including Normalization module and De-Normalization module. The time series model uses a sliding window method to generate the input sequence, and performs Z-Score normalization on the sequence fragments in each window, discarding the learnable parameters, that is, the input and output of the data only need to be standardized and de-normalized, which greatly simplifies the model. For the input sequence X=[x1,x2,…,x S ] T ∈R S×C , in the Normalization module, X is translated and scaled to obtain X in =[x′1,x′2,…,x′ S ] T ∈R S×C , where S is the input sequence length and C is the number of features of the input data. The translation and scaling of the data are processed as follows:

[0058]

[0059] Among them, μ x ∈R 1×C is the mean, σ x ∈R 1×C is the variance, and ⊙ represents the element-by-element multiplication operation. Through the Normalization module, the distribution of the model's input data becomes more stable, reducing the non-stationarity of the sequence.

[0060] In the De-Normalization module, the predicted time series Y′=[y1′,y′2,…,y′ P ] T ∈R P×C Perform denormalization, where P is the predicted sequence length and C is the number of input features. Receive μ from the Normalization module x , σ x The value is obtained through the following formula.

[0061]

[0062] After the De-Normalization module, the sequence is restored. In this way, the model can better handle non-stationary time series data and improve the accuracy and stability of prediction.

[0063] (2)CLFN module

[0064] In the data embedding stage, unlike the traditional Transformer model that adds timestamps, location information, and data as tokens, this study adopts a channel-independent data embedding method. The data to be embedded is the data X processed by the Normalization module. in And the mask data X0 constructed to block future information. Each variable uses a separate channel. This independent channel approach allows the model to retain the physical meaning and multivariate correlation of each feature while maintaining the integrity of the time series data.

[0065] The original Transformer only uses one convolutional layer for data embedding, especially after the input data X is de-stationaryized by the Normalization module, its data extraction ability needs to be improved. Therefore, a module - Channel-Linear Feed-Forward Network (CLFN) is invented and designed for data embedding. Different from the GDFN (Gated-Dconv Feed-Forward Network) module proposed in the Restormer model, the CLFN module uses a linear layer instead of a convolutional layer, making it suitable for independent channel embedding of time series data. Each channel can better retain the characteristics and meaning of the data, and simplifies the model and reduces the computational complexity.

[0066] The CLFN module structure is as follows Figure 3 The input of the module is (X in +X0)∈R S×C' , where S refers to the sequence length, C' refers to X in The feature number after adding X0 in the feature number dimension (greater than X in The number of features C), the output is D is the embedding dimension. The UpLinear layer is a linear layer responsible for mapping the input data to a higher dimension (usually 4*D) for more complex feature extraction. The Linear layer serves as an intermediate hidden layer to increase data expression capabilities. When selecting the activation function, it was found that the data in the negative domain has a significant impact on the prediction results, and its distribution characteristics need to be well preserved. Therefore, the GELU activation function is selected to help the model introduce nonlinearity, which is necessary for enhanced data representation. The DownLinear layer is responsible for reducing the data dimension to D. Finally, the Dropout layer is added, which prevents the model from overfitting by randomly discarding the activation of some neurons. The CLFN module is expressed by the following calculation formula:

[0067]

[0068] Where g represents the activation function GELU, [X in ,X0] represents the addition of two tensors in the feature dimension, and W and b are parameter matrices.

[0069] After the CLFN module, each time series driven by the underlying complex dynamics is converted into tokens by the data embedding layer to characterize the characteristics of each variable. The data is mapped to the required dimensions, providing a rich feature representation for the Encoder module. Overall, the CLFN module not only improves the quality of data embedding, but also optimizes the overall computational burden of the model.

[0070] (3) Encoder module

[0071] Output of the CLFN module As the input of the Encoder module, the output of the Encoder module is denoted as H∈R C×D :

[0072] H i+1 =Encoder(H i ),i=0,…,N-1 (22)

[0073] Where N is the number of modules of the Encoder.

[0074] The Encoder module structure is as follows Figure 2 As shown on the left. The attention mechanism used by the Encoder module is a multi-head sparse self-attention mechanism (multi-head ProbSparse Self-attention), which is used to capture long-term dependencies in the sequence and extract important information. Different from the traditional self-attention mechanism, the multi-head sparse self-attention mechanism reduces the computational complexity by sparsely calculating the attention weight matrix and uses a probabilistic method to determine the attention weight of each head. First, Generate three tensors, query Q, key K, value V; the algorithm steps in the Encoder module are as follows:

[0075] Step 1: Initialization, setting tensor h is the number of heads of the attention mechanism), and the hyperparameters c,u=clnL Q , U=L Q LqCy K ;

[0076] Step 2: Random sampling, randomly select U pairs of dot products from K as

[0077] Step 3: Calculate sample scores and set sample score matrix

[0078] Step 4: Calculate the measured values ​​by row

[0079] Step 5: Set the top query and select the largest one from Q according to the measured value M. u As the top query matrix

[0080] Step 6: Calculate the attention weight and the attention weight matrix

[0081] Step 7: Set the default score, set S0 = mean(V);

[0082] Step 8: Merge the scores and merge S = {S1, S0} into the attention output matrix.

[0083] The Encoder module adds residual connections and layer normalization (Add&LayerNorm), which helps prevent the vanishing gradient problem during training and accelerates convergence. Layer normalization was originally proposed to improve the convergence and training stability of deep networks. In a typical Transformer-based predictor, this module normalizes the feature variable representations of the same timestamp, gradually making each variable indistinguishable from each other. However, in this model, normalization is applied to the sequence dimension of each feature variable, as shown below:

[0084]

[0085] where H = [h1,…,h C′ ]∈R C'×DSince all sequences as (variable) tokens are normalized to a normal distribution, the differences caused by inconsistent measurements can be reduced. At the end of the module, the output is obtained through a feed-forward neural network.

[0086] (4) Projector module

[0087] The Projector module consists of a linear layer that maps the output H of the Encoder module to the output Y′=[y1′,y′2,…,y′ P ] T , where P is the predicted sequence length and C is the number of input features.

[0088] The model of the present invention is verified by experimental method:

[0089] (1) Prepare the dataset

[0090] The standardized data is constructed into a multivariate data set, which has 9 input feature variables, namely measured well depth (MD), bit pressure (WOB), pipe pressure (SP), torque (TQ), rotation speed (RS), mud flow (MF), hook load (HL), vertical well depth (TVD), and drilling rate (ROP). The data set is divided into training set, validation set, and test set in a ratio of 7:2:1, as shown in Table 3.

[0091] Table 3 Dataset details

[0092]

[0093] (2) Evaluation indicators

[0094] In order to effectively evaluate the model proposed in this study, this study mainly evaluates two indicators, namely, mean square error (MSE) and mean absolute error (MAE), which are defined as follows:

[0095]

[0096] Where: m is the size of the test data set, y i is the true value, is the model prediction value. According to the definition, the smaller the indicator is, the better the prediction effect is and the better the model prediction performance is.

[0097] (3) Experimental environment

[0098] The experimental running environment is 12th Gen Intel(R)Core(TM)i7-12650, 32G memory and an NVIDIAGeForce RTX4060 GPU graphics card. The model is built based on the PyTorch deep learning framework. According to the empirical value, the batch size is set to 64, the learning rate adopts the decay strategy, and the early stopping strategy (Early Stopping) is added during training to prevent overfitting. The optimizer uses the Adam optimizer and the loss function uses MSELoss. The constructed models are all prediction models with multi-variable input and single-variable output, and the prediction feature variable is the drilling speed.

[0099] (4) Experimental analysis of the research on lookback step length and prediction step length

[0100] This paper explores the joint impact of the lookback step and the prediction step on the model's prediction performance. The lookback step refers to the number of historical time points that the model considers when making predictions, while the prediction step refers to the number of time points that the model predicts in the future. In theory, an appropriate lookback step can provide enough historical information for accurate predictions, while a suitable prediction step ensures that the model can effectively predict future trends.

[0101] In order to comprehensively evaluate the impact of the lookback step size and the prediction step size, a series of experiments are designed in this specific implementation. Specifically, the prediction step size T∈{32,64,96,128} is set, and multiple different lookback step sizes "Timestep" are tested under each prediction step size. The mean square error (MSE) of the model is recorded as the performance indicator for each set of experiments.

[0102] The experimental results are as follows Figure 4 The experimental results show that under the condition of fixed prediction step length, as the lookback step length increases, the mean square error (MSE) of the model shows a slowly increasing trend, but this change is not very significant. Overall, it is maintained at a balance point.

[0103] The experiment further revealed that under the condition of a fixed lookback step length, the MSE of the model will increase with the increase of the prediction step length, and the MSE will increase by about 3% for every 32 prediction steps. The optimal lookback step length is often equal to the prediction step length.

[0104] In all experiments, except for the lookback step size and prediction step size, other parameters remain unchanged. The present invention further adjusts other hyperparameters. When the lookback step size is fixed to 192 and the prediction step size is fixed to 64, the embedding dimension D, the number of Encoder modules and the hyperparameter c are adjusted. Table 4 shows the impact of these parameter changes on the model performance. As can be seen from Table 4, even if these parameters are increased, the MSE does not change significantly, which means that the model is insensitive to changes in these parameters, so the possibility of the influence of hyperparameters on the lookback step size and prediction step size can be ruled out.

[0105] Table 4 Hyperparameter comparison experiment

[0106]

[0107] Through the above exploration, the present invention uses an independent channel data embedding method to enable the model to more effectively process the physical meaning and multivariate correlation of each feature, rather than simply relying on the amount of historical data. This method enables the model to maintain stable performance under different lookback step sizes, showing low sensitivity to the length of the input data. The model demonstrates robustness and generalization ability when processing complex and non-stationary data, because it can maintain consistent performance under variable conditions, rather than just adapting to specific lookback step size settings. This flexibility and stability are of great value to time series prediction models in practical applications.

[0108] (5) Model comparison experimental analysis

[0109] This specific implementation will conduct comparative experimental analysis with three other very classic models in the field of time series prediction, namely LSTM, Transformer and Informer.

[0110] LSTM: LSTM is a special recurrent neural network (RNN) that can learn long-term dependent information. The key to LSTM is its internal gating mechanism, which enables it to effectively filter and store important information in sequence data and prevent gradient explosion or vanishing problems in RNN during training. It is one of the commonly used time series prediction models.

[0111] Transformer: Transformer is a model based on the self-attention mechanism. It abandons the traditional loop and convolution structure and improves efficiency by processing the input sequence in parallel. The core advantage of Transformer is that it can capture long-distance dependencies in the sequence, which is especially important when processing complex input sequences. Its structure includes an encoder and a decoder, each of which consists of multiple identical layers. Each layer contains a multi-head self-attention mechanism and a simple, positionally fully connected feedforward network.

[0112] Informer: Informer solves the time complexity and memory usage problems of traditional Transformer through a multi-head sparse self-attention mechanism, achieving O(L ln L) time complexity and memory usage. A key feature of Informer is that its decoder adopts a generative style, which can predict the entire long time series at once, rather than step by step, which greatly improves the reasoning speed of long sequence prediction.

[0113] (5.1) Prediction result comparison experiment

[0114] Table 5 shows the performance comparison of different models under various lookback steps and prediction steps, with mean square error (MSE) and mean absolute error (MAE) as evaluation indicators, and lower indicator values ​​represent better model performance. In most tests, the CLformer model performed the best, followed by Transformer, then Informer, and LSTM performed the worst. This may reflect the limitations of LSTM in processing complex time series, and it is usually necessary to enhance its time series feature processing capabilities through data embedding layers. The Transformer model performed comparable to CLformer in some tests, but its performance declined in long-term prediction tasks. The MSE of CLformer and Transformer increased slightly with the increase of the lookback step, but the increase was limited, indicating that these two models can effectively process longer historical information to a certain extent. The Informer model performed better and better with the increase of the prediction step, showing its potential in long sequence prediction.

[0115] Overall, the CLformer model maintains good drilling rate prediction performance under various combinations of lookback step and prediction step, which may be due to its independent channel data embedding method and efficient attention mechanism. The Transformer and Informer models are able to approach the performance of CLformer in some cases, but their performance decreases when dealing with longer prediction steps. These results emphasize the importance of considering the model architecture and data processing method when choosing a time series forecasting model.

[0116] Table 5 Model prediction comparison experiment

[0117]

[0118] (5.2) Real-time comparison experiment

[0119] In order to evaluate the real-time performance of different models, the present invention conducted a series of comparative experiments. In the experiment, the prediction step size and the lookback step size of all models were set to 64. By comparing the size of the model weight and the inference time. The results shown in Table 6 below were obtained. The LSTM model LSTM performed best in real-time performance, but was not as good as other models in prediction accuracy. In contrast, the model CLformer constructed by the present invention has a moderate model weight and the best prediction index while maintaining a low inference time. Transformer and Informer performed similarly. In addition, the inference time is correlated to a certain extent with the size of the model weight.

[0120] Table 6 Real-time comparison experiment

[0121]

[0122]

[0123] (6) Ablation experiment analysis

[0124] In order to further illustrate the contribution of each component in the CLformer model, the present invention conducted a series of ablation experiments. Specifically, the impact of the following variants on model performance was investigated:

[0125] Model A: The original Channel-Linear Feed-Forward Network (CLFN) module is replaced with the CNN layer used by Transformer to evaluate the contribution of CLFN in data embedding.

[0126] Model B: Change the channel-independent data embedding method and use the data embedding method in the traditional Transformer model to verify the effectiveness of the independent channel method.

[0127] Model C: The Normalization and De-Normalization modules in the model were removed, and the original data was used directly for training and prediction to verify the impact of the module on the model performance.

[0128] Table 7 Ablation experiment results

[0129]

[0130] The experimental results are shown in Table 7, and the CLformer model constructed by the present invention performs well. The experimental results of model A show that the replacement of the CLFN module with the CNN layer has little effect on MSE and MAE, which shows that the CLFN module does play a key role in data embedding. However, the role of the CLFN module in speed optimization is unmatched by CNN, and it can quickly extract features and map them to higher dimensions. The results of model B show that after changing the data embedding method, the performance of the model has declined, especially under longer lookback steps, the increase in MSE and MAE is more significant. This proves the effectiveness of the independent channel data embedding method in maintaining the stability and high precision of model performance. The results of model C are the most significant. After removing these modules, the performance of the model has declined significantly, and both MSE and MAE have increased significantly, highlighting the important role of Normalization and De-Normalization modules in data preprocessing and improving model performance.

[0131] The drilling process is a crucial link in the oil industry, and accurate data prediction can help improve operational efficiency and safety. The present invention proposes a multivariate time series prediction model CLformer based on deep learning. Through independent channel data embedding and attention mechanism, the modeling ability and prediction accuracy of the model for drilling data are significantly improved. In particular, the CLFN module proposed in the present invention plays a key role in data embedding. The independent channel data embedding method adopted performs well in processing multivariate time series data, which helps to more accurately capture the correlation and physical meaning between features, thereby improving the robustness and generalization ability of the model. Experimental results show that the CLformer model performs well in most cases, with low mean square error (MSE) and mean absolute error (MAE). When the lookback step size is fixed at 64, the average MSE in different prediction step size experiments reaches 6.76%, and the RMSE reaches 14.48%, which is much lower than other models. These results prove that the CLformer model has significantly improved the prediction accuracy. It also has advantages in real-time performance, with an inference time of 3.56ms and a moderate model weight. In summary, the CLformer model proposed in this paper performs well in drilling data prediction, has high prediction accuracy and real-time performance, and is of great significance for improving the efficiency and safety of the drilling process. In future technical solutions, the application of this model in other fields such as rescue drilling can be further explored, and more data embedding methods and attention mechanisms can be studied in depth to further improve the performance and generalization ability of the model.

Claims

1. Drilling rig drilling speed prediction method based on Transformer framework, It is characterized in that The steps include: Step 1: Build a dataset Including drilling speed, and characteristic data corresponding to the drilling speed; Standardizing the drilling speed and characteristic data corresponding to the drilling speed; Step 2: Build a drilling speed prediction model Step 3: divide the data in the dataset into a training set, a validation set, and a test set, train, validate, and test the drilling speed prediction model, and obtain a trained drilling speed prediction model.

2. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The feature data corresponding to the drilling speed in step 1 refers to feature data having a larger mutual information value with the drilling speed.

3. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The characteristic data corresponding to the drilling speed in step 1 include the measured well depth MD, the bit pressure WOB, the pipe pressure SP, the torque TQ, the rotation speed RS, the mud flow MF, the hook load HL, and the vertical well depth TVD.

4. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The drilling speed prediction model in step 1 includes a Normlization module, a CLFN module, an Encoder module, a Projector module, and a De-Normlization module connected in sequence; The sliding window method is used to generate the input sequence X=[x 1 ,x 2 ,…,x S ] T ∈R S×C , input to the Normalization module, where S is the input sequence length and C is the number of features of the input data; The Normalization module is used to translate and scale the input sequence X to obtain the sequence X in ; Construct mask data X to block future information 0 , with the sequence X in Input together into the CLFN module for data embedding and output The Encoder module is used to Perform feature extraction and output H; The Projector module is used to map H to the output Y′=[y 1 ′,y′ 2 ,…,y′ P ] T , where P is the predicted sequence length and C is the number of input features; The De-Normlization module is used to perform de-normalization on the sequence Y′ to obtain the output 5. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 4, It is characterized in that The translation and scaling process is as follows: Among them, μ x ∈R 1×C is the mean, σ x ∈R 1×C is the variance, ⊙ represents the element-by-element multiplication operation; X in =[x′ 1 ,x′ 2 ,…,x′ S ] T ∈R S×C .

6. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 5, It is characterized in that The de-normalization process is:

7. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The input of the CLFN module is (X in +X 0 )∈R S×C' , where S refers to the sequence length, C' refers to X in and X 0 The number of features after adding the feature dimensions; The CLFN module includes two UpLinear layers, two Linear layers, one DownLinear layer and one Dropout layer; In the CLFN module X in +X 0 After passing through an UpLinear layer and a Linear layer in sequence, and then processed by the GELU activation function, the feature f is obtained. 1 ; In the CLFN module X in +X 0 After passing through another UpLinear layer and another Linear layer, the feature f is obtained. 2 ; Feature f 1 With feature f 2 After multiplication, it passes through the DownLinear layer and the Dropout layer to get the output of the CLFN module 8. According to the drilling rig drilling speed prediction method based on Transformer framework according to claim 5, It is characterized in that There are N encoder modules; each encoder module includes a multi-head sparse self-attention layer and a feedforward neural network; and residual connections and layer normalization are added after the multi-head sparse self-attention layer and the feedforward neural network.

9. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The mean square error (MSE) and mean absolute error (MAE) were used to evaluate the drilling speed prediction model. Where: m is the size of the test data set, y i is the true value of drilling speed, Predict ROP values ​​for the model.

10. According to the drilling rig drilling speed prediction method based on the Transformer framework according to claim 1, It is characterized in that The optimizer uses Adam optimizer and the loss function uses MSELoss.

Citation Information

Patent Citations

  • Prediction method, system and equipment for mechanical drilling speed time sequence characteristics based on Transform model and medium

    CN116822580A

  • Transformer-based electronic nose harmful gas detection method and system

    CN117033900A

  • XRF element quantitative analysis method based on Transform-CNN

    CN117238392A

  • Method for predicting remaining useful life of railway train bearing based on can-lstm

    US20230153608A1

Cited By

  • Drill jamming risk prediction model based on Pi-CLFormer

    CN120257824A

  • A pi-clformer-based risk prediction model for sticking

    CN120257824B