A method for inversion of electromagnetic wave resistivity logging while drilling

By combining the XGBoost feature screening module with the BiLSTM-Transformer model, the problems of insufficient accuracy and efficiency of existing while-drilling electromagnetic wave resistivity logging inversion methods in complex formations are solved, and efficient and accurate inversion of anisotropic formations is achieved.

CN120402054BActive Publication Date: 2025-09-12QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510912275.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-12
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

The existing inversion method of electromagnetic wave resistivity logging while drilling has problems such as strong dependence on initial values, easy to fall into local optimal solutions, and difficulty in capturing the continuous change characteristics of formation parameters when dealing with complex formations, resulting in insufficient inversion accuracy and efficiency.

Method used

The XGBoost feature filtering module was used to optimize the dataset and combined with the BiLSTM-Transformer model for inversion. XGBoost was used for feature importance analysis and weighted enhancement, while the BiLSTM-Transformer model improved the inversion accuracy of formation parameters through its multi-head attention mechanism and time series modeling capabilities.

Benefits of technology

The inversion accuracy and computational efficiency are improved, and the dynamic correlation between multiple parameters in anisotropic formations can be effectively analyzed, thereby achieving the joint inversion of target formation resistivity, surrounding rock electrical parameters, and interface distance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120402054B_ABST
    Figure CN120402054B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of logging while drilling (LWD) technology, and in particular, provides a method for LWD electromagnetic wave resistivity logging inversion. The method comprises constructing an XGBoost feature filtering module, optimizing a dataset using the XGBoost feature filtering module to obtain an optimized dataset, and constructing a BiLSTM-Transformer model, inputting the optimized dataset into the model to obtain an inversion result. This method improves inversion accuracy and computational efficiency, and enables inversion of the resistivity of a target formation, the resistivity of adjacent surrounding rocks, and boundary distances in anisotropic formation models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of logging while drilling, and in particular to a method for inversion of electromagnetic wave resistivity logging while drilling. Background Art

[0002] Currently, with the significant increase in demand for oil resources and the difficulty of exploration, traditional detection methods and instruments for obtaining oil resources can no longer meet the needs of the industry. In response to this situation, logging while drilling (LWD) has become an important means of evaluating various logging models, such as those for highly deviated wells, horizontal wells, and slim-hole sidetracking. The LWD electromagnetic wave logging response signal not only contains formation resistivity information but also reflects the relative position of the instrument. However, it cannot directly obtain information such as the resistivity of the target formation, the resistivity of the upper and lower surrounding rocks, and the boundary distance. This information requires inversion processing of the raw data. Accurate and rapid inversion of LWD data is crucial for guiding the precise movement of drilling tools within the reservoir and further improving oil and gas recovery rates.

[0003] Commonly used inversion methods for electromagnetic wave resistivity logging while drilling (LWD) are nonlinear iterative methods. These methods first require setting an initial model. They then repeatedly use iterative algorithms to reduce the error between the inverted formation information and the true formation information. Based on this error, the inversion model is continuously updated until convergence is achieved. These methods are highly dependent on the initial values. If the initial values ​​deviate significantly from the true solution, the iterations may diverge or the convergence rate may plummet, making them prone to falling into local optimal solutions. This is especially true when the objective function has multiple extreme points, where the algorithm may be unable to find the global optimum beyond the current region.

[0004] In recent years, the development of deep learning technology has attracted widespread attention. Deep neural networks have a strong ability to represent complex structures. Deep learning models can be used to transform the inversion of while-drilling electromagnetic wave resistivity logging into a regression prediction task. However, current deep learning methods face three major challenges in the inversion of while-drilling electromagnetic wave resistivity logging. Existing methods typically use the entire logging curve as input, but the remote data is less sensitive to interface changes, making it difficult for the model to capture the continuous changes in formation parameters, weakening the ability to identify the target layer response. Furthermore, existing models are mostly limited to isotropic formation scenarios and can only invert the vertical resistivity and boundary distance of the target layer and surrounding rock. They cannot resolve the dynamic correlation between multiple parameters such as lateral resistivity, vertical resistivity, and anisotropy coefficient in anisotropic formations, resulting in insufficient dimensionality for complex formation inversion. In addition, different components of the response signal contribute differently to the inversion. The superposition of high-weight signals and weakly sensitive interference features can lead to inversion distortion, local optimal solution traps, and reduced generalization performance. Summary of the Invention

[0005] In view of this, the present invention provides a method for inversion of electromagnetic wave resistivity logging while drilling to improve the inversion accuracy and computational efficiency, and to realize the inversion of the target formation resistivity and the adjacent layer surrounding rock resistivity and boundary distance under anisotropic formation models.

[0006] In a first aspect, the present invention provides a method for inversion of electromagnetic wave resistivity logging while drilling, the method comprising:

[0007] Step 1: Build an XGBoost feature screening module and optimize the data set through the XGBoost feature screening module to obtain the optimized data set;

[0008] Step 2: Build a BiLSTM-Transformer model and input the optimized dataset into the model to obtain the inversion results.

[0009] Optionally, step 1 includes:

[0010] Taking the decision tree as the basic learner, the additive model and the forward learning algorithm are used to combine multiple basic learners into a strong learner. The gradient boosting algorithm is used to construct a new decision tree by iteratively calculating the gradient and residual between the predicted value and the true value. Assuming that K decision trees are generated, the expression of their single sample output is:

[0011] ;

[0012] in, Indicates the The prediction function of a decision tree, is the function space;

[0013] Objective function Including the loss function term and the regularization term, its expression is:

[0014] ;

[0015] Regularization term Defined as:

[0016] ;

[0017] in, Represents the number of leaf nodes in the decision tree, and ω represents the leaf weight; and λ are hyperparameters, Used to control the number of leaf nodes in the decision tree, and λ is used to control weight regularization and suppress weight overfitting;

[0018] The importance of features is evaluated by node splitting gain. Each time a node splits, the feature that maximizes the information gain is selected. The expression of its gain is:

[0019] ;

[0020] in, , are the gradient statistics of the left and right subtrees after splitting, i.e., the first-order derivatives; , is the second-order derivative statistic;

[0021] Introducing the position weight factor, the improved gain expression is:

[0022] ;

[0023] ;

[0024] in, j ∈[1,N] represents the feature position index, j =1 indicates the most advanced feature, j =N represents the terminal feature; η represents the weight intensity coefficient, and κ represents the nonlinear adjustment factor;

[0025] The higher the total gain value of a feature, the greater its contribution to the result prediction; finally, the features are sorted by gain and some features with low contribution weights are eliminated.

[0026] Optionally, step 2 includes:

[0027] The Transformer model is used as the encoding layer, and it uses a multi-head attention mechanism to capture the global dependencies of the sequence in parallel. The BiLSTM model is used as the decoding layer, and it extracts local context patterns from both directions through the temporal recursion feature, combining the BiLSTM model and the Transformer model.

[0028] Residual enhancement is performed in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. The filtered features are mapped to the dimension matching the BiLSTM model input through the linear layer to generate an enhanced feature vector, which is expressed as:

[0029] ;

[0030] in, Represents the feature vector filtered by the XGBoost feature filtering module; represents the weight matrix of the linear layer, represents the bias term of the linear layer;

[0031] The original linear layer output is then weightedly fused with the enhanced feature vector to obtain the final decoding layer weighted input vector, which is expressed as:

[0032] ;

[0033] in, Represents the original linear layer output vector; Indicates that the XGBoost feature screening module traverses all the split nodes of the tree and accumulates the total gain of each feature; Indicates the maximum value among all total gains.

[0034] Optionally, the Transformer model includes:

[0035] The Transformer model is a sequence modeling model based on the self-attention mechanism. It consists of an encoding block and a decoding block. Each block is composed of multiple independent encoding layers or decoding layers stacked together. Each encoding layer includes a multi-head attention layer, a fully connected layer, and a normalization layer. Each decoding layer includes two multi-head attention layers. The Transformer model adopts a position encoding strategy to obtain relative position information in the input sequence and uses a multi-head attention mechanism to focus on different details in different subspaces.

[0036] The Transformer model implementation is divided into the following steps:

[0037] I. Input Encoding Layer: This layer introduces the input sequence information into positional encoding, enabling the Transformer model to distinguish input elements at different positions and capture the order information in the sequence. Positional encoding uses a fixed encoding of sine and cosine functions, and its expression is:

[0038] ;

[0039] ;

[0040] in, Represents the position index, Represents the dimension index; after encoding, it is directly added to the input feature;

[0041] II. Multi-head attention mechanism layer: Generate query by linear transformation of position-encoded input sequence ,key , numerical value The matrix expression is:

[0042] ;

[0043] in, , and represents the weight matrix;

[0044] Calculate the output of the attention mechanism, which is expressed as:

[0045] ;

[0046] in, Display key Dimensions;

[0047] The outputs of multiple attention heads are connected together, and then processed through linear transformation and activation function for parallel calculation and then spliced; assuming there is Attention heads, the output of each attention head is expressed as , the final output of the multi-head attention mechanism is:

[0048] ;

[0049] in, represents the linear projection matrix;

[0050] III. Feedforward network and normalization layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feedforward neural network FNN; the feedforward neural network consists of two fully connected layers, with the activation function ReLU used in the middle for nonlinear transformation, and its expression is:

[0051] ;

[0052] in, Represents the weights of the two fully connected layers; Represents the bias terms of the two fully connected layers;

[0053] Finally, the residual connection is introduced to normalize the result layer after residual calculation, and normalize the hidden layer in the neural network to the standard normal distribution. The expression is:

[0054] ;

[0055] .

[0056] Optionally, the BiLSTM model includes:

[0057] LSTM selects information through three gate structures: forget gate, output gate and input gate, and two basic units: memory cell state and hidden unit. At time t, LSTM receives the input vector And the output of the previous state ; First enter the forget gate and calculate the forget weight vector , whose expression is:

[0058] ;

[0059] in, represents the weight matrix of the forget gate, represents the bias parameter of the forget gate, Represents the activation function sigmoid;

[0060] Then, the weight vector Enter the input gate and combine the output of the previous moment with the input of the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , whose expression is:

[0061] ;

[0062] ;

[0063] in, represents the weight matrix of the input gate, Represents the bias parameter of the input gate; The weight matrix representing the cell state, Bias parameters representing cell states;

[0064] Then the memory layer And memories of the past Combined, through the cell state update, output new , whose expression is:

[0065] ;

