While-drilling electromagnetic wave resistivity logging inversion method

Through the combination of XGBoost feature screening and BiLSTM-Transformer model, the problems of strong initial value dependence and insufficient inversion accuracy in drilling electromagnetic wave resistivity inversion are solved, and efficient and accurate inversion of anisotropic formation parameters are achieved.

CN120402054AActive Publication Date: 2025-08-01QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

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

AI Technical Summary

Technical Problem

The existing electromagnetic wave resistivity logging inversion method while drilling is highly dependent on the initial value, easily fall into the local optimal solution, it is difficult to capture the continuous changing characteristics of the formation parameters, and it is impossible to analyze the dynamic correlation between multiple parameters in the anisotropic formation. The inversion results are easily affected by the superposition of high-weight signals and weakly sensitive interference characteristics, resulting in the degradation of inversion distortion and generalization performance.

Method used

The data set is optimized by XGBoost feature screening module and combined with the BiLSTM-Transformer model for inversion. The inversion accuracy and efficiency are improved through feature screening and deep learning, and the target formation resistivity and boundary distance inversion under the anisotropic formation model are achieved.

Benefits of technology

The inversion accuracy and calculation efficiency are improved, and the target formation resistivity, adjacent surrounding rock resistivity and boundary distance in the anisotropic formation can be accurately inverted, improving the model's ability to identify formation parameters and the accuracy of inversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120402054A_ABST
    Figure CN120402054A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of logging while drilling, and particularly provides a logging while drilling electromagnetic wave resistivity logging inversion method. The method comprises the following steps: constructing an XGBoost feature screening module, and optimizing a data set through the XGBoost feature screening module to obtain an optimized data set; according to the method, a BiLSTM-Transformer model is constructed, an optimized data set is input into the model, an inversion result is obtained, the inversion precision and the calculation efficiency are improved, and inversion of the target stratum resistivity, the adjacent layer surrounding rock resistivity and the boundary distance under the anisotropic stratum model is achieved.
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 particularly to a method for inverting electromagnetic wave resistivity logging while drilling. Background Art

[0002] At present, with the substantial increase in the demand for oil resources and the exploration difficulty, the traditional detection methods and instruments can no longer meet the industrial requirements for obtaining oil resources. In view of the above situation, logging while drilling has become an important means to solve the evaluation of various logging models such as highly deviated wells, horizontal wells, and sidetracking in small holes. The response signal of electromagnetic wave logging while drilling not only contains formation resistivity information but also can reflect the relative position of the instrument. However, information such as the resistivity of the target formation, the resistivities of the upper and lower surrounding rocks, and the boundary distance cannot be directly obtained and need to be obtained through inversion processing of the original data. Accurately and quickly inverting the logging while drilling data is of great significance for guiding the accurate movement of the drill string in the reservoir and further improving the oil and gas recovery rate.

[0003] The commonly used method for inverting electromagnetic wave resistivity logging while drilling is the non-linear iterative method. This type of method first needs to set an initial model, and repeatedly uses the iterative algorithm to reduce the error between the inverted formation information and the real formation information, and continuously updates the inversion model according to the error until the convergence requirement is met. This type of method is highly dependent on the initial value. If the initial value deviates far from the true solution, it may lead to iterative divergence or a sudden drop in the convergence speed, and it is easy to fall into a local optimal solution. Especially when there are multiple extreme points in the objective function, the algorithm may not be able to jump out of the current area to find the global optimum.

[0004] In recent years, the development of deep learning technology has attracted wide attention. Deep neural networks have a strong representation ability for complex structures. Using deep learning models, the inversion of electromagnetic wave resistivity logging while drilling can be converted into a regression prediction task. However, current deep learning methods mainly face three challenges in the inversion of electromagnetic wave resistivity logging while drilling: existing methods usually use the entire logging curve as the input, but the sensitivity of the distal data to interface changes is low, resulting in the model being difficult to capture the continuous change characteristics of formation parameters and weakening the recognition ability of the target layer response; at the same time, existing models are mostly limited to isotropic formation scenarios and can only invert the longitudinal resistivity and boundary distance of the target layer and the surrounding rocks, and cannot analyze the dynamic correlations among multiple parameters such as the transverse resistivity, longitudinal resistivity, and anisotropy coefficient in anisotropic formations, resulting in insufficient inversion dimensions for complex formations; in addition, the contribution degrees of different components in the response signal to the inversion are different, and the high-weight signals and weak-sensitive interference features are superimposed on each other, which may lead to inversion distortion, local optimal solution traps, and a decline in 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, which is used to improve the inversion accuracy and calculation efficiency, and to achieve the inversion of the resistivity of the target formation, the resistivity of the adjacent formation surrounding rock and the boundary distance under the anisotropic formation model.

