Magnetotelluric signal denoising method and system based on self-supervised contrast learning

Through the self-supervised comparison learning method, the geodenoising model is trained using the time-frequency consistency characteristics, which solves the problem of insufficient adaptability to label data and noise characteristics in the existing technology, and achieves efficient and accurate signal denoising and Noise separation effect.

CN119249269APending Publication Date: 2025-01-03HUNAN NORMAL UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411309055.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing supervised learning methods require a large number of labeled data sets, making it difficult to train models suitable for multiple locations and multiple types of noise characteristics, and it is difficult to label massive earth electromagnetic data.

Method used

Using the earth electromagnetic signal denoising method based on self-supervised comparison learning, the self-supervised pre-training comparison learning method is used to reduce noise, use the time domain and frequency domain characteristics, and compare learning through frequency domain and time frequency consistency to develop suitable Denoising models under different environments and noise conditions do not require the use of large amounts of label data.

Benefits of technology

It significantly improves the accuracy and reliability of earth electromagnetic signal denoising, reduces dependence on labeled data, enhances the robustness and adaptability of the model, and can better extract and distinguish signal characteristics in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249269A_ABST
    Figure CN119249269A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetotelluric signal denoising method and system based on self-supervised comparative learning, and the method comprises the steps: constructing a noisy signal sample, obtaining a noise contour sample and / or a pure signal sample of the noisy signal sample, and training a pre-training denoising model based on a comparative learning framework through the noisy signal sample; a small part of data with labels is taken and sent to the trained pre-training model, values of all layers in the learning framework are fixed and compared, only a regression layer is finely adjusted, and a trained signal-to-noise mapping model is obtained; and finally, inputting the to-be-denoised signal into the signal-to-noise mapping model to obtain a denoised magnetotelluric signal. According to the method, a self-supervised contrast learning framework is introduced into a magnetotelluric signal noise reduction technology, data augmentation is realized through a time domain augmentation mode and a frequency domain augmentation mode, strong interference in the magnetotelluric signals is effectively removed, slow change information of a low-frequency band of the signals is reserved, and a good noise reduction effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of magnetotelluric data denoising, and in particular relates to a magnetotelluric signal denoising method and system based on self-supervised comparative learning. Background Art

[0002] Magnetotelluric sounding is a key geophysical exploration technology that uses natural alternating electromagnetic fields as field sources to analyze the electrical properties and distribution characteristics of underground rock formations. However, since the magnetotelluric signal itself is very weak, it is easily interfered by various noises. In particular, with the advancement of science and technology, the electromagnetic interference caused by heavy industry is becoming more and more serious. Therefore, when conducting magnetotelluric detection, how to eliminate strong interference, improve the quality of magnetotelluric sounding data, and retain as much useful information as possible is an important research topic in this field.

[0003] Many scholars have applied a variety of signal processing methods to this field and have improved the quality of magnetotelluric sounding data to a certain extent. However, existing supervised learning methods require a large number of labeled data sets, and it is obviously very difficult and impractical to label massive magnetotelluric data, which leads to the limitations of existing supervised learning methods. In addition, developing models suitable for multi-location and multi-type noise characteristics is also a very challenging task in this field. Summary of the invention

[0004] The purpose of the present invention is to solve the problem that the existing supervised learning method requires a large number of labeled data sets and is difficult to train a model suitable for multiple locations and multiple types of noise characteristics. Furthermore, a method and system for denoising magnetotelluric signals based on self-supervised contrastive learning is proposed, that is, magnetotelluric denoising is performed through a self-supervised pre-training contrastive learning method. The technical solution of the present invention utilizes the features of both the time domain and the frequency domain at the same time, and performs comparative learning through the frequency domain and time-frequency consistency. Under the premise that the network architecture of the time domain encoder and the frequency domain encoder set by the present invention is the same, the time-based representation and the frequency-based representation learned by the model from the same magnetotelluric data are closer to each other in the joint time-frequency feature space, and the representations learned from different magnetotelluric data are farther away. Therefore, the present invention makes full use of the characteristics of the time-frequency consistency for model training, so that the model developed based on the time-frequency consistency can capture the potential common features of the magnetotelluric data in the time-frequency domain, and further enhance the knowledge transfer between different magnetotelluric data sets, and is more adaptable to the complexity of different magnetotelluric data due to dynamic changes across regions and time. Then, a comparative learning framework is adopted to realize self-supervised training, without the need to use labels in the pre-training data set, so that only a small part of the labeled data is used in the fine-tuning stage later.

[0005] In one aspect, the present invention provides a method for denoising magnetotelluric signals based on self-supervised contrastive learning, comprising the following steps:

[0006] Step S1: constructing a noisy signal sample and obtaining a noise profile sample and / or a pure signal sample of the noisy signal sample;

[0007] Step S2: using the noisy signal sample to train a pre-trained denoising model based on a contrastive learning framework using a self-supervised contrastive learning method, wherein the input of the denoising model is a magnetotelluric noisy signal, and the output is a denoised magnetotelluric signal or a noise profile of the magnetotelluric signal;

[0008] The pre-trained denoising model based on the contrastive learning framework includes a time domain encoder, a frequency domain encoder and two cross-space projectors of the same architecture connected to the corresponding time domain encoder and frequency domain encoder respectively. The network architecture of the time domain encoder is the same as that of the frequency domain encoder. The cross-space projector maps the time-based and frequency-based representations to the same time-frequency space. The input of the time domain encoder is the time domain information of the magnetotelluric noisy signal; the input of the frequency domain encoder is the frequency domain information of the magnetotelluric noisy signal; the self-supervised contrastive learning process is contrastive learning based on time-frequency consistency;

[0009] Step S3: inputting the labeled noisy signal samples into the trained pre-trained denoising model based on the contrastive learning framework, wherein the model parameters of each layer except the regression layer in the contrastive learning framework are fixed with reference to the pre-trained denoising model, and the regression layer of the contrastive learning framework is adjusted using the labeled noisy signal samples to obtain the trained denoising model;

[0010] Step S4: Use the trained denoising model to denoise the noisy signal samples to be denoised.

[0011] The core of contrastive learning in self-supervised learning is to learn feature representations from unlabeled data and apply them to downstream tasks. The guiding ideology is to train a representation learning model by constructing similar instances and dissimilar instances, so that similar instances are closer in the projection space, while dissimilar instances are farther away in the projection space. Contrastive learning has three key issues: the design of the encoder, the selection of the loss function, and the construction of positive and negative sample pairs (this application takes the time domain and the frequency domain as a sample pair, and realizes model pre-training by comparing the time-frequency consistency of the two). Through contrastive learning, the dependence on labeled data can be reduced, magnetotelluric data can be processed more efficiently, and the accuracy and reliability of denoising can be improved. After introducing contrastive learning, the model can better extract and distinguish signal features under different environments and noise conditions, thereby improving the overall quality of magnetotelluric sounding data. The method of the present invention not only provides a new solution for magnetotelluric signal-noise separation, but also opens up a new direction for the application of self-supervised learning in the field of geophysics.

