Electrocardiosignal noise reduction method based on convolutional long-short term memory network

Through the electrocardiogram signal noise reduction method based on convolutional length and short time memory network, the problem of difficulty in capturing the spatio-temporal characteristics of the electrocardiogram signal in the prior art is solved, and higher signal fidelity and diagnostic accuracy are achieved.

CN119474662APending Publication Date: 2025-02-18QINGDAO UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411464600.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Existing electrocardiogram signal noise reduction methods are difficult to effectively capture the spatial and temporal characteristics of electrocardiogram signals, resulting in a decrease in signal fidelity during noise removal, affecting diagnostic accuracy.

Method used

The electrocardiogram signal denoising method based on convolutional length and short time memory network is adopted. By pre-processing the collected initial electrocardiogram signal, a denoising model is established, and the model is tuned using a loss function with differential regular terms. Obtain the target denoising model.

Benefits of technology

Effectively capture the temporal and spatial characteristics of the ECG, improve signal fidelity, and provide accurate signals for ECG analysis and diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474662A_ABST
    Figure CN119474662A_ABST
Patent Text Reader

Abstract

The invention provides an electrocardiosignal noise reduction method based on a convolutional long-short term memory network. The electrocardiosignal noise reduction method comprises the following steps: preprocessing an acquired initial electrocardiosignal to obtain a to-be-analyzed electrocardiosignal; establishing a de-noising model of the electrocardiosignal to be analyzed based on a convolutional long-short term memory network; adjusting and optimizing the de-noising model based on a loss function with a differential regular term to obtain a target de-noising model; inputting the electrocardiosignal to be analyzed into a target denoising model to obtain a final denoising electrocardiosignal denoising model, fusing time and space characteristics by using a convolutional long-short time memory network, and effectively capturing time and space characteristics of an electrocardiogram; by adding the differential regularization item in the reconstruction error, the signal details can be more accurately captured, so that the signal features can be better restored, and accurate signals are provided for electrocardio analysis and diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram signal processing, and in particular to an electrocardiogram signal denoising method based on a convolutional long short-term memory network. Background Art

[0002] Electrocardiogram (ECG) is an important medical test method that reflects the electrophysiological activity of the heart and plays an irreplaceable role in diagnosing various heart diseases. However, in the actual acquisition process, ECG signals are often interfered by various noises, such as baseline drift, myoelectric interference, electrode interference, etc., which seriously affects the accuracy and reliability of the signal, and thus restricts its application in clinical diagnosis and health management. Therefore, ECG signal noise reduction has become an urgent problem to be solved.

[0003] At present, ECG signal noise reduction methods are mainly divided into two categories: filter-based methods and deep learning-based methods. Filter-based methods refer to classic techniques that use mathematics, statistics, and signal processing methods for data analysis and modeling; most existing methods ignore the spatiotemporal characteristics of ECG signals and face the problem of insufficient capture of spatiotemporal dependencies; on the other hand, the waves, segments, and intervals of the ECG carry a large amount of clinical medical information. If these details are erased while reducing noise, causing serious distortion of the waveform, it may lead to incorrect ECG analysis and diagnosis, so the fidelity of the signal is crucial. Summary of the invention

[0004] The present invention provides an electrocardiogram signal denoising method based on a convolutional long short-term memory network, so as to solve the problems raised in the background technology.

[0005] A method for denoising an electrocardiogram signal based on a convolutional long short-term memory network, comprising:

[0006] S1: preprocessing the collected initial ECG signal to obtain the ECG signal to be analyzed;

[0007] S2: Establish a denoising model for the ECG signal to be analyzed based on the convolutional long short-term memory network;

[0008] S3: Tuning the denoising model based on a loss function with a differential regularization term to obtain a target denoising model;

[0009] S4: Inputting the ECG signal to be analyzed into a target denoising model to obtain a final denoised ECG signal.

[0010] Preferably, in S1, preprocessing the collected initial ECG signal to obtain the ECG signal to be analyzed includes:

[0011] Normalizing the initial ECG signal to obtain a standard ECG signal;

[0012] Segmenting the standard ECG signal according to the heartbeat cycle to obtain multiple groups of ECG signal groups;

[0013] Perform dimension transformation on multiple groups of ECG signals to obtain ECG signals to be analyzed.

