Training method of well logging model and method for determining t2 relaxation spectrum in nuclear well logging

By integrating real non-Gaussian noise and clean echo trains during well logging model training, and employing a multi-layer Mamba network and a modified KAN network for end-to-end processing, the problem of noise influence in real well logging scenarios was solved, achieving more accurate T2 relaxation spectrum prediction and inversion.

CN122432664APending Publication Date: 2026-07-21HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2026-04-08
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, deep learning models trained based on ideal echo signals are susceptible to noise in real well logging scenarios, leading to distortion of physical features and a decrease in generalization performance, which affects the accuracy of T2 relaxation spectrum inversion.

Method used

Real non-Gaussian noise data is generated by extracting pure noise segments from the tail of the logging signal. Pure echo strings are generated by combining them with a preset T2 relaxation spectrum. The noise scaling factor is determined, a training set is constructed, and the logging model is trained, including filtering and inversion models. End-to-end processing is performed using a multi-layer Mamba network and a modified KAN network.

Benefits of technology

The model's generalization ability was improved in real well logging, avoiding the accumulation of errors in serial processing, achieving more accurate T2 relaxation spectrum prediction, simplifying the well logging data processing flow, and improving inversion accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432664A_ABST
    Figure CN122432664A_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the technical field of nuclear logging, and discloses a training method of a logging model and a T2 relaxation spectrum determination method in nuclear logging, which comprises the following steps: obtaining a logging signal; intercepting a pure noise segment at the tail of the logging signal to generate real non-Gaussian noise data according to the pure noise segment; generating a pure echo train according to a preset T2 relaxation spectrum; determining a noise scaling coefficient according to the average power of the pure echo train and a preset target signal-to-noise ratio; determining noise adjustment data according to the noise scaling coefficient and the real non-Gaussian noise data, adjusting the pure echo train according to the noise adjustment data to obtain a noisy signal; constructing a training set according to the noisy signal and the preset T2 relaxation spectrum; and training the logging model based on the training set until a training termination condition is reached. The application can more accurately obtain the T2 relaxation spectrum in the logging process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of nuclear logging technology, and in particular to a method for training a logging model and a method for determining the T2 relaxation spectrum in nuclear logging. Background Technology

[0002] Nuclear magnetic resonance logging is an important tool for obtaining information on formation pore structure, fluid occurrence state, and movable fluids. The lateral relaxation characteristics of formation fluids are usually characterized by T2 relaxation spectra. However, T2 relaxation spectra are difficult to measure directly. They are usually obtained indirectly by inverting the long-sequence CPMG (Carr-Purcell-Meiboom-Gill, pulse sequence) spin echo decay signals acquired by the logging tool.

[0003] In related technologies, deep learning models are trained using only ideal echo signals as the training set. However, in real well logging environments, complex interference is often present. This leads to problems where, although the model performs well on simulation data, it is prone to physical feature distortion and decreased generalization performance in real well logging scenarios due to noise. Correspondingly, the deep learning models trained in this way usually require denoising the signal before being fed into the model in practical applications. This fragmented, sequential processing method can easily weaken or even eliminate weak but physically meaningful effective signals during the denoising stage, thus affecting the accuracy of subsequent T2 relaxation spectrum inversion and causing error accumulation. Summary of the Invention

[0004] The purpose of this application is to provide a method for training a well logging model and a method for determining the T2 relaxation spectrum in nuclear well logging, which can more accurately obtain the T2 relaxation spectrum during the well logging process.

[0005] To address the aforementioned technical problems, embodiments of this application provide a method for training a well logging model, comprising: Acquire logging signals; Extract the pure noise segment from the tail of the logging signal to generate real non-Gaussian noise data based on the pure noise segment; A pure echo train is generated based on the preset T2 relaxation spectrum; The noise scaling factor is determined based on the average power of the clean echo train and the preset target signal-to-noise ratio; Noise adjustment data is determined based on the noise scaling factor and the real non-Gaussian noise data, and the clean echo train is adjusted according to the noise adjustment data to obtain a noisy signal; A training set is constructed based on the noisy signal and the preset T2 relaxation spectrum; The well logging model is trained based on the training set until the training termination condition is met.

[0006] In some embodiments, generating a pure echo train based on a preset T2 relaxation spectrum includes: The preset T2 relaxation spectrum is sampled based on multiple sampling nodes to obtain the relaxation time base and T2 relaxation spectrum amplitude corresponding to each sampling node. The pure echo train is generated based on the relaxation time base and the T2 relaxation spectrum amplitude.

