Intelligent lithofacies identification method, device and equipment, medium and program product
By using a Transformer neural network-based intelligent lithofacies identification method, the problems of low efficiency and insufficient accuracy of traditional lithofacies identification are solved, achieving high-precision, automated real-time lithofacies identification and supporting on-site decision-making for drilling in deep shale gas reservoirs.
Patent Information
- Application Number
- CN202610038671.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies for lithofacies identification in oil and gas exploration and development are characterized by low efficiency, high cost, and strong subjectivity, and are difficult to meet the requirements for real-time identification. In particular, in drilling deep shale gas reservoirs, traditional methods and those based on simple classifiers cannot effectively capture the complex relationships of multi-source, high-dimensional, and nonlinear data, and their identification accuracy and generalization ability are insufficient.
A lithofacies intelligent identification method based on Transformer neural network is adopted. Through data preparation and preprocessing, feature selection, model building and training, it realizes deep fusion and efficient identification of multi-source data, including data cleaning, feature selection, Transformer model building and optimization training. By leveraging the powerful feature extraction and global dependency capture capabilities of Transformer, high-precision lithofacies prediction results are output.
It achieves high-precision, automated, real-time lithofacies identification, reduces reliance on human experience, has good generalization ability and noise robustness, and can quickly output identification results to support on-site decision-making.
Smart Images