[0006] In a first aspect, the present invention provides a method for inversion of electromagnetic wave resistivity logging while drilling, the method comprising: Step 1, construct an XGBoost feature screening module, and optimize the data set through the XGBoost feature screening module to obtain an optimized data set; Step 2, construct a BiLSTM-Transformer model, and input the optimized data set into the model to obtain an inversion result.

[0007] Optionally, the step 1 includes: Taking the decision tree as the basic learner, using the additive model and the forward learning algorithm to combine multiple basic learners into a strong learner, adopting the gradient boosting algorithm, and constructing 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 its single-sample output is: ; Wherein, represents the prediction function of the th decision tree, is the function space; The objective function includes a loss function term and a regularization term, and its expression is: ; The regularization term is defined as: ; Wherein, represents the number of leaf nodes of the decision tree, ω represents the leaf weight; and λ are hyperparameters, is used to control the number of leaf nodes of the decision tree, and λ is used to control the weight regularization to suppress the weight overfitting; Evaluate the importance of features through the node splitting gain. Each time a node is split, select the feature that maximizes the information gain, and the expression of its gain is: ; Wherein, , are the gradient statistics of the left and right subtrees after splitting, that is, the first derivative; , is the second derivative statistic; Introduce a position weight factor, and the improved gain expression is as follows: ; ; where, j ∈[1, N] represents the feature position index, j = 1 represents the frontmost feature, j = N represents the end feature; η represents the weight strength coefficient, and κ represents the nonlinear adjustment factor; The higher the total gain value of the feature, the greater its contribution to the result prediction; finally, sort by gain and eliminate some features with low contribution weights.

[0008] Optionally, the step 2 includes: The Transformer model is used as the encoding layer to achieve parallel capture of the global dependencies of the sequence based on the multi-head attention mechanism. The BiLSTM model is used as the decoding layer to extract local context patterns bidirectionally through the temporal recursion feature, and the BiLSTM model and the Transformer model are combined; Perform residual enhancement in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. Map the filtered features to the dimension matching the input of the BiLSTM model through a linear layer to generate an enhanced feature vector, and its expression is: ; where, represents the feature vector screened by the XGBoost feature screening module; represents the weight matrix of the linear layer, represents the bias term of the linear layer; Subsequently, the original linear layer output and the enhanced feature vector are weighted and fused to obtain the final weighted input vector of the decoding layer, and its expression is: ; where, represents the original linear layer output vector; represents that the XGBoost feature screening module traverses all the split nodes of the trees and accumulates to obtain the total gain of each feature; represents the maximum value among all the total gains.

[0009] Optionally, the Transformer model includes: The Transformer model is a sequence modeling model based on the self-attention mechanism, consisting of an encoding block and a decoding block. Each block is stacked by multiple independent encoding layers or decoding layers. Each encoding layer includes a multi-head attention layer, a fully connected layer, and a normalization layer. Each decoding layer includes 2 multi-head attention layers. The Transformer model adopts a position encoding strategy to obtain the relative position information in the input sequence and focuses on different detailed information in different subspaces through the multi-head attention mechanism. The functions of the Transformer model are implemented in the following steps: Ⅰ. Input encoding layer: Introduce positional encoding into the input sequence information so that the Transformer model can distinguish input elements at different positions to capture the sequential information in the sequence. The positional encoding adopts a fixed encoding of sine and cosine functions, and its expression is: ; ; Among them, represents the position index, represents the dimension index; after encoding, it is directly added to the input features. Ⅱ. Multi-head attention mechanism layer: Generate query , key , and value matrices from the input sequence after positional encoding through linear transformation. Its expression is: ; Among them, , and represent weight matrices; Calculate the output of the attention mechanism. Its expression is: ; Among them, represents the dimension of key ; Connect the outputs of multiple attention heads together, and then process them through linear transformation and activation function for parallel calculation and then splicing. Assume there are attention heads, and the output of each attention head is expressed as . The final output of the multi-head attention mechanism is: ; Among them, represents the linear projection matrix; Ⅲ. Feed-Forward Network and Normalization Layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feed-forward neural network FNN; the feed-forward neural network consists of two fully connected layers, and the ReLU activation function is used for non-linear transformation in the middle. Its expression is: ; Among them, represents the weights of the two fully connected layers; represents the bias terms of the two fully connected layers; Finally, a residual connection is introduced, and the result after residual calculation is layer-normalized, and the hidden layer in the neural network is normalized to a standard normal distribution. Its expression is: ; .