[0014] Preferably, in S2, a denoising model for the ECG signal to be analyzed is established based on a convolutional long short-term memory network, including:

[0015] Build an encoder based on convolutional long short-term memory layer and variance layer;

[0016] Build a decoder based on convolutional long short-term memory layers and fully connected layers;

[0017] Based on the connection between the encoder and the decoder, a denoising model is obtained.

[0018] Preferably, the encoder is established based on the convolutional long short-term memory layer and the variance layer, comprising:

[0019] The connection relationship between the convolution layer, input gate, forget gate and output gate is established in sequence to obtain the convolutional long short-term memory layer;

[0020] Add unit states to the input gate, forget gate, and output gate. The unit states are used to store long-term dependency information after gate structure processing.

[0021] The output gate is used to decide what new information to add to the hidden state, the forget gate is used to decide what information to keep and discard, and the output gate is used to decide what to choose to output;

[0022] Establish the connection relationship between the convolutional long short-term memory layer and the variance layer;

[0023] After receiving the transient data from the convolutional long short-term memory layer, the variance layer calculates the variance of the transient data to characterize the transient data.

[0024] Preferably, the method of establishing a decoder based on a product-length short-term memory layer and a fully connected layer includes:

[0025] Establish the connection relationship between the convolutional long short-term memory layer and the fully connected layer;

[0026] The fully connected layer receives the encoded features from the convolutional long short-term memory layer and reconstructs the signal.

[0027] Preferably, in S3, the denoising model is tuned based on a loss function with a differential regularization term to obtain a target denoising model, including:

[0028] Based on the following formula, a differential regularization term is added to the loss function to obtain the target loss function expression Loss;

[0029]

[0030] in, and y represent the output value and target value of the denoising model respectively. represents the mean square error loss, w represents the differential regularization weight, N represents the sampling length of the signal, Δy i and Respectively represent the difference change value between the i-th target signal and the output signal county sampling point;

[0031] The denoising model is tuned based on the target loss function expression to obtain a target denoising model.

[0032] Preferably, the denoising model is tuned based on the target loss function expression to obtain a target denoising model, including:

[0033] Based on the target loss function expression, the square difference between the target signal and the output signal is obtained;

[0034] Optimizing the parameters of the denoising model based on the convergence of the squared difference to the sample mean until the convergence of the squared difference to the sample mean meets a preset convergence requirement;

[0035] The parameters that meet the preset convergence requirements are used as the final parameters of the denoising model to obtain the target denoising model.

[0036] Preferably, in S4, inputting the ECG signal to be analyzed into a target denoising model to obtain a final denoised ECG signal includes:

[0037] Inputting the ECG signal to be analyzed into an encoder in a target denoising model to encode the ECG signal to be analyzed, and extracting key information from the ECG signal to be analyzed;

[0038] The decoder reconstructs the signal based on the key coding features in the key information and outputs the final noise-reduced ECG signal.

[0039] Preferably, after obtaining the de-noised ECG signal, the method further includes: evaluating the de-noised ECG signal, specifically:

[0040] The root mean square error RMSE of the initial ECG signal and the denoised ECG signal is calculated according to the following formula:

[0041]

[0042] N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal;

[0043] The signal-to-noise ratio (SNR) of the initial ECG signal and the noise-reduced ECG signal is calculated according to the following formula:

[0044]

[0045] N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal;

[0046] Based on the root mean square error, the signal assurance of the denoised ECG signal is determined, and based on the signal-to-noise ratio, the noise suppression capability of the denoised ECG signal is determined.

[0047] Preferably, the target denoising model is optimized in real time based on the root mean square error and the signal-to-noise ratio, comprising:

[0048] Obtaining an error difference between the root mean square error and an error threshold, obtaining a signal-to-noise ratio difference between the signal-to-noise ratio and the signal-to-noise ratio threshold, and determining a first processing capability value of the target denoising model for the initial electrocardiogram signal based on the error difference, and determining a second processing capability value of the target denoising model for the initial electrocardiogram signal based on the signal-to-noise ratio difference;

[0049] determining a falsification degree of the initial electrocardiogram signal based on the first processing capability value, and falsifying the initial electrocardiogram signal according to the falsification degree to obtain a falsified sample signal;

