CN113180685B - Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold - Google Patents

Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold Download PDF

Info

Publication number
CN113180685B
CN113180685B CN202110638192.9A CN202110638192A CN113180685B CN 113180685 B CN113180685 B CN 113180685B CN 202110638192 A CN202110638192 A CN 202110638192A CN 113180685 B CN113180685 B CN 113180685B
Authority
CN
China
Prior art keywords
electrocardiosignal
filtering
module
signal
wavelet
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.)
Active
Application number
CN202110638192.9A
Other languages
Chinese (zh)
Other versions
CN113180685A (en
Inventor
骆源
李婷
侯旭宏
贾伟平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Publication of CN113180685A publication Critical patent/CN113180685A/en
Application granted granted Critical
Publication of CN113180685B publication Critical patent/CN113180685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7225Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms
    • A61B5/726Details of waveform analysis characterised by using transforms using Wavelet transforms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device

Abstract

The invention provides an electrocardiosignal anomaly based on morphological filtering and wavelet thresholdA frequent discrimination system is characterized by comprising: the data expansion module expands the multi-group lead data to obtain electrocardiosignals s 0 (ii) a The baseline drift processing module uses an improved morphological filtering method to input electrocardiosignals s 0 Filtering twice to obtain baseline drift signal s 2 To s to 2 Giving a weight w, and subtracting the weight w from the original signal to obtain an output signal s; the denoising module filters different scale coefficients after wavelet decomposition by using a method of combining software and hardware thresholds based on the electrocardiosignal s output by the baseline drift processing module, and acquires a signal t for noise filtering through wavelet reconstruction; the judging module shortens the signal length and retains effective information through downsampling based on the electrocardiosignal t output by the denoising module. According to the method, a self-adaptive mechanism is added after two times of filtering are finished, the structural elements are selected and given weight processing is carried out, so that cyclic optimization is carried out, and a final abnormal judgment result is obtained by combining a judgment technology.

Description

Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold
Technical Field
The invention relates to the technical field of medical data intelligent analysis, in particular to an electrocardio abnormality distinguishing system and method based on morphological filtering and wavelet threshold values, and particularly relates to an electrocardio signal processing method and an electrocardio abnormality distinguishing system based on improved morphological filtering and wavelet threshold values.
Background
The positive ions with positive charges inside and outside the myocardial cells and the negative ions with negative charges generate electrode differences due to the movement of the myocardial cells, thereby generating electric signals. By using the principle, the electrocardiosignal can be measured by a machine to generate an electric signal during each heartbeat. The first electrocardiogram was recorded by the Aintoufen in 1903, and various waveforms (P wave, Q wave, R wave, S wave, T wave, U wave) in the electrocardiosignals were defined and named. Wilson completed the recording of unipolar chest leads in 1933, and in 1954, proposed by the American Heart Association, which uses a standard 12-lead electrocardiogram, including chest and limb leads, in a unified manner, which is widely used in current tests.
Most of the research is concentrated on the diagnosis of single-lead and simple arrhythmia based on a standard database MIT-BIH, a European Union ST-T database, an AHA arrhythmia database and the like based on the analysis of electrocardiosignal data based on deep learning. Weijia Lu et al classify normal cardiac rhythm and four types of cardiac arrhythmias based on MIT-BIH malignant ventricular arrhythmia database using convolutional network in combination with an auto-encoder; the wunda team published a study in 2019 using a deep neural network to classify sinus rhythm, noise, and 10 arrhythmias using single lead electrocardiogram data from over 5 million patients. The 12-lead electrocardiosignals can detect some diseases which can not be detected by the single-lead electrocardiosignals, and have great clinical significance.
In traditional clinical practice, 12-lead electrocardiosignals can accurately diagnose complex heart pathological states including atrioventricular block, myocardial ischemia and the like, so that the electrocardiosignals become a main heart activity detection means. However, the 12-lead electrocardiosignal electronization standard data is difficult to obtain, and the professional labeling method is complex, so that the algorithm experiment and innovation cannot be rapidly promoted. In the early stage, the electrocardiosignal algorithm Based on Rule-Based and traditional machine learning is mostly limited to analyzing P waves, Q waves, S waves and T waves, but the electrocardiosignals are difficult to be analyzed as a complete wave group, so that the capacity of processing clinical data is insufficient, and the electrocardiosignal shape analysis still needs professional experience verification of doctors. Here, based on a complete 12 lead cardiac signal data set, more intensive research can be conducted.
With the progress of deep learning methods and the improvement of computer performance, medical image and information analysis methods based on deep learning have made great progress. Wavelet transform is a powerful time-frequency analysis and signal coding tool, and is widely used for analysis of non-stationary signals. It is particularly useful in biological signal processing. The good time-frequency localization property is the most important characteristic of wavelet transformation, and has unique superiority for processing signal data such as time-varying signals. The morphological filtering has the advantage of simple calculation, and has better effect on processing the electrocardio baseline drift. And the deep neural network combined with the attention mechanism is better at capturing local features and has good learning ability.
Through retrieval, patent document CN102973264A discloses an electrocardiographic signal preprocessing method based on morphological multiresolution decomposition, specifically, a method of morphological multiresolution decomposition is used to perform a filtering operation, structural elements of an opening operation and a closing operation are different, an original signal is used to subtract a filtered signal to obtain a processed signal, and then a lifting method is used to construct morphological multiresolution, so as to perform multi-layer decomposition on the signal. However, the existing technology does not combine the learning ability of the deep neural network to distinguish the abnormality of the electrocardiosignal.
Through retrieval, patent document CN103405227A discloses an electrocardiosignal preprocessing method based on double-layer morphological filtering, specifically, an electrocardiosignal processing method is performed by adopting a combination method of morphological filtering and wavelet transformation, a baseline signal is obtained after two filtering operations, and a processed signal is obtained by subtracting the baseline signal from an original signal; selecting triangular structural elements for the first filtering, and selecting linear structural elements for the second filtering; selecting Daubechies5, decomposing the level into 3, processing the coefficient by using a soft threshold mode, and removing noise. Similarly, the existing technology does not combine the learning ability of the deep neural network to discriminate the abnormality of the electrocardiosignal.
Based on the above analysis, research results on extraction and analysis of electrocardiographic signal waveform characteristics and diagnosis of abnormal electrocardiographic signals such as arrhythmia have been abundant, but there are not many researches and analyses for deep mining of characteristic characteristics of electrocardiographic signals of patients based on analysis of 12-lead electrocardiographic signal data. Along with the development of the disease condition of the patient, the electrocardiosignals of the patient can show complex manifestations. The electrocardiosignal characteristic difference between a normal person and a patient with abnormal electrocardiosignals is fully excavated, and a more accurate and perfect electrocardiosignal abnormality distinguishing system for the patient is established, so that the electrocardiosignal abnormality distinguishing system has certain significance.
Therefore, how to solve the problems of noise and baseline drift in the electrocardiosignals and how to improve the discrimination accuracy of the electrocardiosignal abnormality discrimination system and the problem that the difference between 12-lead electrocardiosignal data and single-lead electrocardiosignal data cannot be solved due to insufficient research data aiming at the 12-lead electrocardiosignals in the prior art are all urgently needed to be solved.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an electrocardiosignal abnormality distinguishing system and method based on morphological filtering and wavelet threshold, and provides an analysis system which is based on medical grade 12-lead electrocardiosignal data and 11 measurement values measured by an electrocardiogram machine and can quickly distinguish whether electrocardiosignals are abnormal or not.
The invention provides an electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold, which comprises:
a data expansion module: expanding the multi-group lead data to obtain electrocardio signals s 0
A baseline wander processing module: applying improved morphological filtering method to input electrocardiosignal s 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Weighting w to remove the weighted baseline wander signal ws from the cardiac signal 2 Obtaining an output electrocardiosignal s;
a denoising module: decomposing the electrocardiosignal s by using a wavelet transform method based on the electrocardiosignal s output by the baseline drift processing module, filtering different scale coefficients by using a method combining soft and hard thresholds, and acquiring the electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method;
a judging module: based on the electrocardiosignal t output by the denoising module, downsampling is carried out on the electrocardiosignal, the length of the electrocardiosignal is shortened, effective information is reserved, common tuning is carried out through a plurality of sub-modules, and a final abnormal judgment result is obtained.
Preferably, the data expansion module is used for splicing the data after detecting the first and last R-wave peak positions through waveform detection based on the electrocardiosignal sequence data to obtain longer electrocardiosignal sequence data.
Preferably, the improved morphological filtering method in the baseline shift processing module is a filtering operation of the electrocardiosignal s 0 Performing opening and closing operations simultaneously, and performing arithmetic mean on operation results; specifically, after two times of filtering operation, the morphological filtering based on an error threshold value is self-adaptive to the electrocardiosignal baseline processing.
Preferably, the wavelet thresholding used in the denoising module is specifically: the electrocardiosignal s output by the baseline drift denoising module is decomposed in 6 scales by using a wavelet function Daubechies8, the coefficients in the scales of 1 and 2 are processed by using a soft threshold method, the coefficients in the scales of 3 and 4 are processed by using a hard threshold method, and the coefficients in the scales of 5 and 6 are reserved.
Preferably, the judging module comprises a submodule 1 and a submodule 2, wherein a ResNet network and an attention mechanism are used in the submodule 1 to perform feature extraction on the electrocardiosignal t, and the abnormal judging probability is obtained; in the sub-module 2, 11 measurement data of the electrocardiograph are linearly analyzed, and the abnormality discrimination probability is obtained.
Preferably, when the feature extraction is performed on the electrocardiosignal t in the sub-module 1, two dimensional conversions are performed on the input feature in the attention mechanism.
Preferably, the outputs of sub-modules 1 and 2 are converted by linear and sigmoid functions.
The invention provides an electrocardio abnormality distinguishing method based on morphological filtering and wavelet threshold, which comprises the following steps:
step 1: acquiring a plurality of groups of lead data through an electrocardiograph;
step 2: expansion is carried out on the basis of multiple groups of lead data provided by an electrocardiograph to obtain an electrocardiosignal s 0
And 3, step 3: applying improved morphological filtering method to input electrocardiosignal s 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Giving a weight w, and updating the weight based on the mean square error;
and 4, step 4: removing weighted baseline wander signal ws from cardiac electrical signals 2 Obtaining an output electrocardiosignal s;
and 5: decomposing the electrocardiosignal s by using a wavelet transform method based on the electrocardiosignal s output by the baseline drift processing module, filtering different scale coefficients by using a method combining soft and hard thresholds, and acquiring the electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method;
step 6: based on the electrocardiosignal t output by the denoising module, downsampling is carried out on the electrocardiosignal, the length of the electrocardiosignal is shortened, effective information is reserved, common tuning optimization is carried out through a plurality of sub-modules, and a final abnormal judgment result is obtained.
Compared with the prior art, the invention has the following beneficial effects:
1. in the early-stage electrocardiosignal data preprocessing optimization technology, the morphological filtering method is improved, a self-adaptive mechanism is added after the two times of filtering are finished, and the structural elements are selected and the baseline wandering signal is weighted, namely the filtering degree of the morphological filtering to the baseline wandering is controlled by the weight, so that the cyclic tuning is carried out, and the baseline wandering can be effectively removed and the distortion of the electrocardiosignals can be avoided.
2. The invention processes different scale coefficients after wavelet decomposition of the signals by using a soft and hard threshold combination method, removes noise influence, and better retains important waveform information of the electrocardiosignals while removing noise.
3. Aiming at the problems of unstable electrocardiosignal data and low quality, mainly noise, baseline drift and the like, the electrocardiosignal data preprocessing technology such as wavelet transformation combined with soft and hard threshold processing and improved morphological filtering is adopted, and the electrocardiosignal data can be effectively cleaned, so that a relatively stable electrocardiosignal waveform signal is obtained, and the quality of the electrocardiosignal data is improved.
4. The invention fully utilizes the strong characteristic extraction effect of the deep neural network displayed by the ResNet network in actual classification, combines an attention mechanism for dimension conversion, and solves the problem that an ECG signal is easily influenced by main problems such as noise, baseline drift and the like through early-stage electrocardiosignal data preprocessing, the electrocardiosignal waveform is more stable, and a better prediction effect can be achieved.
5. The ResNet network module analysis parameters are obtained by training based on 12-lead electrocardiosignal data, and 11 electrocardiosignal measurement values are added to carry out model training and abnormality diagnosis together by combining a linear model, so that the parameters are adjusted and optimized together, and the abnormality discrimination capability of the system can be fully improved.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of the non-limiting embodiments of the system for discriminating abnormalities and the module for baseline wander and denoising of cardiac electrical signals with reference to the following drawings:
FIG. 1 is a flow chart of a method for processing an ECG signal based on improved morphological filtering and wavelet threshold in accordance with the present invention;
FIG. 2 is an explanatory diagram of an electrocardiosignal abnormality judging system according to the present invention;
FIG. 3 is a detailed illustration of the baseline wander processing and denoising module for electrocardiosignals in the present invention;
FIG. 4 is a diagram of the residual structure of the determination module in the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will aid those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any manner. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
As shown in fig. 1-4, the present invention aims to provide a system and a method for discriminating an abnormal electrocardiogram based on morphological filtering and wavelet threshold.
The invention provides an electrocardio abnormality distinguishing method based on morphological filtering and wavelet threshold, which comprises the following steps:
step 1: acquiring a plurality of groups of lead data through an electrocardiograph;
step 2: expansion is carried out on the basis of multiple groups of lead data provided by an electrocardiograph to obtain an electrocardiosignal s 0
And step 3: applying improved morphological filtering method to input electrocardiosignal s 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Giving a weight w, and updating the weight based on the mean square error;
and 4, step 4: removing weighted baseline wander signal ws from cardiac electrical signals 2 Obtaining an output electrocardiosignal s;
and 5: decomposing the electrocardiosignal s by using a wavelet transform method based on the electrocardiosignal s output by the baseline drift processing module, filtering different scale coefficients by using a method combining soft and hard thresholds, and acquiring the electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method;
step 6: based on the electrocardiosignal t output by the denoising module, downsampling is carried out on the electrocardiosignal, the length of the electrocardiosignal is shortened, effective information is reserved, common tuning optimization is carried out through a plurality of sub-modules, and a final abnormal judgment result is obtained.
The invention provides an electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold, which is based on an xml file provided by an electrocardiograph, wherein xml is an extensible markup language and can be used for storing and transmitting data, and 12-lead data of an xml central electric signal is recorded as S = S 1 ∪S 2 ∪…∪S 12 ,S i For the data of the ith lead, each patient has electrocardiosignal data of 12 leads. Each lead data is a data sequence of an electrocardiographic waveform, and each integer represents an electrocardiographic voltage value and determines the amplitude of the electrocardiographic waveform. The sampling rate of the data per second is 500 times, namely, one data is acquired every 0.002 second, 10-second electrocardiosignal data are collected by each lead, and 5000 voltage values are obtained in total. For example: s 1 =(x 11 ,x 12 ,…,x 1n ),n=5000.x 1i The voltage values are measured for I leads. Based on electrocardiosignal data, each patient has 11 electrocardio measured values, which are sequentially as follows: heart rate(ii) a An R-R interval; a P-R interval; QRS time limit; the QT interval; QT interval (QTC) correction; an electrocardiographic shaft (deg); r-wave amplitude (RV 5) of V5 lead; r-wave amplitude (RV 6) of the V6 lead; s-wave amplitude (SV 1) of the V1 lead; sum of amplitudes of R wave of V5 lead and S wave of V1 lead (R + S). Is marked as F 1 =(f 11 ,f 12 ,…,f 1n ),n=11。
And remember y i Is the label of the ith user (whether the normal electrocardiosignal exists or not), y i E {0,1}, wherein 1 represents that the electrocardiosignal of the ith patient is an abnormal electrocardiosignal, and 0 represents that the electrocardiosignal of the ith patient is a normal electrocardiosignal.
The data expansion module: after the wave peak positions of the first and the last R waves of each lead data are obtained according to a wave detection method, the data are intercepted, copied for 4 times and spliced to obtain longer electrocardio sequence data s 0 . The waveform detection method used here is to detect the QRS wave of the electrocardiosignal based on a difference threshold algorithm, and obtain the peak position of the first R wave and the peak position of the last R wave.
The method comprises the following steps: based on the electrocardiosignal sequence data, the first and last R wave peak positions of each lead are detected by a waveform detection method, and the data are copied and spliced to obtain longer electrocardiosignal sequence data. As for the I lead data: s 1 =(x 11 ,x 12 ,…,x 1n ) N =5000, and the peak position of the first detected R wave is set as x 1k The last R wave peak position is x 1m The I lead data of the same patient are copied 4 times and spliced to obtain S' 1 =(x 1k ,x 12 ,…,x 1m ,…,x 1k ,x 12 ,…,x 1m ) Taken as S' 1 Is 8000 a.
A baseline wander processing module: for input electrocardio-signals s by using improved morphological filtering method 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Weighting w to remove the weighted baseline wander signal ws from the cardiac signal 2 Resulting in an output signal s.
The method comprises the following steps: the electrocardiosignal generally has a larger baseline drift problem, and a morphological filter is adopted to process the baseline drift problem before the electrocardiosignal data is detected and identified. Morphological operations are mainly the analysis of the structure and shape of the object, dilation, erosion, opening and closing being the basic few morphological operations. When the open operation is carried out, the corrosion operation is firstly carried out, then the expansion operation is carried out, and the close operation is opposite.
Defining the input data sequence as P (n), the structural elements as q (n), and the sets as P 1 = {0,1, \8230;, N-1} and Q 2 A one-dimensional discrete function on {0,1, \8230;, M-1}, where N > M.
The erosion operation of p (n) with respect to q (n) is:
Figure BDA0003106028030000061
the expansion operation of p (n) with respect to q (n) is:
Figure BDA0003106028030000062
the turn-on operation of p (n) with respect to q (n) is:
Figure BDA0003106028030000063
the closing operation of p (n) with respect to q (n) is:
Figure BDA0003106028030000064
the combination of the opening and closing operations and the combination of the opening and closing operations are respectively as follows:
Figure BDA0003106028030000071
here, the baseline wander removal is performed by selecting and averaging a combination of the open/close operation and the close/open operation:
let s 0 (n)=S′ 1 =(x 1k ,x 12 ,…,x 1m ,x 1k ,x 12 ,…,x 1m ) Compared with the elements with the linear or triangular structure, the elements with the semicircular structure have better baseline drift removing effect, and the elements with the semicircular structure are selected
Figure BDA0003106028030000072
Selecting R =0.5, wherein the width of the structural element, namely the number of sampling points, is 20 based on the width of the R wave, and performing a first operation:
Figure BDA0003106028030000073
selecting semicircular structural elements
Figure BDA0003106028030000074
Selecting r =1, here, based on the P-wave and T-wave widths, selecting the width of the structural element, i.e., the number of sampling points, as 75, and performing a second operation:
Figure BDA0003106028030000075
to s 2 (n) giving a weight w to obtain an output signal:
s(n)=s 0 (n)-w*s 2 (n).
taking s (n) as the first 5000 sequence values, and defining the mean square error of electrocardiosignal morphological filtering processing as follows:
Figure BDA0003106028030000076
since the overcorrection baseline drift may cause the distortion of the electrocardiosignals, the morphological filtering adaptive electrocardiosignal baseline processing based on the error threshold value is realized according to the following mode. And setting the mse threshold as M, if mse is greater than M, updating the weight value, and performing morphological filtering again. The specific weight updating method is as follows, mu is the learning rate:
Figure BDA0003106028030000077
a denoising module: based on the electrocardiosignal s output by the baseline drift processing module, decomposing the signal s by using a wavelet transform method, filtering different scale coefficients by using a method combining soft and hard thresholds, and acquiring the electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method.
The method comprises the following steps: wavelet transform is mainly classified into a discrete wavelet transform method and a continuous wavelet transform method. Compared with Fourier transform, the wavelet transform can better represent signals through multi-resolution analysis.
Here we use the discrete wavelet transform method described above: defining the input discrete signal as the signal processed by the morphological filtering method: s [ n ]]=(x 1 ,x 2 ,…x n ) Selecting Daubechies8 wavelet basis functions, and performing 6-scale wavelet decomposition on the noisy electrocardiosignals:
(1) The coefficients on scale 1 and scale 2 are processed using a soft thresholding method:
Figure BDA0003106028030000081
(2) The coefficients on scale 3 and scale 4 are processed using a hard thresholding method:
Figure BDA0003106028030000082
wherein
Figure BDA0003106028030000083
j is the scale, N is the signal length,
Figure BDA0003106028030000084
w j,k is the detail information on the scale j. Here, the coefficients on the scale 5 and the scale 6 are reserved, and the wavelet signal is reconstructed according to the processed wavelet coefficients to obtain dataThe sequence is as follows: t [ n ]]=(x 1 ,x 2 ,…x n ),n=5000。
A judging module: based on the electrocardiosignal t output by the denoising module, firstly, the electrocardiosignal is downsampled, the length of the electrocardiosignal is shortened, and effective information is reserved. The module comprises a submodule 1 and a submodule 2, wherein the submodule 1 uses a ResNet network and an attention mechanism to carry out feature extraction on an electrocardiosignal to obtain an abnormal judgment probability, and the attention mechanism carries out two times of interchange of a second dimension and a third dimension on input features; in the sub-module 2, 11 measurement data of the electrocardiograph are linearly analyzed, and the abnormality discrimination probability is obtained. And carrying out common tuning on the two sub-modules to obtain an abnormal judgment result.
The method comprises the following steps: the ResNet34 network (residual convolution network) model mainly uses a residual learning method to solve the degradation problem, so that the depth, the width and the like of the network can be conveniently adjusted, and the degradation problem is not worried about. The basic idea of the attention mechanism is to focus on more important information, ignoring irrelevant information. Therefore, based on the ResNet neural network and the improved attention mechanism, different weights (attention degrees) are given to each lead data, the degradation problem of the deep neural network can be solved, and the capability of the attention mechanism for capturing connection globally can achieve a better distinguishing effect on the analysis of the electrocardiosignal data. The module analyzes electrocardiosignal 12 lead data based on a ResNet34 network and an attention mechanism, analyzes electrocardiogram machine measurement values based on a linear model, and constructs an electrocardiosignal abnormality distinguishing system.
After baseline drift removal, signal decomposition reconstruction and noise removal are carried out on each lead signal of the electrocardiosignal by a method of improving the combination of morphological filtering and wavelet transformation, each lead data of each patient is processed by the following steps: t [ n ]]=(x 1 ,x 2 ,…x n ) Downsampling is performed by a downsampling factor of 2. The sampled electrocardiosignals are taken down as follows: t [ m ]]=(x 1 ,…,x m ) And m =2500, splicing 12-lead data into two-dimensional data with 12 channels, and inputting the two-dimensional data into a discrimination module. The down-sampling method is used, not only can acquire electrocardiosignal data containing most electrocardiosignal information, but also reduces the length of the data, so that the data can be obtainedThe speed of model training and final diagnosis is improved. Then 11 measured values F of the ECG signal are used 1 =(f 11 ,f 12 ,…,f 1n ) And n =11, constructing a linear classification model, finally splicing the output characteristics of the network and the output characteristics of the linear model together, obtaining an output value through linear conversion again, and obtaining a final judgment result.
The network analysis submodule is as follows:
structural description of the improved network:
TABLE 1 attention mechanism-ResNet detailed network architecture
Figure BDA0003106028030000091
(5) The layers (6), (7) and (8) are all residual structures, the layer (5) residual structure is shown in fig. 3, and 3 indicates that the residual block is repeated 3 times in the network.
Recording the final output characteristic value of the ResNet network as: y is 1 .
The linearity analysis submodule is detailed below:
the input is y 1 And 11 measurements of an electrocardiograph, F 1 =(f 11 ,f 12 ,…,f 1n ),n=11:
Figure BDA0003106028030000092
Obtaining a final diagnosis result based on a sigmoid function:
Figure BDA0003106028030000093
the two sub-modules are jointly optimized in the training process, and finally the electrocardiosignal abnormality distinguishing system with high accuracy is established.
The invention provides an electrocardiosignal processing method based on improved morphological filtering and wavelet threshold, and an improved R combined based on the optimization technologyAn electrocardio abnormality distinguishing system established by an esNet network and a linear model. The system mainly comprises two parts, wherein the early electrocardiosignal data preprocessing part comprises: a data expansion module: expanding each lead data to obtain longer electrocardio sequence data s 0 (ii) a A baseline wander processing module: in the baseline wander removing module, a morphological filtering method is used to give weight to the baseline wander signal, and the weighted value in the filtering operation is dynamically adjusted according to the mean square error (mse) of data before and after processing, so as to process the baseline wander problem; a denoising module: then, a wavelet transform method is used, a Daubechies8 wavelet function is selected, decomposition of 6 scales is carried out on the electrocardiosignals, decomposition coefficients are processed by combining a soft threshold rule and a hard threshold rule, and electrocardio noise is removed. The post-analysis part comprises a discrimination module: down-sampling the data sequence, and shortening the signal length to accelerate the system training and analyzing speed; and 12-lead data of the electrocardiosignals are analyzed based on an improved ResNet network and an attention mechanism, 11 electrocardiograph measurement values are analyzed based on a linear model, and the measurement values are jointly optimized in the training process to obtain optimal distinguishing parameters. The filtering method of the electrocardiosignal abnormality distinguishing system is simple in calculation and adaptive, and can effectively process baseline drift and avoid electrocardiosignal distortion. And based on the preprocessing optimization technology and a later-stage discrimination module, whether the electrocardiosignal is abnormal or not can be accurately and quickly diagnosed.
Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (7)

