CN115721318A - Electrocardiosignal noise reduction processing method, system, equipment and storage medium - Google Patents
Electrocardiosignal noise reduction processing method, system, equipment and storage medium Download PDFInfo
- Publication number
- CN115721318A CN115721318A CN202211486665.9A CN202211486665A CN115721318A CN 115721318 A CN115721318 A CN 115721318A CN 202211486665 A CN202211486665 A CN 202211486665A CN 115721318 A CN115721318 A CN 115721318A
- Authority
- CN
- China
- Prior art keywords
- electrocardiosignal
- noise
- noise reduction
- electrocardiosignals
- self
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000009467 reduction Effects 0.000 title claims abstract description 103
- 238000003860 storage Methods 0.000 title claims abstract description 11
- 238000003672 processing method Methods 0.000 title abstract description 10
- 238000012545 processing Methods 0.000 claims abstract description 80
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 39
- 230000006870 function Effects 0.000 claims abstract description 22
- 238000003745 diagnosis Methods 0.000 claims abstract description 20
- 230000002776 aggregation Effects 0.000 claims abstract description 15
- 238000004220 aggregation Methods 0.000 claims abstract description 15
- 230000007246 mechanism Effects 0.000 claims abstract description 13
- 230000004913 activation Effects 0.000 claims abstract description 9
- 238000012549 training Methods 0.000 claims description 64
- 238000000034 method Methods 0.000 claims description 43
- 238000012360 testing method Methods 0.000 claims description 18
- 238000007781 pre-processing Methods 0.000 claims description 15
- 230000015654 memory Effects 0.000 claims description 14
- 230000000747 cardiac effect Effects 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 6
- 230000017105 transposition Effects 0.000 claims description 6
- 238000011425 standardization method Methods 0.000 claims description 4
- 230000001133 acceleration Effects 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims 2
- 230000008901 benefit Effects 0.000 abstract description 5
- 201000010099 disease Diseases 0.000 abstract description 5
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 abstract description 5
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 239000013598 vector Substances 0.000 description 13
- 230000009466 transformation Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 206010003658 Atrial Fibrillation Diseases 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 238000011176 pooling Methods 0.000 description 5
- 206010003119 arrhythmia Diseases 0.000 description 4
- 230000006793 arrhythmia Effects 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 238000013136 deep learning model Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 208000024172 Cardiovascular disease Diseases 0.000 description 1
- 241000764238 Isis Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
The invention discloses an electrocardiosignal noise reduction processing method, an electrocardiosignal noise reduction processing system, electrocardiosignal noise reduction processing equipment and a storage medium, wherein a self-attention mechanism-based transform architecture is taken as a core, the advantages of a convolutional neural network and a transform in the aspects of local feature learning and global feature learning are fully combined, and the long time sequence feature learning capability of a convolutional neural network model is greatly improved; moreover, the invention also introduces a self-adaptive parameter ReLU activation function, which fully considers the specificity of the electrocardiosignal and solves the problem that the traditional activation function can not store the negative value characteristic of the electrocardiogram signal; meanwhile, the invention also applies a dynamic characteristic aggregation module to enhance the capability of the model for capturing valuable characteristics, so that the noise reduction model can complete the noise reduction task with high quality while keeping the valuable characteristic information. The invention can efficiently finish the noise reduction treatment of the electrocardiosignals containing noise to obtain pure electrocardiosignals, and is beneficial to more accurate disease diagnosis according to the pure electrocardiosignals.
Description
Technical Field
The invention belongs to the technical field of electrocardiosignal processing, and particularly relates to an electrocardiosignal noise reduction processing method, an electrocardiosignal noise reduction processing system, electrocardiosignal noise reduction processing equipment and a storage medium.
Background
Electrocardiograph (ECG) is an important index for people to understand their health status. It plays an important role in the tasks of cardiovascular disease diagnosis, biological feature recognition and the like. However, due to the influence of various factors, the acquired electrocardiographic signals are often doped with baseline drift, power line interference and physiological artifacts in the recording process. For telemedicine applications involving electrocardiogram transmission and storage, noise may also be due to poor channel conditions. In addition, when the electrocardiograph monitoring device ages, the quality of the obtained electrocardiograph signals deteriorates and contains a large amount of interference noise. The noise distorts the clinical characteristics of the cardiac electrical signal, thereby making identification of the cardiac electrical signal and diagnosis of disease difficult. Therefore, how to obtain pure electrocardiosignals becomes an important component of an electrocardiosignal processing task.
Conventional methods of signal noise reduction typically filter or decompose the signal. Therefore, the electrocardiosignal is separated from the noise, so as to achieve the purpose of removing the noise. Conventional signal processing methods, such as Empirical Mode Decomposition (EMD), adaptive filtering, wavelet transform, etc., are widely used in many fields. However, these methods have some drawbacks in terms of noise reduction of the cardiac signal, and they can only perform well under certain noise conditions. For example, when using EMD for noise reduction, modal aliasing can be severe when the sampling frequency of the cardiac signal is too low. Due to the inconsistent attenuation characteristics of the high-frequency and low-frequency components in the signal, the frequency spectrum of the signal after Fourier transform is slightly different from that of the original signal. In order to make these methods have good noise reduction performance for different electrocardiographic signals, parameters of the algorithm need to be adjusted frequently.
The wide application of telemedicine and wearable electrocardiogram equipment provides a huge database for electrocardiogram research, which provides good precondition for deep learning in the application of electrocardiogram field. For example, antczak et al propose a new deep-loop neural network for electrocardio-denoising, the architecture being tested on a real dataset. Experimental results show that the signal-to-noise ratio of the method is superior to that of traditional methods such as band-pass filtering and wavelet filtering within the range of 0dB to-10 dB. There are also network systems that combine Wavelet Transform (WT) with Denoising Auto-encoder (DAE), which improves the performance of DAE in removing baseline wander.
Although the existing deep learning model has strong feature extraction capability, some problems still exist when the electrocardiogram signal is subjected to noise reduction:
1. the deep learning model based on image recognition is rarely concerned about negative value characteristic information in data. The electrocardiogram signal fluctuates up and down with a zero value as a reference, unlike the image data. Therefore, it contains many valuable negative-valued characteristic information. The conventional convolutional network model is not suitable for electrocardiogram signal processing.
2. The electrocardiogram signal is a long-time sequence signal, the learning of global features is very important for electrocardiogram analysis, and the existing deep learning model cannot effectively realize the learning of the global features.
3. The purpose of denoising an electrocardiographic signal is to recover a clean electrocardiographic signal from the signal without losing valuable characteristic information. However, the existing electrocardiosignal noise reduction model based on deep learning easily ignores some important weak features capable of reflecting disease information.
Therefore, the existing method for denoising the electrocardiogram signal still needs to be improved.
Disclosure of Invention
The invention aims to provide an electrocardiosignal noise reduction processing method, an electrocardiosignal noise reduction processing system, electrocardiosignal noise reduction processing equipment and a storage medium, which are used for solving the problems in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, a method for denoising an electrocardiographic signal is provided, which includes:
acquiring a noisy initial electrocardiosignal;
preprocessing the initial electrocardiosignal to obtain a preprocessed noisy electrocardiosignal;
leading the preprocessed noise-containing electrocardiosignals into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain noise-reduced pure electrocardiosignals; the electrocardiosignal noise reduction processing model based on self attention comprises a signal coding part and a signal reconstruction part; the signal coding part adopts a convolutional neural network architecture, a ReLU function of self-adaptive parameters is used for replacing an original ReLU activation function in the convolutional neural network architecture, a normalization layer is embedded into each layer of convolutional layer acceleration network, and a self-attention mechanism-based Transformer module is added at the tail end of the convolutional neural network architecture; the signal reconstruction part adopts a transposition convolution architecture, and a dynamic characteristic aggregation module is added after each transposition convolution layer; the signal encoding part and the signal reconstruction part form a jump connection.
In one possible design, after obtaining the noise-reduced clean ecg signal, the method further includes:
marking a sample label on the pure electrocardiosignal and then compiling the pure electrocardiosignal into a sample set;
and training and testing the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after the training and testing.
In one possible design, the preprocessing the initial cardiac signal includes: and (5) carrying out standardization processing on the initial electrocardiosignals by adopting a Z-score standardization method.
In one possible design, before introducing the preprocessed noisy ecg signal into a preset self-attention-based ecg signal noise reduction processing model, the method further comprises:
constructing an electrocardiosignal noise reduction processing model based on self attention;
acquiring a noise-containing electrocardiosignal training set, and preprocessing the simulated noise-containing electrocardiosignals in the noise-containing electrocardiosignal training set to obtain a preprocessed noise-containing electrocardiosignal training set;
training the built electrocardiosignal noise reduction processing model based on self attention by utilizing the preprocessed noisy electrocardiosignal training set, and finally obtaining the trained electrocardiosignal noise reduction processing model based on self attention by adopting a mean square error loss function;
and taking the trained electrocardiosignal noise reduction processing model based on the self-attention as a preset electrocardiosignal noise reduction processing model based on the self-attention.
In one possible design, the obtaining process of the noisy electrocardiographic signal training set includes: acquiring a plurality of real electrocardiosignals from electrocardio detection equipment, and acquiring a plurality of electrocardio noise signals in a real scene; fusing each real electrocardiosignal and each electrocardio noise signal to obtain a plurality of simulated electrocardiosignals containing noise; and integrating the simulated electrocardiosignals containing noise to obtain a training set of the electrocardiosignals containing noise.
In a second aspect, a system for denoising an electrocardiographic signal is provided, which includes an obtaining unit, a processing unit, a constructing unit, a training unit, and a denoising unit, wherein:
the acquisition unit is used for acquiring initial electrocardiosignals containing noise, acquiring a plurality of real electrocardiosignals from electrocardio detection equipment and acquiring a plurality of electrocardio noise signals in a real scene;
the processing unit is used for preprocessing the initial electrocardiosignals to obtain preprocessed noise-containing electrocardiosignals and preprocessing the simulated noise-containing electrocardiosignals in the noise-containing electrocardiosignal training set to obtain a preprocessed noise-containing electrocardiosignal training set;
the constructing unit is used for constructing an electrocardiosignal noise reduction processing model based on self attention;
the training unit is used for training the built electrocardiosignal noise reduction processing model based on self-attention by utilizing the preprocessed noise-containing electrocardiosignal training set, a mean square error loss function is adopted for training, and the trained electrocardiosignal noise reduction processing model based on self-attention is finally obtained and serves as a preset electrocardiosignal noise reduction processing model based on self-attention;
and the noise reduction unit is used for leading the preprocessed electrocardiosignals containing noise into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain pure electrocardiosignals subjected to noise reduction.
In one possible design, the system further includes an editing unit and a usage unit, wherein:
the editing unit is used for marking a sample label on the pure electrocardiosignal and then editing the sample label into a sample set;
and the using unit is used for carrying out training test on the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after the training test.
In a third aspect, a device for noise reduction processing of an electrocardiographic signal is provided, comprising:
a memory to store instructions;
a processor configured to read the instructions stored in the memory and execute the method of any of the first aspects according to the instructions.
In a fourth aspect, there is provided a computer-readable storage medium having stored thereon instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects. There is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of the first aspects.
Has the beneficial effects that: the method takes a Transformer architecture based on a self-attention mechanism as a core, fully combines the advantages of a convolutional neural network and the Transformer in the aspects of local feature learning and global feature learning, and greatly improves the long time sequence feature learning capability of the convolutional neural network model; moreover, the invention also introduces a self-adaptive parameter ReLU activation function, which fully considers the specificity of the electrocardiosignal and solves the problem that the traditional activation function can not store the negative value characteristic of the electrocardiogram signal; meanwhile, the invention also applies a dynamic characteristic aggregation module to enhance the capability of the model for capturing valuable characteristics, so that the noise reduction model can complete the noise reduction task with high quality while keeping the valuable characteristic information. The invention can efficiently finish the noise reduction treatment of the electrocardiosignals containing noise to obtain pure electrocardiosignals, and is beneficial to more accurate disease diagnosis according to the pure electrocardiosignals.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic illustration of the steps of a method in an embodiment of the invention;
FIG. 2 is a schematic structural diagram of a self-attention-based electrocardiosignal denoising processing model in an embodiment of the present invention;
FIG. 3 is a schematic diagram of an AP-RELU architecture according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a Transformer encoder architecture and a multi-head attention architecture according to an embodiment of the present invention;
FIG. 5 is a graphical illustration of the noise reduction results on the MIT-BIH arrhythmia data set in an embodiment of the invention;
FIG. 6 is a graphical illustration of the noise reduction results on the MIT-BIH atrial fibrillation dataset in an embodiment of the present invention;
FIG. 7 is a schematic diagram of the system according to the embodiment of the present invention;
FIG. 8 is a schematic diagram showing the structure of an apparatus according to an embodiment of the present invention.
Detailed Description
It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. Specific structural and functional details disclosed herein are merely illustrative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It is to be understood that, unless expressly stated or limited otherwise, the term "coupled" is to be interpreted broadly, as meaning, for example, that it may be fixedly, removably, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. Specific meanings of the above terms in the examples can be understood by those of ordinary skill in the art according to specific situations.
In the following description, specific details are provided to facilitate a thorough understanding of example embodiments. However, it will be understood by those of ordinary skill in the art that the example embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams in order not to obscure the examples in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring the embodiments.
Example 1:
the embodiment provides an electrocardiosignal noise reduction processing method, as shown in fig. 1, the method includes the following steps:
s1, constructing an electrocardiosignal noise reduction processing model based on self attention.
In specific implementation, before performing noise reduction processing, an electrocardiosignal noise reduction processing model based on self-attention needs to be constructed, and the electrocardiosignal noise reduction processing model based on self-attention is shown in fig. 2 and comprises a signal encoding part and a signal reconstruction part; the signal coding part adopts a convolutional neural network architecture, and a ReLU function of self-adaptive parameters is used for replacing an original ReLU activation function in the convolutional neural network architecture, so that the model has more flexible nonlinear transformation capability; embedding the standardized layer into each convolution layer acceleration network; a Transformer module based on a self-attention mechanism is added at the tail end of a convolutional neural network framework to make up for the deficiency of the convolutional neural network in the aspect of signal global feature extraction; the signal reconstruction part adopts a transposition convolution structure to carry more information, and a dynamic feature aggregation module (DAM) is added after each transposition convolution layer, so that the network can know the important features of the electrocardiogram signal and inhibit the influence of noise on feature extraction to a certain extent. Some valuable features of the electrocardiogram signal may be lost during signal compression due to the effect of down-sampling. Therefore, a jump connection between the signal encoding part and the signal reconstruction part is adopted to realize more accurate and effective reconstruction of the electrocardiosignal.
The electrocardiosignal noise reduction processing model based on self-attention constructed by the embodiment is characterized by a self-attention-based transform architecture, a self-adaptive parameter ReLU function and a dynamic feature aggregation module. To this end, the three modules are described in detail below:
1. ReLU of adaptive parameters (AP-ReLU). The details of the AP-ReLU architecture are shown in FIG. 3, assuming the input is characterized byDecompose it into positive partsAnd negative partPositive and negative features are passed through the global average pooling layer, respectively, to convert the dimension of the feature into C × 1:
then, the two new characteristics are combined according to the time dimension to obtain a new characteristic diagramAnd then input into a non-linear mapping module. First of all, the characteristic F obtained 0 And inputting a batch normalization layer to accelerate the convergence speed and reduce the divergence of data. Then, the slave F will be activated through a fully connected layer and the ReLU activation layer 0 Mapping toAnd then obtaining the weight vector alpha of the negative module by the sigmoid function through a nonlinear transformation based on the full connection layer. Finally, the negative features are re-optimized using the weight vector α and combined again with the positive features to obtain the final output feature F of the AP-ReLU out . This process can be expressed as:
F out =max(x,0)+α×min(x,0)
the AP-RELU can enable negative characteristics of the electrocardiosignals to effectively participate in the process of network learning, and meanwhile, different weight vectors can be generated aiming at different input signals, so that various and unique outputs are generated, and the nonlinear transformation capability and the characteristic characterization capability of the model are improved.
2. A dynamic feature aggregation module (DAM). The dynamic feature aggregation module is composed of a channel feature aggregation module and a time feature aggregation module respectively. The channel feature aggregation module focuses on information of the input feature channel dimensions. In the module, the time dimension of the signal is compressed, so that the network focuses more on information contained in the electrocardiosignal characteristic channel. Specifically, firstly, maximum pooling and average pooling are respectively adopted to compress features of all time dimensions into channel description vectors, then a nonlinear transformation layer based on a full connection layer is adopted to encode the mutual importance among channels, and finally a sigmoid activation function is used to obtain channel weight vectors. The value of the weight vector characterizes the relative importance of the channel features, and the weight vector is multiplied by the corresponding pixels of the input features to complete the dynamic aggregation of the channel features. Likewise, temporal feature aggregation focuses on inputting information in a feature time dimension. In the module, channel dimensions of signals are compressed, so that a network pays more attention to information contained in time dimensions of electrocardiosignal characteristics. Specifically, firstly, maximum pooling and average pooling are respectively adopted to compress features of all channel dimensions into time description vectors, then a convolutional layer is adopted to realize coding of relative importance of the time dimensions, and a sigmoid function is used to obtain a final time weight vector. Finally, the weight vector and the input feature are multiplied by corresponding pixels to complete the dynamic aggregation of the time feature.
3. A Transformer encoder module. As shown in fig. 4, the architecture of the transform encoder and the multi-head attention architecture are shown separately. The Transformer encoder module mainly comprises position embedding, multi-head attention and feed-forward networks. Specifically, assume that the signature sequence input to the transform isIs obtained. In order to allow the Transformer to understand the positional relationship of these sequences, we introduce a set of learnable feature position embeddingsAnd mixing it with the characteristic sequence R n Make a splice, i.e.
The Multi-Head Attention Module (MHA) is composed of a plurality of parallel Dot Product Attention modules (SDPA) which are responsible for learning long-distance dependency relationships. As shown in FIG. 4, assume the input to the SDPA is a signature sequenceThree sets of linear transformation layers are defined (the learnable weight matrices are respectively W Q ,W K ,W V ) Using the three sets of linear transforms to input Y n The mappings are Q (query vector), K (key vector) and V (value vector). One attention head may be modeled as:
Q=Linear q (Y n )=Y n W Q
K=Linear k (Y n )=Y n W K
V=Linear v (Y n )=Y n W V
wherein, QK T The purpose of the method is to calculate the similarity of Q and K, then input the similarity after scale transformation into Softmax to obtain attention weight, and finally carry out matrix multiplication on the weight and V to obtain final output. The outputs of multiple heads of attention are then combined together and then passed through a filter with a learnable weight W H Linear layer of (3) to obtain the final output S of the MHA n I.e. by
Where H represents the number of attention points.
The feed-forward network includes multiple linear transformation layers, layer normalization, and residual linking. First, the output S of the MHA n By a residual chaining and layer normalization layer to speed training and reduce internal covariate shifts, i.e.
Z n =LayerNorm(Y n +R n ),
Wherein E (u) and σ 2 The mean and variance are calculated in units of each characteristic signal.
Subsequently, the mentioned features will be input into two linear transformation layers with ReLU. Finally, the final output of the Transformer encoder is obtained through a residual error chaining and a layer normalization layer, namely
S2, acquiring a noise-containing electrocardiosignal training set, and preprocessing the simulated noise-containing electrocardiosignals in the noise-containing electrocardiosignal training set to obtain a preprocessed noise-containing electrocardiosignal training set.
In specific implementation, after an electrocardiosignal noise reduction processing model based on self attention is constructed, model memorability training optimization is needed. The method can acquire a plurality of real electrocardiosignals from electrocardio detection equipment and acquire a plurality of electrocardio noise signals in a real scene; fusing each real electrocardiosignal and each electrocardio noise signal to obtain a plurality of simulated electrocardiosignals containing noise; and integrating the simulated electrocardiosignals containing noise to obtain a training set of the electrocardiosignals containing noise. After the noisy electrocardiosignal training set is obtained, the simulated noisy electrocardiosignals in the noisy electrocardiosignal training set need to be preprocessed, namely, a Z-score standardization method is used for carrying out standardization processing on signal samples.
And S3, training the built electrocardiosignal noise reduction processing model based on self-attention by utilizing the preprocessed noisy electrocardiosignal training set, wherein the training adopts a mean square error loss function, and finally the trained electrocardiosignal noise reduction processing model based on self-attention is obtained and is used as a preset electrocardiosignal noise reduction processing model based on self-attention.
In specific implementation, after a preprocessed noisy electrocardiosignal training set is obtained, the built electrocardiosignal denoising processing model based on self attention can be trained, and a mean square error Loss function (MSE-Loss) is adopted in the training. In the training process, the gradient of the loss function is calculated, the model parameters are updated to minimize the loss, and finally a model with good noise reduction capability is obtained and is used as a preset electrocardiosignal noise reduction processing model based on self-attention.
And S4, acquiring the initial electrocardiosignal containing noise.
In specific implementation, after the preparation of the preset electrocardiosignal noise reduction processing model based on self attention is finished, the corresponding noise-containing initial electrocardiosignal can be obtained to carry out noise reduction processing. The general form of the noisy initial cardiac signal is defined as follows:
s=P+n
s represents the original cardiac signal containing noise,representing a pure electrocardiosignal without noise,representing the noise signal generated during signal acquisition and storage, and T representing the length of each electrocardiogram signal.
And S5, preprocessing the initial electrocardiosignal to obtain a preprocessed noise-containing electrocardiosignal.
In specific implementation, after the initial electrocardiosignals are acquired, the initial electrocardiosignals need to be preprocessed so as to be suitable for the standardized input of the model, namely, the initial electrocardiosignals are standardized by adopting a Z-score standardization method.
And S6, leading the preprocessed noise-containing electrocardiosignals into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain noise-reduced pure electrocardiosignals.
In specific implementation, after preprocessing is completed, the electrocardiosignals containing noise are led into a preset electrocardiosignal noise reduction processing model based on self-attention, and noise reduction processing based on a self-attention mechanism is carried out to obtain the pure electrocardiosignals after noise reduction.
And S7, marking a sample label on the pure electrocardiosignal and then coding the pure electrocardiosignal into a sample set.
In specific implementation, after the pure electrocardiosignals subjected to noise reduction are obtained, sample labels can be marked on the pure electrocardiosignals and then the pure electrocardiosignals are coded into a sample set for subsequent use.
And S8, carrying out training test on the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after the training test.
In specific implementation, after a sample set containing a plurality of pure electrocardiosignals is obtained, the sample set can be used for training and testing a preset intelligent diagnosis model to obtain the intelligent diagnosis model after the training and testing, so that a doctor can conveniently perform more accurate disease diagnosis by using the intelligent diagnosis model after the training and testing.
In order to illustrate the technical effect of the method, the embodiment further provides a specific implementation case to perform experimental verification on the method:
the case uses the true cardiac electrical signals of the MIT-BIH arrhythmia dataset and MIT-BIH atrial fibrillation dataset, with all noise sources randomly drawn from the MIT-BIH Noise Stress Test Database (NSTDB). Each 250 data points are segmented according to the length of the ECG cycle, with each ECG signal having a duration of approximately one ECG cycle. In order to simulate the randomness of real world noise generation, three kinds of noise are randomly selected from an NSTDB data set and added into an electrocardiosignal, then a mixed noise ECG signal is used as an input signal, an original pure electrocardiosignal is used as a target signal, and the strength degree of the noise is measured by a signal-to-noise ratio.
Noise reduction effect of MIT-BIH arrhythmia dataset. In order to explore the effects of the three main modules proposed in this embodiment, a CNN-based encoder network may be selected as a basic architecture, on which three modules AP-ReLU, DAM, and Transformer are added, respectively, and then compared with the original CNN network and the method proposed in this embodiment. These comparison methods were named CNN, AP-CNN, DAM-CNN, trans-CNN and APtrans-CNN, respectively. CNN-convolutional auto-encoder architecture with hopping connection comprises four encoding layers and four decoder layers. AP-CNN AP-ReLU is used in CNN coding and decoding layers. Adding a dynamic characteristic aggregation module in each decoding layer of the CNN. Trans-CNN A transform encoder module is added at the bottom of the encoder module of CNN. APtrans-CNN is a preset electrocardiosignal noise reduction processing model based on self attention in the embodiment. 4 noise scenarios were set up to verify the performance of the model under different noise conditions. The experimental results for each model are shown in table 1:
TABLE 1 noise reduction effects on MIT-BIH arrhythmia datasets
It is clear that the method proposed by the present embodiment performs well under these four noise conditions. There is a significant improvement in the performance of CNN networks with AP-ReLU and DAM. SNROut for SNRdB = -4dB, AP-CNN and DAM-CNN are 4.53dB and 4.25dB, respectively. This is because the use of AP-ReLU allows much valuable negative information in the ECG signal to be preserved. The DAM-CNN network enhances the electrocardiosignal feature extraction capability of the model, can capture valuable feature information and eliminate useless noise. Furthermore, trans-CNN has the best performance in high noise environments, which is a self-attention mechanism that benefits from the Transformer, which can learn the more valuable global features well. From another evaluation index MSE, the performances of the three proposed modules are very similar and each has advantages under different noise conditions. When SNRdB = -2dB, 0dB, and 4dB, the MSE of AP-CNN is lowest, 0.057, 0.042, and 0.025, respectively. When SNR is-4 dB, trans-CNN performance is best, MSE is 0.074. Furthermore, as the SNR increases, the difference between the performance of the conventional CNN and the method proposed by the present implementation also becomes larger. Through testing under different noise environments, we also find that the APtrans-CNN proposed in this embodiment can combine the advantages of each module, and can maintain the SNROut above 6dB under noise environments from-4 dB to 4dB, which shows that it can be well adapted to different noise environments. Fig. 5 shows the prediction results of these methods in different noise scenarios, which again verifies that the method proposed in this embodiment performs best.
Noise reduction effect of MIT-BIH atrial fibrillation dataset. Similarly, the denoising performance of the method proposed in this embodiment was verified on the MIT-BIH atrial fibrillation dataset, and the experimental results are shown in table 2.
TABLE 2 noise reduction on MIT-BIH atrial fibrillation datasets
The proposed method of this example also performed well in the MIT-BIH atrial fibrillation database under four noise conditions. The three modules provide great help for improving the noise reduction performance of the CNN, which shows that the network model (APtrans-CNN) can carry out noise reduction processing on different electrocardiosignals. Fig. 6 also shows the prediction results of these methods in different noise scenarios, which fully verifies the noise reduction performance of the method proposed in this embodiment.
Tests on the two data sets prove that the APtrans-CNN does not need any super-parameter tuning, can be applied to different data sets, and can obtain good noise reduction performance only by retraining.
Example 2:
the present embodiment provides an electrocardiosignal noise reduction processing system, as shown in fig. 7, including an obtaining unit, a processing unit, a constructing unit, a training unit, and a noise reduction unit, wherein:
the acquisition unit is used for acquiring initial electrocardiosignals containing noise, acquiring a plurality of real electrocardiosignals from electrocardio detection equipment and acquiring a plurality of electrocardio noise signals in a real scene;
the processing unit is used for preprocessing the initial electrocardiosignals to obtain preprocessed noisy electrocardiosignals and preprocessing the simulated noisy electrocardiosignals in the noisy electrocardiosignal training set to obtain a preprocessed noisy electrocardiosignal training set;
the constructing unit is used for constructing an electrocardiosignal noise reduction processing model based on self attention;
the training unit is used for training the built electrocardiosignal noise reduction processing model based on the self-attention by utilizing the preprocessed noise-containing electrocardiosignal training set, and the training adopts a mean square error loss function to finally obtain the trained electrocardiosignal noise reduction processing model based on the self-attention as a preset electrocardiosignal noise reduction processing model based on the self-attention;
and the noise reduction unit is used for leading the preprocessed noise-containing electrocardiosignals into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain the noise-reduced pure electrocardiosignals.
Further, the system further comprises an editing unit and a using unit, wherein:
the editing unit is used for marking a sample label on the pure electrocardiosignal and then editing the pure electrocardiosignal into a sample set;
and the using unit is used for carrying out training test on the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after the training test.
Example 3:
the present embodiment provides an electrocardiograph signal noise reduction processing apparatus, as shown in fig. 8, in a hardware level, including:
the data interface is used for establishing data butt joint between the processor and external acquisition equipment so as to acquire corresponding electrocardiosignals;
a memory to store instructions;
and the processor is used for reading the instruction stored in the memory and executing the electrocardiosignal noise reduction processing method in the embodiment 1 according to the instruction.
Optionally, the computer device further comprises an internal bus. The processor, the memory, and the data interface may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Flash Memory (Flash Memory), a First In First Out (FIFO), a First In Last Out (FILO), and/or the like. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Example 4:
the present embodiment provides a computer-readable storage medium having stored thereon instructions that, when executed on a computer, cause the computer to execute the electrocardiosignal noise reduction processing method of embodiment 1. The computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, floppy disks, optical disks, hard disks, flash memories, flash disks, and/or Memory sticks (Memory sticks), etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems.
The present embodiment also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the electrocardiosignal noise reduction processing method in embodiment 1. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable system.
Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (9)
1. A method for denoising an electrocardiosignal is characterized by comprising the following steps:
acquiring a noisy initial electrocardiosignal;
preprocessing the initial electrocardiosignal to obtain a preprocessed noisy electrocardiosignal;
leading the preprocessed noise-containing electrocardiosignals into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain noise-reduced pure electrocardiosignals; the electrocardiosignal noise reduction processing model based on self attention comprises a signal coding part and a signal reconstruction part; the signal coding part adopts a convolutional neural network architecture, a ReLU function of self-adaptive parameters is used for replacing an original ReLU activation function in the convolutional neural network architecture, a normalization layer is embedded into each layer of convolutional layer acceleration network, and a self-attention mechanism-based Transformer module is added at the tail end of the convolutional neural network architecture; the signal reconstruction part adopts a transposition convolution architecture, and a dynamic characteristic aggregation module is added after each transposition convolution layer; the signal encoding part and the signal reconstruction part form a jump connection.
2. The method for denoising an ecg signal according to claim 1, further comprising, after obtaining a denoised pure ecg signal:
marking a sample label on the pure electrocardiosignal and then compiling the pure electrocardiosignal into a sample set;
and training and testing the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after training and testing.
3. The method for denoising the cardiac signal according to claim 1, wherein the preprocessing the initial cardiac signal comprises: and (4) carrying out standardization processing on the initial electrocardiosignals by adopting a Z-score standardization method.
4. The method for denoising electrocardiosignals according to claim 1, wherein before introducing the preprocessed noise-containing electrocardiosignals into a preset self-attention-based electrocardiosignal denoising model, the method further comprises:
constructing an electrocardiosignal noise reduction processing model based on self attention;
acquiring a noise-containing electrocardiosignal training set, and preprocessing the simulated noise-containing electrocardiosignals in the noise-containing electrocardiosignal training set to obtain a preprocessed noise-containing electrocardiosignal training set;
training the built electrocardiosignal noise reduction processing model based on self attention by utilizing the preprocessed noisy electrocardiosignal training set, and finally obtaining the trained electrocardiosignal noise reduction processing model based on self attention by adopting a mean square error loss function;
and taking the trained electrocardiosignal noise reduction processing model based on the self-attention as a preset electrocardiosignal noise reduction processing model based on the self-attention.
5. The method according to claim 4, wherein the obtaining of the noisy ECG signal training set comprises: acquiring a plurality of real electrocardiosignals from electrocardio detection equipment, and acquiring a plurality of electrocardio noise signals in a real scene; fusing each real electrocardiosignal and each electrocardio noise signal to obtain a plurality of simulated electrocardiosignals containing noise; and integrating the simulated electrocardiosignals containing noise to obtain a training set of the electrocardiosignals containing noise.
6. The utility model provides an electrocardiosignal noise reduction processing system which characterized in that, includes acquisition unit, processing unit, construction unit, training unit and noise reduction unit, wherein:
the acquisition unit is used for acquiring initial electrocardiosignals containing noise, acquiring a plurality of real electrocardiosignals from electrocardio detection equipment and acquiring a plurality of electrocardio noise signals in a real scene;
the processing unit is used for preprocessing the initial electrocardiosignals to obtain preprocessed noise-containing electrocardiosignals and preprocessing the simulated noise-containing electrocardiosignals in the noise-containing electrocardiosignal training set to obtain a preprocessed noise-containing electrocardiosignal training set;
the construction unit is used for constructing an electrocardiosignal noise reduction processing model based on self attention;
the training unit is used for training the built electrocardiosignal noise reduction processing model based on the self-attention by utilizing the preprocessed noise-containing electrocardiosignal training set, and the training adopts a mean square error loss function to finally obtain the trained electrocardiosignal noise reduction processing model based on the self-attention as a preset electrocardiosignal noise reduction processing model based on the self-attention;
and the noise reduction unit is used for leading the preprocessed noise-containing electrocardiosignals into a preset electrocardiosignal noise reduction processing model based on self-attention, and carrying out noise reduction processing based on a self-attention mechanism to obtain the noise-reduced pure electrocardiosignals.
7. The system for denoising processing of cardiac electrical signals according to claim 6, further comprising an editing unit and a using unit, wherein:
the editing unit is used for marking a sample label on the pure electrocardiosignal and then editing the pure electrocardiosignal into a sample set;
and the using unit is used for carrying out training test on the preset intelligent diagnosis model by using the sample set to obtain the intelligent diagnosis model after the training test.
8. An electrocardiosignal noise reduction processing device, characterized by comprising:
a memory to store instructions;
a processor for reading the instructions stored in the memory and executing the method of any one of claims 1-5 in accordance with the instructions.
9. A computer-readable storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211486665.9A CN115721318A (en) | 2022-11-24 | 2022-11-24 | Electrocardiosignal noise reduction processing method, system, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211486665.9A CN115721318A (en) | 2022-11-24 | 2022-11-24 | Electrocardiosignal noise reduction processing method, system, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115721318A true CN115721318A (en) | 2023-03-03 |
Family
ID=85298214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211486665.9A Pending CN115721318A (en) | 2022-11-24 | 2022-11-24 | Electrocardiosignal noise reduction processing method, system, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115721318A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109222963A (en) * | 2018-11-21 | 2019-01-18 | 燕山大学 | A kind of anomalous ecg method for identifying and classifying based on convolutional neural networks |
CN110974214A (en) * | 2019-12-20 | 2020-04-10 | 华中科技大学 | Automatic electrocardiogram classification method, system and equipment based on deep learning |
CN113509186A (en) * | 2021-06-30 | 2021-10-19 | 重庆理工大学 | ECG classification system and method based on deep convolutional neural network |
CN114141238A (en) * | 2021-11-26 | 2022-03-04 | 中国人民解放军陆军工程大学 | Voice enhancement method fusing Transformer and U-net network |
WO2022047625A1 (en) * | 2020-09-01 | 2022-03-10 | 深圳先进技术研究院 | Image processing method and system, and computer storage medium |
CN114564991A (en) * | 2022-02-28 | 2022-05-31 | 合肥工业大学 | Electroencephalogram signal classification method based on Transformer guide convolution neural network |
CN114847959A (en) * | 2022-03-23 | 2022-08-05 | 武汉大学 | Myocardial infarction positioning system and method in remote cardiac intervention operation |
CN114972836A (en) * | 2022-06-14 | 2022-08-30 | 南京信息工程大学 | Encrypted flow classification method based on multi-module fusion |
US20220292641A1 (en) * | 2021-03-04 | 2022-09-15 | Rensselaer Polytechnic Institute | Dynamic imaging and motion artifact reduction through deep learning |
CN115153581A (en) * | 2022-07-21 | 2022-10-11 | 苏州大学 | Electrocardiosignal characteristic waveform detection method and device and storage medium |
-
2022
- 2022-11-24 CN CN202211486665.9A patent/CN115721318A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109222963A (en) * | 2018-11-21 | 2019-01-18 | 燕山大学 | A kind of anomalous ecg method for identifying and classifying based on convolutional neural networks |
CN110974214A (en) * | 2019-12-20 | 2020-04-10 | 华中科技大学 | Automatic electrocardiogram classification method, system and equipment based on deep learning |
WO2022047625A1 (en) * | 2020-09-01 | 2022-03-10 | 深圳先进技术研究院 | Image processing method and system, and computer storage medium |
US20220292641A1 (en) * | 2021-03-04 | 2022-09-15 | Rensselaer Polytechnic Institute | Dynamic imaging and motion artifact reduction through deep learning |
CN113509186A (en) * | 2021-06-30 | 2021-10-19 | 重庆理工大学 | ECG classification system and method based on deep convolutional neural network |
CN114141238A (en) * | 2021-11-26 | 2022-03-04 | 中国人民解放军陆军工程大学 | Voice enhancement method fusing Transformer and U-net network |
CN114564991A (en) * | 2022-02-28 | 2022-05-31 | 合肥工业大学 | Electroencephalogram signal classification method based on Transformer guide convolution neural network |
CN114847959A (en) * | 2022-03-23 | 2022-08-05 | 武汉大学 | Myocardial infarction positioning system and method in remote cardiac intervention operation |
CN114972836A (en) * | 2022-06-14 | 2022-08-30 | 南京信息工程大学 | Encrypted flow classification method based on multi-module fusion |
CN115153581A (en) * | 2022-07-21 | 2022-10-11 | 苏州大学 | Electrocardiosignal characteristic waveform detection method and device and storage medium |
Non-Patent Citations (2)
Title |
---|
GUAN J , 等: "Low-dimensional Denoising Embedding Transformer for ECG Classification", IEEE, 31 December 2021 (2021-12-31) * |
刘婕,等: "基于心电信号的自注意力双向门控循环网络疲劳检测模型", 中国医学物理学杂志, 25 May 2022 (2022-05-25) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109948647B (en) | Electrocardiogram classification method and system based on depth residual error network | |
CN112043260B (en) | Electrocardiogram classification method based on local mode transformation | |
CN106599903B (en) | Signal reconstruction method for weighted least square dictionary learning based on correlation | |
Fira et al. | ECG compressed sensing based on classification in compressed space and specified dictionaries | |
CN111067507A (en) | Electrocardiosignal denoising method based on generation of countermeasure network and strategy gradient | |
Wang et al. | Denoising auto-encoding priors in undecimated wavelet domain for MR image reconstruction | |
CN116361688A (en) | Multi-mode feature fusion model construction method for automatic classification of electrocardiographic rhythms | |
CN113723171A (en) | Electroencephalogram signal denoising method based on residual error generation countermeasure network | |
CN114299185A (en) | Magnetic resonance image generation method, magnetic resonance image generation device, computer equipment and storage medium | |
CN105338219A (en) | Video image denoising processing method and apparatus | |
CN114663310A (en) | Ultrasonic image denoising method based on multi-attention fusion | |
CN113313682B (en) | No-reference video quality evaluation method based on space-time multi-scale analysis | |
CN114241240A (en) | Method and device for classifying brain images, electronic equipment and storage medium | |
Marwan et al. | Denoising of ECG with single and multiple hidden layer autoencoders | |
CN116942172A (en) | Wavelet double-channel single-lead electrocardiograph denoising method based on coding and decoding structure | |
CN117291850A (en) | Infrared polarized image fusion enhancement method based on learnable low-rank representation | |
CN115721318A (en) | Electrocardiosignal noise reduction processing method, system, equipment and storage medium | |
CN111798531A (en) | Image depth convolution compressed sensing reconstruction method applied to plant monitoring | |
CN116712082A (en) | Electrocardiogram data enhancement method, system, medium, equipment and terminal | |
CN113592972B (en) | Magnetic resonance image reconstruction method and device based on multi-mode aggregation | |
Hua et al. | ECG signals deep compressive sensing framework based on multiscale feature fusion and SE block | |
CN111508525A (en) | Full-reference audio quality evaluation method and device | |
CN112907456A (en) | Deep neural network image denoising method based on global smooth constraint prior model | |
CN115905819B (en) | rPPG signal generation method and device based on generation countermeasure network | |
Yi et al. | Frequency Learning via Multi-Scale Fourier Transformer for MRI Reconstruction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |