A method for removing noise from magnetotelluric signals

CN122836849APending Publication Date: 2026-09-29CHINA GEOLOGICAL SURVEY GEOPHYSICAL SURVEY CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611308036.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0003]近年来,深度学习技术为大地电磁信号去噪提供了思路,然而,由于现有数据集中数据样本大多为真实采集得到的数据,因此各个数据样本的信噪比存在较大差异,模型在学习时的学习难度跨度较大,此时通过常规的模型训练方式训练得到的模型存在训练稳定性差、泛化能力弱,导致对大地电磁信号进行去噪的效果不佳

Benefits of technology

本实施例中通过噪声等级与信噪比呈反比例关系的分级训练样本库,将不同信噪比样本按噪声难度进行归类划分,使不同训练难度的样本实现分组管理。在此基础上,依据训练轮次动态调整各噪声等级的采样权重,训练前期提高低噪声等级即高信噪比样本的采样占比,让模型优先学习干净电磁信号基础特征,建立基础的信号-噪声区分能力;随着训练轮次增加,逐步降低低噪声等级采样权重、同步提高最高噪声等级即低信噪比样本采样权重,循序渐进引入强噪声样本参与参数更新,可以避免训练初期强噪声样本带来的梯度震荡,使得模型参数迭代过程更加平稳,改善训练稳定性。随着训练持续推进,模型逐步适配高噪声干扰场景,充分学习不同噪声强度下的信号特征,提升对不同信噪比输入信号的适配能力。本实施例通过分级样本库结合随轮次动态变化的采样权重实现课程式训练,缓解样本信噪比杂乱带来的训练缺陷,提升模型训练稳定性与泛化能力,进而提升大地电磁信号去噪效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122836849A_ABST
    Figure CN122836849A_ABST
Patent Text Reader

Abstract

This application provides a method for denoising magnetotelluric signals, belonging to the field of signal denoising technology. The method includes: acquiring the magnetotelluric signal to be denoised; inputting the magnetotelluric signal to be denoised into a target denoising model to obtain the denoised magnetotelluric signal; the target denoising model is obtained by training in the following way: acquiring a hierarchical training sample library; the hierarchical training sample library stores training samples of multiple noise levels; iteratively training the initial denoising model repeatedly until a preset convergence condition is reached: determining the sampling weights of the training samples for each noise level based on the current training round, and sampling training samples from the hierarchical training sample library based on the sampling weights; the sampling weight of the lowest noise level among all noise levels decreases as the training rounds increase; and training the initial denoising model based on the sampled training samples. This application can improve the denoising effect of magnetotelluric signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of signal denoising technology, and more specifically, relates to a method for denoising magnetotelluric signals. Background Technology

[0002] Magnetotelluric sounding, as a core geophysical exploration method for detecting the electrical structure of the deep Earth, calculates the apparent resistivity and phase response by synchronously observing the orthogonal components of the natural alternating electromagnetic field on the Earth's surface, and then inverts the electrical distribution of the subsurface medium.

[0003] In recent years, deep learning technology has provided a solution for denoising magnetotelluric signals. However, since most of the data samples in the existing datasets are real-world data, the signal-to-noise ratios of each data sample vary greatly, and the learning difficulty of the model varies considerably. As a result, the models trained using conventional model training methods suffer from poor training stability and weak generalization ability, leading to poor denoising performance for magnetotelluric signals. Summary of the Invention

[0004] The purpose of this application is to provide a method for denoising magnetotelluric signals to improve the denoising effect of magnetotelluric signals.

[0005] A first aspect of this application provides a method for denoising magnetotelluric signals, comprising: Acquire the magnetotelluric signal to be denoised; The magnetotelluric signal to be denoised is input into the trained target denoising model to obtain the denoised magnetotelluric signal. The target denoising model was obtained through training in the following manner: Obtain a graded training sample library; the graded training sample library stores training samples with multiple noise levels. Each training sample includes a noise-free electromagnetic signal and the corresponding noisy signal; the noise level of the training sample is inversely proportional to the signal-to-noise ratio of its corresponding noisy signal. The initial denoising model is iteratively trained repeatedly until a preset training round threshold or a preset convergence condition is met, resulting in the target denoising model: The sampling weights for training samples at each noise level are determined based on the current training round, and training samples are sampled from the hierarchical training sample library based on the sampling weights. The sampling weight of the lowest noise level among all noise levels decreases as the training round increases, while the sampling weight of the highest noise level among all noise levels increases as the training round increases. The initial denoising model is trained based on the sampled training data to update the parameters of the initial denoising model.

[0006] A second aspect of this application provides a magnetotelluric signal denoising device, comprising: The module for determining the signal to be denoised is used to acquire the magnetotelluric signal to be denoised. The denoising module is used to input the magnetotelluric signal to be denoised into the trained target denoising model to obtain the denoised magnetotelluric signal. The target denoising model is obtained by training the model training module in the following way: Obtain a graded training sample library; the graded training sample library stores training samples with multiple noise levels. Each training sample includes a noise-free electromagnetic signal and the corresponding noisy signal; the noise level of the training sample is inversely proportional to the signal-to-noise ratio of its corresponding noisy signal. The initial denoising model is iteratively trained repeatedly until a preset training round threshold or a preset convergence condition is met, resulting in the target denoising model: The sampling weights for training samples at each noise level are determined based on the current training round, and training samples are sampled from the hierarchical training sample library based on the sampling weights. The sampling weight of the lowest noise level among all noise levels decreases as the training round increases, while the sampling weight of the highest noise level among all noise levels increases as the training round increases. The initial denoising model is trained based on the sampled training data to update the parameters of the initial denoising model.

[0007] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described magnetotelluric signal denoising method.

[0008] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described magnetotelluric signal denoising method.

[0009] The beneficial effects of the magnetotelluric signal denoising method provided in this application embodiment are as follows: This embodiment utilizes a tiered training sample library where noise level and signal-to-noise ratio (SNR) are inversely proportional. Samples with different SNRs are categorized according to noise difficulty, enabling group management of samples with varying training difficulties. Based on this, the sampling weights for each noise level are dynamically adjusted according to the training rounds. In the early stages of training, the sampling proportion of low-noise-level (high SNR) samples is increased, allowing the model to prioritize learning the basic features of clean electromagnetic signals and establishing a basic signal-noise discrimination capability. As the training rounds increase, the sampling weights of low-noise-level samples are gradually reduced while the sampling weights of the highest noise level (low SNR) samples are simultaneously increased. This gradual introduction of strong noise samples into parameter updates avoids gradient oscillations caused by strong noise samples in the early stages of training, resulting in a smoother model parameter iteration process and improved training stability. As training continues, the model gradually adapts to high-noise interference scenarios, fully learning signal characteristics under different noise intensities and improving its adaptability to input signals with different SNRs. This embodiment achieves course-based training through a tiered sample library combined with dynamically changing sampling weights, mitigating training defects caused by chaotic sample SNRs, improving model training stability and generalization ability, and ultimately enhancing the denoising effect of magnetotelluric signals.