[0007] In some embodiments, the formula for determining the pure echo train includes: ; in, It is a time series. For sampling nodes j The relaxation time base, For sampling nodes j The amplitude of the T2 relaxation spectrum, M This represents the total number of sampling points.

[0008] In some embodiments, the logging model includes a filtering model and an inversion model; training the logging model based on the training set until the training termination condition is met includes: The noisy signals in the training set are filtered based on the filtering model. The filtered noisy signal is input into the inversion model to generate a predicted T2 relaxation spectrum. The loss functions of the filtering model and the inversion model are constructed based on the predicted T2 relaxation spectrum and the preset T2 relaxation spectrum, respectively. The loss function of the filtering model, the loss function of the inversion model, and the preset weights are weighted and summed to construct the total loss function of the logging model; The filtering model and / or the inversion model are adjusted according to the total loss function.

[0009] In some embodiments, the loss function formula of the filtering model includes: ; The loss function formula of the inversion model includes: ; ; ; in, The predicted T2 relaxation spectrum output by the inversion model. To preset the T2 relaxation spectrum, L 1 is the regularization function. The regularization coefficient is .δ For the preset hyperparameter threshold, n The dimension of the preset T2 relaxation spectrum.

[0010] In some embodiments, the filtering model includes a multi-layer Mamba network; the filtering process based on the filtering model for noisy signals in the training set includes: In the multi-layer Mamba network, each Mamba network performs feature processing on the input of each Mamba network based on a discretized mapping of the continuous state space. The output of each Mamba network is used as the input of the next Mamba network, and the output of the last Mamba network is used as the output of the filtering model.

[0011] In some embodiments, each layer of the multilayer structure performs feature processing on the input of each layer based on a discretized mapping of a continuous state space, including: The Mamba network in the multi-layer Mamba network is divided into multiple steps, and the feature processing is performed on the input of each step in turn. The feature processing formula includes: ; ( t ); Where A is the input-dependent discretized state evolution matrix, B is the input-dependent discretized input projection matrix, C is the input-dependent discretized output projection matrix, and D is the feedforward matrix. This is the hidden state vector from the previous step. Let be the updated hidden state vector of the current step. For the input of the current step, This is the output of the current step.

[0012] In some embodiments, the inversion model is based on a KAN network, and the forward propagation formula of the inversion model includes: ; in, Indicates the basic path weight. Indicates nonlinear weights, This represents the activation function, which is the SiLU function. clamp( x) is a numerical truncation mechanism used to truncate the input. x Limit to a preset value range.

[0013] Embodiments of this application also provide a method for determining the T2 relaxation spectrum in nuclear logging, including: The well logging model is trained using the training method described above. Predict the T2 relaxation spectrum during the logging process based on the trained logging model.

[0014] Embodiments of this application also provide an electronic device, including: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described above.

[0015] The well logging model training method in this embodiment extracts real non-Gaussian noise from real well logging signals and fuses it with the clean echo train from physical forward modeling. This allows the model to learn the noise distribution characteristics of real downhole data during the training phase, solving the domain offset problem between simulation data and real data from the data source. Correspondingly, the constructed end-to-end well logging model does not require a separate denoising step. In the use of the well logging model, it avoids the accumulation of errors from serial processing, significantly improving the model's generalization ability in real low signal-to-noise ratio well logging scenarios. This provides a data and model foundation for subsequent accurate inversion of the T2 relaxation spectrum, making the prediction of the T2 relaxation spectrum more accurate in actual well logging. Attached Figure Description

[0016] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0017] Figure 1 This is a flowchart illustrating the training method for a well logging model provided in one embodiment of this application; Figure 2 This is a flowchart illustrating a training method for a well logging model provided in another embodiment of this application; Figure 3 This is a flowchart illustrating a training method for a well logging model provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of a well logging model provided in one embodiment of this application; Figure 5 This is a schematic diagram illustrating the prediction results based on different models for multiple measured samples in one embodiment of this application; Figure 6 This is a schematic diagram illustrating the prediction results based on different models under multiple signal-to-noise ratio conditions in one embodiment of this application; Figure 7 This is a schematic diagram of the predicted T2 relaxation spectrum area under multiple signal-to-noise ratio conditions in one embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0019] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0020] In related technologies, deep learning models are trained using only ideal echo signals as the training set. However, in real well logging environments, complex interference is often present. This leads to problems where, although the model performs well on simulation data, it is prone to physical feature distortion and decreased generalization performance in real well logging scenarios due to noise. Correspondingly, the deep learning models trained in this way usually require denoising the signal before being fed into the model in practical applications. This fragmented, sequential processing method can easily weaken or even eliminate weak but physically meaningful effective signals during the denoising stage, thus affecting the accuracy of subsequent T2 relaxation spectrum inversion and causing error accumulation.