[0012] The present invention uses a time-frequency consistency contrast learning model, which is trained based on individual discrimination agent tasks. The core idea of ​​time-frequency consistency is that the noise time-frequency characteristics of the magnetotelluric data set across regions and time remain unchanged, and use it to induce an effective pre-trained contrast learning model. The data set of the present invention is a sample of the time domain and frequency domain, so they will show certain differences in the feature space, which is regarded as cross-regional and cross-time, so that the model can better capture different information dimensions in time and space. The magnetotelluric time domain waveform shows how the sensor reading changes over time, while the frequency domain shows the proportion of each frequency component of the signal in the entire spectrum. Considering the frequency domain can provide a better understanding of the noise morphology in the magnetotelluric time domain waveform, which cannot be directly captured by the time domain waveform alone. However, the existing method of using machine learning to complete magnetotelluric data denoising only focuses on modeling in the time domain and completely ignores the frequency domain.

[0013] The present invention assumes that the time-based representation and frequency-based representation learned by the model from the same magnetotelluric data are closer to each other in the joint time-frequency feature space, and the representations learned from different magnetotelluric data are farther away. The above assumption is valid under the technical solution of the present invention, because the features of the time domain and the frequency domain are extracted through the same network architecture, and they will appear closer in the feature space. Because the representations of the same sample in the time domain and the frequency domain come from the same data source, although the expressions are different, their semantic information is essentially the same. Therefore, based on the contrastive learning of time-frequency consistency, similar instances are closer in the projection space, and dissimilar instances are farther away in the projection space, thereby updating the model. Furthermore, the present invention adopts a contrastive learning framework, and develops a model based on the consistency of time-frequency representation to realize self-supervised training, without the need to use labels in the pre-training data set, and only a small part of the labeled data is used in the fine-tuning stage later, and the regression layer parameters adjusted in the fine-tuning stage mainly refer to the cross-space projector and the output layer.

[0014] Further optionally, the self-supervised contrastive learning process in step S2 is to perform self-supervised contrastive learning based on a set loss function, and the set loss function at least includes the following time-frequency consistency loss function:

[0015]

[0016] Where, L C,i is the loss function of time-frequency consistency, Indicates that for the input sample The distance between the time-based features and the frequency-based features, δ is a given constant boundary;

[0017] use Representation characteristics and Features The distance between Representation characteristics and Features The distance between Representation characteristics and Features The distance between Representation characteristics and Features The distance between

[0018] Each input sample Perform time domain augmentation and frequency domain augmentation to obtain augmented samples Then the model obtains four features, which are

[0019] R T , R Fdenotes the fully connected layers of two cross-spatial projectors connected to the corresponding time domain encoder and frequency domain encoder, respectively. For sample The input time domain encoder obtains, For sample Spectrum Input frequency domain encoder.

[0020] It should be understood that the above loss function is an example of the present invention, and in other feasible embodiments, there are many other loss functions that can meet the requirements of the present invention.

[0021] Further optionally, the self-supervised contrastive learning process in step S2 is to perform self-supervised contrastive learning based on a set loss function, and the loss function, in addition to the loss function of time-frequency consistency, further includes a loss function based on the time domain and a loss function based on the frequency domain.

[0022] Further optionally, the loss function based on the time domain is as follows:

[0023]

[0024] Where, L T,i is the loss function based on the time domain, for The distance between is the input sample And the input sample Time domain augmented samples The input time domain encoder is obtained; sim(,) represents the cosine similarity, τ represents the temperature function of the adjustment scale, For input sample Input time domain encoder G T obtained;

[0025] The loss function based on the frequency domain is as follows:

[0026]

[0027] Where, L F,i is the loss function based on the frequency domain, for The distance between is the input sample And the input sample Frequency domain augmented samples of The input frequency domain encoder is obtained; sim(,) represents the cosine similarity, τ represents the temperature function of the adjustment scale, For input sample Input frequency domain encoder G T Got it.

[0028] In the training process of the contrastive learning method, the technical solution of the present invention preferably uses loss functions based on time domain, frequency domain and time-frequency consistency, that is, on the basis of time-frequency consistency comparison, the time domain features of the original sample and the augmented sample are preferably compared, and the frequency domain features of the original sample and the augmented sample are compared. First, the time domain contrast loss function prompts the model to learn similar time domain features for the original sample and the augmented sample. Secondly, the frequency domain contrast loss function prompts the model to learn similar frequency domain features for the original sample spectrum and the augmented sample spectrum. Finally, the time-frequency consistency loss function guides the model to maintain consistency based on time domain and frequency domain features. Training with these three loss functions enables the model to learn more positive sample characteristics, thereby better meeting the denoising requirements of magnetotelluric data.

[0029] The above-mentioned time-domain-based loss function and frequency-domain-based loss function are both preferred embodiments of the present invention, which can prompt the time-domain or frequency-domain encoder to generate tighter time-domain or frequency-domain-based features for the positive sample pair (the same sample) and separate the negative sample pairs (different samples) from each other, which is a requirement for the loss function. In other feasible embodiments, the use of a time-domain loss function or a frequency-domain loss function that can achieve comparison also meets the requirements of the present invention.

[0030] Further optionally, the network architecture of the frequency domain encoder is the same as that of the time domain encoder, and both are provided with three ResNets modules, each of which is composed of one convolutional layer, one batch normalization layer and one activation function layer;

[0031] Among them, there are two output directions after the input, one output direction points to the first ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the first ResNets module to form the first local residual network; the output of the first local residual network has two output directions, one output direction points to the second ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the second ResNets module to form the second local residual network; the output of the second local residual network has two output directions, one output direction points to the third ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the third ResNets module to form the third local residual network.

[0032] The collaborative work of these four components enables the contrastive learning model to fully utilize the information of magnetotelluric data in time and frequency, thereby improving the learning and analysis capabilities of the model. The time domain and frequency domain encoders encode signals from different dimensions respectively, while the cross-space projector fuses and compares these codes in a unified time-frequency space. This design enables the model to more comprehensively capture the important features of the signal and provide richer information for subsequent signal processing and analysis.