[0010] Secondly, in the training process of the initial denoising model, the embodiments of this application also adopt a loss function composed of a joint time-frequency domain fidelity loss term, a physical constraint loss term, an inversion-guided sensing loss term, and an adversarial loss term. Based on the multi-branch results of the denoised electromagnetic signal, noise component, and impedance tensor output by the model in parallel, the calculation of each loss term is completed respectively, thereby realizing multi-dimensional collaborative constraint model optimization and improving the denoising effect of the model. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A schematic flowchart illustrating a magnetotelluric signal denoising method provided in an embodiment of this application; Figure 2 A flowchart illustrating the training process of an initial denoising model provided in an embodiment of this application; Figure 3 (a) A waveform of an electric field noise segment generated by a power frequency noise model superimposed on an electric field according to an embodiment of this application; Figure 3 (b) A waveform diagram of a noise-free, clean segment of an electric field provided in an embodiment of this application; Figure 3 (c) A waveform of a magnetic field noise segment generated by a magnetic field superposition power frequency harmonic noise model provided in an embodiment of this application after generating power frequency noise; Figure 3 (d) A waveform diagram of a noise-free, clean magnetic field segment provided in an embodiment of this application; Figure 4 (a) A waveform of an electric field noise segment generated by a superimposed railway pulse noise model of electric field according to an embodiment of this application after generating spike pulse noise; Figure 4 (b) A waveform diagram of another noise-free, clean electric field segment provided in an embodiment of this application; Figure 4 (c) A waveform diagram of a magnetic field noise segment generated by a magnetic field superposition railway pulse noise model according to an embodiment of this application after generating spike pulse noise; Figure 4 (d) A waveform diagram of another noise-free, clean magnetic field segment provided in an embodiment of this application; Figure 5 (a) A waveform of the electric field noise segment generated by the triangular wave noise generated by the electric field superposition pipeline cathodic protection current drift noise model provided in an embodiment of this application; Figure 5 (b) A waveform diagram of another noise-free, clean electric field segment provided in an embodiment of this application; Figure 5 (c) A waveform of a magnetic field noise segment generated by a triangular wave noise model of magnetic field superposition pipeline cathodic protection current drift noise provided in an embodiment of this application; Figure 5 (d) A waveform diagram of another noise-free clean magnetic field segment provided in an embodiment of this application; Figure 6 (a) A waveform of an electric field noise segment generated by a square wave noise model of an industrial switch superimposed with an electric field according to an embodiment of this application; Figure 6 (b) A waveform diagram of another noise-free, clean electric field segment provided in an embodiment of this application; Figure 6 (c) A waveform of an electric field noise segment generated by a square wave noise model of an industrial switch with magnetic field superposition provided in an embodiment of this application; Figure 6 (d) A waveform diagram of another noise-free clean magnetic field segment provided in an embodiment of this application; Figure 7 (a) A comparison waveform in the time domain before and after power frequency noise filtering provided in an embodiment of this application; Figure 7(b) A comparison waveform of power spectral density before and after filtering out power frequency noise according to an embodiment of this application; Figure 8 (a) A comparison waveform in the time domain before and after filtering out spike impulse noise according to an embodiment of this application; Figure 8 (b) A comparison waveform of power spectral density before and after filtering out spike impulse noise according to an embodiment of this application; Figure 9 (a) A comparison waveform in the time domain before and after filtering out triangular wave noise according to an embodiment of this application; Figure 9 (b) A comparison waveform of power spectral density before and after filtering of triangular wave noise provided in an embodiment of this application; Figure 10 (a) A comparison waveform in the time domain before and after filtering out square wave noise according to an embodiment of this application; Figure 10 (b) A comparison waveform of power spectral density before and after filtering of square wave noise provided in an embodiment of this application; Figure 11 (a) A comparison of two-dimensional magnetotelluric inversion profiles before denoising provided in an embodiment of this application; Figure 11 (b) A comparison of denoised two-dimensional magnetotelluric inversion profiles provided in an embodiment of this application; Figure 12 A structural block diagram of a magnetotelluric signal denoising device provided in an embodiment of this application; Figure 13 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0015] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a magnetotelluric signal denoising method according to an embodiment of this application. The method can be executed by an electronic device and may include: S101: Acquire the magnetotelluric signal to be denoised.

[0016] In this embodiment, the magnetotelluric signal to be denoised comes from an electric field sensor and a magnetic field sensor. It is synchronously acquired by two sets of electrodes and two sets of magnetic probes orthogonally arranged on the ground surface and is a discrete time sequence arranged according to the sampling interval. The sampling rate is set according to the observation frequency band, and the sampling rate of the high-frequency observation band is usually 256Hz.

[0017] S102: Input the magnetotelluric signal to be denoised into the trained target denoising model to obtain the denoised magnetotelluric signal.

[0018] In this embodiment, the target denoising model refers to the CNN-Transformer hybrid deep learning network after completing all iterative training and achieving convergence.

[0019] refer to Figure 2 In this embodiment, the target denoising model is obtained by training in the following manner: S201: Obtain the hierarchical training sample library.

[0020] In this embodiment, the hierarchical training sample library stores training samples with multiple noise levels. Each training sample includes a noise-free electromagnetic signal and a noisy signal corresponding to the electromagnetic signal. The noise level of the training sample is inversely proportional to the signal-to-noise ratio of its corresponding noisy signal. In this embodiment, the graded training sample library contains paired data divided into different noise difficulty levels according to the signal-to-noise ratio of the noisy signal. Each sample consists of a pair of noise-free electromagnetic signals and a noisy signal with superimposed noise. The higher the noise level, the lower the signal-to-noise ratio of the corresponding noisy signal and the stronger the noise interference.

[0021] S202: Iteratively train the initial denoising model until the preset training round threshold or the preset convergence condition is reached, and the target denoising model is obtained.

[0022] In this embodiment, each round of iterative training of the initial denoising model may include: The sampling weights for training samples at each noise level are determined based on the current training round, and training samples are sampled from the hierarchical training sample library based on the sampling weights. The sampling weight of the lowest noise level among all noise levels decreases as the training round increases, while the sampling weight of the highest noise level among all noise levels increases as the training round increases. The initial denoising model is trained based on the sampled training data to update the parameters of the initial denoising model.

[0023] In this embodiment, sampling weight refers to the probability value of samples of different difficulty levels being selected when data is extracted in each round of training the initial denoising model. The higher the sampling weight, the greater the probability of selection. Specifically, the training process is divided into multiple stages. In the early stage of training (e.g., rounds 1 to 50), the model mainly learns simple samples. At this time, the sampling weight of the lowest noise level (e.g., signal-to-noise ratio ≥ 10dB) is set to 1.0, while the sampling weight of the highest noise level (e.g., signal-to-noise ratio < -10dB) is 0. As the number of training rounds increases (e.g., rounds 51 to 100), the weight of simple samples is gradually reduced (e.g., reduced to 0.5), while the weight of medium noise level samples is increased. In the later stage of training (e.g., after round 151), the sampling weight of the highest noise level is increased to 0.25 or higher. The division of the lowest noise level, medium noise level, and highest noise level in this embodiment can be set by the user, and there can be one or more medium noise levels. In this embodiment, based on the statistical results of numerous field stations, the common signal-to-noise ratio (SNR) distribution range in magnetotelluric observations is -20 dB to 20 dB. Therefore, the noise level classification threshold can be set based on this range. The number of samples selected in each round can be 32. The preset training round threshold can be set independently.

[0024] In one embodiment, the process of determining whether the initial denoising model satisfies a preset convergence condition includes: After each preset training iteration, the performance of the initial denoising model after the current iteration is evaluated based on the validation sample set to obtain the apparent resistivity estimation error in the validation sample set. The trend of apparent resistivity estimation error in multiple consecutive evaluations is statistically analyzed. If the apparent resistivity estimation error does not decrease in a preset number of consecutive rounds, the current initial denoising model is determined to meet the preset convergence condition. If the apparent resistivity estimation error continues to decrease after a preset number of rounds, then the convergence condition has not been met.

[0025] In this embodiment, the preset number of rounds can be 10, and the preset number of rounds can be 20.

[0026] In this embodiment, after every 10 rounds of training, the denoising performance of the model is evaluated on a preset validation sample set. The evaluation metrics include the output signal-to-noise ratio and the apparent resistivity estimation error. When the apparent resistivity estimation error on the validation set no longer decreases after 20 consecutive rounds, the model is considered to have converged, training is terminated, and the current model parameters are saved. In this embodiment, the generalization performance of the model can also be monitored in a timely manner through periodic validation and early stopping mechanisms, avoiding overfitting of the model on the training set, reducing unnecessary training iterations, improving training efficiency, and ultimately obtaining a signal denoising model with optimal generalization ability.

[0027] As can be seen from the above, this embodiment uses a hierarchical training sample library where noise level and signal-to-noise ratio (SNR) are inversely proportional. Samples with different SNRs are categorized according to noise difficulty, enabling group management of samples with different training difficulties. Based on this, the sampling weights of each noise level are dynamically adjusted according to the training rounds. In the early stages of training, the sampling proportion of low-noise-level (high SNR) samples is increased, allowing the model to prioritize learning the basic features of clean electromagnetic signals and establish a basic signal-noise discrimination capability. As the training rounds increase, the sampling weights of low-noise-level samples are gradually reduced while the sampling weights of the highest noise level (low SNR) samples are simultaneously increased. This gradual introduction of strong noise samples into parameter updates avoids gradient oscillations caused by strong noise samples in the early stages of training, resulting in a smoother model parameter iteration process and improved training stability. As training continues, the model gradually adapts to high-noise interference scenarios, fully learning signal characteristics under different noise intensities and improving its adaptability to input signals with different SNRs. This embodiment achieves course-based training by combining a hierarchical sample library with dynamically changing sampling weights throughout the rounds. This alleviates the training defects caused by the chaotic signal-to-noise ratio of the samples, improves the model's training stability and generalization ability, and thus enhances the denoising effect of magnetotelluric signals.

[0028] In one embodiment of this application, the hierarchical training sample library is constructed in the following manner: An extended noise sample library is constructed, and a noise-free sample library is obtained. The extended noise sample library contains natural noise samples and simulated noise samples, and each noise sample in the extended noise sample library corresponds to the noise type of that noise sample. The noise-free sample library contains multiple noise-free electromagnetic signals. For each electromagnetic signal in the noise-free sample library, multiple noise samples of different noise types corresponding to the electromagnetic signal are randomly selected from the extended noise sample library; for each selected noise sample, the noise scaling factor of the noise sample is determined based on the noise signal-to-noise ratio of the noise sample; the noise sample is superimposed on the electromagnetic signal based on the noise scaling factor of the noise sample to obtain a noisy signal, and the electromagnetic signal and the corresponding noisy signal are combined into an initial training sample. Based on each initial training sample and the preset noise level classification rules, a hierarchical training sample library is obtained.

[0029] In this embodiment, the extended noise sample library refers to a collection containing various types of noise data, used to simulate interference environments in actual observations. Natural noise samples refer to clean noise segments (such as pure power interference segments) directly extracted from field measurement data and not containing effective magnetotelluric signals. Simulated noise samples refer to noise data generated using mathematical models or algorithms that simulate specific physical mechanisms. The noise scaling factor is a scaling factor used to adjust the amplitude of noise samples, with the aim of achieving a preset signal-to-noise ratio requirement when noise is superimposed on a clean signal.

[0030] In this embodiment, the original magnetotelluric observation signal is first acquired, and then a sliding window is used to truncate the original magnetotelluric observation signal according to a preset time window length. The criteria for judging high signal-to-noise ratio and no obvious strong noise interference are defined as follows: the input signal-to-noise ratio of the signal is >15dB, there are no spike pulses in the time domain exceeding 3 times the standard deviation, and there are no narrow-band high-energy peaks in the frequency domain that are significantly more than 3 times the baseline. A continuous observation period that meets the criteria is selected, and a sliding window is used to truncate the signal according to a time window length of 1024 sampling points consistent with the noise sample. The sliding step size is set to 512 sampling points to obtain multiple clean signal segments. The amplitude range of the clean signal segments is based on the amplitude statistics of the background signal in the same survey area. Clean signal segments with amplitude standard deviation not exceeding 1.2 times the background signal and no continuous abnormal jumps are selected, and after unifying the data format, they are combined into a noise-free sample set.

[0031] In this embodiment, the noise scaling factor can be one or more, meaning that for each electromagnetic signal in the noise-free sample library, multiple sets of noisy signals with different noise types and signal-to-noise ratios can be generated. Those skilled in the art can set multiple target signal-to-noise ratios and determine the noise scaling factor as follows: For each electromagnetic signal in the noise-free sample library, calculate the root mean square (RMS) value of the electromagnetic signal. Based on the RMS value of the electromagnetic signal and the target signal-to-noise ratio (SNR), determine the RMS value of the target noise. Divide the RMS value of the target noise by the RMS value of the noise sample itself to obtain the corresponding noise scaling factor.

[0032] In this embodiment, by randomly combining clean signal segments and noise samples, a large number of paired training samples can be generated in batches, significantly reducing the cost of sample labeling; the combination of multiple types of noise and multiple signal-to-noise ratios can cover a wide range of noise scenarios, enabling the model to learn general denoising capabilities rather than features specific to noise.

[0033] In one embodiment of this application, the simulated noise samples include: noise samples generated by a parameterized noise model and noise samples generated by a generative adversarial network; the parameterized noise model is used to simulate the time-domain and frequency-domain statistical characteristics of natural noise; Construct an expanded noise sample library, including: The raw magnetotelluric observation signals were acquired, and then segmented and filtered to obtain natural noise samples. Noise samples are generated based on pre-built parametric noise models; the parametric noise models include at least one of the following: power frequency harmonic noise model, railway impulse noise model, pipeline cathodic protection current drift noise model, and industrial switch square wave noise model; different parametric noise models are used to generate corresponding noise samples based on different noise physical characteristic parameters; Noise samples are generated using a pre-trained generative adversarial network (GAN); the pre-trained GAN is trained based on natural noise samples and noise samples generated through a parameterized noise model.

[0034] In this embodiment, a fixed time window of 1024 sampling points can be set. Based on the fixed time window, the continuous raw magnetotelluric signal set is segmented by a sliding window with a sliding step size of 512 sampling points to obtain multiple time series segments of equal length. In the category labeling process, the categories are divided into power system harmonic noise, electrified railway pulse noise, pipeline cathodic protection current noise, and industrial equipment square wave step noise. Relevant personnel label each time series segment by combining the time domain waveform morphology and frequency domain distribution characteristics, and screen out natural noise samples that only include the corresponding category of noise and do not include effective magnetotelluric signals. Since the natural noise samples come from real field observation data, their noise morphology and statistical characteristics are highly consistent with the actual exploration scene, which can provide real benchmark materials for subsequent noise modeling and generation amplification, ensuring the authenticity of the noise samples and the scene matching degree.