[0050] Determine a discriminant feature for the initial ECG signal and the forged sample signal, calculate a signal difference between the initial ECG signal and the forged sample signal, and determine a first optimization parameter for an input processing parameter of a target denoising model based on the discriminant feature and the signal difference;

[0051] Determining a conversion feature of the initial electrocardiogram signal based on the second processing capability value, acquiring a related processing structure from a target denoising model based on an attribute of the conversion feature, determining a new feature of the conversion feature based on historical related signal data, and determining a second optimization parameter of the related processing structure based on a feature difference between the conversion feature and the new feature;

[0052] The target denoising model is optimized in real time based on the first optimization parameter and the second optimization parameter to obtain a latest denoising model.

[0053] Compared with the prior art, the present invention has achieved the following beneficial effects:

[0054] The ECG signal to be analyzed is obtained by preprocessing the collected initial ECG signal; a denoising model for the ECG signal to be analyzed is established based on a convolutional long short-term memory network; the denoising model is tuned based on a loss function with a differential regularization term to obtain a target denoising model; the ECG signal to be analyzed is input into the target denoising model to obtain a final denoised ECG signal denoising model, and a convolutional long short-term memory network is used to fuse time and space features to effectively capture the time and space characteristics of the ECG; by adding a differential regularization term to the reconstruction error, the signal details can be captured more accurately, thereby better restoring the signal characteristics and providing accurate signals for ECG analysis and diagnosis.

[0055] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.

[0056] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0058] Figure 1 This is a flow chart of a method for denoising an electrocardiogram signal based on a convolutional long short-term memory network in an embodiment of the present invention;

[0059] Figure 2 A flowchart of establishing a denoising model in an embodiment of the present invention;

[0060] Figure 3 The flowchart of obtaining a noise-reduced ECG signal in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0061] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0062] Embodiment 1:

[0063] The embodiment of the present invention provides a method for reducing noise of electrocardiogram signals based on convolutional long short-term memory network. Figure 1 As shown, including:

[0064] S1: preprocessing the collected initial ECG signal to obtain the ECG signal to be analyzed;

[0065] S2: Establish a denoising model for the ECG signal to be analyzed based on the convolutional long short-term memory network;

[0066] S3: Tuning the denoising model based on a loss function with a differential regularization term to obtain a target denoising model;

[0067] S4: Inputting the ECG signal to be analyzed into a target denoising model to obtain a final denoised ECG signal.

[0068] In this embodiment, the denoising model has the encoding and decoding characteristics of ECG signals. The encoder is composed of a convolutional long short-term memory layer and a variance layer, which is used to extract useful information from noisy signals. The decoder is composed of a convolutional long short-term memory layer and a fully connected layer, which is used to reconstruct a clean signal.

[0069] In this embodiment, the preprocessing of the collected initial ECG signal includes normalization, segmentation, dimensionality transformation and other preprocessing.

[0070] In this embodiment, the denoising model is tuned based on a loss function with a differential regularization term to meet the reconstruction error requirement.

[0071] The beneficial effects of the above design scheme are: obtaining the ECG signal to be analyzed by preprocessing the collected initial ECG signal; establishing a denoising model for the ECG signal to be analyzed based on a convolutional long short-term memory network; tuning the denoising model based on a loss function with a differential regularization term to obtain a target denoising model; inputting the ECG signal to be analyzed into the target denoising model to obtain the final denoised ECG signal denoising model, using a convolutional long short-term memory network to fuse time and space features, and effectively capturing the time and space characteristics of the ECG; by adding a differential regularization term to the reconstruction error, the signal details can be captured more accurately, thereby better restoring the signal characteristics and providing accurate signals for ECG analysis and diagnosis.

[0072] Embodiment 2:

[0073] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network. In S1, the collected initial ECG signal is preprocessed to obtain an ECG signal to be analyzed, including:

[0074] Normalizing the initial ECG signal to obtain a standard ECG signal;

[0075] Segmenting the standard ECG signal according to the heartbeat cycle to obtain multiple groups of ECG signal groups;

[0076] Perform dimension transformation on multiple groups of ECG signals to obtain ECG signals to be analyzed.

[0077] In this embodiment, the similarity of the signal features between the electrocardiogram signal groups is greater than a preset similarity.

[0078] In this embodiment, the dimensionality transformation performed on the multiple groups of ECG signals is, for example, Fourier transformation, which can be set according to actual conditions.