[0010] Optionally, the BiLSTM model includes: LSTM selects information through three gate structures: the forget gate, the output gate, and the input gate, as well as two basic units: the memory cell state and the hidden unit; at time t, LSTM receives the input vector and the output of the previous time state ; First, it enters the forget gate to calculate the forget weight vector , and its expression is: ; Among them, represents the weight matrix of the forget gate, represents the bias parameter of the forget gate, represents the activation function sigmoid; Subsequently, the weight vector enters the input gate, and combines the output of the previous moment and the input of the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , and its expression is: ; ; Among them, represents the weight matrix of the input gate, represents the bias parameter of the input gate; represents the weight matrix of the cell state, represents the bias parameter of the cell state; Subsequently, the memory layer is combined with the past memory , and through cell state update, a new is output, and its expression is: ; Finally, the activation vector enters the output gate and is updated with weights with the memory cell passing through the tanh layer to obtain the output of the current state , and its expression is: ; ; where represents the weight matrix of the output gate represents the bias parameter of the output gate; Introduce the BiLSTM model as the decoding layer. The BiLSTM model consists of two layers of LSTM, forward and backward. One layer processes the forward sequence and the other layer processes the backward sequence, generating the forward and backward hidden state sequences respectively.

[0011] In the technical solution provided by the present invention, the method includes constructing an XGBoost feature screening module, 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 calculation efficiency, and realizes the inversion of the target formation resistivity, the resistivity of adjacent formation surrounding rock and the boundary distance under the anisotropic formation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0013] Figure 1 is a flowchart of the method for inversion of electromagnetic wave resistivity logging while drilling provided by the embodiment of the present invention; Figure 2 is an architecture diagram of the BiLSTM-Transformer model provided by the embodiment of the present invention; Figure 3 is a schematic diagram of the multi-head attention layer provided by the embodiment of the present invention; Figure 4 is an architecture diagram of the LSTM network provided by the embodiment of the present invention; Figure 5 is an architecture diagram of the BiLSTM model provided by the embodiment of the present invention; Figure 6 is a schematic diagram of the isotropic formation model provided by the embodiment of the present invention; Figure 7Schematic diagram of the anisotropic formation model provided by the embodiments of the present invention; Figure 8a Upper resistivity inversion result of the LSTM model in the isotropic formation provided by the embodiments of the present invention; Figure 8b Current resistivity inversion result of the LSTM model in the isotropic formation provided by the embodiments of the present invention; Figure 8c Lower resistivity inversion result of the LSTM model in the isotropic formation provided by the embodiments of the present invention; Figure 9a Upper resistivity inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiments of the present invention; Figure 9b Current resistivity inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiments of the present invention; Figure 9c Lower resistivity inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiments of the present invention; Figure 10a Upper resistivity inversion result of the model combining XGBoost and BiLSTM-Transformer in the isotropic formation provided by the embodiments of the present invention; Figure 10b Current resistivity inversion result of the model combining XGBoost and BiLSTM-Transformer in the isotropic formation provided by the embodiments of the present invention; Figure 10c Lower resistivity inversion result of the model combining XGBoost and BiLSTM-Transformer in the isotropic formation provided by the embodiments of the present invention; Figure 11a Upper boundary distance inversion result of the LSTM model in the isotropic formation provided by the embodiments of the present invention; Figure 11b Lower boundary distance inversion result of the LSTM model in the isotropic formation provided by the embodiments of the present invention; Figure 12a Upper boundary distance inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiments of the present invention Figure 12b Lower boundary distance inversion result of the BiLSTM-Transformer model in the isotropic formation provided by the embodiments of the present invention Figure 13aInversion results of the upper boundary distance of the XGBoost combined with BiLSTM-Transformer model in an isotropic formation provided by the embodiments of the present invention; Figure 13b Inversion results of the lower boundary distance of the XGBoost combined with BiLSTM-Transformer model in an isotropic formation provided by the embodiments of the present invention; Figure 14a Inversion results of the upper horizontal resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 14b Inversion results of the current layer horizontal resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 14c Inversion results of the lower horizontal resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 15a Inversion results of the upper vertical resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 15b Inversion results of the current layer vertical resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 15c Inversion results of the lower vertical resistivity of the LSTM model in an anisotropic formation provided by the embodiments of the present invention; Figure 16a Inversion results of the upper horizontal resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 16b Inversion results of the current layer horizontal resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 16c Inversion results of the lower horizontal resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 17a Inversion results of the upper vertical resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 17b Inversion results of the current layer vertical resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 17c Inversion results of the lower vertical resistivity of the BiLSTM-Transformer model in an anisotropic formation provided by the embodiments of the present invention; Figure 18aThe inversion results of the upper horizontal resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 18b The inversion results of the current layer horizontal resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 18c The inversion results of the lower horizontal resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 19a The inversion results of the upper vertical resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 19b The inversion results of the current layer vertical resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 19c The inversion results of the lower vertical resistivity of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 20a The inversion results of the upper boundary distance of the LSTM model in the anisotropic formation provided by the embodiments of the present invention; Figure 20b The inversion results of the lower boundary distance of the LSTM model in the anisotropic formation provided by the embodiments of the present invention; Figure 21a The inversion results of the upper boundary distance of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 21b The inversion results of the lower boundary distance of the BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 22a The inversion results of the upper boundary distance of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention; Figure 22b The inversion results of the lower boundary distance of the XGBoost combined with BiLSTM-Transformer model in the anisotropic formation provided by the embodiments of the present invention. Detailed implementation manners

