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

文档序号:753104 发布日期:2021-04-06 浏览:8次 中文

阅读说明:本技术 基于形态学滤波和小波阈值的心电异常判别系统及方法 (Electrocardio abnormity discrimination system and method based on morphological filtering and wavelet threshold ) 是由 骆源 李婷 于 2020-12-11 设计创作,主要内容包括:本发明提供了一种基于形态学滤波和小波阈值的心电异常判别系统,其特征在于,包括:数据扩展模块将多组导联数据进行扩展获取心电信号s-0;基线漂移处理模块使用改进的形态学滤波方法对输入的心电信号s-0进行两次滤波得到基线漂移信号s-2,对s-2赋予权重w,与原信号相减得到输出信号s;去噪模块基于基线漂移处理模块输出的心电信号s使用软硬阈值结合的方法过滤小波分解后的不同尺度系数,通过小波重构获取滤除噪声的信号t;判别模块基于去噪模块输出的心电信号t,通过下采样缩短信号长度并保留有效信息。本发明通过在两次滤波结束之后加入自适应机制,通过对结构元素的选择和赋予权重处理,从而进行循环调优,结合判别技术获取最终的异常判别结果。(The invention provides an electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold, which is characterized by comprising the following steps: 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 soft and hard threshold combination method based on the electrocardiosignal s output by the baseline drift processing module, and obtains a signal t for noise filtering through wavelet reconstruction; the judging module shortens the signal length and reserves effective information through downsampling based on the electrocardiosignal t output by the denoising module. The invention adds an adaptive mechanism after the two times of filtering are finished, and selects and weights structural elementsAnd (4) processing, thus performing cyclic tuning, and combining a discrimination technology to obtain a final abnormal discrimination result.)

1. An electrocardio abnormality distinguishing system based on morphological filtering and wavelet threshold is characterized by comprising:

a data expansion module: expanding the multi-group lead data to obtain electrocardio signals s0

A baseline wander processing module: applying improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtain baseline drift signal s2For baseline wander signal s2Weighting w to remove the weighted baseline wander signal ws from the cardiac signal2Obtaining 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 optimization is carried out through a plurality of sub-modules, and a final abnormal judgment result is obtained.

2. The system according to claim 1, wherein the data expansion module is configured to detect the peak positions of the first and last R-waves by waveform based on the sequential data of the electrocardiograph signals, copy and splice the data, and obtain the sequential data of longer electrocardiograph signals 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 method is to perform filtering operation twice and then perform morphological filtering based on mean square error and threshold value to self-adapt electrocardiosignal baseline processing.

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 denoising module is decomposed in 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 electrocardio abnormality discrimination system based on morphological filtering and wavelet threshold according to claim 1, characterized in that the discrimination module comprises a sub-module 1 and a sub-module 2, wherein a ResNet network and an attention mechanism are used in the sub-module 1 to perform feature extraction on the electrocardiosignal t to obtain an abnormality discrimination probability; in the sub-module 2, 11 measurement data of the electrocardiograph are linearly analyzed, and the abnormality discrimination probability is obtained.

6. The system for discriminating cardiac electrical abnormality based on morphological filtering and wavelet threshold as claimed in claim 5, wherein in said sub-module 1, when performing feature extraction on the cardiac electrical signal t, two dimensional transformations are performed on the input features in the attention mechanism.

7. The system for discriminating cardiac electrical anomalies based on morphological filtering and wavelet thresholding as claimed in claim 5 wherein the outputs of sub-module 1 and sub-module 2 are transformed by linear and sigmoid functions.

8. An electrocardio abnormality distinguishing method based on morphological filtering and wavelet threshold 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 s0

And step 3: applying improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtain baseline drift signal s2For baseline wander signal s2Giving 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 signals2Obtaining 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.

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

Positive ions with positive charges inside and outside the cardiomyocytes and negative ions with negative charges generate electrode difference due to the movement of the cardiomyocytes, so that electric signals are generated. 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 the deep learning method and the improvement of the computer performance, the medical image and information analysis method based on the deep learning has a 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 in processing time-varying signal data and the like. 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 search, 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 once, 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 morphological filtering and wavelet transformation combination method, a baseline signal is obtained after two filtering operations, and a processed signal is obtained by subtracting the baseline signal from an original signal; the first filtering selects triangular structural elements, and the second filtering selects linear structural elements; selecting Daubechies5, decomposing the coefficients into 3 levels, processing the coefficients by using a soft threshold mode, and removing noise. Similarly, the prior art 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 normal people and patients with electrocardiosignal abnormality is fully excavated, and a more accurate and perfect electrocardiosignal abnormality distinguishing system for the patients 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 can quickly distinguish whether electrocardiosignals are abnormal or not based on medical 12-lead electrocardiosignal data and 11 measured values measured by an electrocardiograph.

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 s0

A baseline wander processing module: applying improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtain baseline drift signal s2For baseline wander signal s2Weighting w to remove the weighted baseline wander signal ws from the cardiac signal2Obtaining 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 optimization 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 that one filtering operation is a cardiac electrical signal s0Performing opening and closing operations at the same time, and performing arithmetic mean on the operation result; 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 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.

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 s0

And step 3: applying improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtain baseline drift signal s2For baseline wander signal s2Giving 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 signals2Obtaining 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 the actual classification, combines the attention mechanism of dimension conversion, and solves the problem that ECG signals are easily influenced by main problems of noise, baseline drift and the like through the preprocessing of early-stage electrocardio signal data, the waveform of the electrocardio signals 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 determination 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 assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. 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 cardiac electrical condition 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 s0