[0066] Finally, the activation vector Enters the output gate and is combined with the memory cell through the tanh layer Update the weights to get the current state output , whose expression is:

[0067] ;

[0068] ;

[0069] in, represents the weight matrix of the output gate, Represents the bias parameter of the output gate;

[0070] The BiLSTM model is introduced as the decoding layer. The BiLSTM model consists of two LSTM layers, forward and reverse. One layer processes the forward sequence and the other processes the reverse sequence, generating forward and reverse hidden state sequences respectively.

[0071] In the technical solution provided by the present invention, the method includes constructing an XGBoost feature screening module, and optimizing the data set through the XGBoost feature screening module to obtain an optimized data set; constructing a BiLSTM-Transformer model, and inputting the optimized data set into the model to obtain an inversion result. This method improves the inversion accuracy and computational efficiency, and realizes the inversion of the target formation resistivity and the adjacent layer surrounding rock resistivity and boundary distance under the anisotropic formation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 A flow chart of a method for inversion of electromagnetic wave resistivity logging while drilling provided by an embodiment of the present invention;

[0074] Figure 2 This is a diagram of the BiLSTM-Transformer model architecture provided by an embodiment of the present invention;

[0075] Figure 3 A schematic diagram of a multi-head attention layer provided in an embodiment of the present invention;

[0076] Figure 4 LSTM network architecture diagram provided for an embodiment of the present invention;

[0077] Figure 5 A diagram of the BiLSTM model architecture provided by an embodiment of the present invention;

[0078] Figure 6 A schematic diagram of an isotropic formation model provided in an embodiment of the present invention;

[0079] Figure 7 A schematic diagram of an anisotropic formation model provided by an embodiment of the present invention;

[0080] Figure 8a The upper layer resistivity inversion result of the LSTM model in the isotropic formation provided by the embodiment of the present invention;

[0081] Figure 8b The resistivity inversion result of the current layer of the LSTM model in the isotropic formation provided by the embodiment of the present invention;

[0082] Figure 8c The lower layer resistivity inversion result of the LSTM model in the isotropic formation provided by the embodiment of the present invention;

[0083] Figure 9a The upper layer resistivity inversion results of the BiLSTM-Transformer model in the isotropic formation provided by the embodiment of the present invention;

[0084] Figure 9b The resistivity inversion result of the current layer of the BiLSTM-Transformer model in the isotropic formation provided by the embodiment of the present invention;

[0085] Figure 9c The lower layer resistivity inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiment of the present invention;

[0086] Figure 10a The resistivity inversion results of the upper layer of the model using XGBoost combined with BiLSTM-Transformer in the isotropic formation provided by the embodiment of the present invention;

[0087] Figure 10b The resistivity inversion results of the current layer of the isotropic formation using the XGBoost combined with BiLSTM-Transformer model provided in the embodiment of the present invention;

[0088] Figure 10c The resistivity inversion results of the lower layer of the model using XGBoost combined with BiLSTM-Transformer in the isotropic formation provided by the embodiment of the present invention;

[0089] Figure 11a The upper boundary distance inversion result of the LSTM model in the isotropic stratum provided in the embodiment of the present invention;

[0090] Figure 11b The inversion result of the lower boundary distance of the LSTM model in the isotropic stratum provided by the embodiment of the present invention;

[0091] Figure 12a The upper boundary distance inversion result of the BiLSTM-Transformer model in the isotropic stratum provided by the embodiment of the present invention

[0092] Figure 12b The lower boundary distance inversion result of the BiLSTM-Transformer model in the isotropic stratum provided by the embodiment of the present invention

[0093] Figure 13a The upper boundary distance inversion results of the XGBoost combined with BiLSTM-Transformer model in the isotropic stratum provided in the embodiment of the present invention;

[0094] Figure 13b The inversion results of the lower boundary distance of the XGBoost combined with the BiLSTM-Transformer model in the isotropic stratum provided by the embodiment of the present invention;

[0095] Figure 14a The inversion results of the upper horizontal resistivity of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0096] Figure 14b The horizontal resistivity inversion result of the current layer of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0097] Figure 14c The inversion results of the lower horizontal resistivity of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0098] Figure 15a The inversion results of the upper vertical resistivity of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0099] Figure 15b The vertical resistivity inversion result of the current layer of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0100] Figure 15c The vertical resistivity inversion result of the lower layer of the LSTM model in the anisotropic formation provided by the embodiment of the present invention;

[0101] Figure 16a The upper horizontal resistivity inversion result of the BiLSTM-Transformer model in anisotropic formations provided in an embodiment of the present invention;

[0102] Figure 16b The horizontal resistivity inversion result of the current layer of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiment of the present invention;

[0103] Figure 16c The inversion results of the lower horizontal resistivity of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiment of the present invention;

[0104] Figure 17a The inversion results of the upper vertical resistivity of the BiLSTM-Transformer model in anisotropic formations provided by the embodiment of the present invention;

[0105] Figure 17b The vertical resistivity inversion result of the current layer of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiment of the present invention;

[0106] Figure 17c The vertical resistivity inversion results of the lower layer of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiment of the present invention;

[0107] Figure 18a The inversion results of the upper horizontal resistivity of the anisotropic formation using the XGBoost combined with the BiLSTM-Transformer model provided in the embodiment of the present invention;