[0021] To address the aforementioned technical problems, one embodiment of this application relates to a training method for a well logging model, referring to... Figure 1 As shown, the method includes: Step 100: Obtain logging signals.

[0022] In this embodiment of the application, the logging signal can be a measurable orthogonal dual-channel (E) based on the logging equipment. X E Y Nuclear magnetic resonance logging signals.

[0023] Step 200: Extract the pure noise segment from the tail of the logging signal to generate real non-Gaussian noise data based on the pure noise segment.

[0024] By extracting the pure noise segment at the end of the signal, the pure noise segment can be processed sequentially by DC removal and energy normalization to complete the construction of real non-Gaussian noise data. This noise data can accurately reproduce the complex electromagnetic interference characteristics of real well logging downhole.

[0025] The selection of the signal tail can be set according to the actual situation, such as setting a preset duration and extracting a pure noise segment of a fixed duration from the end of the logging signal. Step 300: Generate a pure echo train based on the preset T2 relaxation spectrum.

[0026] In this embodiment, the preset T2 relaxation spectrum can be constructed based on the Bloch equation and randomly generated with a multi-peak distribution. The preset T2 relaxation spectrum can be forward modeled using a discretized kernel matrix to obtain a clean echo train with ideal attenuation and no noise interference. This clean echo train provides a reference signal that conforms to the geological physical characteristics for subsequent model training.

[0027] Step 400: Determine the noise scaling factor based on the average power of the clean echo train and the preset target signal-to-noise ratio.

[0028] In this embodiment, a target signal-to-noise ratio is set according to the requirements of the low signal-to-noise ratio scenario in actual well logging, and a noise scaling factor is calculated based on the target signal-to-noise ratio.

[0029] Specifically, first calculate the pure echo train. average signal power P signal Based on the preset target signal-to-noise ratio (SNR, Signal to Interference plus Noise Ratio), the formula is used to... Calculate the target noise power Then, take the square root of the target noise power to obtain the noise scaling factor. This achieves a precise match between the scaling factor and the target signal-to-noise ratio.

[0030] Step 500: Determine the noise scaling factor and the real non-Gaussian noise data to determine noise adjustment data, and adjust the clean echo train according to the noise adjustment data to obtain the noisy signal.

[0031] In this embodiment of the application, the noise scaling factor is... scale Multiply the noise data point-by-point with the real non-Gaussian noise data to obtain the amplitude-adjusted noise data (i.e., the noise-adjusted data). Then, multiply the noise-adjusted data with the clean echo train. yclean By performing point-by-point superposition, the noisy signal is obtained. This ensures that the signal-to-noise ratio of the noisy signal accurately meets the preset requirements.

[0032] Therefore, this application embodiment determines the noise scaling factor through quantitative calculation, allowing the signal-to-noise ratio of the noisy signal to be precisely controlled. This enables the simulation of real well logging scenarios with different low signal-to-noise ratios, enriching the scenario coverage of the training set. By fusing and superimposing clean echo trains with real non-Gaussian noise data, a noisy signal that fits the real well logging environment can be generated, providing a basis for subsequent model training. This solves to some extent the problems of physical feature distortion and decreased generalization performance caused by noise.

[0033] Among them, by using point-by-point multiplication and point-by-point superposition fusion methods, the time dimension of the noise data and the clean echo train are fully aligned, making the generated noisy signal more consistent with the superposition law of noise and effective signal in real well logging, avoiding time misalignment errors in the fusion process, and improving the authenticity of the noisy signal.

[0034] Step 600: Construct a training set based on the noisy signal and the preset T2 relaxation spectrum.

[0035] In this embodiment, noisy signals are used as model input samples, and the corresponding preset T2 relaxation spectra are used as sample labels. The training set and validation set are divided according to the preset sample ratio to achieve a one-to-one correspondence between input and label, ensuring the physical correlation of the training set.

[0036] Step 700: Train the logging model based on the training set until the training termination condition is met.

[0037] In this embodiment, the training set is input into a neural network-based well logging model. A predicted T2 relaxation spectrum is generated through forward propagation. The loss value between the prediction result and the label is calculated, and the model parameters are adjusted through backpropagation. This iterative training is repeated until the model's loss value converges to a preset threshold or the maximum number of training epochs is reached, completing the model training. Thus, the trained well logging model can be used for actual well logging.

[0038] The training method for the logging model in this application extracts real non-Gaussian noise from actual logging signals and fuses it with a clean echo train from physical forward modeling. This allows the model to learn the noise distribution characteristics of the real downhole environment during the training phase, solving the domain offset problem between simulation data and real data from the data source. Correspondingly, the constructed end-to-end logging model does not require a separate denoising step. In the use of the logging model, it avoids the accumulation of errors from serial processing, significantly improving the model's generalization ability in real low signal-to-noise ratio logging scenarios. This provides a data and model foundation for the subsequent accurate inversion of the T2 relaxation spectrum, making the prediction of the T2 relaxation spectrum more accurate in actual logging.

[0039] Reference Figure 2 As shown, in an optional embodiment of this application, generating a pure echo train based on a preset T2 relaxation spectrum includes: Step 301: Sample the preset T2 relaxation spectrum based on multiple sampling nodes to obtain the relaxation time base and T2 relaxation spectrum amplitude corresponding to each sampling node.

[0040] In this embodiment, multiple sampling nodes with equal intervals can be set according to the CPMG sequence sampling rules of nuclear magnetic resonance logging, and the preset T2 relaxation spectrum can be sampled point by point. Each sampling node corresponds to a unique relaxation time base. Simultaneously, the amplitude of the T2 relaxation spectrum at this substrate was obtained. This enables discrete sampling of the relaxation spectrum, ensuring that the sampled data is consistent with the actual sampling pattern of the logging tool.

[0041] Step 302: Generate the pure echo train based on the relaxation time base and the T2 relaxation spectrum amplitude.

[0042] Substituting the relaxation time base and T2 relaxation spectrum amplitude corresponding to all sampling nodes into the discrete integral equation, the echo amplitude of each sampling node is obtained by summation. Then, all amplitudes are arranged in time series to generate a continuous pure echo train, ensuring that the generation process of the pure echo train conforms to the lateral relaxation physical law of formation fluid.

[0043] In this embodiment, forward modeling of the preset T2 relaxation spectrum is achieved through step-by-step sampling, transforming continuous relaxation spectrum features into discrete echo train signals. This establishes a physical mapping relationship between the relaxation spectrum and the echo train, ensuring that the generated pure echo train closely matches the actual relaxation characteristics of the formation. Simultaneously, based on a sampling method with fixed sampling nodes, the time dimension of the pure echo train is consistent with the actual echo sequence acquired by the logging tool, improving the realism of subsequent noisy signals and providing a high-precision reference signal for model training.

[0044] In an optional embodiment of this application, the formula for determining the pure echo train includes: ; in, As a time series, it corresponds to the sampling time point of each echo in the CPMG sequence of nuclear magnetic resonance logging, arranged in the order of sampling to form a continuous time axis, and its interval can be consistent with the echo interval of the logging tool. For sampling nodes j The relaxation time base characterizes the lateral relaxation time characteristics of formation fluids. For sampling nodes j The amplitude of the T2 relaxation spectrum, which characterizes the proportion of fluid content at the base of that relaxation time, is a key indicator reflecting the formation porosity structure. M This represents the total number of sampling points, which can be set according to the actual situation.

[0045] In the actual calculation process, after traversing the calculation results of all sampling time points, a complete clean echo train is generated. . Reference Figure 3 As shown, in an optional embodiment of this application, the logging model includes a filtering model and an inversion model; the step of training the logging model based on the training set until the training termination condition is met includes: Step 701: Filter the noisy signals in the training set based on the filtering model.

[0046] In this embodiment, noisy signals from the training set are input into the filtering model to achieve adaptive filtering of noise in the noisy signals, while retaining weak effective signal features, and outputting filtered feature signals.

[0047] In an optional embodiment, a local feature embedding layer, such as a 1D convolutional embedding layer, can be set before the filtering model to extract local features. The noisy signal in the training set data after local feature extraction is then input into the filtering model for filtering.