[0035] In this embodiment, the power frequency harmonic noise model uses 50Hz power frequency as the fundamental frequency and incorporates frequency drift, amplitude modulation, interharmonics, and three-phase imbalance parameters. The frequency drift range is ±0.5Hz, the amplitude modulation depth ranges from 0.2 to 0.8, and the interharmonic frequency covers a non-integer multiple range of 0.5 to 2.5 times the fundamental frequency, thus simulating harmonic fluctuation characteristics under different power grid loads. The railway impulse noise model adopts... Stable distribution, characteristic index The value ranges from 0.8 to 1.8, and the scale parameter is... It can be adjusted within the range of 0.1 to 5. The smaller the value, the stronger the impulse response, which can fit the heavy-tailed statistical characteristics of railway impulse noise. The pipeline cathodic protection current drift noise model sets three core parameters: DC bias, triangular wave period, and drift rate. The DC bias amplitude ranges from 0.1 to 3 times the signal amplitude, the triangular wave period ranges from 10 to 100 seconds, and the drift rate ranges from 0.01 to 0.5 times the amplitude per second, simulating the slowly varying drift pattern generated by cathodic protection current. The industrial switch square wave noise model sets the square wave amplitude, period, duty cycle, and rise time. The square wave amplitude ranges from 0.5 to 5 times the signal amplitude, the period ranges from 0.5 to 20 seconds, the duty cycle ranges from 10% to 90%, and the rise time ranges from 1 to 50 milliseconds, simulating the square wave step pattern generated by the start-up and shutdown of industrial equipment and relay operation.

[0036] In this embodiment, reference Figure 3 (a)- Figure 3 (d) Figure 4 (a)- Figure 4 (d) Figure 5 (a)- Figure 5 (d) and Figure 6 (a)- Figure 6 (d) The waveforms before and after the noise is superimposed on the electric field or magnetic field outputs of the four different parameterized models in the aforementioned embodiments. The horizontal axis represents the number of sampling points, and the vertical axis represents the amplitude, which represents the numerical value of the electric field or magnetic field observation signal.

[0037] In this embodiment, the noise type of the natural noise sample is consistent with the noise type of the noise generated by the parametric noise model. The four types of parametric models can reproduce the physical generation mechanism and statistical characteristics of different types of human noise, and can generate noise samples under various working conditions by adjusting the parameters, making up for the shortcomings of the limited number of real labeled noise samples and incomplete working condition coverage, and providing a basis for the expansion of noise samples.

[0038] In this embodiment, the generative adversarial network is trained using natural noise samples and noise samples generated by a parameterized noise model. For example, a Wasserstein generative adversarial network with gradient penalty is trained using noise type labels as conditional inputs. The training epochs are set to 200, the batch size is 64, and the learning rate is set to 0.0001. After training, a random vector and a specified noise type label are input, and the network's generator can output noise samples of the corresponding type.

[0039] In one embodiment of this application, a hierarchical training sample library is obtained based on each initial training sample and a preset noise level classification rule, including: Time-domain data augmentation and time-frequency domain data augmentation operations are performed on each initial training sample to expand the training samples and obtain the full training samples after augmentation. Based on the signal-to-noise ratio of the full training samples and the preset noise level classification rules, each full training sample is divided into a hierarchical training sample library.

[0040] In this embodiment, time-domain enhancement includes random amplitude scaling of the signal by 0.8 to 1.2 times, random flipping of the time axis, and random rearrangement of the three subsequences; time-frequency domain enhancement includes applying random time mask, frequency mask, and time-frequency block mask to the short-time Fourier spectrum of the signal, with the mask length accounting for no more than 20% of the total length.

[0041] In this embodiment, for each full training sample, the ratio of the energy of its corresponding noise-free sample to the noise energy can be calculated and converted into a decibel value to obtain the signal-to-noise ratio (SNR) of the full training sample. The preset noise level classification rules can be as follows: full training samples with an SNR ≥ 10 dB are classified as a high SNR subset; full training samples with an SNR between 0 dB and 10 dB are classified as a medium SNR subset; full training samples with an SNR between -10 dB and 0 dB are classified as a low SNR subset; and full training samples with an SNR < -10 dB are classified as an extremely low SNR subset.

[0042] In one embodiment of this application, training an initial denoising model based on sampled training samples includes: The sampled training samples are input into the initial denoising model and forward propagated to obtain multiple outputs of the output layer of the initial denoising model; the multiple outputs include: denoised electromagnetic signal, noise component and impedance tensor of denoised electromagnetic signal; The initial denoising model is trained based on the denoised electromagnetic signal, noise components, impedance tensor of the denoised electromagnetic signal, and loss function.

[0043] In this embodiment, the noise component refers to the separated noise sequence predicted by the model, and the impedance tensor refers to the denoised electric field, which is the impedance estimate obtained by calculating in the time-frequency domain using the least squares method.

[0044] In this embodiment, the loss function contains the following loss terms: a time-frequency joint fidelity loss term used to constrain the fidelity of the time-domain waveform and frequency-domain features of the output of the initial denoising model; a physical constraint loss term used to constrain the output of the initial denoising model to satisfy the magnetotelluric impedance tensor relationship and guide the noise component to be sparse; an inversion-guided sensing loss term used to constrain the resistivity model of the output of the initial denoising model after magnetotelluric inversion to be consistent with the inversion result of the corresponding noise-free electromagnetic signal; and an adversarial loss term used to guide the statistical distribution of the output of the initial denoising model to tend towards the statistical distribution of the natural signal. The initial denoising model is trained based on the denoised electromagnetic signal, noise components, impedance tensor of the denoised electromagnetic signal, and loss function, including: The loss values ​​of the time-frequency domain joint fidelity loss term, the inversion-guided sensing loss term, and the adversarial loss term are determined based on the denoised electromagnetic signal. The loss value of the physical constraint loss term is determined based on the denoised electromagnetic signal, noise component, and impedance tensor of the denoised electromagnetic signal. The initial denoising model is trained based on the loss values ​​of each loss term in the loss function.

[0045] In this embodiment, the average value of the absolute difference between the amplitudes of the denoised electromagnetic signal and the corresponding noise-free signal at each sampling point in the time domain is calculated using the time domain error, serving as the time domain fidelity constraint. The multi-resolution frequency domain error is obtained by using short-time Fourier transform with three different window lengths of 256, 512, and 1024 to obtain three sets of time spectra. The L1 distance of the amplitude spectrum and the cosine distance of the phase spectrum are calculated for each set of spectra. All time-frequency errors are summed and then weighted and combined with the time domain error to obtain the time-frequency joint fidelity loss term. The time-frequency joint fidelity loss term can simultaneously constrain the time domain waveform and frequency domain characteristics, making up for the deficiency of single time domain loss being insensitive to phase distortion.

[0046] In this embodiment, the physical constraint loss term includes impedance uniformity loss and noise sparsity loss. Impedance uniformity loss reconstructs the electromagnetic field signal based on the estimated impedance tensor, calculating the mean square error between the reconstructed signal and the denoised electromagnetic signal output by the network. This measure assesses the degree to which the denoised signal satisfies the impedance tensor relationship, forcing the output signal to satisfy the magnetotelluric impedance tensor relationship and preventing the model from generating false signals that do not conform to physical laws. Without impedance uniformity loss, the model might output a signal with a good waveform but a severely distorted impedance tensor. The noise sparsity loss term can be obtained by calculating the L1 norm of the noise components, measuring the sparsity of the noise components and utilizing the sparsity characteristics of impulse noise to guide the network in separating impulse noise, improving the denoising effect under strong impulse interference. In this embodiment, the inversion-guided sensing loss term is calculated using a pre-trained magnetotelluric (MTT) inversion network. A multilayer perceptron (MPS) inversion network is pre-trained using a one-dimensional MMT inversion dataset. This dataset includes 10,000 sets of forward modeling results corresponding to theoretical geoelectric models. Each set includes the apparent resistivity and phase sequence at the corresponding frequency point, as well as the corresponding subsurface resistivity and thickness parameters, covering common geoelectric cross-sectional types such as horizontal layers, uplifts, and depressions. After training, all parameters of the MPS inversion network are fixed. When training the denoising model, the apparent resistivity phase sequences calculated from the denoised electromagnetic signal and the corresponding noise-free signal are input into the MPS inversion network, and the mean square error of the resistivity models output by both is calculated as the inversion-guided sensing loss. This inversion-guided sensing loss extends the optimization objective from the signal level to the geological interpretation level, allowing the denoising model to be optimized directly with the goal of improving inversion accuracy. This avoids the problem of good signal-level indicators but large deviations in the inversion results, ensuring the practical application value of the denoising results.

[0047] In this embodiment, the adversarial loss term is calculated using a matched discriminator network in the training stage. In this embodiment, a signal discriminator formed by stacking three 1D convolution layers can be constructed in a matching manner, each convolution layer is followed by a batch normalization layer and an activation layer, and finally outputs a classification probability, which is used to distinguish whether an input signal is a real clean signal or a denoised signal generated by the model; the adversarial loss is the classification error of the discriminator on the denoised signal, which guides the denoised electromagnetic signal to approximate the distribution of the corresponding noise-free signal; meanwhile, a feature matching loss is added to calculate the mean square error between the feature maps output by the second convolution layer of the discriminator for the denoised signal and the clean signal, so as to constrain the similarity between the two from the feature level; by introducing the adversarial loss term, the statistical distribution of the denoised electromagnetic signal can be guided to approach the statistical distribution of the noise-free signal, thereby improving the realism of the output signal.

[0048] In an embodiment, the weighted calculation weight of the physical constraint loss term among all loss terms is the largest.

[0049] In this embodiment, the loss values of each loss term can be weighted to obtain a final loss value, and training is performed based on the final loss value. In the weighted calculation process, the weight of the time-frequency domain joint fidelity loss term is set to 0.1, the weight of the physical constraint loss term is set to 0.5, the weight of the inversion-guided perception loss term is set to 0.3, and the weight of the adversarial loss term is set to 0.1.

[0050] In this embodiment, to further verify the actual denoising performance of the signal denoising model, four typical types of human-caused noise samples from measured data are selected for comparative verification, and the results are shown in Figure 7 (a)- Figure 7 (b), Figure 8 (a)- Figure 8 (b), Figure 9 (a)- Figure 9 (b) and Figure 10 (a)- Figure 10 (b); which respectively correspond to the comparison of time-domain waveforms and power spectrums before and after denoising of power frequency noise (power frequency harmonic scenario), spike impulse noise (electrified railway impulse scenario), triangular wave drift noise (triangular wave scenario for pipeline cathodic protection) and square wave step noise (square wave step scenario for industrial equipment). Wherein, Figure 7 (a), Figure 8 (a), Figure 9 (a) and Figure 10 (a) have the number of sampling points as the horizontal coordinate and the signal amplitude as the vertical coordinate. Figure 7 (b), Figure 8 (b), Figure 9 (b) and Figure 10 (b) have frequency as the horizontal coordinate and power spectral density as the vertical coordinate.

[0051] This embodiment avoids the phase distortion defect after denoising by using a combined time-frequency domain fidelity loss to constrain both amplitude and phase, as is the case with traditional methods. Figure 7 (a)- Figure 7 As shown in (b), after denoising, the effective signal waveform that was originally submerged by 50Hz and higher harmonics is restored to smoothness, the power frequency interference component is eliminated, and the amplitude characteristics and phase continuity are highly consistent with the real magnetotelluric signal.

[0052] This invention, through the introduction of noise sparsity loss, effectively improves the signal denoising model's ability to separate impulse noise, such as... Figure 8 (a)- Figure 8 As shown in (b), the abrupt spikes in the time-domain distribution after denoising are identified and filtered out, the residual pulse energy is greatly reduced, and there is no waveform distortion or loss of effective signal.

[0053] This invention, through its multi-scale Transformer global coding branch, captures slowly varying features over long time, thus overcoming the limitations of the local receptive field in CNNs. Figure 9 (a)- Figure 9 As shown in (b), the gradual drift trend is corrected after denoising, and the gradual characteristics of the effective low-frequency signal are preserved.

[0054] This embodiment introduces a bidirectional cross-attention fusion module, enabling deep interaction between local waveform details and global context, thus avoiding feature fragmentation caused by simple splicing. Figure 10 (a)- Figure 10 As shown in (b), the step spikes are removed after denoising, and the signal transition is natural and artifact-free.

[0055] In this embodiment, Figure 11 This is a comparison image of the two-dimensional inversion profile results before and after denoising. Figure 11 (a) is the inversion profile before denoising. Figure 11 (b) is the inversion profile after denoising. Figure 11 In Apparent resistivity The unit of apparent resistivity; combined with Figure 11The comparison shows that under strong noise interference, the inversion profile before denoising exhibits a large number of false high-resistivity and low-resistivity anomalies, resulting in blurred formation electrical interfaces and poor lateral continuity. At this time, the relative error of apparent resistivity inversion can reach up to 42%. However, after processing by the signal denoising model of this application embodiment, the false anomalies in the generated inversion profile are effectively suppressed, and the matching degree with the real geological model is greatly improved. The apparent resistivity error in the shallow area below 10km is controlled within 8%, and the spatial distribution boundary of high and low resistivity strata is clearly distinguishable. This fully verifies the effectiveness of the inversion-guided sensing loss design in this application embodiment. This mechanism successfully extends the optimization objective of the signal denoising model from the simple signal waveform level to a higher-order geological interpretation level.

[0056] In summary, the embodiments of this application employ a composite loss function consisting of a joint time-frequency domain fidelity loss term, a physical constraint loss term, an inversion-guided sensing loss term, and an adversarial loss term. The calculation of each loss term is completed based on the multi-branch results of the denoised electromagnetic signal, noise component, and impedance tensor output by the model in parallel, thereby achieving multi-dimensional collaborative constraint model optimization.

[0057] In one embodiment of this application, the target denoising model denoises the magnetotelluric signal to be denoised in the following manner: Receive the magnetotelluric signal to be denoised, and perform preprocessing and feature dimension upscaling on the magnetotelluric signal to be denoised, and output a multi-dimensional feature sequence. The multidimensional feature sequence is input into the local encoding branch of the CNN to obtain local features, and the multidimensional feature sequence is input into the global encoding branch of the multi-scale Transformer to obtain global features. Local and global features are input into the bidirectional cross-attention fusion module to obtain fused encoded features; The fused coding features are input into the decoding branch so that the decoding branch can complete the temporal feature decoding and reconstruction based on the fused coding features and output the reconstructed multidimensional features. The multidimensional feature input-output layer is reconstructed to obtain the denoised magnetotelluric signal.

[0058] In this embodiment, preprocessing can refer to DC component removal, outlier truncation, and amplitude normalization. For example, DC component removal is achieved by calculating the mean of the entire signal sequence and then subtracting this mean from each sampling point in the sequence, thus eliminating the DC offset caused by zero-point drift of the observation system. Outlier truncation is achieved by calculating the mean and standard deviation of the signal sequence and truncating sampling points exceeding ±3 times the standard deviation to their corresponding boundary values, thus eliminating the interference of extreme outliers. Amplitude normalization is achieved by dividing by the maximum absolute value of the signal sequence to map the signal amplitude to the range of -1 to 1. Through signal preprocessing, DC offset and extreme outliers in the measured noisy signal can be effectively eliminated, the amplitude range of the signal can be unified, and the influence of outliers and amplitude differences on the inference accuracy of the model can be avoided. In this embodiment, the sample data also needs to be preprocessed in the same way when training the initial denoising model.

[0059] In this embodiment, feature dimension upscaling can be achieved through an input embedding module. The input embedding module is a one-dimensional convolutional layer with a kernel size of 3, an output channel count of 128, and a stride of 1. The input embedding module receives a single-channel one-dimensional time series input and maps the original single-channel signal into a 128-channel high-dimensional feature sequence through convolution operations. The time length of the output feature is consistent with that of the input sequence, so as to convert the original amplitude signal into high-dimensional abstract features, which facilitates the subsequent network to extract deep signal and noise features.

[0060] In this embodiment, the CNN local coding branch includes four convolutional units connected in series. The output of the previous convolutional unit is directly used as the input of the next convolutional unit. Each convolutional unit includes one one-dimensional convolutional layer, one batch normalization layer and one linear rectified activation layer. The kernel sizes of the four convolutional layers are 7, 5, 3 and 3, respectively, and the number of output channels is 128.

[0061] In this embodiment, the multi-scale Transformer global coding branch is divided into three parallel sub-branches. The high-resolution sub-branch does not perform downsampling and passes sequentially through a convolutional layer with a kernel size of 3 and two local window Transformer blocks. The medium-resolution sub-branch first performs 2x downsampling through strided convolution with a stride of 2, and then passes through two local and global alternating attention Transformer blocks. The low-resolution sub-branch first performs 8x downsampling through average pooling with a stride of 8, and then passes through two global self-attention Transformer blocks.

[0062] In this embodiment, the CNN local coding branch and the multi-scale Transformer global coding branch are dual parallel coding branches, which can simultaneously extract local details and global dependencies in parallel. The CNN local coding branch efficiently captures the local morphological features of the waveform, while the multi-scale Transformer global coding branch covers long-distance correlations at different time scales. The two complement each other and can comprehensively characterize the broadband characteristics of the magnetotelluric signal, solving the problem of single-architecture feature extraction dimension.

[0063] In one embodiment, the bidirectional cross-attention fusion module includes: a first cross-attention unit, a second cross-attention unit, and their respective convolutional layers; In the first cross-attention unit, the query vector is the local feature output by the local encoding branch of the CNN, and the key vector and value vector are the global features output by the global encoding branch of the multi-scale Transformer. In the second cross-attention unit, the query vector is the global feature output by the global encoding branch of the multi-scale Transformer, and the key vector and value vector are the local features output by the local encoding branch of the CNN. Convolutional layers are used to output the fused encoded features of the corresponding cross-attention units.

[0064] In this embodiment, the first cross-attention unit uses the features output by the local encoding branch of the CNN as the query vector, aggregates the global context information of the global encoding branch of the Transformer, and outputs globally enhanced local features; the second cross-attention unit uses the global features output by the global encoding branch of the multi-scale Transformer as the query vector, aggregates the local detail information of the local encoding branch of the CNN, and outputs detail-enhanced global features; the outputs of the two cross-attention units are concatenated along the channel dimension and input into a one-dimensional convolutional layer with a kernel size of 1 to compress the number of channels to 128, thus obtaining the final fused encoding features; by adopting a bidirectional cross-attention mechanism, deep interaction and bidirectional enhancement of the two types of features can be achieved, so that local features carry global context information and global features supplement local detail information, avoiding the problem of insufficient feature fusion caused by simple concatenation, and effectively improving the representation ability of fused features.

[0065] In this embodiment, the decoding branch includes three Transformer decoding blocks stacked in series. The output of the previous decoding block serves as the input of the next decoding block. Each decoding block includes a self-attention layer, a feedforward network layer, and a corresponding layer normalization structure. The decoding branch receives the fused encoded feature input and gradually restores the detailed information of the signal through self-attention calculation and feature mapping. It outputs 128-channel high-dimensional decoded features with the same length as the input. This fully utilizes the global fused features extracted during the encoding stage to effectively reconstruct the denoised signal features and ensure the long-term temporal consistency and detail restoration of the output signal.

[0066] In this embodiment, the output layer may include three branches: a signal output branch, a noise estimation branch, and an impedance tensor calculation branch; the signal output branch is used to output the denoised electromagnetic signal, the noise estimation branch is used to output the estimated noise component, and the impedance tensor calculation branch is used to calculate the impedance tensor of the denoised electromagnetic signal.

[0067] In this embodiment, the signal output branch is a one-dimensional convolutional layer with a kernel size of 1, used to map the 128-dimensional high-dimensional decoding features into a single-channel time-domain denoised signal; the noise estimation branch has the same structure as the signal output branch and is used to output a single-channel estimated noise sequence; the differentiable impedance tensor calculation sublayer has a built-in differentiable short-time Fourier transform module, used to receive the denoised signal with both electric and magnetic field components and convert it to the time-frequency domain, and then calculate the local impedance tensor at each time-frequency point using the least squares method to obtain the impedance estimation result; the three branches receive the output features of the decoding branch in parallel, each independently completes the calculation and outputs the corresponding result, so as to simultaneously provide the denoised signal, noise component and physical quantity calculation results, which not only supports the multi-dimensional calculation of the loss function, but also can directly output intermediate physical quantities for subsequent processing; the differentiable impedance calculation module realizes the end-to-end embedding of physical constraints to ensure that the denoising result conforms to the basic physical laws of magnetotellurics.

[0068] In this embodiment, each module is connected sequentially according to the data flow direction. The output of the input embedding module is simultaneously connected to the input of two branches in the dual parallel coding branch. The two outputs of the dual parallel coding branch are respectively connected to the two inputs of the bidirectional cross-attention fusion module. The output of the fusion module is connected to the input of the decoding branch. The output of the decoding branch is connected to the input of the output layer, forming a complete end-to-end network structure.

[0069] Corresponding to the magnetotelluric signal denoising method in the above embodiments, Figure 12 This is a structural block diagram of a magnetotelluric signal denoising device according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 12 The magnetotelluric signal denoising device 30 includes: a signal determination module 31 and a denoising module 32.

