A Drilling Lithology Identification Method Based on Dynamic Behavioral Feature Enhancement
By combining dynamic behavior feature enhancement and Transformer encoder, the problem of insufficient utilization of dynamic information in existing lithology identification methods is solved, achieving high-precision and robust lithology identification, especially showing significant improvement in the identification of rare lithologies and thin interbedded layers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN PETROLEUM UNIVERSITY
- Filing Date
- 2026-03-19
- Publication Date
- 2026-07-03
Smart Images

Figure CN122333147A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of geological exploration and oil drilling technology, and in particular to a drilling lithology identification method based on enhanced dynamic behavior characteristics. Background Technology
[0002] In oil and gas drilling operations, real-time and accurate identification of the lithology of the formation where the drill bit is located is crucial for optimizing drilling parameters, ensuring wellbore stability, reducing operational risks, and achieving geosteering. Traditional lithology identification methods such as coring, cuttings analysis, and logging while drilling (LWD) have been used for a long time, but they have significant limitations: coring is expensive and cannot be continuously monitored; cuttings analysis has a time lag; and LWD equipment is expensive and often results in incomplete data due to tool availability limitations.
[0003] In recent years, with the development of machine learning technology, researchers have begun to explore the use of real-time drilling engineering parameters such as WOB (weight of drill bit) and ROP (rate of penetration) for lithology identification to avoid the delay and cost problems of traditional methods. For example, Imamverdiyev et al., in "Lithological facies classification using deep convolutional neural network," used deep convolutional neural networks to classify lithofacies from well logging data, verifying the effectiveness of deep learning methods in lithology identification; Merembayev et al., in "Machine learning algorithms for classification geology data from well logging," systematically compared the classification effects of various machine learning algorithms on well logging geological data, pointing out the differences in model performance under different geological conditions; Mahmoud et al., in "Application of machine learning models for real-time prediction of the formation lithology and tops from the drilling parameters," used multiple machine learning models to predict lithology based on drilling parameters, achieving real-time lithology identification under drilling conditions.
[0004] However, most existing studies rely solely on instantaneous drilling parameters or simple statistical summaries, failing to fully explore the dynamic evolution of parameters with depth during drilling. The drilling process is inherently dynamic; as the drill bit traverses different rock formations, the transient response of parameters, the intensity of local fluctuations, and the coupling relationships between multiple parameters contain rich lithological information that is difficult to capture using static values.
[0005] Therefore, there is an urgent need for a real-time lithology identification method that can effectively extract dynamic behavior features of drilling parameters and has high accuracy and strong robustness. Summary of the Invention
[0006] To address the problem of insufficient utilization of dynamic drilling parameter information in existing lithology identification methods, this invention proposes a drilling lithology identification method based on enhanced dynamic behavior features. This method significantly improves the accuracy and class balance of lithology identification by constructing dynamic behavior features (DBFs) that reflect the rate of parameter change, local fluctuation intensity, and dynamic coupling relationships between parameters, and by combining this with a Transformer encoder to model depth sequences.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0008] A drilling lithology identification method based on dynamic behavior feature enhancement, characterized by the following steps:
[0009] 1) Collect drilling parameter sequences and preprocess them, then construct a depth domain parameter matrix using a sliding window;
[0010] 2) Extract the dynamic behavior characteristics of drilling parameters within the sliding window, including parameter change rate, local fluctuation intensity, and dynamic coupling relationship between parameters;
[0011] 3) The dynamic behavior features are concatenated with the original parameters and input into the Transformer encoder. The intrinsic relationship between the dynamic behavior features and lithological changes is explored through the self-attention mechanism.
[0012] 4) Perform global average pooling on the encoded features, and input the pooling result into the fully connected layer to finally output the lithology classification result;
[0013] 5) Train the model using labeled data, optimize the model parameters by incorporating a cross-entropy loss function weighted by dynamic response, and evaluate the model's lithology identification capability through a comprehensive index of the validation set.
[0014] The drilling parameters collected in step 1) include: average mechanical drilling rate (ROPA), average hook load (HKLA), average drilling pressure (WOBA), average rotary table torque (TQA), average rotary table speed (RPMA), average riser pressure (SPPA), drill cuttings concentration (DXC), and average gas concentration (GASA); the target parameter is lithology (LITH).
[0015] The data preprocessing process includes:
[0016] 1.1) Perform outlier detection and processing on the collected data, and remove abnormal padding values;
[0017] 1.2) Use the Z-score standardization method to standardize the data and eliminate the influence of units;
[0018] 1.3) A sliding window mechanism is adopted, with the current depth as the reference point, the window length is set, and the window slides along the depth direction to capture the drilling parameter sequence containing historical information and form a depth domain parameter matrix.
[0019] In step 2), dynamic behavioral feature extraction is performed on the depth domain parameter matrix formed in step 1), specifically including:
[0020] 2.1) Parameter Change Rate Characteristics: Calculate the first and second derivatives of each parameter to reflect the transient response characteristics of the parameters when the drill bit traverses different rock strata. The formula is:
[0021]
[0022] Where, x t The value of the parameter at depth t. The first derivative, It is the second derivative;
[0023] Further extraction of curvature features to describe the nonlinear trend of parameter changes, the formula is as follows:
[0024]
[0025] Among them, κ t For curvature;
[0026] 2.2) Local fluctuation intensity characteristics: Calculate the standard deviation of each parameter within the sliding window to characterize the difference in parameter stability when the drill bit operates in homogeneous or transitional formations. The formula is:
[0027]
[0028] Where W is the length of the sliding window. This represents the mean of the parameters within the window.
[0029] 2.3) Dynamic coupling characteristics between parameters: Extract the nonlinear response residuals of drilling pressure and mechanical drilling speed within the sliding window, as well as the dynamic time delay relationship between rotary table speed and torque, to reflect the change in the drill bit-rock interaction mode.
[0030] In step 3), the dynamic behavior features are concatenated with the original parameters and input into the Transformer encoder, specifically including:
[0031] 3.1) Concatenate the dynamic behavior features with the original parameters along the feature dimension to form an enhanced feature matrix;
[0032] 3.2) The enhanced feature matrix is input into the Transformer encoder, which includes a position encoding module, a multi-head self-attention module, and a feedforward network module. Each module is followed by residual connections and layer normalization.
[0033] In step 4), the classification output specifically includes: performing global average pooling on the sequence features output by the Transformer encoder, inputting the pooling result into the fully connected layer, and outputting the lithology classification probability of each category after processing by the Softmax function.
[0034] In step 5), a model training framework consisting of a loss function, optimizer, and training strategy is constructed, and end-to-end training of the model is performed. The specific implementation process is as follows:
[0035] 5.1) A cross-entropy loss function with fusion dynamic response weighting is adopted. Based on measuring the error between predicted probability and actual lithology label classification, a dynamic response weighting factor is introduced to strengthen the focus on lithological interface regions. The formula is as follows:
[0036]
[0037] Where N is the number of samples in the batch, C is the number of lithological categories, and y i,c For the true label of sample i, For the predicted probability; δ i λ is the dynamic response intensity index of the window containing sample i, calculated based on the weighted sum of parameter change rate and fluctuation intensity; λ is an adjustable balance coefficient.
[0038] 5.2) The Adam optimizer is used to iteratively update the model parameters. The optimized model parameters include the weights and biases of each linear transformation layer in the Transformer encoder, as well as the weights and biases of the fully connected layers.
[0039] 5.3) Accuracy, macro-F1 score, and weighted-F1 score are used as comprehensive evaluation indicators for the validation set to comprehensively measure the model’s identification performance and class balance for various types of lithology.
[0040] The trained model, by deeply exploring the dynamic evolution patterns inherent in drilling parameters, can accurately identify the transient response patterns of the drill bit when traversing different rock formations based on dynamic behavioral characteristics such as the real-time acquired parameter change rate, local fluctuation intensity, and coupling relationships between parameters, thus achieving online real-time classification of formation lithology. This method fully utilizes the sensitivity of dynamic behavioral characteristics to lithological interfaces, effectively distinguishing subtle differences between similar lithologies and improving the accuracy of lithology identification and the stability of the model.
[0041] The advantages of this invention compared to the prior art are mainly reflected in:
[0042] (1) Enhanced dynamic behavior characteristics and full mining of drilling process information: This invention constructs a feature set that reflects the dynamic evolution law of the drilling process by extracting parameter change rate, local fluctuation intensity and dynamic coupling relationship between parameters. This makes up for the shortcomings of traditional methods that only rely on instantaneous parameters and significantly improves the ability to identify lithological interfaces and transitional strata.
[0043] (2) Transformer modeling long-range dependencies and capturing deep sequence patterns: By utilizing the self-attention mechanism of the Transformer encoder, the long-range dependencies of distant sample points in the deep sequence can be effectively captured, the intrinsic laws of stratigraphic sedimentary evolution can be learned, and the expressive power of the model can be enhanced.
[0044] (3) Dynamic response weighted loss to enhance learning of key areas: The introduction of a cross-entropy loss function with dynamic response weighting makes the model pay more attention to the interface areas with drastic lithological changes during training, thereby improving the classification accuracy of rare lithology and thin interbedded layers.
[0045] In summary, this invention, with "dynamic feature extraction - temporal depth modeling - key area enhancement" as its core, constructs an efficient and robust drilling lithology identification method, providing reliable technical support for intelligent drilling and real-time geological guidance. Attached Figure Description
[0046] Figure 1 This is the overall flowchart;
[0047] Figure 2 This is a lithological distribution map of the six wells;
[0048] Figure 3 This is a box plot showing the normalized drilling parameters.
[0049] Figure 4 A comparison chart of training loss curves for the original features and the enhanced dynamic behavior features; Detailed Implementation
[0050] Example 1:
[0051] This embodiment uses a publicly available dataset from the Volve oilfield in the Norwegian North Sea for method validation. This dataset contains drilling data from six wells: F1, F1A, F1B, F1C, F11A, and F15D, with depths ranging from 1356m to 4685m, and a total of approximately 9703 valid samples. The lithology is divided into seven categories: mudstone (0), limestone (1), dolomite (2), sandstone (3), chalk (4), siltstone (5), and marl (6). The lithological distribution varies significantly among the wells, providing a solid foundation for validating the model's performance within individual wells. Figure 2 The lithology distribution along depth is shown in the six wells.
[0052] See Figure 1 The present invention provides a drilling lithology identification method based on dynamic behavior feature enhancement, comprising the following steps:
[0053] 1) Collect drilling parameter sequences and preprocess them, then construct a depth domain parameter matrix using a sliding window;
[0054] 2) Extract the dynamic behavior characteristics of drilling parameters within the sliding window, including parameter change rate, local fluctuation intensity, and dynamic coupling relationship between parameters;
[0055] 3) The dynamic behavior features are concatenated with the original parameters and input into the Transformer encoder. The intrinsic relationship between the dynamic behavior features and lithological changes is explored through the self-attention mechanism.
[0056] 4) Perform global average pooling on the encoded features, and input the pooling result into the fully connected layer to finally output the lithology classification result;
[0057] 5) Train the model using labeled data, optimize the model parameters by incorporating a cross-entropy loss function weighted by dynamic response, and evaluate the model's lithology identification capability through a comprehensive index of the validation set.
[0058] In step 1, the following eight drilling parameters are collected in real time using sensors and monitoring systems at the drilling site: average mechanical drilling rate (ROPA), average hook load (HKLA), average bit weight (WOBA), average rotary table torque (TQA), average rotary table speed (RPMA), average riser pressure (SPPA), drill cuttings concentration (DXC), and average gas concentration (GASA); the target parameter is lithology (LITH). The collected data is then preprocessed, specifically including:
[0059] 1.1) Perform outlier detection and processing on the collected data, removing outlier padding values (such as 0 or -999.25). The statistical characteristics of each parameter after processing are shown in Table 1.
[0060] Table 1 Statistical characteristics of each parameter
[0061]
[0062] 1.2) Subsequently, the data was standardized using the Z-score standardization method to eliminate the influence of dimensions. The formula is:
[0063]
[0064] Where μ and σ are the mean and standard deviation of each feature in the training set, respectively. The standardized box plot is shown below. Figure 3As shown, the distribution characteristics of each parameter are significantly different. HKLA, RPMA, and SPPA are concentrated in the higher range, while ROPA, WOBA, TQA, and DXC are distributed in the middle range, and GASA shows a highly skewed distribution.
[0065] 1.3) A sliding window mechanism is adopted, with the current depth as the reference point, and the window length L = 20 is set. The window slides along the depth direction in steps of 1 to capture the drilling parameter sequence containing historical information, forming a depth domain parameter matrix. Where B is the batch number.
[0066] In this embodiment, step 2) involves dynamic behavioral feature extraction of the depth domain parameter matrix formed in step 1, specifically including:
[0067] 2.1) Parameter Change Rate Characteristics: Calculate the first and second derivatives of each parameter to reflect the transient response characteristics of the parameters when the drill bit traverses different rock strata. The formula is:
[0068]
[0069] Where, x t The value of the parameter at depth t. The first derivative, It is the second derivative;
[0070] Further extraction of curvature features to describe the nonlinear trend of parameter changes, the formula is as follows:
[0071]
[0072] Among them, κ t For curvature.
[0073] 2.2) Local fluctuation intensity characteristics: Calculate the standard deviation of each parameter within the sliding window to characterize the difference in parameter stability when the drill bit operates in homogeneous or transitional formations. The formula is:
[0074]
[0075] Where W is the length of the sliding window. This represents the mean of the parameters within the window.
[0076] 2.3) Dynamic coupling characteristics between parameters: Extract the nonlinear response residuals of drilling pressure and mechanical drilling rate within the sliding window, as well as the dynamic time lag relationship between rotary table speed and torque, to reflect changes in the drill bit-rock interaction mode. Specifically:
[0077] Nonlinear response residuals of drilling pressure and mechanical drilling rate: Local linear regression was performed on ROPA and WOBA within a window, and the sum of squared residuals was calculated as a nonlinear index.
[0078] Dynamic time lag relationship between turntable speed and torque: Calculate the cross-correlation function of RPMA and TQA, and take the lag corresponding to the maximum cross-correlation as the time lag characteristic.
[0079] In this embodiment, step 3) involves concatenating the dynamic behavior features from step 2 with the original parameters and inputting them into the Transformer encoder. Specifically, this includes:
[0080] 3.1) Concatenate the dynamic behavior features with the original parameters along the feature dimension to form an enhanced feature matrix.
[0081] 3.2) The enhanced feature matrix is input into the Transformer encoder, which includes a position encoding module, a multi-head self-attention module, and a feedforward network module. Each module is followed by residual connections and layer normalization.
[0082] In this embodiment, the classification output in step 4) specifically includes: performing global average pooling on the sequence features (dimension 20×128) output by the Transformer encoder to obtain a 128-dimensional global feature vector that aggregates time-series information; inputting the pooling result into a fully connected layer for linear transformation to map to the number of lithology categories C=7; and finally processing it through the Softmax function to output the probability distribution of the sample belonging to each type of lithology.
[0083] In this embodiment, in step 5), a model training framework consisting of a loss function, optimizer, and training strategy is constructed, and end-to-end training of the model is performed. The specific implementation process is as follows:
[0084] 5.1) A cross-entropy loss function with fusion dynamic response weighting is adopted. Based on measuring the error between predicted probability and actual lithology label classification, a dynamic response weighting factor is introduced to strengthen the focus on lithological interface regions. The formula is as follows:
[0085]
[0086] Where N is the batch size, y i,c For the true label of sample i, For the predicted probability; δ i λ is the dynamic response intensity index of the window containing sample i, calculated based on the weighted sum of parameter change rate and fluctuation intensity (in this embodiment, the normalized value is the sum of the absolute values of the first derivatives of all parameters within the window); λ = 0.5 is an adjustable balance coefficient.
[0087] 5.2) The Adam optimizer was selected, with a learning rate of 0.0001 and a batch size of 128, to iteratively update the model parameters. The optimized model parameters included the weights and biases of each linear transformation layer in the Transformer encoder, as well as the weights and biases of the fully connected layers.
[0088] 5.3) Accuracy, Macro-F1 score, and Weighted-F1 score are used as comprehensive evaluation indicators for the validation set to comprehensively measure the model's identification performance and class balance for various lithologies. If the comprehensive evaluation indicator for the validation set does not improve for 10 consecutive rounds, the model parameters are automatically saved.
[0089] 5.4) To verify the effectiveness of the present invention, single-well experiments were conducted on 6 wells, with each well randomly divided into 80% training and 20% testing. Figure 4 The comparison of training loss curves for the original features (RFs) and dynamic behavioral feature enhancements (RFs+DBFs) in single-well experiments is shown, demonstrating that DBFs accelerate convergence and reduce the final loss. Table 2 presents the classification results of the single-well experiments, showing that the accuracy and F1 score of all wells significantly improved after adding DBFs. Particularly noteworthy is the most significant improvement in Macro-F1, for example, well F1C improved from 61.46% to 96.30%, and well F1B from 63.95% to 93.17%, indicating that dynamic behavioral features effectively improved the identification performance of rare lithologies and enhanced the class balance of the model. This demonstrates that the introduction of dynamic behavioral features not only improves the overall classification accuracy but also significantly improves the ability to identify rare lithologies, effectively alleviating the class imbalance problem and enabling the model to exhibit more balanced and stable identification performance across different wells.
[0090] Table 2. Lithology classification results across wells for each model.
[0091]
Claims
1. A drilling lithology identification method based on dynamic behavioral feature enhancement, characterized in that, Includes the following steps: 1) Collect drilling parameter sequences and preprocess them, then construct a depth domain parameter matrix using a sliding window; 2) Extract the dynamic behavior characteristics of drilling parameters within the sliding window, including parameter change rate, local fluctuation intensity, and dynamic coupling relationship between parameters; 3) The dynamic behavior features are concatenated with the original parameters and input into the Transformer encoder. The intrinsic relationship between the dynamic behavior features and lithological changes is explored through the self-attention mechanism. 4) Perform global average pooling on the encoded features, and input the pooling result into the fully connected layer to finally output the lithology classification result; 5) Train the model using labeled data, optimize the model parameters by incorporating a cross-entropy loss function weighted by dynamic response, and evaluate the model's lithology identification capability through a comprehensive index of the validation set.
2. The method according to claim 1, characterized in that, The drilling parameters collected in step 1) include: average mechanical drilling rate ROPA, average hook load HKLA, average drilling pressure WOBA, average rotary table torque TQA, average rotary table speed RPMA, average riser pressure SPPA, drill cuttings concentration DXC, and average gas concentration GASA; the target parameter is lithology LITH.
3. The method according to claim 1, characterized in that, The preprocessing in step 1) includes: 1.1) Perform outlier detection and processing on the collected data, and remove abnormal padding values; 1.2) Use the Z-score standardization method to standardize the data and eliminate the influence of units; 1.3) A sliding window mechanism is adopted, with the current depth as the reference point, the window length is set, and the window slides along the depth direction to capture the drilling parameter sequence containing historical information and form a depth domain parameter matrix.
4. The method according to claim 1, characterized in that, The extraction of dynamic behavioral features in step 2) includes: 2.1) Parameter Change Rate Characteristics: Calculate the first and second derivatives of each parameter to reflect the transient response characteristics of the parameters when the drill bit traverses different rock strata. The formula is: Where, x t The value of the parameter at depth t. The first derivative, It is the second derivative; Further extraction of curvature features to describe the nonlinear trend of parameter changes, the formula is as follows: Among them, κ t For curvature; 2.2) Local fluctuation intensity characteristics: Calculate the standard deviation of each parameter within the sliding window to characterize the difference in parameter stability when the drill bit operates in homogeneous or transitional formations. The formula is: Where W is the length of the sliding window. This represents the mean of the parameters within the window. 2.3) Dynamic coupling characteristics between parameters: Extract the nonlinear response residuals of drilling pressure and mechanical drilling speed within the sliding window, as well as the dynamic time delay relationship between rotary table speed and torque, to reflect the change in the drill bit-rock interaction mode.
5. The method according to claim 1, characterized in that, Step 3) involves concatenating the dynamic behavior features with the original parameters and inputting them into the Transformer encoder, specifically including: 3.1) Concatenate the dynamic behavior features with the original parameters along the feature dimension to form an enhanced feature matrix; 3.2) The enhanced feature matrix is input into the Transformer encoder, which includes a position encoding module, a multi-head self-attention module, and a feedforward network module. Each module is followed by residual connections and layer normalization.
6. The method according to claim 1, characterized in that, The classification output in step 4) specifically includes: performing global average pooling on the sequence features output by the Transformer encoder, inputting the pooling result into the fully connected layer, and outputting the lithology classification probability of each category after processing by the Softmax function.
7. The method according to claim 1, characterized in that, The training model in step 5) includes: 5.1) A cross-entropy loss function with fusion dynamic response weighting is adopted. Based on measuring the error between predicted probability and actual lithology label classification, a dynamic response weighting factor is introduced to strengthen the focus on lithological interface regions. The formula is as follows: Where N is the number of samples in the batch, C is the number of lithological categories, and y i,c For the true label of sample i, For the predicted probability; δ i λ is the dynamic response intensity index of the window where sample i is located, calculated based on the weighted sum of parameter change rate and fluctuation intensity; λ is an adjustable balance coefficient. 5.2) The Adam optimizer is used to iteratively update the model parameters. The optimized model parameters include the weights and biases of each linear transformation layer in the Transformer encoder, as well as the weights and biases of the fully connected layers. 5.3) Accuracy, macro-F1 score, and weighted-F1 score are used as comprehensive evaluation indicators for the validation set to comprehensively measure the model’s identification performance and class balance for various types of lithology.