Wearable dynamic electrocardiosignal classification method and system

文档序号:396652 发布日期:2021-12-17 浏览:4次 中文

阅读说明:本技术 穿戴式动态心电信号分类方法及系统 (Wearable dynamic electrocardiosignal classification method and system ) 是由 刘飞飞 任咏莲 夏省祥 张伟伟 徐政 艾森 王子宇 于 2021-10-26 设计创作,主要内容包括:本发明提供一种穿戴式动态心电信号分类方法及系统,属于心电信号分析技术领域,获取待分类的原始心电信号;利用预先构建的小波散射网络提取待分类的心电信号的小波散射系数,利用小波散射系数计算散射特征矩阵,并转化为散射特征图;利用预先训练好的分类模型对散射特征图进行处理,得到心电信号的分类结果。本发明将穿戴式动态信号分为三类,构建了信号分类数据库;提出了导联脱落和纯噪声的判断准则,降低了计算成本;利用Gabor小波函数和尺度算子搭建了小波散射网络,利用小波散射网络对三类信号提取小波散射系数,构建散射特征矩阵,利用机器学习方法LSTM提取散射矩阵特征并进行分类,实现了穿戴式动态心电信号的自动精准分类。(The invention provides a wearable dynamic electrocardiosignal classification method and a wearable dynamic electrocardiosignal classification system, which belong to the technical field of electrocardiosignal analysis and are used for acquiring original electrocardiosignals to be classified; extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram; and processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals. The wearable dynamic signals are divided into three types, and a signal classification database is constructed; the judgment criterion of lead falling and pure noise is provided, and the calculation cost is reduced; a wavelet scattering network is built by utilizing a Gabor wavelet function and a scale operator, wavelet scattering coefficients are extracted from three types of signals by utilizing the wavelet scattering network, a scattering characteristic matrix is constructed, scattering matrix characteristics are extracted and classified by utilizing a machine learning method LSTM, and automatic and accurate classification of the wearable dynamic electrocardiosignals is realized.)

1. A wearable dynamic electrocardiosignal classification method is characterized by comprising the following steps:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

2. The wearable dynamic electrocardiograph signal classification method according to claim 1, wherein a three-layer wavelet scattering network is constructed based on a scale function and a wavelet function, and a 0-order scattering coefficient, a 1-order scattering coefficient and a 2-order scattering coefficient are generated.

3. The wearable dynamic electrocardiosignal classification method according to claim 2, wherein the electrocardiosignals to be classified are convolved with a scale function to obtain 0-order wavelet scattering coefficients; convolving the electrocardiosignals to be classified with a first-order wavelet function, and generating a first-order scattering propagation operator through nonlinear modular operation; convolving the first-order scattering propagation operator with a scale function to obtain a first-order wavelet scattering coefficient; the first-order scattering propagation operator is convoluted with a second-order wavelet function, and a second-order scattering propagation operator is generated through nonlinear modular operation; and (4) convolving the second-order scattering propagation operator with the scale function to obtain a second-order wavelet scattering coefficient.

4. The wearable dynamic classification method for electrocardiographic signals according to claim 2, wherein the maximum scale factor, i.e. the time support, of which the scale function maintains the translation invariance is determined based on the length and sampling frequency of the signals.

5. The wearable dynamic electrocardiographic signal classification method according to claim 1, wherein the basic network for training the classification model is a long-short term memory neural network.

6. The wearable dynamic classification method for electrocardiosignals according to claim 1, wherein the training set is from a quality assessment database, the quality assessment database comprises a plurality of electrocardiosignals which are manually marked, and the categories of the electrocardiosignals comprise clean signals which can be used for disease detection and diagnosis, slightly polluted signals which can be used for heart rate extraction, and severely polluted signals which need to be eliminated.

7. The wearable dynamic electrocardiographic signal classification method according to claim 6 wherein all data in the quality assessment database is first preprocessed, comprising: data normalization processing, lead drop judgment and pure noise judgment.