[0070] Among them, the noise-determination signal determination module 31 is used to acquire the magnetotelluric signal to be denoised; The denoising module 32 is used to input the magnetotelluric signal to be denoised into the trained target denoising model to obtain the denoised magnetotelluric signal. The target denoising model is obtained by training the model training module in the following way: Obtain a graded training sample library; the graded training sample library stores training samples with multiple noise levels. Each training sample includes a noise-free electromagnetic signal and the corresponding noisy signal; the noise level of the training sample is inversely proportional to the signal-to-noise ratio of its corresponding noisy signal. The initial denoising model is iteratively trained repeatedly until a preset training round threshold or a preset convergence condition is met, resulting in the target denoising model: The sampling weights for training samples at each noise level are determined based on the current training round, and training samples are sampled from the hierarchical training sample library based on the sampling weights. The sampling weight of the lowest noise level among all noise levels decreases as the training round increases, while the sampling weight of the highest noise level among all noise levels increases as the training round increases. The initial denoising model is trained based on the sampled training data to update the parameters of the initial denoising model.

[0071] In one embodiment of this application, the model training module is specifically used to construct an extended noise sample library and to obtain a noise-free sample library; wherein, the extended noise sample library contains natural noise samples and simulated noise samples, and each noise sample in the extended noise sample library corresponds to a noise type corresponding to that noise sample; the noise-free sample library contains multiple noise-free electromagnetic signals; For each electromagnetic signal in the noise-free sample library, multiple noise samples of different noise types corresponding to the electromagnetic signal are randomly selected from the extended noise sample library; for each selected noise sample, the noise scaling factor of the noise sample is determined based on the noise signal-to-noise ratio of the noise sample; the noise sample is superimposed on the electromagnetic signal based on the noise scaling factor of the noise sample to obtain a noisy signal, and the electromagnetic signal and the corresponding noisy signal are combined into an initial training sample. Based on each initial training sample and the preset noise level classification rules, a hierarchical training sample library is obtained.

[0072] In one embodiment of this application, the simulated noise samples include: noise samples generated by a parameterized noise model and noise samples generated by a generative adversarial network; the parameterized noise model is used to simulate the time-domain and frequency-domain statistical characteristics of natural noise; The model training module is also used to acquire raw magnetotelluric observation signals and to segment and filter the raw magnetotelluric observation signals to obtain natural noise samples. Noise samples are generated based on pre-built parametric noise models; the parametric noise models include at least one of the following: power frequency harmonic noise model, railway impulse noise model, pipeline cathodic protection current drift noise model, and industrial switch square wave noise model; different parametric noise models are used to generate corresponding noise samples based on different noise physical characteristic parameters; Noise samples are generated using a pre-trained generative adversarial network (GAN); the pre-trained GAN is trained based on natural noise samples and noise samples generated through a parameterized noise model.

[0073] In one embodiment of this application, the model training module is further configured to perform time-domain data augmentation and time-frequency domain data augmentation operations on each initial training sample to expand the training samples and obtain the expanded full training samples. Based on the signal-to-noise ratio of the full training samples and the preset noise level classification rules, each full training sample is divided into a hierarchical training sample library.

[0074] In one embodiment of this application, the model training module is further configured to input the sampled training samples into the initial denoising model and perform forward propagation to obtain multiple outputs of the output layer of the initial denoising model; the multiple outputs include: denoised electromagnetic signal, noise component and impedance tensor of denoised electromagnetic signal; The initial denoising model is trained based on the denoised electromagnetic signal, noise components, impedance tensor of the denoised electromagnetic signal, and loss function.

[0075] In one embodiment of this application, the loss function contains the following loss terms: a time-frequency joint fidelity loss term for constraining the fidelity of the time-domain waveform and frequency-domain features of the output of the initial denoising model; a physical constraint loss term for constraining the output of the initial denoising model to satisfy the magnetotelluric impedance tensor relationship and guiding the noise component to be sparse; an inversion-guided sensing loss term for constraining the resistivity model of the output of the initial denoising model after magnetotelluric inversion to be consistent with the inversion result of the corresponding noise-free electromagnetic signal; and an adversarial loss term for guiding the statistical distribution of the output of the initial denoising model to tend towards the statistical distribution of the natural signal. The model training module is specifically used to determine the loss value of the joint time-frequency domain fidelity loss term, the loss value of the inversion-guided sensing loss term, and the loss value of the adversarial loss term based on the denoised electromagnetic signal. The loss value of the physical constraint loss term is determined based on the denoised electromagnetic signal, noise component, and impedance tensor of the denoised electromagnetic signal. The initial denoising model is trained based on the loss values ​​of each loss term in the loss function.

[0076] In one embodiment of this application, the physical constraint loss term has the largest weight in the weighted calculation among all loss terms.

[0077] In one embodiment of this application, the target denoising model denoises the magnetotelluric signal to be denoised in the following manner: Receive the magnetotelluric signal to be denoised, and perform preprocessing and feature dimension upscaling on the magnetotelluric signal to be denoised, and output a multi-dimensional feature sequence. The multidimensional feature sequence is input into the local encoding branch of the CNN to obtain local features, and the multidimensional feature sequence is input into the global encoding branch of the multi-scale Transformer to obtain global features. Local and global features are input into the bidirectional cross-attention fusion module to obtain fused encoded features; The fused coding features are input into the decoding branch so that the decoding branch can complete the temporal feature decoding and reconstruction based on the fused coding features and output the reconstructed multidimensional features. The multidimensional feature input-output layer is reconstructed to obtain the denoised magnetotelluric signal.

[0078] In one embodiment of this application, the bidirectional cross-attention fusion module includes: a first cross-attention unit, a second cross-attention unit, and their respective convolutional layers; In the first cross-attention unit, the query vector is the local feature output by the local encoding branch of the CNN, and the key vector and value vector are the global features output by the global encoding branch of the multi-scale Transformer. In the second cross-attention unit, the query vector is the global feature output by the global encoding branch of the multi-scale Transformer, and the key vector and value vector are the local features output by the local encoding branch of the CNN. Convolutional layers are used to output the fused encoded features of the corresponding cross-attention units.

[0079] In one embodiment of this application, the magnetotelluric signal denoising device further includes: a convergence condition judgment module, which is used to evaluate the performance of the initial denoising model after the current iteration based on the verification sample set after each preset round of training iteration, and obtain the apparent resistivity estimation error in the verification sample set. The trend of apparent resistivity estimation error in multiple consecutive evaluations is statistically analyzed. If the apparent resistivity estimation error does not decrease in a preset number of consecutive rounds, the current initial denoising model is determined to meet the preset convergence condition. If the apparent resistivity estimation error continues to decrease after a preset number of rounds, then the convergence condition has not been met.

[0080] See Figure 13 , Figure 13 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 13 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of each module / unit in the above-described device embodiments, for example... Figure 12 The functions of the signal determination module 31 and the denoising module 32 are shown.

[0081] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0082] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0083] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.

[0084] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the magnetotelluric signal denoising method provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.

[0085] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0086] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0087] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0088] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0089] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or units, or it may be an electrical, mechanical, or other form of connection.

