Convolutional neural network-based identification method for electromagnetic wave resistivity signals while drilling
By using a convolutional neural network-based method, accurate identification and correction of electromagnetic resistivity signals in complex downhole environments were achieved, solving the problem of insufficient identification accuracy in existing technologies and improving the accuracy and stability of geological guidance.
Patent Information
- Application Number
- CN202611551922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-09
- Publication Date
- 2026-11-06
AI Technical Summary
Existing methods for processing electromagnetic resistivity signals while drilling are difficult to accurately identify and correct in complex environments such as high temperatures, vibrations, and shocks downhole, resulting in insufficient geological guidance accuracy. Furthermore, existing neural network schemes fail to effectively decouple electromagnetic wave characteristics from environmental interference characteristics and do not incorporate lightweight design for instrument computing power and storage resources.
A convolutional neural network-based approach is adopted. By acquiring multi-source synchronous data, performing frame-by-frame processing and time-frequency transformation, enhancing training samples are constructed and a dual-branch convolutional neural network is trained. This decouples electromagnetic wave features from environmental interference features, performs lightweight processing, and outputs environmental interference correction features to correct the resistivity signal.
It improves the accuracy and stability of identification of electromagnetic resistivity signals during drilling in complex downhole environments, meets the requirements of real-time processing, and enhances signal reliability and geological guidance accuracy through closed-loop compensation.
Smart Images

