A magnetocardiogram denoising method, storage medium, electronic device and product
By training and optimizing the magnetocardiogram (MCG) signal using a multi-level gated network model, the problem of noise processing in the MCG signal was solved, achieving high-quality denoising and feature preservation, and improving signal quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CASIBRAIN (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2025-06-11
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies struggle to effectively remove noise, especially time-varying and non-stationary noise, when processing magnetocardiogram (MCC) signals, leading to distortion or obliteration of MCC features. Furthermore, traditional filtering methods are ineffective.
A multi-level gating network model is adopted, including an encoder, a decoder, and a feature fusion module. The target denoising network model is optimized by training dataset. Noise gating units and competitive gating units are used to process the magnetocardiogram signal and retain key features.
It achieves high-quality denoising of magnetic heart signals, improves signal-to-noise ratio and morphological fidelity, adapts to complex noise environments, and effectively preserves magnetic heart characteristics.
Smart Images

Figure CN120298251B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing technology, and more specifically, to a method, storage medium, electronic device, and product for magnetocardiogram denoising. Background Technology
[0002] Magnetocardiography (MCG) measures the weak magnetic field signal generated by the heart's electrical activity around the body. Compared to traditional electrocardiography (ECG), MCG has higher spatial resolution, and its acquisition process more closely resembles the heart's original electrophysiological characteristics, being less affected by tissue resistance and contact electrode noise. The MCG signal is mainly composed of the P wave, QRS complex, and T wave, which correspond to a cardiac cycle. Because MCG signals are easily affected by environmental noise during acquisition, noise reduction is necessary to further improve the quality of the measured MCG signal.
[0003] Currently, although traditional filtering algorithms can suppress noise in MCG signals to some extent, they have limitations when dealing with time-varying or non-stationary noise. Furthermore, if simple bandpass filtering enhances the main band of the QRS complex, it may cause distortion or complete suppression of the already weak magnetic-cardiographic features of the P wave and T wave when excessively filtering out low-frequency components.
[0004] Therefore, how to provide a high-quality magnetocardiogram denoising method has become an urgent technical problem to be solved. Summary of the Invention
[0005] The purpose of some embodiments of this application is to provide a method, storage medium, electronic device and product for magnetocardiogram (MCC) denoising. The technical solutions of the embodiments of this application can effectively remove noise from the MCC signal, improve the quality of MCC denoising, and at the same time ensure the morphological fidelity of the MCC features.
[0006] In a first aspect, some embodiments of this application provide a method for magnetocardiogram (MCG) denoising, comprising: acquiring a training dataset containing noisy MCG signal samples and denoised MCG signal samples; processing the noisy MCG signal samples using a multi-level gated network model to obtain a denoised predicted MCG signal; wherein the multi-level gated network model includes an encoder, a decoder, and a feature fusion module; the encoder and the decoder each include: multiple gated units and multiple residual network units; the encoder further includes multiple downsampling units, and the decoder further includes multiple upsampling units; the type of the gated units includes: noise gated units and / or competitive gated units; optimizing the multi-level gated network model using the signal loss value between the predicted MCG signal and the denoised MCG signal samples to obtain a target denoising network model; wherein the target denoising network model is used to denoise the real noisy MCG signal to obtain a denoised MCG signal.
[0007] Some embodiments of this application train and optimize the multi-level gating network model designed in this application using a training sample dataset to obtain the target denoising network model, thereby achieving effective and high-quality denoising of real noisy magnetic field signals, while maintaining the key features of the real noisy magnetic field signals without loss, and thus having high practicality.
[0008] In some embodiments, the encoder includes the noise gating unit and multiple downsampling layers; each of the multiple downsampling layers includes: a residual network unit, a contention-gating unit, and a downsampling unit; the decoder includes multiple upsampling layers and convolutional units; each of the multiple upsampling layers includes: a residual network unit, a contention-gating unit, and an upsampling unit; the feature fusion module includes: two residual network units and a contention-gating unit.
[0009] Some embodiments of this application, through the structure of the designed multi-level gating network model, can effectively process noisy magnetocardiogram signal samples in the training dataset, providing a foundation for obtaining a target denoising network model with better denoising effect.
[0010] In some embodiments, each of the plurality of residual network units includes a first convolutional transform, a second convolutional transform, and residual concatenation. The residual concatenation is used to concatenate the second convolutional result of the second convolutional transform with the residual input features to obtain the residual signal output by each residual network unit; wherein, the residual input features are the result output by the noise gating unit, the downsampling result of each downsampling layer, or the upsampling result of each upsampling layer.
[0011] Some embodiments of this application can achieve effective processing of residual input features by designing multi-layer convolutional transformation and residual splicing units in the residual network unit.
[0012] In some embodiments, the processing procedure of each of the plurality of gating units includes: dividing the signal to be processed to obtain multiple-dimensional signal features; wherein the signal to be processed is the noisy magnetic field signal sample or the residual signal output by the residual network unit; calculating each output feature corresponding to each dimension of the multiple-dimensional signal features; and concatenating and convolving the output features to obtain the gating unit output result corresponding to the noisy magnetic field signal sample.
[0013] Some embodiments of this application divide, calculate, splice, and convolve the signal to be processed by each gating unit to obtain the output result of the gating unit, thereby achieving effective processing of the signal to be processed and achieving high-quality noise reduction of the signal.
[0014] In some embodiments, when the type of the gating unit is the noise gating unit, the signal to be processed is the noisy magnetocardiogram signal sample; the calculation of each output feature corresponding to each dimension signal feature in the multiple dimension signal features includes: calculating each output feature by using a first activation function on each dimension signal feature.
[0015] Some embodiments of this application calculate the input features under the noise gating unit through a first activation function, thereby achieving effective feature processing.
[0016] In some embodiments, when the gating unit is a competing gating unit, the signal to be processed is the residual signal; calculating the output features corresponding to each of the multiple dimension signal features includes: calculating the output features by using a second activation function on each dimension signal feature.
[0017] Some embodiments of this application calculate the input features under the competitive gating unit through a second activation function, thereby achieving effective feature processing.
[0018] Secondly, some embodiments of this application provide a method for magnetocardiogram (MCG) denoising, comprising: acquiring a real noisy MCG signal; inputting the real noisy MCG signal into a target denoising network model to obtain a denoised MCG signal; wherein the target denoising network model is obtained by any of the method embodiments in the first aspect.
[0019] Thirdly, some embodiments of this application provide an apparatus for magnetocardiogram (MCG) denoising, comprising: a sample acquisition module for acquiring a training dataset containing noisy MCG signal samples and denoised MCG signal samples; a training module for processing the noisy MCG signal samples using a multi-level gated network model to obtain a denoised predicted MCG signal; wherein the multi-level gated network model includes an encoder, a decoder, and a feature fusion module; the encoder and the decoder each include: multiple gate units and multiple residual network units; the encoder further includes multiple downsampling units, and the decoder further includes multiple upsampling units; the type of the gate units includes: noise gate units and / or competitive gate units; and an optimization module for optimizing the multi-level gated network model using the signal loss value between the predicted MCG signal and the denoised MCG signal samples to obtain a target denoising network model; wherein the target denoising network model is used to denoise the real noisy MCG signal to obtain a denoised MCG signal.
[0020] Fourthly, some embodiments of this application provide a method for magnetocardiogram (MCG) denoising, comprising: an acquisition module for acquiring a real noisy MCG signal; and a denoising module for inputting the real noisy MCG signal into a target denoising network model to obtain a denoised MCG signal; wherein the target denoising network model is obtained by any of the method embodiments in the first aspect.
[0021] Fifthly, some embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the methods described in any of the embodiments of the first and second aspects.
[0022] In a sixth aspect, some embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement the method as described in any of the embodiments of the first and second aspects.
[0023] In a seventh aspect, some embodiments of this application provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor, can implement the method described in any of the embodiments of the first and second aspects. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of some embodiments of this application, the accompanying drawings used in some embodiments of this application will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 System diagrams for magnetocardiogram denoising provided for some embodiments of this application;
[0026] Figure 2 Flowcharts of methods for training denoising models provided for some embodiments of this application;
[0027] Figure 3 Structure diagrams of multi-level gating network models provided for some embodiments of this application;
[0028] Figure 4 One of the flowcharts for magnetocardiogram denoising methods provided for some embodiments of this application;
[0029] Figure 5 A second flowchart of a magnetocardiogram denoising method provided for some embodiments of this application;
[0030] Figure 6 One of the block diagrams of a magnetocardiogram denoising apparatus provided for some embodiments of this application;
[0031] Figure 7 A second block diagram of a magnetocardiogram denoising apparatus provided for some embodiments of this application;
[0032] Figure 8 A schematic diagram of an electronic device provided for some embodiments of this application. Detailed Implementation
[0033] The technical solutions of some embodiments of this application will now be described with reference to the accompanying drawings.
[0034] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0035] In recent years, tunnel magnetoresistive (TMR) sensors have been considered a promising alternative to magnetic field measurement technology (MCG) due to their miniaturization, ease of mass production, and relatively low cost. Based on the magnetic tunnel junction (MTJ) principle, TMR sensors can sensitively detect weak magnetic fields at room temperature, offering advantages such as high hardware integration and relatively simple circuit design. Although their sensitivity is lower than that of superconducting quantum interference devices (SQUIDs) or some high-end optically pumped magnetic sensors (OPMs), TMRs can meet the basic order-of-magnetism requirements for most general-purpose magnetocardiographic applications. However, actual tests show that TMR noise is not only higher than that of SQUIDs, but also suffers from the superposition of power frequency interference, environmental electromagnetic noise, and 1 / f noise (low-frequency random fluctuations) in unshielded environments, resulting in a generally lower actual signal-to-noise ratio (SNR).
[0036] Traditional filtering methods, such as Finite Impulse Response (FIR) filtering, Infinite Impulse Response (IIR) filtering, wavelet transform, or Empirical Mode Decomposition (EMD), can suppress noise in MCG signals to some extent, but they often have limitations when dealing with time-varying or non-stationary noise. Furthermore, simple bandpass filtering, if it enhances the main band of the QRS complex, may distort or completely obliterate the already weak magnetic signature features of the P and T waves by excessively filtering out low-frequency components. To further improve the quality of MCG signals measured by TMR, more advanced signal processing and intelligent algorithms are needed to achieve high-quality noise reduction.
[0037] Deep learning technology has demonstrated powerful modeling capabilities in speech denoising, image denoising, and physiological signal denoising in recent years. It can adaptively learn complex noise distributions and preserve the key structural features of the target signal. For highly periodic ECG / MEG signals, networks can be used to capture their multi-period contextual information. However, the results of directly applying ECG denoising networks to MCG signals acquired by TMR are usually less than ideal. This is because the dominant components of sensor noise have 1 / f characteristics and environmental magnetic interference, unlike traditional ECG electrode noise, baseline drift, and EMG interference. In addition, if the network structure is too simple, it is difficult to fully extract multi-period contextual features, resulting in insufficient preservation of weak amplitude MEG bands.
[0038] As can be seen from the above-mentioned related technologies, the existing technology has an unsatisfactory effect on denoising MCG signals and the denoising quality is poor.
[0039] In view of this, some embodiments of this application provide a method for magnetocardiogram (MCG) denoising. This method trains and optimizes a self-designed multi-level gating network model using a constructed training dataset to obtain a high-quality denoising target network model. The multi-level gating network model in this application has a relatively complex structure, which can fully extract features from noisy MCG signals, achieving accurate denoising with high denoising effect and quality.
[0040] The following is in conjunction with the appendix Figure 1 The overall structure of the magnetocardiogram denoising system provided by some embodiments of this application is illustrated by way of example.
[0041] like Figure 1 As shown in the figure, some embodiments of this application provide a system diagram for magnetocardiogram (MCG) denoising. The MCG denoising system may include a signal acquisition device 100 and a terminal device 200. The signal acquisition device 100 can acquire the MCG signal of a target object to obtain the true noisy MCG signal of the target object; the terminal device 200 can receive or read the true noisy MCG signal acquired by the signal acquisition device 100; then, a pre-deployed target denoising network model is used to process the true noisy MCG signal to output a denoised MCG signal.
[0042] In some embodiments of this application, the target denoising network model is pre-trained and deployed on the terminal device 200. The terminal device 200 can be a mobile terminal or a non-portable computer terminal, and this application does not specifically limit it.
[0043] To achieve high-quality denoising of real noisy magnetic resonance imaging (MRI) signals, it is first necessary to train the multi-level gating network model designed in the embodiments of this application to obtain the target denoising network model.
[0044] The following is in conjunction with the appendix Figure 2 The present application provides an exemplary embodiment of the implementation process of training a denoising model executed by a terminal device 200.
[0045] Please see the appendix Figure 2 , Figure 2 A flowchart of a method for training a denoising model is provided for some embodiments of this application. The method for training a denoising model may include:
[0046] S210, Obtain the training dataset containing noisy and denoised magnetic field signal samples.
[0047] For example, in some embodiments of this application, the noisy sequence X is... noise (As a specific example of a noisy magnetocardiogram signal sample) and its corresponding clean sequence X clean (As a specific example of a denoised magnetocardiogram signal sample) Training pairs are formed to obtain a training dataset containing multiple training pairs (e.g., N total samples, i.e., N training pairs). It can be understood that the N training pairs contain N noisy sequences X. noise and N clean sequences X clean .
[0048] Among them, the noisy sequence X noiseTo pre-filter (i.e. remove extremely low and extremely high frequency noise) the MCG signal acquired by the TMR sensor under real conditions, it is then divided into any one of multiple cardiac cycle segments (e.g., a 10s cycle).
[0049] It should be noted that an intuitive approach to learning the periodic patterns in MCG signals is to employ a self-attention mechanism. This mechanism can effectively model long-range dependencies to capture the regularity between amplitude variations and cardiac cycles. Specifically, given an input MCG feature sequence X... in ∈R T×D Where T represents the time step of the sample, D represents the feature dimension, and the self-attention mechanism first uses the learnable parameter matrix W Q W K W V ∈ Calculate the query (Q), key (K), and value (V) matrix, i.e., Q=X in W Q K=X in W K V=X in W V The corresponding input calculation formula is as follows:
[0050]
[0051] Self-attention mechanisms excel at capturing global dependencies; however, their computational complexity is O(T). 2 d k However, the computational cost of QK is high when processing long-term signals, which can easily lead to overfitting. Furthermore, in highly periodic MCG signals, the attention weight in the QRS composite region is typically higher due to the strong consistency of its amplitude changes. Based on this observation, this application no longer directly uses the quadratic complexity of QK. T Instead of computation, a learnable linear projection is used, thereby reducing computational costs and optimizing the ability to capture periodic patterns.
[0052] The multi-level gated network model (e.g., MGU-Net model) is trained using the training dataset constructed above. The Adam optimizer is used during training, with a suitable initial learning rate for several epochs. After each epoch, the model is evaluated on the validation set to obtain a satisfactory target denoising network model. The model structure and data processing procedures during training are illustrated below.
[0053] In some embodiments of this application, the multi-level gating network model includes an encoder, a decoder, and a feature fusion module; both the encoder and the decoder include multiple gating units and multiple residual network units; the encoder further includes multiple downsampling units, and the decoder further includes multiple upsampling units; the gating units include noise gating units and / or contention gating units.
[0054] Specifically, the encoder includes the noise gating unit and multiple downsampling layers; each downsampling layer includes: a residual network unit, a contention gating unit, and a downsampling unit; the decoder includes multiple upsampling layers and convolutional units; each upsampling layer includes: a residual network unit, a contention gating unit, and an upsampling unit; the feature fusion module includes: two residual network units and one contention gating unit.
[0055] For example, in some embodiments of this application, such as Figure 3 The diagram shows the structure of a multi-level gating network model. The side containing downsampling units is the encoder section, the side containing upsampling units is the decoder section, and the three units in the last row (i.e., two residual networks and one competing gating) constitute the feature fusion module. Figure 3 As can be seen, the encoder side expands the number of channels to 64 through a noise-gated (NG) layer and convolutional mapping; the encoder also includes three downsampling layers, and the decoder side also includes three upsampling layers. The encoder and decoder communicate with each other through skip connections. The decoder uses skip connections to concatenate the features of the competitive gating output of the corresponding encoder layer during the competitive gating processing stage. The encoder part reduces the time length, increases the channel dimension, and extracts multi-scale features layer by layer; the decoder part gradually restores the time length and fuses low-level features, thereby preserving more waveform details in the reconstruction stage. The gated linear unit (GLU) is divided into two types: noise-gated units (NG) and competitive gating units (CG), and the activation functions used by these two types are different.
[0056] It should be understood that the structure of the multi-level gating network model can be adjusted according to the actual application scenario, and the embodiments of this application are not limited thereto.
[0057] S220, The noisy magnetic field signal sample is processed using a multi-level gating network model to obtain the denoised predicted magnetic field signal.
[0058] For example, in some embodiments of this application, by X noise (that is) Figure 3 The magnetic resonance signal (MRS) inside the shielded room is input to Figure 3In the multi-level gating network model shown, after processing by each unit in the multi-level gating network model, the predicted magnetocardiogram signal is output (i.e., Figure 3 Denoising of the magnetic field signal in the image).
[0059] because Figure 3 The model structure shown contains multiple identical units. The following example uses any one of these identical units to illustrate the signal processing process of different units.
[0060] In some embodiments of this application, the processing procedure of each of the multiple gating units includes:
[0061] S221, the signal to be processed is divided to obtain signal features in multiple dimensions; wherein, the signal to be processed is the noisy magnetic cardiomyography signal sample or the residual signal output by the residual network unit.
[0062] To more effectively model the multi-scale features of MCG signals and improve temporal modeling capabilities, the gating unit further incorporates a multi-head gating mechanism to independently perform signal filtering and noise suppression in multiple feature subspaces in parallel. Specifically, the input signal to be processed is divided into H independent subspaces along the channel dimension, and temporal features are extracted through 1D convolution, with each head performing independent gating operations. For example, in some embodiments of this application, the signal to be processed X is divided according to the channel dimension. in The signal features are divided into H dimensions (as a specific example of multiple dimensional signal features), namely: X in =[X1,X2,...,X H ].
[0063] S222, calculate each output feature corresponding to each dimension signal feature in the multiple-dimensional signal features.
[0064] For example, in some embodiments of this application, X1, X2, ..., X are expressed by the following formula. H Each feature in the algorithm is calculated to obtain individual output features. Specifically, the calculation formula is as follows:
[0065]
[0066] In the formula, Y h X is the output feature of the h-th dimension signal feature. h This represents the signal feature of the h-th dimension (i.e., the input feature of the h-th head). and For parameters and Linear transformations of control (referring to convolution transformations in this context). It is a head-independent non-linear activation function.
[0067] In one implementation, when the gating unit is a noise gating unit and the signal to be processed is a noisy magnetocardiogram signal sample, S222 may include: using a first activation function to calculate the signal features of each dimension to obtain the output features.
[0068] For example, The first activation function is Sigmoid, which is used to initially suppress random noise, that is, to suppress irrelevant noise features to a lower weight. Figure 3 As can be seen from this, the signal to be processed at this time is the X signal collected above. noise .
[0069] In another implementation, when the gating unit is a competitive gating unit and the signal to be processed is a residual signal, S222 may include: using a second activation function to calculate the signal features of each dimension to obtain the output features.
[0070] For example, The second activation function, which can be Softmax or another learnable competitive mechanism, is used to highlight specific waveform segments. It identifies and amplifies the most meaningful time-frequency region across the entire signal characteristics, thereby further emphasizing QRS or P, T band features. Figure 3 As can be seen from the position of the competitive gating unit, the signal to be processed is the residual signal output by each residual network unit.
[0071] S223, the output features are concatenated and convolutionally mapped to obtain the output result of the gated unit corresponding to the noisy magnetic heart signal sample.
[0072] For example, in some embodiments of this application, the channel dimensions of the gated outputs of each head are concatenated and then mapped back to the original number of channels using a 1×1 convolution. That is, the output result X of the gated unit is obtained using the following formula. out X out =Conv 1×1 ( [Y1,Y2,...,Y H ] ).
[0073] Through the calculation process of S221~S223 described above, the NG unit and CG unit can effectively process the signal to be processed, and achieve accurate processing of signal features.
[0074] Understandably, in the NG unit, the multi-head mechanism enables different heads to independently learn noise suppression patterns of different frequency components, thereby enhancing the adaptability to complex noise environments; in the CG unit, multi-head gating allows the model to independently compete for features at different time scales, ensuring that the model can effectively focus on the most physiologically significant magnetic-cardiographic signal regions, thereby improving signal enhancement.
[0075] In some embodiments of this application, each of the plurality of residual network units includes a first layer convolutional transform, a second layer convolutional transform, and residual concatenation. The residual concatenation is used to concatenate the second layer convolutional result of the second layer convolutional transform with the residual input features to obtain the residual signal output by each residual network unit; wherein, the residual input features are the result output by the noise gating unit, the downsampling result of each downsampling layer, or the upsampling result of each upsampling layer.
[0076] For example, in some embodiments of this application, the residual network includes two convolutional transformations and a residual concatenation. The first convolutional transformation includes a convolution operation, a normalization operation, and a first-layer activation function; the second convolutional transformation includes a convolution operation, a normalization operation, and a second-layer activation function.
[0077] Specifically, the output of the first convolutional transformation is H1 = SiLU(RMS Norm(Conv1(X)). i In the first convolutional layer, Conv1 represents the first convolutional operation, RMS Norm represents mean squared normalization, and SiLU is the first activation function. The output of the second convolutional layer is H2 = SiLU(RMS Norm (Conv2(H1)), where Conv2 is the second convolutional operation. Finally, residual concatenation is performed to obtain the residual signal X. 残差 =H2+X i .Depend on Figure 3 As can be seen from this, X of the residual network i It can be the result of NG output, the result of downsampling output, or the result of upsampling output.
[0078] The residual network processes the input signal X through two layers of 1D convolution, normalization, and an activation function (SiLU). in This helps alleviate the gradient vanishing problem, promotes the training of deep networks, and effectively preserves the global trend and local features of the magnetocardiogram signal, avoiding the loss of key information during the denoising process.
[0079] In addition, from Figure 3 It can also be seen that the contention gate in the downsampling unit is connected to the contention gate of the corresponding layer in the upsampling unit; the output of the contention gate in the downsampling unit is fused in the upsampling unit to achieve the accuracy of signal feature processing.
[0080] S230, using the signal loss value between the predicted magnetic field signal and the denoised magnetic field signal sample, the multi-level gated network model is optimized to obtain the target denoising network model; wherein, the target denoising network model is used to denoise the real noisy magnetic field signal to obtain the denoised magnetic field signal.
[0081] For example, in some embodiments of this application, the predicted magnetic field signal and X are measured by MSE (Mean-square Error). clean Deviation between (That is, the signal loss value). MSE measures the difference between the predicted magnetic field signal and the labeled value (i.e., X). clean The mean squared difference (MSE) between the predicted and actual values is calculated as follows: A smaller MSE value indicates a closer match between the predicted and actual values. Specifically, the loss function formula for MSE is:
[0082]
[0083] Among them, X k It is the label value of the k-th sample. Let N be the predicted magnetocardiogram signal of the k-th sample, and N be the total number of samples.
[0084] pass Optimize the parameters of the multi-level gated network model until... When the value is less than a set threshold or the number of iterations reaches a threshold (i.e., the model training is considered to have met certain requirements), the target denoising network model is output.
[0085] The following is in conjunction with the appendix Figure 4 The present application provides an exemplary description of the specific process of magnetocardiogram denoising provided in some embodiments.
[0086] Please see the appendix Figure 4 , Figure 4 A flowchart of a magnetocardiogram (MCC) denoising method is provided for some embodiments of this application. The MCC denoising method may include: S410, acquiring a real noisy MCC signal; S420, inputting the real noisy MCC signal into a target denoising network model to obtain a denoised MCC signal; wherein, the target denoising network model is obtained by... Figure 2 The method is obtained from any of the embodiments shown.
[0087] For example, in some embodiments of this application, in practical applications, it is only necessary to input the real noisy magnetocardiogram signal collected in the shielded environment into the trained MGU-Net model (as a specific example of the target denoising network model), and the denoised signal (that is, the denoised magnetocardiogram signal) can be obtained within tens of milliseconds of delay.
[0088] The following is in conjunction with the appendix Figure 5 The present application provides an exemplary description of the specific process of magnetocardiogram denoising provided in some embodiments.
[0089] Please see the appendix Figure 5 , Figure 5 A flowchart of a magnetocardiogram denoising method provided for some embodiments of this application.
[0090] The above implementation process is illustrated below by example.
[0091] S510: Obtain a training dataset containing noisy and denoised magnetic field signal samples.
[0092] The S520 uses the encoder in the multi-level gating network model to process noisy magnetocardiogram signal samples to obtain downsampling results.
[0093] S530 uses the feature fusion module in the multi-level gated network model to fuse the downsampling results to obtain the fused feature signal.
[0094] The S540 uses a decoder in a multi-level gating network model to process the fused feature signals to obtain the predicted magnetocardiogram signal.
[0095] The S550 uses a loss function to calculate the signal loss value between the predicted magnetocardiogram (MCG) signal and the denoised MCG signal samples.
[0096] The S560 uses signal loss values to optimize a multi-level gated network model and outputs a target denoising network model that meets the requirements.
[0097] S570, acquires real noisy magnetic field signals.
[0098] S580, the real noisy magnetic-cardiogram signal is input into the target denoising network model to obtain the denoised magnetic-cardiogram signal.
[0099] It should be understood that the specific implementation process of S510~S580 can be referred to the method embodiments provided above. To avoid repetition, detailed descriptions are omitted here.
[0100] As can be seen from the above embodiments of this application, this application can adaptively highlight the main magnetic field wave and suppress random noise and power frequency interference at different stages, achieving high-precision denoising of noisy magnetic field signals with multiple cycles and long sequences. Experimental results show that this method achieves significant improvements in signal-to-noise ratio and morphological fidelity in both simulated and real data.
[0101] Please refer to Figure 6 , Figure 6The diagram shows a block diagram of a magnetocardiogram (MCC) denoising apparatus provided in some embodiments of this application. It should be understood that this MCC denoising apparatus corresponds to the method embodiments described above and is capable of performing the various steps involved in the method embodiments. The specific functions of this MCC denoising apparatus can be found in the description above; detailed descriptions are omitted here to avoid repetition.
[0102] Figure 6 The magnetocardiogram (MCG) denoising apparatus includes at least one software functional module that can be stored in a memory or embedded in the MCG denoising apparatus in the form of software or firmware. The MCG denoising apparatus includes: a sample acquisition module 610, used to acquire a training dataset containing noisy MCG signal samples and denoised MCG signal samples; a training module 620, used to process the noisy MCG signal samples using a multi-level gated network model to obtain denoised predicted MCG signals; wherein the multi-level gated network model includes an encoder, a decoder, and a feature fusion module; the encoder and the... The decoders all include: multiple gating units and multiple residual network units; the encoder also includes multiple downsampling units, and the decoder also includes multiple upsampling units; the gating units include: noise gating units and / or contention gating units; the optimization module 630 is used to optimize the multi-level gating network model using the signal loss value between the predicted magnetocardiogram signal and the denoised magnetocardiogram signal samples to obtain a target denoising network model; wherein, the target denoising network model is used to denoise the real noisy magnetocardiogram signal to obtain a denoised magnetocardiogram signal.
[0103] Please refer to Figure 7 , Figure 7 The diagram shows a block diagram of a magnetocardiogram (MCC) denoising apparatus provided in some embodiments of this application. It should be understood that this MCC denoising apparatus corresponds to the method embodiments described above and is capable of performing the various steps involved in the method embodiments. The specific functions of this MCC denoising apparatus can be found in the description above; detailed descriptions are omitted here to avoid repetition.
[0104] Figure 7 The magnetocardiogram (MCC) denoising device includes at least one software function module that can be stored in a memory or embedded in the MCC denoising device in the form of software or firmware. The MCC denoising device includes: an acquisition module 710 for acquiring a real noisy MCC signal; and a denoising module 720 for inputting the real noisy MCC signal into a target denoising network model to obtain a denoised MCC signal.
[0105] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0106] Some embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can perform the operation of any of the methods corresponding to the methods provided in the above embodiments.
[0107] Some embodiments of this application also provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operation of any of the methods corresponding to the above embodiments provided in the above embodiments.
[0108] like Figure 8 As shown, some embodiments of this application provide an electronic device 800, which includes a memory 810, a processor 820, and a computer program stored in the memory 810 and executable on the processor 820. When the processor 820 reads the program from the memory 810 via a bus 830 and executes the program, it can implement the methods of any of the above embodiments.
[0109] Processor 820 can process digital signals and can include various computing architectures. Examples include complex instruction set computer architectures, reduced instruction set computer architectures, or architectures that implement multiple instruction set combinations. In some examples, processor 820 can be a microprocessor.
[0110] The memory 810 can be used to store instructions executed by the processor 820 or data related to the execution of instructions. These instructions and / or data may include code for implementing some or all of the functions of one or more modules described in the embodiments of this application. The processor 820 of this disclosure embodiment can be used to execute the instructions in the memory 810 to implement the methods shown above. The memory 810 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memories well known to those skilled in the art.
[0111] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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.
[0113] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for denoising magnetocardiograms, characterized in that, include: Obtain a training dataset containing noisy and denoised magnetic field signal samples; The noisy magnetocardiogram signal sample is any one of multiple cardiac cycle segments in the original MCG signal; the cardiac cycle is determined by capturing the regularity between amplitude transformation and cardiac cycle using a learnable linear projection. A multi-level gated network model is used to process the noisy magnetic resonance imaging (MRI) signal samples to obtain denoised predicted MRI signals. The multi-level gated network model includes an encoder, a decoder, and a feature fusion module. Both the encoder and decoder include multiple gate units and multiple residual network units. The encoder also includes multiple downsampling units, and the decoder includes multiple upsampling units. The gate units are of the following types: noise gate units and / or competitive gate units. The gate units employ a multi-head gate mechanism to independently perform the screening and noise suppression of the noisy MRI signal samples in multiple feature subspaces in a parallel manner. In the multi-head gate mechanism, different heads independently learn noise suppression patterns for different frequency components, or independently compete for features at different time scales. Each head in the head gating mechanism independently performs gating operations on each dimension of the noisy magnetocardiogram signal sample; each of the multiple residual network units includes a first-layer convolutional transform, a second-layer convolutional transform, and residual concatenation; the residual concatenation is used to concatenate the second-layer convolution result of the second-layer convolutional transform with the residual input features to obtain the residual signal output by each residual network unit; wherein, the residual input features are the output result of the noise gating unit, the downsampling result of each downsampling layer, or the upsampling result of each upsampling layer; the first-layer convolutional transform contains convolution operations, normalization operations, and a first-layer activation function; the second-layer convolutional transform contains convolution operations, normalization operations, and a second-layer activation function; the result of the first-layer convolutional transform is the input of the second-layer convolutional transform; By using the signal loss value between the predicted magnetic field signal and the denoised magnetic field signal sample, the multi-level gating network model is optimized to obtain the target denoising network model; wherein, the target denoising network model is used to denoise the real noisy magnetic field signal to obtain the denoised magnetic field signal.
2. The method as described in claim 1, characterized in that, The encoder includes the noise gating unit and multiple downsampling layers; each downsampling layer includes: a residual network unit, a contention gating unit, and a downsampling unit; the decoder includes multiple upsampling layers and convolutional units; each upsampling layer includes: a residual network unit, a contention gating unit, and an upsampling unit; the feature fusion module includes: two residual network units and a contention gating unit.
3. The method according to any one of claims 1-2, characterized in that, The processing procedure for each of the plurality of gating units includes: The signal to be processed is divided into multiple dimensions to obtain signal features; wherein, the signal to be processed is the noisy magnetic cardiomyography signal sample or the residual signal output by the residual network unit; Calculate each output feature corresponding to each dimension of the signal features in the multiple dimensions of the signal features; The output features are concatenated and convolutionally mapped to obtain the output results of the gated unit corresponding to the noisy magnetocardiogram signal sample.
4. The method as described in claim 3, characterized in that, When the type of the gating unit is the noise gating unit, the signal to be processed is the noisy magnetocardiogram signal sample; the calculation of each output feature corresponding to each dimension of the signal features in the multiple dimensions includes: The first activation function is used to calculate the signal features of each dimension to obtain the output features.
5. The method as described in claim 3, characterized in that, When the gating unit is a contention-gating unit, the signal to be processed is the residual signal; calculating the output features corresponding to each dimension of the signal features in the multiple dimensions includes: The output features are obtained by calculating the signal features of each dimension using the second activation function.
6. A method for denoising magnetocardiograms, characterized in that, include: Acquire real noisy magnetic field signals; The real noisy magnetocardiogram signal is input into the target denoising network model to obtain a denoised magnetocardiogram signal; wherein the target denoising network model is obtained by the method of any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the method as described in any one of claims 1-6.
8. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program is executed by the processor to perform the method as claimed in any one of claims 1-6.
9. A computer program product, characterized in that, The computer program product includes a computer program, wherein the computer program is executed by a processor to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Image denoising method for enhancing gating Transform
CN117726540A
Image enhancement and model training method and device, equipment, medium and product
CN119671870A