[0079] The beneficial effects of the above design scheme are: by normalizing the initial ECG signal, a standard ECG signal is obtained; the standard ECG signal is segmented according to the heartbeat cycle to obtain multiple groups of ECG signal groups; the multiple groups of ECG signal groups are dimensionalized to obtain the ECG signal to be analyzed, providing a high-quality signal foundation for the subsequent accurate analysis of the ECG signal in the denoising model.

[0080] Embodiment 3:

[0081] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, such as Figure 2 As shown, in S2, a denoising model for the ECG signal to be analyzed is established based on a convolutional long short-term memory network, including:

[0082] Build an encoder based on convolutional long short-term memory layer and variance layer;

[0083] Build a decoder based on convolutional long short-term memory layers and fully connected layers;

[0084] Based on the connection between the encoder and the decoder, a denoising model is obtained.

[0085] In this embodiment, the encoder encodes the original signal to extract key information from the signal; the decoder reconstructs the signal based on the encoding features to make the reconstructed signal as close to the original noise-free signal as possible.

[0086] The beneficial effects of the above design scheme are: by establishing an encoder based on the convolutional long short-term memory layer and the variance layer, establishing a decoder based on the convolutional long short-term memory layer and the fully connected layer, and connecting the encoder and the decoder to obtain a denoising model, the introduction of the convolutional long short-term memory network layer can learn spatial features and retain spatial information, and the introduction of the variance layer can enable the encoder to collect more critical signal features and reduce the presence of abnormal noise, thereby helping the decoder to recover the clean signal.

[0087] Embodiment 4:

[0088] Based on Example 3, an embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, wherein an encoder is established based on a convolutional long short-term memory layer and a variance layer, comprising:

[0089] The connection relationship between the convolution layer, input gate, forget gate and output gate is established in sequence to obtain the convolutional long short-term memory layer;

[0090] Add unit states to the input gate, forget gate, and output gate. The unit states are used to store long-term dependency information after gate structure processing.

[0091] The output gate is used to decide what new information to add to the hidden state, the forget gate is used to decide what information to keep and discard, and the output gate is used to decide what to choose to output;

[0092] Establish the connection relationship between the convolutional long short-term memory layer and the variance layer;

[0093] After receiving the transient data from the convolutional long short-term memory layer, the variance layer calculates the variance of the transient data to characterize the transient data.

[0094] In this embodiment, by introducing a convolution operation between each gate (input gate, forget gate, output gate) and the unit state, the model can process temporal and spatial information at the same time. The input gate determines how much new information is added to the hidden state, the forget gate determines the information that needs to be retained and discarded, the output gate determines which part of the output information is output, and the unit state is used to store long-term memory. At each time step, the convolutional long short-term memory unit receives the hidden state and unit state of the previous time step, as well as the input data of the current time step. These data are first processed by the convolution layer, and then the unit state is updated and a new hidden state is generated through the above-mentioned gate structure. This method enables the convolutional long short-term memory to learn spatial features and retain spatial information.

[0095] In this embodiment, in the encoder, the transient data output by the convolutional long short-term memory network layer contains a large number of features, which is prone to high noise content and large internal variance. Therefore, in order to avoid the interference of overfitting on the overall model, it is necessary to effectively extract relevant features and reduce the channel dimension. Maximum pooling and average pooling are the most commonly used techniques for reducing feature dimensions. However, considering the large differences in the distribution of different transients, it is more appropriate to use variance-based operations to characterize the transient information of ECG signals. The introduction of the variance layer allows the encoder to collect more critical signal features and reduce the presence of abnormal noise, thereby helping the decoder to recover clean signals.

[0096] In this embodiment, the specific calculation process of the product long short-term memory network layer is shown in formula (1) to formula (6). Where * represents the convolution operator, ⊙ represents the Hadamard product, W f , W i , W c and W o are all convolution kernels, C t-1 and C tRespectively represent the state value of the unit at the previous moment and the current moment; represents the candidate memory cell, that is, the candidate value of the current heartbeat state; h t and h t-1 Respectively represent the output of the unit at the previous moment and the current moment; x t Indicates the current input, f t 、i t , o t Respectively represent the forget gate, input gate and output gate, σ represents the sigmoid function, and tanh represents the hyperbolic tangent function. Due to the nature of spatiotemporal operations, the input shape of the convolutional long short-term memory network is [batch_size, time_step, in_channels, height, width], so x t The shape is [batch_size, in_channels, height, width], h t and C t The shape of is [batch_size, out_channels, height, width];