[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0015] It should be clear that the described embodiments are only some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

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

[0017] It should be understood that the term " / and / " used herein is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, a and / or b may represent: a exists alone, a and b exist simultaneously, and b exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0018] Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" may be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".

[0019] Figure 1 The flowchart of the method for inversion of electromagnetic wave resistivity logging while drilling provided for the embodiments of the present invention is as Figure 1 shown, and the method includes: Step 1: Construct an XGBoost feature screening module, and optimize the data set through the XGBoost feature screening module to obtain an optimized data set; Step 2: Construct a BiLSTM-Transformer model, and input the optimized data set into the model to obtain an inversion result.

[0020] In the embodiments of the present invention, first, a layered isotropic and anisotropic formation model is constructed, and resistivity parameter combinations of the target formation and the surrounding rock formation are randomly generated; subsequently, response eigenvalues under corresponding formation parameters are obtained through forward simulation, and a logging-while-drilling dataset including the mapping relationship between multi-dimensional formation parameters and logging responses is constructed; finally, the samples selected by the XGBoost feature screening module are normalized, and the optimized dataset is used as the input of the BiLSTM-Transformer model, with formation parameters and boundary distance as the output targets, and end-to-end inversion calculation is realized through the training of the BiLSTM-Transformer model.

[0021] In the embodiments of the present invention, an XGBoost feature screening module is introduced to analyze the feature importance of the original dataset, and a part of the data with higher feature importance is selected for weighted enhancement to reduce the adverse effects of clutter data on model training and prevent the model from overfitting.

[0022] In the embodiments of the present invention, step 1 includes: Taking decision trees as basic learners, using the additive model and the forward learning algorithm to combine multiple basic learners into a strong learner, adopting the gradient boosting algorithm, and constructing 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 its single-sample output is: ; Among them, represents the prediction function of the th decision tree, is the function space; The objective function includes a loss function term and a regularization term, and its expression is: ; The regularization term is defined as: ; Among them, represents the number of leaf nodes of the decision tree, ω represents the leaf weight; and λ are hyperparameters, is used to control the number of leaf nodes of the decision tree, and λ is used to control weight regularization and suppress weight overfitting; The importance of features is evaluated through the node splitting gain. Each time a node is split, the feature that maximizes the information gain is selected, and the expression of its gain is: ; Among them, , They are the gradient statistics of the left and right subtrees after splitting, i.e., the first-order derivatives. , is the second-order derivative statistic; Introduce a position weight factor to make the features near the formation boundary obtain a higher gain weight during splitting, so as to preferentially select key features for splitting. The improved gain expression is: ; ; Among them, j ∈[1,N] represents the feature position index, j =1 represents the foremost feature, j =N represents the terminal feature; η represents the weight strength coefficient, and κ represents the nonlinear adjustment factor; The higher the total gain value of the feature, the greater its contribution to the result prediction; finally, sort by gain and eliminate some features with low contribution weights.

[0023] In the embodiment of the present invention, as Figure 2 shown, step 2 includes: The Transformer model serves as the encoding layer, which realizes parallel capture of the global dependencies of the sequence based on the multi-head attention mechanism, stabilizes the feature distribution through layer normalization, and enhances the nonlinear representation ability with the help of the feed-forward neural network (FNN); the BiLSTM model serves as the decoding layer, which extracts local context patterns bidirectionally through the temporal recursion characteristic. Combining 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 the long-distance formation interface; finally, the output result is obtained through the fully connected layer.

[0024] Perform residual enhancement in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. Map the screened features to the dimension matching the input of the BiLSTM model through the linear layer to generate an enhanced feature vector, and its expression is: ; Among them, represents the feature vector screened by the XGBoost feature screening module; represents the weight matrix of the linear layer, represents the bias term of the linear layer; Subsequently, perform weighted fusion on the output of the original linear layer and the enhanced feature vector to obtain the final weighted input vector of the decoding layer, and its expression is: ; Among them, represents the output vector of the original linear layer; It means that the XGBoost feature screening module traverses all the split nodes of the trees and accumulates to obtain the total gain of each feature; It represents the maximum value among all the total gains.