1. An electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold is characterized by comprising:
the data expansion module: expanding the multiple groups of lead data to obtain electrocardio signals s 0
A baseline wander processing module: applying improved morphological filtering method to input electrocardiosignal s 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Weighting w to remove the weighted baseline wander signal ws from the cardiac signal 2 Obtaining an output electrocardiosignal s;
a denoising module: decomposing a signal s by using a wavelet transform method based on the electrocardiosignal s output by the baseline drift processing module, filtering different scale coefficients by using a method of combining software and hardware thresholds, and acquiring an electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method;
a judging module: based on the electrocardiosignal t output by the denoising module, downsampling the electrocardiosignal, shortening the length of the electrocardiosignal, retaining effective information, and performing common tuning optimization through a plurality of sub-modules to obtain a final abnormal judgment result;
the judging module comprises a submodule 1 and a submodule 2, wherein the submodule 1 uses a ResNet network and an attention mechanism to extract the characteristics of the electrocardiosignal t to obtain an abnormal judging probability; in the sub-module 2, 11 measurement data of the electrocardiograph are linearly analyzed, and the abnormality discrimination probability is obtained.
2. The system according to claim 1, wherein the data expansion module is configured to detect peak positions of the first and last R-waves by waveform based on the electrocardiograph signal sequence data, copy and splice the data, and obtain longer electrocardiograph signal sequence data for signal preprocessing.
3. The system for discriminating cardiac electrical anomalies based on morphological filtering and wavelet threshold as claimed in claim 1, wherein the improved morphological filtering method in the baseline wander processing module is specifically: the primary filtering operation is to carry out opening and closing operations on the input electrocardiosignals at the same time, and carry out arithmetic mean on the operation results; the morphology filtering self-adaptive electrocardiosignal baseline processing method is that after two filtering operations are carried out, the morphology filtering is carried out based on mean square error and threshold.
4. The system for discriminating cardiac electrical abnormality based on morphological filtering and wavelet threshold as claimed in claim 1, wherein the wavelet threshold used in the denoising module is specifically: the electrocardiosignal s output by the baseline drift processing module is decomposed by 6 scales by using a wavelet function Daubechies8, the coefficients on the scales of 1 and 2 are processed by using a soft threshold method, the coefficients on the scales of 3 and 4 are processed by using a hard threshold method, and the coefficients on the scales of 5 and 6 are reserved.
5. The system according to claim 1, wherein in the sub-module 1, when feature extraction is performed on the electrocardiosignal t, two dimension conversions are performed on the input features in the attention mechanism.
6. The system for discriminating cardiac electrical anomalies based on morphological filtering and wavelet thresholding as claimed in claim 1 wherein the outputs of sub-module 1 and sub-module 2 are transformed by linear and sigmoid functions.
7. An electrocardio abnormality distinguishing method based on morphological filtering and wavelet threshold is characterized in that the electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold according to any one of claims 1 to 6 comprises the following steps:
step 1: acquiring multiple groups of lead data through an electrocardiograph;
and 2, step: based on the expansion of multiple groups of lead data provided by the electrocardiograph, the electrocardiosignal s is obtained 0
And step 3: applying improved morphological filtering method to input electrocardiosignal s 0 Filtering twice to obtain baseline drift signal s 2 For baseline wander signal s 2 Giving a weight w, and updating the weight based on the mean square error;
and 4, step 4: removing weighted baseline wander signal ws from cardiac electrical signals 2 Obtaining an output electrocardiosignal s;
and 5: decomposing the electrocardiosignal s by using a wavelet transform method based on the electrocardiosignal s output by the baseline drift processing module, filtering different scale coefficients by using a method combining soft and hard thresholds, and acquiring the electrocardiosignal t with noise filtered by output by using a wavelet reconstruction method;
and 6: based on the electrocardiosignal t output by the denoising module, downsampling is carried out on the electrocardiosignal, the length of the electrocardiosignal is shortened, effective information is reserved, common tuning is carried out through a plurality of sub-modules, and a final abnormal judgment result is obtained.
CN202110638192.9A 2020-12-11 2021-06-08 Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold Active CN113180685B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011443058.5A CN112603325A (en) 2020-12-11 2020-12-11 Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold
CN2020114430585 2020-12-11