[0048] Step 702: Input the filtered noisy signal into the inversion model to generate a predicted T2 relaxation spectrum through the inversion model.

[0049] The filtered feature signal is then reduced in dimension by adaptive pooling and input into the inversion model. Through the nonlinear fitting capability of the inversion model, the echo feature signal in the time domain is mapped to the T2 relaxation spectrum feature in the frequency domain, generating a predicted T2 relaxation spectrum with the same dimension as the preset T2 relaxation spectrum.

[0050] In this embodiment, the inversion model can be based on KAN (Kolmogorov Arnold Network).

[0051] Step 703: Construct the loss functions of the filtering model and the inversion model based on the predicted T2 relaxation spectrum and the preset T2 relaxation spectrum, respectively.

[0052] In this embodiment, the loss of the filtering model can be optimized by using a loss function with mean squared error (MSE) combined with L1 norm regularization to force non-negative physical constraints on the output. Specifically, the loss function formula includes: ; The loss function of the inversion model is constructed based on cosine similarity and Huber loss. Specifically, the loss function formula includes: ; ; ; in, The predicted T2 relaxation spectrum is the output of the inversion model. To preset the T2 relaxation spectrum, L 1 is the regularization function. The regularization coefficient is 0.01 (preferably in this application). δ The preset hyperparameter threshold is used to define whether the error is a "small error" or a "large error". n The dimension of the preset T2 relaxation spectrum.

[0053] Step 704: The loss function of the filtering model, the loss function of the inversion model, and the preset weights are weighted and summed to construct the total loss function of the logging model.

[0054] The total loss is obtained by superimposing the loss function of the filtering model and the loss function of the inversion model in the time domain for reconstruction. In this embodiment, the preset weight is preferably 0.5, and the total loss function is... .

[0055] Step 705: Adjust the filtering model and / or the inversion model according to the total loss function.

[0056] In this embodiment, the backpropagation algorithm can be used to pass the total loss value to the inversion model and the filtering model respectively, and then adjust the network weights and biases of the filtering model and the inversion model. The above steps are iterated repeatedly until the total loss value converges, thereby realizing the training of the model.

[0057] In this embodiment, the well logging model is divided into two sub-models, filtering and inversion, and jointly trained. This achieves end-to-end fusion of denoising and inversion, avoiding the error accumulation of serial processing in related technologies, while preserving the physical characteristics of the effective signal. By constructing model loss functions separately and weighted summing to obtain the total loss function, the model can simultaneously optimize the temporal filtering effect and inversion accuracy during training, achieving multi-task collaborative optimization, ensuring the stability of model training, and significantly improving the overall performance of the model.

[0058] In an optional embodiment of this application, before adjusting the model by combining the total loss function, the filtering model and the inversion model can be optimized and adjusted by combining the loss function of the filtering model and the loss function of the inversion model respectively.

[0059] In related solutions, actual CPMG echo sequences are usually quite long, often containing thousands of sampling points. Traditional RNN / LSTM is prone to gradient vanishing, low training efficiency, and high computational overhead when processing ultra-long sequences. While architectures such as Transformer have strong sequence modeling capabilities, their computational complexity usually increases quadratically with the sequence length, which is not conducive to efficient end-to-end modeling in long sequence scenarios.

[0060] Reference Figure 4 As shown, in an optional embodiment of this application, the filtering model includes a multi-layer Mamba network (module); the filtering process of the noisy signal in the training set based on the filtering model includes: In the multi-layer Mamba network, each Mamba network performs feature processing on the input of each Mamba network based on a discretized mapping of the continuous state space. The output of each Mamba network is used as the input of the next Mamba network, and the output of the last Mamba network is used as the output of the filtering model.

[0061] In this embodiment, the preferred number of Mamba network layers is 4, with each layer configured with d. state =16、d conv =4, expand=2. The noisy signal is first input into a 1D local feature embedding layer (kernel size preferably 7, channel dimension preferably 128) to extract the local temporal features of the noisy signal, which are used as the input of the first Mamba network. The first Mamba network performs long-sequence processing on the input features through discretization mapping of continuous state space, extracting long-distance dependent noise and effective signal features. Its output is used as the input of the second Mamba network. The subsequent second and third Mamba networks perform the above feature processing steps in sequence, and the output of each layer is used as the input of the next layer. The last layer (fourth layer) of the Mamba network fuses and optimizes the features processed in the previous layers, and outputs the filtered feature signal as the output of the entire filtering model, completing the filtering of the noisy signal.