[0025] The present invention simultaneously deeply excavates the spatio-temporal correlation characteristics of the logging-while-drilling response sequence, and better utilizes the data characteristics of the response sequence to improve the accuracy and speed of the inversion of logging-while-drilling data.

[0026] In the embodiment of the present invention, the Transformer model includes: The Transformer model is a sequence modeling model based on the self-attention mechanism, which is composed of an encoding block and a decoding block. Each block is stacked by a plurality of 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 2 multi-head attention layers; the Transformer model adopts a position encoding strategy to obtain the relative position information in the input sequence, and realizes the attention to different detailed information in different subspaces through the multi-head attention mechanism; as Figure 3 shown, the multi-head attention mechanism transforms the input sequence through three fully connected layers to generate matrices of query (Query, Q), key (Key, K), and value (Value, V). Each sub-matrix captures the features of different subspaces through the scaled dot-product attention mechanism, and finally outputs and splices all the attention heads, and integrates the final output through a fully connected layer.

[0027] The functions of the Transformer model are implemented in the following steps: Ⅰ. Input encoding layer: Introduce position encoding into the input sequence information, so that the Transformer model can distinguish the input elements at different positions to capture the order information in the sequence; the position encoding adopts a fixed encoding of sine and cosine functions, and its expression is: ; ; Among them, represents the position index, represents the dimension index; after encoding, it is directly added to the input feature; Ⅱ. Multi-head attention mechanism layer: Generate matrices of query (Query, Q), key (Key, K), and value (Value, V) by linearly transforming the input sequence after position encoding, and its expression is: ; Among them, , and represents the weight matrix; Calculate the output of the attention mechanism, and its expression is: ; Among them, represents the key dimension of; Connect the outputs of multiple attention heads together, and then process them through linear transformation and activation function for parallel calculation and then splicing; assume there are attention heads, and the output of each attention head is expressed as , and the final output of the multi-head attention mechanism is: ; Among them, represents the linear projection matrix; III. Feed-forward network and normalization layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feed-forward neural network FNN; the feed-forward neural network consists of two fully connected layers, and the activation function ReLU is used for nonlinear transformation in the middle, and its expression is: ; Among them, represents the weights of the two fully connected layers; represents the bias terms of the two fully connected layers; Finally, introduce residual connection, normalize the result layer after residual calculation, and normalize the hidden layer in the neural network to a standard normal distribution, and its expression is: ; .

[0028] In the embodiment of the present invention, the BiLSTM model includes: By introducing special memory units and gating mechanisms, the LSTM network can effectively handle the problems of gradient disappearance and gradient explosion in long time series, and its structure is as Figure 4 shown. The LSTM selects information through three gate structures: the forget gate, the output gate, and the input gate, and two basic units: the memory cell state and the hidden unit. At time t, the LSTM receives the input vector and the output of the previous time state; first enter the forget gate and calculate the forget weight vector , and its expression is: ; Among them, represents the weight matrix of the forget gate, represents the bias parameter of the forget gate, It represents the sigmoid activation function; the mechanism of the input gate lies in precisely controlling the importance of the output data at the previous moment, combining the output at the previous moment with the input at the current moment, and mapping the result between 0 and 1 through the sigmoid function.

[0029] Subsequently, the weight vector enters the input gate, and combines the output at the previous moment with the input at the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , and its expression is: ; ; Among them, represents the weight matrix of the input gate, represents the bias parameter of the input gate; represents the weight matrix of the cell state, represents the bias parameter of the cell state; Subsequently, the memory layer is combined with the past memory , and through cell state update, a new is output, and its expression is: ; Finally, the activation vector enters the output gate, and performs weight update with the memory cell passing through the tanh layer to obtain the current state output , and its expression is: ; ; Among them, represents the weight matrix of the output gate, represents the bias parameter of the output gate; Introduce the BiLSTM model as the decoding layer. As Figure 5 shown, the BiLSTM model consists of two layers of LSTM, forward and backward. One layer processes the forward sequence, and the other layer processes the backward sequence, generating forward and backward hidden state sequences respectively.