[0108] Figure 18b The horizontal resistivity inversion result of the current layer in anisotropic formation using the XGBoost combined with BiLSTM-Transformer model provided in the embodiment of the present invention;

[0109] Figure 18c The inversion results of the lower horizontal resistivity of the anisotropic stratum provided by the embodiment of the present invention using the XGBoost combined with the BiLSTM-Transformer model;

[0110] Figure 19a The inversion results of the upper vertical resistivity of the anisotropic stratum provided by the embodiment of the present invention using the XGBoost combined with the BiLSTM-Transformer model;

[0111] Figure 19b The vertical resistivity inversion result of the current layer in anisotropic formation provided by the embodiment of the present invention using the XGBoost combined with the BiLSTM-Transformer model;

[0112] Figure 19c The vertical resistivity inversion results of the lower layer in anisotropic formations using the XGBoost combined with the BiLSTM-Transformer model provided in the embodiment of the present invention;

[0113] Figure 20a The inversion result of the upper boundary distance of the LSTM model in the anisotropic stratum provided by the embodiment of the present invention;

[0114] Figure 20b The inversion result of the lower boundary distance of the LSTM model in the anisotropic stratum provided by the embodiment of the present invention;

[0115] Figure 21a The upper boundary distance inversion result of the BiLSTM-Transformer model in anisotropic strata provided in an embodiment of the present invention;

[0116] Figure 21b The inversion results of the lower boundary distance of the BiLSTM-Transformer model in anisotropic strata provided by the embodiment of the present invention;

[0117] Figure 22a The upper boundary distance inversion results of the XGBoost combined with BiLSTM-Transformer model in anisotropic strata provided in an embodiment of the present invention;

[0118] Figure 22b The inversion results of the lower boundary distance in anisotropic strata provided by the embodiment of the present invention are obtained by combining the XGBoost and BiLSTM-Transformer model. DETAILED DESCRIPTION

[0119] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0120] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0121] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings.

[0122] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0123] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0124] Figure 1 The flowchart of the method for inversion of electromagnetic wave resistivity logging while drilling provided by the embodiment of the present invention is as follows: Figure 1As shown, the method includes:

[0125] Step 1: Build an XGBoost feature screening module and optimize the data set through the XGBoost feature screening module to obtain the optimized data set;

[0126] Step 2: Build a BiLSTM-Transformer model and input the optimized dataset into the model to obtain the inversion results.

[0127] In an embodiment of the present invention, first, layered isotropic and anisotropic formation models are constructed, and resistivity parameter combinations of the target formation and the surrounding rock layer are randomly generated; then, the response characteristic values ​​under the corresponding formation parameters are obtained through forward simulation, thereby constructing a while-drilling logging data set containing a mapping relationship between multidimensional formation parameters and logging responses; finally, the samples after feature selection by the XGBoost feature screening module are normalized, and the optimized data set is used as the input of the BiLSTM-Transformer model, and the formation parameters and boundary distances are used as output targets. The BiLSTM-Transformer model is trained to achieve end-to-end inversion calculation.

[0128] In an embodiment of the present invention, an XGBoost feature screening module is introduced to perform feature importance analysis on the original data set, and select some data with higher feature importance for weighted enhancement, so as to reduce the adverse effects of messy data on model training and prevent the model from overfitting.

[0129] In the embodiment of the present invention, step 1 includes:

[0130] Taking the decision tree as the basic learner, the additive model and the forward learning algorithm are used to combine multiple basic learners into a strong learner. The gradient boosting algorithm is used to construct a new decision tree by iteratively calculating the gradient and residual between the predicted value and the true value. Assuming that K decision trees are generated, the expression of their single sample output is:

[0131] ;

[0132] in, Indicates the The prediction function of a decision tree, is the function space;

[0133] Objective function Including the loss function term and the regularization term, its expression is:

[0134] ;

[0135] Regularization term Defined as:

[0136] ;

[0137] in, Represents the number of leaf nodes in the decision tree, and ω represents the leaf weight; and λ are hyperparameters, Used to control the number of leaf nodes in the decision tree, and λ is used to control weight regularization and suppress weight overfitting;

[0138] The importance of features is evaluated by node splitting gain. Each time a node splits, the feature that maximizes the information gain is selected. The expression of its gain is:

[0139] ;

[0140] in, , are the gradient statistics of the left and right subtrees after splitting, i.e., the first-order derivatives; , is the second-order derivative statistic;

[0141] The position weight factor is introduced so that the features close to the formation boundary obtain higher gain weights when splitting, thereby giving priority to the key features for splitting. The improved gain expression is:

[0142] ;

[0143] ;

[0144] in, j ∈[1,N] represents the feature position index, j =1 indicates the most advanced feature, j =N represents the terminal feature; η represents the weight intensity coefficient, and κ represents the nonlinear adjustment factor;

[0145] The higher the total gain value of a feature, the greater its contribution to the result prediction; finally, the features are sorted by gain and some features with low contribution weights are eliminated.

[0146] In the embodiment of the present invention, Figure 2 As shown, step 2 includes:

[0147] The Transformer model serves as the encoding layer, capturing the global dependencies of the sequence in parallel based on a multi-head attention mechanism, stabilizing the feature distribution through layer normalization, and enhancing the nonlinear representation capability with the help of a feedforward neural network (FNN). The BiLSTM model serves as the decoding layer, extracting local contextual patterns from both directions through the temporal recursive characteristics. The combination of the BiLSTM model and the Transformer model enables the hybrid model to achieve a dynamic balance between global modeling and local feature extraction, significantly enhancing the model's ability to extract the attenuation response characteristics of distant formation interfaces. Finally, the output result is obtained through a fully connected layer.

[0148] Residual enhancement is performed in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. The filtered features are mapped to the dimension matching the BiLSTM model input through the linear layer to generate an enhanced feature vector, which is expressed as:

[0149] ;

[0150] in, Represents the feature vector filtered by the XGBoost feature filtering module; represents the weight matrix of the linear layer, represents the bias term of the linear layer;

[0151] The original linear layer output is then weightedly fused with the enhanced feature vector to obtain the final decoding layer weighted input vector, which is expressed as:

[0152] ;

[0153] in, Represents the original linear layer output vector; Indicates that the XGBoost feature screening module traverses all the split nodes of the tree and accumulates the total gain of each feature; Indicates the maximum value among all total gains.

[0154] The present invention also deeply mines the spatiotemporal correlation characteristics of the LWD response sequence, and better utilizes the data features of the response sequence to improve the accuracy and speed of LWD data inversion.

[0155] In an embodiment of the present invention, the Transformer model includes:

[0156] The Transformer model is a sequence modeling model based on the self-attention mechanism. It consists of an encoding block and a decoding block. Each block is composed of multiple independent encoding layers (Encoder) or decoding layers (Decoder). Each encoding layer includes a multi-head attention layer (Multi-HeadAttention), a fully connected layer, and a normalization layer. Each decoding layer includes two multi-head attention layers. The Transformer model adopts a position encoding strategy to obtain the relative position information in the input sequence and uses the multi-head attention mechanism to focus on different details in different subspaces. Figure 3 As shown in the figure, the multi-head attention mechanism transforms the input sequence into a matrix of query (Query, Q), key (Key, K), and value (Value, V) through three fully connected layers. Each sub-matrix captures different subspace features through the scaled dot product attention mechanism. Finally, all attention heads are output and spliced, and the final output is integrated through the fully connected layer.

[0157] The Transformer model implementation is divided into the following steps:

[0158] I. Input Encoding Layer: This layer introduces the input sequence information into positional encoding, enabling the Transformer model to distinguish input elements at different positions and capture the order information in the sequence. Positional encoding uses a fixed encoding of sine and cosine functions, and its expression is:

[0159] ;

[0160] ;

[0161] in, Represents the position index, Represents the dimension index; after encoding, it is directly added to the input feature;

[0162] II. Multi-head attention mechanism layer: The position-encoded input sequence is transformed linearly to generate a matrix of query (Q), key (K), and value (V). Its expression is:

[0163] ;

[0164] in, , and represents the weight matrix;

[0165] Calculate the output of the attention mechanism, which is expressed as:

[0166] ;

[0167] in, Display key Dimensions;

[0168] The outputs of multiple attention heads are connected together, and then processed through linear transformation and activation function for parallel calculation and then spliced; assuming there is Attention heads, the output of each attention head is expressed as , the final output of the multi-head attention mechanism is:

[0169] ;

[0170] in, represents the linear projection matrix;

[0171] III. Feedforward network and normalization layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feedforward neural network FNN; the feedforward neural network consists of two fully connected layers, with the activation function ReLU used in the middle for nonlinear transformation, and its expression is:

[0172] ;

[0173] in, Represents the weights of the two fully connected layers; Represents the bias terms of the two fully connected layers;

[0174] Finally, the residual connection is introduced to normalize the result layer after residual calculation, and normalize the hidden layer in the neural network to the standard normal distribution. The expression is:

[0175] ;

[0176] .

[0177] In this embodiment of the present invention, the BiLSTM model includes:

[0178] The LSTM network can effectively handle the gradient vanishing and gradient exploding problems in long time series by introducing special memory units and gating mechanisms. Its structure is as follows: Figure 4 As shown in the figure, LSTM selects information through three gate structures: forget gate, output gate and input gate, as well as two basic units: memory cell state and hidden unit. At time t, LSTM receives the input vector And the output of the previous state ; First enter the forget gate and calculate the forget weight vector , whose expression is:

[0179] ;

[0180] in, represents the weight matrix of the forget gate, represents the bias parameter of the forget gate, Represents the activation function sigmoid; the mechanism of the input gate is to accurately control the importance of the output data of the previous moment, combine the output of the previous moment with the input of the current moment, and map the result between 0 and 1 through the sigmoid function.

[0181] Then, the weight vector Enter the input gate and combine the output of the previous moment with the input of the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , whose expression is:

[0182] ;

[0183] ;

[0184] in, represents the weight matrix of the input gate, Represents the bias parameter of the input gate; The weight matrix representing the cell state, Bias parameters representing cell states;

[0185] Then the memory layer And memories of the past Combined, through the cell state update, output new , whose expression is:

[0186] ;

[0187] Finally, the activation vector Enters the output gate and is combined with the memory cell through the tanh layer Update the weights to get the current state output , whose expression is:

[0188] ;

[0189] ;

[0190] in, represents the weight matrix of the output gate, Represents the bias parameter of the output gate;