[0097] f t =σ([h t-1 ,x t ,C t-1 ]*W f +b f )(1)

[0098] i t =σ([h t-1 ,x t ,C t-1 ]*W i +b i )(2)

[0099]

[0100] o t =σ([h t-1 ,x t ,C t ]*W o +b o )(5)

[0101] h t =o t ⊙tanh(C t )(6)

[0102] In this embodiment, the variance layer characterizes the transient state by calculating the variance of the instantaneous feature. In the forward transfer stage, for any instantaneous feature, the output of the variance layer is defined as formula (8), thereby achieving compression and dimensionality reduction of the N-dimensional channel. Because they are all based on convolution operations, b, c, h, and w represent batch, number of channels, height, and width respectively. N is the number of c, that is, the number of channels, so μ is the mean in the channel direction. Formula (8) is the standard deviation formula, which is also along the channel direction, that is, each position is standardized according to N matrices, so the number of channels of vt is 1.

[0103]

[0104] In this embodiment, in the back propagation stage, the parameter update amount of the variance layer is shown in formula (9), from which it can be seen that the parameter update amount is proportional to the deviation of the feature mean. By assigning gradients of different sizes to feature points, higher importance is given to abnormal points far from the mean, which is conducive to reducing the occurrence of abnormal values ​​during training; L refers to the loss function, ht is the output of =relu, that is, the instantaneous feature, vt is the output of the variance layer, Corresponding to Corresponding to

[0105]

[0106] The beneficial effects of the above design scheme are: by sequentially establishing the connection relationship between the convolution layer, the input gate, the forget gate and the output gate, a convolutional long short-term memory layer is obtained; unit states are added to the input gate, the forget gate and the output gate, and the unit states are used to save the long-term dependent information after the gate structure is processed; the output gate is used to determine the new information to be added to the hidden state, the forget gate is used to determine the information to be retained and discarded, and the output gate is used to determine the content of the selected output information; a connection relationship is established between the convolutional long short-term memory layer and the variance layer; after the variance layer receives the transient data from the convolutional long short-term memory layer, the variance of the transient data is calculated to characterize the transient data. The introduction of the convolutional long short-term memory network layer can learn spatial features and retain spatial information, which is helpful for learning the detailed features of the electrocardiogram signal.

[0107] Embodiment 5:

[0108] Based on Example 3, an embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, wherein a decoder is established based on a convolutional long short-term memory layer and a fully connected layer, comprising:

[0109] Establish the connection relationship between the convolutional long short-term memory layer and the fully connected layer;

[0110] The fully connected layer receives the encoded features from the convolutional long short-term memory layer and reconstructs the signal.

[0111] In this embodiment,

[0112] The beneficial effect of the above design scheme is: by establishing a connection relationship between the convolutional long short-term memory layer and the fully connected layer, the fully connected layer reconstructs the signal after receiving the encoding features from the convolutional long short-term memory layer, so that the reconstructed signal is as close to the original noise-free signal as possible, thereby ensuring the signal quality.

[0113] Embodiment 6:

[0114] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network. In S3, the denoising model is optimized based on a loss function with a differential regularization term to obtain a target denoising model, including:

[0115] Based on the following formula, a differential regularization term is added to the loss function to obtain the target loss function expression Loss;

[0116]

[0117] in, and y represent the output value and target value of the denoising model respectively. represents the mean square error loss, w represents the differential regularization weight, N represents the sampling length of the signal, Δy i and Respectively represent the difference change value between the i-th target signal and the output signal county sampling point;

[0118] The denoising model is tuned based on the target loss function expression to obtain a target denoising model.

[0119] The beneficial effect of the above design scheme is: by adding the differential regularization term to the loss function, the consistency of the signal change is further constrained, the model's ability to retain detailed information is strengthened, and thus the model's denoising ability is improved.

[0120] Embodiment 7:

[0121] Based on Example 6, an embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, wherein the denoising model is optimized based on the target loss function expression to obtain a target denoising model, including:

[0122] Based on the target loss function expression, the square difference between the target signal and the output signal is obtained;