[0030] In the embodiments of the present invention, formation parameters and data sets are constructed, and as Figure 6 and Figure 7The shown layered isotropic and anisotropic formation models, the resistivity R of each layer in the isotropic formation model, the horizontal resistivity Rh and the vertical resistivity Rv of each layer in the anisotropic formation model, as well as the formation thickness H and the well deviation angle α are randomly selected. The value range of the formation thickness H is set to (4m, 6m), and the value range of the well deviation angle α is set to (30°, 60°). The selected response signals are as follows: ; ; ; ; ; Among them, to represent five response signals selected for constructing the data set; in the coiled tubing logging tool coordinate system , a tool with three-direction unit magnetic moment emission - three-direction unit magnetic moment reception is set, and the received signal voltage has a total of 9 components, represents m the voltage signal received when the unit magnetic moment in the n direction emits; the 9 components include all the emission-reception combinations in the three-dimensional axial directions; In the embodiments of the present invention, the propagation of electromagnetic waves in a medium satisfies the differential form of Maxwell's equations, and its expression is: ; Among them, is the magnetic field strength, is the electric field strength, is the magnetic induction intensity, is the electric displacement vector, is the conduction current density; the diameter of the transmitting coil in coiled tubing logging can be ignored relative to the coil source distance, which is equivalent to a magnetic dipole source, and a time-harmonic current source is used during measurement. In a TI formation, the time-harmonic Maxwell's equations are expressed as: ; Among them, is the conductivity tensor, is the externally applied magnetic current source, is the vacuum permeability; Using the Hertz potential theory, the Hertz vector potential and the scalar potential satisfy: ; Among them, and They are the horizontal and vertical conductivity components respectively. Substituting this equation into the above equation and transforming it into the cylindrical coordinate system, we can obtain: ; Find the vertical component of the electromagnetic field in each layer of the two-dimensional TI formation model, obtain the horizontal component, and then solve the entire wave field; Solve the electromagnetic field in the horizontal layered model by the following recurrence formula: ; In the geodetic coordinate system of the triaxial instrument axis, the logging response of the triaxial electromagnetic wave logging can be described by the magnetic field tensor, and the expression of the magnetic field component of the nth layer can be written. The expression of the magnetic field tensor of all 9 components comprehensively represented in the x-z and y-z planes is: ; ; ; ; ; ; ; ; ; Since it is stipulated in the electromagnetic wave logging that both the transmitting magnetic moment intensity and the receiving magnetic moment intensity are 1, there is a relationship: ; Among them, is the imaginary unit, is the working angular frequency of the instrument, is the area of the receiving coil; From the above content, 9 components can be obtained.

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

[0032] Comparison and analysis of the training results of the present invention: For the inversion problems of isotropic and anisotropic formations, the present invention uniformly sets the model training parameters through traversal optimization: learning rate 0.0001, batch size 512, and training cycles 500. By comparing the performance of different deep learning architectures under the same experimental conditions, the system evaluates key indicators such as model convergence (loss function, Loss), prediction accuracy (root mean square error, RMSE), and goodness of fit (coefficient of determination, ), etc. The detailed comparison data is shown in Table 1-2.

[0033] Table 1 Inversion training loss parameters for isotropic formations ; Table 2 Inversion training loss parameters for anisotropic formations ; As can be seen from Table 1 and Table 2, the XGBoost combined with BiLSTM-Transformer model proposed by the present invention shows significant advantages in both inversion accuracy and training efficiency. Experimental data shows that this method obtains =0.9638, Loss = 0.0652, and RMSE = 0.2072 as the global optimal solution in isotropic formations. Compared with the traditional LSTM model, it has a 4.1% increase, a 26.4% decrease in Loss, and a 19.3% reduction in RMSE; in more challenging anisotropic formations, its performance is still superior, with an increase to 0.9684, and Loss and RMSE are reduced to 0.0614 and 0.1957 respectively. Compared with the traditional LSTM model, it has a 7.2% increase, a 58.8% decrease in Loss, and a 43.7% reduction in RMSE.

[0034] Therefore, it can be clearly seen from the training results that the training results of the XGBoost combined with BiLSTM-Transformer model are generally superior to those of the other two deep learning models.

[0035] Comparison of resistivity inversion results of the present invention: Using the trained LSTM, BiLSTM-Transformer, and XGBoost combined with BiLSTM-Transformer models, the resistivity and boundary distance are inverted respectively under isotropic and anisotropic formations, and the results are as Figures 8a to 22b shown; at the same time, percentage error analysis is performed on the most important resistivity inversion results, and the results are shown in Tables 3 - 5.

[0036] Table 3 Relative errors of resistivity inversion in isotropic formations ; Table 4 Relative error of horizontal resistivity inversion in anisotropic formations ; Table 5 Relative error of vertical resistivity inversion in anisotropic formations 。

[0037] Analysis of inversion results: The present invention realizes a systematic breakthrough in the inversion performance of multi-dimensional formation parameters by integrating the XGBoost feature selection mechanism and the BiLSTM-Transformer deep learning architecture. Compared with traditional methods, this fusion model exhibits multi-scale optimization characteristics: for resistivity parameters at different depths, in the inversion of basic parameters such as upper and middle layer resistivity and formation boundary distance, the model further improves the fineness of parameter estimation based on existing advantages; especially for inversion parameters with predictability such as lower layer resistivity, its inversion accuracy has been significantly improved.

[0038] The integrated XGBoost feature selection mechanism and BiLSTM-Transformer deep learning architecture proposed by the present invention have the following advantages and effects: Model optimization based on feature screening: By quantifying the importance of features through the XGBoost feature screening module, dynamically weighting and enhancing high-discrimination features, and strengthening the contribution weight of key parameters in model training. This method retains the integrity of the original data information while reducing the implicit interference of irrelevant features through a weight decay strategy, enhancing the model's focusing ability on resistivity parameter-sensitive features. Experiments show that this weighting mechanism significantly improves the inversion accuracy of lower layer resistivity parameters through the adaptive adjustment of feature contribution degrees and effectively avoids overfitting.

[0039] Context modeling improves parameter inversion accuracy: The Transformer encoding layer establishes cross-position feature associations of logging sequences through the multi-head attention mechanism, combined with the bidirectional time series modeling ability of the BiLSTM decoding layer, to achieve joint parsing of global and local features of formation parameters, realize the inversion of formation parameters under anisotropic formations, and improve the accuracy of the overall model inversion to a certain extent.

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

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

[0042] The present invention proposes an intelligent inversion framework based on feature optimization and spatio-temporal 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. The bidirectional long short-term memory network is used to extract local temporal features of well logging responses, and the global attention mechanism of the Transformer model is combined to capture the spatial correlation between formation parameters, realizing the joint inversion of the resistivity of the target layer, the electrical parameters of the surrounding rock, and the interface distance under the anisotropic formation model. Experimental verification shows that this method is superior to existing deep learning in terms of inversion accuracy and calculation efficiency, and realizes the inversion of the resistivity of the target formation, the resistivity of the adjacent layer surrounding rock, and the boundary distance under the anisotropic formation model, providing a new technical path for real-time interpretation of logging while drilling.

[0043] 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 calculation efficiency, and realizes the inversion of the resistivity of the target formation, the resistivity of the adjacent layer surrounding rock, and the boundary distance under the anisotropic formation model.

[0044] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0045] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

[0046] Conduct 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 messy 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 includes: Step 1: Construct an XGBoost feature screening module, and optimize the dataset through the XGBoost feature screening module to obtain an optimized dataset; Step 2: Construct a BiLSTM-Transformer model, and input the optimized dataset into the model to obtain an inversion result.

2. The method according to claim 1, characterized in that, The said Step 1 includes: Taking decision trees as basic learners, using the additive model and the forward learning algorithm to combine multiple basic learners into a strong learner, adopting the gradient boosting algorithm, and constructing 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 its single-sample output is: ; Among them, represents the prediction function of the th decision tree, is the function space; Objective function It includes a loss function term and a regularization term, and its expression is: ; Regularization term is defined as: ; Among them, represents the number of leaf nodes of the decision tree, and ω represents the leaf weights; and λ are hyperparameters, used to control the number of leaf nodes of the decision tree, and λ is used to control weight regularization to suppress weight overfitting; Evaluating the importance of features through the node split gain. Each time a node is split, select the feature that maximizes the information gain, and its gain expression is: ; Among them, , are the gradient statistics of the left and right subtrees after splitting, that is, the first-order derivatives; , is the second-order derivative statistic; Introduce a position weight factor, and the improved gain expression is: ; ; Among them, j ∈[1,N] represents the feature position index, j = 1 represents the most front-end feature, j = N represents the end feature; η represents the weight strength coefficient, and κ represents the non-linear adjustment factor; The higher the total gain value of a feature, the greater its contribution to the result prediction; finally, sort by gain and remove some features with low contribution weights.

3. The method according to claim 1, wherein The said Step 2 includes: The Transformer model is used as the encoding layer, which realizes parallel capture of the global dependencies of the sequence based on the multi-head attention mechanism. The BiLSTM model is used as the decoding layer, which extracts local context patterns bidirectionally through the time-series recursion feature, and combines the BiLSTM model and the Transformer model; Perform residual enhancement in the encoding layer of the multi-head attention mechanism and the decoding layer of the BiLSTM model. Map the screened features to the dimension matching the input of the BiLSTM model through a linear layer to generate an enhanced feature vector, and its expression is: ; Among them, represents the feature vector screened by the XGBoost feature screening module; represents the weight matrix of the linear layer, represents the bias term of the linear layer; Subsequently, perform weighted fusion on the output of the original linear layer and the enhanced feature vector to obtain the final weighted input vector of the decoding layer, and its expression is: ; Among them, represents the output vector of the original linear layer; represents that the XGBoost feature screening module traverses all the split nodes of the trees and accumulates to obtain the total gain of each feature; represents the maximum value among all the total gains.

