Multi-scale underground nuclear magnetic resonance detection signal denoising method and system

Through the multi-scale underground MRI detection signal denoising method, the unsupervised denoising model of generator and discriminator is used to solve the problem of noise model adaptability, and the signal quality and detection accuracy are improved, which is suitable for complex environments.

CN120428343BActive Publication Date: 2025-08-29JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510942133.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-08-29
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

In the existing underground nuclear magnetic resonance detection technology, the noise model relies on prior information and cannot effectively adapt to noise changes under different environmental conditions, affecting signal quality and exploration accuracy.

Method used

The multi-scale underground nuclear magnetic resonance detection signal denoising method is used to extract multi-scale features through the encoder, generate fake signals using the generator, and the discriminator judges the authenticity, and restores the signal structure through the decoder, combining the self-attention mechanism and residual denoising technology to form an unsupervised denoising model.

Benefits of technology

Without pure signal pairing, it effectively eliminates multiple types of noise, improves signal quality and detection accuracy, is suitable for complex environments, and reduces artificial deviations and labeled data costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428343B_ABST
    Figure CN120428343B_ABST
Patent Text Reader

Abstract

The present application relates to the field of underground magnetic resonance detection technology, specifically a multi-scale underground nuclear magnetic resonance detection signal denoising method and system. It includes obtaining underground nuclear magnetic signal data, converting the underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum diagram; using an encoder to extract multi-scale features from the underground nuclear magnetic signal spectrum diagram by dynamically adjusting the convolution kernel size, strengthening the important information features of the multi-scale features through the self-attention mechanism, and compressing them into a latent space to form a real signal after residual denoising; using a generator to generate a fake signal from a low-dimensional noise vector in the latent space; using a discriminator to judge the authenticity of the fake signal and feed it back to the generator, and the generator adjusts its own parameters according to the feedback so that the fake signal is close to the real signal; and restoring the spatial structure of the fake signal through a decoder to obtain a denoised signal. This method does not require pure signal pairing and is suitable for complex underground nuclear magnetic detection environments, improving signal quality and detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of underground magnetic resonance detection of the Earth, and specifically to a multi-scale underground nuclear magnetic resonance detection signal denoising method and system. Background Art

[0002] Magnetic resonance sounding (MRS) has become an important non-invasive method for groundwater exploration, particularly suitable for assessing groundwater reserves, mobility, and physical properties. By exploiting the response of hydrogen nuclei in groundwater to external magnetic fields, MRS can obtain groundwater information, including the location, thickness, and quality of aquifers. However, during actual detection, underground magnetic resonance signals are often interfered with by various noise sources, including power frequency noise, random noise, and spike noise. These noises can severely degrade signal quality, reducing the accuracy and reliability of groundwater exploration.

[0003] While traditional denoising methods can mitigate the effects of noise to a certain extent, they often struggle to handle complex and nonlinear noise types. Furthermore, these methods rely on prior noise models and are unable to effectively adapt to noise variations under varying environmental conditions. Summary of the Invention

[0004] The embodiments of the present application provide a multi-scale underground nuclear magnetic resonance detection signal denoising method and system to solve the problem that the system cannot effectively adapt to noise changes under different environmental conditions due to reliance on a priori noise models.

[0005] According to a first aspect of the present application, a multi-scale underground nuclear magnetic resonance detection signal denoising method includes:

[0006] Acquiring underground nuclear magnetic signal data, and converting the underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum graph;

[0007] An encoder is used to extract multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are then enhanced with important information features through a self-attention mechanism and compressed into a latent space after residual denoising to form a real signal.

[0008] A generator is used to generate a fake signal from a low-dimensional noise vector in the latent space;

[0009] A discriminator is used to determine the authenticity of the forged signal and feed it back to the generator, including: multi-scale deep feature extraction of the forged signal and the real signal, the extracted features are sequentially processed by the channel attention module, the spatial attention module, and the multi-scale feature attention module, and the output features of the three attention modules are weighted fused. The weighted fused features are passed through the global classification module to form a scalar, which is used to indicate the authenticity of the forged signal;

[0010] The generator adjusts its own parameters based on the feedback so that the forged signal is close to the real signal;

[0011] The spatial structure of the forged signal is restored by the decoder to obtain the denoised signal.

[0012] According to an embodiment of the present application, a generator is used to generate a forged signal from a low-dimensional noise vector in a latent space, including:

[0013] The low-dimensional noise vector is mapped to a high-dimensional space through three fully connected layers to form a one-dimensional feature vector;

[0014] Convert the one-dimensional feature vector into a tensor including depth dimension and spatial dimension through reshape operation;

[0015] The tensor is reduced in depth and increased in space through multiple deconvolution layers to generate a fake signal that matches the size of the real signal, and is jump-connected layer by layer from shallow to deep layers to splice shallow features and deep features.