Publications (2)

Publication Number Publication Date
CN113180685A CN113180685A (en) 2021-07-30
CN113180685B true CN113180685B (en) 2022-10-18

Family

ID=75232700

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202011443058.5A Pending CN112603325A (en) 2020-12-11 2020-12-11 Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold
CN202110638192.9A Active CN113180685B (en) 2020-12-11 2021-06-08 Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202011443058.5A Pending CN112603325A (en) 2020-12-11 2020-12-11 Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold

Country Status (1)

Country Link
CN (2) CN112603325A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113303809B (en) * 2021-05-27 2022-08-26 河北省科学院应用数学研究所 Method, device, equipment and storage medium for removing baseline drift and high-frequency noise
CN116304777B (en) * 2023-04-12 2023-11-03 中国科学院大学 Self-adaptive electrocardiosignal denoising method and system based on reference signal during rest

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007123923A2 (en) * 2006-04-18 2007-11-01 Susan Mirow Method and apparatus for analysis of psychiatric and physical conditions
CN101658425A (en) * 2009-09-11 2010-03-03 西安电子科技大学 Device and method for detecting attention focusing degree based on analysis of heart rate variability
CN110051325A (en) * 2019-03-29 2019-07-26 重庆邮电大学 Electrocardiosignal integrated filter method based on wavelet transformation and improvement EEMD

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285369B2 (en) * 2007-05-30 2012-10-09 Taipei Veterans General Hospital Method for delineation of characteristic points in an electrocardiogram signal, and storage medium, electronic device and electrocardiogram signal analyzing system for implementing the method
CN102973264B (en) * 2012-12-07 2014-09-17 哈尔滨工业大学深圳研究生院 Electrocardiosignal preprocessing method based on morphological multiresolution decomposition
CN103405227B (en) * 2013-08-02 2015-07-22 重庆邮电大学 Double-layer morphological filter based electrocardiosignal preprocessing method
KR102257300B1 (en) * 2014-09-01 2021-05-27 삼성전자주식회사 Method and apparatus for authenticating user using ecg signal
CN107341769A (en) * 2016-05-03 2017-11-10 中国科学院微电子研究所 A kind of ECG De method and system
CN110251120B (en) * 2019-06-06 2021-03-30 山东省计算中心(国家超级计算济南中心) Electrocardiogram classification method of depth residual error neural network based on attention mechanism
CN110475118A (en) * 2019-07-11 2019-11-19 北京工业大学 A kind of old film flicker removal method based on attention mechanism deep-cycle network
CN110638441A (en) * 2019-08-29 2020-01-03 上海询康数字科技有限公司 Electrocardiogram noise reduction method and device, computer equipment and storage medium
CN111291670B (en) * 2020-01-23 2023-04-07 天津大学 Small target facial expression recognition method based on attention mechanism and network integration
CN111631705A (en) * 2020-05-29 2020-09-08 广州视源电子科技股份有限公司 Electrocardio abnormality detection method, model training method, device, equipment and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007123923A2 (en) * 2006-04-18 2007-11-01 Susan Mirow Method and apparatus for analysis of psychiatric and physical conditions
CN101658425A (en) * 2009-09-11 2010-03-03 西安电子科技大学 Device and method for detecting attention focusing degree based on analysis of heart rate variability
CN110051325A (en) * 2019-03-29 2019-07-26 重庆邮电大学 Electrocardiosignal integrated filter method based on wavelet transformation and improvement EEMD