4. The method according to claim 3, wherein The said Transformer model includes: The Transformer model is a sequence modeling model based on the self-attention mechanism, composed of an encoding block and a decoding block. Each block is stacked by multiple independent encoding layers or decoding layers; Each encoding layer includes a multi-head attention layer, a fully connected layer, and a normalization layer; Each decoding layer includes 2 multi-head attention layers; The Transformer model adopts a position encoding strategy to obtain the relative position information in the input sequence, and realizes paying attention to different detailed information in different subspaces through the multi-head attention mechanism; The functions of the Transformer model are divided into the following steps: Ⅰ. Input encoding layer: Introduce position encoding into the input sequence information so that the Transformer model can distinguish input elements at different positions to capture the sequential information in the sequence; The position encoding adopts a fixed encoding of sine and cosine functions, and its expression is: ; ; Among them, represents a position index, represents a dimension index; it is directly added to the input feature after encoding; II. Multi-Head Attention Mechanism Layer: Generate queries, keys, and values matrices for the input sequence after positional encoding through linear transformation. The expression is as follows: keys and values ; Among them, , and represent weight matrices; Calculate the output of the attention mechanism, and its expression is: ; Among them, represents the key dimension; Concatenate the outputs of multiple attention heads, and then process them through linear transformation and activation functions for parallel computing before splicing; Suppose there are attention heads, and the output of each attention head is represented as , the final output of the multi-head attention mechanism is: ; Among them, represents a linear projection matrix; Ⅲ. Feed-forward network and normalization layer: After the output of the multi-head self-attention mechanism, each encoder layer includes a feed-forward neural network FNN; The feed-forward neural network consists of two fully connected layers, and the activation function ReLU is used for non-linear transformation in the middle, and its expression is: ; Among them, represents the weights of two fully connected layers; represents the bias terms of two fully connected layers; Finally, introduce a residual connection, normalize the result layer after residual calculation, and normalize the hidden layer in the neural network to a standard normal distribution. Its expression is: ; 。 5. The method according to claim 3, wherein The BiLSTM model described above includes: LSTM selects information through three gate structures: the forget gate, the output gate, and the input gate, as well as two basic units: the memory cell state and the hidden unit. At time t, LSTM receives the input vector and the output of the previous time step ; first, it enters the forget gate to calculate the forget weight vector , and its expression is: ; Among them, represents the weight matrix of the forgetting gate, represents the bias parameter of the forgetting gate, represents the activation function sigmoid; Subsequently, the weight vector enters the input gate and combines the output of the previous moment and the input of the current moment to create a new memory layer through the hyperbolic tangent function tanh layer , and its expression is: ; ; Among them, represents the weight matrix of the input gate, represents the bias parameter of the input gate; represents the weight matrix of the cell state, represents the bias parameter of the cell state; Subsequently, the memory layer Combined with past memories Through cell state updates, new is output, and its expression is: ; Finally, the activation vector enters the output gate and undergoes weight update with the memory cell passing through the tanh layer to obtain the output of the current state , and its expression is: ; ; Among them, represents the weight matrix of the output gate, represents the bias parameter of the output gate; Introduce the BiLSTM model as the decoding layer. The BiLSTM model consists of two layers of LSTM, forward and backward. One layer processes the forward sequence, and the other layer processes the backward sequence, generating forward and backward hidden state sequences respectively.

Citation Information

Patent Citations

  • Coding method and device for while-drilling azimuth electromagnetic wave boundary detection signal

    CN113803061A

  • Intelligent tunnel surrounding rock parameter inversion analysis method based on XGBoost optimization algorithm

    CN114943125A

  • While-drilling azimuth electromagnetic wave logging data inversion method based on Unet convolutional neural network

    CN115795994A

  • While-drilling azimuth electromagnetic wave resistivity inversion method based on deep learning

    CN117744505A

  • While-drilling azimuth electromagnetic wave logging inversion method and system combining residual neural network and L-M algorithm

    CN118171582A

Cited By

  • Soil moisture content prediction method and system based on BiLSTM-Transform dynamic weight hybrid architecture

    CN120597733A

  • Deep learning inversion method combined with multi-scale decomposition

    CN122362524A

  • A deep learning inversion method combined with multiscale decomposition

    CN122362524B