[0016] According to an embodiment of the present application, multi-scale deep feature extraction is performed on the forged signal and the real signal, including:

[0017] Extract multi-scale features;

[0018] Through the attention mechanism, the feature channels of multi-scale features are weighted to form the first output;

[0019] Generate spatial weights for the first output through a spatial attention mechanism to form the second output;

[0020] The non-local relationship of the features of the second output is calculated through the non-local attention mechanism, and enhanced to form the third output;

[0021] forming a fourth output by dynamically convolving the third output;

[0022] The features of the fourth output are convolved to adjust the feature dimension through the residual connection, and are added to the dynamic convolution output to form the fourth output.

[0023] According to an embodiment of the present application, extracting multi-scale features includes:

[0024] Receive the real signal and the fake signal output by the generator;

[0025] Multiple convolution kernels of different sizes are used in parallel to perform convolution operations on the input real signal and the fake signal to obtain multiple features with the same spatial dimension and different channel dimensions. The multiple features are spliced ​​along the channel dimension to form a spliced ​​tensor.

[0026] According to an embodiment of the present application, weighting the feature channels of the multi-scale features to form a first output through the attention mechanism includes:

[0027] Each channel feature of the multi-scale feature is compressed into a scalar, passed through two fully connected layers, and the spatial dimension is expanded to the same shape as the channel feature of the multi-scale feature through the channel attention weight, and multiplied point by point with the channel feature of the multi-scale feature to obtain the first output.

[0028] According to an embodiment of the present application, generating a spatial weight for the first output through a spatial attention mechanism to form a second output includes:

[0029] The global average pooling tensor is obtained by averaging the channels through global average pooling;

[0030] The maximum pooling tensor is obtained by finding the maximum value of the channel through maximum pooling;

[0031] The global average pooling tensor and the maximum pooling tensor are concatenated in the channel dimension, and the spatial weights are output through convolution;

[0032] The channel dimension is expanded by weight broadcasting the spatial weight, and the spatial weight of the expanded channel dimension is multiplied point by point with the output feature of the channel attention mechanism to obtain the second output.

[0033] According to an embodiment of the present application, the non-local relationship of features of the second output is calculated by a non-local attention mechanism, and enhanced to form a third output, including:

[0034] The second output undergoes a convolution operation of the two feature maps, and then generates an attention matrix through dot product calculation. The features are weighted by the attention matrix to obtain the third output.

[0035] According to an embodiment of the present application, a fourth output is formed by dynamically convolving the third output, including: adaptively convolving the convolution kernel generated by the dynamic convolution of the third output to obtain the features after adaptive convolution, adjusting the dimension of the features after adaptive convolution through the residual connection, and adding them to the features after adaptive convolution to obtain the fourth output.

[0036] According to an embodiment of the present application, the extracted features are processed sequentially by a channel attention module, a spatial attention module, and a multi-scale feature attention module, including:

[0037] The channel attention module is used to capture the importance of the feature maps corresponding to the extracted features in the channel dimension;

[0038] The feature map is weighted in the spatial dimension through the spatial attention module;

[0039] The multi-scale feature attention module captures the local and global features of the feature map and pays attention to features of different scales.

[0040] A multi-scale underground nuclear magnetic resonance detection signal denoising system according to an embodiment of the second aspect of the present application includes:

[0041] A conversion module, used to convert the acquired underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum diagram;

[0042] An unsupervised denoising model, comprising an encoder, a generator, a discriminator, and a decoder. The encoder extracts multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are reinforced with important information features through a self-attention mechanism and then compressed into a latent space to form a true signal after residual denoising.

[0043] The generator generates a fake signal from a low-dimensional noise vector in the latent space;

[0044] The discriminator determines the authenticity of the forged signal and feeds it back to the generator, including: extracting multi-scale deep features from the forged signal and the real signal, processing the extracted features in sequence through a channel attention module, a spatial attention module, and a multi-scale feature attention module, and performing weighted fusion on the output features of the three attention modules. The weighted fused features are passed through a global classification module to form a scalar, which is used to indicate the authenticity of the forged signal;

[0045] The generator adjusts its own parameters according to the feedback so that the forged signal is close to the real signal;

[0046] The decoder restores the spatial structure of the forged signal to obtain a denoised signal.

[0047] The embodiments of the present application have at least the following technical effects:

[0048] This method avoids the tedious process of manual adjustment and noise modeling, reduces the cost and time of acquiring labeled data, and is less susceptible to human bias. It can recover the original signal from complex noise without noise labels. It can effectively eliminate multiple types of noise, retain key information in the signal, and significantly improve signal quality and detection accuracy in groundwater resource exploration.

[0049] It does not require pure signal pairing and is suitable for complex underground nuclear magnetic detection environments, and can effectively improve signal quality and detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Flowchart of the multi-scale underground nuclear magnetic resonance detection signal denoising method provided in an embodiment of the present application;