Figure CN121502535A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petrographic identification technology in oil and gas exploration and development, specifically relating to a petrographic intelligent identification method, device, equipment, medium, and program product. Background Technology
[0002] In oil and gas exploration and development, accurately identifying the lithofacies of formations (such as mudstone and sandstone) during drilling is crucial for reservoir evaluation, wellbore trajectory optimization, and production prediction. This is especially true in deep shale gas reservoir drilling, where real-time lithofacies information is needed to guide on-site decision-making. Traditional lithofacies identification methods mainly rely on manual analysis of core samples or logging curves by geological experts. This approach is not only inefficient and costly, but also highly subjective and difficult to apply on a large scale, failing to meet the real-time identification requirements of modern drilling operations.
[0003] Existing machine learning-based automatic lithofacies identification methods (such as those using simple classifiers) have improved efficiency to some extent, but their ability to capture the complex relationships contained in multi-source, high-dimensional, and nonlinear data such as well logging and drilling is limited. The model's identification accuracy and generalization ability still need to be improved, making it difficult to fully meet the needs of high-precision, real-time lithofacies identification in actual production. Summary of the Invention
[0004] This invention aims to overcome the shortcomings of existing technologies and provide a real-time intelligent identification method for drilling facies based on Transformer neural networks. This method can deeply integrate logging parameters and drilling engineering parameters, automatically learn the complex nonlinear mapping relationship between these multi-source data and facies, and achieve high-precision, high-efficiency, automated real-time identification of facies across the entire drilling profile.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a lithofacies intelligent identification method based on Transformer neural network, comprising the following steps: S1. Data Preparation and Preprocessing: Collect historical drilling data with logging parameters, drilling parameters and corresponding lithofacies labels, construct a sample dataset, and perform data cleaning and standardization preprocessing.
[0006] S2. Feature selection: Based on correlation analysis, a subset of features for modeling is selected from the logging parameters and drilling parameters in step S1.
[0007] S3. Model Construction: Construct a Transformer neural network model, which includes at least an input embedding layer, a positional encoding layer, a Transformer encoder, and a classification output layer.
[0008] S4. Model Training: The Transformer model constructed in step S3 is trained using the sample dataset preprocessed in step S1 to obtain an optimized lithofacies identification model.
[0009] S5. Lithofacies Prediction: Input the feature subset of the well to be identified into the optimized lithofacies identification model, and output the lithofacies prediction results at the corresponding depth.
[0010] Specifically, the standardization preprocessing described in step S1 uses the RobustScaler method based on the median and quartiles.
[0011] Specifically, the correlation analysis in step S2 uses Pearson correlation coefficient to identify and remove highly redundant feature variables; the feature subset includes natural gamma, formation resistivity, drilling pressure, drilling speed, standpipe pressure, torque, hook load, drilling time, outlet drilling fluid density, outlet drilling fluid temperature, inlet drilling fluid conductivity, outlet drilling fluid conductivity, and outlet drilling fluid flow rate.
[0012] Specifically, the model construction in step S3 is suitable for structured data classification. Its structure includes: an input embedding layer, which maps the original feature vector of each depth point to a high-dimensional embedding space through a fully connected layer so that the model can learn nonlinear relationships; a position encoding layer, which adds learnable position encoding to the embedding vector to inject the depth sequence information of the sample and make up for the Transformer's insensitivity to absolute position; a Transformer encoder, which consists of multiple layers, each containing a multi-head self-attention mechanism and a feedforward neural network to capture the global dependencies between different features; and a classification output layer, which takes the feature sequence output by the encoder, passes it through global average pooling, and then connects it to a fully connected layer and a Softmax function to output the probability distribution of each lithofacies category.
[0013] Specifically, in step S4, the model training divides the preprocessed sample dataset into a training set and a test set. The Transformer model is trained using the training set. The cross-entropy loss function is used as the model loss, and the Adam optimizer is used to train and update the model parameters. During the training process, the model performance is monitored using the test set to prevent overfitting, and the model performance is continuously optimized by adjusting the number of encoder layers, the number of attention heads, or the learning rate hyperparameter.
[0014] The present invention also provides a lithofacies intelligent identification device based on Transformer neural network, the device comprising: Data preparation and preprocessing module: Collect historical drilling data with logging parameters, drilling parameters and corresponding lithofacies labels, construct sample datasets, and perform data cleaning and standardization preprocessing.
[0015] Feature selection module: Based on correlation analysis, a subset of features for modeling is selected from logging parameters and drilling parameters.
[0016] Model building module: Constructs a Transformer neural network model, which includes at least an input embedding layer, a position encoding layer, a Transformer encoder, and a classification output layer.
[0017] Model training module: The constructed Transformer model is trained using the preprocessed sample dataset to obtain an optimized lithofacies recognition model.
[0018] Lithofacies prediction module: Input the feature subset of the well to be identified into the optimized lithofacies identification model and output the lithofacies prediction results at the corresponding depth.
[0019] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the above-described intelligent rock facies identification method based on a Transformer neural network.
[0020] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the above-described intelligent rock facies identification method based on a Transformer neural network.
[0021] The present invention also provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the above-described intelligent rock facies identification method based on a Transformer neural network.
[0022] Compared with the prior art, the beneficial effects of the present invention are: 1. High-precision identification: The Transformer model has powerful feature extraction and global dependency capture capabilities, enabling it to deeply understand the complex patterns between multi-source data and lithofacies, and its identification accuracy is far higher than that of traditional methods and simple machine learning models.
[0023] 2. High degree of automation: It realizes end-to-end automatic identification from data input to petrographic result output, which greatly reduces the reliance on human experience and improves work efficiency.
[0024] 3. Strong generalization ability: The model is not sensitive to noise and outliers, and exhibits good transfer performance and generalization ability on data from different wells and different blocks.
[0025] 4. Multi-source information fusion: It effectively integrates two types of information: well logging data (reflecting formation properties) and drilling engineering data (reflecting rock mechanical behavior), providing a more comprehensive basis for lithofacies judgment.
[0026] 5. Fast recognition speed: The model reasoning process is efficient and can meet the requirements of real-time petrographic identification while drilling, quickly outputting recognition results and providing timely support for on-site decision-making. Attached Figure Description
[0027] Figure 1 A schematic diagram of the overall process of the method of this invention; Figure 2 Correlation analysis heatmap of characteristic parameters; Figure 3 Confusion matrix of the model on the test set; Figure 4 A cross-sectional view comparing the actual lithofacies of a test well with the model prediction results. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] like Figure 1 As shown, the specific steps of the intelligent lithofacies identification method based on the Transformer neural network of this invention are as follows: Step S1: Data Preparation and Preprocessing. Collect well logging data (such as natural gamma (GR), formation resistivity (RT), etc.) and drilling engineering parameters (such as drilling pressure, drilling speed, torque, etc.) from multiple drilled wells in the target work area, as well as lithofacies labels at corresponding depths (obtained through core analysis or expert identification), to construct a sample dataset. Preprocess the raw data, including: filling missing values with the median or mean; standardizing numerical features using the RobustScaler method to eliminate dimensional differences and enhance robustness to outliers (the calculation formula is: (where IQR is the interquartile range).
[0030] Step S2: Feature Parameter Determination. Identify and eliminate highly redundant feature variables using correlation analysis (such as Pearson correlation coefficient) to optimize the model input feature set. Determine the final input feature parameters used for the model, which, for example, may include: natural gamma (GR), formation resistivity (RT), drilling pressure, drilling speed, standpipe pressure, torque, hook load, drilling time, outlet drilling fluid density, outlet drilling fluid temperature, inlet drilling fluid conductivity, outlet drilling fluid conductivity, and outlet drilling fluid flow rate, etc.
[0031] Step S3: Constructing the Transformer Lithofacies Recognition Model. A Transformer model suitable for structured data classification is constructed. Its structure includes: an input embedding layer, which maps the original feature vector of each depth point to a high-dimensional embedding space through a fully connected layer, enabling the model to learn nonlinear relationships; a position encoding layer, which adds learnable position encoding to the embedding vector to inject depth sequence information of the samples, compensating for the Transformer's insensitivity to absolute position; a Transformer encoder, consisting of multiple layers, each containing a multi-head self-attention mechanism and a feedforward neural network, used to capture global dependencies between different features; and a classification output layer, which, after global average pooling, connects the feature sequence output by the encoder to a fully connected layer and a Softmax function, outputting the probability distribution of each lithofacies category.
[0032] Step S4: Model Training and Optimization. The preprocessed dataset is divided into training and test sets. The Transformer model is trained using the training set, with cross-entropy as the loss function, and the Adam optimizer is used to iteratively update the parameters. During training, the model performance is monitored using the test set to prevent overfitting, and the model performance is continuously optimized by adjusting hyperparameters (such as the number of encoder layers, the number of attention heads, and the learning rate).
[0033] Step S5: Lithofacies Identification and Application. The preprocessed logging data and drilling parameters of the well to be identified are input into the trained optimal Transformer model. The model outputs the most likely lithofacies type at each depth point of the well. Furthermore, the lithofacies prediction results for the entire well section are concatenated into a continuous lithofacies profile for geological interpretation and on-site decision support.
[0034] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and examples.
[0035] Example Taking the identification of drilling lithofacies in a certain exploration block as an example, historical drilling data from 10 wells in the block were collected, totaling approximately 190,000 depth samples. The lithofacies of the target formation were divided into five categories: mudstone, fine sandstone, siltstone, argillaceous siltstone, and dolomitic mudstone. Data from 9 wells were used for model training, and data from the remaining well was used for model testing to verify model performance. The number of samples and their proportion for each lithofacies type are shown in Table 1 below: Table 1. Number of samples and percentage of each lithofacies type Step 1. Data Preprocessing and Feature Selection. RobustScaler was used to standardize all numerical parameters to eliminate the impact of differences in the dimensions and value ranges of different logging parameters on model training. By calculating the Pearson correlation coefficient matrix of each variable, a high correlation was found between certain features, such as... Figure 2 For example, the correlation coefficient between "inlet drilling fluid density" and "outlet drilling fluid density" is as high as 0.99, indicating that they contain a large amount of redundant information. Therefore, in subsequent modeling, "outlet drilling fluid density" is retained while "inlet drilling fluid density" is removed. Simultaneously, through comparative analysis of the data distribution of the training and test sets, it was found that the distributions of the parameters "inlet drilling fluid temperature" and "inlet drilling fluid flow rate" differ significantly between the training and test sets, which may affect the stable generalization of the model. Therefore, these two parameters are deleted during modeling. After the above processing and screening, 13 parameters were finally determined as model input features, including: natural gamma (GR), formation resistivity (RT), drilling pressure, drilling speed, riser pressure, torque, hook load, drilling time, outlet drilling fluid density, outlet drilling fluid temperature, inlet drilling fluid conductivity, outlet drilling fluid conductivity, and outlet drilling fluid flow rate.
[0036] Step 2. Model Construction and Training. This embodiment constructs a lightweight Transformer neural network model for lithofacies classification. The key hyperparameters of the model are set as follows: embedding layer dimension 64, Transformer encoder layers 3, attention heads 8, and feedforward network hidden dimension 128. During training, data from the aforementioned 9 wells are used as the training set, and data from 1 well is used as the test set to validate the model. The Adam optimizer is used for model training, with an initial learning rate set to 0.0001, a batch size of 256 training samples, and the model converges after 50 epochs to obtain the final lithofacies recognition model.
[0037] Step 3. Results and Validation. After model training, the lithofacies identification accuracy reached 92.1% on independent test wells. To comprehensively evaluate the model's performance across various lithofacies categories, a confusion matrix was used, such as... Figure 3As shown, the classification results were analyzed. The results indicate that the Transformer model is generally accurate in identifying the five lithofacies types, and also demonstrates good discriminative ability and recall for a few sample categories. Simultaneously, the model's lithofacies prediction results for test wells were compared with the lithofacies identified from actual core samples, as shown... Figure 4 As shown, the two match well in the vast majority of well sections. This demonstrates the effectiveness and practical value of the method described in this invention, and it can meet the needs of real-time lithofacies identification during drilling of deep shale gas reservoirs.
[0038] The above descriptions are merely embodiments of the present invention, and common knowledge regarding specific structures and characteristics of the solutions is not described in detail here. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present invention is defined by the appended claims rather than the foregoing description. Therefore, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A lithofacies intelligent identification method based on Transformer neural network, characterized in that, Includes the following steps: S1. Data preparation and preprocessing: Collect historical drilling data with logging parameters, drilling parameters and corresponding lithofacies labels, construct a sample dataset, and perform data cleaning and standardization preprocessing; S2. Feature selection: Based on correlation analysis, a subset of features for modeling is selected from the logging parameters and drilling parameters in step S1; S3. Model Construction: Construct a Transformer neural network model, which includes at least an input embedding layer, a position encoding layer, a Transformer encoder, and a classification output layer; S4. Model Training: The Transformer model constructed in step S3 is trained using the sample dataset preprocessed in step S1 to obtain an optimized lithofacies identification model. S5. Lithofacies Prediction: Input the feature subset of the well to be identified into the optimized lithofacies identification model, and output the lithofacies prediction results at the corresponding depth.
2. The method according to claim 1, characterized in that, The standardization preprocessing described in step S1 uses the RobustScaler method based on the median and quartiles.
3. The method according to claim 1, characterized in that, The correlation analysis in step S2 uses Pearson correlation coefficient to identify and remove highly redundant feature variables; the feature subset includes natural gamma, formation resistivity, drilling pressure, drilling speed, standpipe pressure, torque, hook load, drilling time, outlet drilling fluid density, outlet drilling fluid temperature, inlet drilling fluid conductivity, outlet drilling fluid conductivity, and outlet drilling fluid flow rate.
4. The method according to claim 1, characterized in that, The model construction in step S3 is suitable for structured data classification. Its structure includes: an input embedding layer, which maps the original feature vector of each depth point to a high-dimensional embedding space through a fully connected layer so that the model can learn non-linear relationships; a position encoding layer, which adds learnable position encoding to the embedding vector to inject the depth sequence information of the sample and make up for the Transformer's insensitivity to absolute position; a Transformer encoder, which consists of multiple layers, each containing a multi-head self-attention mechanism and a feedforward neural network, used to capture the global dependencies between different features; and a classification output layer, which takes the feature sequence output by the encoder, passes it through global average pooling, and then connects it to a fully connected layer and a Softmax function to output the probability distribution of each lithofacies category.
5. The method according to claim 1, characterized in that, In step S4, the model training divides the preprocessed sample dataset into a training set and a test set. The Transformer model is trained using the training set. The cross-entropy loss function is used as the model loss, and the Adam optimizer is used to train and update the model parameters. During training, the model performance is monitored using a test set to prevent overfitting, and the model performance is continuously optimized by adjusting the number of encoder layers, the number of attention heads, or the learning rate hyperparameter.
6. A lithofacies intelligent identification device based on Transformer neural network, characterized in that, The device includes: Data preparation and preprocessing module: Collect historical drilling data with logging parameters, drilling parameters and corresponding lithofacies labels, construct sample datasets, and perform data cleaning and standardization preprocessing; Feature selection module: Based on correlation analysis, it selects a subset of features for modeling from logging parameters and drilling parameters; Model building module: Constructs a Transformer neural network model, which includes at least an input embedding layer, a position encoding layer, a Transformer encoder, and a classification output layer; Model training module: The constructed Transformer model is trained using the preprocessed sample dataset to obtain an optimized lithofacies recognition model; Lithofacies prediction module: Input the feature subset of the well to be identified into the optimized lithofacies identification model and output the lithofacies prediction results at the corresponding depth.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Carbonate reservoir classification method
CN116626776A
MLP-MTS-based compact sandstone reservoir lithofacies intelligent identification method and system
CN118656705A
Complex carbonate rock logging lithology identification method based on diffusion model
CN121167516A
Method and apparatus for estimating lithofacies by learning well logs
US20240241286A1
Cited By
Training method and identification method of while-drilling parameter lithology intelligent identification model
CN122116152A
A training method and identification method for a drilling parameter-based intelligent lithology identification model
CN122116152B