CN107913062A - The processing method and system of a kind of electrocardiosignal - Google Patents

The processing method and system of a kind of electrocardiosignal Download PDF

Info

Publication number
CN107913062A
CN107913062A CN201710978328.4A CN201710978328A CN107913062A CN 107913062 A CN107913062 A CN 107913062A CN 201710978328 A CN201710978328 A CN 201710978328A CN 107913062 A CN107913062 A CN 107913062A
Authority
CN
China
Prior art keywords
signal
electrocardiosignal
electrocardiosignals
features
feature
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.)
Granted
Application number
CN201710978328.4A
Other languages
Chinese (zh)
Other versions
CN107913062B (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710978328.4A priority Critical patent/CN107913062B/en
Publication of CN107913062A publication Critical patent/CN107913062A/en
Application granted granted Critical
Publication of CN107913062B publication Critical patent/CN107913062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • 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/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms

Abstract

The present invention relates to the processing method and system of a kind of electrocardiosignal, this method comprises the following steps:Step S21:Electrocardiosignal is pre-processed, to filter out the noise signal in electrocardiosignal;Step S22:Extraction is used for the feature for characterizing electrocardiosignal from the electrocardiosignal by pretreatment;Step S23:The feature of extraction is handled using kernel method, obtains feature vector.The processing method and system of the electrocardiosignal that the embodiment of the present invention proposes eliminate the influence of uniformity between class, and cause sample while higher dimensional space linear separability, to avoid the dimension disaster on calculating.

Description

Electrocardiosignal processing method and system
Technical Field
The invention belongs to the technical field of electrocardiosignal processing, and particularly relates to an electrocardiosignal processing method and system.
Background
The cardiac electrical signal reflects the electrophysiological process of heart activity, and a typical cardiac electrical waveform is shown in FIG. 1. The normal electrocardiosignals include P wave, QRS complex and T wave, and sometimes u wave. Where the P wave represents the electrical activity of atrial contractions, the QRS complex and the T wave represent the electrical activity of ventricular contractions, and the u wave is generally considered to represent the electrical activity at diastole.
The electrocardiosignal is processed mainly for carrying out digital representation on the electrocardiosignal waveform, and is convenient to analyze and research by combining other parameters or means subsequently. Most of the conventional methods for processing the cardiac electrical signal utilize time-frequency domain analysis and nonlinear characteristics (such as complexity, etc.) for processing. The main disadvantage is that it is difficult to accurately characterize the ecg signal in the presence of noise using only linear combinations of multiple features. In addition, certain types of waves have high class-to-class consistency, and certain characteristic samples x are not linearly separable in the current characteristic space, so that the electrocardiosignals are difficult to accurately characterize by the existing method.
Disclosure of Invention
In order to solve the technical problem that the electrocardiosignals are difficult to accurately represent, the embodiment of the invention provides an electrocardiosignal processing method and an electrocardiosignal processing system.
A method for processing electrocardiosignals comprises the following steps:
step S21: preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
step S22: extracting features for representing the electrocardiosignals from the preprocessed electrocardiosignals;
step S23: and processing the extracted features by adopting a kernel method to obtain a feature vector.
Further, in the step S21, the preprocessing includes filtering out a baseline shift of the ecg signal;
or, in the step S21, the preprocessing further includes reducing the sampling frequency of the electrocardiographic signal and filtering the baseline shift of the electrocardiographic signal, and the reducing the sampling frequency of the electrocardiographic signal is performed before the baseline shift of the electrocardiographic signal is filtered.
Further, in the step S22, the features include one or more of features based on sample entropy, features based on delay algorithm and features based on wavelet transform;
setting the preprocessed electrocardiosignal of the y sampling as p y ,p y Also called the y-th sample point, y is the sampling number of the sample point, where y =1, … …, n is the number of sample points, n isA natural number greater than or equal to 3, and the sampling frequency of the electrocardiosignal is fs;
the extraction method of the features based on the sample entropy comprises the following steps:
(a1) Setting the embedding dimension as m, wherein m is a natural number more than or equal to 1, and m is less than or equal to n-2; establishing a set of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m-1 ]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, defined as the two m-dimensional vectors X m (i) And X m (j) The maximum difference between corresponding elements in (1);
(c1) Given a distance threshold d _ thre, counting the number n of vector pairs with the distance between any two vector pairs consisting of m-dimensional vectors smaller than the distance threshold d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in formula (2);
B m =n m /(n-m-1) (2);
(d1) Increasing the value of embedding dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form vector set X m+1 Opposite vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) Calculating sample entropy SampEn, and taking the calculated result as the extracted feature based on the sample entropy, as shown in formula (3);
SampEn=ln(B m )/ln(B m+1 ) (3);
the feature extraction method based on the delay algorithm comprises the following steps:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, establishing a group of y sampled preprocessed electrocardiosignals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y Ordinate being the delay signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N multiplied by N grids, and counting the number N of the grids passed by the electrocardiosignal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And as the extracted feature based on the delay algorithm, as shown in formula (4):
n r =n/(N×N) (4);
the extraction method of the features based on the wavelet transform comprises the following steps:
(a3) Performing g-layer wavelet decomposition on the electrocardiosignal, wherein g is a natural number more than or equal to 2, reconstructing a high-frequency detail part of a signal obtained by each layer of wavelet decomposition, and setting a signal obtained by reconstructing a z-th layer wavelet decomposition signal as R z Wherein z =1, … …, g;
(b3) Calculation of R z With the original signal p y Energy ratio of (a) to (b) z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed cardiac signal p for the y-th sample y (ii) a Wherein z =1, … …, g, as shown in equation (5);
further, when the processing is performed in step S23, the operation in the high-dimensional space is converted into the kernel function calculation in the low-dimensional original space by using a kernel method.
Further, the kernel function is a gaussian kernel function, which is shown in formula (7), where σ is a variance, x is each extracted feature, and t is a feature template of the electrocardiographic signal;
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7);
the distance between each extracted feature and the feature template in the high-dimensional space is shown as formula (8):
and (4) processing all the features extracted in the step (S22) by using a formula (7) and a formula (8), wherein the processed features form the feature vector.
An electrocardiosignal processing system comprises a preprocessing module, an extraction module and a processing module;
the preprocessing module is used for preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
the extraction module is connected with the preprocessing module and used for extracting features used for representing the electrocardiosignals from the preprocessed electrocardiosignals;
and the processing module is connected with the extraction module and is used for processing the extracted features by adopting a kernel method to obtain a feature vector.
Further, the preprocessing comprises filtering out baseline drift of the electrocardiosignals;
or, the preprocessing further comprises reducing the sampling frequency of the electrocardiosignals and filtering the baseline drift of the electrocardiosignals, wherein the reduction of the sampling frequency of the electrocardiosignals is performed before the baseline drift of the electrocardiosignals is filtered.
Further, the extracted features comprise one or more of features based on sample entropy, features based on a delay algorithm and features based on wavelet transformation;
set the preprocessed of the y-th sampleThe electrocardiosignal is p y ,p y Also called as the y-th sample point, y is the sampling number of the sample point, wherein y =1, … …, n is the number of the sample points, n is a natural number greater than or equal to 3, and the sampling frequency of the electrocardiosignal is fs;
the extraction method of the features based on the sample entropy comprises the following steps:
(a1) Setting the embedding dimension as m, wherein m is a natural number more than or equal to 1, and m is less than or equal to n-2; establishing a set of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m-1 ]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, which is defined as the two m-dimensional vectors X m (i) And X m (j) The maximum difference between corresponding elements in (1);
(c1) Given a distance threshold d _ thre, counting the number n of vector pairs with the distance between any two vector pairs consisting of m-dimensional vectors smaller than the distance threshold d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in formula (2);
B m =n m /(n-m-1) (2);
(d1) Increasing the value of embedding dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form a vector set X m+1 Opposite vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) Calculating sample entropy SampEn, and taking the calculated result as the extracted feature based on the sample entropy, as shown in formula (3);
SampEn=ln(B m )/ln(B m+1 ) (3);
the feature extraction method based on the delay algorithm comprises the following steps:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, establishing a group of y sampled preprocessed electrocardiosignals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y Ordinate being the delay signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N multiplied by N grids, and counting the number N of the grids passed by the electrocardiosignal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And as the extracted feature based on the delay algorithm, as shown in formula (4):
n r =n/(N×N) (4);
the extraction method of the features based on the wavelet transform comprises the following steps:
(a3) Performing g-layer wavelet decomposition on the electrocardiosignal, wherein g is a natural number more than or equal to 2, reconstructing a high-frequency detail part of a signal obtained by each layer of wavelet decomposition, and setting a signal obtained by reconstructing a z-th layer wavelet decomposition signal as R z Wherein z =1, … …, g;
(b3) Calculation of R z With the original signal p y Energy ratio of (a) r z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed electrocardiosignal p for the y-th sampling y (ii) a Wherein z =1, … …, g, as shown in equation (5);
further, when the processing module performs the processing, the operation of the high-dimensional space is converted into the kernel function calculation of the low-dimensional original space by using a kernel method.
Further, the kernel function is a gaussian kernel function, which is shown in formula (7), where σ is a variance, x is each extracted feature, and t is a feature template of the electrocardiographic signal;
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7);
the distance between each extracted feature and the feature template in the high-dimensional space is shown as formula (8):
and processing all the features extracted by the extraction module by using a formula (7) and a formula (8), wherein the processed features form the feature vector.
The embodiment of the invention has the following beneficial effects: the electrocardiosignal processing method and the electrocardiosignal processing system provided by the embodiment of the invention consider that after the characteristic sample is projected to a characteristic space with enough high dimensionality, the characteristic sample is always linearly separable theoretically, so that the electrocardiosignal is processed by adopting a kernel method, the sample is mapped to a high-dimensional characteristic space, the influence of the consistency among classes is eliminated, and the dimensionality disaster on calculation is avoided while the sample is linearly separable in the high-dimensional space. In addition, the processing method and the system for the electrocardiosignals provided by the embodiment of the invention use the characteristic vector to digitally represent the electrocardiosignals, so that the representation of the electrocardiosignals is more accurate, and more reliable reference and reference significance can be provided for subsequent analysis and research.
Drawings
FIG. 1 is a waveform diagram of a typical cardiac signal;
FIG. 2 is a flow chart of a method for processing an ECG signal according to an embodiment of the present invention;
fig. 3 is a block diagram of a system for processing an electrocardiographic signal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings. Those skilled in the art will appreciate that the present invention is not limited to the drawings and the following examples.
The embodiment of the invention provides an electrocardiosignal processing method, which comprises the following steps as shown in figure 2:
step S21: preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
step S22: extracting features for representing the electrocardiosignals from the preprocessed electrocardiosignals;
step S23: and processing the extracted features by adopting a kernel method to obtain a feature vector.
Wherein, in the step S21, the preprocessing includes filtering out baseline wander of the electrocardiographic signal. In the embodiment, the baseline is extracted from the electrocardiosignals by using median filtering, and the extracted baseline is subtracted from the electrocardiosignals to filter the baseline drift of the electrocardiosignals, so that noise signals in the electrocardiosignals are filtered, and the processing accuracy is improved.
The preprocessing may also include reducing the sampling frequency of the cardiac electrical signal. Taking the QRS wave as an example, the QRS wave is usually in the time range of about 0.04s-0.12s, i.e., in the frequency range of 8.33Hz-25Hz. Higher frequency signals are mostly noise. When the electrocardiosignal is down-sampled, for example down to 50Hz, the maximum effective frequency of the retained electrocardiosignal is 25Hz according to the sampling theorem. Therefore, not only can the complete electrocardiosignal be reserved, but also the high-frequency noise can be removed, and the calculation amount can be reduced. Preferably, the cardiac electrical signal is down-sampled to a 50Hz signal.
When the preprocessing comprises the steps of reducing the sampling frequency of the electrocardiosignals and filtering the baseline drift of the electrocardiosignals, the reduction of the sampling frequency of the electrocardiosignals is carried out before the baseline drift of the electrocardiosignals is filtered, so that the calculated amount is reduced, and the processing efficiency is improved; and high-frequency noise is filtered, and the accuracy of characterization is further improved.
In the step S22, the features may include one or more of features based on sample entropy, features based on a delay algorithm, and features based on a wavelet transform. The following describes the extraction processes of these three features.
Setting the y-th sampled preprocessed electrocardiosignal as p y ,p y Also called the y-th sample point, y is the sampling number of the sample point, where y =1, … …, n is the number of sample points, n is a natural number equal to or greater than 3, and the sampling frequency of the electrocardiograph signal is fs, and if the electrocardiograph signal is subjected to preprocessing for reducing the sampling frequency of the electrocardiograph signal, the sampling frequency fs of the electrocardiograph signal here is a reduced sampling frequency, for example, fs =50Hz.
(1) Sample entropy based features:
(a1) Assuming that the embedding dimension is m, m is a natural number of 1 or more, and in general, m is n-2 or less, for example, m =2; establishing a set of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m-1 ]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, defined as the two m-dimensional vectors X m (i) And X m (j) The maximum value of the difference between the corresponding elements in (1).
(c1) Given a distance threshold value d _ thre, counting that the distance between any two vector pairs is smaller than the distance threshold valueNumber n of vector pairs of value d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in equation (2).
B m =n m /(n-m-1) (2)
Wherein the distance threshold d _ thre may be 0.2 times the variance of the cardiac signal.
The variance is calculated byWherein X corresponds to each sample point, μ corresponds to the sample mean, and N is the number of samples.
(d1) Increasing the value of embedded dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form vector set X m+1 Opposite vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) The sample entropy SampEn is calculated and the result of the calculation is taken as the extracted sample entropy-based feature, as shown in equation (3).
SampEn=ln(B m )/ln(B m+1 ) (3)
(2) Features based on the delay algorithm:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, e.g., h is 0.5; establishing a set of y-th sampled preprocessed electrocardiosignals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y Ordinate being the delay signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N × N grids, for example, 40 × 40 grids, and counting the number N of grids passed by the electrocardiographic signal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And is taken as the extracted feature based on the delay algorithm, as shown in equation (4).
n r =n (N×N) (4)
(3) Features based on wavelet transform:
(a3) G layers of wavelet decomposition are carried out on the electrocardiosignal, g is a natural number which is more than or equal to 2, for example, the value of the g layer 3,g is only required to meet the condition that the QRS wave can be reconstructed by the high-frequency detail part of the g layer, and then the high-frequency detail part of the signal obtained by each layer of wavelet decomposition is reconstructed. Let the reconstructed signal of the z-th layer wavelet decomposition signal be R z Wherein z =1, … …, g. Wherein, the wavelet decomposition can utilize Haar wavelet base to carry out wavelet decomposition.
(b3) Calculation of R z With the original signal p y Energy ratio of (a) to (b) z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed electrocardiosignal p for the y-th sampling y (ii) a Wherein z =1, … …, g, as shown in equation (5).
In step S23, in order to improve the classification effect, the present embodiment converts the inner product operation of the high-dimensional space into the kernel function calculation of the low-dimensional original space by using a kernel method (kernel). The inner product operation formula of the high-dimensional space is shown as a formula (6), wherein phi is mapping from an original space to the high-dimensional space, K is a kernel function, < > is an inner product, x is an extracted feature, and t is a feature template of the electrocardiosignal.
K(x,t)=<φ(x),φ(t)> (6)
The gaussian kernel is one of the most commonly used kernels, as shown in equation (7), where σ is the variance.
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7)
The derivation of the distance formula based on the kernel function is as follows:
the distance between each extracted feature and the feature template in the high-dimensional space is shown in formula (8).
And (3) processing all the features extracted in the step (S22) by using a formula (7) and a formula (8), forming the feature vector by using all the processed features, and representing the electrocardiosignals by using the feature vector, so that analysis and research can be conveniently carried out by combining other parameters or means in the follow-up process.
The embodiment avoids the dimension disaster calculated in the high-dimensional space while mapping the sample to the high-dimensional feature space by the kernel method.
Three features are exemplified in this embodiment, and generally, the more features that are employed, the higher the accuracy of the characterization. Those skilled in the art will appreciate that further features may be utilized for characterization, such as features based on the hubert transform, etc.
An embodiment of the present invention provides a processing system for an electrocardiograph signal, which includes a preprocessing module, an extraction module, and a processing module, as shown in fig. 3.
The preprocessing module is used for preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
the extraction module is connected with the preprocessing module and used for extracting features used for representing the electrocardiosignals from the preprocessed electrocardiosignals;
the processing module is connected with the extraction module and is used for processing the extracted features by adopting a kernel method to obtain a feature vector for representing the electrocardiosignals.
Wherein, in the preprocessing module, the preprocessing comprises filtering out baseline drift of the electrocardiosignals. In the embodiment, the baseline is extracted from the electrocardiosignals by using median filtering, and the extracted baseline is subtracted from the electrocardiosignals to filter the baseline drift of the electrocardiosignals, so that the noise signals in the electrocardiosignals are filtered, and the processing accuracy is improved.
The preprocessing may also include reducing the sampling frequency of the cardiac electrical signal. Taking the QRS wave as an example, the QRS wave is usually in the time range of about 0.04s-0.12s, i.e., in the frequency range of 8.33Hz-25Hz. Higher frequency signals are mostly noise. When the electrocardiosignal is down-sampled, for example down to 50Hz, the maximum effective frequency of the retained electrocardiosignal is 25Hz according to the sampling theorem. Therefore, not only can the complete electrocardiosignals be kept, but also the high-frequency noise can be removed, and the calculated amount can be reduced. Preferably, the cardiac signal is down-sampled to a 50Hz signal.
When the preprocessing comprises reducing the sampling frequency of the electrocardiosignals and filtering the baseline drift of the electrocardiosignals, the reduction of the sampling frequency of the electrocardiosignals is carried out before the baseline drift of the electrocardiosignals is filtered, so that the calculation amount is reduced, and the processing efficiency is improved; and high-frequency noise is filtered, and the accuracy of characterization is further improved.
In the extraction module, the features may include one or more of features based on sample entropy, features based on a delay algorithm, and features based on wavelet transform. The following describes the extraction processes of these three features.
Setting the preprocessed electrocardiosignal of the y sampling as p y ,p y Also called as the y-th sample point, y is the sampling number of the sample point, wherein y =1, … …, n is the number of sample points, n is a natural number greater than or equal to 3, the sampling frequency of the electrocardiograph signal is fs, and if the electrocardiograph signal is subjected to preprocessing for reducing the sampling frequency of the electrocardiograph signal, the sampling frequency fs of the electrocardiograph signal is a reduced sampling frequency, for example, fs =50Hz.
(1) Sample entropy based features:
(a1) Let m be a natural number with an embedding dimension of 1 or more, m being generally n-2 or less, e.g. m=2; establishing a set of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m -1]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, defined as the two m-dimensional vectors X m (i) And X m (j) The maximum value of the difference between the corresponding elements in (1).
(c1) Given a distance threshold d _ thre, counting the number n of vector pairs with the distance between any two vector pairs smaller than the distance threshold d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in equation (2).
B m =n m /(n-m-1) (2)
Wherein the distance threshold d _ thre may be 0.2 times the variance of the cardiac signal.
The variance is calculated byWherein X corresponds to each sample point, μ corresponds to the sample mean, and N is the number of samples.
(d1) Increasing the value of embedding dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form vector set X m+1 Opposite vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) The sample entropy SampEn is calculated and the result of the calculation is taken as the extracted sample entropy-based feature, as shown in formula (3).
SampEn=ln(B m )/ln(B m+1 ) (3)
(2) Features based on the delay algorithm:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, e.g., h is 0.5; establishing a set of y-th sampled preprocessed cardiac electrical signals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y Ordinate being the delay signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N × N grids, for example, 40 × 40 grids, and counting the number N of grids passed by the electrocardiographic signal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And is taken as the extracted feature based on the delay algorithm, as shown in equation (4).
n r =n/(N×N) (4)
(3) Features based on wavelet transform:
(a3) G layers of wavelet decomposition are carried out on the electrocardiosignal, g is a natural number which is more than or equal to 2, for example, the value of the g layer 3,g is only required to meet the condition that the QRS wave can be reconstructed by the high-frequency detail part of the g layer, and then the high-frequency detail part of the signal obtained by each layer of wavelet decomposition is reconstructed. Let the reconstructed signal of the z-th layer wavelet decomposition signal be R z Wherein z =1, … …, g. Wherein, the wavelet decomposition can utilize Haar wavelet base to carry out wavelet decomposition.
(b3) Calculation of R z With the original signal p y Energy ratio of (a) to (b) z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed electrocardiosignal p for the y-th sampling y (ii) a Wherein z =1, … …, g, as shown in equation (5).
When the processing module performs processing, in order to improve the classification effect, the embodiment uses a kernel method (kernel) to convert the inner product operation of the high-dimensional space into the kernel function calculation of the low-dimensional original space. The inner product operation formula of the high-dimensional space is shown as a formula (6), wherein phi is mapping from an original space to the high-dimensional space, K is a kernel function, < > is an inner product, x is an extracted feature, and t is a feature template of the electrocardiosignal.
K(x,t)=<φ(x),φ(t)> (6)
The gaussian kernel is one of the most commonly used kernel functions, as shown in equation (7), where σ is the variance.
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7)
The derivation of the distance formula based on the kernel function is as follows:
the distance between each extracted feature and the feature template in the high-dimensional space is shown in formula (8).
And (3) processing all the features extracted in the step (S22) by using a formula (7) and a formula (8), forming the feature vector by using all the processed features, and representing the electrocardiosignals by using the feature vector, so that analysis and research can be conveniently carried out by combining other parameters or means in the follow-up process.
The embodiment avoids the dimension disaster calculated in the high-dimensional space while mapping the sample to the high-dimensional feature space by the kernel method.
Three features are exemplified in this embodiment, and generally, the more features that are employed, the higher the accuracy of the characterization. The skilled person will appreciate that further features may be used for characterization, such as features based on the hilbert transform, etc.
An embodiment of the present invention further provides a storage medium, where a computer program for executing the foregoing method is stored in the storage medium.
An embodiment of the present invention further provides a processor, where the processor runs a computer program executing the foregoing method.
Those of skill in the art will understand that the logic and/or steps illustrated in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
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. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing electrocardiosignals is characterized by comprising the following steps:
step S21: preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
step S22: extracting features for representing the electrocardiosignals from the preprocessed electrocardiosignals;
step S23: and processing the extracted features by adopting a kernel method to obtain a feature vector.
2. The method according to claim 1, wherein in the step S21, the preprocessing includes filtering out baseline wander of the cardiac signal;
or, in the step S21, the preprocessing further includes reducing the sampling frequency of the electrocardiographic signal and filtering the baseline shift of the electrocardiographic signal, and the reducing the sampling frequency of the electrocardiographic signal is performed before the baseline shift of the electrocardiographic signal is filtered.
3. The method according to claim 1 or 2, wherein in the step S22, the features include one or more of features based on sample entropy, features based on delay algorithm, and features based on wavelet transform;
setting the y-th sampled preprocessed electrocardiosignal as p y ,p y Also called as the y-th sample point, y is the sampling number of the sample point, wherein y =1, … …, n is the number of the sample points, n is a natural number greater than or equal to 3, and the sampling frequency of the electrocardiosignal is fs;
the extraction method of the features based on the sample entropy comprises the following steps:
(a1) Setting the embedding dimension as m, wherein m is a natural number more than or equal to 1, and m is less than or equal to n-2; establishing a group of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m-1 ]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form a vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, defined as the two m-dimensional vectors X m (i) And X m (j) The maximum difference between corresponding elements in (1);
(c1) Given a distance threshold d _ thre, counting that the distance between any two vector pairs consisting of m-dimensional vectors is smaller thanNumber n of vector pairs of distance threshold d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in formula (2);
B m =n m /(n-m-1) (2);
(d1) Increasing the value of embedding dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form vector set X m+1 Of the vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) Calculating sample entropy SampEn, and taking the calculated result as the extracted feature based on the sample entropy, as shown in formula (3);
SampEn=ln(B m )/ln(B m+1 ) (3);
the feature extraction method based on the delay algorithm comprises the following steps:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, establishing a group of y sampled preprocessed electrocardiosignals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y On the ordinate, the delayed signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N multiplied by N grids, and counting the number N of the grids passed by the electrocardiosignal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And as the extracted feature based on the delay algorithm, as shown in formula (4):
n r =n/(N×N) (4);
the extraction method of the features based on the wavelet transform comprises the following steps:
(a3) Performing g-layer wavelet decomposition on the electrocardiosignal, wherein g is a natural number more than or equal to 2, reconstructing a high-frequency detail part of a signal obtained by each layer of wavelet decomposition, and setting a signal obtained by reconstructing a z-th layer wavelet decomposition signal as R z Wherein z =1, … …, g;
(b3) Calculation of R z With the original signal p y Energy ratio of (a) to (b) z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed cardiac signal p for the y-th sample y (ii) a Wherein z =1, … …, g, as shown in equation (5);
4. the method according to claim 3, wherein in the step S23, the operation in the high-dimensional space is converted into the kernel function calculation in the low-dimensional original space by using a kernel method.
5. The method of claim 4, wherein the kernel function is a Gaussian kernel function, the Gaussian kernel function is shown in formula (7), where σ is a variance, x is each extracted feature, and t is a feature template of the electrocardiographic signal;
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7);
the distance between each extracted feature and the feature template in the high-dimensional space is shown as formula (8):
and (4) processing all the features extracted in the step (S22) by using a formula (7) and a formula (8), wherein the processed features form the feature vector.
6. The electrocardiosignal processing system is characterized by comprising a preprocessing module, an extraction module and a processing module;
the preprocessing module is used for preprocessing the electrocardiosignals to filter noise signals in the electrocardiosignals;
the extraction module is connected with the preprocessing module and used for extracting features used for representing the electrocardiosignals from the preprocessed electrocardiosignals;
and the processing module is connected with the extraction module and is used for processing the extracted features by adopting a kernel method to obtain feature vectors.
7. The system of claim 6, wherein the preprocessing comprises filtering out baseline wander of the cardiac signal;
or, the preprocessing further comprises reducing the sampling frequency of the electrocardiosignals and filtering the baseline drift of the electrocardiosignals, wherein the reduction of the sampling frequency of the electrocardiosignals is performed before the baseline drift of the electrocardiosignals is filtered.
8. The system according to claim 6 or 7, wherein the extracted features comprise one or more of sample entropy-based features, delay algorithm-based features, and wavelet transform-based features;
setting the y-th sampled preprocessed electrocardiosignal as p y ,p y Also called as the y-th sample point, y is the sampling number of the sample point, wherein y =1, … …, n is the number of the sample points, n is a natural number greater than or equal to 3, and the sampling frequency of the electrocardiosignal is fs;
the extraction method of the features based on the sample entropy comprises the following steps:
(a1) Setting the embedding dimension as m, wherein m is a natural number more than or equal to 1, and m is less than or equal to n-2; establishing a set of m-dimensional vectors X according to sampling sequence numbers of sample points m (i)=[p i ,p i+1 ,……,p i+m-1 ]I is more than or equal to 1 and less than or equal to n-m, and all m-dimensional vectors X m (i) Form a vector set X m
(b1) In vector set X m In calculating any two m-dimensional vectors X m (i) And X m (j) The distance between the constituent vector pairs, defined as the two m-dimensional vectors X m (i) And X m (j) The maximum difference between corresponding elements in (1);
(c1) Given a distance threshold d _ thre, counting the number n of vector pairs with the distance between any two vector pairs consisting of m-dimensional vectors smaller than the distance threshold d _ thre m And the ratio B of the sum to the total number of vector pairs n-m-1 is determined m As shown in formula (2);
B m =n m /(n-m-1) (2);
(d1) Increasing the value of embedded dimension to m +1, and establishing a group of m + 1-dimensional vectors X according to the sampling sequence number of the sample point m+1 (i)=[p i ,p i+1 ,...,p i+m ]The value of i is more than or equal to 1 and less than or equal to n-m, and all m + 1-dimensional vectors X m+1 (i) Form a vector set X m+1 Opposite vector set X m+1 Repeating the steps (B1) and (c 1) to obtain B m+1
(e1) Calculating sample entropy SampEn, and taking the calculated result as the extracted feature based on the sample entropy, as shown in formula (3);
SampEn=ln(B m )/ln(B m+1 ) (3);
the feature extraction method based on the delay algorithm comprises the following steps:
(a2) The delay length t = fs × h,0 of the given electrocardiosignal<h&1, establishing a group of y sampled preprocessed electrocardiosignals p y Delayed signal d of y ,d y =p y+t (ii) a Here the y-th sampled preprocessed cardiac signal p y Simply original signal p y
(b2) From the original signal p y And a delayed signal d y Establishing a phase space with the abscissa of the phase space as the original signal p y Ordinate being the delay signal d y
(c2) Drawing an electrocardiosignal curve in a phase space;
(d2) Dividing the phase space into N multiplied by N grids, and counting the number N of the grids passed by the electrocardiosignal curve;
(e2) Calculating the ratio n of the number of grids passed by the electrocardiosignal curve to the total number of grids r And as the extracted feature based on the delay algorithm, as shown in formula (4):
n r =n/(N×N) (4);
the extraction method of the features based on the wavelet transform comprises the following steps:
(a3) Performing g-layer wavelet decomposition on the electrocardiosignal, wherein g is a natural number more than or equal to 2, reconstructing a high-frequency detail part of a signal obtained by each layer of wavelet decomposition, and setting a signal obtained by reconstructing a z-th layer wavelet decomposition signal as R z Wherein z =1, … …, g;
(b3) Calculating R z With the original signal p y Energy ratio of (a) to (b) z And as an extracted wavelet transform-based feature, here the original signal p y Preprocessed cardiac signal p for the y-th sample y (ii) a Wherein z =1, … …, g, as shown in equation (5);
9. the system according to claim 8, wherein when the processing module performs the processing, a kernel method is used to convert the operation of the high-dimensional space into the kernel function calculation of the low-dimensional original space.
10. The system of claim 9, wherein the kernel function is a gaussian kernel function, the gaussian kernel function is shown in formula (7), where σ is a variance, x is each extracted feature, and t is a feature template of the electrocardiographic signal;
K(x,t)=exp(-|x-t| 2 /2σ 2 ) (7);
the distance between each extracted feature and the feature template in the high-dimensional space is shown as formula (8):
and processing all the features extracted by the extraction module by using a formula (7) and a formula (8), wherein the processed features form the feature vector.
CN201710978328.4A 2017-10-18 2017-10-18 Electrocardiosignal processing method and system Active CN107913062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710978328.4A CN107913062B (en) 2017-10-18 2017-10-18 Electrocardiosignal processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710978328.4A CN107913062B (en) 2017-10-18 2017-10-18 Electrocardiosignal processing method and system

