Electrocardiosignal denoising method and system based on asymmetric convolution diffusion network
Through the ECG signal denoising method based on asymmetric convolution diffusion network, the problem of noise interference during the acquisition process of ECG signals is solved, and efficient denoising and signal quality improvement are achieved.
Patent Information
- Application Number
- CN202510159248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-13
AI Technical Summary
During the acquisition process, ECG signals are easily disturbed by external noise, resulting in a decrease in signal quality and affecting the accuracy of diagnosis. The prior art has failed to effectively denoising the characteristics of electrocardiogram signals.
Using an ECG signal denoising method based on asymmetric convolutional diffusion networks, the one-dimensional convolution layer and asymmetric convolutional network architecture are used, combined with backpropagation and upsampling technology, noise is gradually removed and clear ECG signals are reconstructed.
It improves the ability of electrocardiogram signal to denoise, effectively removes noise from different frequency bands, preserves important characteristics and waveforms of the signal, improves signal quality, and reduces the risk of misdiagnosis and misdiagnosis.
Smart Images

Figure CN120011717A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an electrocardiogram signal denoising method and system based on an asymmetric convolution diffusion network, and belongs to the technical field of electrocardiogram signal denoising. Background Art
[0002] Electrocardiogram (ECG) is a physiological signal that records the electrical activity of the heart and is widely used to diagnose various diseases, such as arrhythmia, coronary artery disease, myocardial infarction, and some other mental illnesses. As a key indicator of heart health, the accuracy of ECG is crucial. However, ECG signals are very weak bioelectric signals, and the acquisition process is easily affected by external interference, especially local interference. Such as power line interference, electrode contact noise, myoelectric noise, and baseline drift. These noises not only reduce the quality of the signal, but may also lead to misdiagnosis and missed diagnosis. High-quality signals are the basis of research, and the quality of the signal directly affects the effectiveness of subsequent analysis. Therefore, improving the quality of the signal through effective noise removal technology can greatly help the subsequent research work.
[0003] In previous studies, traditional methods are often used for noise removal. There is no in-depth study on the characteristics of ECG signals and the design of corresponding models for denoising. First, in terms of noise, during the acquisition process of ECG signals, patients often have local and violent interference such as turning over and limb movements, which seriously damage the signal. Secondly, in terms of feature extraction, signals in different frequency bands are subject to different interferences. The low frequency band will be affected by baseline drift, and the high frequency band is mainly electromyography and power frequency interference. These interferences have different manifestations and different removal methods. The existing methods do not separately extract and retain important features based on this feature. Finally, in terms of signals, the real signal is often very weak, making it difficult to identify.
[0004] In view of the above problems, the present invention proposes an ECG signal denoising method and system based on an asymmetric convolutional diffusion network, and designs an asymmetric convolutional network Asy_UNet. Summary of the invention
[0005] The present invention provides an electrocardiogram signal denoising method and system based on an asymmetric convolution diffusion network, so as to improve the electrocardiogram signal denoising capability.
[0006] The technical solution of the present invention is: in the first aspect, the present invention provides an electrocardiogram signal denoising method based on an asymmetric convolution diffusion network, and the specific steps of the method are as follows:
[0007] Step 1, ECG signal preprocessing, including standardization and format conversion;
[0008] Step 2, gradually add different levels of random Gaussian white noise to the preprocessed ECG signal until the original signal is covered by the noise;
[0009] Step 3, back propagation, taking the original signal as the objective function, the model trains the noisy ECG signal and the corresponding clean signal; in this process, the features of the ECG signal are extracted, the ECG signal is reconstructed according to the extracted features, and finally the denoised ECG signal is generated.
[0010] As a further solution of the present invention, the process in Step 2 is a diffusion process. The diffusion process simulates the degradation process of data by gradually adding noise to the data. This process is described as a series of discrete steps, each step adding a certain amount of noise until the data becomes almost completely noise. Assuming that there is an initial data x0, this data is clear at the beginning of the diffusion process. In each step t, the data x0 is added to the data x1. t-1 Add noise to create new data x t , expressed as:
[0011]
[0012] where ∈ is random noise sampled from a standard normal distribution, x t-1 is the data state of the previous step, α t is a predefined noise level factor that determines how much noise is added at each step, α t is chosen to ensure a gradual increase in noise, eventually making x T That is, the data in the last step is close to pure noise; the entire diffusion process contains multiple time steps. In the initial step, the noise added is relatively small, but as the steps proceed, the noise gradually increases.
[0013] As a further solution of the present invention, in Step 3, the back propagation starts from the noise data x obtained in Step 2 T , which is the result of the forward diffusion process; at each time step t, the goal of the model is to predict the t The noise ∈ t , and use this prediction to reconstruct x t-1 , which is achieved by the following steps:
[0014] Noise prediction: Using a neural network f θ (x t, t) to predict the noise ∈ t , the noise added to the data by this network at the current step is expressed as: ∈ t =f θ (x t, t);
[0015] Data reconstruction: Use the predicted noise to reconstruct the data x of the previous step t-1 , σ t is a predefined noise level system;
[0016]
[0017] This iterative process iterates from t=T to t=0. In each step, the model uses the predicted noise to remove the noise in the current data and gradually reconstructs a clearer data state. After multiple steps of iteration, the model finally reconstructs clear data close to the original data x0.
[0018] As a further solution of the present invention, Step 3 includes:
[0019] (1) Use a one-dimensional convolution layer to slide the convolution kernel on the time axis to capture the local features of the ECG signal;
[0020] (2) An asymmetric convolutional network architecture is used, and the jump connection combines the feature map in the encoder with the feature map in the decoder; the asymmetric structure optimizes this process by selectively fusing features;
[0021] (3) Use upsampling instead of transposed convolution to reduce the introduction of noise. Upsampling maintains the authenticity of the original signal during the denoising process by amplifying the repeated signal.
[0022] (4) Adding a filter after the jump connection helps to restore the original shape and characteristics of the signal, thereby improving the quality of the decoder's reconstructed signal.
[0023] As a further solution of the present invention, the (2) includes: adjusting the convolution kernel size, filter shape, channel number allocation and upsampling step size of the network according to the characteristics of the ECG signal and the denoising requirements;
[0024] In the encoder, the number of channels is gradually increased to capture deep features, and in the decoder, the number of channels is gradually reduced to merge features and reduce noise. The asymmetric convolutional network architecture optimizes the feature fusion process by selectively fusing the features of the encoder and decoder, and optimizes the spatial resolution of the signal by adjusting the upsampling step size.
[0025] By adjusting the number of feature channels at different levels, the asymmetric convolutional network architecture can learn multi-scale features at the same time; using different numbers of channels at each stage of the asymmetric convolutional network architecture, a deep supervision mechanism is introduced; this shows that each level of the network can be trained to minimize the loss of the corresponding level of the asymmetric convolutional network architecture, thereby improving the overall denoising performance.
[0026] As a further embodiment of the present invention, said (3) includes:
[0027] Specifically, the nearest neighbor interpolation is used instead of permutation convolution to copy the nearest feature value in the original to a new place. The nearest neighbor interpolation provides a more direct way to restore the size of the feature so that the feature matches the original input; upsampling is done through a convolution operation, in which the weights of the convolution kernel are set to interpolation mode. This method allows the network to learn the best interpolation weights during training.
[0028] As a further solution of the present invention, the above (4) includes: during the training process, the parameters of the filter are adjusted according to the loss function to reduce the difference between the reconstructed signal and the original signal.
[0029] On the other hand, the present invention provides an ECG signal denoising system based on an asymmetric convolutional diffusion network, comprising a module for executing the method described in the first aspect above.
[0030] The beneficial effects of the present invention are as follows: the present invention improves the ability of denoising ECG signals; each convolution layer in the model corresponding to the method of the present invention uses one-dimensional convolution instead of two-dimensional convolution, which is more suitable for processing one-dimensional ECG data; different layers correspond to different numbers of channels to remove noise in different frequency bands; in addition, the model uses filters in the connection part to optimize signal processing; the upsampling process is also specially designed to ensure the accuracy of signal reconstruction;
[0031] Aiming at the different interferences to ECG signals in different frequency bands, the present invention proposes an asymmetric convolutional network, which can remove specific noise, avoid errors in the reconstruction process, and achieve efficient ECG signal denoising. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of ECG signal denoising of the present invention;
[0033] Figure 2 The network model architecture of the present invention;
[0034] Figure 3 Visualization of adding different levels of noise to the original signal;
[0035] Figure 4 It is a time domain analysis diagram of the signal before and after denoising of the present invention;
[0036] Figure 5 This is a spectrum comparison analysis diagram of the signal before and after denoising according to the present invention. DETAILED DESCRIPTION
[0037] Example 1: Figure 1-Figure 5As shown, a method for denoising an ECG signal based on an asymmetric convolution diffusion network, the specific steps of the method are as follows: The specific steps of the method are as follows:
[0038] Step 1: ECG signal preprocessing, including standardization and format conversion, to meet the input requirements of the network;
[0039] Step 2, gradually add 0.1-0.5 level random Gaussian white noise to the preprocessed ECG signal until the original signal is covered by the noise;
[0040] The process in Step 2 is a diffusion process. The diffusion process simulates the degradation process of data by gradually adding noise to the data. This process is described as a series of discrete steps, each step adding a certain amount of noise until the data becomes almost completely noise. Assume that there is an initial data x0. This data is clear at the beginning of the diffusion process. In each step t, the data x is added to the data. t-1 Add noise to create new data x t , expressed as:
[0041]
[0042] where ∈ is random noise sampled from a standard normal distribution, x t-1 is the data state of the previous step, α t is a predefined noise level factor that determines how much noise is added at each step, α t is chosen to ensure a gradual increase in noise, eventually making x T That is, the data in the last step is close to pure noise; the entire diffusion process contains multiple time steps. In the initial step, the noise added is relatively small, but as the steps proceed, the noise gradually increases.
[0043] Step 3, back propagation, taking the original signal as the objective function, the model trains the noisy ECG signal and the corresponding clean signal; in this process, the features of the ECG signal are extracted, the ECG signal is reconstructed according to the extracted features, and finally the denoised ECG signal is generated.
[0044] As a further solution of the present invention, in Step 3, the back propagation starts from the noise data x obtained in Step 2 T , which is the result of the forward diffusion process. These data are almost completely noise, and no information about the original data can be seen. At each time step t, the goal of the model is to predict the value added to x t The noise ∈ t , and use this prediction to reconstruct x t-1 , which is achieved by the following steps:
[0045] Noise prediction: Using a neural network f θ (x t, t) to predict the noise ∈ t , the noise added to the data by this network at the current step is expressed as: ∈ t =f θ (x t, t);
[0046] Data reconstruction: Use the predicted noise to reconstruct the data x of the previous step t-1 , σ t is a predefined noise level system;
[0047]
[0048] This iterative process iterates from t = T to t = 0. In each step, the model uses the predicted noise to remove the noise in the current data and gradually reconstructs a clearer data state. After multiple steps of iteration, the model finally reconstructs clear data close to the original data x0. This reconstructed data is usually close to the original signal, indicating that the model successfully recovers useful information from the noisy data.
[0049] The denoised ECG signal is then compared with the original signal to calculate the corresponding error to quantify the denoising effect. The denoising effect is mainly evaluated by signal-to-noise ratio (SNR), mean square error (MSE), signal distortion (SD) and determination coefficient (R2).
[0050] Signal-to-Noise Ratio (SNR) is an important indicator for measuring signal quality. It is used to describe the ratio between the signal power and the background noise power. Its calculation formula is:
[0051]
[0052] Mean Squared Error (MSE) is an important indicator to measure the accuracy of a model's prediction ability. It is calculated by taking the square of the difference between the predicted value and the actual value, and averaging these squared differences. The calculation formula is:
[0053]
[0054] Signal distortion refers to the degree of deformation or quality degradation of a signal compared to the original signal during transmission or processing.
[0055]
[0056] The coefficient of determination (R-squared) is the ratio of the variance explained by the regression model to the total variance. Its calculation formula is:
[0057]
[0058] The trained model can effectively remove various noises in ECG signals, such as power line noise, baseline drift, and electromyographic interference, while maintaining the important features and waveform of the signal.
[0059] The present invention designs an asymmetric convolutional network Asy_UNet. The main functions are: (1) The local receptive field of the one-dimensional convolutional layer is used to adapt to the characteristic type of data (ECG signal). In the context of ECG signal denoising, the local receptive field focuses on the short-term fluctuations of the signal, which is very advantageous for identifying and removing local, short-term noise such as stray heartbeats, electrode friction, noise generated by changes in sleeping posture, etc. (2) Adjusting the number of feature channels at different levels can more effectively encode different aspects of the signal and model capacity. At the primary level, fewer channels are used to capture the basic waveform structure, while at a deeper level, more channels can focus on removing high-frequency noise. (3) Adjustments are made between the encoder and the decoder to optimize the processing of ECG signals through asymmetric convolutional layers and filters to better retain the important features of the signal. (4) Simple upsampling is used instead of transposed convolution to reduce noise introduction. Upsampling maintains the authenticity of the original signal during the denoising process by amplifying repeated signals.
[0060] As a further solution of the present invention, Step 3 includes:
[0061] (1) Use a one-dimensional convolution layer to slide the convolution kernel on the time axis to capture the local features of the ECG signal;
[0062] ECG signals are time series data, and their main features are spread out along the time axis. The main information of ECG signals, such as P wave, QRS complex wave and T wave, all change along the time axis. Therefore, the processing and analysis of ECG signals mainly focus on the local features and changes in the time dimension.
[0063] One-dimensional convolution is a convolution operation designed for time series data, which applies the convolution kernel only in a single dimension (time dimension). One-dimensional convolution can accurately capture these local time features by sliding the convolution kernel on the time axis, without distracting attention to unnecessary spatial features like two-dimensional convolution. The expression is:
[0064]
[0065] Where x is the input ECG signal sequence, h is the convolution kernel, and n is the current sliding position. The convolution operation is essentially a filtering process, which can enhance the useful components in the signal and suppress noise through the weight of the convolution kernel. The one-dimensional convolution designed by the present invention can capture the local features of the ECG signal by sliding the convolution kernel on the time series.
[0066] (2) An asymmetric convolutional network architecture is used, and the jump connection combines the feature map in the encoder with the feature map in the decoder; the asymmetric structure optimizes this process by selectively fusing features;
[0067] The Asy_UNet improvement proposed in this invention adopts an asymmetric convolutional network architecture. The asymmetric structure can optimize this process by selectively fusing features, so as to retain more detailed information during the reconstruction process. This can be expressed as:
[0068] concatenate(u,v)=(u,v)
[0069] Among them, u and v are the features from the encoder and decoder respectively. The optimization principle is to adjust the network's convolution kernel size, filter shape, channel number allocation and upsampling according to the characteristics of the ECG signal and the denoising requirements;
[0070] In this way, the model can more accurately capture and retain the key features of ECG signals while specifically suppressing noise at specific frequencies.
[0071] In the encoder, the gradually increasing number of channels is used to capture deep features, and in the decoder, the gradually decreasing number of channels helps to merge features and reduce noise. In addition, the asymmetric convolutional network architecture also optimizes the feature fusion process by selectively fusing the features of the encoder and decoder, and optimizes the spatial resolution of the signal by adjusting the upsampling step size. This optimization not only improves the sensitivity and accuracy of the model to ECG signals, but also enhances the robustness of noise removal, achieving higher performance in the ECG signal denoising task.
[0072] ECG signals contain information at multiple time scales, such as short-term heart rate variability and long-term rhythmic patterns. By adjusting the number of feature channels at different levels, the asymmetric convolutional network architecture can simultaneously learn these multi-scale features and better understand the overall structure of the signal. Using different numbers of channels at each stage of the asymmetric convolutional network architecture can introduce a deep supervision mechanism. This means that each layer of the network can be trained to minimize the loss of the corresponding layer of the asymmetric convolutional network architecture, thereby improving the overall denoising performance. In the decoder, by reducing the number of channels and combining the features from the encoder, the network is able to perform effective feature fusion. This fusion helps reconstruct a clean and detailed ECG signal. The advantage of this improvement is that by adjusting the number of feature channels at different levels, the network is able to create a feature hierarchy so that the shallow layers capture local and detailed information, while the deep layers are able to integrate this information and learn more abstract representations because the characteristics of noise and signal are manifested at different scales.
[0073] (3) Use upsampling instead of transposed convolution to reduce the introduction of noise. Upsampling maintains the authenticity of the original signal during the denoising process by amplifying the repeated signal.
[0074] The Step 3 includes:
[0075] Specifically, the nearest neighbor interpolation is used instead of permuted convolution to copy the nearest feature value in the original to the new location. This is different from permuted convolution, which requires a fixed permutation rule to be defined in advance. Nearest neighbor interpolation provides a more direct way to restore the size of the feature so that the feature matches the original input; upsampling is done through a convolution operation, in which the weights of the convolution kernel are set to interpolation mode. This method allows the network to learn the best interpolation weights during training. Interpolation can be expressed as:
[0076] upsampling(x(n))=x(n*f)
[0077] Where f is the upsampling factor. The upsampling layer can adjust the reconstruction strategy through learning, so the network can adjust the upsampling method according to the characteristics of the ECG signal and the noise pattern to better restore the details and quality of the signal. This means that the network can decide how to upsample most effectively based on the data itself, rather than relying on fixed rules. Permutation convolution requires a predefined permutation rule, which to a certain extent limits the flexibility and adaptability of the model and increases the computational cost. The advantage of using nearest neighbor interpolation instead of permutation convolution is its directness and flexibility, which enables the model to more accurately and adaptively restore the spatial dimension of the ECG signal, amplify the value of repeated original signals, prevent overfitting, and achieve better results in denoising tasks.
[0078] (4) Adding a filter after the jump connection helps to restore the original shape and characteristics of the signal, thereby improving the quality of the decoder's reconstructed signal.
[0079] During the training process, the parameters of the filter are adjusted according to the loss function to reduce the difference between the reconstructed signal and the original signal, thereby improving the denoising performance. Therefore, using a filter after a jump connection can specifically enhance the key features of the ECG signal while suppressing unimportant noise components. The parameters of the filter can be optimized during the training process so that the model can learn the best denoising strategy. This end-to-end optimization ensures that the filter works in conjunction with the entire network structure to achieve the best denoising effect. By precisely adjusting the frequency components of the signal, the filter helps to restore the original shape and characteristics of the signal, thereby improving the usability of the denoised signal.
[0080] On the other hand, the present invention provides an ECG signal denoising system based on an asymmetric convolutional diffusion network, comprising a module for executing the method described in the first aspect above.
[0081] An asymmetric convolutional network model in an electrocardiogram signal denoising system based on an asymmetric convolutional diffusion network may specifically include:
[0082] Encoder: The encoder part gradually extracts features through a series of convolutional layers and pooling layers and reduces the spatial dimensions of the features. The following are the main components of the encoder:
[0083] Input layer: Receives the original ECG signal, whose shape is (None, 6000, 1), where 6000 represents the signal length per minute and 1 represents the number of signal channels. This is specially improved for the network to process one-dimensional ECG time series data.
[0084] Convolutional layer: The first convolutional layer Conv1D has 16 convolution kernels of size 3 and an output shape of (None, 6000, 16) to capture the primary features of the input signal. The ReLU activation function ensures non-linear feature activation. The second convolutional layer Conv1D_1 has 32 convolution kernels to extract more complex features, and again uses the ReLU activation function and 'same' padding, with an output shape of (None, 6000, 32).
[0085] Pooling layer: The first maximum pooling layer Max_pooling1D halves the spatial dimension of the feature to (None, 3000, 16), from 6000 points to 3000 points. This not only reduces the amount of computation, but also enhances the model's insensitivity to small changes. The second maximum pooling layer Max_pooling1D_1 halves the spatial dimension of the feature to (None, 1500, 32). Further pooling reduces the feature dimension to 1500 points, further abstracting and compressing the data, preparing for the extraction of advanced features.
[0086] The encoder increases the depth of features by gradually reducing the size of features, which helps the model capture abstract features in ECG signals.
[0087] Bridge: The bridge layer is the connection between the encoder and decoder, which continues to extract deeper features in the signal.
[0088] Bridge Conv1D Layer: The Conv3 layer is the core of the bridge part, which uses 64 filters to further extract features. The features at this level have a higher level of abstraction and provide a basis for signal denoising and feature reconstruction.
[0089] Decoder: The decoder part gradually restores the spatial resolution of features through upsampling layers and convolutional layers, and reconstructs the detailed information of the signal.
[0090] Upsampling layer: The first upsampling layer Up_sampling1D increases the size of the feature to (None, 3000, 64) to prepare for reconstructing details; the second upsampling layer Up_sampling1D_1 further increases the size to (None, 6000, 32).
[0091] Convolutional layer: The following convolutional layers Conv1D_4 and Conv1D_5 continue to process features, and the outputs are (None, 3000, 32) and (None, 6000, 16) respectively; the final convolutional layer Conv1D_5 produces a single channel output (None, 6000, 1), which corresponds to the denoised ECG signal, and finally outputs features of the same size as the original signal.
[0092] Output layer: The last layer is the output layer, which converts the multi-channel features into a single-channel denoised signal through the convolution of 1 filter. The Sigmoid activation function is used to limit the output between 0 and 1.
[0093] The model was compiled using the Adam optimizer, an adaptive learning rate optimization algorithm that improves model performance by adjusting the learning rate. The loss function used is the mean square error (MSE), which directly quantifies the difference between the denoised signal and the original signal.
[0094] The network of the present invention is as follows Figure 2 , which includes a backbone network and three functional improvements to improve the ability to denoise ECG signals. Each convolutional layer in the model uses one-dimensional convolution instead of two-dimensional convolution, which is more suitable for processing one-dimensional ECG data; different layers correspond to different numbers of channels to remove noise in different frequency bands; in addition, the model uses filters in the connection part to optimize signal processing; the upsampling process is also specially designed to ensure the accuracy of signal reconstruction.
[0095] for Figure 4 , is a time domain analysis diagram of the signal before and after denoising of the present invention, showing the time domain comparison between the original electrocardiogram (ECG) signal and the signal after denoising. From the waveform analysis, it can be seen that the blue line represents the original ECG signal, which has a typical ECG waveform and a peaked QRS complex wave, and the orange dotted line represents the denoised signal, whose waveform is much smaller in amplitude than the original signal, but retains the basic shape and rhythm of the original signal. In terms of noise level, the noise present in the original signal causes the signal to fluctuate greatly, while the denoised signal is relatively smooth, which shows that the denoising process effectively eliminates the noise without introducing too much distortion or changing the basic characteristics of the signal. Although the amplitude of the denoised signal is reduced, important features such as the QRS complex wave are still identifiable. It can be seen from the change in signal amplitude that the amplitude of the signal may be compressed during the denoising process, which is common in ECG signal processing, the purpose is to reduce the impact of noise on the signal, but there is no excessive compression to avoid the loss of important information. In terms of frequency retention, the denoised signal is smoother, but the basic frequency characteristics of the signal remain unchanged, which means that the basic rhythm of the heartbeat is not distorted by the denoising process. During the entire time domain signal, the denoised signal shows good continuity without any breaks or abnormal fluctuations. The denoising algorithm shows smoothness and coherence when processing the signal without obvious distortion areas, which indicates the stability and consistency of the denoising algorithm.
[0096] for Figure 5, which is a spectrum comparison analysis diagram of the signal before and after denoising of the present invention, shows the spectrum comparison of an original ECG signal (ECG) and a denoised signal. The spectrum comparison is presented by the power spectral density (PSD), which reflects the energy distribution of the signal at different frequencies. From the frequency distribution, the two signals are very similar at the beginning of the low-frequency region, indicating that the denoising process retains the low-frequency components of the ECG signal. These low-frequency components usually contain most of the energy and information of the ECG signal; in the frequency range of the intermediate frequency feature (10 to 30 Hz), the denoised signal closely follows the changes of the original signal, which indicates that important ECG information is retained; in the high-frequency component, the PSD of the denoised signal is significantly lower than that of the original signal, indicating that the denoising algorithm effectively removes the high-frequency noise component, which may come from power lines, equipment interference or electrode friction, etc. Analyzing the spectrum smoothness, overall, the spectrum of the denoised signal is smoother than the original signal, which shows that the denoising process effectively removes random noise without introducing additional pseudo-frequencies or interference. The denoising algorithm effectively reduces high-frequency noise while retaining the low-frequency ECG features. Overall, the denoising algorithm smoothed the spectrum of the signal, which means that the noise is well suppressed. However, the orange dashed line also shows some irregular fluctuations, which may be caused by over-compression of some parts of the signal during the denoising process.
[0097] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A method for denoising electrocardiogram signals based on an asymmetric convolutional diffusion network, characterized in that: The specific steps of the method are as follows: Step 1, ECG signal preprocessing, including standardization and format conversion; Step 2, gradually add different levels of random Gaussian white noise to the preprocessed ECG signal until the original signal is covered by the noise; Step 3, back propagation, taking the original signal as the objective function, the model trains the noisy ECG signal and the corresponding clean signal; in this process, the features of the ECG signal are extracted, the ECG signal is reconstructed according to the extracted features, and finally the denoised ECG signal is generated.
2. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 1, characterized in that: The process in Step 2 is a diffusion process. The diffusion process simulates the degradation process of data by gradually adding noise to the data. This process is described as a series of discrete steps, each step adding a certain amount of noise until the data becomes almost completely noise. Assume that there is an initial data x0, which is clear at the beginning of the diffusion process. In each step t, the data x is added to the data x. t-1 Add noise to create new data x t , expressed as: where ∈ is random noise sampled from a standard normal distribution, x t-1 is the data state of the previous step, α t is a predefined noise level factor that determines how much noise is added at each step, α t is chosen to ensure a gradual increase in noise, eventually making x T That is, the data in the last step is close to pure noise; the entire diffusion process contains multiple time steps. In the initial step, the noise added is relatively small, but as the steps proceed, the noise gradually increases.
3. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 1, characterized in that: In Step 3, back propagation starts with the noise data x obtained in Step 2. T , which is the result of the forward diffusion process; at each time step t, the goal of the model is to predict the t The noise ∈ t , and use this prediction to reconstruct x t-1 , which is achieved by the following steps: Noise prediction: Using a neural network f θ (x t, t) to predict the noise ∈ t , the noise added to the data by this network at the current step is expressed as: ∈ t =f θ (x t, t); Data reconstruction: Use the predicted noise to reconstruct the data x of the previous step t-1 , σ t is a predefined noise level system; This iterative process iterates from t=T to t=0. In each step, the model uses the predicted noise to remove the noise in the current data and gradually reconstructs a clearer data state. After multiple steps of iteration, the model finally reconstructs clear data close to the original data x0.
4. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 1, characterized in that: The Step 3 includes: (1) Use a one-dimensional convolution layer to slide the convolution kernel on the time axis to capture the local features of the ECG signal; (2) An asymmetric convolutional network architecture is used, and the jump connection combines the feature map in the encoder with the feature map in the decoder; the asymmetric structure optimizes this process by selectively fusing features; (3) Use upsampling instead of transposed convolution to reduce the introduction of noise. Upsampling maintains the authenticity of the original signal during the denoising process by amplifying the repeated signal. (4) Adding a filter after the jump connection helps to restore the original shape and characteristics of the signal, thereby improving the quality of the decoder's reconstructed signal.
5. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 4, characterized in that: The (2) includes: adjusting the convolution kernel size, filter shape, channel number allocation and upsampling step size of the network according to the characteristics of the ECG signal and the denoising requirements; In the encoder, the number of channels is gradually increased to capture deep features, and in the decoder, the number of channels is gradually reduced to merge features and reduce noise. The asymmetric convolutional network architecture optimizes the feature fusion process by selectively fusing the features of the encoder and decoder, and optimizes the spatial resolution of the signal by adjusting the upsampling step size. By adjusting the number of feature channels at different levels, the asymmetric convolutional network architecture can learn multi-scale features at the same time; using different numbers of channels at each stage of the asymmetric convolutional network architecture, a deep supervision mechanism is introduced; this shows that each level of the network can be trained to minimize the loss of the corresponding level of the asymmetric convolutional network architecture, thereby improving the overall denoising performance.
6. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 4, characterized in that: The above (3) includes: Specifically, the nearest neighbor interpolation is used instead of permutation convolution to copy the nearest feature value in the original to a new place. The nearest neighbor interpolation provides a more direct way to restore the size of the feature so that the feature matches the original input; upsampling is done through a convolution operation, in which the weights of the convolution kernel are set to interpolation mode. This method allows the network to learn the best interpolation weights during training.
7. The ECG signal denoising method based on an asymmetric convolutional diffusion network according to claim 4, characterized in that: The (4) includes: during the training process, the parameters of the filter are adjusted according to the loss function to reduce the difference between the reconstructed signal and the original signal.
8. An electrocardiogram signal denoising system based on an asymmetric convolution diffusion network, characterized in that: The method comprises a module for executing the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Enhanced decoding-based ECG signal reconstruction method of AE-GAN
CN116720056A
Signal denoising method and system based on denoising generative adversarial network and diffusion model
CN117743768A