[0033] For example: In the example, the contrastive learning framework uses a one-dimensional ResNet backbone network. The encoder consists of layer-by-layer convolution blocks. The size of all kernels is 8, the step size is 8, 1, 1, and the depth is 32, 64, and 128. The cross-space projection layer contains two fully connected layers with output scales of 256 and 128. In pre-training, the learning rate is 0.0003, the L2 norm penalty coefficient is 0.0005, the batch size is 64, and the training epoch is 40. For the regression task in the fine-tuning stage, a 2-layer fully connected layer is used as the mapper, with latitudes of 64 and 128, and the MSE loss is used to optimize the mapper;

[0034] Further optionally, the two cross-space projectors of the same architecture are both fully connected layers, and the weights of the fully connected layers are the same or the weights of the fully connected layers are initialized using the same method. In addition, the activation function can also be selected to be consistent.

[0035] The technical solution of the present invention adopts two different data enhancement technologies in time domain and frequency domain to ensure that after data enhancement in one domain, the characteristics of the other domain are still similar to the original data characteristics, laying a good data enhancement foundation for subsequent comparative learning methods.

[0036] The method further includes: performing time domain augmentation and frequency domain augmentation on the noisy signal sample with time-frequency consistency;

[0037] The frequency augmentation process includes removing frequency components and / or enhancing frequency components, wherein a preset value E is defined to represent the number of frequency components whose frequency components are removed and enhanced;

[0038] Remove frequency components: Randomly select E frequency components from the entire spectrum and set their amplitudes to 0 to simulate the absence or attenuation of frequency information;

[0039] Enhance frequency components: Make the entire spectrum amplitude less than α·A m Randomly select E components from the frequency components of to enhance, and the amplitude enhancement is α·A m , A m is the maximum amplitude in the spectrum, α is a preset value used to adjust the scale of the disturbance frequency component.

[0040] Through the above frequency removal and addition steps, a new augmented sequence can be generated for the original signal. This augmented sequence contains the signal after frequency domain perturbation, simulates possible frequency loss and enhancement, and thus increases the robustness of the model under different frequency distribution conditions.

[0041] In the process of neural network training, in addition to the feature extraction of the network model itself, the neural network training sample library also plays an important role. Data augmentation is the basis for constructing positive and negative sample pairs in the task of contrastive learning individual discrimination agent. The time domain augmentation methods commonly used for time series data include mean reduction, amplitude inversion, front and back inversion, random zeroing, adding Gaussian white noise, etc. These data augmentation methods more or less change the time domain characteristics of the original samples, so that the augmented sample set has more data diversity, expands the scale of training data, and is more helpful for the model to learn the characteristics of the same object under different perspectives and changes, and improves the model's adaptability in real scenes.

[0042] Since the present invention needs to learn the same sample from both the time domain and the frequency domain, the augmented sample needs to maintain time-frequency consistency with the original sample. In order to meet the time-frequency consistency, it is necessary to ensure that the features of the augmented sample in another domain are as consistent as possible with the original sample while augmenting in one domain. In this way, the model can find the connection between the same sample in two different feature spaces of time and frequency.

[0043] Further optionally, the time domain augmentation method of the present invention is three data augmentation methods: mean subtraction, amplitude inversion, and front-to-back inversion. These three data augmentation methods have large differences in time domain waveforms from the original samples, but will not change the spectrum amplitude of the original samples, that is, the spectrum characteristics remain unchanged, and the time-frequency consistency of the augmented samples and the original samples is maintained;

[0044] Among them, mean subtraction is to subtract the mean of each element of the signal or data to make the mean of the data zero; amplitude inversion is to multiply each element of the signal by -1, so that the positive value of the signal becomes negative, and the negative value becomes positive; front-to-back inversion is to reverse the signal or data in chronological order, that is, to arrange the time series of the signal from the last element to the first element.

[0045] It should be noted that, despite the transformation in the time domain, the augmented samples have the same characteristics as the original samples in the frequency domain, which ensures time-frequency consistency. This feature is particularly important for many application scenarios, such as time series data analysis in signal processing and machine learning, which can enhance data diversity while retaining the key spectral information of the original samples, thereby improving the robustness and generalization ability of the algorithm.

[0046] Further optionally, the frequency domain augmentation method of the present invention is to complete the augmentation by disturbing the spectrum characteristics of the original sample, specifically by introducing four methods: low-frequency single point, low-frequency multiple points, high-frequency single point, and high-frequency multiple points, to ensure the diversity of frequency augmentation;

[0047] Among them, low-frequency single point means perturbing one frequency point in the low-frequency band of the original sample, low-frequency multiple points means perturbing multiple frequency points in the low-frequency band of the original sample, high-frequency single point means perturbing one frequency point in the high-frequency band of the original sample, and high-frequency multiple points means perturbing multiple frequency points in the high-frequency band of the original sample.

[0048] It should be noted that, since each frequency component in the spectrum represents a basis function with corresponding frequency and amplitude (such as a Fourier transformed sine function), in the above-mentioned four modes of low-frequency single point, low-frequency multiple points, high-frequency single point, and high-frequency multiple points, the present invention also proposes to disturb the spectrum by adding or removing frequency components. Small disturbances in the frequency domain may cause large changes in the waveform in the time domain. In order to ensure that the disturbed magnetotelluric time series is still similar to the original sample in the time domain and frequency domain, the present invention has taken a series of measures. These measures include accurately controlling the amplitude and phase of the added or removed frequency components to achieve signal disturbance without causing excessive deviations. At the same time, by carefully analyzing and adjusting the spectrum, it is ensured that the disturbed signal is consistent with the original signal in key characteristics, thereby ensuring that in practical applications, the disturbed signal still has the same physical and statistical properties.

[0049] Further optionally, the process of constructing the noisy signal sample and obtaining the noise profile sample and / or the pure signal sample of the noisy signal sample in step S1 is as follows:

[0050] Step S1-1: constructing a noise profile initial sample library of magnetotelluric signals and a pure signal initial sample library, wherein the noise profile initial sample is a corresponding noise profile of the magnetotelluric signal sample in the noisy signal sample library;

[0051] Step S1-2: performing time domain augmentation and frequency domain augmentation on both the noise profile sample and the pure signal sample;

[0052] Step S1-3: using the augmented noise profile as a newly added noise profile sample, and using the augmented clean signal as a newly added clean signal sample, thereby expanding the noise profile sample library and the clean signal sample library;

[0053] Step S1-4: The noise contour samples before augmentation and the noise contour samples after augmentation are combined into a noise contour sample library, and the clean signal samples before augmentation and the clean signal samples after augmentation are combined into a clean signal sample library, and then these two sample libraries are added together to obtain a noisy signal sample library.

[0054] In a second aspect, the technical solution of the present invention provides a system based on the magnetotelluric signal denoising method, comprising:

[0055] A sample library construction module, used to construct noisy signal samples and obtain noise profile samples and / or pure signal samples of the noisy signal samples;

[0056] A model building module, used to train a pre-trained denoising model based on a contrastive learning framework using the noisy signal sample by a self-supervised contrastive learning method, wherein the input of the denoising model is a magnetotelluric noisy signal, and the output is a denoised magnetotelluric signal or a noise profile of the magnetotelluric signal;

[0057] The pre-trained denoising model based on the contrastive learning framework includes a time domain encoder, a frequency domain encoder and two cross-space projectors of the same architecture connected to the corresponding time domain encoder and frequency domain encoder respectively. The network architecture of the time domain encoder is the same as that of the frequency domain encoder. The cross-space projector maps the time-based and frequency-based representations to the same time-frequency space. The input of the time domain encoder is the time domain information of the magnetotelluric noisy signal; the input of the frequency domain encoder is the frequency domain information of the magnetotelluric noisy signal; the self-supervised contrastive learning process is contrastive learning based on time-frequency consistency;

[0058] A fine-tuning module, used for inputting the labeled noisy signal samples into the trained pre-trained denoising model based on the contrastive learning framework, wherein, the model parameters of each layer except the regression layer in the contrastive learning framework are fixed with reference to the pre-trained denoising model, and the regression layer of the contrastive learning framework is adjusted using the labeled noisy signal samples to obtain the trained denoising model;

[0059] The noise processing module is used to perform noise reduction on the noisy signal samples to be denoised using the trained denoising model.

[0060] In a third aspect, the technical solution of the present invention further provides an electronic terminal comprising: one or more processors; and a memory storing one or more computer programs;

[0061] Wherein, the processor calls the computer program to implement: the steps of a method for denoising magnetotelluric signals based on self-supervised contrast learning.

[0062] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement: steps of a method for denoising magnetotelluric signals based on self-supervised comparative learning.

[0063] Beneficial Effects

[0064] Compared with the existing method, the advantages of the present invention are:

[0065] 1. The present invention provides a method and system for denoising magnetotelluric signals based on a self-supervised contrastive learning model. Compared with the traditional supervised learning method which requires a large amount of labeled data, the present invention reduces the dependence on labeled data through self-supervised contrastive learning technology, and can also better extract and distinguish signal features under different environments and noise conditions, greatly improving the processing efficiency and the accuracy and reliability of noise separation. Specifically, the present invention uses a contrastive learning model with time-frequency consistency, and ensures the symmetry of the time domain and the frequency domain in the feature extraction process by designing the consistency of the network architecture of the frequency domain encoder and the time domain encoder, which helps to finally map to the same time-frequency space. It ensures that when processing data in different domains, the encoder can extract features in a similar manner, which helps to achieve conversion and comparison between domains. The model is based on the assumption that the time-frequency features of the noise remain unchanged, inducing an effective pre-trained contrastive learning model, thereby capturing the potential common features of magnetotelluric data in the joint time-frequency feature space. This method not only takes into account the changes in the time domain waveform, but also makes full use of the frequency domain information, making up for the shortcomings of the existing methods that only focus on time domain modeling, and provides a more comprehensive understanding of the noise morphology. The model contains time domain and frequency domain encoders and a cross-space projector, which can achieve efficient denoising using only a small amount of labeled data in the fine-tuning stage, providing an innovative solution for magnetotelluric signal-noise separation.

[0066] 2. A further optimization scheme of the present invention uses time domain and frequency domain for augmentation to construct positive and negative sample pairs for comparative learning. By combining the time domain and frequency domain augmentation methods, the denoising effect of the magnetotelluric signal and the adaptability of the model are significantly improved. Time domain augmentation methods such as mean reduction, amplitude inversion, and front-to-back inversion introduce data diversity while keeping the frequency domain features unchanged to ensure time-frequency consistency. Frequency domain augmentation accurately controls the amplitude and phase of frequency components through single-point and multi-point perturbations of low and high frequencies to ensure that the disturbed signal is similar to the original sample in the time and frequency domains. This innovative augmentation strategy not only expands the diversity of training data, but also enhances the robustness and generalization ability of the model, providing a more efficient and reliable solution for magnetotelluric signal processing.

[0067] 3. A further optimization scheme of the present invention proposes a loss function based on time domain, frequency domain and time-frequency consistency during the training process of the contrastive learning method. By combining the time domain contrast loss, frequency domain contrast loss and time-frequency consistency loss, the model can better learn the characteristics of positive samples and meet the denoising needs of magnetotelluric data. The time domain contrast loss function prompts the model to learn similar time domain features for the original samples and the time domain augmented samples; the frequency domain contrast loss function prompts the model to learn the similarity between the original sample spectrum and the augmented sample spectrum; the time-frequency consistency loss guides the model to maintain the consistency of time domain and frequency domain features. The combined use of these loss functions significantly improves the denoising effect and adaptability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 A flowchart provided for an embodiment of the present invention;

[0069] Figure 2 A network diagram of the components used in the present invention;

[0070] Figure 3 This is the denoising effect diagram of the simulated data. DETAILED DESCRIPTION

[0071] Although the supervised representation learning of magnetotelluric sounding data has made significant progress, and a variety of methods can achieve nonlinear mapping of noisy data and noise at a specific location through supervised learning. However, developing a model suitable for multiple locations and multiple types of noise characteristics is still a very challenging task. In addition, this supervised learning method requires a large number of labeled data sets, and it is obviously very difficult and unrealistic to label massive magnetotelluric data. In response to these problems, the present invention proposes a magnetotelluric signal denoising method and system based on self-supervised contrastive learning, aiming to reduce the demand for labeled data through contrastive learning technology, so as to more efficiently process magnetotelluric data and improve the accuracy and reliability of noise separation.

[0072] Compared with traditional supervised learning methods that require a large amount of labeled data, the present invention reduces the dependence on labeled data through self-supervised contrastive learning technology, greatly improving processing efficiency and the accuracy and reliability of noise separation. The core of self-supervised contrastive learning is to learn feature representation from unlabeled data, and use the time-frequency consistency model to capture the common characteristics of magnetotelluric data in the time and frequency domains, achieve better knowledge transfer, and adapt to dynamic changes. The model includes time domain and frequency domain encoders and cross-space projectors, which can use only a small amount of labeled data in the fine-tuning stage to achieve efficient denoising, providing an innovative solution for magnetotelluric signal-noise separation. The quantization of a small number of labels in the fine-tuning stage is determined based on experimental results. Compared with other supervised learning methods, the number of labeled samples is greatly reduced.