Publications (2)

Publication Number Publication Date
CN107913062A true CN107913062A (en) 2018-04-17
CN107913062B CN107913062B (en) 2020-12-22

Family

ID=61894820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710978328.4A Active CN107913062B (en) 2017-10-18 2017-10-18 Electrocardiosignal processing method and system

Country Status (1)

Country Link
CN (1) CN107913062B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109077719A (en) * 2018-07-05 2018-12-25 广州视源电子科技股份有限公司 Signal recognition method, device, equipment and storage medium
CN109077720A (en) * 2018-07-05 2018-12-25 广州视源电子科技股份有限公司 Signal processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050222508A1 (en) * 2004-04-05 2005-10-06 Moreno Pedro J Cardiac diagnostic system and method
CN101926646A (en) * 2003-07-01 2010-12-29 卡迪尔马格成像公司 Use of machine learning for classification of magneto cardiograms
CN105320969A (en) * 2015-11-20 2016-02-10 北京理工大学 A heart rate variability feature classification method based on multi-scale Renyi entropy
WO2017091736A1 (en) * 2015-11-23 2017-06-01 Mayo Foundation For Medical Education And Research Processing physiological electrical data for analyte assessments

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101926646A (en) * 2003-07-01 2010-12-29 卡迪尔马格成像公司 Use of machine learning for classification of magneto cardiograms
US20050222508A1 (en) * 2004-04-05 2005-10-06 Moreno Pedro J Cardiac diagnostic system and method
CN105320969A (en) * 2015-11-20 2016-02-10 北京理工大学 A heart rate variability feature classification method based on multi-scale Renyi entropy
WO2017091736A1 (en) * 2015-11-23 2017-06-01 Mayo Foundation For Medical Education And Research Processing physiological electrical data for analyte assessments

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
YA-TAO ZHANG等: "ECG quality assessment based on a kernel support vector machine and genetic algorithm with a feature matrix", 《JOURNAL OF ZHEJIANG UNIVERSITY SCIENCE》 *
刘念祖等: "《智能信息管理研究》", 31 December 2010, 立信会计出版社 *
牟少敏: "核方法的研究及其应用", 《中国博士学位论文全文数据库 信息科技辑》 *
石菲: "心电信号自动识别技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
董红生: "心电波形检测与心率变异性分析方法研究", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109077719A (en) * 2018-07-05 2018-12-25 广州视源电子科技股份有限公司 Signal recognition method, device, equipment and storage medium
CN109077720A (en) * 2018-07-05 2018-12-25 广州视源电子科技股份有限公司 Signal processing method, device, equipment and storage medium
CN109077720B (en) * 2018-07-05 2021-03-23 广州视源电子科技股份有限公司 Signal processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN107913062B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
Anwar et al. Arrhythmia classification of ECG signals using hybrid features
Yang Multiscale recurrence quantification analysis of spatial cardiac vectorcardiogram signals
Arif Robust electrocardiogram (ECG) beat classification using discrete wavelet transform
Sabherwal et al. Automatic detection of the R peaks in single-lead ECG signal
Barrios-Muriel et al. A simple SSA-based de-noising technique to remove ECG interference in EMG signals
CN108742697B (en) Heart sound signal classification method and terminal equipment
Kumar et al. Optimal selection of wavelet function and decomposition level for removal of ECG signal artifacts
Maji et al. Empirical mode decomposition vs. variational mode decomposition on ECG signal processing: A comparative study
CN110367936B (en) Electrocardiosignal detection method and device
Satija et al. Noise‐aware dictionary‐learning‐based sparse representation framework for detection and removal of single and combined noises from ECG signal
Immanuel et al. Separation of maternal and fetal ECG signals from the mixed source signal using FASTICA
Malghan et al. A review on ECG filtering techniques for rhythm analysis
Kaur et al. On the detection of cardiac arrhythmia with principal component analysis
CN109077721B (en) Atrial fibrillation detection apparatus and storage medium
Mir et al. ECG denoising and feature extraction techniques–a review
CN107913062B (en) Electrocardiosignal processing method and system
Sraitih et al. A denoising performance comparison based on ECG Signal Decomposition and local means filtering
Milchevski et al. Improved pipelined wavelet implementation for filtering ECG signals
KR20140041327A (en) Method and system for determining qrs complexes in electrocardiogram signals
Sabherwal et al. Aiding the detection of QRS complex in ECG signals by detecting S peaks independently
Chandra et al. A computationally efficient approach for ECG signal denoising and data compression
Taralunga et al. A new method for fetal electrocardiogram denoising using blind source separation and empirical mode decomposition
Bhoraniya et al. Motion artifacts extraction using DWT from ambulatory ECG (A-ECG)
Vega-Martínez et al. Wavelet packet based algorithm for QRS region detection and R/S wave identification
Khandait et al. ECG signal processing using classifier to analyses cardiovascular disease

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