[0123] Optimizing the parameters of the denoising model based on the convergence of the squared difference to the sample mean until the convergence of the squared difference to the sample mean meets a preset convergence requirement;

[0124] The parameters that meet the preset convergence requirements are used as the final parameters of the denoising model to obtain the target denoising model.

[0125] The beneficial effects of the above design scheme are: by obtaining the square difference between the target signal and the output signal based on the target loss function expression; optimizing the parameters of the denoising model based on the convergence of the square difference to the sample mean until the convergence of the square difference to the sample mean meets the preset convergence requirements; taking the parameters that meet the preset convergence requirements as the final parameters of the denoising model to obtain the target denoising model, ensuring the target denoising model's detail processing capability and denoising capability.

[0126] Embodiment 8:

[0127] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, such as Figure 3 As shown, in S4, the ECG signal to be analyzed is input into the target denoising model to obtain the final denoised ECG signal, including:

[0128] Inputting the ECG signal to be analyzed into an encoder in a target denoising model to encode the ECG signal to be analyzed, and extracting key information from the ECG signal to be analyzed;

[0129] The decoder reconstructs the signal based on the key coding features in the key information and outputs the final noise-reduced ECG signal.

[0130] The beneficial effects of the above design scheme are: the ECG signal to be analyzed is encoded by inputting the ECG signal to be analyzed into the encoder in the target denoising model, and the key information in the ECG signal to be analyzed is extracted. The decoder reconstructs the signal based on the key coding features in the key information, outputs the final denoised ECG signal, and uses a convolutional long short-term memory network to fuse time and space features to effectively capture the time and space characteristics of the ECG; by adding a differential regularization term to the reconstruction error, the signal details can be captured more accurately, thereby better restoring the signal characteristics, and providing accurate signals for ECG analysis and diagnosis.

[0131] Embodiment 9:

[0132] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network. After obtaining the denoised ECG signal, the method further includes: evaluating the denoised ECG signal, specifically:

[0133] The root mean square error RMSE of the initial ECG signal and the denoised ECG signal is calculated according to the following formula:

[0134]

[0135] N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal;

[0136] The signal-to-noise ratio (SNR) of the initial ECG signal and the noise-reduced ECG signal is calculated according to the following formula:

[0137]

[0138] N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal;

[0139] Based on the root mean square error, the signal assurance of the denoised ECG signal is determined, and based on the signal-to-noise ratio, the noise suppression capability of the denoised ECG signal is determined.

[0140] In this embodiment, RMSE is used to measure the difference between the signal after noise reduction processing and the original clean signal. The lower the RMSE, the better the signal fidelity of the noise reduction algorithm. SNR is used to evaluate the performance of the noise reduction algorithm in suppressing noise. The higher the SNR, the stronger the noise suppression ability of the noise reduction algorithm.

[0141] The beneficial effect of the above design scheme is: the denoised ECG signal is evaluated by means of the root mean square error and the signal-to-noise ratio, thereby ensuring the fidelity performance and noise suppression capability of the obtained denoised ECG signal.

[0142] Embodiment 10:

[0143] Based on Example 9, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network, which optimizes the target denoising model in real time based on the root mean square error and signal-to-noise ratio, including:

[0144] Obtaining an error difference between the root mean square error and an error threshold, obtaining a signal-to-noise ratio difference between the signal-to-noise ratio and the signal-to-noise ratio threshold, and determining a first processing capability value of the target denoising model for the initial electrocardiogram signal based on the error difference, and determining a second processing capability value of the target denoising model for the initial electrocardiogram signal based on the signal-to-noise ratio difference;

[0145] determining a falsification degree of the initial electrocardiogram signal based on the first processing capability value, and falsifying the initial electrocardiogram signal according to the falsification degree to obtain a falsified sample signal;

[0146] Determine a discriminant feature for the initial ECG signal and the forged sample signal, calculate a signal difference between the initial ECG signal and the forged sample signal, and determine a first optimization parameter for an input processing parameter of a target denoising model based on the discriminant feature and the signal difference;

[0147] Determining a conversion feature of the initial electrocardiogram signal based on the second processing capability value, acquiring a related processing structure from a target denoising model based on an attribute of the conversion feature, determining a new feature of the conversion feature based on historical related signal data, and determining a second optimization parameter of the related processing structure based on a feature difference between the conversion feature and the new feature;