8. The utility model provides a wearing formula developments electrocardiosignal classification system which characterized in that includes:

the acquisition module is used for acquiring original electrocardiosignals to be classified;

the extraction module is used for extracting a wavelet scattering coefficient of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficient and converting the scattering characteristic matrix into a scattering characteristic diagram;

the classification module is used for processing the scattering characteristic diagram by utilizing a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

9. A non-transitory computer-readable storage medium storing computer instructions which, when executed by a processor, implement the wearable dynamic cardiac signal classification method of any one of claims 1-7.

10. An electronic device, comprising: a processor, a memory, and a computer program; wherein a processor is connected to the memory, a computer program is stored in the memory, and when the electronic device runs, the processor executes the computer program stored in the memory to make the electronic device execute the instructions for implementing the wearable dynamic classification method for electrocardiographic signals according to any one of claims 1-7.

Technical Field

The invention relates to the technical field of electrocardiosignal analysis, in particular to a wearable dynamic electrocardiosignal classification method and system.

Background

For early prevention and continuous monitoring of cardiovascular diseases, in-vivo and in-vitro noise and motion artifacts in different motion states are varied under a dynamic long-time monitoring environment, signal noise is serious, the type and degree of noise are unpredictable, the wearable signal quality is complex, changeable and difficult to control, and the wearable signal is easily interfered by body movement, environmental noise, electromagnetism and the like, so that the signal quality is reduced, and false alarm is generated. Redundant information and high false alarm rate in mass data not only lead to medical resource waste, but also cause the relaxation of doctors and even misdiagnosis. Therefore, the dynamic physiological data must be firstly subjected to quality evaluation and divided into unavailable signals and available signals for clinical use, so that the aims of removing coarse and remaining essence and removing false and true can be achieved, and the efficiency and the diagnosis quality are improved.

At present, quality evaluation of electrocardiosignal is mainly based on extraction of quality evaluation indexes, and the quality evaluation index extraction mainly relates to time domain, frequency domain, nonlinear domain, space morphological information and the like. The frequency domain measurement proposed by the Murray topic group at the university of Newcastle, Langley et al uses 6 waveform characteristics of straight line, baseline elevation, baseline drift, too low amplitude, too high amplitude, kurtosis and the like to perform quality evaluation, and Zausneder et al proposes 35 frequency domain indexes in combination with a power spectrum. In practical application, various threshold parameters are usually difficult to reasonably set by the methods, so that the generalization capability is weak when the methods are applied to different scenes and different leads.

Aiming at the processing of electrocardiosignals, the wavelet transformation can effectively analyze nonstationary electrocardiosignals by utilizing the time-frequency domain accurate positioning characteristic, but cannot keep the stability of scale transformation.

Disclosure of Invention

The invention aims to provide a wearable dynamic electrocardiosignal classification method and system based on a wavelet scattering network, so as to solve at least one technical problem in the background technology.

In order to achieve the purpose, the invention adopts the following technical scheme:

in one aspect, the invention provides a wearable dynamic electrocardiosignal classification method, which comprises the following steps:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

Preferably, a three-layer wavelet scattering network is constructed based on the scale function and the wavelet function, and a 0-order scattering coefficient, a 1-order scattering coefficient and a 2-order scattering coefficient are generated.

Preferably, the electrocardiosignals to be classified are convoluted with a scale function to obtain 0-order wavelet scattering coefficients; convolving the electrocardiosignals to be classified with a first-order wavelet function, and generating a first-order scattering propagation operator through nonlinear modular operation; convolving the first-order scattering propagation operator with a scale function to obtain a first-order wavelet scattering coefficient; the first-order scattering propagation operator is convoluted with a second-order wavelet function, and a second-order scattering propagation operator is generated through nonlinear modular operation; and (4) convolving the second-order scattering propagation operator with the scale function to obtain a second-order wavelet scattering coefficient.