[0062] In this embodiment, a multi-layer Mamba network is used as the filtering model. By utilizing the discretization mapping characteristics of its continuous state space, it achieves efficient processing of long sequence echo signals. For example, it can process ultra-long echo sequences with more than 2000 points in linear complexity. It can solve the gradient vanishing problem of traditional RNN / LSTM processing long sequences to a certain extent. At the same time, its linear computational complexity greatly reduces training pressure and memory overhead. Through the step-by-step transfer of input and output between layers, it realizes the step-by-step extraction from local features to global features, which can more accurately distinguish noise features and effective signal features, improve the filtering effect, and improve the inference efficiency of the model while ensuring filtering accuracy.

[0063] In an optional embodiment of this application, each layer of the multilayer structure performs feature processing on the input of each layer based on a discretized mapping of a continuous state space, including: The Mamba network in the multi-layer Mamba network is divided into multiple steps, and the feature processing is performed on the input of each step in turn. The feature processing formula includes: ; ( t ); Where A is the input-dependent discretized state evolution matrix, used to memorize the state features of historical signals, and its dimension matches the state dimension of the Mamba network; B is the input-dependent discretized input projection matrix, realizing the dimensional mapping from input features to the state space; C is the input-dependent discretized output projection matrix, realizing the dimensional mapping from state space features to the output space; D is the feedforward matrix, which directly reflects the influence of input features on output features and supplements the feature information of state evolution. This is the hidden state vector from the previous step, used to store the feature processing state from the previous step; is the updated latent state vector of the current step, and is the feature vector after fusing the current step input and the historical state; This is the input for the current step, i.e., the feature signals that are progressively input within the layer; This is the output of the current step, i.e., the output signal after feature processing in the current step.