[0051] Figure 2 This is a structural block diagram of the multi-scale underground nuclear magnetic resonance detection signal denoising system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of this application more clear, this application is further described in detail. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0053] In groundwater exploration, the application of noise denoising technology can help clearly identify the signal characteristics of groundwater layers and reduce the interference of noise on the signal. Existing methods need to rely on prior noise models and cannot effectively adapt to noise changes under different environmental conditions.

[0054] The multi-scale underground nuclear magnetic resonance detection signal denoising method and system provided in the embodiments of the present application, by setting up an unsupervised network model, can achieve noise elimination of underground nuclear magnetic resonance signals by learning the inherent data regularity characteristics of underground nuclear magnetic resonance signal data. The local and global features of the signal are extracted through the adaptive convolution layer, and the high-dimensional noisy signal is mapped to the latent space. The generator generates a forged signal based on the latent space and restores the spatial structure of the signal through the decoder. The discriminator judges the authenticity of the signal through multi-scale feature extraction. The feature extraction and denoising effects are further enhanced by the triple attention mechanism.

[0055] When denoising underground magnetic resonance detection signals, there is no need for pure signal pairing. This method is suitable for complex underground nuclear magnetic detection environments and can effectively improve signal quality and detection accuracy.

[0056] See also Figure 1 The flowchart of a multi-scale underground nuclear magnetic resonance detection signal denoising method provided by an embodiment of the present application is shown. The multi-scale underground nuclear magnetic resonance detection signal denoising method includes:

[0057] S101 acquires underground nuclear magnetic signal data and converts the underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum;

[0058] S102 uses an encoder to extract multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are strengthened with important information features through the self-attention mechanism and compressed into the latent space after residual denoising to form the real signal.

[0059] S103 uses a generator to generate a fake signal from a low-dimensional noise vector in the latent space;

[0060] S104 uses a discriminator to determine the authenticity of the forged signal and feeds it back to the generator, including: extracting multi-scale deep features from the forged signal and the real signal, processing the extracted features in sequence through a channel attention module, a spatial attention module, and a multi-scale feature attention module, and performing weighted fusion on the output features of the three attention modules. The weighted fused features are passed through a global classification module to form a scalar, which is used to indicate the authenticity of the forged signal;

[0061] The S105 generator adjusts its own parameters based on the feedback, making the forged signal close to the real signal;

[0062] S106 restores the spatial structure of the forged signal through a decoder to obtain a denoised signal.

[0063] First, underground nuclear magnetic resonance (NMR) signal data is collected and converted into a NMR spectrum. For example, this data can be converted into a NMR spectrum using a short-time Fourier transform (STFT). The shape is [C, H, W], where C is the number of channels, H and W represent the spatial dimensions of the signal, with H representing the height and W representing the width. [C, H, W] describes a three-dimensional tensor. To more clearly describe this application, let's specify the data shape. Assume the input dimensions are [1, 128, 256]. After passing through the encoder's adaptive convolution layer, the convolution kernel size is dynamically adjusted to extract local and global signal features. The output shape is [192, 128, 256].

[0064] In one embodiment, the underground nuclear magnetic signal spectrogram is dynamically resized to extract multi-scale features. For example, 3×3, 5×5, and 7×7 convolution kernels are used to extract multi-scale features. The multi-scale features are then concatenated to produce an output shape of [192, 128, 256]. The encoder's self-attention mechanism enhances important features, resulting in an output shape of [192, 128, 256]. The encoder's residual denoising module preserves important signal features and removes noise, resulting in an output shape of [192, 128, 256]. This is then compressed into a latent space through the encoder's fully connected layers. The latent space here is a low-dimensional latent space, for example, with an output shape of

[512] . The latent space is a low-dimensional vector space used to store the main features and structure of the input data. It is obtained by encoding and dimensionality reduction of the original data, retaining the most valuable information while removing redundant or unimportant components. In this embodiment, the data in the latent space is the real signal. The final encoder output shape is [batch_size, z_dim]. Here batch_size represents the number of samples processed in one forward pass, and z_dim is the dimension of the latent space.

[0065] In one embodiment, S103 uses a generator to generate a forged signal from a low-dimensional noise vector in the latent space, including:

[0066] The low-dimensional noise vector is mapped to a high-dimensional space through three fully connected layers to form a one-dimensional feature vector;

[0067] The one-dimensional feature vector is converted into a tensor including depth dimension and spatial dimension through the reshaping process;

[0068] The tensor is reduced in depth and increased in space through multiple deconvolution layers to generate a fake signal that matches the size of the real signal. It is connected layer by layer through jumps from shallow to deep layers to concatenate shallow and deep features.

[0069] The encoder output serves as the input to the generator, with a shape of [batch_size, z_dim]. z_dim is the dimension of the latent space, typically a small value such as 100 or 200, representing the low-dimensional noise required to generate signals from the latent space. The first fully connected layer maps the low-dimensional noise vector to a higher-dimensional space, for example, with an output shape of [batch_size, 512]. The second fully connected layer increases the output dimension, helping the generator capture more complex features and further expanding the feature space, for example, with an output shape of [batch_size, 1024]. The third fully connected layer expands the feature space, generating higher-dimensional feature maps, ensuring that the generator can learn more complex signal patterns. The output shape is [batch_size, 2048]. The output of the third fully connected layer is passed to a reshape layer, converting the one-dimensional feature vector into a two-dimensional feature map suitable for convolutional layer input. The .view() operation reshapes the feature vector into a tensor with a shape of [batch_size, 2048, 8, 8]. .view() reshapes a tensor to a specified shape while maintaining the total number of elements in the tensor. The reshape operation converts the one-dimensional feature vector into a tensor with both depth and spatial dimensions. The tensor then passes through multiple deconvolution layers, gradually reducing the depth dimension and increasing the spatial dimension. For example, the multiple deconvolution layers use five deconvolution layers, with the output from the reshape operation serving as the input to the first deconvolution layer. The deconvolution operation expands the spatial dimension and reduces the number of channels, resulting in an output of [batch_size, 1024, 16, 16]. The output of the first deconvolution layer serves as the input to the second deconvolution layer, further expanding the spatial dimensions and reducing the number of channels, providing more spatial information for the subsequent generated signal. The output shape is [batch_size, 512, 32, 32]. The output of the second deconvolution layer serves as the input to the third deconvolution layer, changing the output shape to [batch_size, 256, 64, 64]. The output of the third deconvolution layer serves as the input to the fourth deconvolution layer, with the output shape being [batch_size, 128, 128, 128], reducing the number of channels to 128. The output of the fourth deconvolution layer serves as the input to the fifth deconvolution layer, further expanding the spatial dimensions through deconvolution, and finally restoring the shape of the forged signal to match the size of the real signal. This step generates the final signal output, which has been restored to the appropriate spatial dimensions. The first four deconvolution layers use 3×3, 5×5, and 7×7 convolution kernels to extract multi-scale features.Features from shallower layers, such as the first and second deconvolution layers, are directly connected to the outputs of deeper layers through skip connections. These shallow features are then concatenated or added to the deeper features. This concatenation of shallow and deep features enhances signal detail preservation and multi-scale feature fusion, helping the generator retain more detailed information. A ReLU activation function is applied after each deconvolution layer, followed by a Tanh activation function. The generated signal is in the range [-1, 1]. The final output of the generator is [batch_size, 1, H, W].

[0070] This jump connection, which concatenates or adds shallow features to deep features, helps the generator retain more detailed information by establishing a direct connection between deep and shallow features. During the deconvolution process, low-level features in the input signal will be lost in the deep network. The jump connection ensures that the detailed information of the signal is retained in the generated signal by directly transferring the shallow features to the deep features. The jump connection can improve the quality of the generated signal when processing complex signals and better retain the original characteristics of the input free induction attenuation signal.

[0071] In one embodiment, a discriminator is used to determine the authenticity of a forged signal and feed it back to a generator, including: performing multi-scale deep feature extraction on the forged signal and the real signal, the extracted features are sequentially processed by a channel attention module, a spatial attention module, and a multi-scale feature attention module, and the output features of the three attention modules are weighted fused. The weighted fused features are passed through a global classification module to form a scalar, which is used to represent the authenticity of the forged signal.

[0072] The discriminator inputs real and fake signals. For ease of understanding, the real and fake signals are represented as an input tensor X of shape [B, C, H, W], where B is the batch size, C is the number of channels, H and W are the spatial dimensions of the signal, H is the height, and W is the width. In this example, we assume that the number of input channels is C = 64, and the spatial dimensions are H = 32 and W = 32. After multi-scale convolution.

[0073] In one embodiment, multi-scale deep feature extraction is performed on the forged signal and the real signal, including: extracting multi-scale features; weighting the feature channels of the multi-scale features through an attention mechanism to form a first output; generating spatial weights for the first output through a spatial attention mechanism to form a second output; calculating the non-local relationship of the features of the second output through a non-local attention mechanism, and enhancing them to form a third output; forming a fourth output by dynamically convolving the third output; adjusting the dimension of the features of the fourth output through convolution through a residual connection, and adding them to the dynamic convolution output to form the fourth output.

[0074] Multi-scale deep feature extraction uses convolution kernels of different sizes in parallel, such as 3×3, 5×5, 7×7, and deformable convolutions. Each convolution operation outputs features of the same spatial size and a specified depth. The output tensor has a shape of [B, O, H, W], where O is the number of output channels corresponding to each convolution kernel. For example: 3×3 convolution: input shape [B, 64, 32, 32], output shape [B, 128, 32, 32]; 5×5 convolution: input shape [B, 64, 32, 32], output shape [B, 128, 32, 32]; 7×7 convolution: input shape [B, 64, 32, 32], output shape [B, 128, 32, 32]; deformable convolution: input shape [B, 64, 32, 32], output shape [B, 128, 32, 32]. The features output by multi-scale convolutions are concatenated along the channel dimension. The concatenated tensor shape is [B, 512, 32, 32], which represents 128 × 4 channels.

[0075] Through the attention mechanism, the feature channels of multi-scale features are weighted to form the first output; specifically, the feature channels of multi-scale features are weighted through global pooling and fully connected layers, and the feature dimensions change. For example, if the input shape is [B, 512, 32, 32], the features of each channel are compressed into a scalar through global pooling, and the shape becomes [B, 512, 1, 1].

[0076] There can be multiple fully connected layers. For example, in one embodiment, two fully connected layers are included. The first fully connected layer has an input shape of [B, 512, 1, 1] and an output shape of [B, 64, 1, 1]. The second fully connected layer has an input shape of [B, 64, 1, 1] and an output shape of [B, 512, 1, 1]. The channel attention weights are used to expand the spatial dimensions to the same shape as the channel features of the multi-scale features, and are point-wise multiplied with the channel features of the multi-scale features to obtain the first output. The channel attention weights are expanded to [B, 512, 32, 32] through weight broadcasting and are point-wise multiplied with the channel features of the multi-scale features. The output tensor shape is [B, 512, 32, 32].

[0077] A spatial attention mechanism is used to generate spatial weights for the first output to form a second output. In one embodiment, the spatial attention mechanism combines global average pooling and maximum pooling to generate spatial weights. The input shape is [B, 512, 32, 32]. Global average pooling is used to average the channels, resulting in an output shape of [B, 1, 32, 32]. Maximum pooling is used to maximize the channels, resulting in an output shape of [B, 1, 32, 32]. The two tensors are concatenated to form a shape of [B, 2, 32, 32]. The input shape after the 7×7 convolution is [B, 2, 32, 32], and the output spatial weights are [B, 1, 32, 32]. Weight broadcasting is used to expand the spatial weights to [B, 512, 32, 32]. The second output is obtained by point-wise multiplication of the spatial weights of the expanded channel dimension with the output features of the channel attention mechanism. The output tensor shape is [B, 512, 32, 32].

[0078] In one embodiment, the non-local relationship of the features of the second output is calculated by a non-local attention mechanism and enhanced to form a third output. The non-local relationship of the features is calculated and enhanced by a non-local attention mechanism. The input shape is [B, 512, 32, 32]. After the convolution operation of the two feature maps, the 1×1 convolution output shape of the first feature map is [B, 256, 32, 32], and the 1×1 convolution output shape of the second feature map is [B, 256, 32, 32]. The attention matrix is ​​generated by dot product calculation, and the shape of the attention matrix is ​​[B, 256, 256]. The features are weighted by the attention matrix, and the output shape is [B, 512, 32, 32].

[0079] In one embodiment, the fourth output is formed by dynamically convolving the third output, and the features are adaptively convolved through the dynamically generated convolution kernel. The input shape is [B, 512, 32, 32]. The weights of the dynamic convolution are used to generate adaptive convolution weights through the sub-network, and the shape of the adaptive convolution weights becomes [B, 128, 3, 3].

[0080] The fourth output features are convolved using a residual connection to adjust the feature dimensions. These features are then added to the dynamic convolution output to form the fourth output. The input features are resized to the output feature dimensions using a 1×1 convolution and added to the dynamic convolution output. After the 1×1 convolution, the input shape changes from [B, 64, 32, 32] to the output shape [B, 128, 32, 32]. The dynamic convolution output is added to the resized input, resulting in an output tensor with a shape of [B, 128, 32, 32].

[0081] The final features are transformed nonlinearly through the activation function, the feature dimension remains unchanged, and the shape of the output tensor is [B, 128, 32, 32].

[0082] In one embodiment, the extracted features are processed sequentially by a channel attention module, a spatial attention module, and a multi-scale feature attention module, including:

[0083] The channel attention module is used to capture the importance of the feature maps corresponding to the extracted features in the channel dimension;

[0084] The feature map is weighted in the spatial dimension through the spatial attention module;

[0085] The multi-scale feature attention module captures the local and global features of the feature map and pays attention to features of different scales.

[0086] Channel attention module implementation process: Capture the importance of feature maps in the channel dimension and enhance the feature expression of key channels. Use global average pooling and global maximum pooling to aggregate features in the spatial dimension and generate channel-level descriptions:

[0087] ,

[0088] ,

[0089] , Refers to a tensor of shape (C, 1, 1), where: 1×1 is the spatial dimension, indicating that it is compressed into a point in the spatial dimension, is the number of channels, represents the input features, represents the global average pooling of channel attention, represents the global maximum pooling of channel attention, To represent the global average response of each channel, is the global maximum response of each channel, and in the embodiments of this application, Represents different input features, and Input to the shared fully connected network, the output is:

[0090] ,

[0091] here is the ReLU function, is the Sigmoid activation function, It is the first fully connected layer that reduces the dimension of the input channel-level description. is the second fully connected layer, which restores the features after dimensionality reduction to the original number of channels. As the channel attention weight, the output of the channel attention module is weighted channel by channel. for: .

[0092] The spatial attention module weights the feature map in the spatial dimension and focuses on the important local area. It mainly includes: first, feature map aggregation, and input features aggregated along the channel dimension. , generating the input feature map of spatial attention , as shown below:

[0093] ,

[0094] in , represents the global average pooling of spatial attention, represents the global maximum pooling of spatial attention, represents the fusion operation,

[0095] The second is attention generation, which converts the input feature map of spatial attention Input a 7×7 convolution kernel to extract the spatial attention weight, as shown in the following formula:

[0096] ,

[0097] is the spatial attention weight.

[0098] The third is spatial weighting. As the spatial attention weight, it is multiplied pixel by pixel with the input feature. , is a two-dimensional convolution operation, is the Sigmoid activation function, is the output of the spatial attention module.

[0099] Multi-scale feature attention module: It captures local and global features through convolution kernels of different scales, and pays attention to features of different scales. It includes:

[0100] Multi-scale convolution: Use convolution kernels of different sizes, such as 3×3 convolution, 5×5 convolution, and 7×7 convolution to perform convolution operations on the input features and extract multi-scale features, as shown in the following convolution formula:

[0101] ,

[0102] ,

[0103] for The output feature map of the convolution, for The output feature map of the convolution, for The output feature map of the convolution, For two-dimensional convolution operations, convolution kernels of sizes 3×3, 5×5, and 7×7 are used.

[0104] Feature fusion: Multi-scale features are concatenated according to the channel dimension, as shown in the following formula:

[0105] ,

[0106] Represents multi-scale features, Represents a fusion operation.

[0107] Attention weight generation: multi-scale features A global pooling operation is performed, and then multi-scale attention weights are generated through a shared fully connected network, as shown in the following formula:

[0108]

[0109] For fully connected network operation, is the multi-scale attention weight.

[0110] Multi-scale weighting: multi-scale attention weights Applications and multi-scale features , as shown below:

[0111] ,

[0112] Represents the output of the multi-scale feature attention module.

[0113] Finally, the triple attention module is fused and the input features are The outputs of the three modules are weighted and fused through the channel attention module, spatial attention module and multi-scale feature attention module in sequence to generate the final output. , as shown below:

[0114] ,

[0115] in are learnable weights. is the output of the channel attention module, is the output of the spatial attention module, is the output of the multi-scale feature attention module.

[0116] In one embodiment, the weighted fused features are passed through a global classification module to form a scalar.

[0117] The global classification module first performs a global pooling operation, compressing the spatial dimensions of each channel (H×W) into a scalar. Global pooling preserves the global information of each channel, reduces the spatial dimensions, and reduces the number of parameters. Secondly, the globally pooled features are flattened into a vector, which is then mapped through a fully connected layer, ultimately outputting a scalar representing the authenticity of the input signal. Finally, a sigmoid activation function is used to compress the scalar value to the range [0, 1], representing the prediction result.

[0118] In one embodiment, the generator adjusts its own parameters based on feedback, making the forged signal closer to the real signal. The generator outputs a high-dimensional feature tensor, which is passed directly to the decoder as input. The decoder's task is to restore the spatial structure of the forged signal output by the generator through deconvolution. The decoder receives a potential forged signal from the generator, which has a shape of [B, 256×16×16]. The decoder first uses the first fully connected layer to expand the forged signal from a low-dimensional space (i.e., D=256) to a high-dimensional feature space of [B, 256×8×8]. The feature vector is expanded through a second fully connected layer, with an output shape of [B, 256×16×16]. The spatial structure of the forged signal is gradually restored. Deconvolution layers are used to increase the size of the feature map while reducing the number of channels, thereby restoring the spatial dimensions of the signal.

[0119] The deconvolution operation is performed layer by layer to gradually restore the spatial structure. For example, four deconvolution layers are used: the first deconvolution layer: expands the spatial dimension and reduces the number of channels. The input shape is [B, 256, 16, 16] and the output shape is [B, 128, 32, 32]; the second deconvolution layer: continues to expand the spatial dimension and reduce the number of channels. The input shape is [B, 128, 32, 32] and the output shape is [B, 64, 64, 64]; the third deconvolution layer: continues to upsample and finally restores the spatial dimension. The input shape is [B, 64, 64, 64] and the output shape is [B, 32, 128, 128]; the fourth deconvolution layer: further refines the feature map. The input shape is [B, 32, 128, 128] and the output shape is [B, 16, 256, 256].