And step 3: applying improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtain baseline drift signal s2For baseline wander signal s2Giving 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 signals2Obtaining 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 expandable 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 ═ S1∪S2∪…∪S12,SiFor 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 data was sampled 500 times per second, i.e., one data per 0.002 second, with 10 second hearts collected per leadThe electric signal data has 5000 voltage values in total. For example: s1=(x11,x12,…,x1n),n=5000.x1iThe voltage values are measured for I leads. Based on the electrocardiosignal data, each patient has 11 electrocardio measurement values, which are sequentially as follows: heart rate; 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 of V5 lead (RV 5); r-wave amplitude of V6 lead (RV 6); s-wave amplitude of the V1 lead (SV 1); sum of amplitudes of R-wave of V5 lead and S-wave of V1 lead (R + S). Is marked as F1=(f11,f12,…,f1n),n=11。

And remember yiIs the label of the ith user (whether the normal electrocardiosignal exists or not), yiE {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.

A data expansion module: after the first and last R wave peak positions of each lead data are obtained according to a waveform detection method, the data are intercepted, copied for 4 times and spliced to obtain longer electrocardio sequence data s0. 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: s1=(x11,x12,…,x1n) And n is 5000, and the position of the peak of the first R wave is set as x1kThe last R wave peak position is x1mThe I lead data of the same patient are copied 4 times and spliced to obtain S'1=(x1k,x12,…,x1m,…,x1k,x12,…,x1m) Taken as S'1Is 8000 a.

A baseline wander processing module: using improved morphological filtering method to input electrocardiosignal s0Filtering twice to obtainDrift signal to baseline s2For baseline wander signal s2Weighting w to remove the weighted baseline wander signal ws from the cardiac signal2Resulting 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 P10,1, …, N-1 and Q2One-dimensional discrete function on {0,1, …, M-1}, where N > M.

p (n) Corrosion calculations for q (n) are:

p (n) the dilation operation for q (n) is:

p (n) for q (n) the turn-on operation is:

p (n) the close operation for q (n) is:

the combination of the opening and closing operations and the combination of the opening and closing operations are respectively as follows:

here, the baseline wander removal is performed by selecting and averaging a combination of the on/off operation and the on/off operation:

let s0(n)=S′1=(x1k,x12,…,x1m,x1k,x12,…,x1m) Compared with the elements with linear or triangular structures, the elements with semicircular structures have better baseline drift removing effect, and the elements q with semicircular structures are selected1:Selecting R to be 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 the first operation:

selecting semicircular structural elements q2:Selecting r to be 1, wherein the width of the structural element, namely the number of sampling points, is 75 based on the widths of the P wave and the T wave, and performing a second operation:

to s2(n) assigning a weight w to obtain an output signal:

s(n)=s0(n)-w*s2(n).

taking s (n) as the first 5000 sequence values, and defining the mean square error of electrocardiosignal morphological filtering processing as follows:

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 value as M, if mse is larger than M, updating the weight value, and performing morphological filtering again. The specific weight updating method is as follows, mu is the learning rate:

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 ]]=(x1,x2,…xn) 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:

(2) the coefficients on scale 3 and scale 4 are processed using a hard thresholding method:

whereinj is the scale, N is the signal length,wj,kis 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 a data sequence: t [ n ]]=(x1,x2,…xn),n=5000。

A judging module: based on the electrocardiosignal t output by the denoising module, firstly, downsampling is carried out on the electrocardiosignal, 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 perform feature extraction on electrocardiosignals to obtain an abnormal discrimination probability, and the attention mechanism performs 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 optimization 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 better discrimination 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 electrocardiograph measured values based on a linear model, and constructs an electrocardiosignal abnormality discrimination 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 ]]=(x1,x2,…xn) IntoLine down-sampling by a down-sampling factor of 2. The sampled electrocardiosignals are taken down as follows: t [ m ]]=(x1,…,xm) And m is 2500, splicing the 12-lead data into two-dimensional data with 12 channels, and inputting the two-dimensional data into a discrimination module. The downsampling method is used, so that the electrocardiosignal data containing most electrocardiosignal information can be obtained, and meanwhile, the length of the data is reduced, so that the model training and final diagnosis speed is improved. Then 11 measured values F of the cardiac signal are used1=(f11,f12,…,f1n) And n is 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

The seventh layer is a residual structure, the sixth layer is as shown in fig. 3, and the seventh layer is a residual block repeated 3 times in the network.

Recording the final output characteristic value of the ResNet network as: y is1.

The linearity analysis submodule is detailed below:

the input is y1And 11 measurements of an electrocardiograph, F1=(f11,f12,…,f1n),n=11:

Obtaining a final diagnosis result based on a sigmoid function:

the two sub-modules are jointly optimized in the training process, and finally, an 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 electrocardio abnormality distinguishing system based on the optimization technology and established by combining an improved ResNet 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 s0(ii) a A baseline wander processing module: in the baseline drift removal module, a morphological filtering method is used to give weight to a baseline drift signal, and the weighted value in filtering operation is dynamically adjusted according to the mean square error (mse) of data before and after processing to process the baseline drift problem; a denoising module: then, a wavelet transform method is used, a Daubechies8 wavelet function is selected, decomposition of the electrocardiosignal is carried out in 6 scales, decomposition coefficients are processed by combining soft threshold and hard threshold rules, 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 analyzing 12-lead data of the electrocardiosignals based on an improved ResNet network and an attention mechanism, analyzing 11 electrocardiograph measured values based on a linear model, and performing joint optimization in the training process to obtain optimal discrimination 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.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于NB-IOT技术的失能老人监护系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!