Also Published As

Publication number Publication date
CN112603325A (en) 2021-04-06
CN113180685A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
Luo et al. Patient-specific deep architectural model for ECG classification
CN108714026B (en) Fine-grained electrocardiosignal classification method based on deep convolutional neural network and online decision fusion
Abibullaev et al. A new QRS detection method using wavelets and artificial neural networks
US20220015711A1 (en) System and method for automated analysis and detection of cardiac arrhythmias from electrocardiograms
Tadejko et al. Mathematical morphology based ECG feature extraction for the purpose of heartbeat classification
He et al. Automatic detection of QRS complexes using dual channels based on U-Net and bidirectional long short-term memory
CN113180685B (en) Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold
CN111920407B (en) Electrocardiogram feature extraction method, system, device and medium based on wavelet transformation
Gawande et al. Heart diseases classification using convolutional neural network
Wu et al. Personalizing a generic ECG heartbeat classification for arrhythmia detection: a deep learning approach
Zidelmal et al. Heartbeat classification using support vector machines (SVMs) with an embedded reject option
Engin et al. Feature measurements of ECG beats based on statistical classifiers
Pucer et al. A topological approach to delineation and arrhythmic beats detection in unprocessed long-term ECG signals
Kar et al. A technical review on statistical feature extraction of ECG signal
Ge et al. ECG-MAKE: An ECG signal delineation approach based on medical attribute knowledge extraction
Wang et al. Automatic diagnosis of ECG disease based on intelligent simulation modeling
Lauder et al. Using dynamic time warping for noise robust ecg r-peak detection
Lopez et al. Classification of arrhythmias using statistical features in the wavelet transform domain
CN115828056A (en) Electrocardiogram characteristic signal extraction method and terminal
Tribhuvanam et al. Analysis and classification of ECG beat based on wavelet decomposition and SVM
Lv et al. Arrhythmia Classification of Merged Features Method Based on SENet and BiLSTM
Lin et al. Fractal QRS-complexes pattern recognition for imperative cardiac arrhythmias
Khandait et al. ECG signal processing using classifier to analyses cardiovascular disease
Pomprapa et al. Deep learning of arrhythmia analysis based on convolutional neural network
Sreedevi et al. ECG Feature Extraction and Parameter Evaluation for Detection of Heart Arrhythmias

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
GR01 Patent grant
GR01 Patent grant