[0120] To enhance signal recovery capabilities, a self-attention mechanism is introduced after the four deconvolution layers, focusing on key information areas in the input signal. A multi-head attention mechanism is introduced after the self-attention mechanism to effectively improve feature representation by computing attention in different subspaces in parallel. The input is the output of the four deconvolution operations [B, 16, 256, 256], and the output maintains the shape [B, 16, 256, 256]. A ReLU activation function is applied after each deconvolution layer, introducing nonlinear transformations that enable the model to learn complex signal features while maintaining the input and output unchanged. Finally, the Tanh activation function is used to restore the signal to its original range [-1, 1]. The resulting clean signal shape is [B, 3, 256, 256].

[0121] See also Figure 2 As shown, the embodiment of the present application provides a multi-scale underground nuclear magnetic resonance detection signal denoising system, comprising:

[0122] A conversion module, used to convert the acquired underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum diagram;

[0123] An unsupervised denoising model, comprising an encoder, a generator, a discriminator, and a decoder. The encoder extracts multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are reinforced with important information features through a self-attention mechanism and then compressed into a latent space to form a true signal after residual denoising.

[0124] The generator generates a fake signal from a low-dimensional noise vector in the latent space;

[0125] The discriminator determines the authenticity of the forged signal and feeds it back to the generator. This includes: extracting multi-scale deep features from the forged and real signals. The extracted features are sequentially processed by the channel attention module, the spatial attention module, and the multi-scale feature attention module. The output features of the three attention modules are weighted and fused. The weighted fused features are then passed through the global classification module to form a scalar, which is used to indicate the authenticity of the forged signal.

[0126] The generator adjusts its own parameters based on the feedback so that the forged signal is close to the real signal;

[0127] The decoder recovers the spatial structure of the forged signal to obtain the denoised signal.

[0128] It can be understood that the unsupervised denoising model is an unsupervised denoising model after training, which generates a variety of underground nuclear magnetic signals and adds different types of noise to them to form noisy signals, and uses data enhancement methods to generate more signals with different noise characteristics to improve the generalization ability of the unsupervised denoising model; all the generated signals are made into an underground nuclear magnetic signal dataset; the unsupervised denoising model is trained using the underground nuclear magnetic signal dataset to obtain the trained unsupervised denoising model, and the trained unsupervised denoising model is used to perform denoising operations on the measured underground nuclear magnetic signals.

[0129] The encoder of the unsupervised denoising model uses adaptive convolution kernels, with dynamically adjusted kernel sizes, to capture multi-scale features of the input signal. This design helps the unsupervised denoising model capture both local (short-term) and global (long-term) features, particularly features at different scales within the feature spectrum. The size and shape of the convolution kernel are dynamically adjusted based on the input signal's characteristics (such as frequency and amplitude) to better adapt to varying signal properties. To adapt to noisy signals, the input signal is first processed through a set of adaptive convolutional layers to generate a preliminary feature representation.

[0130] The generator generates realistic signals from a latent space (typically a low-dimensional noise vector). The generator uses latent space mapping to map the latent space noise vector to a higher-dimensional feature space through multiple fully connected layers. Deconvolution layers then map the noise back to the target signal space, gradually restoring the signal space. Skip connections connect shallow features with deep features, allowing the generator to retain more detailed information. Multi-scale feature enhancement, combined with convolution kernels of different scales, captures signal features at different scales.

[0131] The decoder needs to match the encoder, and uses two fully connected layers in the decoder to map the low-dimensional latent space vector to the high-dimensional feature space.

[0132] The processing of underground NMR signal data by the encoder, decoder, generator, and discriminator corresponds to the description of a multi-scale underground NMR detection signal denoising method. Unsupervised denoising models can eliminate noise from underground NMR signals by learning the inherent data patterns of the data. This avoids the tedious process of manual adjustment and noise modeling, reduces the cost and time of acquiring labeled data, and is less susceptible to human bias.

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

Claims

1. A multi-scale underground nuclear magnetic resonance detection signal denoising method, characterized in that: The method includes: Acquiring underground nuclear magnetic signal data, and converting the underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum graph; An encoder is used to extract multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are then enhanced with important information features through a self-attention mechanism and compressed into a latent space after residual denoising to form a real signal. A generator is used to generate a fake signal from a low-dimensional noise vector in the latent space; A discriminator is used to determine the authenticity of the forged signal and feed it back to the generator, including: multi-scale deep feature extraction of the forged signal and the real signal, the extracted features are sequentially processed by the channel attention module, the spatial attention module, and the multi-scale feature attention module, and the output features of the three attention modules are weighted fused. The weighted fused features are passed through the global classification module to form a scalar, which is used to indicate the authenticity of the forged signal; The generator adjusts its own parameters based on the feedback so that the forged signal is close to the real signal; The spatial structure of the forged signal is restored by the decoder to obtain the denoised signal.

2. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 1, characterized in that: The generator is used to generate a fake signal from a low-dimensional noise vector in the latent space, including: The low-dimensional noise vector is mapped to a high-dimensional space through three fully connected layers to form a one-dimensional feature vector; Convert the one-dimensional feature vector into a tensor including depth dimension and spatial dimension through reshape operation; The tensor is reduced in depth and increased in space through multiple deconvolution layers to generate a fake signal that matches the size of the real signal, and is jump-connected layer by layer from shallow to deep layers to splice shallow features and deep features.

3. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 1, characterized in that: Perform multi-scale deep feature extraction on fake and real signals, including: Extract multi-scale features; Through the attention mechanism, the feature channels of multi-scale features are weighted to form the first output; Generate spatial weights for the first output through a spatial attention mechanism to form the second output; The non-local relationship of the features of the second output is calculated through the non-local attention mechanism, and enhanced to form the third output; forming a fourth output by dynamically convolving the third output; The features of the fourth output are convolved to adjust the feature dimension through the residual connection, and are added to the dynamic convolution output to form the fourth output.

4. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 3, characterized in that: Extracting multi-scale features includes: Receive the real signal and the fake signal output by the generator; Multiple convolution kernels of different sizes are used in parallel to perform convolution operations on the input real signal and the fake signal to obtain multiple features with the same spatial dimension and different channel dimensions. The multiple features are spliced ​​along the channel dimension to form a spliced ​​tensor.

5. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 3, characterized in that: Through the attention mechanism, the feature channels of multi-scale features are weighted to form the first output, including: Each channel feature of the multi-scale feature is compressed into a scalar, passed through two fully connected layers, and the spatial dimension is expanded to the same shape as the channel feature of the multi-scale feature through the channel attention weight, and multiplied point by point with the channel feature of the multi-scale feature to obtain the first output.

6. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 3, characterized in that: The spatial attention mechanism is used to generate spatial weights for the first output to form the second output, including: The global average pooling tensor is obtained by averaging the channels through global average pooling; The maximum pooling tensor is obtained by finding the maximum value of the channel through maximum pooling; The global average pooling tensor and the maximum pooling tensor are concatenated in the channel dimension, and the spatial weights are output through convolution; The channel dimension is expanded by weight broadcasting the spatial weight, and the spatial weight of the expanded channel dimension is multiplied point by point with the output feature of the channel attention mechanism to obtain the second output.

7. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 3, characterized in that: The non-local relationship of the features of the second output is calculated through the non-local attention mechanism, and enhanced to form the third output, including: The second output undergoes a convolution operation of the two feature maps, and then generates an attention matrix through dot product calculation. The features are weighted by the attention matrix to obtain the third output.

8. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 3, characterized in that: The fourth output is formed by dynamically convolving the third output, including: adaptively convolving the convolution kernel generated by the dynamic convolution on the third output to obtain the features after adaptive convolution, adjusting the dimension of the features after adaptive convolution through residual connection, and adding them to the features after adaptive convolution to obtain the fourth output.

9. The multi-scale underground nuclear magnetic resonance detection signal denoising method according to claim 1, characterized in that: The extracted features are processed in sequence by the channel attention module, the spatial attention module, and the multi-scale feature attention module, including: The channel attention module is used to capture the importance of the feature maps corresponding to the extracted features in the channel dimension; The feature map is weighted in the spatial dimension through the spatial attention module; The multi-scale feature attention module captures the local and global features of the feature map and pays attention to features of different scales.

10. A multi-scale underground nuclear magnetic resonance detection signal denoising system, characterized in that: include: A conversion module, used to convert the acquired underground nuclear magnetic signal data into an underground nuclear magnetic signal spectrum diagram; An unsupervised denoising model, comprising an encoder, a generator, a discriminator, and a decoder. The encoder extracts multi-scale features from the underground nuclear magnetic signal spectrum by dynamically adjusting the convolution kernel size. The multi-scale features are reinforced with important information features through a self-attention mechanism and then compressed into a latent space to form a true signal after residual denoising. The generator generates a fake signal from a low-dimensional noise vector in the latent space; The discriminator determines the authenticity of the forged signal and feeds it back to the generator, including: extracting multi-scale deep features from the forged signal and the real signal, processing the extracted features in sequence through a channel attention module, a spatial attention module, and a multi-scale feature attention module, and performing weighted fusion on the output features of the three attention modules. The weighted fused features are passed through a global classification module to form a scalar, which is used to indicate the authenticity of the forged signal; The generator adjusts its own parameters according to the feedback so that the forged signal is close to the real signal; The decoder restores the spatial structure of the forged signal to obtain a denoised signal.

Citation Information

Patent Citations

  • DAS in-well exploration data noise suppression method based on iteration multi-scale attention network

    CN113935467A

  • Ultra-low field magnetic resonance imaging system and method thereof

    US20250076437A1