Preferably, the maximum scale factor, i.e. the time support, for which the scale function maintains the translation invariance is determined based on the length of the signal and the sampling frequency.

Preferably, the basic network for training the classification model is a long-term and short-term memory neural network.

Preferably, the training set is from a quality evaluation database, the quality evaluation database includes a plurality of electrocardiosignals which are manually labeled, wherein the categories of the electrocardiosignals include clean signals which can be used for disease detection and diagnosis, slightly polluted signals which can be used for heart rate extraction, and severely polluted signals which need to be removed.

Preferably, all data in the quality assessment database is first preprocessed, including: data normalization processing, lead drop judgment and pure noise judgment.

In a second aspect, the present invention provides a wearable dynamic electrocardiographic signal classification system, comprising:

the acquisition module is used for acquiring original electrocardiosignals to be classified;

the extraction module is used for extracting a wavelet scattering coefficient of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficient and converting the scattering characteristic matrix into a scattering characteristic diagram;

the classification module is used for processing the scattering characteristic diagram by utilizing a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

In a third aspect, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions which, when executed by a processor, implement the wearable dynamic cardiac signal classification method as described above.

In a fourth aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program; wherein, the processor is connected with the memory, the computer program is stored in the memory, and when the electronic device runs, the processor executes the computer program stored in the memory, so as to make the electronic device execute the instructions for implementing the wearable dynamic electrocardiosignal classification method.

The invention has the beneficial effects that:

the wearable dynamic signals are classified into three categories: the method comprises the following steps of (1) a cleaner signal which can be used for disease detection and diagnosis, a slightly polluted signal which can be only used for heart rate extraction, and a signal which is seriously polluted by noise and needs to be eliminated; constructing a wavelet scattering network by using a Gabor wavelet function and a scale operator, extracting a wavelet scattering coefficient by using the wavelet scattering network, and constructing a scattering characteristic matrix by using the scattering coefficient; the judgment criteria of lead falling and pure noise are provided, and the calculation cost is greatly reduced; the scattering feature matrix is extracted from the three types of signals by using wavelet scattering, and the features of the scattering matrix are extracted and classified by using a machine learning method LSTM, so that automatic and accurate classification of the wearable dynamic electrocardiosignals is realized.

Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a flowchart of a method for classifying wearable dynamic electrocardiograph signals based on a wavelet scattering network according to an embodiment of the present invention.

Fig. 2 is a schematic diagram of an original electrocardiographic signal and an electrocardiographic signal after noise is added according to an embodiment of the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below by way of the drawings are illustrative only and are not to be construed as limiting the invention.

It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.

For the purpose of facilitating an understanding of the present invention, the present invention will be further explained by way of specific embodiments with reference to the accompanying drawings, which are not intended to limit the present invention.

It should be understood by those skilled in the art that the drawings are merely schematic representations of embodiments and that the elements shown in the drawings are not necessarily required to practice the invention.

Example 1

The wavelet scattering network with the deep convolutional network is constructed by utilizing nonlinear modular operation and scale operator cascade wavelet transformation, the wavelet scattering transformation has very high resolution in a time-frequency domain, has calculation translation invariance, can keep higher stability on deformation, and can keep high-frequency information. In addition, the wavelet scattering network has the characteristics of a deep learning framework when extracting data features: multi-scale shrinkage, level symmetry linearization and coefficient characterization. The wavelet scattering network keeps the advantages of the traditional method, simultaneously integrates the characteristics of a deep learning network, and has higher characteristics in the fields of pattern recognition, audio analysis, signal processing and the like. Therefore, the wavelet scattering network has great advantages for the electrocardio-quality evaluation work mixed with various complex noises.

Therefore, this embodiment 1 provides a wearable dynamic electrocardiograph signal classification system and method based on a wavelet scattering network.