[0191] The BiLSTM model is introduced as the decoding layer, such as Figure 5 As shown in the figure, the BiLSTM model consists of two LSTM layers, forward and reverse. One layer processes the forward sequence and the other processes the reverse sequence, generating forward and reverse hidden state sequences respectively.

[0192] In the embodiment of the present invention, formation parameters and data sets are constructed to establish Figure 6 and Figure 7 The layered isotropic and anisotropic formation models shown in the figure, the resistivity R of each layer in the isotropic formation model, the horizontal resistivity Rh and vertical resistivity Rv of each layer in the anisotropic formation model, as well as the formation thickness H and the well inclination angle α are randomly selected. The range of the formation thickness H is set to (4m, 6m), and the range of the well inclination angle α is set to (30°, 60°). The selected response signals are as follows:

[0193] ;

[0194] ;

[0195] ;

[0196] ;

[0197] ;

[0198] in, to Indicates the five response signals selected to construct the data set; in the coordinate system of the logging while drilling tool Under the setting of three-direction unit magnetic moment emission and three-direction unit magnetic moment reception, the received signal voltage has 9 components. express m When the unit magnetic moment is emitted in the direction, n The voltage signal received by the unit magnetic moment in the direction; the 9 components include all the transmission and reception combinations in the three-dimensional axis;

[0199] In the embodiment of the present invention, the propagation of electromagnetic waves in a medium satisfies the differential form of Maxwell's equations, which are expressed as follows:

[0200] ;

[0201] in, is the magnetic field strength, is the electric field strength, is the magnetic induction intensity, is the electric displacement vector, The transmitted current density is the current density. The diameter of the transmitting coil of the logging while drilling can be ignored relative to the coil source distance, which is equivalent to a magnetic dipole source. A time-harmonic current source is used in the measurement. , in the TI formation, the time-harmonic Maxwell equations are expressed as:

[0202] ;

[0203] in, is the conductivity tensor, is an external magnetic current source, is the vacuum permeability;

[0204] Using Hertz potential theory, the Hertz vector potential and scalar potential satisfy:

[0205] ;

[0206] in, and are the horizontal and vertical conductivity components respectively; substituting this formula into the above formula and converting it into the cylindrical coordinate system, we can get:

[0207] ;

[0208] Calculate the vertical component of the electromagnetic field of each layer in the two-dimensional TI formation model, obtain the horizontal component, and then obtain the solution of the entire wave field;

[0209] The electromagnetic field in the horizontal layered model is solved by the following recursive formula:

[0210] ;

[0211] In the geodetic coordinate system of the triaxial tool axis, the triaxial electromagnetic wave logging response can be described by the magnetic field tensor, and the expression of the magnetic field component of the nth layer can be written; the magnetic field tensor expression of all 9 components comprehensively expressed in the xz and yz planes is:

[0212] ;

[0213] ;

[0214] ;

[0215] ;

[0216] ;

[0217] ;

[0218] ;

[0219] ;

[0220] ;

[0221] Since the transmitting magnetic moment intensity and the receiving magnetic moment intensity are both 1 in electromagnetic wave logging, there is a relationship:

[0222] ;

[0223] in, is an imaginary unit, is the instrument operating angular frequency, is the receiving coil area;

[0224] From the above content, 9 components can be obtained .

[0225] The frequencies were set to 100kHz, 400kHz, and 2MHz to reflect the signals received when parameters such as formation resistivity, boundary distance, and anisotropy changed. Finally, 20% of the samples were taken as a validation set to evaluate the inversion performance of the neural network model for resistivity and boundary distance.

[0226] Comparison and analysis of the training results of the present invention:

[0227] For the inversion problem of isotropic and anisotropic formations, this paper uses traversal optimization to uniformly set the model training parameters: learning rate 0.0001, batch size 512, and training cycle 500. By comparing the performance of different deep learning architectures under the same experimental conditions, the model convergence (loss function, Loss), prediction accuracy (root mean square error, RMSE) and goodness of fit (coefficient of determination, ) and other key indicators. Detailed comparative data is shown in Table 1-2.

[0228] Table 1. Isotropic formation inversion training loss parameters

[0229] ;

[0230] Table 2. Anisotropic formation inversion training loss parameters

[0231] ;

[0232] As can be seen from Table 1 and Table 2, the XGBoost combined with the BiLSTM-Transformer model proposed in this paper shows significant advantages in inversion accuracy and training efficiency. =0.9638, Loss=0.0652, RMSE=0.2072, the global optimal solution compared with the traditional LSTM model, The performance is improved by 4.1%, the loss is reduced by 26.4%, and the RMSE is reduced by 19.3%. In more challenging anisotropic formations, its performance is still better. It is increased to 0.9684, and the Loss and RMSE are reduced to 0.0614 and 0.1957 respectively. Compared with the traditional LSTM model, Improved by 7.2%, loss reduced by 58.8%, and RMSE reduced by 43.7%.

[0233] Therefore, it can be clearly seen from the training results that the training results of XGBoost combined with BiLSTM-Transformer model are better than the other two deep learning models as a whole.

[0234] Comparison of resistivity inversion results of the present invention:

[0235] Using the trained LSTM, BiLSTM-Transformer and XGBoost combined with the BiLSTM-Transformer model, the resistivity and boundary distance are inverted under isotropic and anisotropic formations respectively. The results are as follows Figures 8a to 22b As shown; at the same time, the percentage error analysis of the most important resistivity inversion results is carried out, and the results are shown in Tables 3 to 5.