[0064] In the feature processing of the Mamba network, each step is based on the hidden state vector of the previous step. and current step input ( t ), updated through the state evolution formula to obtain , and then combine and ( t Calculate the output of the current step. , As the next step Continue participating in the calculation, and after traversing step by step, obtain the output of the Mamba network at this layer.

[0065] In this embodiment, the processing of long sequence features is made interpretable and reproducible through explicit step-by-step feature processing. Furthermore, the Mamba network can effectively capture the time-dependent features of long sequence echo signals. Based on the discretization matrix design of the input, the Mamba network can adaptively adjust the matrix parameters according to different noisy signals, thereby improving the adaptive filtering capability for different noise features and further enhancing the generalization of the filtering model.

[0066] Reference Figure 4 As shown, in an optional embodiment of this application, the inversion model is based on a KAN network, and the forward propagation formula of the KAN network includes: ; in, This represents the basic path weights, used to achieve a linear mapping of input features and ensure the network's basic fitting ability. Represents nonlinear weights, used to achieve nonlinear spline fitting of input features, thereby improving the network's ability to nonlinearly approximate complex multi-peak T2 relaxation spectra; The activation function is SiLU, which replaces the traditional B-spline basis function, thus ensuring both nonlinear fitting capability and improving network training efficiency. clamp( x) is a numerical truncation mechanism used to truncate the input. x To limit the input to a preset numerical range, this embodiment restricts the input to the range of -10 to 10 based on the physical characteristics of the T2 relaxation spectrum, in order to prevent numerical explosion caused by input values ​​that are too large or too small.

[0067] In the actual forward propagation process, input features x First, it is processed by the SiLU activation function and then compared with the basic path weights. W base Multiply to obtain the basic path output; simultaneously input... x through clamp(x) After numerical truncation, the signal is processed by the SiLU activation function and then combined with nonlinear weights. W spline Multiplying the two results in the output of the nonlinear spline path. Adding the output of the basic path to the output of the nonlinear spline path yields the final output of the KAN network, which is the reconstructed predicted T2 relaxation spectrum.

[0068] In this embodiment, a modified KAN network is used as the frequency domain inversion model. Through a dual-path forward propagation design, combined with linear mapping and nonlinear spline fitting, the network's nonlinear approximation accuracy for complex multi-peak T2 relaxation spectra is significantly improved, solving the problem of insufficient fitting ability in traditional MLPs. The activation function is limited to the SiLU function, balancing fitting ability and training efficiency, ensuring stable convergence of the geological signal inversion process. This is achieved by introducing... clamp(x) The numerical truncation mechanism limits the numerical range at the input level, solving the problems of numerical explosion and gradient collapse that are prone to occur in the native KAN network in the processing of extremely weak signals in geosciences, and ensuring the engineering stability of the inversion model.

[0069] Another embodiment of this application relates to a method for determining the T2 relaxation spectrum in nuclear logging, including: The well logging model is trained using the training method described above. Predict the T2 relaxation spectrum during the logging process based on the trained logging model.

[0070] In this embodiment, a composite training set incorporating real non-Gaussian noise is constructed to perform end-to-end joint training on a logging model composed of a multi-layer Mamba filtering model and a modified KAN inversion model until the model training converges, resulting in a trained logging model. This model is then deployed to a logging data processing terminal. Long-sequence CPMG spin echo signals acquired by the field nuclear magnetic resonance logging tool are directly input into the deployed logging model. Through end-to-end forward propagation, the model sequentially completes time-domain filtering and frequency-domain inversion of the signals, directly outputting the predicted T2 relaxation spectrum. This relaxation spectrum accurately characterizes the lateral relaxation properties of formation fluids, reflecting the formation's pore structure, fluid occurrence state, and mobile fluid information.

[0071] The T2 relaxation spectrum determination method in nuclear magnetic resonance logging in this embodiment has similar technical effects to the above-mentioned logging model training method. In addition, it realizes direct prediction of T2 relaxation spectrum during logging based on the trained logging model, without the need for a separate denoising step, which simplifies the logging data processing flow and improves data processing efficiency. Because the trained model has learned the non-Gaussian noise characteristics of real downhole, it has strong robustness in real logging scenarios with low signal-to-noise ratio, effectively avoids physical feature distortion, and significantly improves the inversion accuracy of T2 relaxation spectrum. The output results of the model can accurately reflect the physical characteristics of the formation, providing high-precision basic data for formation evaluation and enhancing the application value of nuclear magnetic resonance logging technology in oil and gas exploration, geological evaluation and other fields.

[0072] In one specific embodiment, actual nuclear magnetic resonance logging is obtained. and From the channel data, the last 2000 sampling points (the extremely weak signal area at the tail end) are extracted to construct a realistic noise database. Forward modeling generates 20,000 echoes with a length of 2000 and an echo interval of... A clean echo signal of 0.2ms is used to dynamically generate a composite signal with a signal-to-noise ratio range of 10-35dB during training, as referenced. Figure 4 The well logging model network structure shown in the diagram involves batch normalization of the input well logging signal (CPMG echo signal) before it enters a one-dimensional convolutional layer. The output dimension of the feature extraction layer is set to... After layer normalization, the input is fed into the filtering model (Mamba backbone network). The Mamba network consists of 4 layers, with state dimensions set. The data processed by the Mamba network is then adaptively averaged and pooled before being input into the inversion network (KAN inversion head). The KAN network consists of two layers (128...). The system outputs a 64-dimensional T2 relaxation spectrum. Layer normalization is applied between the first few layers of the KAN network, and spline correlation weights are initialized with a normal distribution with a standard deviation of 0.001 to reduce the risk of divergence in the early stages of training. The batch size is set to 16, using the AdamW optimizer with a learning rate of 1e-4. An anti-explosion mechanism is implemented: if the loss of the current batch contains NaN anomalies, the update is skipped, and the model gradient (Grad Norm) is strictly clipped to below 0.1 during backpropagation. After training, inputting real extremely weak logging signals into the device allows for the direct output of high-precision formation data. Relaxation spectrum, evaluation results as follows Figure 5 As shown (actual sample) Relaxation spectrum (preset) Relaxation spectrum inversion results and Evaluation metrics chart (25dB) Figure 5 As can be seen, the test model in this application has good inversion results.

[0073] Reference Figure 6 As shown, Figure 6 The results show a comparison of time-domain and spectral-domain performance of representative labeled simulation samples under 25dB, 15dB, and 10dB conditions. The results indicate that the logging model (end-to-end Mamba-KAN model) trained in this embodiment outperforms the comparison method in terms of time-domain RMSE, MAE, and spectral-domain R², RMSE, and cosine similarity. It also exhibits better fidelity under 25dB and 10dB conditions in terms of spectral-domain area error and total energy error of the relaxation spectrum. This demonstrates that the present invention can simultaneously improve time-domain denoising and T² relaxation spectrum reconstruction accuracy in low to medium signal-to-noise ratio scenarios. 。

[0074] Reference Figure 7 As shown in the figure, the energy (area) of the T2 relaxation spectrum is compared under different signal-to-noise ratios. It can be seen that there are good fits at 25dB, 15dB and 10dB.

[0075] Another embodiment of this application relates to an electronic device, see reference Figure 8 As shown, it includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.

[0076] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0077] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0078] Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.