[0148] The target denoising model is optimized in real time based on the first optimization parameter and the second optimization parameter to obtain a latest denoising model.

[0149] In this embodiment, the error threshold and the signal-to-noise ratio threshold are set according to actual conditions.

[0150] In this embodiment, the smaller the first processing capability value is, the greater the corresponding counterfeiting degree is.

[0151] In this embodiment, the first optimization parameter of the input processing parameter of the target denoising model is used to improve the model's ability to recognize signals, thereby facilitating better processing.

[0152] In this embodiment, the smaller the second processing capability value is, the larger the corresponding conversion feature range is.

[0153] In this embodiment, features corresponding to the conversion features are acquired from the history-related signal data as new features.

[0154] In this embodiment, the second optimization parameters of the relevant processing structure are used to improve the signal processing capability of the model and better learn the information in the signal.

[0155] The beneficial effects of the above design scheme are: by obtaining the error difference between the root mean square error and the error threshold, the signal-to-noise ratio difference between the signal-to-noise ratio and the signal-to-noise ratio threshold is obtained, and based on the error difference, a first processing capability value of the target denoising model for the initial ECG signal is determined, and based on the signal-to-noise ratio difference, a second processing capability value of the target denoising model for the initial ECG signal is determined; based on the first processing capability value, the degree of falsification of the initial ECG signal is determined, and the initial ECG signal is falsified according to the degree of falsification to obtain a falsified sample signal; a discriminant feature of the initial ECG signal and the falsified sample signal is determined, and the signal difference between the initial ECG signal and the falsified sample signal is calculated, and based on the discriminant feature, a second processing capability value of the target denoising model for the initial ECG signal is determined. and signal difference, determine the first optimization parameter of the input processing parameter of the target denoising model; determine the conversion feature of the initial ECG signal based on the second processing capability value, obtain the relevant processing structure from the target denoising model based on the attribute of the conversion feature, determine the new feature of the conversion feature based on the historical related signal data, and determine the second optimization parameter of the relevant processing structure based on the feature difference between the conversion feature and the new feature; optimize the target denoising model in real time based on the first optimization parameter and the second optimization parameter to obtain the latest denoising model, realize real-time optimization of the model based on the evaluation of the initial ECG signal, ensure the model superiority of the latest denoising model, and better perform ECG signal denoising.

[0156] Embodiment 11

[0157] Based on Example 1, the embodiment of the present invention provides an ECG signal denoising method based on a convolutional long short-term memory network. The method can also be used in a portable exercise cardiopulmonary monitoring system to extract ECG signals during exercise and automatically capture and store early disease signals such as premature ventricular contractions, atrial fibrillation, bigeminy, and trigeminy, thereby realizing practical applications of ECG analysis and diagnosis.

[0158] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of this application document and its equivalent technology, the present invention is also intended to include these changes and variations.

Claims

1. A method for denoising electrocardiogram signals based on convolutional long short-term memory network, characterized in that: include: S1: preprocessing the collected initial ECG signal to obtain the ECG signal to be analyzed; S2: Establish a denoising model for the ECG signal to be analyzed based on the convolutional long short-term memory network; S3: Tuning the denoising model based on a loss function with a differential regularization term to obtain a target denoising model; S4: Inputting the ECG signal to be analyzed into a target denoising model to obtain a final denoised ECG signal.

2. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 1, characterized in that: In S1, the collected initial ECG signal is preprocessed to obtain the ECG signal to be analyzed, including: Normalizing the initial ECG signal to obtain a standard ECG signal; Segmenting the standard ECG signal according to the heartbeat cycle to obtain multiple groups of ECG signal groups; Perform dimension transformation on multiple groups of ECG signals to obtain ECG signals to be analyzed.

3. The ECG signal denoising method based on convolutional long short-term memory network according to claim 1, characterized in that: In S2, a denoising model for the ECG signal to be analyzed is established based on a convolutional long short-term memory network, including: Build an encoder based on convolutional long short-term memory layer and variance layer; Build a decoder based on convolutional long short-term memory layers and fully connected layers; Based on the connection between the encoder and the decoder, a denoising model is obtained.

4. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 3, characterized in that: The encoder is established based on the convolutional long short-term memory layer and the variance layer, including: The connection relationship between the convolution layer, input gate, forget gate and output gate is established in sequence to obtain the convolutional long short-term memory layer; Add unit states to the input gate, forget gate, and output gate. The unit states are used to store long-term dependency information after gate structure processing. The output gate is used to decide what new information to add to the hidden state, the forget gate is used to decide what information to keep and discard, and the output gate is used to decide what to choose to output; Establish the connection relationship between the convolutional long short-term memory layer and the variance layer; After receiving the transient data from the convolutional long short-term memory layer, the variance layer calculates the variance of the transient data to characterize the transient data.

5. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 3, characterized in that: The method of establishing a decoder based on a product long short-term memory layer and a fully connected layer includes: Establish the connection relationship between the convolutional long short-term memory layer and the fully connected layer; The fully connected layer receives the encoded features from the convolutional long short-term memory layer and reconstructs the signal.

6. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 1, characterized in that: In S3, the denoising model is tuned based on a loss function with a differential regularization term to obtain a target denoising model, including: Based on the following formula, a differential regularization term is added to the loss function to obtain the target loss function expression Loss; in, and y represent the output value and target value of the denoising model respectively. represents the mean square error loss, w represents the differential regularization weight, N represents the sampling length of the signal, Δy i and Respectively represent the difference change value between the i-th target signal and the output signal county sampling point; The denoising model is tuned based on the target loss function expression to obtain a target denoising model.

7. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 6, characterized in that: The denoising model is tuned based on the target loss function expression to obtain a target denoising model, including: Based on the target loss function expression, the square difference between the target signal and the output signal is obtained; Optimizing the parameters of the denoising model based on the convergence of the squared difference to the sample mean until the convergence of the squared difference to the sample mean meets a preset convergence requirement; The parameters that meet the preset convergence requirements are used as the final parameters of the denoising model to obtain the target denoising model.

8. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 1, characterized in that: In S4, the ECG signal to be analyzed is input into a target denoising model to obtain a final denoised ECG signal, including: Inputting the ECG signal to be analyzed into an encoder in a target denoising model to encode the ECG signal to be analyzed, and extracting key information from the ECG signal to be analyzed; The decoder reconstructs the signal based on the key coding features in the key information and outputs the final noise-reduced ECG signal.

9. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 1, characterized in that: After obtaining the noise-reduced ECG signal, the method further includes: evaluating the noise-reduced ECG signal, specifically: The root mean square error RMSE of the initial ECG signal and the denoised ECG signal is calculated according to the following formula: N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal; The signal-to-noise ratio (SNR) of the initial ECG signal and the noise-reduced ECG signal is calculated according to the following formula: N represents the sampling length of the signal, X n (j) represents the jth initial ECG signal, represents the jth denoised ECG signal; Based on the root mean square error, the signal assurance of the denoised ECG signal is determined, and based on the signal-to-noise ratio, the noise suppression capability of the denoised ECG signal is determined.

10. The method for denoising an ECG signal based on a convolutional long short-term memory network according to claim 9, characterized in that: The target denoising model is optimized in real time based on the root mean square error and the signal-to-noise ratio, including: Obtaining an error difference between the root mean square error and an error threshold, obtaining a signal-to-noise ratio difference between the signal-to-noise ratio and the signal-to-noise ratio threshold, and determining a first processing capability value of the target denoising model for the initial electrocardiogram signal based on the error difference, and determining a second processing capability value of the target denoising model for the initial electrocardiogram signal based on the signal-to-noise ratio difference; determining a falsification degree of the initial electrocardiogram signal based on the first processing capability value, and falsifying the initial electrocardiogram signal according to the falsification degree to obtain a falsified sample signal; Determine a discriminant feature for the initial ECG signal and the forged sample signal, calculate a signal difference between the initial ECG signal and the forged sample signal, and determine a first optimization parameter for an input processing parameter of a target denoising model based on the discriminant feature and the signal difference; Determining a conversion feature of the initial electrocardiogram signal based on the second processing capability value, acquiring a related processing structure from a target denoising model based on an attribute of the conversion feature, determining a new feature of the conversion feature based on historical related signal data, and determining a second optimization parameter of the related processing structure based on a feature difference between the conversion feature and the new feature; The target denoising model is optimized in real time based on the first optimization parameter and the second optimization parameter to obtain a latest denoising model.