First, the wearable dynamic electrocardiographic signal classification system provided in this embodiment 1 includes:

the acquisition module is used for acquiring original electrocardiosignals to be classified;

the extraction module is used for extracting a wavelet scattering coefficient of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficient and converting the scattering characteristic matrix into a scattering characteristic diagram;

the classification module is used for processing the scattering characteristic diagram by utilizing a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

The wearable dynamic electrocardiosignal classification system is utilized to realize the wearable dynamic electrocardiosignal classification method, and comprises the following steps:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

In this embodiment 1, a three-layer wavelet scattering network is constructed based on a scale function and a wavelet function, and a 0-order scattering coefficient, a 1-order scattering coefficient, and a 2-order scattering coefficient are generated.

Specifically, the electrocardiosignals to be classified are convolved with a scale function to obtain a 0-order wavelet scattering coefficient; convolving the electrocardiosignals to be classified with a first-order wavelet function, and generating a first-order scattering propagation operator through nonlinear modular operation; convolving the first-order scattering propagation operator with a scale function to obtain a first-order wavelet scattering coefficient; the first-order scattering propagation operator is convoluted with a second-order wavelet function, and a second-order scattering propagation operator is generated through nonlinear modular operation; and (4) convolving the second-order scattering propagation operator with the scale function to obtain a second-order wavelet scattering coefficient.

When a wavelet scattering network is constructed, the maximum scale factor of a scale function for keeping translation invariance, namely time support, is determined based on the length and sampling frequency of a signal.

In this embodiment 1, the basic network used for training the classification model is a long-term and short-term memory neural network.

The training set is from a quality evaluation database, the quality evaluation database comprises a plurality of electrocardiosignals which are manually marked, and the categories of the electrocardiosignals comprise clean signals which can be used for disease detection and diagnosis, light pollution signals which can be used for heart rate extraction and serious noise pollution signals which need to be eliminated. The long-term dynamic wearable dynamic electrocardiosignals are divided by a 10s sliding window, and the problem of data imbalance is solved by adding noise.

All data in the quality assessment database are first preprocessed, including: data normalization processing, lead drop judgment and pure noise judgment.

Judging whether the leads fall off or not by the segmented 10s signals, if the leads fall off, directly removing the leads, and ending the procedure, so that the calculation cost can be saved; and then, judging pure Gaussian noise, and if the pure Gaussian noise is a pure Gaussian noise signal, directly eliminating the pure Gaussian noise signal, ending the program, and saving the calculation cost.

Example 2

Due to body movement, environmental noise, electromagnetic interference and the like, the quality of the wearable dynamic electrocardiosignal is complex and changeable and is difficult to control, great interference is brought to diagnosis of doctors, how to evaluate the quality of the wearable electrocardiosignal, remove coarse and residual sperms and remove false and true truth is a key problem to be solved urgently for improving the early detection and diagnosis efficiency of the cardiovascular system. In embodiment 2 of the present invention, a method for classifying wearable dynamic electrocardiographic signals is provided, which fully utilizes the advantages of a wavelet scattering network, extracts scattering characteristics of wearable dynamic electrocardiographic signals, constructs a scattering characteristic matrix, classifies the signals by using a Long Short-Term Memory network (LSTM), kicks out signals with serious noise pollution based on classification results, and divides retained signals into slightly polluted signals only used for heart rate extraction and clean signals used for disease classification, thereby providing more powerful data for real-time accurate detection of cardiovascular diseases.

In the method for classifying wearable dynamic electrocardiograph signals described in this embodiment 2, a database of clean signals, slightly-polluted signals, and severely-polluted signals needs to be established, and a suitable wavelet scattering network needs to be established, so that scattering characteristic matrix characteristics of various types of data in the database are accurately obtained, and meanwhile, evaluation indexes of quality classification effects of the three types of data need to be determined, and classification effects of models need to be evaluated.

