A method and system for noise suppression of magnetotelluric signals based on complexity driving
By introducing a complexity-aware mechanism and a multi-path attention residual denoising network, the problem of noise interference in magnetotelluric signal processing is solved, achieving efficient denoising and accurate signal recovery.
Patent Information
- Application Number
- CN202511106149.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-08-08
AI Technical Summary
Existing magnetotelluric signal processing methods have limited effectiveness when faced with complex noise interference. Traditional methods are prone to signal distortion and cannot effectively remove strong interference components. Existing deep learning models ignore the differences in the complexity of data segments, resulting in uneven processing.
A complexity-aware mechanism is introduced to construct a multi-path, structurally heterogeneous feature recovery network. The path activation depth and modeling strategy are adaptively scheduled through a complexity-aware gating unit. A multi-path attention residual denoising network is adopted, which combines a shallow convolution module, a channel structure modeling module and a global attention modeling module to dynamically adjust the processing path of signal segments.
It effectively removes strong interference components, improves signal recovery quality and reconstruction accuracy, preserves target information, and significantly improves the recovery quality and reconstruction accuracy of magnetotelluric signals.
Smart Images

Figure CN120610324B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of magnetotelluric signal processing, and particularly relates to a magnetotelluric signal noise suppression method and system based on complexity driving. BACKGROUND
[0002] Magnetotelluric sounding (MT) is a mainstream geophysical exploration method, which is used to study the electrical properties and distribution characteristics of underground rock layers by observing natural alternating electromagnetic fields, and is used to analyze geological structures and detect the positions of deep ore bodies. Due to the interference of numerous complex field communication facilities and human noise, combined with the characteristics of wide frequency range and weak signal amplitude of magnetotelluric signals, magnetotelluric signals are easily disturbed by various noises, which seriously affects the quality of collected data and cannot truly and accurately reflect the underground electrical structure.
[0003] Emerging modern signal processing techniques, such as Hilbert-Huang transform, mathematical morphological filtering, synchronous time series dependence, signal subspace enhancement, wavelet transform, sparse decomposition, fractal-entropy and clustering, K-SVD dictionary learning, etc., are applied to this field, which can improve the quality of magnetotelluric data to some extent. However, the traditional method has limited effect on strong interference noise suppression, which easily causes distortion of effective signals; the existing deep learning denoising model mostly adopts a unified processing strategy, ignoring the complexity differences of different data segments, resulting in uneven processing effect; in the feature extraction process, key information extraction is insufficient, and the interlayer information transmission mechanism is designed unreasonably, which easily leads to loss of useful information or residual noise. SUMMARY
[0004] The present application aims to solve the problems of over-processing and low precision in traditional magnetotelluric denoising methods, and provides a magnetotelluric signal noise suppression method and system based on complexity driving. The technical scheme of the present application introduces a complexity perception mechanism and sets up a complexity perception gating unit, fuses a complexity evaluation mechanism, and constructs a multi-path, structure-heterogeneous feature recovery network. By introducing the complexity perception gating module, the adaptive scheduling of path activation depth and modeling strategy for different signal segments is realized. This strategy is different from the traditional symmetric diffusion modeling method. Based on the signal complexity score, the present application dynamically regulates the participating modules, forms a complexity driving mechanism, so that high complexity signal segments obtain deeper modeling and fine-grained reconstruction, while low complexity signal segments are only subjected to light path rapid recovery, thereby realizing precise adaptation of path structure and modeling capability, effectively stripping strong interference components, avoiding over-processing, and simultaneously enhancing the ability to maintain target information, significantly improving the recovery quality and reconstruction precision of magnetotelluric signals.
[0005] To this end, the present application provides the following technical scheme:
[0006] In one aspect, the application provides a complexity-driven noise suppression method for magnetotelluric signals, comprising the following steps:
[0007] S1: Constructing a sample library, constructing a sample library for model training and segmenting the sample signals, wherein the sample library at least includes a noisy signal sample set and a corresponding target noise profile sample set;
[0008] S2: Calculating the complexity feature CS of each segment of noisy signal, wherein the complexity feature CS is used to control the path scheduling mechanism in the multi-path attention residual denoising network;
[0009] S3: Constructing and training a denoising model based on the multi-path attention residual denoising network, wherein the noisy signal segment and the complexity feature CS are input into the multi-path attention residual denoising network;
[0010] The multi-path attention residual denoising network is connected in parallel by a plurality of structurally heterogeneous feature restoration modules to form different main branches, and the outputs of each main branch are cooperatively input into the output layer to output the denoised signal or the noise profile; the feature restoration modules corresponding to different main branches are respectively a shallow convolution module CBL, a channel structure modeling module MACNet, and a global attention modeling module DHVT, and a complexity-aware gating unit with the complexity feature CS as input is arranged on each main branch, and the output signal of the complexity-aware gating unit cooperates with the noisy signal segment to input the feature restoration module of the main branch;
[0011] The path scheduling mechanism guides whether the feature restoration module of the main branch participates in data processing according to the output result of the complexity-aware gating unit on the main branch;
[0012] S4: Using the trained denoising model based on the multi-path attention residual denoising network to denoise the measured magnetotelluric signals.
[0013] Preferably, the path scheduling mechanism is based on the module activation factor output by the complexity-aware gating unit to adaptively determine whether the feature restoration module of the main branch participates in data processing according to the hard activation strategy;
[0014] The mathematical model of the complexity-aware gating unit is: wherein, and are weight and bias constants for controlling the output interval and response curve shape of the sigmoid function; is the input complexity feature;
[0015] The hard activation strategy is: if the module activation factor If greater than or equal to a preset threshold, the feature recovery module of the main branch is activated to participate in data processing; otherwise, it does not participate in data processing.
[0016] Preferably, the complexity-aware gating unit determines its module parameters after training, so that:
[0017] When , the module activation factors of the three main branches are all greater than or equal to a preset threshold, the shallow convolutional module CBL, the channel structure modeling module MACNet and the global attention modeling module DHVT are all activated;
[0018] When , the shallow convolutional module CBL and the channel structure modeling module MACNet are activated;
[0019] When , only the shallow convolutional module CBL is activated.
[0020] It can be further known from the above that the technical scheme of the present application further designs and optimizes the multi-layer sparse structure: the first sparse layer is the CBL module, which is particularly suitable for low complexity segments and is used for preliminary capture of large range noise features, with wide convolution kernel and few channels to ensure fast perception of the overall noise profile; the second sparse layer is the improved MACNet structure (composed of 1x1 bypass convolution, DSConv and fine-grained multi-path feature refining branch), which mainly processes medium complexity regions and focuses on channel recalibration and spatial detail extraction, and the multi-path structure introduces rich gradient flow in the training stage, significantly enhancing the feature expression capability; the third sparse layer is the global attention modeling module DHVT, which faces high complexity segments. Through the above technical scheme, the present application realizes accurate suppression of complex non-Gaussian magnetotelluric noise and high-fidelity recovery of weak effective signals by combining the complexity-driven path adaptation strategy.
[0021] Preferably, the complexity feature CS is the normalized result of five complexity indicators: local variation rate, spectral entropy, sparsity, energy density and autocorrelation, specifically as follows:
[0022] Define the ith noisy signal segment , s is the sliding window step, L is the window length, j is the time, is the signal sampling point corresponding to time point j;
[0023] The local variation rate of the ith noisy signal segment is : , is the signal sampling point corresponding to time point j+1;
[0024] The local variation rate of the ith noisy signal segment spectral entropy of the frequency spectrum of the noise signal segment : , , is the Fourier-transformed frequency domain coefficient of the ith noise signal segment , k is a frequency index, represents the energy proportion of the corresponding frequency point, the spectral entropy reflects the complexity of the energy distribution of the frequency spectrum, and the greater the value is, the more dispersed the frequency spectrum is and the more uniform the energy distribution is;
[0025] the sparsity of the ith noise signal segment : , , respectively represent the L1 norm and the L2 norm of the signal segment ;
[0026] the energy density of the ith noise signal segment : ;
[0027] the autocorrelation of the ith noise signal segment : , wherein, represents the mean value of the noise signal segment ;
[0028] The formula of the complexity feature CS is: , ;
[0029] satisfies , is the weight of each complexity index.
[0030] The technical scheme of the present application preferably uses five complexity indexes of local variation rate, spectral entropy, sparsity, energy density and autocorrelation to construct the complexity feature CS. The main consideration is as follows: the indexes in this group have good complementarity in the time domain, the frequency domain and the statistical feature level, and can reflect the difference between noise and effective components in the magnetotelluric signal from different angles. Among them, the local variation rate and the autocorrelation describe the time continuity and the structure of the signal, the spectral entropy and the sparsity reflect the frequency domain distribution and the information complexity, and the energy density measures the signal intensity feature. The combined use can improve the accuracy and robustness of the complexity estimation, and provide a reliable basis for the dynamic structure regulation of the subsequent module.
[0031] Preferably, the output layer is a proportionally weighted sum of the outputs of the shallow convolutional module CBL, the channel structure modeling module MACNet and the global attention modeling module DHVT, which are fused into a unified feature representation, or the outputs of the shallow convolutional module CBL, the channel structure modeling module MACNet and the global attention modeling module DHVT are spliced in the channel dimension and then input to a 1×1 convolutional fusion module.
[0032] Preferably, the channel structure modeling module MACNet is composed of three parallel sub-branches;
[0033] The first sub-branch is provided with a 1×1 bypass convolution;
[0034] The second sub-branch is a depth separable convolution branch DSConv, which is provided with a 1×1 normal convolution, a K×K depth convolution and a 1×1 pointwise convolution in sequence;
[0035] The third sub-branch is a fine-grained multi-path feature refining branch FMFRB;
[0036] Each sub-branch in the module MACNet is embedded with a complexity-aware gating subunit, which adaptively calculates a sub-branch activation factor according to the complexity feature CS. The sub-branch activation factor is applied using a soft activation mechanism, which is used to represent the participation degree of each sub-branch in the current complexity region. That is, the outputs of each sub-branch are multiplied by the corresponding sub-branch activation factor, then spliced in the channel dimension, and finally fused through a 1×1 convolution.
[0037] Preferably, the convolutional modules and the max pooling layers in the shallow convolutional module CBL are arranged alternately in sequence, and the convolutional module is provided with a convolutional layer, a batch normalization layer and a LeakyReLU activation layer in sequence.
[0038] Preferably, the multi-head attention interaction module in the global attention modeling module DHVT respectively assigns activation factors to three types of Token markers according to the complexity feature CS, and the three types of Token markers are a channel guide marker vector (Head Token), a local patch representation vector (Patch Token) and a class marker vector (Class Token). The activation factors are set as:
[0039] ;
[0040] wherein, is a complexity segmentation threshold; is a smoothing function used to realize soft activation, controls the slope of the activation function, Activation factors of local fragment representation vector Patch Token, class label vector ClassToken and channel guide label vector Head Token respectively;
[0041] Further, based on the activation factors, the three types of Token labels are activated and replace the original three types of Token labels of the multi-head attention interaction module, and the original algorithm of the multi-head attention interaction module is executed again.
[0042] In the second aspect, the present application provides a noise reduction system based on the above-mentioned magnetotelluric signal noise suppression method, comprising:
[0043] A sample library construction module constructs a sample library for model training and performs segment processing on sample signals, and the sample library at least includes a noisy signal sample set and a corresponding target noise profile sample set;
[0044] A complexity feature CS calculation module is used to calculate the complexity feature CS of each segment of noisy signal, and the complexity feature CS is used for path scheduling mechanism in the multi-path attention residual denoising network;
[0045] A denoising module construction and training module is used to construct and train a denoising model based on the multi-path attention residual denoising network, wherein the noisy signal segment and the complexity feature CS are input into the multi-path attention residual denoising network;
[0046] The multi-path attention residual denoising network is connected in parallel by a plurality of structurally heterogeneous feature recovery modules to form different main branches, and the outputs of each main branch are cooperatively input into an output layer to output a denoised signal or a noise profile; the feature recovery modules corresponding to different main branches are respectively a shallow convolution module CBL, a channel structure modeling module MACNet and a global attention modeling module DHVT, and a complexity-aware gating unit with the complexity feature CS as input is arranged on each main branch, and the output signal of the complexity-aware gating unit cooperatively inputs the feature recovery module of the main branch where the noisy signal segment is located;
[0047] The path scheduling mechanism guides whether the feature recovery module of the main branch participates in data processing according to the output result of the complexity-aware gating unit on the main branch;
[0048] A denoising module is used to utilize the trained denoising model based on the multi-path attention residual denoising network to denoise the measured magnetotelluric signal.
[0049] In the third aspect, the present application provides a computer storage medium storing a computer program, wherein the computer program is called by a processor to realize the steps of the above-mentioned magnetotelluric signal noise suppression method.
[0050] Compared with the prior art, the present application has the following technical effects:
[0051] The present application introduces complexity features as the core basis of dynamic structure regulation, mainly based on its effective characterization ability of signal disturbance degree in time domain, frequency domain and statistical level. The feature has regional sensitivity and modeling guidance, and the soft / hard activation control of each module of the main branch can be realized accordingly, so that the network can adaptively adjust the modeling path and structure response when facing different complexity inputs, and the modeling ability and computational efficiency are considered. The overall network is composed of three sparse modules, which are lightweight convolution module CBL, channel structure modeling module MACNet and global attention modeling module DHVT. The three modules are complementary in the receptive field range and modeling granularity, and realize multi-path dynamic fusion through complexity driving.
[0052] In addition, the technical scheme of the present application further optimizes the MACNet to set multiple sub-branches inside, introduces complexity to regulate the participation degree, so that the network activates fine structure branches in high complexity areas, and retains efficient paths in low complexity areas, improving the adaptability and expression of channel modeling; and the preferred DHVT adjusts the participation intensity of various Tokens based on complexity, and constructs a phased attention response mechanism, which effectively reduces redundant calculation while maintaining global modeling capability. Through the cooperative design of the above mechanisms, the model shows better structural flexibility and denoising performance when processing magnetotelluric signals in a strong noise background. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flowchart provided by an embodiment of the present application.
[0054] Figure 2 is a network architecture diagram provided by an embodiment of the present application.
[0055] Figure 3 is a denoising effect diagram of simulated noisy data by the present application.
[0056] Figure 4 is a denoising effect diagram of measured data by the present application.
[0057] Figure 5 is a diagram of the original apparent resistivity-phase curve and the apparent resistivity-phase curve processed by the method of the present application of the measured data, wherein a diagram is an original apparent resistivity curve diagram and an apparent resistivity curve diagram processed by the method of the present application of the measured data in the xy direction, b diagram is an original apparent resistivity curve diagram and an apparent resistivity curve diagram processed by the method of the present application of the measured data in the yx direction, c diagram is a phase curve diagram and a phase curve diagram processed by the method of the present application of the measured data in the xy direction, and d diagram is a phase curve diagram and a phase curve diagram processed by the method of the present application of the measured data in the yx direction. DETAILED DESCRIPTION
[0058] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. The technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0059] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the sequence in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0061] The present application aims to solve the problem of complex and strong noise interference in magnetotelluric signals, and proposes a multi-path attention residual denoising network (MARD-Net) based on complexity driving for magnetotelluric data denoising processing. The method combines complexity evaluation mechanism, constructs multi-path and structure heterogeneous feature recovery network, and realizes adaptive scheduling of path activation depth and modeling strategy for different signal segments by introducing complexity perception gating module. The MARD-Net network also draws on the modeling idea of forward noise and reverse recovery in diffusion model, and optimizes the construction of forward diffusion process in the training stage to generate step-by-step disturbance supervision signals.
[0062] To this end, the complexity-driven magnetotelluric signal noise suppression method provided by the embodiments of the present application comprises the following steps:
[0063] S1: Construct a sample library, construct a sample library for model training and segment the sample signal, the sample library at least includes a noisy signal sample set and a corresponding target noise profile sample set.
[0064] In some embodiments, by analyzing the noise type of the magnetotelluric data, a set of noise profile time sequence samples of triangular wave, charging and discharging triangular wave, pulse wave and square wave with different noise width are constructed by using different mathematical functions, respectively, with the same segment length (such as 200), the noise amplitude range between-100000 and 100000, and the noise width different; the time sequence position of each set of noise profile is changed one by one to obtain a noise profile sample library with different noise waveform positions and the same segment length of 200; the amplitude of each type of noise profile sample library is changed to obtain a noise profile sample library with different amplitudes of the same noise. The Gaussian white noise with the same length and amplitude close to the measured magnetotelluric interference-free data is selected as the pure signal sample library, and the amplitude range is between-600 and 600, which is used to construct the pure signal sample library. The pure signal sample library and the noise profile sample library are added one by one to obtain a noisy signal sample library.
[0065] It should be understood that the pure signal sample library, noise profile sample library and noisy signal sample library constructed above are only examples of the present application. In other feasible embodiments, the pure signal sample library, noise profile sample library and noisy signal sample library constructed by other means also meet the technical requirements of the present application and fall within the protection scope of the present application.
[0066] As in some embodiments, the forward perturbation mechanism based on the diffusion model is used to construct a multi-stage denoising task by gradually injecting noise into the original signal, thereby improving the generalization ability and robustness of the network. Specifically, starting from the target noise profile, the pure signal perturbation is gradually introduced according to the preset proportion to generate a multi-stage noisy signal sequence. This process simulates the generation mechanism of noisy signal and is used for step-by-step reconstruction supervision in the training stage to construct the inverse diffusion mapping relationship from the noisy signal to the target noise profile.
[0067] Let the original noise profile be , a series of noisy samples are generated by a pre-defined Gaussian diffusion process step by step , satisfying , where is the attenuation factor of the step in the diffusion process, represents the standard Gaussian noise. Further, the network training process takes the noisy sample as input and the original noise profile as supervision target to train its ability to predict noise disturbance. This training mechanism is equivalent to learning the mapping from any diffusion stage to the original signal, which provides prior support for the subsequent multi-path attention residual denoising process, and cooperates with the complexity-driven dynamic path control strategy to realize the joint modeling of different noise stages and path structures.
[0068] After constructing the sample library, this embodiment selects the noisy signal as input and the noise profile as output; in other feasible embodiments, the denoised signal can also be selected as output, which is a technical means that can be implemented in the field, and the present invention does not specifically limit it.
[0069] S2: Calculate the complexity feature CS of each noisy signal segment. This complexity feature CS is used for the path scheduling mechanism in the multipath attention residual denoising network.
[0070] In this embodiment of the invention, the complexity feature CS is defined as the normalized result of five complexity indices: local rate of change, spectral entropy, sparsity, energy density, and autocorrelation, as detailed below:
[0071] Define the i-th noisy signal segment s is the sliding window step size, L is the window length, and j is the time. Let j be the signal sampling point corresponding to time point j.
[0072] The i-th noisy signal segment Local rate of change : .
[0073] The i-th noisy signal segment Spectral entropy : ,in, , For the i-th noisy signal segment The frequency domain coefficients after Fourier transform, where k is the frequency index. It represents the energy percentage at the corresponding frequency point. Spectral entropy reflects the complexity of the spectrum energy distribution. The larger the value, the more dispersed the spectrum and the more uniform the energy distribution.
[0074] The i-th noisy signal segment sparsity : , , Representing signal segments respectively The L1 norm and L2 norm.
[0075] The i-th noisy signal segment Energy density : .
[0076] The i-th noisy signal segment Autocorrelation : ,in, Indicates noisy signal segment The mean.
[0077] The formula of the complexity feature CS is: , . Wherein, satisfies , is the weight of each complexity index, that is, experience setting or obtained by verifying the set.
[0078] It should be understood that in other feasible embodiments, the complexity feature can also fuse other complexity indexes or use other complexity indexes to replace part of the complexity indexes, and the technical idea and principle are unchanged, and the present application does not make specific limitations.
[0079] S3: constructing and training a noise reduction model based on a multi-path attention residual denoising network, wherein the noisy signal segment and the complexity feature CS input the multi-path attention residual denoising network. The network main body of the multi-path attention residual denoising network provided in the embodiment is composed of three structurally heterogeneous feature recovery paths in parallel, which are respectively adapted to the signal characteristics of different complexity levels. The feature recovery modules (sparse modules) corresponding to different main branches are respectively shallow convolution module CBL, channel structure modeling module MACNet and global attention modeling module DHVT, and a complexity perception gating unit with the complexity feature CS as input is arranged on each main branch, and the output signal of the complexity perception gating unit cooperates with the noisy signal segment to input the main branch.
[0080] Wherein, the low complexity path (shallow convolution module CBL) is a convolution module and a maximum pooling layer arranged in staggered mode, which is used for quickly extracting smooth background features; the medium complexity path introduces the MACNet module, which combines 1x1 convolution, depth separable convolution and multi-branch feature refining unit to enhance the structure modeling capability; the high complexity path is configured with a double-branch hybrid visual Transformer (DHVT) structure to improve the modeling effect of long-distance dependence and channel-level correlation.
[0081] The mathematical model of the complexity perception gating unit is: , wherein, and are weight and bias constants, which are used to control the output interval and response curve shape of the sigmoid function; is the input complexity feature value. If the module activation factor of the complexity perception gating unit of the main branch is greater than or equal to a preset threshold, the feature recovery module of the main branch is activated to participate in data processing; otherwise, it does not participate in data processing.
[0082] In network training, by adaptively adjusting the module parameters and of the complexity perception gating unit, the module activation factor , prompting different main branches to obtain different module activation factors under the input complexity characteristic value , and then guide the feature recovery module activation of the main branch. When , the module activation factors of the three main branches are all greater than or equal to the preset threshold, the shallow convolutional module CBL, the channel structure modeling module MACNet and the global attention modeling module DHVT are all activated; when , the shallow convolutional module CBL and the channel structure modeling module MACNet are activated; when , only the shallow convolutional module CBL is activated. Experimental results show that the proposed method is superior to traditional methods in terms of signal-to-noise ratio improvement, structure preservation and signal detail recovery, and has good generalization ability and practical application value. It should be understood that the complexity characteristic value value range and the activation result of each module are feasible ways for the application to test and deduce, and other feasible embodiments directly according to the module activation factor or adaptively adjust the above value range according to the accuracy requirement in different applications, which also falls within the protection scope of the present application.
[0083] As shown in the left part of Figure 2 , the convolutional modules and the max pooling layers in the shallow convolutional module CBL are alternately arranged, and in some embodiments, the number of each group of convolutional modules and max pooling layers is determined according to the accuracy requirement and experimental results. Among them, the convolutional module is sequentially provided with a convolutional layer, a batch normalization layer and a LeakyReLU activation layer, and in order to more clearly show its processing process, the mathematical model is exemplified as follows:
[0084] First, the input data is processed by the convolutional layer to obtain the convolutional layer output , , , wherein and represent the weights and biases, respectively, represents the convolution operation;
[0085] Second, the output of the convolutional layer is input into the batch normalization layer, and the mathematical model of the batch normalization layer is: ; wherein is the output of the convolutional layer after the batch normalization layer, and are the learnable parameters in the batch normalization layer BN, represents the batch normalization layer (which can accelerate the convergence of the network and also avoid the phenomenon of gradient dispersion) satisfies:
[0086]
[0087] wherein, is the batch sample size of input, , respectively represent the average value and standard deviation of the output under the batch sample, is a constant, generally a very small constant to prevent the denominator from being zero.
[0088] Finally, the output of the batch normalization layer is processed by the activation function LeakyReLU, specifically:
[0089]
[0090] wherein, is the input of the activation function LeakyReLU, that is, the output of the batch normalization layer of the batch sample , is a constant, usually a small constant. It should be understood that the preferred activation function LeakyReLU of the embodiment is an improvement of ReLU, and in other feasible embodiments, typical activation functions include sigmoid, tanh and rectified linear unit (ReLU).
[0091] In summary, the first sparse layer shallow convolutional module CBL of the embodiment sets the convolutional layer to perform local linear mapping on the input signal, extract spatial or temporal features; the batch normalization layer normalizes the mean and variance of each small batch of activation values, reduces the internal covariate shift, stabilizes the training and accelerates the convergence; the nonlinear mapping layer introduces nonlinear expression capability for the network, so that the model can fit complex functions and weak signals. The cooperation of the three can significantly improve the feature extraction quality, training stability and convergence speed of the network.
[0092] As shown in the middle part of Figure 2 , the channel structure modeling module MACNet is composed of three parallel sub-branches; the first sub-branch is provided with a 1x1 bypass convolution; the second sub-branch is a depth separable convolution branch DSConv, which is provided with a 1x1 ordinary convolution, a KxK depth convolution and a 1x1 pointwise convolution in sequence; the third sub-branch is a fine-grained multi-path feature refining branch FMFRB. First, the input features are split into a plurality of sub-groups along the channel, each group independently refines fine-grained information in a lightweight ConvNeck, and then the outputs of all sub-groups are spliced.
[0093] The mathematical model of the module MACNet is represented as:
[0094] ;
[0095] wherein, is the input feature of the module MACNet, convolution is performed on the input to obtain an intermediate feature representation, which is the starting point of all subsequent paths; is a bypass convolution, which extracts basic features (corresponding to a sub-branch); is an intermediate branch, which first performs ordinary convolution and then performs separable convolution to increase model efficiency and receptive field; for the third sub-branch, is the feature after the branch layer operation, which splits the intermediate feature into multiple channels or sub-features to construct a sparse convolution path, is the result obtained after the sparse convolution branch, is a light convolution module, and the residual connection enhances the training stability, and the subscript is used to distinguish different light convolution modules ; is the output of the last convolution branch. Among them has 2c channels. And the output , , …, , each of which has c channels. Finally, through concatenation, then 1x1 convolution, fusion and compression of the information of the three features, generates , which has 2c channels, as follows:
[0096] .
[0097] It should be understood that in some embodiments, the above-mentioned module MACNet has met the requirements of the technical idea of the present application, and the above-mentioned mathematical model is only an example. For example, the number of paths in the FMFRB branch can be adjusted according to the actual precision and application requirements.
[0098] In some other embodiments, the technical solution of the present application also optimizes the module MACNet, that is, each sub-branch embeds a complexity-aware gating subunit, which adaptively calculates the sub-branch activation factor according to the complexity feature CS. The sub-branch activation factor adopts a soft activation mechanism, which is used to represent the participation degree of each sub-branch in the current complexity region, that is, after each sub-branch output is multiplied by the corresponding sub-branch activation factor, the sub-branch features are fused by 1x1 convolution. That is, the fusion and concatenation process of the above-mentioned mathematical model can be adaptively adjusted.
[0099] As Figure 2The right part shown, the global attention modeling module DHVT mainly includes four stages of embedding, attention interaction, feature aggregation and residual fusion. The module architecture is existing, and the present application does not make specific elaboration. It should be understood that the existing structure of the global attention modeling module DHVT also meets the needs of the technical solutions of the present application, and in order to improve the noise reduction effect, the attention interaction stage is optimized in some embodiments: the multi-head attention interaction module further adjusts the various Token participating in attention modeling according to the specific value of the activation factor, forming a soft activation mechanism based on Token granularity. Among them, there are channel guide token vectors (HeadToken), local segment representation vectors (Patch Token) and class token vectors (Class Token) in the multi-head attention interaction module. Patch Token refers to extracting the feature representation of each local segment as the modeling basis of the local structure of the signal by segmenting or sliding window operation on the original one-dimensional signal; Class Token is a global abstract vector used to represent the overall features of the input signal, which is used as an aggregation and guide item in the attention mechanism to enhance global perception ability; Head Token is a structural guide vector used for interaction modeling between channel groups or feature paths after introducing multi-head attention mechanism, which controls the interaction strength of information between channels. This part is prior art and will not be described in detail, and is briefly described as follows:
[0100] Suppose the input feature dimension of the multi-head attention interaction module is D, and the number of "heads" head is h. First, generate h Head Token vectors through the HTG module to represent the channel features of each attention head. The generation formula of the Head Token vector is:
[0101]
[0102] Among them, AvgSplit represents the average value of the input divided into h groups, generating h HeadToken vectors with dimension D; and represent the activation function and full connection transformation, and t is the input feature vector.
[0103] The one-dimensional signal segment input into the global attention modeling module DHVT is divided by sliding window or segmentation, and local segments are extracted, each of which is sent into a convolution or fully connected network for coding to obtain a sequence of Patch Token vectors, which are used to model local features.
[0104] The one-dimensional signal segment of the input global attention modeling module DHVT is pooled, globally encoded or specially initialized to obtain a global summary vector C, which is represented as a Class Token, participates in aggregating global information and guides attention calculation.
[0105] The improvement of the embodiment of the application is that when the DHVT module is activated, the Token type and response weight participating in attention calculation are further controlled according to the CS value of the signal segment, that is, according to the value range of the characteristic quantity CS, the three types of Tokens are respectively assigned activation factors:
[0106] ;
[0107] wherein, is a complexity segmentation threshold; is a smoothing function for realizing soft activation, controls the slope of the activation function. According to the above activation factor, when CS is between 0.7 and 0.85, only Patch Token and Class Token are enabled, and the participation of Head Token is limited; when CS is higher than 0.85, all Tokens are enabled, and the weight contribution of Head Token in attention calculation is significantly enhanced, realizing the structural adaptability control of Token granularity.
[0108] The combination T of the last three types of Tokens input into the original multi-head attention interaction module is: The activated Tokens are marked and replace the original three types of Token marks of the multi-head attention interaction module, and then the original algorithm of the multi-head attention interaction module is executed. It should be understood that the original algorithm of the multi-head attention interaction module is prior art, and will not be described in detail. Generally speaking, it is to build global interaction between Tokens, so that each Token can update itself according to “global information”, and autonomously aggregate information according to the correlation between them. In the attention module, all Tokens are first mapped into three groups of vectors of query (Query), key (Key) and value (Value), and the attention weight is calculated and the corresponding information is aggregated through the multi-head attention mechanism. Finally, the output result of the Head Token will be fused into the Class Token representation to enhance its global modeling capability, and the output of the Patch Token will be input as the local representation of subsequent feature extraction or classification, thereby completing the structural adaptive feature modeling process. After the DHVT module completes the multi-head attention interaction, the feature is aggregated through the feedforward network, and the residual mechanism is used to fuse the update result with the original input, improve the model stability and expression ability, and finally output the structural enhanced global feature representation.
[0109] To match the complexity-driven dynamic path control mechanism, the network can pay more attention to the error modeling of the high complexity area in the training process, further improve the fidelity and structural consistency of the output noise profile, and the embodiment of the application preferably uses a complexity-aware and structure-preserving loss function CAD-Loss (Complexity-Aware and Detail-Preserving Loss). It consists of three parts: basic reconstruction error term, structure gradient preservation term and complexity weighted error term, and the overall definition is as follows:
[0110]
[0111] In the formula, The basic reconstruction error term is The structure gradient preservation term is And the complexity weighted error term is of the weights.
[0112] The basic reconstruction error term is used to measure the basic difference between the network prediction output and the target noise profile, and the calculation formula is N represents the total number of training samples.
[0113] The structure gradient preservation term is used to enhance the retention ability of the model to the signal mutation area (such as edge or high frequency component), and the first order gradient difference is introduced as the structure preservation index, which is defined as: Wherein Indicates the gradient of one-dimensional signal, such as adjacent point difference, which can effectively reflect the signal change trend.
[0114] The complexity weighted error term considers the complexity difference of different signal segments, designs a weighted mechanism, and uses the complexity score As the basis for adaptive weighting of sample error, guiding the model to focus on high complexity samples, and is defined as follows: Wherein the complexity score Is calculated by the foregoing steps. The weight function Is defined as follows: Wherein Is an adjustable hyperparameter.
[0115] The back propagation updates the weight and bias of MARD-Net training, and the specific formula is as follows:
[0116] ;
[0117] In the formula, W represents the weight of MARD-Net network training, denotes the bias of MARD-Net network training, and denotes the learning rate, denotes an error function, i.e., the foregoing .
[0118] S4: the measured magnetotelluric signal is denoised by using the trained denoising model based on the multi-path attention residual denoising network. Figure 3 and Figure 4 are denoising effects obtained after MARD-Net processing of the simulation data and the measured data, respectively, Figure 5 is a comparison of the original apparent resistivity-phase curve and the apparent resistivity-phase curve processed by the method of the application, and Figure 5 It can be seen that the method of the application can significantly suppress strong interference in the magnetotelluric signal, effectively weaken the obvious near-source effect in the original curve, and effectively improve the phase response. The method not only has high data processing efficiency, but also shows excellent denoising ability in a strong interference background, and shows good application potential in the field of magnetotelluric data processing.
[0119] In other possible embodiments, the technical scheme provided by the application is a denoising system based on the above magnetotelluric signal noise suppression method, which comprises: a sample library construction module, a complexity feature CS calculation module, a denoising module construction and training module, and a denoising module.
[0120] The sample library construction module constructs a sample library for model training and performs segmented processing on the sample signal, and the sample library at least includes a noisy signal sample set and a corresponding target noise profile sample set. The complexity feature CS calculation module is used to calculate the complexity feature CS of each noisy signal segment. The denoising module construction and training module is used to construct and train a denoising model based on a multi-path attention residual denoising network, wherein the noisy signal segment and the complexity feature CS are input into the multi-path attention residual denoising network. The multi-path attention residual denoising network is connected in parallel by a plurality of structurally heterogeneous feature recovery modules to form different main branches, and the outputs of each main branch are cooperatively input into an output layer to output a denoised signal or a noise profile. The feature recovery modules corresponding to different main branches are respectively a shallow convolution module CBL, a channel structure modeling module MACNet, and a global attention modeling module DHVT, and a complexity-aware gating unit with the complexity feature CS as input is arranged on each main branch. The output signal of the complexity-aware gating unit cooperates with the noisy signal segment to input the feature recovery module of the main branch; the path scheduling mechanism guides the feature recovery module of the main branch whether to participate in data processing according to the output result of the complexity-aware gating unit on the main branch. The denoising module is used to denoise the measured magnetotelluric signal by using the trained denoising model based on the multi-path attention residual denoising network.
[0121] It should also be understood that the specific implementation process of each module is described in the above method. This invention will not repeat it here. The above division of functional modules is only for illustrative purposes. In some embodiments, some functional modules can be combined and some functional modules can be separated. Each functional module can be implemented in software, hardware, or a combination of software and hardware. The software and hardware devices include, but are not limited to, general-purpose computer equipment, programmable gate arrays, digital signal processors, microprocessors and their corresponding programming or burning software.
[0122] In other feasible embodiments, the present invention provides a computer storage medium that stores a computer program, which is called by a processor to implement the steps of the magnetotelluric signal noise suppression method.
[0123] Specifically, the implementation includes:
[0124] S1: Construct a sample library. Construct a sample library for model training and segment the sample signals. The sample library shall include at least a set of noisy signal samples and its corresponding target noise contour sample set.
[0125] S2: Calculate the complexity feature CS of each noisy signal segment. The complexity feature CS is used for the path scheduling mechanism in the multipath attention residual denoising network.
[0126] S3: Construct and train a denoising model based on a multi-path attention residual denoising network. The noisy signal segment and complexity feature CS are input into the multi-path attention residual denoising network. The main body of the multi-path attention residual denoising network is composed of three heterogeneous feature recovery paths connected in parallel, which are adapted to signal characteristics of different complexity levels.
[0127] S4: Denoise the measured magnetotelluric signals using a trained denoising model based on a multipath attention residual denoising network.
[0128] Please refer to the explanation of the method above for the specific implementation process of each step.
[0129] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the hardware or software device in any of the foregoing embodiments, such as the hard drive or memory of the controller. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the controller. Furthermore, the readable storage medium can include both internal storage units and external storage devices of the controller. The readable storage medium is used to store computer programs and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.
[0130] Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the embodiments of the present application. The aforementioned readable storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various storage program codes.
[0131] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code. The present application is produced by referring to the flowcharts of the method, device (system), and computer program product according to the embodiments of the present application, and the instructions executed by the processor to implement the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram. These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer readable memory produce a product including instruction means, which implements the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram. These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.
[0132] In other possible embodiments, the technical solutions provided by the present application include an electronic device, which comprises one or more processors and a memory storing one or more computer programs, wherein the processor invokes the computer program to implement the steps of the magnetotelluric signal noise suppression method.
[0133] Specifically, the steps are implemented as follows:
[0134] S1: Construct a sample library, construct a sample library for model training and segment the sample signal, and the sample library at least includes a noisy signal sample set and a corresponding target noise profile sample set.
[0135] S2: Calculate the complexity feature CS of each noisy signal segment, and the complexity feature CS controls the path scheduling mechanism in the multi-path attention residual denoising network.
[0136] S3: Construct and train a denoising model based on a multi-path attention residual denoising network, wherein the noisy signal segment and the complexity feature CS are input into the multi-path attention residual denoising network, the network main body of the multi-path attention residual denoising network is composed of three structurally heterogeneous feature recovery paths in parallel, which are respectively adapted to the signal characteristics of different complexity levels.
[0137] S4: Use the trained denoising model based on the multi-path attention residual denoising network to denoise the measured magnetotelluric signal.
[0138] The specific implementation process of each step is described in the foregoing method.
[0139] It should be understood that in the embodiments of the present application, the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The memory can include read-only memory and random access memory, and provide instructions and data for the processor. A part of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.
[0140] It should be emphasized that the examples of the present application are illustrative rather than limiting, and thus the present application is not limited to the examples in the specific embodiments, and any other embodiments derived by those skilled in the art from the technical solutions of the present application, without departing from the purpose and scope of the present application, whether modified or replaced, also belong to the protection scope of the present application.
Claims
1. A complexity-driven method for suppressing noise in magnetotelluric signals, characterized in that: Includes the following steps: S1: Construct a sample library, construct a sample library for model training and segment the sample signals. The sample library includes at least a noisy signal sample set and its corresponding target noise contour sample set. S2: Calculate the complexity feature CS for each noisy signal segment. The complexity feature CS is used in the path scheduling mechanism of the multi-path attention residual denoising network. CS It is the normalized result of five complexity indices: local change rate, spectral entropy, sparsity, energy density, and autocorrelation. S3: Construct and train a denoising model based on a multi-path attention residual denoising network, wherein the noisy signal segment and complexity feature CS are input to the multi-path attention residual denoising network; The multi-path attention residual denoising network consists of multiple heterogeneous feature recovery modules connected in parallel to form different main branches. The outputs of each main branch are input to the output layer to output a denoised signal or noise profile. The feature recovery modules corresponding to different main branches are a shallow convolution module CBL, a channel structure modeling module MACNet, and a global attention modeling module DHVT, respectively. Each main branch is equipped with a complexity-aware gating unit that takes the complexity feature CS as input, and its output signal is input to the feature recovery module of the main branch where the noisy signal segment is located. The path scheduling mechanism guides the feature recovery module of each main branch on whether to participate in data processing based on the output of the complexity-aware gating unit. Specifically: Based on the module activation factor output by the complexity-aware gating unit The feature recovery module of the main branch is adaptively determined to participate in data processing according to the hard activation strategy. The mathematical model of the complexity-aware gating unit is as follows: ,in, and These are the weights and bias constants used to control the output range and response curve shape of the sigmoid function; The complexity features of the input; The hard activation strategy is as follows: if the module activation factor of the complexity-aware gating unit in the main branch is... If the value is greater than or equal to the preset threshold, the feature recovery module of the main branch is activated and participates in data processing; otherwise, it does not participate in data processing. S4: Denoise the measured magnetotelluric signals using a trained denoising model based on a multipath attention residual denoising network.
2. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: The complexity-aware gating unit is trained to determine its module parameters, such that: when Module activation factors of three main branches When all values are greater than or equal to the preset threshold, the shallow convolutional module CBL, the channel structure modeling module MACNet, and the global attention modeling module DHVT are all activated. when The shallow convolutional module CBL and the channel structure modeling module MACNet are activated; when Only the shallow convolutional module CBL is activated.
3. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: The definitions of local rate of change, spectral entropy, sparsity, energy density, and autocorrelation are as follows: Define the i-th noisy signal segment s is the sliding window step size, L is the window length, and j is the time. The signal sampling point corresponding to time point j; The i-th noisy signal segment Local rate of change : , This refers to the signal sampling point corresponding to time point j+1; The i-th noisy signal segment Spectral entropy : ,in, , For the i-th noisy signal segment The frequency domain coefficients after Fourier transform, where k is the frequency index. It represents the energy percentage at the corresponding frequency point. Spectral entropy reflects the complexity of the spectrum energy distribution. The larger the value, the more dispersed the spectrum and the more uniform the energy distribution. The i-th noisy signal segment sparsity : , , Representing signal segments respectively The L1 norm and L2 norm; The i-th noisy signal segment Energy density : ; The i-th noisy signal segment Autocorrelation : ,in, Indicates noisy signal segment The mean; The formula for the complexity feature CS is: , ; satisfy , The weights for each complexity metric.
4. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: The output layer is formed by weighting and summing the outputs of the shallow convolutional module CBL, the channel structure modeling module MACNet, and the global attention modeling module DHVT in a proportional manner, and then fusing them into a unified feature representation. Alternatively, the outputs of the shallow convolutional module CBL, the channel structure modeling module MACNet, and the global attention modeling module DHVT are concatenated in the channel dimension and then input into the 1×1 convolutional fusion module.
5. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: The channel structure modeling module MACNet consists of three parallel sub-branches; The first sub-branch has a 1×1 bypass convolution; The second sub-branch is the depthwise separable convolution branch DSConv, which has 1×1 ordinary convolution, K×K depthwise convolution, and 1×1 pointwise convolution in sequence; The third sub-branch is the fine-grained multi-path feature refinement branch FMFRB; In the MACNet module, each sub-branch is embedded with a complexity-aware gating sub-unit. The sub-branch activation factor is adaptively calculated based on the complexity feature CS. The sub-branch activation factor adopts a soft activation mechanism to represent the degree of participation of each sub-branch in the current complexity region. That is, the output of each sub-branch is multiplied by the corresponding sub-branch activation factor, concatenated in the channel dimension, and the sub-branch feature fusion is achieved through 1×1 convolution.
6. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: In the shallow convolutional module (CBL), convolutional modules and max pooling layers are alternately arranged in sequence. The convolutional module contains a convolutional layer, a batch normalization layer, and a LeakyReLU activation layer in sequence.
7. The method for suppressing magnetotelluric signal noise according to claim 1, characterized in that: The multi-head attention interaction module in the global attention modeling module DHVT assigns activation factors to three types of tokens based on the complexity feature CS. These three types of tokens are the head token (channel guidance vector), patch token (local fragment representation vector), and class token (class token). The activation factors are set as follows: ; in, A threshold for segmenting complexity; This is a smoothing function used to implement soft activation. Controlling the slope of the activation function, These are the activation factors for the local fragment representation vector Patch Token, the class token vector Class Token, and the channel guide token vector Head Token, respectively. Then, based on the activation factor, the three types of tokens are activated and replaced with the original three types of tokens in the multi-head attention interaction module, and then the original algorithm of the multi-head attention interaction module is executed.
8. A noise reduction system based on the magnetotelluric signal noise suppression method according to any one of claims 1-7, characterized in that: include: The sample library construction module constructs a sample library for model training and performs segmentation processing on the sample signals. The sample library includes at least a noisy signal sample set and its corresponding target noise contour sample set. The complexity feature CS calculation module is used to calculate the complexity feature CS of each noisy signal segment. The complexity feature CS is used in the path scheduling mechanism in the multi-path attention residual denoising network. The denoising module constructs a training module, which is used to construct and train a denoising model based on a multi-path attention residual denoising network, wherein the noisy signal segment and complexity feature CS are input to the multi-path attention residual denoising network. The multi-path attention residual denoising network consists of multiple heterogeneous feature recovery modules connected in parallel to form different main branches. The outputs of each main branch are input to the output layer to output a denoised signal or noise profile. The feature recovery modules corresponding to different main branches are a shallow convolution module CBL, a channel structure modeling module MACNet, and a global attention modeling module DHVT, respectively. Each main branch is equipped with a complexity-aware gating unit that takes the complexity feature CS as input, and its output signal is input to the feature recovery module of the main branch where the noisy signal segment is located. The path scheduling mechanism guides the feature recovery module of the main branch to participate in data processing based on the output of the complexity-aware gating unit on each main branch. The noise reduction module is used to reduce the noise of measured magnetotelluric signals using a trained noise reduction model based on a multipath attention residual denoising network.
9. A computer storage medium, characterized in that: The computer program is stored and is invoked by the processor to implement: The steps of the magnetotelluric signal noise suppression method according to any one of claims 1-7.
Citation Information
Patent Citations
Magnetotelluric signal denoising method and system based on feature fusion
CN118445549A
Self-supervised image denoising method based on diffusion model guidance
CN118691494A