[0073] In addition, based on the above core improvements, the technical solution of the present invention further uses time domain and frequency domain for augmentation. In the process of neural network training, data augmentation is crucial to the construction of the sample library. In order to construct positive and negative sample pairs for contrastive learning, commonly used time domain augmentation methods include mean reduction, amplitude inversion, and front-to-back inversion. These methods introduce diversity in the time domain without changing the frequency domain characteristics, maintaining time-frequency consistency. At the same time, the present invention accurately controls the amplitude and phase of the frequency component through low-frequency single point, low-frequency multiple points, high-frequency single point, and high-frequency multiple points in frequency domain augmentation to ensure that the disturbed signal is similar to the original sample in the time domain and frequency domain. This time-frequency consistency augmentation strategy not only expands the diversity of training data and improves the robustness and generalization ability of the model, but also retains key spectral information while enhancing data diversity, thereby improving the effect and adaptability of magnetotelluric signal denoising.

[0074] In addition, the present invention also preferably introduces a new loss function in the contrast learning training process, which combines three factors: time domain, frequency domain and time-frequency consistency. This comprehensive loss function enables the model to learn the characteristics of positive samples more accurately, thereby effectively addressing the denoising problem of magnetotelluric data. Specifically, the time domain contrast loss function prompts the model to learn similar time domain features between the original sample and the time domain augmented sample; the frequency domain contrast loss function enables the model to capture the similarity between the original sample spectrum and the augmented sample spectrum; the time-frequency consistency loss ensures that the model remains consistent between the time domain and frequency domain features. By integrating these three loss functions, the denoising effect and adaptability of the model are significantly improved.

[0075] The present invention will be further described below with reference to the embodiments.

[0076] Embodiment 1:

[0077] like Figure 1 As shown, the present invention provides a method for denoising magnetotelluric signals based on self-supervised contrast learning, comprising the following steps:

[0078] Step 1: Construct a noise profile sample library of magnetotelluric strong interference data and a pure signal sample library without strong interference data. This is regarded as constructing an initial sample library of noise profiles and an initial sample library of pure signals for magnetotelluric signals.

[0079] This embodiment analyzes the types of strong interference noise of the magnetotelluric, and concludes that the noise types specifically include triangular wave, pulse wave, square wave and other types. A mathematical function is used to construct a noise profile sample sub-library with a length of 200 and a noise amplitude range of -4000 to 4000. By changing the width of the noise profile in the noise profile sample sub-library, a noise profile sample sub-library with the same length but different noise profile width is obtained; by changing the temporal position of the noise profile in the noise profile sample sub-library, a noise profile sample sub-library with the same length but different noise profile positions is obtained; by changing the amplitude of the noise profile waveform in the noise profile sample sub-library, a noise profile sample sub-library with the same noise but different amplitudes is obtained, and finally the sub-library is formed into a noise profile sample library. A function is used to generate a Gaussian white noise with an amplitude between -400 and 400, which is close to the amplitude of the measured magnetotelluric data, as a pure signal sample library without strong interference data. It should be noted that the construction process described above is an example of this embodiment. Without departing from the technical idea of ​​introducing a self-supervised contrast learning framework in the present invention, it is not limited to the above technical means to construct noise profile samples and pure signal samples.

[0080] Specifically, let a single noise profile V(k) = [k1, k2, k3, ... k i ,k i+1 ,...k j ,k j+1 ,...k l ], where V(k) represents the noise contour signal data with a segment length of l, k i and k j denote the i-th and j-th elements in V(k), respectively, where k i represents the starting position of the noise profile waveform in the noise profile sample library, k j Represents the end position of the noise contour waveform in the noise contour sample library.

[0081] The starting position k of the noise contour waveform in the fixed noise contour sample library i , change the end position k of the noise profile waveform in the noise profile sample library j , we can obtain a noise profile sample sub-library with the same segment length but different noise profile widths, such as changing the end position k j The single noise profile can be expressed as follows: V1(k) = [k1, k2, k3, ... k i ,k i+1 ,k i+2 ,k j ,k j+1 ,...k l ].

[0082] By changing the position of the noise waveform, that is, k in the noise contouri to k j The single noise profile after element translation can be expressed as follows: V2(k)=[k1,k2,k i ,k i+1 ,...k j ,k j+1 ,...k l ], thus obtaining a noise contour sample sub-library with the same length but different noise contour positions.

[0083] Finally, the amplitude of the noise contour waveform in the noise contour sample sub-library is changed to obtain a noise contour sample sub-library with the same noise but different amplitudes, that is, the noise contour waveform is multiplied by constants β of different sizes, and a single noise contour can be expressed in the following form: V3(k) = [k1, k2, k3, ... βk i ,βk i+1 ,...βk j ,k j+1 ,...k l ].

[0084] Step 2: Perform time domain augmentation and frequency domain augmentation on the noise profile samples and the clean signal samples.

[0085] Among them, in the present invention, the time domain augmentation method selects three data augmentation methods: mean subtraction, amplitude inversion, and front-to-back inversion. Mean subtraction is to subtract the mean of each element of the signal or data from its mean, so that the mean of the data becomes zero; amplitude inversion is to multiply each element of the signal by -1, so that the positive value of the signal becomes negative, and the negative value becomes positive; front-to-back inversion is to reverse the signal or data in time order, that is, to arrange the time series of the signal from the last element to the first element. Through the time domain augmentation method, Generate an augmented sequence

[0086] In addition, the frequency augmentation process proposed in the present invention includes removing frequency components and / or enhancing frequency components, wherein a preset value E is defined to represent the number of frequency components whose frequency components are removed and enhanced;

[0087] Remove frequency components: Randomly select E frequency components from the entire spectrum and set their amplitudes to 0 to simulate the absence or attenuation of frequency information;

[0088] Enhance frequency components: Make the entire spectrum amplitude less than α·A m Randomly select E components from the frequency components of to enhance, and the amplitude enhancement is α·A m , A m is the maximum amplitude in the spectrum, and α is a preset value used to adjust the scale of the perturbation frequency component. Among them, the frequency augmentation method is Generate an augmented sequence

[0089] Specifically, let the noise contour sample before augmentation be X(a)=(a1,a2,...a l-1 ,a l ), then the noise contour sample after augmentation can be expressed as follows:

[0090] Assume that the pure signal sample before augmentation is Y(b)=(b1,b2...b l-1 ,b l ), then the pure signal sample after augmentation can be expressed as follows:

[0091] Step 3: The noise contour samples before augmentation and the noise contour samples after augmentation are combined into a noise contour sample library, and the clean signal samples before augmentation and the clean signal samples after augmentation are combined into a clean signal sample library. The two sample libraries are then added together to obtain a noisy signal sample library, which is then input into a self-supervised contrastive learning network for pre-training.