[0090] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0091] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0092] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0093] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for denoising magnetotelluric signals, characterized in that, include: Acquire the magnetotelluric signal to be denoised; The magnetotelluric signal to be denoised is input into the trained target denoising model to obtain the denoised magnetotelluric signal. The target denoising model is obtained by training in the following manner: Obtain a graded training sample library; the graded training sample library stores training samples with multiple noise levels, each training sample includes a noise-free electromagnetic signal and a noisy signal corresponding to the electromagnetic signal; the noise level of the training sample is inversely proportional to the signal-to-noise ratio of its corresponding noisy signal. The initial denoising model is iteratively trained repeatedly until a preset training round threshold or a preset convergence condition is met, thus obtaining the target denoising model: The sampling weights for training samples at each noise level are determined based on the current training round, and training samples are sampled from the hierarchical training sample library based on the sampling weights. The sampling weight of the lowest noise level among all noise levels decreases as the training round increases, while the sampling weight of the highest noise level among all noise levels increases as the training round increases. The initial denoising model is trained based on the sampled training data to update the parameters of the initial denoising model.

2. The magnetotelluric signal denoising method as described in claim 1, characterized in that, The hierarchical training sample library is constructed in the following way: An extended noise sample library is constructed, and a noise-free sample library is obtained; wherein, the extended noise sample library contains natural noise samples and simulated noise samples, and each noise sample in the extended noise sample library corresponds to a noise type; the noise-free sample library contains multiple noise-free electromagnetic signals; For each electromagnetic signal in the noise-free sample library, multiple noise samples of different noise types corresponding to the electromagnetic signal are randomly selected from the extended noise sample library; for each selected noise sample, the noise scaling factor of the noise sample is determined based on the noise signal-to-noise ratio of the noise sample; the noise sample is superimposed on the electromagnetic signal based on the noise scaling factor of the noise sample to obtain a noisy signal, and the electromagnetic signal and the corresponding noisy signal are combined into an initial training sample; Based on the initial training samples and the preset noise level classification rules, the hierarchical training sample library is obtained.

3. The magnetotelluric signal denoising method as described in claim 2, characterized in that, The simulated noise samples include: noise samples generated by a parametric noise model and noise samples generated by a generative adversarial network; the parametric noise model is used to simulate the time-domain and frequency-domain statistical characteristics of natural noise; The construction of the extended noise sample library includes: The raw magnetotelluric observation signal is acquired, and the raw magnetotelluric observation signal is segmented and filtered to obtain the natural noise sample; Noise samples are generated based on pre-constructed parametric noise models; the parametric noise models include at least one of power frequency harmonic noise model, railway impulse noise model, pipeline cathodic protection current drift noise model, and industrial switch square wave noise model; different parametric noise models are used to generate corresponding noise samples based on different noise physical characteristic parameters; Noise samples are generated using a pre-trained generative adversarial network; the pre-trained generative adversarial network is trained based on the natural noise samples and the noise samples generated by the parameterized noise model.

4. The magnetotelluric signal denoising method as described in claim 2, characterized in that, The hierarchical training sample library, obtained based on each of the initial training samples and the preset noise level classification rules, includes: Time-domain data augmentation and time-frequency domain data augmentation operations are performed on each initial training sample to expand the training samples and obtain the full training samples after augmentation. Based on the signal-to-noise ratio of the full training samples and the preset noise level classification rules, each full training sample is divided to obtain the hierarchical training sample library.

5. The magnetotelluric signal denoising method as described in claim 1, characterized in that, The training of the initial denoising model based on the sampled training samples includes: The sampled training samples are input into the initial denoising model and forward propagated to obtain multiple outputs of the output layer of the initial denoising model; the multiple outputs include: denoised electromagnetic signal, noise component and impedance tensor of the denoised electromagnetic signal; The initial denoising model is trained based on the denoised electromagnetic signal, the noise component, the impedance tensor of the denoised electromagnetic signal, and the loss function.

6. The magnetotelluric signal denoising method as described in claim 5, characterized in that, The loss function contains the following loss terms: a time-frequency joint fidelity loss term used to constrain the fidelity of the time-domain waveform and frequency-domain features of the output of the initial denoising model; a physical constraint loss term used to constrain the output of the initial denoising model to satisfy the magnetotelluric impedance tensor relationship and guide the noise component to be sparse; an inversion-guided sensing loss term used to constrain the resistivity model of the output of the initial denoising model after magnetotelluric inversion to be consistent with the inversion result of the corresponding noise-free electromagnetic signal; and an adversarial loss term used to guide the statistical distribution of the output of the initial denoising model to tend towards the statistical distribution of the natural signal. The training of the initial denoising model based on the denoised electromagnetic signal, noise components, and the impedance tensor and loss function of the denoised electromagnetic signal includes: The loss values ​​of the time-frequency domain joint fidelity loss term, the inversion-guided sensing loss term, and the adversarial loss term are determined based on the denoised electromagnetic signal. The loss value of the physical constraint loss term is determined based on the denoised electromagnetic signal, the noise component, and the impedance tensor of the denoised electromagnetic signal. The initial denoising model is trained based on the loss values ​​of each loss term in the loss function.

7. The magnetotelluric signal denoising method as described in claim 6, characterized in that, Among all the loss terms, the physical constraint loss term has the largest weight in the weighted calculation.

8. The magnetotelluric signal denoising method as described in claim 1, characterized in that, The target denoising model achieves denoising of the magnetotelluric signal to be denoised in the following manner: The system receives the magnetotelluric signal to be denoised, performs preprocessing and feature dimension upscaling on the magnetotelluric signal to be denoised, and outputs a multidimensional feature sequence. The multidimensional feature sequence is input into the local encoding branch of a CNN to obtain local features, and the multidimensional feature sequence is input into the global encoding branch of a multi-scale Transformer to obtain global features. The local features and the global features are input into the bidirectional cross-attention fusion module to obtain the fused encoded features; The fused coding features are input into the decoding branch so that the decoding branch can complete the temporal feature decoding and reconstruction based on the fused coding features and output the reconstructed multidimensional features. The reconstructed multidimensional feature is input to the output layer to obtain the denoised magnetotelluric signal.

9. The magnetotelluric signal denoising method as described in claim 8, characterized in that, The bidirectional cross-attention fusion module includes: a first cross-attention unit, a second cross-attention unit, and their respective convolutional layers; In the first cross-attention unit, the query vector is the local feature output by the local coding branch of the CNN, and the key vector and value vector are the global features output by the global coding branch of the multi-scale Transformer. In the second cross-attention unit, the query vector is the global feature output by the global encoding branch of the multi-scale Transformer, and the key vector and value vector are the local features output by the local encoding branch of the CNN. The convolutional layer is used to output the fused encoded features of the corresponding cross-attention units.

10. The magnetotelluric signal denoising method as described in claim 1, characterized in that, The process of determining whether the initial denoising model satisfies the preset convergence condition includes: After each preset training iteration, the performance of the initial denoising model after the current iteration is evaluated based on the validation sample set, and the apparent resistivity estimation error in the validation sample set is obtained. The trend of apparent resistivity estimation error in multiple consecutive evaluations is statistically analyzed. If the apparent resistivity estimation error does not decrease in a preset number of consecutive rounds, the current initial denoising model is determined to meet the preset convergence condition. If the apparent resistivity estimation error continues to decrease after a preset number of rounds, then the convergence condition has not been met.