A training method and identification method for a drilling parameter-based intelligent lithology identification model
By using the MOE-Transformer model and a two-stage training strategy, the problem of insufficient capacity and generalization ability of lithology identification models in complex geological environments was solved. This enabled efficient identification of lithological differences such as extremely hard rocks and weak fracture zones, improving the model's field adaptability and identification accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-17
AI Technical Summary
Existing lithology identification models suffer from limited capacity, insufficient generalization ability, and poor field adaptability when facing complex geological environments. They are particularly difficult to adapt to situations with huge differences in lithology, such as extremely hard rocks and weak fracture zones. Furthermore, the high cost of obtaining real rock core samples leads to poor model generalization performance.
A lithology intelligent identification model based on MOE-Transformer is adopted, which combines a hybrid expert module and a two-stage training strategy. Through multi-source mechanical parameter data preprocessing, multi-layer Transformer encoder and gating network, expert network is dynamically selected. The model capacity and generalization ability are improved by using standard test block pre-training and field data fine-tuning.
It significantly improves the capacity and feature extraction capability of the lithology identification model, enhances the model's generalization ability and field adaptability, realizes real-time and accurate lithology identification in complex geological environments, and reduces data acquisition costs.
Smart Images

Figure CN122116152B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the fields of geological exploration, tunnel excavation and intelligent construction technology, and more specifically, relates to a training method and identification method for a drilling parameter lithology intelligent identification model. Background Technology
[0002] In tunnel construction, mining, and oil drilling, accurately and in real-time identifying the strength of the surrounding rock by analyzing the changing characteristics of drilling parameters is crucial for ensuring construction safety and optimizing drilling parameters. Traditional lithology identification mainly relies on core sampling, which, while accurate, is costly, time-consuming, and cannot achieve continuous monitoring throughout the entire borehole.
[0003] With the development of measurement while drilling (MWD) technology, lithology inversion using MWD mechanical parameters (such as drill pressure, rotation speed, and torque) has become a research hotspot. Existing technologies often employ algorithms such as Support Vector Machine (SVM), XGBoost, or Long Short-Term Memory (LSTM) networks to establish lithology identification models. However, existing machine learning methods suffer from limited model capacity, difficulty in handling massive and highly nonlinear MWD data, and insufficient feature extraction capabilities. Furthermore, the complex and variable geological environment means that single-structure neural networks (such as LSTM) often struggle to adapt a single set of parameters to all working conditions when facing rocks with vastly different properties (such as extremely hard rocks and weak fracture zones), resulting in poor generalization ability. Simultaneously, model performance relies on a large amount of labeled data, but obtaining real core samples and their MWD data covering all categories and grades is extremely costly. Models trained using data from indoor standard test blocks (such as concrete) or limited standard rocks suffer from single feature dimensions (limited classification significance if only linear intensity changes are learned) and a domain gap (differences in feature distribution between simulated materials and real rock masses), leading to poor in-situ generalization performance.
[0004] Therefore, improving the capacity, generalization ability, and field adaptability of lithology identification models is an urgent problem to be solved. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, the purpose of this application is to provide a training method and identification method for a drilling parameter lithology intelligent identification model, which can effectively improve the capacity, generalization ability and field adaptability of the lithology identification model.
[0006] To achieve the above objectives, firstly, this application provides a training method for a drilling parameter-based intelligent lithology identification model, comprising the following steps: S10: Acquire multi-source mechanical parameter data during the drilling process and obtain the corresponding lithology labels. Preprocess the collected data and construct a training dataset. S20, Construct a lithology identification model, which includes an input embedding layer, a position encoding layer, a multi-layer Transformer encoder, and a classification layer; wherein, the feedforward neural network part of the Transformer encoder is replaced with a hybrid expert module, which includes a gating network and multiple parallel expert networks. The gating network is used to dynamically assign weights to each expert network on the input feature vector, and the output of the hybrid expert module is a weighted sum of the outputs of each expert network. S30. A two-stage strategy is adopted to train the lithology identification model using the training dataset: In the first stage, the model is pre-trained using the dataset collected on standard material test blocks; in the second stage, the pre-trained model is fine-tuned using sample data collected on real rock masses at the target engineering site; during the training process, an expert network is dynamically selected through a gating network and optimized using a loss function; after optimization, the optimized model weights are saved.
[0007] As a further preferred embodiment, in step S10, the multi-source mechanical parameter data includes impact pressure, impact flow rate, rotational speed, rotational pressure, propulsion pressure, drilling stroke, drilling speed, impact frequency, and propulsion force. The preprocessing includes outlier detection and correction, data smoothing and downsampling, normalization, and label numerical mapping. The outlier detection and correction includes: calculating the Mahalanobis distance of multi-source mechanical parameter data based on a sliding window to identify outliers; when the Mahalanobis distance exceeds three times the standard deviation, it is determined to be an outlier; performing time-frequency analysis on the outlier signal using discrete wavelet transform, selecting the db4 wavelet basis function for three-level decomposition; if only the high-frequency coefficients change abruptly while the low-frequency trend remains stable, it is determined to be sensor instantaneous noise; if the low-frequency trend changes synchronously, it is determined to be a geological abrupt change; for outliers determined to be sensor errors, the K-nearest neighbor algorithm is used for calibration. The data smoothing and downsampling includes: using Kalman filtering to smooth the data after outlier detection and correction, setting the state equation as a linear Gaussian model, with process noise variance Q=1e-5 and observation noise variance R=1e-3, updating the optimal estimate through iteration, and then downsampling the smoothed data from the original 2kHz to 20Hz, using the mean sampling method, taking the mean of every 100 original data points as the downsampled data points.
[0008] As a further preferred embodiment, the normalization process employs Min-Max normalization, mapping each parameter to the [0,1] interval. The normalization formula is as follows:
[0009] In the formula, x These are the original parameter values; and These are the minimum and maximum values of the parameter in the dataset, respectively.
[0010] As a further preferred embodiment, in step S20, the hybrid expert module includes a gated network. G ( x )and E A parallel expert network The gated network uses the Softmax function to normalize the weights, and the output of the hybrid expert module... y The calculation formula is:
[0011] In the formula, x in The input feature vector; The first output of the gating network i The weight of each expert, For the first i The output of the expert network; the number of expert networks is 8, each expert network is a two-layer fully connected network with a hidden layer dimension of 1024; the gated network adopts the Top-2 sparse activation mechanism, which only activates the two expert networks with the highest weights.
[0012] As a further preferred embodiment, in step S20, the input embedding layer is used to map the input features into a 128-dimensional high-dimensional vector; the position encoding layer is used to superimpose sine or cosine position codes to preserve the temporal information of the sequence; the multi-layer Transformer encoder is set to 6 layers, containing 8 attention heads, with a hidden layer dimension of 512; the multi-layer Transformer encoder includes a multi-head self-attention mechanism to capture the global correlation between different drilling parameters, and the attention calculation formula is:
[0013] In the formula, 、 、 These are the query vector, key vector, and value vector, respectively. This is the scaling factor.
[0014] As a further preferred embodiment, in step S30, the standard material test blocks include concrete test blocks with known strength grades and standard rock test blocks with uniform lithology; the goal of the pre-training is to enable the model to learn the general mapping relationship between drilling behavior and the basic mechanical properties of materials; the fine-tuning stage freezes the attention layer parameters of the bottom layer of the model and uses field data to fine-tune the classifier and gating network of the top layer.
[0015] As a further preferred embodiment, in step S30, the loss function is a weighted cross-entropy loss function, and the load balancing of the gated network is constrained by a sparsity regularization term; the calculation formula for the weighted cross-entropy loss is:
[0016] In the formula, N The number of samples in a training batch; C This represents the total number of lithological categories; y i,c As an indicator variable, when the sample i The true category is c hour y i,c =1, otherwise 0; Predict samples for the model i Category c The probability of; For category c The assigned weights.
[0017] As a further preferred option, the weight The calculation is performed using an inverse frequency-weighted method, and the formula is as follows:
[0018] In the formula, For category c The number of samples.
[0019] As a further preferred embodiment, the sparsity regularization term is the load balancing loss, and its calculation formula is as follows:
[0020] In the formula, λ is the strength coefficient of the regularization term; E The total number of expert networks; f j For the first j The load ratio of each expert is selected by the gating network and routed to the experts in a batch. j The number of samples divided by the total number of samples in the batch; P j For the first j The proportion of the sum of the routing probabilities of each expert.
[0021] Secondly, this application provides a method for intelligent identification of lithology using drilling parameters, comprising the following steps: Collect real-time drilling parameter data of the area to be tested, and preprocess the collected data; The preprocessed data is input into the lithology intelligent identification model trained using the training method of the drilling parameter lithology intelligent identification model as described in any of the above. The predicted lithology category is output through the lithology intelligent identification model.
[0022] The beneficial effects of this application are as follows: (1) Effectively improve the capacity and feature extraction capability of the lithology identification model: To address the problem that traditional models (such as SVM and LSTM) have limited capacity and are difficult to handle massive and highly nonlinear drilling data, this application constructs an identification model based on MOE-Transformer. On the one hand, the multi-head self-attention mechanism of Transformer is used to capture the global correlation and long-distance temporal dependence between 9-dimensional drilling parameters; on the other hand, a hybrid expert (MoE) mechanism is introduced to replace the traditional feedforward network, and the best-matching expert network is dynamically activated through a gated network. This sparse activation strategy significantly expands the parameter capacity and nonlinear fitting capability of the model with only a small increase in computational overhead, enabling the model to learn the feature patterns of various different chemical conditions such as extremely hard rocks and weak fracture zones at the same time, solving the problem of "losing sight of one aspect while addressing another" when a single-structure neural network faces complex lithology.
[0023] (2) Significantly enhances the model's generalization ability and cross-domain transfer performance: Addressing the issues of high acquisition costs of real rock mass annotation data and the "domain gap" between indoor standard test blocks and real rock masses leading to poor in-situ generalization performance, this application adopts a two-stage training strategy of "standard test block pre-training - in-situ data fine-tuning." The first stage utilizes a large amount of indoor standard test block (concrete, standard rock) data to enable the model to learn the general physical mapping relationship between "drilling behavior - material mechanical properties," building a robust foundation for feature extraction. The second stage requires only a small amount of in-situ real rock sample data to adapt and fine-tune the pre-trained model. This transfer learning strategy effectively bridges the distribution differences between simulated and real data, achieving high-precision generalization of the model under previously unseen geological conditions with low data costs.
[0024] (3) Significantly improves the model's field adaptability and engineering robustness. To address the problem of unstable identification caused by complex and variable geological environments and significant field noise interference, this application designs an advanced preprocessing workflow and a load-balanced loss function. Through Mahalanobis distance anomaly detection, discrete wavelet transform, and Kalman filtering, instantaneous sensor noise is effectively eliminated while retaining true geological abrupt changes. By constraining the gated network with sparsity regularization terms, the phenomenon of overloading a single expert while other experts are undertrained (expert collapse) is prevented, ensuring the model can still work stably when facing unbalanced lithology distributions. Combined with the sparse activation characteristics of MoE, the inference speed of the model on edge computing devices is guaranteed, achieving real-time and accurate lithology identification in complex geological environments, which has extremely high engineering practical value. Attached Figure Description
[0025] Figure 1 This is the overall flowchart of this application; Figure 2 This is a data preprocessing flowchart provided in an embodiment of this application; Figure 3 This is a network structure diagram of the MOE-Transformer model; Figure 4 This is the sampling instrument installation layout provided in the embodiments of this application; Figure 5 This is a test result diagram provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] This embodiment provides a method for intelligent identification of lithology based on MOE-Transformer drilling parameters. It combines the Mixture of Experts (MoE) mechanism in deep learning with the Transformer architecture, and uses a transfer learning strategy of "indoor pre-training + on-site fine-tuning" to solve the problems of scarce field data and domain differences, so as to achieve real-time and accurate identification of lithology and provide technical support for geological exploration and tunnel engineering construction safety and parameter optimization.
[0028] like Figure 1 As shown, the specific implementation steps are as follows: Step 1, Data Acquisition and Preprocessing (e.g.) Figure 2 (As shown).
[0029] To extract features reflecting the lithological essence from complex drilling environments, this embodiment employs a refined data cleaning process to ensure data quality and validity: (1) High-frequency raw data acquisition: Through a multi-source sensor group installed in key parts of the drilling rig, nine core mechanical parameters during the drilling process are synchronously acquired at a high frequency of 2kHz, including: impact pressure, impact flow rate, rotation speed, rotation pressure, propulsion pressure, drilling stroke, drilling speed, impact frequency and propulsion force.
[0030] Sensor configuration details: such as Figure 4 As shown, the impact pressure sensor is installed at the hydraulic circuit outlet of the drilling rig, with an accuracy of ±0.5%FS; the rotation speed sensor uses a photoelectric encoder and is installed at the drive end of the drill pipe, with a resolution of 0.1r / min; the thrust sensor is integrated at the end of the thrust cylinder, with a measurement range of 0-500kN; all sensors collect data synchronously through the CAN bus, with a timestamp accuracy of ±1ms, to ensure the consistency of parameter timing.
[0031] Synchronous acquisition of corresponding lithological labels: During the indoor experimental stage, the test block type and strength grade are directly labeled, and during the on-site construction stage, the actual lithological category is labeled through methods such as core drilling and geological logging, providing label data support for model training.
[0032] (2) Outlier detection and correction: Multidimensional Anomaly Detection: In this embodiment, the Mahalanobis distance threshold is set to 3. Based on the statistical "3σ principle," this threshold can cover 99.73% of the normal data distribution, effectively eliminating extreme outliers. Subsequently, Discrete Wavelet Transform (DWT) is used to analyze anomaly patterns, with a decomposition level of 3. Experimental verification shows that 3-level decomposition achieves the best balance between preserving high-frequency features of geological abrupt changes (usually in levels 1-2) and removing high-frequency sensor noise (usually in level 3 and detail coefficients). For points identified as errors, the KNN algorithm is used for calibration based on historical normal data. A 1-second sliding window (corresponding to 2000 sample points of the 2kHz raw data) is set, and the Mahalanobis distance of the 9-dimensional drilling parameters is calculated based on the sliding window. When the Mahalanobis distance exceeds 3 times the standard deviation, it is identified as an anomaly.
[0033] Noise and Real Abrupt Change Separation: Discrete Wavelet Transform (DWT) is used to perform time-frequency analysis on the anomalous signal, and the db4 wavelet basis function is selected for three-level decomposition. If only the high-frequency coefficients change abruptly while the low-frequency trend remains stable, it is determined to be instantaneous noise from the sensor; if the low-frequency trend changes synchronously, it is determined to be a real geological abrupt change (such as joints, fissures, or lithological interfaces).
[0034] Outlier calibration: For outliers identified as sensor errors, they are not directly removed. Instead, the K-Nearest Neighbors (KNN) algorithm (K value is 5) is used to perform interpolation calibration based on nearby historical normal data to ensure the integrity and continuity of time series data.
[0035] (3) Data smoothing and downsampling: Data smoothing: Kalman filter is used to smooth the corrected data. The state equation is set as a linear Gaussian model, the process noise variance Q=1e-5, and the observation noise variance R=1e-3. The optimal estimate is updated iteratively to remove high-frequency random noise and retain the trend characteristics of drilling parameters with lithology.
[0036] Downsampling: The smoothed 2kHz high-frequency data is downsampled to 20Hz. The mean sampling method is used, and the mean of every 100 original data points is taken as the downsampled data points. While retaining effective qualitative information, the amount of data is reduced by two orders of magnitude, which significantly reduces the computational burden of subsequent models.
[0037] (4) Normalization and serialization: The Min-Max normalization formula is used to map all parameters to the interval [0,1]: .
[0038] Constructing time series samples: Setting the sliding window length (Corresponding to 5 seconds of data), with an overlap rate set to 50%, tensor data that conforms to the model input dimensions is generated. The preprocessed 20Hz data is split through a temporal window to generate tensors with dimensions [number of samples, 100, 9], which are then standardized and input into the model.
[0039] Step 2, MOE-Transformer model construction.
[0040] The model constructed in this embodiment aims to capture long-range dependencies and nonlinear relationships between parameters, such as... Figure 3 As shown, its core architecture is as follows: Input embedding and positional encoding: The 9-dimensional features are mapped to a 128-dimensional high-dimensional vector, and sine / cosine positional encoding is superimposed to preserve the temporal information of the sequence. The 128-dimensional setting is based on the consideration that the input parameters are 9-dimensional, which is sufficient to carry the nonlinear combination information between parameters, while avoiding small-sample overfitting caused by excessive dimensionality.
[0041] The Transformer encoder includes a multi-head self-attention mechanism to capture the global correlation between different drilling parameters. The attention calculation formula is as follows:
[0042] in, , , These are the query vector, key vector, and value vector, respectively. This is the scaling factor.
[0043] Specifically, the Transformer encoder is configured with 6 layers, including 8 attention heads, and a 512-dimensional hidden layer. The 6-layer depth has been experimentally verified to achieve the optimal balance between capturing long-sequence dependencies and preventing gradient vanishing; the 8 attention heads allow the model to focus on different correlation patterns of drilling parameters in different representation subspaces (such as the instantaneous correlation between pressure and velocity, and the long-term trend of travel and lithology); the 512-dimensional hidden layer provides ample capacity for nonlinear transformation.
[0044] Hybrid Expert Module (MoE Layer): Replaces the traditional feedforward neural network (FFN) in the Transformer with a MoE layer. The Hybrid Expert Module contains a gated network. G ( x )and E A parallel expert network Output of the Hybrid Expert Module y The calculation formula is:
[0045] Where is the input feature vector. The first output of the gating network The weight of each expert, For the first The output of an expert network.
[0046] Experts Network: Setup A parallel expert network is used, with each expert forming a two-layer fully connected network (1024 hidden layer dimensions). A Top-2 sparse activation mechanism is employed. Eight experts are selected to cover at least eight common typical lithological feature patterns; the 1024-dimensional hidden layer ensures that each expert has sufficient fitting ability.
[0047] Gating Network: This network uses the Softmax function to calculate weights, dynamically calculates the matching degree of each expert for each input sample, and utilizes a Top-k mechanism (in this embodiment, we take...). Only the two experts with the highest weights are activated. This Top-2 mechanism (i.e., activating only the two experts with the highest scores each time) increases the robustness of the model expression compared to Top-1, and significantly reduces the computational cost compared to full activation (saving about 75% of the computation), achieving a balance between accuracy and efficiency.
[0048] This embodiment employs a sparse activation mechanism, which significantly increases the model capacity without increasing the computational load of inference, enabling it to simultaneously learn the characteristics of various working conditions such as soft rock, hard rock, and complex interlayered rock.
[0049] Step 3, two-stage training strategy.
[0050] To address the challenges of obtaining accurate labels and the inconsistency between test block data and field data distribution in the field of geological engineering, a transfer learning strategy is adopted: Phase 1: Pre-training of general physical features Data source: An automated drilling test bench was built indoors, and drilling experiments were conducted using standard material test blocks. The test blocks included: concrete test blocks with known strength grades (C10, C20, ..., C60) and standard rock test blocks with uniform lithology (such as standard granite, marble, and sandstone).
[0051] Objective: To train a model to learn the general physical mapping relationship between drilling parameters and material mechanical properties using a large amount of (e.g., 155 sets) of accurately labeled indoor data (e.g., increased hardness leads to decreased drilling speed and changes in vibration frequency).
[0052] Loss function: Weighted cross-entropy loss Combined with load balancing losses .in, It includes a sparsity regularization term, which forces the gating network to distribute samples evenly among the experts, preventing overload of a single expert (CollapseMode).
[0053] The specific calculation method for cross-entropy loss is as follows:
[0054] in N The number of samples in a training batch; C This represents the total number of lithological categories. y i,c As an indicator variable, if the sample i The true category is c. y i,c =1, otherwise 0; Predict samples for the model i Category cThe probability of; For category c The assigned weights.
[0055] Considering the limited number of labels on indoor drilling test specimens, an inverse frequency weighting method was used for calculation, and weights were assigned accordingly. The calculation method is as follows:
[0056] By employing a sparsity regularization term, the gated network tends to select only a few experts, preventing other experts from receiving sufficient training. This also avoids the pitfalls of manually performing dimensionality reduction on drilling parameters based solely on experience, which can lead to a loss of database features due to a lack of drilling parameter types. The load balancing loss calculation formula used in this embodiment is as follows:
[0057] in, λ The strength coefficient of the regularization term is a hyperparameter used to control the importance of load balancing; E This represents the total number of expert networks. f j For the first j The load ratio of each expert, within a batch, is selected by the gating network and routed to the experts. j The number of samples divided by the total number of samples in the batch; P j For the first j The proportion of the sum of the routing probabilities of each expert.
[0058] The final total loss function used for model training is: The goal of model training is to minimize this total loss through backpropagation and optimization algorithms. L Total .
[0059] Phase Two: Adaptive Fine-tuning Based on On-Site Conditions Data source: Real rock mass drilling data collected at the target project site (such as a tunnel face).
[0060] Strategy: Only a small number of real samples are needed (e.g., only 8-10 sets of data per lithology type). Freeze the parameters of the attention layer at the bottom of the model, and focus on fine-tuning the top-level classifier and MoE gating network using field data.
[0061] Effect: Enables the model to quickly adapt to specific geological environments on site (such as the degree of joint development and the influence of groundwater), realizing the knowledge transfer from "ideal laboratory environment" to "complex engineering environment".
[0062] Step 4: Model reasoning and result output.
[0063] Real-time drilling parameters of the area to be measured are collected and preprocessed as described above (outlier detection and correction, Kalman filtering smoothing, 20Hz downsampling, Min-Max normalization, and temporal serialization) to generate an input tensor of dimension [1,100,9], which is then input into the fine-tuned MOE-Transformer model.
[0064] The model outputs predicted probabilities for various lithologies, selects the category with the highest probability as the final lithology identification result, and simultaneously outputs the confidence level (predicted probability value) for that category. The results interaction module displays the lithology category, confidence level, and parameter time-series curves in real time.
[0065] Step 5, Model performance evaluation.
[0066] Accuracy and macro-F1 score are used as the core evaluation metrics to comprehensively reflect the classification performance of the models. All models are tested using the same training / test set in an environment with an Intel Core i7 CPU and an RTX 3080.
[0067] like Figure 5 As shown, the test results on a dataset from a tunnel engineering site (containing 680 samples of four types of lithology: granite, sandstone, shale, and fractured zone) demonstrate that the lithology identification accuracy of the model in this embodiment reaches 92.3%, with a Macro-F1 score of 0.91. This represents a significant improvement over the SVM model (81.5% accuracy, Macro-F1=0.84), LSTM model (83.2% accuracy, Macro-F1=0.86), and XGBoost model (85.4% accuracy, Macro-F1=0.89). Compared to using individual models, the Transformer model alone cannot run on the aforementioned computers due to its large number and variety of parameters; the MOE model alone lacks the parameter weight calculation capability of the Transformer model, resulting in relatively lower classification accuracy.
[0068] Based on the same inventive concept, this embodiment also provides a drilling parameter lithology intelligent identification system based on MOE-Transformer. The system includes a data sensing module, a data processing module, an intelligent identification module, and a result interaction module. The modules work together to complete the entire process of drilling parameter acquisition, processing, lithology identification, and result feedback.
[0069] Data sensing module: Through a multi-source sensor group installed on the drilling rig, nine core mechanical parameters are collected in real time during the drilling process, including impact pressure, impact flow rate, rotation speed, rotation pressure, propulsion pressure, drilling stroke, drilling speed, impact frequency and propulsion force. At the same time, the corresponding lithology labels are acquired, providing basic data support for model training and recognition.
[0070] Data processing module: Responsible for performing advanced preprocessing on the collected raw data, including outlier detection and correction, data smoothing and downsampling, Min-Max normalization and serialization conversion, and finally generating tensor data that conforms to the model input dimension, eliminating noise interference and data redundancy, and ensuring data quality.
[0071] Intelligent recognition module: Built-in pre-trained MOE-Transformer lithology recognition model. The core of this model includes an input embedding layer, a position encoding layer, a multi-layer Transformer encoder, and a classification layer. The feedforward neural network part of the Transformer encoder is replaced by a hybrid expert module (MoE Layer), which can dynamically capture the deep correlation between drilling parameters and the mapping relationship of lithology features, receive the processed data, and calculate the lithology classification probability.
[0072] The results interaction module is used to visually display the currently identified lithology category and its corresponding confidence level, presenting the identification results intuitively. At the same time, it issues geological warnings based on abnormal situations such as lithological abrupt changes in the identification results, providing timely reference for on-site construction decisions.
[0073] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A training method for a drilling parameter-based intelligent lithology identification model, characterized in that, Includes the following steps: S10: Acquire multi-source mechanical parameter data during the drilling process and obtain the corresponding lithology labels. Preprocess the collected data and construct a training dataset. S20, Construct a lithology identification model, which includes an input embedding layer, a position encoding layer, a multi-layer Transformer encoder, and a classification layer; wherein, the feedforward neural network part of the Transformer encoder is replaced with a hybrid expert module, which includes a gating network and multiple parallel expert networks. The gating network is used to dynamically assign weights to each expert network on the input feature vector, and the output of the hybrid expert module is a weighted sum of the outputs of each expert network. S30, a two-stage strategy is adopted to train the lithology identification model using the training dataset: in the first stage, the model is pre-trained using the dataset collected on standard material test blocks; in the second stage, the pre-trained model is fine-tuned using sample data collected on real rock masses at the target engineering site; during the training process, an expert network is dynamically selected through a gating network and optimized using a loss function; after optimization, the optimized model weights are saved. In step S10, the multi-source mechanical parameter data includes impact pressure, impact flow rate, rotational speed, rotational pressure, propulsion pressure, drilling stroke, drilling speed, impact frequency, and propulsion force. The preprocessing includes outlier detection and correction, data smoothing and downsampling, normalization, and label numerical mapping. The outlier detection and correction includes: calculating the Mahalanobis distance of multi-source mechanical parameter data based on a sliding window to identify outliers; when the Mahalanobis distance exceeds three times the standard deviation, it is determined to be an outlier; performing time-frequency analysis on the outlier signal using discrete wavelet transform, selecting the db4 wavelet basis function for three-level decomposition; if only the high-frequency coefficients change abruptly while the low-frequency trend remains stable, it is determined to be sensor instantaneous noise; if the low-frequency trend changes synchronously, it is determined to be a geological abrupt change; for outliers determined to be sensor errors, the K-nearest neighbor algorithm is used for calibration. The data smoothing and downsampling includes: using Kalman filtering to smooth the data after outlier detection and correction, setting the state equation as a linear Gaussian model, with process noise variance Q=1e-5 and observation noise variance R=1e-3, updating the optimal estimate through iteration, and then downsampling the smoothed data from the original 2kHz to 20Hz, using the mean sampling method, taking the mean of every 100 original data points as the downsampled data points.
2. The training method for the intelligent lithology identification model for drilling parameters as described in claim 1, characterized in that, The normalization process uses Min-Max normalization, mapping each parameter to the [0,1] interval. The normalization formula is as follows: In the formula, x These are the original parameter values; and These are the minimum and maximum values of the parameter in the dataset, respectively.
3. The training method for the intelligent lithology identification model for drilling parameters as described in claim 1, characterized in that, In step S20, the hybrid expert module includes a gated network. G ( x )and E A parallel expert network The gated network uses the Softmax function to normalize the weights, and the output of the hybrid expert module... y The calculation formula is: In the formula, x in The input feature vector; The first output of the gating network i The weight of each expert, For the first i The output of the expert network; the number of expert networks is 8, each expert network is a two-layer fully connected network with a hidden layer dimension of 1024; the gated network adopts the Top-2 sparse activation mechanism, which only activates the two expert networks with the highest weights.
4. The training method for the intelligent identification model of drilling parameters and lithology as described in claim 1, characterized in that, In step S20, the input embedding layer is used to map the input features into a 128-dimensional high-dimensional vector; the position encoding layer is used to superimpose sine or cosine position codes to preserve the temporal information of the sequence; the multi-layer Transformer encoder is set to 6 layers, containing 8 attention heads, with a hidden layer dimension of 512; the multi-layer Transformer encoder includes a multi-head self-attention mechanism to capture the global correlation between different drilling parameters, and the attention calculation formula is: In the formula, 、 、 These are the query vector, key vector, and value vector, respectively. This is the scaling factor.
5. The training method for the intelligent identification model of drilling parameters and lithology as described in claim 1, characterized in that, In step S30, the standard material test blocks include concrete test blocks with known strength grades and standard rock test blocks with uniform lithology; the goal of the pre-training is to enable the model to learn the general mapping relationship between drilling behavior and the basic mechanical properties of materials; the fine-tuning stage freezes the attention layer parameters of the bottom layer of the model and uses field data to fine-tune the classifier and gating network of the top layer.
6. The training method for the intelligent lithology identification model for drilling parameters as described in claim 1, characterized in that, In step S30, the loss function is a weighted cross-entropy loss function, and the load balancing of the gated network is constrained by a sparsity regularization term; the calculation formula for the weighted cross-entropy loss is: In the formula, N The number of samples in a training batch; C This represents the total number of lithological categories; y i,c As an indicator variable, when the sample i The true category is c hour y i,c =1, otherwise 0; Predict samples for the model i Category c The probability of; For category c The assigned weights.
7. The training method for the intelligent identification model of drilling parameters and lithology as described in claim 6, characterized in that, The weight The calculation is performed using an inverse frequency-weighted method, and the formula is as follows: In the formula, For category c The number of samples.
8. The training method for the intelligent identification model of drilling parameters and lithology as described in claim 6, characterized in that, The sparsity regularization term is the load balancing loss, and its calculation formula is as follows: In the formula, λ is the strength coefficient of the regularization term; E The total number of expert networks; f j For the first j The load ratio of each expert is selected by the gating network and routed to the experts in a batch. j The number of samples divided by the total number of samples in the batch; P j For the first j The proportion of the sum of the routing probabilities of each expert.
9. A method for intelligent identification of lithology using drilling parameters, characterized in that, Includes the following steps: Collect real-time drilling parameter data of the area to be tested, and preprocess the collected data; The preprocessed data is input into the lithology intelligent identification model trained using the training method of the drilling parameter lithology intelligent identification model as described in any one of claims 1 to 8; The predicted lithology category is output through the lithology intelligent identification model.