Figure CN123049062A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logging while drilling technology, and more specifically, to a method for identifying electromagnetic resistivity signals while drilling based on convolutional neural networks. Background Technology
[0002] In oil and gas drilling, electromagnetic resistivity logging while drilling (WSLD) is a crucial technique for obtaining formation resistivity information and supporting geological steering. The WSLD instrument transmits electromagnetic waves and receives formation echo signals, which are then amplified and demodulated to obtain amplitude and phase signals reflecting the formation resistivity characteristics. However, WSLD instruments operate for extended periods in complex downhole environments characterized by high temperatures, strong vibrations, and shocks. High temperatures can cause parameter drift in electronic components, leading to gradual signal shifts; vibrations and shocks can introduce transient distortions. These environmental interferences couple with the acquired signals, causing the formation electromagnetic wave characteristics and environmental interference characteristics to overlap, resulting in deviations in resistivity interpretation and affecting the accuracy of geological steering.
[0003] Existing methods for processing electromagnetic resistivity signals while drilling typically employ fixed temperature compensation tables or empirical correction coefficients to correct acquired signals. These methods struggle to adapt to complex working conditions where environmental factors such as downhole temperature, vibration, and shock are coupled and their correction accuracy is limited. Furthermore, existing methods generally lack reliability evaluation of correction results and adaptive adjustment mechanisms for acquisition parameters related to reliability. Using fixed front-end parameters for signal acquisition under complex conditions can easily lead to unreliable resistivity data being used in geological guidance decisions. In addition, some neural network-based processing schemes use a single network to simultaneously extract electromagnetic wave features and environmental interference features, resulting in insufficient feature decoupling capabilities. Moreover, they lack lightweight design considerations for the limited computing and storage resources of drilling instruments, making them unsuitable for real-time deployment.
[0004] In summary, how to accurately identify and effectively correct electromagnetic resistivity signals during drilling under complex environmental interference conditions such as high temperature, vibration, and shock in downhole, improve the reliability of identification results, and meet the real-time processing and deployment requirements of drilling instruments has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] To overcome a series of shortcomings in existing technologies, the purpose of this application is to provide a method for identifying electromagnetic resistivity signals during drilling based on convolutional neural networks, comprising the following steps: The amplitude and phase signals of electromagnetic waves while drilling, as well as downhole temperature, vibration and impact signals, are acquired and time-aligned to obtain multi-source synchronous data. Multi-source synchronous data is processed by framing, and the framing data is subjected to time-frequency transformation and channel fusion to obtain multi-source feature tensors; Based on known formation resistivity data, enhanced training samples were constructed by combining different temperature conditions, different vibration conditions and different impact conditions. The enhanced training samples were then used to train a dual-branch convolutional neural network. The trained dual-branch convolutional neural network was then lightweighted to obtain a resistivity signal recognition model. The multi-source feature tensor is input into the resistivity signal recognition model, and the environmental interference correction feature is output. Based on the environmental interference correction feature, the corrected amplitude resistivity, the corrected phase resistivity, and the signal reliability are obtained.
[0006] In some embodiments, the method for constructing enhanced training samples is as follows: Obtain the original training signal corresponding to the known formation resistivity data; Within a preset temperature range, multiple simulated temperature conditions are set according to a preset temperature step size, and the amplitude drift bias and phase drift bias corresponding to each simulated temperature condition are determined based on the instrument's temperature drift characteristic curve. A simulated temperature change sequence is generated based on a preset temperature change rate, and the amplitude drift bias, phase drift bias, and simulated temperature change sequence are superimposed on the original training signal to obtain a temperature-enhanced sample. Based on the vibration amplitude range and dominant frequency distribution characteristics corresponding to normal drilling, skip drilling, and stick-slip conditions, simulated vibration signals are generated. The amplitude perturbation component and phase perturbation component are extracted from the simulated vibration signal, and then superimposed on the corresponding time position in the temperature enhancement sample to obtain the temperature-vibration composite enhancement sample. Based on the peak amplitude, duration and decay rate of the impact corresponding to the obstruction, jamming and collision conditions, a simulated impact signal is constructed. Amplitude transient distortion components and phase transient distortion components are generated based on the simulated impact signal, and then superimposed on the corresponding time positions in the temperature-vibration composite enhancement sample to obtain the temperature-vibration-impact composite enhancement training sample. The original training signal, temperature-enhanced samples, temperature-vibration composite enhanced samples, and temperature-vibration-shock composite enhanced training samples are divided into training set, validation set, and test set according to a preset ratio.
[0007] In some embodiments, the dual-branch convolutional neural network includes an electromagnetic wave feature extraction branch, an environmental interference feature extraction branch, and a feature fusion layer, wherein: The electromagnetic wave feature extraction branch takes the amplitude feature channel and phase feature channel corresponding sub-tensors in the multi-source feature tensor as input, and is composed of sequentially connected convolutional layers, batch normalization layers and activation layers, and is used to extract electromagnetic wave propagation features that characterize the formation resistivity. The environmental interference feature extraction branch takes the sub-tensors corresponding to the temperature feature channel, vibration feature channel and impact feature channel in the multi-source feature tensor as input, and adopts a different number of network layers and convolution parameter configuration than the electromagnetic wave feature extraction branch, in order to extract the temporal variation features corresponding to environmental interference factors. The electromagnetic wave feature extraction branch and the environmental disturbance feature extraction branch are set independently and their parameters are not shared. They extract features of electromagnetic response features and environmental disturbance features respectively. The feature fusion layer includes a cross-attention module, which generates a query vector based on the output features of the environmental interference feature extraction branch, and generates a key vector and a value vector based on the output features of the electromagnetic wave feature extraction branch. It calculates the influence weight of the environmental interference features on the electromagnetic wave features, and performs weighted correction on the electromagnetic wave features according to the influence weight. The environmental interference feature extraction branch output feature and the corrected electromagnetic wave feature are concatenated along the channel dimension and input into the fully connected layer to obtain the fused feature.
[0008] In some embodiments, the method for training a dual-branch convolutional neural network using enhanced training samples is as follows: Construct a joint loss function, which includes a resistivity regression loss term, an environmental interference label prediction loss term, and a signal credibility supervision loss term; The enhanced training samples are input into a dual-branch convolutional neural network, which outputs the corrected amplitude resistivity, the corrected phase resistivity, the environmental interference prediction result, and the signal confidence prediction result. The resistivity regression loss term is calculated based on the mean square error between the corrected amplitude resistivity and the corrected phase resistivity and the corresponding known formation resistivity. Based on the prediction error between the environmental disturbance prediction results and the corresponding temperature, vibration, and shock labels, calculate the environmental disturbance label prediction loss term; Calculate the signal credibility supervision loss term based on the cross-entropy between the signal credibility prediction result and the corresponding signal-to-noise ratio label; The resistivity regression loss term, the environmental interference label prediction loss term, and the signal credibility supervision loss term are weighted and fused according to the preset weighting coefficients to obtain the joint loss value. Based on the joint loss value, the network parameters of the dual-branch convolutional neural network are iteratively updated, and the preset weighting coefficients are adjusted according to the changes in the validation set loss. Repeat the process of sample input, joint loss calculation and network parameter update until the preset training convergence condition is met to obtain the trained dual-branch convolutional neural network.
[0009] In some embodiments, the method for lightweighting the trained dual-branch convolutional neural network is as follows: Calculate the absolute value of the batch normalized scaling factor corresponding to each channel of the convolutional layer, and use it as an indicator of channel importance; Pruning thresholds are set for the electromagnetic wave feature extraction branch and the environmental interference feature extraction branch respectively. Channels and convolution kernel parameters below the corresponding threshold are pruned according to the channel importance index. The pruning threshold for the electromagnetic wave feature extraction branch is smaller than that for the environmental interference feature extraction branch. The pruned network is fine-tuned and trained to obtain the pruned optimized network. The weight parameters and activation value distribution of the network were statistically optimized by pruning, the quantization interval and quantization bit width were determined, and quantization-aware training was performed by inserting pseudo-quantization nodes to make the network adapt to quantization error. The pruning optimization network is mapped to a fixed point based on the quantization parameters to obtain the quantized network. The network before pruning and quantization is used as the teacher network, and the quantized network is used as the student network. A distillation loss function containing hard label loss and soft label distillation loss is constructed, and the student network is trained by distillation. When the distillation training meets the preset convergence conditions, the student network is determined as a lightweight resistivity signal recognition model.
[0010] In some embodiments, the method for obtaining the corrected amplitude resistivity is as follows: Obtain the original amplitude characteristics of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; The original amplitude characteristics are weighted and corrected according to each correction coefficient to obtain the corrected amplitude characteristics after environmental interference compensation. Obtain the transmission frequency corresponding to the current electromagnetic wave amplitude signal while drilling, and call the corresponding amplitude-resistivity conversion function according to the transmission frequency. The amplitude-resistivity conversion function corresponding to each transmission frequency is pre-calibrated based on known formation resistivity data. The corrected amplitude resistivity is obtained by inputting the amplitude-resistivity conversion function into the amplitude-resistivity correction feature.
[0011] In some embodiments, the method for obtaining the corrected phase resistivity is as follows: Obtain the original phase features of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; Based on the characteristic that the phase features are sensitive to temperature changes, the correction coefficients corresponding to the temperature disturbance components are enhanced. Based on the enhanced temperature correction coefficient and the correction coefficients corresponding to the vibration interference component and the impact interference component, the original phase characteristics are weighted and corrected to obtain the corrected phase characteristics. The corrected phase characteristics are input into a phase-resistivity conversion function pre-calibrated based on known formation resistivity data to obtain the corrected phase resistivity.
[0012] In some embodiments, the method for determining signal reliability is as follows: Obtain the corrected amplitude resistivity, the corrected phase resistivity, the confidence intervals corresponding to each interference component in the environmental interference correction features, and the original signal-to-noise ratio corresponding to the current data frame; The normalized difference between the corrected amplitude resistivity and the corrected phase resistivity is calculated, and the resistivity consistency factor is determined based on the complement of the normalized difference. The environmental interference confidence factor is determined based on the confidence interval width corresponding to each interference component. The smaller the confidence interval width, the more stable the environmental interference feature prediction result, and the higher the corresponding environmental interference confidence factor. The signal quality factor is determined based on the original signal-to-noise ratio corresponding to the current data frame. The resistivity consistency factor, environmental interference confidence factor and signal quality factor are assigned corresponding weights and then weighted and fused to obtain the signal confidence within the preset value range.
[0013] In some embodiments, it also includes: Determine whether the signal reliability is less than a preset reliability threshold; If so, adjust the front-end amplification gain and filtering parameters according to the signal credibility, and re-acquire the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters and input it into the resistivity signal recognition model for re-recognition until the signal credibility is not less than the preset credibility threshold, and obtain the resistivity data after closed-loop compensation. If not, the corrected amplitude resistivity and the corrected phase resistivity will be used as the resistivity data after closed-loop compensation. The resistivity data after closed-loop compensation is fused with the well inclination data, azimuth data, and azimuth gamma data to obtain the geological steering results.
[0014] In some embodiments, the method for adjusting the front-end amplification gain and filtering parameters according to signal reliability is as follows: Set a preset secondary threshold that is lower than the preset confidence threshold, and establish a segmented mapping relationship between signal confidence and front-end amplification gain adjustment. The gain adjustment strategy is determined based on the comparison between the signal confidence level and the preset confidence level threshold and the preset secondary threshold. When the signal confidence level is lower than the preset confidence level threshold but not lower than the preset secondary threshold, the front-end amplification gain is increased based on the difference between the two. When the signal confidence level is lower than the preset secondary threshold, the gain bandwidth of the front-end amplification circuit is reduced while increasing the front-end amplification gain. The cutoff frequency of the low-pass filter is adjusted according to the intensity of the vibration interference component and the impact interference component, and the center frequency of the notch filter is adjusted according to the intensity of the temperature interference component. The gain and filter parameters are adjusted within the same control cycle, and the drilling electromagnetic wave signal is reacquired after a preset stabilization time. The reliability of the adjusted signal is determined based on the reacquired signal, and the segment mapping relationship is updated based on the gain adjustment amount and the change in reliability before and after the adjustment.
[0015] Compared with the prior art, this application has the following beneficial effects: This application combines enhanced samples from multiple sources of environmental interference (temperature, vibration, and shock) with a dual-branch convolutional neural network for electromagnetic waves / environmental interference to achieve decoupling correction of environmental interference, reliability assessment, and closed-loop compensation of front-end acquisition parameters for electromagnetic resistivity signals during drilling. This improves the accuracy and stability of resistivity identification under complex downhole conditions. Attached Figure Description
[0016] Figure 1 A flowchart illustrating the overall process of a method for identifying electromagnetic resistivity signals while drilling based on a convolutional neural network, provided in an embodiment of this application. Figure 2 A flowchart illustrating a multi-source synchronous data acquisition method provided in an embodiment of this application; Figure 3 A flowchart of a multi-source synchronous data framing and time-frequency conversion channel fusion method provided in an embodiment of this application; Figure 4 A flowchart illustrating a dual-branch convolutional neural network structure and a lightweight training method provided in an embodiment of this application; Figure 5 A flowchart of a resistivity correction and signal reliability closed-loop adjustment method provided in an embodiment of this application; Figure 6 This is a flowchart illustrating a method for fusing closed-loop compensated resistivity data with well inclination, azimuth, and azimuth gamma data, as provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some embodiments of this invention, but not all embodiments.
[0018] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The embodiments and directional terms described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0020] In a broad embodiment of the present invention, the method for identifying electromagnetic resistivity signals while drilling based on convolutional neural networks includes the following steps: The amplitude and phase signals of electromagnetic waves while drilling, as well as downhole temperature, vibration and impact signals, are acquired and time-aligned to obtain multi-source synchronous data. Multi-source synchronous data is processed by framing, and the framing data is subjected to time-frequency transformation and channel fusion to obtain multi-source feature tensors; Based on known formation resistivity data, enhanced training samples were constructed by combining different temperature conditions, different vibration conditions and different impact conditions. The enhanced training samples were then used to train a dual-branch convolutional neural network. The trained dual-branch convolutional neural network was then lightweighted to obtain a resistivity signal recognition model. The multi-source feature tensor is input into the resistivity signal recognition model, and the environmental interference correction feature is output. Based on the environmental interference correction feature, the corrected amplitude resistivity, the corrected phase resistivity, and the signal reliability are obtained. Determine whether the signal reliability is less than a preset reliability threshold; If so, adjust the front-end amplification gain and filtering parameters according to the signal credibility, and re-acquire the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters and input it into the resistivity signal recognition model for re-recognition until the signal credibility is not less than the preset credibility threshold, and obtain the resistivity data after closed-loop compensation. If not, the corrected amplitude resistivity and the corrected phase resistivity will be used as the resistivity data after closed-loop compensation. The resistivity data after closed-loop compensation is fused with the well inclination data, azimuth data, and azimuth gamma data to obtain the geological steering results.
[0021] Furthermore, the method for obtaining multi-source synchronized data is as follows: The drilling instrument transmits electromagnetic waves of a preset frequency into the formation through its transmitting antenna and obtains the echo signal through its receiving antenna. The echo signal is amplified with low noise and demodulated with quadrature to obtain in-phase and quadrature component signals. The amplitude and phase signals are then calculated based on the in-phase and quadrature component signals. Temperature, vibration, and impact signals are collected by temperature sensors, vibration sensors, and impact sensors installed at different axial positions of the downhole instrument. Based on the unified clock reference of downhole instruments, timestamps are added to amplitude signals, phase signals, temperature signals, vibration signals and impact signals, and a reference time series is constructed using the sampling times of amplitude signals and phase signals; Based on the reference time series, temperature signals, vibration signals and shock signals with sampling rates lower than the reference time series are resampled by cubic spline interpolation to obtain the corresponding resampled signals; Clock synchronization commands are sent to downhole instruments at preset time intervals, and clock deviations are determined based on the round-trip delay of the clock synchronization commands. The timestamps of each source signal are then corrected based on the clock deviations. Based on the corrected timestamps, the amplitude signal, phase signal, and resampled signal are aligned to the reference time series to obtain multi-source synchronous data.
[0022] Furthermore, the method for performing frame segmentation processing on multi-source synchronized data is as follows: Determine the frame length and initial frame shift corresponding to the multi-source synchronization data, wherein the frame length is set to 128 sampling points and the initial frame shift is set to 64 sampling points; The real-time drilling speed is obtained, and the initial frame shift is dynamically adjusted according to the real-time drilling speed to obtain the target frame shift; Based on the target frame shift, the multi-source synchronous data is divided into frames along the time axis using a sliding window method to obtain multiple continuous data frames. The Hanning window function is applied to multiple consecutive data frames to perform windowing processing, resulting in windowed multi-source data frames.
[0023] Furthermore, the method for performing time-frequency transformation and channel fusion on the framed data is as follows: Short-time Fourier transforms were performed on the data frames corresponding to amplitude signals, phase signals, and temperature signals, respectively, and the corresponding amplitude and phase spectra were extracted from the transform results. Continuous wavelet transforms based on Morlet wavelets were performed on the data frames corresponding to vibration signals and impact signals, respectively, to obtain the corresponding wavelet coefficient matrices. Based on a unified frequency axis, the amplitude spectrum, phase spectrum and wavelet coefficient matrix are resampled in the frequency dimension to make each time-frequency feature have a consistent frequency resolution, thus obtaining a multi-channel time-frequency feature matrix. The multi-channel time-frequency feature matrices are concatenated along the channel dimension to obtain the initial fused features; Global average pooling is performed on the initial fused features, and the channel weights corresponding to each channel are calculated through a fully connected layer; The channel features in the initial fusion features are weighted and corrected according to the channel weights to obtain the time-frequency features after channel fusion.
[0024] Furthermore, the multi-source feature tensor is a three-dimensional tensor structure composed of time dimension, frequency dimension and channel dimension. The time dimension is used to characterize the temporal information of each data frame, the frequency dimension is used to characterize the spectral characteristics of each source signal after time-frequency transformation, and the channel dimension includes amplitude feature channel, phase feature channel, temperature feature channel, vibration feature channel and impact feature channel in sequence.
[0025] Furthermore, the method for constructing enhanced training samples is as follows: Obtain the original training signal corresponding to the known formation resistivity data; Within a preset temperature range, multiple simulated temperature conditions are set according to a preset temperature step size, and the amplitude drift bias and phase drift bias corresponding to each simulated temperature condition are determined based on the instrument's temperature drift characteristic curve. A simulated temperature change sequence is generated based on a preset temperature change rate, and the amplitude drift bias, phase drift bias, and simulated temperature change sequence are superimposed on the original training signal to obtain a temperature-enhanced sample. Based on the vibration amplitude range and dominant frequency distribution characteristics corresponding to normal drilling, skip drilling, and stick-slip conditions, simulated vibration signals are generated. The amplitude perturbation component and phase perturbation component are extracted from the simulated vibration signal, and then superimposed on the corresponding time position in the temperature enhancement sample to obtain the temperature-vibration composite enhancement sample. Based on the peak amplitude, duration and decay rate of the impact corresponding to the obstruction, jamming and collision conditions, a simulated impact signal is constructed. Amplitude transient distortion components and phase transient distortion components are generated based on the simulated impact signal, and then superimposed on the corresponding time positions in the temperature-vibration composite enhancement sample to obtain the temperature-vibration-impact composite enhancement training sample. The original training signal, temperature-enhanced samples, temperature-vibration composite enhanced samples, and temperature-vibration-shock composite enhanced training samples are divided into training set, validation set, and test set according to a preset ratio.
[0026] Furthermore, the dual-branch convolutional neural network includes an electromagnetic wave feature extraction branch, an environmental interference feature extraction branch, and a feature fusion layer; The electromagnetic wave feature extraction branch takes the amplitude feature channel and phase feature channel corresponding sub-tensors in the multi-source feature tensor as input, and is composed of sequentially connected convolutional layers, batch normalization layers and activation layers, and is used to extract electromagnetic wave propagation features that characterize the formation resistivity. The environmental interference feature extraction branch takes the sub-tensors corresponding to the temperature feature channel, vibration feature channel and impact feature channel in the multi-source feature tensor as input, and adopts a different number of network layers and convolution parameter configuration than the electromagnetic wave feature extraction branch, in order to extract the temporal variation features corresponding to environmental interference factors. The electromagnetic wave feature extraction branch and the environmental disturbance feature extraction branch are set independently and their parameters are not shared. They extract features of electromagnetic response features and environmental disturbance features respectively. The feature fusion layer includes a cross-attention module, which generates a query vector based on the output features of the environmental interference feature extraction branch, and generates a key vector and a value vector based on the output features of the electromagnetic wave feature extraction branch. It calculates the influence weight of the environmental interference features on the electromagnetic wave features, and performs weighted correction on the electromagnetic wave features according to the influence weight. The environmental interference feature extraction branch output feature and the corrected electromagnetic wave feature are concatenated along the channel dimension and input into the fully connected layer to obtain the fused feature.
[0027] Furthermore, the method for training a two-branch convolutional neural network using augmented training samples is as follows: Construct a joint loss function, which includes a resistivity regression loss term, an environmental interference label prediction loss term, and a signal credibility supervision loss term; The enhanced training samples are input into a dual-branch convolutional neural network, which outputs the corrected amplitude resistivity, the corrected phase resistivity, the environmental interference prediction result, and the signal confidence prediction result. The resistivity regression loss term is calculated based on the mean square error between the corrected amplitude resistivity and the corrected phase resistivity and the corresponding known formation resistivity. Based on the prediction error between the environmental disturbance prediction results and the corresponding temperature, vibration, and shock labels, calculate the environmental disturbance label prediction loss term; Calculate the signal credibility supervision loss term based on the cross-entropy between the signal credibility prediction result and the corresponding signal-to-noise ratio label; The resistivity regression loss term, the environmental interference label prediction loss term, and the signal credibility supervision loss term are weighted and fused according to the preset weighting coefficients to obtain the joint loss value. Based on the joint loss value, the network parameters of the dual-branch convolutional neural network are iteratively updated, and the preset weighting coefficients are adjusted according to the changes in the validation set loss. Repeat the process of sample input, joint loss calculation and network parameter update until the preset training convergence condition is met to obtain the trained dual-branch convolutional neural network.
[0028] Furthermore, the method for lightweighting the trained dual-branch convolutional neural network is as follows: Calculate the absolute value of the batch normalized scaling factor corresponding to each channel of the convolutional layer, and use it as an indicator of channel importance; Pruning thresholds are set for the electromagnetic wave feature extraction branch and the environmental interference feature extraction branch respectively. Channels and convolution kernel parameters below the corresponding threshold are pruned according to the channel importance index. The pruning threshold for the electromagnetic wave feature extraction branch is smaller than that for the environmental interference feature extraction branch. The pruned network is fine-tuned and trained to obtain the pruned optimized network. The weight parameters and activation value distribution of the network were statistically optimized by pruning, the quantization interval and quantization bit width were determined, and quantization-aware training was performed by inserting pseudo-quantization nodes to make the network adapt to quantization error. The pruning optimization network is mapped to a fixed point based on the quantization parameters to obtain the quantized network. The network before pruning and quantization is used as the teacher network, and the quantized network is used as the student network. A distillation loss function containing hard label loss and soft label distillation loss is constructed, and the student network is trained by distillation. When the distillation training meets the preset convergence conditions, the student network is determined as a lightweight resistivity signal recognition model.
[0029] Furthermore, the environmental interference correction features include temperature interference components, vibration interference components, and impact interference components corresponding to temperature signals, vibration signals, and impact signals, respectively. Each interference component is characterized by a feature vector to represent the degree of modulation of the electromagnetic wave feature channel in the multi-source feature tensor by the corresponding environmental factor. The resistivity signal identification model determines the degree of environmental interference based on the environmental interference correction features and adjusts the confidence weight of the corresponding resistivity data in the geological guidance results according to the degree of environmental interference.
[0030] Furthermore, the method for obtaining the corrected amplitude resistivity is as follows: Obtain the original amplitude characteristics of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; The original amplitude characteristics are weighted and corrected according to each correction coefficient to obtain the corrected amplitude characteristics after environmental interference compensation. Obtain the transmission frequency corresponding to the current electromagnetic wave amplitude signal while drilling, and call the corresponding amplitude-resistivity conversion function according to the transmission frequency. The amplitude-resistivity conversion function corresponding to each transmission frequency is pre-calibrated based on known formation resistivity data. The corrected amplitude resistivity is obtained by inputting the amplitude-resistivity conversion function into the amplitude-resistivity correction feature.
[0031] Furthermore, the corrected method for obtaining the phase resistivity is as follows: Obtain the original phase features of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; Based on the characteristic that the phase features are sensitive to temperature changes, the correction coefficients corresponding to the temperature disturbance components are enhanced. Based on the enhanced temperature correction coefficient and the correction coefficients corresponding to the vibration interference component and the impact interference component, the original phase characteristics are weighted and corrected to obtain the corrected phase characteristics. The corrected phase characteristics are input into a phase-resistivity conversion function pre-calibrated based on known formation resistivity data to obtain the corrected phase resistivity.
[0032] Furthermore, the method for determining signal reliability is as follows: Obtain the corrected amplitude resistivity, the corrected phase resistivity, the confidence intervals corresponding to each interference component in the environmental interference correction features, and the original signal-to-noise ratio corresponding to the current data frame; The normalized difference between the corrected amplitude resistivity and the corrected phase resistivity is calculated, and the resistivity consistency factor is determined based on the complement of the normalized difference. The environmental interference confidence factor is determined based on the confidence interval width corresponding to each interference component. The smaller the confidence interval width, the more stable the environmental interference feature prediction result, and the higher the corresponding environmental interference confidence factor. The signal quality factor is determined based on the original signal-to-noise ratio corresponding to the current data frame. The resistivity consistency factor, environmental interference confidence factor and signal quality factor are assigned corresponding weights and then weighted and fused to obtain the signal confidence within the preset value range.
[0033] Furthermore, the method for determining the preset credibility threshold is as follows: Acquire historical drilling data and determine the formation type based on the formation resistivity variation gradient corresponding to the current well section; Based on the resistivity gradient, the stratigraphic types are divided into homogeneous stratigraphy, gradually changing stratigraphy, and abruptly changing stratigraphy. Establish a correspondence between different stratigraphic types and preset confidence thresholds, wherein the preset confidence thresholds corresponding to the homogeneous stratigraphy, the gradually changing stratigraphy, and the abruptly changing stratigraphy increase sequentially; Based on the formation type corresponding to the current depth of the downhole instrument, a preset confidence threshold corresponding to the current depth is obtained based on the correspondence.
[0034] Furthermore, the method for adjusting the front-end amplification gain and filtering parameters based on signal reliability is as follows: Set a preset secondary threshold that is lower than the preset confidence threshold, and establish a segmented mapping relationship between signal confidence and front-end amplification gain adjustment. The gain adjustment strategy is determined based on the comparison between the signal confidence level and the preset confidence level threshold and the preset secondary threshold. When the signal confidence level is lower than the preset confidence level threshold but not lower than the preset secondary threshold, the front-end amplification gain is increased based on the difference between the two. When the signal confidence level is lower than the preset secondary threshold, the gain bandwidth of the front-end amplification circuit is reduced while increasing the front-end amplification gain. The cutoff frequency of the low-pass filter is adjusted according to the intensity of the vibration interference component and the impact interference component, and the center frequency of the notch filter is adjusted according to the intensity of the temperature interference component. The gain and filter parameters are adjusted within the same control cycle, and the drilling electromagnetic wave signal is reacquired after a preset stabilization time. The reliability of the adjusted signal is determined based on the reacquired signal, and the segment mapping relationship is updated based on the gain adjustment amount and the change in reliability before and after the adjustment.
[0035] Furthermore, the method for re-acquiring and re-identifying the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters is as follows: Set the maximum number of re-identification attempts, and re-acquire the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters; The newly acquired electromagnetic wave signal while drilling is input into the resistivity signal identification model to obtain the corrected amplitude resistivity, the corrected phase resistivity, and the signal reliability. Compare the credibility of the signals corresponding to the current recognition with that of the previous recognition, and determine the next front-end parameter adjustment strategy based on the comparison result of the credibility difference and the preset improvement threshold. When the confidence difference is lower than the preset enhancement threshold, the direction of the next adjustment of the front-end amplification gain and filtering parameters will be switched to the opposite direction, and the signal acquisition and re-identification process will be repeated. The iteration stops when the cumulative number of re-identifications reaches the maximum number of re-identifications. If the signal reliability at the time of stopping is not lower than the preset reliability threshold, the corrected amplitude resistivity and the corrected phase resistivity are determined as the resistivity data after closed-loop compensation, and a finite convergence flag is set.
[0036] Furthermore, the method for fusing the closed-loop compensated resistivity data with well inclination data, azimuth data, and azimuth gamma data is as follows: The resistivity data, well inclination data, azimuth data and azimuth gamma data after closed-loop compensation are aligned according to a unified depth benchmark to obtain multi-source data after depth alignment. Identify stratigraphic interfaces based on depth-aligned azimuth gamma data and determine the depth location corresponding to the stratigraphic interfaces. Based on the response change characteristics of the depth-aligned resistivity data on both sides of the formation interface, the positional relationship of the wellbore trajectory relative to the target formation is determined. The wellbore trajectory extension direction is determined based on the depth-aligned wellbore deviation data and azimuth data, and the angle between the wellbore trajectory and the target formation is calculated based on the extension direction and the target formation strike. Based on the positional relationship of the wellbore trajectory relative to the target formation and the included angle, a fusion feature corresponding to the geological steering result is constructed.
[0037] The preferred embodiments of the present invention are described below with reference to the accompanying drawings, and the present invention will be further described in detail.
[0038] This embodiment uses a drilling electromagnetic resistivity logging operation scenario in a horizontal well in Block A of an oilfield as an example. The target formation in this section is a thin interbedded sandstone and mudstone layer. During drilling, the downhole temperature varies within the range of 95℃ to 125℃, and there are vibration conditions such as drill string jumping and stick-slip. Intermittent impacts also occur at the well bottom due to uneven local cementation of the formation. (Refer to...) Figure 1 The drilling electromagnetic resistivity signal recognition method based on convolutional neural networks provided in this embodiment includes: acquiring drilling electromagnetic wave amplitude signals, phase signals, downhole temperature signals, vibration signals, and impact signals, and performing time alignment to obtain multi-source synchronous data; performing frame processing on the multi-source synchronous data, and performing time-frequency transformation and channel fusion on the framed data to obtain multi-source feature tensors; constructing enhanced training samples based on known formation resistivity data, training a dual-branch convolutional neural network and performing lightweight processing to obtain a resistivity signal recognition model; inputting the multi-source feature tensors into the model, and outputting the corrected amplitude resistivity, corrected phase resistivity, and signal confidence; determining whether the signal confidence is less than a preset confidence threshold; if so, adjusting the front-end amplification gain and filtering parameters and re-acquiring and recognizing; otherwise, determining the current corrected result as the resistivity data after closed-loop compensation; finally, fusing the closed-loop compensated resistivity data with well deviation data, azimuth data, and azimuth gamma data to obtain geological steering results. The following is combined with... Figures 2 to 6 The document provides detailed explanations of each processing step, along with specific calculation examples.
[0039] Reference Figure 2 The transmitting antenna of the drilling instrument transmits at a preset frequency. (In this embodiment, 2MHz is used) Electromagnetic waves are emitted into the ground, and the receiving antenna acquires the echo signal after propagation through the ground; the echo signal is amplified with low noise and quadrature demodulated to obtain the in-phase component signal. ( and quadrature component signals ( The amplitude signal is calculated based on the in-phase and quadrature components. ( ) and phase signal ( Simultaneously, temperature signals were acquired at sampling rates of 10Hz, 200Hz, and 200Hz using temperature sensors, vibration sensors, and impact sensors positioned at different axial locations on the downhole instrument. ( Vibration signal ( ) and impact signal ( Since the sampling rate of amplitude and phase signals (4kHz in this embodiment) is significantly higher than that of temperature, vibration and shock signals, directly aligning them by sampling point number will introduce time mismatch error. Therefore, time synchronization processing of multi-source signals is required.
[0040] First, based on the unified clock reference of the downhole instruments, timestamps are added to the amplitude signal, phase signal, temperature signal, vibration signal, and impact signal, respectively, and a reference time series is constructed using the sampling times of the amplitude and phase signals. Considering the drift between the downhole instrument clock and the surface system clock, this embodiment sends clock synchronization commands to the downhole instruments at preset time intervals (60 seconds in this embodiment), and determines the clock deviation based on the round-trip delay of the synchronization commands. The calculation method is as follows: (1) In the formula, Clock bias is the amount of time that the downhole instrument clock leads the surface reference clock, measured in milliseconds (ms). The timing for sending synchronization commands to the ground system; This is the moment when the downhole instrument receives the synchronization command; The moment when the downhole instrument sends a response signal; This is the moment when the ground system receives the response signal. , Recorded directly by the ground system clock. , All four signals—amplitude, phase, temperature, vibration, and shock—are directly recorded by the downhole instrument clock and transmitted back along with the response signal; all are directly measurable timestamp data. It should be noted that although the amplitude, phase, temperature, vibration, and shock signals are all timestamped based on the unified downhole instrument clock reference and there is no relative synchronization loss between them, the high-temperature environment downhole causes the crystal oscillator frequency upon which this unified clock reference depends to drift. This causes a deviation between the actual physical duration corresponding to each clock counting interval and the calibrated value, thus affecting the accuracy of the actual time interval used in the subsequent three spline interpolation resampling operations. Therefore, it is still necessary to periodically correct the overall drift of the unified downhole clock using the surface reference clock as a reference. The calculated clock deviation is then used to correct this. Then, the timestamps recorded by downhole instruments were uniformly subtracted. Compensation and correction are performed to bring the data back to the ground reference time scale, thereby eliminating systematic errors caused by clock drift. This correction applies synchronously to the timestamps of five types of signals: amplitude, phase, temperature, vibration, and shock, without changing the relative timing relationships between the signals. In this embodiment, synchronization is performed every 60 seconds, with a measured clock deviation of approximately 3.2 ms. After correction, the alignment error between the ground reference time scale and the downhole instrument timestamp can be controlled within 0.5 ms.
[0041] Then, for temperature, vibration, and shock signals with sampling rates lower than the baseline time series, cubic spline interpolation is used for resampling to ensure a consistent sampling density across all source signals on the time axis. Let a certain low-sampling-rate signal be located at an adjacent node... and The interpolation polynomial between +1 is: (2) In the formula, ( ) is the interval [ , Cubic spline interpolation function within +1] The time point to be interpolated; , , , For the first The polynomial coefficients of the segment spline, where The value is taken as the original sampled value at the starting point of this segment. , , Based on the constraint that the function values, first derivatives, and second derivatives of adjacent spline segments are continuous at the nodes, the values are obtained by solving a system of tridiagonal linear equations. These values are derived from the observation data of the original low-sampling-rate signal at each sampling node. Taking the temperature signal as an example, this embodiment performs cubic spline interpolation resampling on the temperature signal according to the sampling times of the amplitude and phase signals. After resampling, the sampling rate of the temperature signal is increased from 10Hz to 4kHz, consistent with the reference time series.
[0042] Finally, based on the corrected timestamps, the amplitude signal, phase signal, and each resampled signal are aligned to the reference time series to obtain multi-source synchronous data containing five types of information: amplitude, phase, temperature, vibration, and shock, at the same time.
[0043] Reference Figure 3 When performing frame segmentation processing on multi-source synchronized data, the frame length and initial frame shift are first determined. In this embodiment, the frame length is... Set to 128 sampling points, initial frame shift A sampling point count of 64 is set, meaning there is a 50% overlap between adjacent data frames to ensure the continuity of time-frequency analysis results. Considering that drilling speed variations affect the data density acquired per unit time, this embodiment dynamically adjusts the initial frame shift based on the real-time drilling speed to obtain the target frame shift, ensuring a relatively uniform distribution density of data frames across the depth domain. (3) In the formula, The target frame shift is expressed in the number of sampling points, and round(·) indicates rounding to the nearest integer. The initial frame shift is set to 64 sampling points; The drilling rate is obtained in real time by the drilling rate sensor of the drilling instrument, and the unit is m / h; For reference drilling speed, the value is derived from the average drilling speed of historical drilling data of adjacent wells; in this embodiment, it is taken as 20 m / h. This embodiment defines the target frame shift. The value range is limited to [32, 96]. When the result calculated by the above formula exceeds this range, it is truncated according to the boundary value to avoid excessively small frame shifts causing redundant calculations or excessively large frame shifts causing loss of time-frequency information due to abnormal fluctuations in drilling speed. For example, when the real-time drilling speed... =30m / h =round(64×20 / 30)=43 sampling points; when the drilling speed drops to... When =10m / h, =round(64×20 / 10)=128, which is truncated to 96 sampling points after exceeding the upper limit.
[0044] Based on target frame shift The multi-source synchronization data is segmented into frames using a sliding window method along the time axis to obtain multiple consecutive data frames. Then, a Hanning window function is applied to each data frame to suppress spectral leakage. The window function is as follows: (4) In the formula, ( ) is the Hanning window function at the th Window coefficient at each sampling point This is the intra-frame sampling point number, with a value ranging from 0 to... -1; The frame length is 128. The sample values of the data frame are multiplied point by point with the corresponding window coefficients to obtain the windowed multi-source data frame, which is used for subsequent time-frequency transformation processing.
[0045] Reference Figure 3 Considering that amplitude, phase, and temperature signals exhibit relatively smooth changes and their spectral energy is concentrated in the low-frequency band, while vibration and impact signals possess significant non-stationary and transient characteristics, this embodiment employs different time-frequency transformation methods for the two types of signals. For the data frames corresponding to amplitude, phase, and temperature signals, short-time Fourier transform is used to extract time-frequency features: It should be noted that, due to the target frame shift The frame shift is dynamically adjusted according to the real-time drilling speed using formula (3). The frame shift for each frame is not a constant value; therefore, the first... The starting sample point index of a frame cannot be simply represented as and The product of the two frames should be expressed as the cumulative value of the target frame shift from each previous frame. Let the first frame be the product of the two frames. The starting sampling point index of the frame is Its recursive relation is =0, = + ,in To extract the first The target frame shift is calculated using formula (3) at frame -1. Based on this, the time-frequency features are extracted from the data frames corresponding to the amplitude signal, phase signal, and temperature signal using short-time Fourier transform: (5) In the formula, ( , ) is the first Frame signal at frequency index The short-time Fourier transform coefficients at point are complex values, and their magnitudes are | ( , )|Constitutes the amplitude spectrum, argument arg[ ( , This constitutes the phase spectrum; (·) represents the original discrete signal to be transformed (amplitude signal, phase signal, or temperature signal); The first one determined by the aforementioned recursive relation Frame start sampling point index; ( ) is the Hanning window function described in formula (4); The frame length is 128. This is a frequency index, with values ranging from 0 to... -1. For data frames corresponding to vibration and impact signals, since these signals contain short-time abrupt change components, this embodiment uses continuous wavelet transform based on Morlet wavelets to balance time resolution and frequency resolution: (6) In the formula, ( , () is a vibration signal or impact signal ( ) in scale factor Translation factor The continuous wavelet transform coefficients at the specified points; the superscript sign indicates the complex conjugate operation. Morlet mother wavelet; scaling factor Inversely proportional to the signal frequency, reflecting the frequency scale of the analysis, the value range is preset from 0.5 to 8 based on the dominant frequency distribution characteristics of the vibration and shock signals; translation factor. The analysis position corresponds to the time axis. After discretizing the continuous wavelet transform results according to the scale factor, a wavelet coefficient matrix with the same dimension as the short-time Fourier transform results is obtained.
[0046] After obtaining the amplitude spectrum, phase spectrum, temperature signal spectrum, and wavelet coefficient matrices of vibration and shock signals, the time-frequency features of each channel are resampled along a unified frequency axis to ensure consistent frequency resolution. The resampled multi-channel time-frequency feature matrices are then concatenated along the channel dimension to obtain the initial fused features. To further highlight channel features that contribute significantly to the recognition task and suppress redundant or highly interfering channel features, this embodiment introduces a channel attention mechanism to weighted correct the initial fused features. First, global average pooling is performed on the initial fused features to obtain the global statistics for each channel: (7) In the formula, For the first Global average pooling results for each channel; ( , ) is the first Each channel in frequency index Frame number Time-frequency characteristic value at; The total length of the frequency dimension; This represents the total length in the time dimension (number of frames). Then, the channel weights for each channel are calculated using two fully connected layers: (8) In the formula, For the first The attention weights for each channel range from (0,1); The result of global pooling for each channel The vector formed; , These are the weight matrices for the dimensionality reduction and dimensionality increase fully connected layers, respectively, and their values are obtained through network training. (·) is the ReLU activation function; (·) is the Sigmoid activation function, used to map the output to the (0,1) interval. Finally, based on the channel weights... The features of each channel in the initial fusion feature are weighted, that is, by Corresponding channel features Element-wise multiplication yields the time-frequency features after channel fusion. The greater the weight of each channel, the higher the contribution of that channel's information to the resistivity identification task.
[0047] After the above processing, the final multi-source feature tensor is a three-dimensional tensor structure composed of time dimension, frequency dimension and channel dimension: the time dimension is used to characterize the temporal information of each data frame; the frequency dimension is used to characterize the spectral characteristics of each source signal after time-frequency transformation; the channel dimension includes amplitude feature channel, phase feature channel, temperature feature channel, vibration feature channel and impact feature channel in sequence. In this embodiment, there are a total of 5 channels, the frequency dimension length is 64, and the time dimension length is determined according to the single acquisition duration.
[0048] To enable the recognition model to adapt to complex scenarios involving coupled changes in downhole temperature, vibration, and shock conditions, this embodiment constructs enhanced training samples that integrate multiple environmental interference conditions based on the original training signal corresponding to known formation resistivity data. Firstly, regarding temperature interference, 16 simulated temperature conditions are set within a preset temperature range (60℃ to 140℃ in this embodiment) at preset temperature steps of 5℃. Based on the instrument temperature drift characteristic curve obtained from the drilling instrument temperature drift calibration experiment, the amplitude drift bias and phase drift bias corresponding to each simulated temperature condition are determined. (9) (10) In the formula, ( ) represents temperature The corresponding amplitude drift bias, ( ) represents temperature The corresponding phase drift bias; The downhole temperature is used to simulate the temperature conditions, and the unit is °C. To determine the reference temperature, 25°C (ground calibration temperature) is used in this embodiment. , These are the coefficients of the first and second terms of the amplitude drift, respectively. , These are the first-order and second-order coefficients of the phase drift, respectively. The values of all four were obtained through a graded temperature calibration experiment of the drilling instrument in a temperature chamber environment. Their physical meaning is to characterize the sensitivity of the instrument's electronic component parameters to signal shift caused by temperature changes. A simulated temperature change sequence is generated based on a preset temperature change rate (2℃ / min in this embodiment). The amplitude drift bias, phase drift bias, and simulated temperature change sequence are then superimposed on the original training signal to obtain a temperature-enhanced sample.
[0049] Based on the temperature-enhanced sample, vibration interference is further introduced: the vibration amplitude ranges corresponding to three typical working conditions—normal drilling, skip drilling, and stick-slip—are (in this embodiment, 0.5g to 1.5g, 2g to 5g, and 1g to 3g, respectively). Based on the characteristics of gravitational acceleration and dominant frequency distribution, a simulated vibration signal is generated. The corresponding amplitude and phase perturbation components are extracted from the simulated vibration signal and superimposed onto the corresponding time positions in the temperature-enhanced sample to obtain a temperature-vibration composite enhanced sample. Then, impact interference is introduced: based on the peak impact amplitude (3g to 6g, 6g to 12g, and 10g to 20g in this embodiment), duration (generally 5ms to 50ms), and decay rate corresponding to three typical working conditions—obstruction, jamming, and collision—a simulated impact signal is constructed. Amplitude transient distortion and phase transient distortion components are generated from the simulated impact signal and superimposed onto the corresponding time positions in the temperature-vibration composite enhanced sample to finally obtain a temperature-vibration-impact composite enhanced training sample. The original training signal, temperature-enhanced sample, temperature-vibration composite enhanced sample, and temperature-vibration-impact composite enhanced training sample are divided into a training set, a validation set, and a test set according to a preset ratio of 7:2:1.
[0050] Reference Figure 4This embodiment employs a dual-branch convolutional neural network comprising an electromagnetic wave feature extraction branch, an environmental interference feature extraction branch, and a feature fusion layer. The electromagnetic wave feature extraction branch takes the sub-tensors corresponding to the amplitude and phase feature channels in the multi-source feature tensor as input. It consists of three sequentially connected convolutional layers, a batch normalization layer, and a ReLU activation layer, with a 3×3 kernel size and 16, 32, and 64 channels respectively. It is used to extract electromagnetic wave propagation features characterizing formation resistivity. The environmental interference feature extraction branch takes the sub-tensors corresponding to the temperature, vibration, and shock feature channels in the multi-source feature tensor as input. It uses a different network layer count and convolutional parameter configuration than the electromagnetic wave feature extraction branch. In this embodiment, it is set to four convolutional layers with 8, 16, 32, and 32 channels respectively, and a 5×5 kernel size to accommodate the stronger non-stationary characteristics of environmental interference signals compared to electromagnetic wave signals. It is used to extract the temporal variation features corresponding to environmental interference factors. The two branches are independently configured and do not share parameters, each focusing on electromagnetic response features. and environmental disturbance characteristics Extract.
[0051] The feature fusion layer includes a cross-attention module, which outputs features from the environmental interference feature extraction branch. Generate query vectors and extract branch output features using electromagnetic wave features. Generate key vectors and value vectors: (11) In the formula, , , These are the query matrix, key matrix, and value matrix, respectively. , , These are the learnable projection weight matrices corresponding to the query, key, and value, respectively, and their values are learned through network training. , These are the feature maps output by the environmental interference feature extraction branch and the electromagnetic wave feature extraction branch, respectively. The influence weights of environmental interference features on electromagnetic wave features are calculated based on the query matrix and the key matrix. (12) In the formula, This is the weight matrix for the influence of environmental interference characteristics on electromagnetic wave characteristics. Its elements take values in the range of (0,1) and the sum of the elements in each row is 1. Key matrix Transpose of; The dimension of the key vector is 64, which is equal to the number of output channels of the electromagnetic wave feature extraction branch. This is used as a scaling factor to prevent the dot product result from becoming too large, thus avoiding gradient vanishing in the softmax function. This is based on the influence weights. Weighted correction of electromagnetic wave characteristics: (13) In the formula, The electromagnetic wave characteristics are weighted and corrected for environmental interference features. The correction process is based on the original electromagnetic wave characteristics. The weighted vector corresponding to the superimposed environmental disturbances is based on the This allows the corrected electromagnetic wave characteristics to reflect the actual modulation effect of environmental interference on the electromagnetic wave propagation characteristics. The environmental interference characteristics are then extracted and branched out as output characteristics. With the corrected electromagnetic wave characteristics The data is stitched along the channel dimension and input into the fully connected layer to obtain fused features, which are used for subsequent calculation of resistivity and confidence.
[0052] When training a dual-branch convolutional neural network using enhanced training samples, a joint loss function is constructed that integrates resistivity regression loss, environmental interference label prediction loss, and signal confidence supervision loss. (14) In the formula, This is the joint loss value; The resistivity regression loss term is calculated based on the mean square error between the corrected amplitude resistivity, the corrected phase resistivity and the corresponding known formation resistivity, and is used to constrain the accuracy of the resistivity numerical solution. The loss term for environmental interference label prediction is calculated based on the cross-entropy between the environmental interference prediction result and the corresponding temperature label, vibration label, and impact label. It is used to constrain the discriminative ability of the environmental interference feature extraction branch. The signal credibility supervision loss term is calculated based on the cross-entropy between the signal credibility prediction result and the corresponding signal-to-noise ratio label, and is used to constrain the accuracy of credibility assessment. , , The corresponding preset weighting coefficients are initially set to 1.0, 0.5, and 0.3, respectively. These coefficients are dynamically adjusted during training based on changes in the validation set loss. If a loss term decreases slowly over several consecutive rounds, its corresponding weighting coefficient is appropriately increased to balance the convergence speed of the three types of tasks. Based on the joint loss value, the Adam optimizer is used to iteratively update the network parameters of the dual-branch convolutional neural network. The initial learning rate is set to 0.001 and adjusted using a cosine annealing strategy. The process of sample input, joint loss calculation, and network parameter update is repeated until the validation set loss no longer decreases significantly for 10 consecutive rounds, resulting in the trained dual-branch convolutional neural network.
[0053] Considering the limited computing power and storage resources of the drilling instrument's processor, this embodiment sequentially performs channel pruning, quantization-aware training, and knowledge distillation on the trained dual-branch convolutional neural network. First, the absolute value of the batch normalized scaling factor corresponding to each convolutional layer channel is calculated and used as an indicator of channel importance. (15) In the formula, For the first Key metrics for each channel; This is the scaling factor for this channel in the batch normalization layer. Its value is derived from the batch normalization layer parameters learned during network training. The smaller its absolute value, the smaller the contribution of the channel's output features to the final recognition result. Pruning thresholds are set for the electromagnetic wave feature extraction branch and the environmental interference feature extraction branch, respectively. and Based on the channel importance index, channels and convolutional kernel parameters below the corresponding threshold are pruned. Considering that electromagnetic wave characteristics directly determine the resistivity calculation accuracy and are more sensitive to network accuracy, this embodiment sets a pruning threshold for the electromagnetic wave feature extraction branch. (Take 0.01) This is less than the pruning threshold for the environmental interference feature extraction branch. (Taking 0.03) makes the compression of the electromagnetic wave feature extraction branch more conservative during the pruning process. After pruning, the pruned network is fine-tuned and trained to obtain the pruned optimized network. In this embodiment, the number of network parameters is reduced by about 42% after pruning.
[0054] Quantization is performed on the pruned optimization network: the weight parameters and activation value distribution of the pruned optimization network are statistically analyzed to determine the quantization interval and quantization bit width (8-bit fixed-point quantization is used in this embodiment). The quantization mapping relationship is as follows: (16) In the formula, These are the floating-point weight parameters or activation values before quantization; These are the quantized fixed-point values; This is the quantization step size; , These are the maximum and minimum values of the distribution of the parameter to be quantized or the activation value, respectively, and their values are derived from the statistical results of the pruning optimization network on the validation set; To determine the quantization bit width, an 8-bit value is used in this embodiment. Quantization-aware training is performed by inserting pseudo-quantization nodes, allowing the network to adapt to quantization errors during the training phase. The pruning and optimization network is then mapped to a fixed point based on the quantization parameters to obtain the quantized network.
[0055] Finally, the original network before pruning and quantization is used as the teacher network, and the quantized network is used as the student network. A distillation loss function containing hard label loss and soft label distillation loss is constructed, and the student network is trained by distillation. (17) In the formula, This represents the distillation loss value; Output for students' networks With real labels The hard label loss between them is calculated using cross-entropy; KL(·,·) is the relative entropy, used to measure the distribution difference between the soft labels output by the teacher network and the soft labels output by the student network. , These are the output logical values for the teacher network and the student network, respectively. The distillation temperature is used to soften the output probability distribution. The larger the value, the smoother the output distribution. In this embodiment, it is set to 4. The value of 0.3 represents the balance coefficient between hard-label loss and soft-label distillation loss. This value is determined through a combination of ablation experiments on model accuracy and lightweight design. When the distillation training meets the preset convergence condition (validation set accuracy fluctuation less than 0.5% for 5 consecutive rounds), the student network is defined as the lightweight resistivity signal recognition model. It should be noted that quantization and distillation do not change the number of network parameters; they only compress the storage bit width of individual parameters and optimize the network weight values under quantization error. Therefore, the reduction in the number of network parameters is entirely contributed by the pruning process, i.e., the aforementioned reduction of approximately 42% in the number of parameters. On this basis, quantization compresses the storage bit width of individual parameters from 32-bit floating-point to 8-bit fixed-point (compression ratio of 4 times), reducing the overall storage footprint of the model by approximately 85% compared to the original network (1-(1-42%)×8 / 32≈85.5%). After the above pruning, quantization and distillation processes, the single inference time of the lightweight resistivity signal recognition model finally obtained in this embodiment is reduced from 38ms in the original network to 9ms, a reduction of about 76%, which meets the deployment requirements of real-time processing of drilling instruments.
[0056] After inputting the multi-source feature tensor into the trained lightweight resistivity signal recognition model, the model outputs environmental interference correction features, which include temperature interference components corresponding to temperature signals, vibration signals, and impact signals, respectively. Vibration interference components and impact interference components All three are represented by eigenvectors, which characterize the degree of modulation of the electromagnetic wave feature channel in the multi-source feature tensor by the corresponding environmental factors. The values are normalized to [0,1], and the larger the value, the stronger the interference of the corresponding environmental factors on the electromagnetic wave features. The resistivity signal identification model determines the degree of environmental interference based on the environmental interference correction feature, and adjusts the confidence weight of the corresponding resistivity data in the geological guidance results according to the degree of environmental interference. The higher the degree of environmental interference, the lower the confidence weight of the corresponding resistivity data in the geological guidance result fusion process.
[0057] Taking the aforementioned data frame in this embodiment as an example, the environmental interference feature extraction branch combines the current downhole temperature (approximately 110°C, relative to the calibration reference temperature) with the current downhole temperature. The output temperature interference component includes: offset of approximately 85°C, measured vibration acceleration (approximately 3.2g under drilling conditions), and peak impact signal (approximately 4.5g, duration approximately 18ms). =0.18, vibration disturbance component =0.09, Impact Interference Component =0.05. The numerical relationship among the three values is consistent with the actual operating scenario where the current downhole temperature is significantly higher than the calibration benchmark, while the vibration and shock conditions are relatively mild. This indicates that the environmental interference correction feature can accurately reflect the relative magnitude of the impact of different environmental factors on signal quality, providing a basis for the subsequent weighted correction of amplitude resistivity and phase resistivity.
[0058] Obtain the original amplitude features from the electromagnetic wave feature extraction branch. and temperature interference components Vibration interference components and impact interference components Corresponding correction factor , , The original amplitude characteristics are weighted and corrected according to each correction coefficient to obtain the corrected amplitude characteristics after environmental interference compensation: (18) In the formula, The correction magnitude characteristics after environmental disturbance compensation; Extract the original amplitude features of the branch output for electromagnetic wave features; , , The temperature, vibration, and shock disturbance components are included in the environmental disturbance correction features described in the formula. , , These are correction coefficients corresponding to temperature, vibration, and shock disturbance components, used to characterize the actual influence of each environmental factor on the amplitude characteristics. Their values are obtained through network training and their physical meaning is the relative shift of the amplitude characteristics caused by a unit disturbance component. The transmission frequency corresponding to the current drilling electromagnetic wave amplitude signal is obtained. The corresponding amplitude-resistivity conversion function is invoked according to the transmission frequency. This conversion function is pre-calibrated based on known formation resistivity data. In this embodiment, the following power function form is used: (19) In the formula, This is the corrected amplitude resistivity, in Ω·m; (·) represents the transmission frequency. The corresponding amplitude-resistivity conversion function; , The calibration coefficients of this transformation function are derived from the least-squares fit between known formation resistivity data and corresponding amplitude characteristics. In this embodiment... =2MHz =1.89, =1.72. Taking a data frame in this embodiment as an example, the electromagnetic wave feature extraction branch outputs the original amplitude feature. =0.62, in the environmental disturbance correction feature =0.18、 =0.09、 =0.05, corresponding to the correction factor =0.24、 =0.15、 =0.20, substituting into formula (18) yields the correction amplitude characteristic. ≈0.579, then substitute into formula (19) to obtain the corrected amplitude resistivity. The value is approximately 4.85 Ω·m, which is consistent with the known formation resistivity reference value of 4.6 Ω·m to 5.1 Ω·m in adjacent wells of the same well section, indicating that the correction result is reasonable and effective.
[0059] Obtain the original phase features from the electromagnetic wave feature extraction branch. The document also includes correction coefficients for the temperature disturbance component, vibration disturbance component, and impact disturbance component. Considering that phase characteristics are more sensitive to temperature changes than amplitude characteristics, this embodiment enhances the correction coefficients for the temperature disturbance component based on the sensitivity of phase characteristics to temperature changes. (20) In the formula, To enhance the temperature correction factor after processing; The temperature correction factor is given in formula (18); This is the phase temperature sensitivity enhancement factor, whose value is derived from the measured statistical results of the ratio of the phase feature to the amplitude feature's response to temperature disturbances. In this embodiment, it is set to 0.35. This is based on the enhanced temperature correction coefficient. and the correction coefficients corresponding to the vibration interference component and the impact interference component. , The original phase features are weighted and corrected to obtain the corrected phase features: (twenty one) Correct phase characteristics Input a pre-calibrated phase-resistivity conversion function based on known formation resistivity data. (·) (The transformation function has the same form as formula (19), and the calibration coefficients are individually fitted based on the correspondence between phase characteristics and formation resistivity), to obtain the corrected phase resistivity. The unit is Ω·m.
[0060] Reference Figure 5 Obtain the corrected amplitude resistivity Corrected phase resistivity The confidence intervals corresponding to each interference component in the environmental interference correction features and the original signal-to-noise ratio corresponding to the current data frame are used to comprehensively evaluate the reliability of the current recognition result. First, the normalized difference between the corrected amplitude resistivity and the corrected phase resistivity is calculated, and the resistivity consistency factor is determined based on the compensation value of the normalized difference. (twenty two) In the formula, The resistivity consistency factor ranges from [0,1]. A larger value indicates that the amplitude resistivity and phase resistivity are closer, and the inherent consistency of the identification results is higher. Taking the aforementioned data frame as an example, formula (19) has already obtained the corrected amplitude resistivity. ≈4.85Ω·m, obtained by the same method from the corrected phase characteristic and phase-resistivity conversion function. (·) together obtain the corrected phase resistivity ≈4.15Ω·m, substituting into formula (22) yields the resistivity uniformity factor. ≈0.92. The confidence factor for environmental interference is determined based on the confidence interval width corresponding to each interference component. (twenty three) In the formula, The environmental disturbance confidence factor has a value range of [0,1]. The mean of the confidence interval widths corresponding to each interference component in the environmental interference correction feature is given by the model along with the output of the environmental interference correction feature; The preset normalized upper limit for the confidence interval width is set to 0.5 in this embodiment, and its value is derived from the statistical upper bound of the confidence interval width distribution on the training set. A smaller confidence interval width indicates a more stable prediction result for environmental interference features, and a higher corresponding environmental interference confidence factor. The signal quality factor is determined based on the original signal-to-noise ratio corresponding to the current data frame. (twenty four) In the formula, is the signal quality factor, with a value range of (0,1); The original signal-to-noise ratio corresponding to the current data frame, in dB, is calculated in real time by the front-end acquisition circuit. To normalize the reference signal-to-noise ratio, a value of 10 dB is used in this embodiment. Regarding the resistivity uniformity factor... Environmental interference confidence factor and signal quality factor Each signal is configured with its corresponding weight and then weighted and fused to obtain the confidence level of the signal within a preset value range. (25) In the formula, The signal reliability is represented by a value in the range [0,1]. , , For the corresponding weight coefficients, satisfying + + =1. In this embodiment, the ablation experiment results for the influence of the three types of factors on the final recognition accuracy are taken as 0.4, 0.35, and 0.25, respectively. Taking the aforementioned data frame as an example, the resistivity consistency factor has been obtained. ≈0.92, let the confidence factor for environmental disturbance be 0.92. =0.78, signal quality factor =0.85, substituting into formula (25) yields the signal reliability. =0.4×0.92+0.35×0.78+0.25×0.85≈0.368+0.273+0.2125≈0.854, indicating that the recognition result of this data frame has a high degree of reliability.
[0061] Acquire historical drilling data and determine the formation type based on the formation resistivity gradient corresponding to the current well section: (26) In the formula, This represents the gradient of formation resistivity, in units of Ω·m / m; This represents the difference in known formation resistivity between adjacent depth points; This corresponds to the depth interval. Based on the resistivity gradient... Stratigraphic types are classified into homogeneous strata, gradually changing strata, and abruptly changing strata: when Less than the preset gradient threshold (In this embodiment, 0.5 Ω·m / m is taken as the homogeneous layer); when Between With preset gradient threshold (In this embodiment, the value is taken as 2.0 Ω·m / m) when it is determined to be a gradually changing stratum; when Not less than The formation is identified as an abrupt change in formation. A correspondence is established between different formation types and preset confidence thresholds, with preset confidence thresholds corresponding to homogeneous formations, gradually changing formations, and abrupt changes in formations. Increasing sequentially, in this embodiment, we take respectively... =0.55、 =0.65、 =0.75 — The more drastic the change in formation resistivity, the higher the requirement for the reliability of the identification results, in order to avoid misjudgments of geological guidance due to identification errors near resistivity abrupt change interfaces. Based on the formation type corresponding to the current depth of the downhole instrument, a preset reliability threshold for the current depth is obtained based on the above correspondence. In this embodiment, the resistivity variation gradient of the current well section is shown. =1.3Ω·m / m, which is determined to be a gradually changing stratum, corresponding to the preset confidence threshold. =0.65; the aforementioned data frame signal reliability =0.854 is greater than the threshold, so it is considered reliable.
[0062] When the signal reliability is less than the preset reliability threshold In this case, the front-end amplification gain and filtering parameters need to be adjusted. This embodiment sets them below a preset confidence threshold. preset secondary threshold (In this embodiment, we take) =0.4), and establish a piecewise mapping relationship between signal reliability and front-end amplification gain adjustment. When signal reliability Below the preset confidence threshold And not lower than the preset secondary threshold At that time, the front-end amplification gain is increased based on the difference between the two: (27) In the formula, This is the front-end amplification gain adjustment amount, in dB; This is the gain adjustment factor, which is set to 20 in this embodiment. The value is derived from the calibration experiment of the gain-signal-noise ratio response characteristics of the front-end amplifier circuit. The preset confidence threshold is as described in the formula; This represents the current signal confidence level. When the signal confidence level... Below the preset secondary threshold At this time, while increasing the gain of the front-end amplifier, the gain bandwidth of the front-end amplifier circuit is reduced. The gain adjustment amount is then changed to... = ( - ),in This is the gain adjustment factor under strong interference conditions, and its value (35 in this embodiment) is greater than... This allows for more aggressive gain compensation when environmental interference is strong and signal reliability is significantly low, and suppresses the introduction of high-frequency noise by reducing the gain bandwidth.
[0063] At the same time, according to the vibration disturbance component and impact interference components The intensity of the low-pass filter cutoff frequency is adjusted according to the temperature interference component. The intensity adjustment of the notch filter center frequency: (28) In the formula, This is the adjusted cutoff frequency of the low-pass filter. Its baseline value is set (500Hz in this embodiment); The adjusted center frequency of the notch filter. The baseline value is set (50Hz in this embodiment, corresponding to power supply frequency interference). , These are the adjustment coefficients corresponding to the low-pass cutoff frequency and the notch filter center frequency, respectively, and their values are derived from the filter frequency response calibration experiment. The stronger the vibration and shock interference, the lower the low-pass cutoff frequency is to enhance the suppression of high-frequency noise; the stronger the temperature interference, the higher the notch filter center frequency is to compensate for the temperature-induced drift of the circuit resonant frequency. Gain and filter parameter adjustments are completed within the same control cycle, and the drilling electromagnetic wave signal is reacquired after a preset stabilization time (200ms in this embodiment). The reliability of the adjusted signal is determined based on the reacquired signal, and the adjustment coefficients in the segmented mapping relationship are updated based on the gain adjustment amount and the change in reliability before and after adjustment, so that the front-end parameter adjustment strategy can be continuously optimized according to the actual adjustment effect.
[0064] When re-acquiring and re-identifying the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters, first set the maximum number of re-identification attempts. (In this embodiment, 5 is used), and the drilling electromagnetic wave signal is re-acquired based on the adjusted front-end amplification gain and filtering parameters; the re-acquired drilling electromagnetic wave signal is input into the resistivity signal recognition model to obtain the corrected amplitude resistivity, corrected phase resistivity, and signal reliability; the signal reliability corresponding to the current recognition is compared with that of the previous recognition, and the next front-end parameter adjustment strategy is determined based on the comparison result of the reliability difference and the preset improvement threshold (0.03 in this embodiment): when the reliability difference is lower than the preset improvement threshold, it indicates that the current adjustment direction has a limited effect on improving reliability. At this time, the adjustment direction of the next front-end amplification gain and filtering parameters is switched to the opposite direction, and the signal acquisition and re-recognition process is repeated; the number of re-recognitions is accumulated, and when the number of re-recognitions reaches the maximum number of re-recognitions... The iteration stops when the signal reliability at the time of stopping is not lower than the preset reliability threshold. The corrected amplitude resistivity and corrected phase resistivity are then used as the resistivity data after closed-loop compensation. If the signal reliability at the time of stopping is still lower than the preset reliability threshold, a finite convergence flag is set, and the last identification result is output as the resistivity data after closed-loop compensation for subsequent manual review or comprehensive interpretation in conjunction with data from adjacent wells. This avoids excessive latency in data transmission while drilling due to continuous iteration. If the signal reliability is not lower than the preset reliability threshold, the corrected amplitude resistivity and corrected phase resistivity are directly used as the resistivity data after closed-loop compensation.
[0065] For example, suppose the confidence level of the signal obtained from the first identification of a data frame is... =0.58, which is lower than the preset confidence threshold corresponding to the current gradient strata. =0.65 and not lower than the preset secondary threshold =0.4, the gain adjustment amount is calculated according to formula (27). =20×(0.65-0.58)=1.4dB, the front-end amplification gain is increased by 1.4dB and the signal is re-acquired and identified. The signal reliability is obtained from the second identification. =0.63, an increase of 0.05 from the initial value, which is higher than the preset increase threshold of 0.03. The current adjustment direction is deemed effective. After adjusting the gain by 0.4dB in the same direction for the third identification, the signal confidence level increased to 0.68, which is no less than the preset confidence threshold. The iteration terminated early, and the corrected amplitude resistivity and corrected phase resistivity corresponding to the third identification were determined as the resistivity data after closed-loop compensation. The entire process involved two re-identifications, which did not reach the maximum number of re-identifications. This demonstrates the convergence efficiency of the closed-loop compensation mechanism that allows for feedback between front-end parameters and recognition results under actual working conditions.
[0066] Reference Figure 6The resistivity data after closed-loop compensation is aligned with the wellbore inclination data, azimuth data, and azimuth gamma data according to a unified depth benchmark to obtain depth-aligned multi-source data. Formation interfaces are identified based on the depth-aligned azimuth gamma data, and the depth positions corresponding to these interfaces are determined. The positional relationship of the wellbore trajectory relative to the target formation is determined based on the response variation characteristics of the depth-aligned resistivity data on both sides of the formation interface (i.e., the wellbore trajectory is located within, above, or below the target formation). The extension direction of the wellbore trajectory is determined based on the depth-aligned wellbore inclination and azimuth data, and the angle between the wellbore trajectory and the target formation is calculated based on the extension direction and the strike of the target formation. (29) In the formula, The angle between the wellbore trajectory and the strike of the target formation; This is the wellbore trajectory extension direction vector calculated based on the depth-aligned inclination and azimuth data; Both are represented in a unified geodetic coordinate system, and are determined based on the attitude (dip, dip) of the target strata. · Let | be the dot product of two vectors. |、| | represents the magnitudes of the two vectors. The smaller the value, the closer the wellbore trajectory is to the target formation, and the higher the stability of the target formation encountered. A larger value indicates a higher risk of rapid formation penetration in the wellbore trajectory, necessitating timely adjustments to the drilling direction based on the wellbore trajectory's position relative to the target formation. This adjustment is based on the wellbore trajectory's position relative to the target formation and the included angle. The fusion features corresponding to the geological guidance results are constructed and used as a direct basis for geological guidance decision-making. In this embodiment, after the above fusion processing, the angle between the current wellbore trajectory and the target formation strike is calculated. The angle is approximately 3.2°. Based on the resistivity response characteristics, the wellbore trajectory is currently located in the upper middle part of the target layer. Therefore, it is recommended that the geological steering decision be adjusted downwards to maintain the wellbore trajectory in a stable, centered position within the target layer.
[0067] In summary, the drilling electromagnetic resistivity signal identification method based on convolutional neural networks provided in this embodiment achieves high reliability in amplitude and phase resistivity data even under complex environmental interference coupling effects such as temperature, vibration, and shock by performing time synchronization and time-frequency fusion of the amplitude and phase signals of drilling electromagnetic waves with multi-source signals such as downhole temperature, vibration, and shock. It also utilizes a dual-branch convolutional neural network for decoupling and extracting electromagnetic wave features from environmental interference features and cross-attention fusion correction. Furthermore, through quantitative evaluation of signal reliability and closed-loop feedback adjustment of front-end acquisition parameters, it meets the real-time deployment requirements of drilling instruments under the constraints of limited computing power and storage resources. Finally, through deep fusion with well inclination, azimuth, and azimuth gamma data, it obtains reliable geological steering results that can support geological steering decisions. It should be understood that the above embodiments are only some implementations of this application. Those skilled in the art can make various equivalent substitutions or improvements to the parameter values, network structure configurations, and signal processing flows in specific embodiments without departing from the concept of this application. All such equivalent substitutions or improvements should be covered within the protection scope of this application.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying electromagnetic resistivity signals during drilling based on convolutional neural networks, characterized in that, Includes the following steps: The amplitude and phase signals of electromagnetic waves while drilling, as well as downhole temperature, vibration and impact signals, are acquired and time-aligned to obtain multi-source synchronous data. Multi-source synchronous data is processed by framing, and the framing data is subjected to time-frequency transformation and channel fusion to obtain multi-source feature tensors; Based on known formation resistivity data, enhanced training samples were constructed by combining different temperature conditions, different vibration conditions and different impact conditions. The enhanced training samples were then used to train a two-branch convolutional neural network. The trained two-branch convolutional neural network was then lightweighted to obtain a resistivity signal recognition model. The multi-source feature tensor is input into the resistivity signal recognition model, and the environmental interference correction feature is output. Based on the environmental interference correction feature, the corrected amplitude resistivity, the corrected phase resistivity, and the signal reliability are obtained.
2. The method for identifying electromagnetic resistivity signals while drilling according to claim 1, characterized in that, The method for constructing enhanced training samples is as follows: Obtain the original training signal corresponding to the known formation resistivity data; Within a preset temperature range, multiple simulated temperature conditions are set according to a preset temperature step size, and the amplitude drift bias and phase drift bias corresponding to each simulated temperature condition are determined based on the instrument's temperature drift characteristic curve. A simulated temperature change sequence is generated based on a preset temperature change rate, and the amplitude drift bias, phase drift bias, and simulated temperature change sequence are superimposed on the original training signal to obtain a temperature-enhanced sample. Based on the vibration amplitude range and dominant frequency distribution characteristics corresponding to normal drilling, skip drilling, and stick-slip conditions, simulated vibration signals are generated. The amplitude perturbation component and phase perturbation component are extracted from the simulated vibration signal, and then superimposed on the corresponding time position in the temperature enhancement sample to obtain the temperature-vibration composite enhancement sample. Based on the peak amplitude, duration and decay rate of the impact corresponding to the obstruction, jamming and collision conditions, a simulated impact signal is constructed. Amplitude transient distortion components and phase transient distortion components are generated based on the simulated impact signal, and then superimposed on the corresponding time positions in the temperature-vibration composite enhancement sample to obtain the temperature-vibration-impact composite enhancement training sample. The original training signal, temperature-enhanced samples, temperature-vibration composite enhanced samples, and temperature-vibration-shock composite enhanced training samples are divided into training set, validation set, and test set according to a preset ratio.
3. The method for identifying electromagnetic resistivity signals while drilling according to claim 1, characterized in that, The dual-branch convolutional neural network includes an electromagnetic wave feature extraction branch, an environmental interference feature extraction branch, and a feature fusion layer, wherein: The electromagnetic wave feature extraction branch takes the amplitude feature channel and phase feature channel corresponding sub-tensors in the multi-source feature tensor as input, and is composed of sequentially connected convolutional layers, batch normalization layers and activation layers, and is used to extract electromagnetic wave propagation features that characterize the formation resistivity. The environmental interference feature extraction branch takes the sub-tensors corresponding to the temperature feature channel, vibration feature channel and impact feature channel in the multi-source feature tensor as input, and adopts a different number of network layers and convolution parameter configuration than the electromagnetic wave feature extraction branch, in order to extract the temporal variation features corresponding to environmental interference factors. The electromagnetic wave feature extraction branch and the environmental disturbance feature extraction branch are set independently and their parameters are not shared. They extract features of electromagnetic response features and environmental disturbance features respectively. The feature fusion layer includes a cross-attention module, which generates a query vector based on the output features of the environmental interference feature extraction branch, and generates a key vector and a value vector based on the output features of the electromagnetic wave feature extraction branch. It calculates the influence weight of the environmental interference features on the electromagnetic wave features, and performs weighted correction on the electromagnetic wave features according to the influence weight. The environmental interference feature extraction branch output feature and the corrected electromagnetic wave feature are concatenated along the channel dimension and input into the fully connected layer to obtain the fused feature.
4. The method for identifying electromagnetic resistivity signals while drilling according to claim 3, characterized in that, The method for training a two-branch convolutional neural network using augmented training samples is as follows: Construct a joint loss function, which includes a resistivity regression loss term, an environmental interference label prediction loss term, and a signal credibility supervision loss term; The enhanced training samples are input into a dual-branch convolutional neural network, which outputs the corrected amplitude resistivity, the corrected phase resistivity, the environmental interference prediction result, and the signal confidence prediction result. The resistivity regression loss term is calculated based on the mean square error between the corrected amplitude resistivity and the corrected phase resistivity and the corresponding known formation resistivity. Based on the prediction error between the environmental disturbance prediction results and the corresponding temperature, vibration, and shock labels, calculate the environmental disturbance label prediction loss term; Calculate the signal credibility supervision loss term based on the cross-entropy between the signal credibility prediction result and the corresponding signal-to-noise ratio label; The resistivity regression loss term, the environmental interference label prediction loss term, and the signal credibility supervision loss term are weighted and fused according to the preset weighting coefficients to obtain the joint loss value. Based on the joint loss value, the network parameters of the dual-branch convolutional neural network are iteratively updated, and the preset weighting coefficients are adjusted according to the changes in the validation set loss. Repeat the process of sample input, joint loss calculation and network parameter update until the preset training convergence condition is met to obtain the trained dual-branch convolutional neural network.
5. The method for identifying electromagnetic resistivity signals while drilling according to claim 4, characterized in that, The method for lightweighting the trained dual-branch convolutional neural network is as follows: Calculate the absolute value of the batch normalized scaling factor corresponding to each channel of the convolutional layer, and use it as an indicator of channel importance; Pruning thresholds are set for the electromagnetic wave feature extraction branch and the environmental interference feature extraction branch respectively. Channels and convolution kernel parameters below the corresponding threshold are pruned according to the channel importance index. The pruning threshold for the electromagnetic wave feature extraction branch is smaller than that for the environmental interference feature extraction branch. The pruned network is fine-tuned and trained to obtain the pruned optimized network. The weight parameters and activation value distribution of the network were statistically optimized by pruning, the quantization interval and quantization bit width were determined, and quantization-aware training was performed by inserting pseudo-quantization nodes to make the network adapt to quantization error. The pruning optimization network is mapped to a fixed point based on the quantization parameters to obtain the quantized network. The network before pruning and quantization is used as the teacher network, and the quantized network is used as the student network. A distillation loss function containing hard label loss and soft label distillation loss is constructed, and the student network is trained by distillation. When the distillation training meets the preset convergence conditions, the student network is determined as a lightweight resistivity signal recognition model.
6. The method for identifying electromagnetic resistivity signals while drilling according to claim 1, characterized in that, The corrected method for obtaining amplitude resistivity is as follows: Obtain the original amplitude characteristics of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; The original amplitude characteristics are weighted and corrected according to each correction coefficient to obtain the corrected amplitude characteristics after environmental interference compensation. Obtain the transmission frequency corresponding to the current electromagnetic wave amplitude signal while drilling, and call the corresponding amplitude-resistivity conversion function according to the transmission frequency. The amplitude-resistivity conversion function corresponding to each transmission frequency is pre-calibrated based on known formation resistivity data. The corrected amplitude resistivity is obtained by inputting the amplitude-resistivity conversion function into the amplitude-resistivity correction feature.
7. The method for identifying electromagnetic resistivity signals while drilling according to claim 1, characterized in that, The corrected method for obtaining phase resistivity is as follows: Obtain the original phase features of the electromagnetic wave feature extraction branch output, as well as the correction coefficients corresponding to the temperature interference component, vibration interference component, and impact interference component; Based on the characteristic that the phase features are sensitive to temperature changes, the correction coefficients corresponding to the temperature disturbance components are enhanced. Based on the enhanced temperature correction coefficient and the correction coefficients corresponding to the vibration interference component and the impact interference component, the original phase characteristics are weighted and corrected to obtain the corrected phase characteristics. The corrected phase characteristics are input into a phase-resistivity conversion function pre-calibrated based on known formation resistivity data to obtain the corrected phase resistivity.
8. The method for identifying electromagnetic resistivity signals while drilling according to claim 1, characterized in that, The method for determining signal reliability is as follows: Obtain the corrected amplitude resistivity, the corrected phase resistivity, the confidence intervals corresponding to each interference component in the environmental interference correction features, and the original signal-to-noise ratio corresponding to the current data frame; The normalized difference between the corrected amplitude resistivity and the corrected phase resistivity is calculated, and the resistivity consistency factor is determined based on the complement of the normalized difference. The environmental interference confidence factor is determined based on the confidence interval width corresponding to each interference component. The smaller the confidence interval width, the more stable the environmental interference feature prediction result, and the higher the corresponding environmental interference confidence factor. The signal quality factor is determined based on the original signal-to-noise ratio corresponding to the current data frame. The resistivity consistency factor, environmental interference confidence factor and signal quality factor are assigned corresponding weights and then weighted and fused to obtain the signal confidence within the preset value range.
9. The method for identifying electromagnetic resistivity signals while drilling according to any one of claims 1-8, characterized in that, Also includes: Determine whether the signal reliability is less than a preset reliability threshold; If so, adjust the front-end amplification gain and filtering parameters according to the signal credibility, and re-acquire the drilling electromagnetic wave signal based on the adjusted front-end amplification gain and filtering parameters and input it into the resistivity signal recognition model for re-recognition until the signal credibility is not less than the preset credibility threshold, and obtain the resistivity data after closed-loop compensation. If not, the corrected amplitude resistivity and the corrected phase resistivity will be used as the resistivity data after closed-loop compensation. The resistivity data after closed-loop compensation is fused with the well inclination data, azimuth data, and azimuth gamma data to obtain the geological steering results.
10. The method for identifying electromagnetic resistivity signals while drilling according to claim 9, characterized in that, The method for adjusting the front-end amplification gain and filtering parameters based on signal reliability is as follows: Set a preset secondary threshold that is lower than the preset confidence threshold, and establish a segmented mapping relationship between signal confidence and front-end amplification gain adjustment. The gain adjustment strategy is determined based on the comparison between the signal confidence level and the preset confidence level threshold and the preset secondary threshold. When the signal confidence level is lower than the preset confidence level threshold but not lower than the preset secondary threshold, the front-end amplification gain is increased based on the difference between the two. When the signal confidence level is lower than the preset secondary threshold, the gain bandwidth of the front-end amplification circuit is reduced while increasing the front-end amplification gain. The cutoff frequency of the low-pass filter is adjusted according to the intensity of the vibration interference component and the impact interference component, and the center frequency of the notch filter is adjusted according to the intensity of the temperature interference component. The gain and filter parameters are adjusted within the same control cycle, and the drilling electromagnetic wave signal is reacquired after a preset stabilization time. The reliability of the adjusted signal is determined based on the reacquired signal, and the segment mapping relationship is updated based on the gain adjustment amount and the change in reliability before and after the adjustment.