[0092] Specifically, let the noise contour sample before augmentation be X(a)=(a1,a2,...a l-1 ,a l ), the augmented noise contour sample is The pure signal sample before augmentation is Y(b)=(b1,b2...b l-1 ,b l ), the pure signal sample after augmentation is The noise contour sample library composed of the noise contour samples before augmentation and the noise contour samples after augmentation is The pure signal sample library is

[0093] Step 4: Based on the noisy signal sample library obtained by adding the magnetotelluric pure signal samples and their noise profile samples, a pre-trained denoising model based on the self-supervised contrastive learning framework is trained. Then a small part of the labeled data is sent to the trained pre-trained model, the values ​​of each layer in the contrastive learning framework are fixed, and only the regression layer is fine-tuned to obtain a trained denoising model for a specific area.

[0094] The input of the self-supervised contrastive learning framework is the magnetotelluric noisy signal, and the output is the denoised magnetotelluric signal or the noise profile of the magnetotelluric signal (both types of output are feasible, which are specifically related to the samples used in the model training process; if the noise profile is output, the noise profile is subtracted from the original signal to obtain the denoised signal). In pre-training, the learning rate is 0.0003, the L2 norm penalty coefficient is 0.0005, the batch size is 64, and the training epoch is 40. For the regression task in the fine-tuning stage, two fully connected layers are used as mappers, with latitudes of 64 and 128 respectively, and the MSE loss is used to optimize the mapper.

[0095] Figure 2 The network structure of each component of the self-supervised contrastive learning framework used in the present invention is shown in FIG. Three ResNets modules are arranged on the time domain encoder, and each ResNets module is composed of one convolutional layer, one batch normalization layer, and one activation function layer. The time domain encoder has two output directions after the input feature, one output direction points to the first ResNets module, that is, the sequentially connected convolutional layer, batch normalization layer and activation function layer, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the first ResNets module to form the first local residual network; the output of the first local residual network has two output directions, one output direction points to the second ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the second ResNets module to form the second local residual network; similarly, the output of the second local residual network has two output directions, one output direction points to the third ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the third ResNets module to form the third local residual network, which is the output of the time domain encoder.

[0096] Among them, a local residual network is constructed through jump connections, which can not only greatly speed up the training speed, but also retain more details in the input, allowing the subsequent frequency domain contrast encoder components of the network to more usefully extract the features of the magnetotelluric signal and prevent the gradient from disappearing.

[0097] Similarly, the network architecture of the frequency domain encoder is the same as that of the time domain encoder. That is, there are three ResNets modules on the frequency domain contrast encoder, and each ResNets module consists of 1 convolution layer, 1 batch normalization layer, and 1 activation function layer. Similarly, there are two output directions after the input features. One output direction includes the convolution layer, batch normalization layer, and activation function layer connected in sequence, and the other output direction is skipped after the input and added to the elements output after the convolution layer feature extraction to form a local residual network, and then passes through two similar local residual networks.

[0098] Finally, after multi-level feature extraction by time domain and frequency domain contrast encoders, the network structure also includes two fully connected layers of cross-space projectors with latitudes of 64 and 128. These two fully connected layers are used to further integrate and classify the extracted features, making the output results more accurate and representative.

[0099] This design framework enables the network to learn and extract multi-level features of the input signal more comprehensively and effectively through the synergy of the time domain and frequency domain contrast encoders and the subsequent processing of the fully connected layer, thereby improving the overall performance and stability.

[0100] Based on the above self-supervised contrastive learning architecture, for a given magnetotelluric time series sample x i T The solution proposed in the present invention obtains an augmented sequence by time domain augmentation and input it into a time domain encoder G T Through this time contrast encoder, the feature representation of the original sample and the augmented sample can be obtained and At the same time, in order to maximize the internal similarity of positive sample pairs and minimize the internal similarity of negative sample pairs, the normalized temperature-scaled cross entropy loss is used as the distance function d. Specifically, define the sample The contrastive loss function L of the temporal contrastive encoder is T,i for: In the formula, sim(,) represents the cosine similarity and τ represents the temperature function of the adjustment scale. This loss function promotes the temporal encoder G T Generates tighter time-based features for positive pairs and separates negative pairs from each other.

[0101] In the frequency domain, the time samples are transformed by Fourier transform. Generate spectrum Same as the time domain encoder, is the augmented sequence obtained by frequency domain augmentation, G FIt is a frequency-based frequency domain contrast encoder, through which the feature representation of the original sample and the augmented sample can be obtained. and Frequency-based contrastive loss function L F,i for: This loss function encourages the frequency domain encoder G F Generate tighter frequency-domain based features for positive pairs and separate negative pairs from each other.

[0102] This embodiment also proposes a time-frequency consistency loss to force the features learned by the model to meet the time-frequency consistency. For a given sample, the time-based and frequency-based features should be close. In order to ensure that the distance between features can be measured, the present invention uses the fully connected layer R T and R F The time domain encoder and from the frequency domain encoder is mapped to a joint time-frequency space. Specifically, for each input sample The model obtains four features, namely The first two features are generated based on time features, while the last two features are generated based on spectrum features. express and The distance between express and The distance between express and The distance between express and The distance between. Represents the distance between time-based features and frequency-based features, and δ is a given constant boundary used to maintain the distance between negative samples. The loss function L based on time-frequency consistency C,i for: By combining all triplet loss terms, L C,i The pre-trained model is encouraged to capture the consistency between time-based and frequency-based features in the optimization.

[0103] Finally, in pre-training, the overall loss function includes three terms: time domain contrast loss, frequency domain contrast loss, and time-frequency consistency loss. First, the time domain contrast loss function forces the model to learn similar time domain features for the original sample and the time domain augmented sample. Second, the frequency domain contrast loss function forces the model to learn similar frequency domain features for the original sample spectrum and the augmented sample spectrum. Finally, the time-frequency consistency loss function guides the model to maintain consistency between time domain and frequency domain features. Combining the three losses results in a simulated pre-training loss, defined as: L TF-C,i =λ(L T,i +L F,i )+(1-λ)L C,i . In the formula, λ is a hyperparameter that controls the relative importance of contrast loss and consistency loss. The above formula is the total loss function corresponding to sample i. The model calculates L for all pre-training samples. TF-C,i The total loss is used to update the model's built-in hyperparameters and weights. In the pre-training process of the present invention, λ is set to 0.5.