In this embodiment 2, a wavelet scattering network including 41 1-order wavelet functions and 7 2-order wavelet functions is built by using a Gabor wavelet function and a scale operator, wavelet scattering coefficients of 0 order, 1 order and 2 order are extracted by using the wavelet scattering network, an 81 × 20-dimensional scattering feature matrix is constructed by using the scattering coefficients, finally, features in a scattering feature map are extracted and classified by using a deep learning LSTM method, wearable dynamic signals are classified into three categories, one category is a serious noise pollution signal to be removed, the other category is a mild pollution signal which can be used for heart rate extraction, and the other category is a cleaner signal which can be used for disease detection and diagnosis.

The wavelet scattering has the characteristics of translational invariance, characteristic stability, information richness and the like, and the characteristics enable the wavelet scattering to have higher discriminative performance on the deformation of the wearable dynamic electrocardiosignal. In this embodiment 2, constructing a three-layer wavelet scattering network mainly includes the following steps:

selecting a scale function phi with time support of I (Invariance scale)IAnd the Morlet wavelet function psi constructs a three-layer wavelet scattering network, generating 0, 1 and 2 order scattering coefficients, which can cover the whole frequency domain range of the signal. The network construction steps are as follows:

(1) x (t) represents the ECG signal to be analyzed, X (t) and the scale function phiIConvolution is carried out to obtain 0-order wavelet scattering coefficient S0:S0X(t)=X(t)*φI

(2) Electrocardiosignal X (t) and first order wavelet functionConvolution and generating a first-order scattering propagation operator through nonlinear modulo operation

(3) Convolution of first-order propagation operator and scale function to obtain first-order wavelet scattering coefficient S1

(4) First order scatter propagation operatorAnd second order wavelet functionConvolution and generating second-order scattering propagation operator through nonlinear module operation

(5) Convolution of second-order scattering propagation operator and scale function to obtain second-order wavelet scattering coefficient S2

In order to realize accurate classification of three types of quality data, in this embodiment 2, a database is constructed, and data in the database is preprocessed: the long-term dynamic wearable dynamic electrocardiosignals are divided by a 10s sliding window, and the problem of data imbalance is solved by adding noise. Judging whether the leads fall off or not by the segmented 10s signals, if the leads fall off, directly removing the leads, and ending the procedure, so that the calculation cost can be saved; and then, judging pure Gaussian noise, and if the pure Gaussian noise is a pure Gaussian noise signal, directly eliminating the pure Gaussian noise signal, ending the program, and saving the calculation cost.

And calculating a wavelet scattering characteristic matrix through a three-layer wavelet scattering network constructed by inputting the two judged signals. Firstly, the time support I of a scale function, namely the maximum scale factor keeping the translation invariance, needs to be determined, a proper value I is determined based on the length of a signal and the sampling frequency Fs, and experiments prove that the value of I is generally 2-10 Fs. And calculating scattering coefficients of 0 order, 1 order and 2 orders, extracting the scattering coefficients of the three-layer wavelet network to construct a scattering characteristic matrix, and converting the scattering characteristic matrix into a scattering characteristic diagram.

And inputting the scattering characteristic matrix extracted by the training data wavelet scattering network into a long-term and short-term memory neural network (LSTM), and determining parameters such as a proper gradient threshold, a maximum round number, a small batch number and the like by using an Adam algorithm through a solver. The dimensionality of the sequence input layer is 81 multiplied by 20, a hidden node is appointed through the bidirectional LSTM layer, the last classification value is output, then the full connection layer is entered, the output class is indicated, the softmax layer is followed, the probability of each class classification is output, and finally the final classification result is output through the classification layer.

In this embodiment 2, the wearable dynamic electrocardiographic quality evaluation method based on the wavelet scattering network divides wearable dynamic signals into A, B, C types, where a type is a relatively clean signal that can be used for disease detection and diagnosis, B type is a slightly contaminated signal that can only be used for heart rate extraction, and C type is a signal that needs to be rejected due to serious noise contamination. The method comprises the steps of constructing 0-order, 1-order and 2-order wavelet scattering networks by utilizing a Gabor wavelet function and a scale operator, extracting 3-layer wavelet scattering coefficients by utilizing the wavelet scattering networks, constructing a scattering characteristic matrix by utilizing the scattering coefficients, and finally extracting and classifying the characteristics of the scattering matrix by utilizing a deep learning LSTM method.

Most of the current research on wearable dynamic electrocardiogram quality assessment divides the data quality grade into two types, in this embodiment 2, the signals are classified into three types, and a quality assessment database is constructed, wherein the database has 31111 pieces of 10s signals, 11709 pieces of clean signals, 7860 pieces of light pollution signals and 11542 pieces of serious pollution signals. The judgment criterion of lead falling and pure noise greatly reduces the calculation cost. A scatter characteristic matrix is extracted from A, B, C three types of signals by using a sharp tool for analyzing wavelet scattering signals, and then the characteristics of the scatter matrix are extracted and classified by using a machine learning method LSTM, so that the automatic classification of the wearable dynamic electrocardiogram data is realized. 31111 data in the existing database are trained and tested, and the accuracy is about 95%.

Example 3

In this embodiment 3, a method for classifying dynamic electrocardiographic signals acquired by a wearable device based on a wavelet scattering network is provided, as shown in fig. 1, the main steps are divided into four steps. Firstly, constructing a wearable dynamic electrocardio quality evaluation database, dividing a long-time dynamic electrocardio into signals with the length of 10s according to information labeled by an expert, and determining a label of each signal; secondly, preprocessing the data, namely firstly performing standardization processing, and then removing signals falling off from leads and pure Gaussian noise signals for reducing the calculation cost; inputting the rest signals into the constructed wavelet scattering network to generate a scattering characteristic matrix; and fourthly, training the LSTM network by using 70% of data in the database as training data, and testing the classification effect of the model by using 30% of data as test data.

In this embodiment 3, constructing the wearable dynamic electrocardiographic quality assessment database includes:

the length of each group of data of the existing wearable dynamic electrocardiosignal 18 groups is about 24 hours, the data come from 15 testers (6 men and 9 women), the age distribution is 21-83 years old, the wearable electrocardiosignal is recorded by the wearable electrocardiosignal equipment under the daily living environment of the testers, and the sampling frequency of the electrocardiosignal is 1000 Hz. In order to reduce the calculation cost, in this embodiment, the down-sampling frequency of the signal is 250Hz, the long-time dynamic signal is divided into signals with the length of 10s according to the quality marking information marked by the expert, as shown in table 1, and the quality label of each signal is determined. Signal quality classes are divided into three categories: class a is a cleaner signal 11709 panel that can be used for disease detection and diagnosis, class B is a mildly contaminated signal 7860 panel that can be extracted from heart rate, and class C is a severely contaminated signal 2687 panel that needs to be rejected.

Since the noise data amount is small, the class B signals are randomly divided into 6 groups, six kinds of noise (limit deviation 2 group, myoelectric noise 2 group, electrode movement noise 2 group) are added, 1000 pieces of data are randomly selected from the class a data, gaussian noise is added, and the noise-added data and the original 2687 pieces of noise data together form 11542 pieces of noise data. 31111 data of three types constitute a signal quality evaluation database, as shown in FIG. 2, N1-N6 are 6 signals from B type light pollution, M1-6 are C type serious pollution signals formed by adding 6 types of noise to the 6 signals, N7 is a clean signal from A type, and M7 is a serious pollution signal formed by adding Gaussian noise to the signals.

TABLE 1 database three types of signals

All data in the quality assessment database are preprocessed firstly, and the data preprocessing stage is divided into three parts. Contract a set of ECG signals S ═ S1,s2,...,sn-1,snA total of n samples, the first difference of the signal diff(s) ═ s2-s1,s3-s2,...,sn-sn-1}。

And (3) data standardization treatment:

in order to eliminate the influence between different kinds of noise, firstly, data standardization processing is needed, and the original data is mapped between [0-1] by a min-max standardization method through linear transformation, and the formula is as follows:

judging lead falling:

and (4) judging lead falling by the normalized 10s signal, and if the lead falling signal is directly eliminated, ending the program, so that the calculation cost can be saved. For a signal that is considered to be a lead-off signal if the number of samples with equal amplitudes of two adjacent samples is greater than 60% of the total number of samples, the calculation formula is as follows:

for sample si

And (3) judging pure noise:

and thirdly, judging pure noise, and if the pure noise signals are directly eliminated, ending the program to save the calculation cost. Based on the electrocardiosignal frequency spectrum range of 0-40Hz, if the ratio of the power spectrum energy of the signal in the range of 0-40Hz to the total energy is less than 30%, the main component of the signal is not the electrocardiosignal, belongs to a noise signal and can be directly discarded. The calculation formula is as follows:

in this embodiment 3, constructing a wavelet scattering network to calculate a wavelet scattering feature matrix includes:

and calculating a wavelet scattering characteristic matrix through a three-layer wavelet scattering network constructed by inputting the two judged signals. Firstly, the time support degree I of a scale function, namely the maximum scale factor keeping the translation invariance, needs to be determined, a proper value I is determined based on the length of a signal and the sampling frequency Fs, and experiments prove that the value of I is generally 2-10 Fs. And calculating scattering coefficients of 0 order, 1 order and 2 orders, and extracting the scattering coefficients of the three-layer wavelet network to construct a scattering characteristic matrix. The network construction steps are as follows:

(1) x (t) represents the ECG signal to be analyzed, X (t) and the scale function phiIConvolution is carried out to obtain 0-order wavelet scattering coefficient S0:S0X(t)=X(t)*φI

(2) Electrocardiosignal X (t) and first order wavelet functionConvolution and generating a first-order scattering propagation operator through nonlinear modulo operation

(3) Convolution of first-order propagation operator and scale function to obtain first-order wavelet scattering coefficient S1

(4) First order scatter propagation operatorAnd second order wavelet functionConvolution and generating second-order scattering propagation operator through nonlinear module operation

(5) Convolution of second-order scattering propagation operator and scale function to obtain second-order wavelet scattering coefficient S2

In this embodiment 3, establishing a classification model using a machine learning long-short term memory network LSTM includes:

and inputting the scattering characteristic matrix extracted by the training data wavelet scattering network into an LSTM, and determining parameters such as a proper gradient threshold value, a maximum round number, a small batch number and the like by adopting an Adam algorithm through a solver. The dimensionality of the sequence input layer is 81 multiplied by 20, a hidden node is appointed through the bidirectional LSTM layer, the last classification value is output, then the full connection layer is entered, the output class is indicated, the softmax layer is followed, the probability of each class classification is output, and finally the final classification result is output through the classification layer.

In this example 3, the total number of databases is 31111, 70% of the data are randomly selected as training data, and the remaining 30% are used as test data. The parameters set for the training process are as follows, Adam is used as a solver, maxEpoch is 1000, minBatchsize is 1000, initialelength is 0.001, and the execution environment is a single GPU.

Table 2 gives the confusion matrix of the test results. The test training set consisted of 9333 sets of data, with class A data being 3513, class B data being 2352, and class C data being 3495.

In this example 3, the evaluation indexes used include sensitivity (Se), Precision (+ P), and the comprehensive index F of Precision and sensitivity balance of three quality levels1Measuring: f1A,F1B,F1CAnd accuracy (acc).

Sensitivity Se: the proportion of the sample of a certain class which is truly predicted to be correct to the total number of the samples of the certain class in the training set is as follows, taking the sample of the class A as an example:

precision + P: the proportion of the samples of the certain type which are truly predicted to be correct accounts for the total number of the samples of the certain type which are predicted in the training set. Taking class a samples as an example:

TABLE 2

Accuracy and sensitivity balance comprehensive index F1Measuring:

wherein TNA、TNB、TNCNumber of groups, N, accurately predicted as signals of type A, B, C, respectivelyA、NB、NCNumber of groups predicted as A, B, C class signals in training set, TA、TB、TCThe number of groups of A, B, C-type signals in the training set.

The accuracy rate represents the proportion of all the class samples which are actually predicted to be correct to the total number of all the samples in the training set, and the calculation formula is as follows:

finally, the classification results of the three quality class signals are shown in table 3.

TABLE 3

In summary, in this embodiment 3, the wearable electrocardiographic signal classification method constructs a wearable dynamic electrocardiographic quality assessment database including three quality levels; determining the judgment standard of lead falling and pure noise signals; a three-layer wavelet scattering network suitable for extracting the wearable dynamic electrocardio-scattering matrix is constructed; determining a reasonable scattering path suitable for extracting three types of quality grade electrocardiosignal characteristics; determining an evaluation index suitable for the classification effect of the electrocardiosignals with three quality grades; finally, the characteristics of the dynamic electrocardio-scattering matrix with A, B, C three quality levels are extracted by using a machine learning method LSTM, three classifications of the quality of the wearable dynamic electrocardio-data are realized, and the classification accuracy rate reaches 95.44%. And removing data with serious pollution, and screening clean signals suitable for disease diagnosis, so that the diagnosis time is saved for doctors.

Example 4

Embodiment 4 of the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions, and when the computer instructions are executed by a processor, the method for wearable dynamic classification of electrocardiographic signals as described above is implemented, where the method includes:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

Example 5

An embodiment 5 of the present invention provides a computer program (product) comprising a computer program, which when run on one or more processors, is configured to implement the wearable dynamic electrocardiographic signal classification method as described above, the method comprising:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

Example 6

An embodiment 6 of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein, a processor is connected with the memory, the computer program is stored in the memory, when the electronic device runs, the processor executes the computer program stored in the memory, so as to make the electronic device execute the instructions for implementing the wearable dynamic electrocardiosignal classification method, the method comprises:

acquiring original electrocardiosignals to be classified;

extracting wavelet scattering coefficients of the electrocardiosignals to be classified by utilizing a pre-constructed wavelet scattering network, calculating a scattering characteristic matrix by utilizing the wavelet scattering coefficients, and converting the scattering characteristic matrix into a scattering characteristic diagram;

processing the scattering characteristic diagram by using a pre-trained classification model to obtain a classification result of the electrocardiosignals; the pre-trained classification model is obtained by training a training set, wherein the training set comprises a plurality of electrocardiosignals and labels for marking the categories of the electrocardiosignals.

In summary, the wearable dynamic electrocardiograph signal classification method and system provided by the embodiments of the present invention fully utilize the advantages of the wavelet scattering network, extract the scattering characteristics of the wearable dynamic electrocardiograph signal, construct the scattering characteristic matrix, classify the signal by using the Long Short-Term Memory network (LSTM), kick out the signal with serious noise pollution based on the classification result, and divide the remaining signal into the slightly polluted signal only used for heart rate extraction and the clean signal available for disease classification, thereby providing more powerful data for real-time accurate detection of cardiovascular diseases. According to the method, a database of clean signals, light pollution signals and serious pollution signals needs to be established, and a proper wavelet scattering network needs to be established, so that the scattering characteristic matrix characteristics of various types of data in the database are accurately obtained, and meanwhile, the evaluation indexes of the quality classification effect of the three types of data and the classification effect of a model need to be determined.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts based on the technical solutions disclosed in the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于张量分解模型的多元脑电数据识别分析方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!