[0236] Table 3 Relative error of isotropic formation resistivity inversion

[0237] ;

[0238] Table 4 Relative error of horizontal resistivity inversion for anisotropic formations

[0239] ;

[0240] Table 5 Relative error of vertical resistivity inversion for anisotropic formations

[0241] .

[0242] Inversion result analysis:

[0243] By integrating the XGBoost feature selection mechanism with the BiLSTM-Transformer deep learning architecture, this paper achieves a systematic breakthrough in the inversion performance of multi-dimensional formation parameters. Compared with traditional methods, this fusion model exhibits multi-scale optimization characteristics: for resistivity parameters at different depths, the model further improves the precision of parameter estimation in the inversion of basic parameters such as upper and middle layer resistivity and formation boundary distance, building on its existing advantages. In particular, the inversion accuracy of predictive inversion parameters such as lower layer resistivity is significantly improved.

[0244] The proposed method integrates the XGBoost feature selection mechanism with the BiLSTM-Transformer deep learning architecture, which has the following advantages and effects:

[0245] Model optimization based on feature selection: The XGBoost feature selection module quantifies feature importance and dynamically weights and enhances highly discriminative features, strengthening the contribution of key parameters in model training. While preserving the integrity of the original data, this method uses a weight decay strategy to reduce the implicit interference of irrelevant features, enhancing the model's focus on sensitive features of resistivity parameters. Experiments demonstrate that this weighting mechanism significantly improves the inversion accuracy of underlying resistivity parameters through adaptive adjustment of feature contributions, effectively avoiding overfitting.

[0246] Contextual modeling improves parameter inversion accuracy: The Transformer encoding layer establishes cross-location feature associations in the logging sequence through a multi-head attention mechanism. Combined with the bidirectional time series modeling capabilities of the BiLSTM decoding layer, it achieves a joint analysis of the global and local features of formation parameters, realizes formation parameter inversion under anisotropic formations, and improves the accuracy of the overall model inversion.

[0247] Enhanced model convergence stability: Through the combined training optimization of the Transformer encoding layer and the BiLSTM decoding layer, combined with the gradient descent learner update amplitude, the stability of the model training process has been significantly improved. The training loss of isotropic layers is better than that of traditional LSTM models, with a reduction of 25.4% compared to LSTM. The training loss of anisotropic layers is better than that of traditional LSTM models, with a reduction of 58.8% compared to LSTM.

[0248] The accuracy of multi-parameter joint inversion meets the standard: the present invention jointly inverts key parameters such as formation boundary distance and anisotropic resistivity, and can meet certain engineering requirements for geological guidance interface positioning accuracy.

[0249] This paper proposes an intelligent inversion framework based on feature optimization and spatiotemporal feature fusion. By constructing an XGBoost feature screening module, it effectively identifies and strengthens high-contribution features, enhancing the model's ability to identify effective signals. A BiLSTM-Transformer model is constructed, using a bidirectional long short-term memory network to extract local temporal features of logging responses. Combined with the Transformer model's global attention mechanism, the spatial correlation between formation parameters is captured, achieving a joint inversion of the target layer resistivity, surrounding rock electrical parameters, and interface distance under anisotropic formation models. Experimental verification shows that this method outperforms existing deep learning in terms of inversion accuracy and computational efficiency, and achieves the inversion of the target formation resistivity, adjacent layer surrounding rock resistivity, and boundary distance under anisotropic formation models, providing a new technical path for real-time interpretation of while-drilling logging.

[0250] In the technical solution provided by the present invention, the method includes constructing an XGBoost feature screening module, and optimizing the data set through the XGBoost feature screening module to obtain an optimized data set; constructing a BiLSTM-Transformer model, and inputting the optimized data set into the model to obtain an inversion result. This method improves the inversion accuracy and computational efficiency, and realizes the inversion of the target formation resistivity and the adjacent layer surrounding rock resistivity and boundary distance under the anisotropic formation model.

[0251] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0252] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0253] Perform feature importance analysis on the original data set and select some data with higher feature importance for weighted enhancement to reduce the adverse effects of cluttered data on model training and prevent the model from overfitting.

Claims

1. A method for inversion of electromagnetic wave resistivity logging while drilling, characterized in that: The method comprises: Step 1: Build an XGBoost feature screening module and optimize the data set through the XGBoost feature screening module to obtain the optimized data set; Step 2: Build a BiLSTM-Transformer model and input the optimized dataset into the model to obtain the inversion results; The optimized data set obtained comprises: First, layered isotropic and anisotropic formation models were constructed, and resistivity parameter combinations of the target formation and surrounding rock layers were randomly generated. Then, through forward modeling, the response characteristic values ​​corresponding to the formation parameters were obtained, and a logging-while-drilling dataset containing the mapping relationship between multidimensional formation parameters and logging responses was constructed. Finally, the samples selected by the XGBoost feature screening module were normalized to obtain an optimized dataset. The step 2 includes: The Transformer model is used as the encoding layer, and it uses a multi-head attention mechanism to capture the global dependencies of the sequence in parallel. The BiLSTM model is used as the decoding layer, and it extracts local context patterns from both directions through the temporal recursion feature, combining the BiLSTM model and the Transformer model. Residual enhancement is performed in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. The filtered features are mapped to the dimension matching the BiLSTM model input through the linear layer to generate an enhanced feature vector, which is expressed as: ; in, Represents the feature vector filtered by the XGBoost feature filtering module; represents the weight matrix of the linear layer, represents the bias term of the linear layer; The original linear layer output is then weightedly fused with the enhanced feature vector to obtain the final decoding layer weighted input vector, which is expressed as: ; in, Represents the original linear layer output vector; Indicates that the XGBoost feature screening module traverses all the split nodes of the tree and accumulates the total gain of each feature; Indicates the maximum value among all total gains.