[0104] It should be noted that the above loss function is the preferred method of this embodiment. The selected time-frequency and frequency domain loss functions are used for comparative learning tasks, which can effectively distinguish similar and dissimilar samples. For magnetotelluric data, this can help the model learn useful feature representations in the data, improve the robustness of the model in comparative tasks, and reduce the impact of noise on model training. The selected time-frequency consistency loss can ensure the consistency of the model's performance in the time-frequency domain, help the model align features in the time-frequency domain, and enable the model to better capture the time-frequency structure information of the data.

[0105] In other feasible examples, for the time domain loss function and the frequency domain loss function, several common loss functions or distance functions to maximize the similarity of positive sample pairs and minimize the similarity of negative sample pairs also meet the requirements of the present invention, such as TripletLoss, ContrastiveLoss, and HingeLoss; similarly, in addition to the time-frequency consistency loss function exemplified above, there are several possible choices for the loss that satisfies the consistency of time and frequency features: Covariance-basedLoss, Multi-ScaleConsistencyLoss, and ReconstructionLoss.

[0106] When the noisy signal sample library is input to the denoising model of self-supervised contrastive learning in this embodiment, the noisy signal with a total length of N is divided into n segments with a segment length of 200, that is, n is an integer, so the noisy signal sample library matrix N′ with n segments is expressed as Where N 200n It represents the n-th data segment with a length of 200 in the noisy signal sample library matrix N′, and is also the n-th data segment with a length of 200 in N.

[0107] Step 5: inputting the magnetotelluric noisy signal to be denoised into the denoising model based on the self-supervised contrastive learning framework to obtain the denoised magnetotelluric signal;

[0108] Specifically, the magnetotelluric noisy signal with a total length of M is divided into m segments with a segment length of 200, that is, m is an integer, and the magnetotelluric noisy signal matrix M′ with m segments is expressed as Where M 200m It represents the m-th data segment with a length of 200 in the magnetotelluric noisy signal matrix M′, and is also the m-th data segment with a length of 200 in M.

[0109] The elements in the magnetotelluric noisy signal matrix M′ are input into the denoising model in columns, and the network output is the magnetotelluric signal matrix R after denoising the data corresponding to the magnetotelluric noisy signal matrix M′, which is expressed as follows: In the formula, R 200m represents the mth data segment of length 200 in the denoised magnetotelluric signal matrix R, i.e., M 200m The denoised magnetotelluric signal corresponding to the data segment.

[0110] Finally, the denoised magnetotelluric signal matrix R is expanded column by column to form a denoised one-dimensional matrix R′, which is expressed as follows: R′=(R1, R2, ... R 200m ), where R 200m It represents the mth data segment with a length of 200 in the one-dimensional matrix R′ after denoising, and is also the mth data segment with a length of 200 in the magnetotelluric signal matrix R after denoising.

[0111] Figure 3 The figure shows the denoising effect of simulated data of this method. Figure 3 (a) is the simulated magnetotelluric noise signal, (b) is the magnetotelluric noise profile extracted by this method, (c) is the denoised signal obtained by subtracting the extracted magnetotelluric noise profile from the original magnetotelluric noise signal, and (d) is the original pure signal. Figure 3 It can be seen that the denoising method provided by the present invention can effectively suppress strong magnetotelluric interference signals, and the denoising accuracy is greatly improved.

[0112] Embodiment 2:

[0113] This embodiment also provides a system based on the magnetotelluric signal denoising method, including: a sample library construction module, a noisy signal generation module, a model construction module, and a noise processing module.

[0114] Among them, the sample library construction module is used to construct the noise profile sample library and the pure signal sample library of the magnetotelluric signal;

[0115] The noisy signal generation module is used to superimpose the noise profile samples in the noise profile sample library and the clean signal sample library with the clean signal samples to generate noisy signal samples;

[0116] The model building module is used to train a denoising model based on self-supervised contrastive learning using the noisy signal samples, the input of the signal-to-noise mapping model is the magnetotelluric noisy signal, and the output is the denoised magnetotelluric signal or the noise profile of the magnetotelluric signal;

[0117] The pre-trained denoising model based on the contrastive learning framework includes a time domain encoder, a frequency domain encoder and two cross-space projectors of the same architecture connected to the corresponding time domain encoder and frequency domain encoder respectively. The network architecture of the time domain encoder is the same as that of the frequency domain encoder. The cross-space projector maps the time-based and frequency-based representations to the same time-frequency space. The input of the time domain encoder is the time domain information of the magnetotelluric noisy signal; the input of the frequency domain encoder is the frequency domain information of the magnetotelluric noisy signal; the self-supervised contrastive learning process is contrastive learning based on time-frequency consistency;

[0118] The noise processing module is used to input the magnetotelluric noisy signal to be de-noised into the signal-to-noise mapping model to obtain the de-noised magnetotelluric signal;

[0119] In some feasible ways, the sample library construction module and the noisy signal generation module may also be implemented by the same module to realize the functions of both.

[0120] In some feasible methods, the sample library construction module also includes an initial sample library construction module, a time domain augmentation module, and a frequency domain augmentation module; wherein the initial sample library construction module is used to construct a noise profile initial sample library and a pure signal initial sample library of the magnetotelluric signal; the time domain augmentation module is used to augment samples from the time domain using three data augmentation methods: mean subtraction, amplitude inversion, and front-to-back inversion; the frequency domain augmentation module is used to augment samples using four methods: low-frequency single point, low-frequency multiple points, high-frequency single point, and high-frequency multiple points.

[0121] It should be understood that the implementation process of each module can refer to the content of the aforementioned method. The division of the above functional modules is only a division of logical functions. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. At the same time, the above integrated units can be implemented in the form of hardware or software functional units.

[0122] Embodiment 3:

[0123] This embodiment provides an electronic terminal, including: one or more processors; and a memory storing one or more computer programs; wherein the processor calls the computer program to implement: specifically executing the above steps 1 to 5 or steps S1 to S5.

[0124] For the specific implementation process of each step, please refer to the description of the above method.

[0125] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may 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. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.

[0126] Embodiment 4:

[0127] This embodiment provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement the steps of the method for denoising magnetotelluric signals based on self-supervised contrast learning. Specifically, the above steps 1 to 5 or steps S1 to S5 are performed.

[0128] For the specific implementation process of each step, please refer to the description of the above method.

[0129] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the controller described in any of the foregoing embodiments, such as a hard disk or memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Further, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0130] Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc. Various media that can store program codes.

[0131] It should be emphasized that the examples described in the present invention are illustrative rather than restrictive, and therefore the present invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solution of the present invention that do not depart from the purpose and scope of the present invention, whether modified or replaced, also fall within the scope of protection of the present invention.

Claims