[0079] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0080] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. A training method for a well logging model, characterized in that, include: Acquire logging signals; Extract the pure noise segment from the tail of the logging signal to generate real non-Gaussian noise data based on the pure noise segment; A pure echo train is generated based on the preset T2 relaxation spectrum; The noise scaling factor is determined based on the average power of the clean echo train and the preset target signal-to-noise ratio; Noise adjustment data is determined based on the noise scaling factor and the real non-Gaussian noise data, and the clean echo train is adjusted according to the noise adjustment data to obtain a noisy signal; A training set is constructed based on the noisy signal and the preset T2 relaxation spectrum; The well logging model is trained based on the training set until the training termination condition is met.

2. The training method for the well logging model according to claim 1, characterized in that, The step of generating a pure echo train based on a preset T2 relaxation spectrum includes: The preset T2 relaxation spectrum is sampled based on multiple sampling nodes to obtain the relaxation time base and T2 relaxation spectrum amplitude corresponding to each sampling node. The pure echo train is generated based on the relaxation time base and the T2 relaxation spectrum amplitude.

3. The training method for the well logging model according to claim 2, characterized in that, The formula for determining the pure echo train includes: ; in, It is a time series. For sampling nodes j The relaxation time base, For sampling nodes j The amplitude of the T2 relaxation spectrum, M This represents the total number of sampling points.

4. The training method for the well logging model according to any one of claims 1-3, characterized in that, The logging model includes a filtering model and an inversion model; training the logging model based on the training set until the training termination condition is met includes: The noisy signals in the training set are filtered based on the filtering model. The filtered noisy signal is input into the inversion model to generate a predicted T2 relaxation spectrum. The loss functions of the filtering model and the inversion model are constructed based on the predicted T2 relaxation spectrum and the preset T2 relaxation spectrum, respectively. The loss function of the filtering model, the loss function of the inversion model, and the preset weights are weighted and summed to construct the total loss function of the logging model; The filtering model and / or the inversion model are adjusted according to the total loss function.

5. The training method for the well logging model according to claim 4, characterized in that, The loss function formula of the filtering model includes: ; The loss function formula of the inversion model includes: ; ; ; in, The predicted T2 relaxation spectrum output by the inversion model. To preset the T2 relaxation spectrum, L 1 is the regularization function. The regularization coefficient is . δ For the preset hyperparameter threshold, n The dimension of the preset T2 relaxation spectrum.

6. The training method for the well logging model according to claim 4, characterized in that, The filtering model includes a multi-layer Mamba network; the filtering process based on the filtering model to process the noisy signals in the training set includes: In the multi-layer Mamba network, each Mamba network performs feature processing on the input of each Mamba network based on a discretized mapping of the continuous state space. The output of each Mamba network is used as the input of the next Mamba network, and the output of the last Mamba network is used as the output of the filtering model.

7. The training method for the well logging model according to claim 6, characterized in that, Each layer of the multi-layer structure performs feature processing on its input based on a discretized mapping of a continuous state space, including: The Mamba network in the multi-layer Mamba network is divided into multiple steps, and the feature processing is performed on the input of each step in turn. The feature processing formula includes: ; ( t ); Where A is the input-dependent discretized state evolution matrix, B is the input-dependent discretized input projection matrix, C is the input-dependent discretized output projection matrix, and D is the feedforward matrix. This is the hidden state vector from the previous step. Let be the updated hidden state vector of the current step. For the input of the current step, This is the output of the current step.

8. The training method for the well logging model according to claim 4, characterized in that, The inversion model is based on a KAN network, and the forward propagation formula of the inversion model includes: ; in, Indicates the basic path weight. Indicates nonlinear weights, This represents the activation function, which is the SiLU function. clamp( x) is a numerical truncation mechanism used to truncate the input. x Limit to a preset value range.

9. A method for determining the T2 relaxation spectrum in nuclear logging, characterized in that, include: The well logging model is trained based on the training method of the well logging model as described in any one of claims 1-8; Predict the T2 relaxation spectrum during the logging process based on the trained logging model.

10. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 8, or to perform the method as described in claim 9.