2. The method according to claim 1, characterized in that The step 1 comprises: Taking the decision tree as the basic learner, the additive model and the forward learning algorithm are used to combine multiple basic learners into a strong learner. The gradient boosting algorithm is used to construct a new decision tree by iteratively calculating the gradient and residual between the predicted value and the true value. Assuming that K decision trees are generated, the expression of their single sample output is: ; in, Indicates the The prediction function of a decision tree, is the function space; Objective function Including the loss function term and the regularization term, its expression is: ; Regularization term Defined as: ; in, Represents the number of leaf nodes in the decision tree, and ω represents the leaf weight; and λ are hyperparameters, Used to control the number of leaf nodes in the decision tree, and λ is used to control weight regularization and suppress weight overfitting; The importance of features is evaluated by node splitting gain. Each time a node splits, the feature that maximizes the information gain is selected. The expression of its gain is: ; in, , are the gradient statistics of the left and right subtrees after splitting, i.e., the first-order derivatives; , is the second-order derivative statistic; Introducing the position weight factor, the improved gain expression is: ; ; in, j ∈[1,N] represents the feature position index, j =1 indicates the most advanced feature, j =N represents the terminal feature; η represents the weight intensity coefficient, and κ represents the nonlinear adjustment factor; The higher the total gain value of a feature, the greater its contribution to the result prediction; finally, the features are sorted by gain and some features with low contribution weights are eliminated.

3. The method according to claim 1, characterized in that The Transformer model includes: The Transformer model is a sequence modeling model based on the self-attention mechanism. It consists of an encoding block and a decoding block. Each block is composed of multiple independent encoding layers or decoding layers stacked together. Each encoding layer includes a multi-head attention layer, a fully connected layer, and a normalization layer. Each decoding layer includes two multi-head attention layers. The Transformer model adopts a position encoding strategy to obtain relative position information in the input sequence and uses a multi-head attention mechanism to focus on different details in different subspaces. The Transformer model implementation is divided into the following steps: I. Input Encoding Layer: This layer introduces the input sequence information into positional encoding, enabling the Transformer model to distinguish input elements at different positions and capture the order information in the sequence. Positional encoding uses a fixed encoding of sine and cosine functions, and its expression is: ; ; in, Represents the position index, Represents the dimension index; after encoding, it is directly added to the input feature; II. Multi-head attention mechanism layer: Generate query by linear transformation of position-encoded input sequence ,key , numerical value The matrix expression is: ; in, , and represents the weight matrix; Calculate the output of the attention mechanism, which is expressed as: ; in, Display key Dimensions; The outputs of multiple attention heads are connected together, and then processed through linear transformation and activation function for parallel calculation and then spliced; assuming there is Attention heads, the output of each attention head is expressed as , the final output of the multi-head attention mechanism is: ; in, represents the linear projection matrix; III. Feedforward network and normalization layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feedforward neural network FNN; the feedforward neural network consists of two fully connected layers, with the activation function ReLU used in the middle for nonlinear transformation, and its expression is: ; in, Represents the weights of two fully connected layers; Represents the bias terms of the two fully connected layers; Finally, the residual connection is introduced to normalize the result layer after residual calculation, and normalize the hidden layer in the neural network to the standard normal distribution. The expression is: ; 。 4. The method according to claim 1, wherein The BiLSTM model includes: LSTM selects information through three gate structures: forget gate, output gate and input gate, and two basic units: memory cell state and hidden unit. At time t, LSTM receives the input vector And the output of the previous state ; First enter the forget gate and calculate the forget weight vector , whose expression is: ; in, represents the weight matrix of the forget gate, represents the bias parameter of the forget gate, Represents the activation function sigmoid; Then, the weight vector Enter the input gate and combine the output of the previous moment with the input of the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , whose expression is: ; ; in, represents the weight matrix of the input gate, Represents the bias parameter of the input gate; The weight matrix representing the cell state, Bias parameters representing cell states; Then the memory layer And memories of the past Combined, through the cell state update, output new , whose expression is: ; Finally, the activation vector Enters the output gate and is combined with the memory cell through the tanh layer Update the weights to get the current state output , whose expression is: ; ; in, represents the weight matrix of the output gate, Represents the bias parameter of the output gate; The BiLSTM model is introduced as the decoding layer. The BiLSTM model consists of two LSTM layers, forward and reverse. One layer processes the forward sequence and the other processes the reverse sequence, generating forward and reverse hidden state sequences respectively.

Citation Information

Patent Citations

  • Regional karst prediction method and system based on wide-area electromagnetic data

    CN118191919A

  • Directional electromagnetic wave resistivity apparatus and method

    US20050140373A1