1. A method for denoising magnetotelluric signals based on self-supervised contrastive learning, characterized in that: The following steps are involved: Step S1: constructing a noisy signal sample and obtaining a noise profile sample and / or a pure signal sample of the noisy signal sample; Step S2: using the noisy signal sample to train a pre-trained denoising model based on a contrastive learning framework using a self-supervised contrastive learning method, wherein the input of the denoising model is a magnetotelluric noisy signal, and the output is a denoised magnetotelluric signal or a noise profile of the magnetotelluric signal; The pre-trained denoising model based on the contrastive learning framework includes a time domain encoder, a frequency domain encoder and two cross-space projectors of the same architecture connected to the corresponding time domain encoder and frequency domain encoder respectively. The network architecture of the time domain encoder is the same as that of the frequency domain encoder. The cross-space projector maps the time-based and frequency-based representations to the same time-frequency space. The input of the time domain encoder is the time domain information of the magnetotelluric noisy signal; the input of the frequency domain encoder is the frequency domain information of the magnetotelluric noisy signal; the self-supervised contrastive learning process is contrastive learning based on time-frequency consistency; Step S3: inputting the labeled noisy signal samples into the trained pre-trained denoising model based on the contrastive learning framework, wherein the model parameters of each layer except the regression layer in the contrastive learning framework are fixed with reference to the pre-trained denoising model, and the regression layer of the contrastive learning framework is adjusted using the labeled noisy signal samples to obtain the trained denoising model; Step S4: Use the trained denoising model to denoise the noisy signal samples to be denoised.

2. The method according to claim 1, characterized in that: The self-supervised contrastive learning process in step S2 is to perform self-supervised contrastive learning based on a set loss function, and the set loss function at least includes the following time-frequency consistency loss function: Where, L C,i is the loss function of time-frequency consistency, Indicates that for the input sample The distance between the time-based features and the frequency-based features, δ is a given constant boundary; use Representation characteristics and Features The distance between Representation characteristics and Features The distance between Representation characteristics and Features The distance between Representation characteristics and Features The distance between Each input sample Perform time domain augmentation and frequency domain augmentation to obtain augmented samples Then the model obtains four features, which are R T , R F denotes the fully connected layers of two cross-spatial projectors connected to the corresponding time domain encoder and frequency domain encoder, respectively. For sample The input time domain encoder obtains, For sample Spectrum Input frequency domain encoder.

3. The method according to claim 1, characterized in that: The self-supervised contrastive learning process in step S2 is to perform self-supervised contrastive learning based on a set loss function. In addition to the loss function of time-frequency consistency, the loss function also includes a loss function based on the time domain and a loss function based on the frequency domain.

4. The method according to claim 3, characterized in that: The loss function based on the time domain is as follows: Where, L T,i is the loss function based on the time domain, for The distance between is the input sample And the input sample Time domain augmented samples The input time domain encoder is obtained; sim(,) represents the cosine similarity, τ represents the temperature function of the adjustment scale, For input sample Input time domain encoder G T obtained; The loss function based on the frequency domain is as follows: Where, L F,i is the loss function based on the frequency domain, for The distance between is the input sample And the input sample Frequency domain augmented samples of The input frequency domain encoder is obtained; sim(,) represents the cosine similarity, τ represents the temperature function of the adjustment scale, For input sample Input frequency domain encoder G T Got it.

5. The method according to claim 1, characterized in that: Both the frequency domain encoder and the time domain encoder have three ResNets modules, each of which consists of a convolutional layer, a batch normalization layer, and an activation function layer; Among them, there are two output directions after the input, one output direction points to the first ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the first ResNets module to form the first local residual network; the output of the first local residual network has two output directions, one output direction points to the second ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the second ResNets module to form the second local residual network; the output of the second local residual network has two output directions, one output direction points to the third ResNets module, and the other output direction is jump-connected after the input and added to the elements output after the convolutional layer feature extraction in the third ResNets module to form the third local residual network.

6. The method according to claim 1, characterized in that: The two cross-space projectors of the same architecture are both fully connected layers, and the weights of the fully connected layers are the same or the weights of the fully connected layers are initialized using the same method.

7. The method according to claim 1, characterized in that: It also includes time domain augmentation and frequency domain augmentation of noisy signal samples with time-frequency consistency; The frequency augmentation process includes removing frequency components and / or enhancing frequency components, wherein a preset value E is defined to represent the number of frequency components whose frequency components are removed and enhanced; Remove frequency components: Randomly select E frequency components from the entire spectrum and set their amplitudes to 0 to simulate the absence or attenuation of frequency information; Enhance frequency components: Make the entire spectrum amplitude less than α·A m Randomly select E components from the frequency components of to enhance, and the amplitude enhancement is α·A m , A m is the maximum amplitude in the spectrum, α is a preset value used to adjust the scale of the disturbance frequency component.

8. A system based on the method according to any one of claims 1 to 7, characterized in that: At least: A sample library construction module, used to construct noisy signal samples and obtain noise profile samples and / or pure signal samples of the noisy signal samples; A model building module, used to train a pre-trained denoising model based on a contrastive learning framework using the noisy signal sample by a self-supervised contrastive learning method, wherein the input of the denoising model is a magnetotelluric noisy signal, and the output is a denoised magnetotelluric signal or a noise profile of the magnetotelluric signal; The pre-trained denoising model based on the contrastive learning framework includes a time domain encoder, a frequency domain encoder and two cross-space projectors of the same architecture connected to the corresponding time domain encoder and frequency domain encoder respectively. The network architecture of the time domain encoder is the same as that of the frequency domain encoder. The cross-space projector maps the time-based and frequency-based representations to the same time-frequency space. The input of the time domain encoder is the time domain information of the magnetotelluric noisy signal; the input of the frequency domain encoder is the frequency domain information of the magnetotelluric noisy signal; the self-supervised contrastive learning process is contrastive learning based on time-frequency consistency; A fine-tuning module, used for inputting the labeled noisy signal samples into the trained pre-trained denoising model based on the contrastive learning framework, wherein the model parameters of each layer except the regression layer in the contrastive learning framework are fixed with reference to the pre-trained denoising model, and the regression layer of the contrastive learning framework is adjusted using the labeled noisy signal samples to obtain the trained denoising model; The noise processing module is used to perform noise reduction on the noisy signal samples to be denoised using the trained denoising model.

9. An electronic terminal, characterized in that: include: one or more processors; a memory storing one or more computer programs; The processor calls the computer program to implement: The steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored, which is called by a processor to implement: The steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Boundary identification method based on intelligent gravitational magnetic field data denoising

    CN120929728A

  • Self-supervised pre-training method based on time-frequency consistency alignment and form contrast constraint

    CN121260516A

  • Controllable source electromagnetic data denoising method and system based on physical information neural network

    CN122412969A