An electrocardiogram classification method and system based on hierarchical pyramid feature fusion

Through the hierarchical conical feature fusion method, combined with one-dimensional convolutional neural network and random forest classifier, the problems of complex feature selection and insufficient abstract feature evaluation in the existing technology are solved, and the high accuracy and noise recognition effect of electrocardiogram classification are achieved.

CN115345232BActive Publication Date: 2025-07-25SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210967734.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-07-25
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

Existing machine learning algorithms rely on feature selection in electrocardiogram classification, resulting in complex extraction process and low classification efficiency. Deep learning algorithms ignore the original signal characteristics and cannot accurately evaluate the performance of abstract feature.

Method used

A method based on hierarchical conical feature fusion is adopted, combined with one-dimensional convolutional neural network to extract abstract features and prior knowledge features, and a random forest classifier is used to classify, and multi-level conical features are constructed for feature fusion, and signal amplitude information retention and noise classification accuracy are improved by arranging proportional entropy.

Benefits of technology

The overall accuracy and noise classification accuracy of ECG classification are improved, especially in low signal-to-noise ratio environments. Through feature fusion and weight allocation balance classification results, the generalization ability of the classifier is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115345232B_ABST
    Figure CN115345232B_ABST
Patent Text Reader

Abstract

The present invention proposes an electrocardiogram classification method and system based on hierarchical pyramid feature fusion, including the following steps: obtaining the electrocardiogram data to be recognized for preprocessing to obtain a one-dimensional electrocardiogram signal; extracting abstract features from the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network; extracting prior knowledge features from the electrocardiogram data; constructing a multi-level pyramid to perform feature fusion on the extracted abstract features and prior knowledge features to obtain a feature fusion vector for each layer of the pyramid; inputting the feature fusion vector for each layer of the pyramid into a trained random forest classifier for classification to obtain a classification result. By fusing the prior knowledge features and the abstract features, the advantages of the two types of features are fully utilized to improve the classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to electrocardiogram classification, and particularly relates to an electrocardiogram classification method and system based on hierarchical pyramid feature fusion. Background Technique

[0002] The statements in this part only provide background technical information related to the present invention, and do not necessarily constitute prior art.

[0003] Classic machine learning algorithms are divided into two parts. One part is feature extraction, and the other part is training classification. Therefore, the selection of features plays a decisive role in the final classification result. Datta et al. used a variety of atrial fibrillation features, including morphological features, HRV features, frequency features, statistical features, etc. to train a multi-level cascaded binary classifier. They extracted multiple features and used multiple classifiers. The defect of their method is that the large number of features leads to a complex extraction process, and the use of multiple classifiers results in a too high classification cost. Bin et al. proposed a decision tree ensemble based on 30 features of electrocardiogram records, and obtained 30 artificial features through QRS waves for machine learning classification. The features extracted by their method only target QRS waves and cannot comprehensively reflect the signal features. Cao et al. used the starting and ending points of QRS complexes to overcome the problem of signal length imbalance, and used a 2-layer LSTM to classify the data. The data they used are all one-dimensional signals, but they ignored the time domain and other features of the one-dimensional time series itself.

[0004] It can be seen that classic machine learning algorithms rely on the selection of features, and the selection of features depends on prior knowledge. Therefore, machine learning methods have extremely high requirements for features. If the extracted features are more suitable for the database, no matter what classifier is used, the final results may not vary much. Such a method cannot be well applied to the clinical diagnosis of arrhythmia classification.

[0005] Deep learning algorithms are involved in research in various fields. Unlike machine learning, they do not extract features. Instead, they directly input the processed data into a neural network. The neural network continuously trains the data and finally obtains a model for classification.

[0006] Fan et al. designed a two-stream CNN architecture. They used the same model, changed the parameters therein, and then extracted two different types of abstract feature vectors for fusion to classify electrocardiogram signals. The two types of feature vectors of this network are both from one-dimensional ECG signals, and these features are also deep and invisible to the naked eye. Their method failed to incorporate the original features of the signals and could not accurately evaluate the performance of the two types of abstract features. Jiang et al. proposed a convolutional neural network with a special structure that can extract multi-scale features from the original ECG signals, integrate information of different scales, and then use CNN for classification. Their method uses multi-scale abstract features as training samples and still does not consider the traditional features of the original signals. Summary of the Invention

[0007] To overcome the deficiencies of the above-mentioned prior art, the present invention provides an electrocardiogram classification method and system based on hierarchical pyramid feature fusion, which performs feature fusion on prior knowledge features and abstract features based on a hierarchical pyramid, fully utilizes the advantages of the two types of features, and improves the classification accuracy.

[0008] To achieve the above object, one or more embodiments of the present invention provide the following technical solutions: An electrocardiogram classification method based on hierarchical pyramid feature fusion, comprising the following steps:

[0009] Obtain the electrocardiogram data to be recognized and perform preprocessing to obtain one-dimensional electrocardiogram signals;

[0010] Extract abstract features from the one-dimensional electrocardiogram signals based on a one-dimensional convolutional neural network;

[0011] Extract prior knowledge features from the electrocardiogram data;

[0012] Construct a multi-level pyramid to perform feature fusion on the extracted abstract features and prior knowledge features to obtain the feature fusion vectors of each layer of the pyramid;

[0013] Input the feature fusion vectors of each layer of the pyramid into a trained random forest classifier for classification to obtain the classification result.

[0014] Further, the one-dimensional convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer, and the size of the convolutional kernel shows an upward trend from the first convolutional layer to the last convolutional layer.

[0015] Further, the prior knowledge features include, but are not limited to, time domain features, interval features, frequency domain features, and non-linear features.

[0016] Further, the non-linear feature is permutation proportion entropy, and the permutation proportion entropy retains the signal amplitude information by constructing a relationship matrix of adjacent elements.

[0017] Further, construct a multi-level cone to perform feature fusion on the extracted abstract features and prior knowledge features, obtaining a hierarchical cone feature fusion vector, which specifically includes:

[0018] Use the extracted abstract features as the features of each layer of the multi-level cone;

[0019] Divide the extracted prior knowledge features according to the number of layers of the constructed multi-level cone minus 1, obtaining multiple prior knowledge feature groups with equal numbers;

[0020] Starting from the second layer of the multi-level cone, sequentially add prior knowledge feature groups different from the previous layer to obtain the feature fusion vector of each layer of the hierarchical cone.

[0021] Further, perform weight assignment on the feature fusion vector of each layer of the hierarchical cone, and then sequentially input the feature fusion vectors of each layer from top to bottom into the trained random forest classifier to obtain the final classification result.

[0022] The second aspect of the present invention provides an electrocardiogram classification system based on hierarchical cone-shaped feature fusion, including:

[0023] An acquisition module, configured to acquire electrocardiogram data to be recognized for preprocessing, obtaining a one-dimensional electrocardiogram signal;

[0024] A first feature extraction module, configured to perform abstract feature extraction on the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network;

[0025] A second feature extraction module, configured to extract prior knowledge features from the electrocardiogram data;

[0026] A feature fusion module, configured to construct a multi-level cone to perform feature fusion on the extracted abstract features and prior knowledge features, obtaining the feature fusion vector of each layer of the hierarchical cone;

[0027] A classification module, configured to input the feature fusion vector of each layer of the hierarchical cone into a random forest classifier for classification to obtain a classification result.

[0028] Further, the feature fusion module includes: using the extracted abstract features as the features of each layer of the multi-level cone;

[0029] Divide the extracted prior knowledge features according to the number of layers of the constructed multi-level cone, obtaining multiple prior knowledge feature groups with equal numbers;

[0030] Starting from the second layer of the multi-level cone, sequentially add prior knowledge feature groups different from the previous layer to obtain the feature fusion vector of each layer of the hierarchical cone.

[0031] The third aspect of the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps described in the above method.

[0032] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the steps described in the above method are completed.

[0033] The above one or more technical solutions have the following beneficial effects:

[0034] In the present invention, most of the artificial features come from prior knowledge, and many studies have proven their effectiveness; the abstract features are extracted through deep learning and have good generalization ability, capable of learning implicit data features. Considering the advantages of the two types of features, fusing them into a feature matrix as the input of the classifier can give full play to the advantages of both types of features.

[0035] When extracting artificial features in the present invention, relevant methods of machine learning are referred to, and special attention is paid to the influence of the category of features on the classification result. After introducing time-domain features, interphase features are added to improve the classification accuracy. Since this database is collected in a low signal-to-noise ratio environment, non-linear feature permutation ratio entropy is added to classify the noise, so as to improve the classification accuracy of a single classification. Through the three types of artificial features, not only can the overall classification accuracy be improved, but also the classification accuracy of the noise category can be improved.

[0036] When classifying in the present invention, considering the influence of different feature combinations and the number of features on the classification performance, when constructing the feature matrix, the abstract features are regarded as a whole separately, as the top of the hierarchical pyramid, and artificial features are added downward in turn and input into the random forest algorithm to obtain 4 different or identical results. The weights are calculated according to a certain ratio to obtain the final classification result. Doing so can give full play to the advantages of all feature combinations and balance the final result.

[0037] In order to obtain better classification results in a low signal-to-noise ratio environment, the present invention introduces the concept of entropy and improves it on the basis of permutation entropy to obtain permutation ratio entropy, which can retain the signal amplitude information, analyze the difference between adjacent points, and analyze the signal quality in a more complex environment.

[0038] The advantages of the additional aspects of the present invention will be partially given in the following description, partially will become obvious from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings forming a part of this invention are used to provide a further understanding of the invention. The schematic embodiments and descriptions thereof of the invention are used to explain the invention and do not constitute an improper limitation of the invention.

[0040] Figure 1 It is a schematic diagram of the electrocardiogram classification process in the first embodiment of the present invention;

[0041] Figure 2 It is a waveform diagram of electrocardiogram data in the first embodiment of the present invention;

[0042] Figure 3 It is a schematic diagram of hierarchical pyramid feature fusion in the first embodiment of the present invention;

[0043] Figure 4 It is a schematic diagram of the one-dimensional convolutional neural network structure in the first embodiment of the present invention;

[0044] Figure 5 It is a schematic diagram of various classification indicators in the first embodiment of the present invention;

[0045] Figure 6 It is a schematic diagram of entropy value comparison in the first embodiment of the present invention. Detailed implementation manners

[0046] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0047] It should be noted that the terms used herein are only for describing the specific implementation manners and are not intended to limit the exemplary embodiments according to the present invention.

[0048] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0049] Embodiment 1

[0050] As Figures 1 - 6 shown, this embodiment discloses an electrocardiogram classification method based on hierarchical pyramid feature fusion, which is characterized by including the following steps:

[0051] Step 1: Obtain the electrocardiogram data to be recognized and perform preprocessing to obtain a one-dimensional electrocardiogram signal;

[0052] Step 2: Extract abstract features from the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network;

[0053] Step 3: Extract prior knowledge features from the electrocardiogram data;

[0054] Step 4: Construct a multi-level cone to perform feature fusion on the extracted abstract features and prior knowledge features to obtain the feature fusion vectors for each layer of the hierarchical cone;

[0055] Step 5: Input the feature fusion vectors for each layer of the hierarchical cone into the trained random forest classifier for classification to obtain the classification results.

[0056] As Figure 2 shown, in this embodiment, the publicly available atrial fibrillation dataset provided by PhysioNet / CinC Challenge 2017 is used as the experimental object. This atrial fibrillation dataset contains four types of ECG data: normal heart rate, atrial fibrillation (AF), other heart rhythms, and noise.

[0057] The training set contains 8,528 single-lead electrocardiogram records with a duration ranging from 9 s to a little over 60 s, and the electrocardiogram recording sampling rate is 300 Hz. Since this competition contains a hidden test set and is not publicly available, our experiment is conducted on the publicly available training set.

[0058] This dataset is modified by manual annotation. Finally, 5,076 data (59.5%) are labeled as normal heart rhythm, 758 data (8.89%) are labeled as atrial fibrillation, 2,415 data (28.3%) are labeled as other heart rhythms, and 279 data (3.27%) are labeled as noise.

[0059] In step 1 of this embodiment, the lengths of all electrocardiogram signal records are unified to 30 s. Among them, for records with a length greater than 30 s, random segment extraction is performed, and for records with a length less than 30 s, the Pan-Tompkins detector is used to locate the QRS complex. The initial downward deflection in the QRS complex is determined as the starting point of the wave group, and the record from the starting point of the first QRS complex to the starting point of the last QRS complex is intercepted and continuously replicated until the record length is 30 s.

[0060] In step 2 of this embodiment, one-dimensional electrocardiogram signals are used as the input of a one-dimensional convolutional neural network for the extraction of abstract features. The one-dimensional convolutional neural network used in this implementation has a total of 13 layers. After the signal is input into this network, the signal will pass through 6 pairs of convolutional pooling layers. In order to obtain abstract features, the output dimension is changed in the final fully connected layer, and a 1×38 feature matrix is output to obtain the hidden abstract features of this time series. In this implementation, 38 abstract features are extracted.

[0061] As Figure 2As shown, it includes a convolutional layer, a pooling layer, and a fully connected layer. A complex neural network is not used because when a time series is input into a convolutional neural network, as the number of convolutional layers increases, the resulting feature vector can better describe a certain hidden feature of the time series. Although this is helpful for studying deeper characteristics of the time series, such overly deep feature vectors will consume too much memory and computing resources. Based on the length of the one-dimensional signal and the number of abstract features extracted, it is found that when the number of convolutional layers is 6, the number of resulting features is appropriate.

[0062] Specifically, the one-dimensional convolutional neural network adopted in this embodiment consists of 6 pairs of convolutional layers and pooling layers. A larger convolutional kernel size is used in the first convolutional layer, and as the number of layers increases, the size of the convolutional kernel gradually increases. The convolutional kernel sizes of convolutional layer -1 and convolutional layer -2 are 5, those of convolutional layer -3 and convolutional layer -4 are 7, the convolutional kernel size of convolutional layer -5 is 9, and the convolutional kernel size of convolutional layer -6 is 11.

[0063] In step 3 of this implementation, 24 prior knowledge features including time domain features, interphase features, frequency domain features, and non-linear features are manually extracted.

[0064] 1. Waveform features

[0065] The Pan-Tompkins algorithm is used to locate the R waves in the electrocardiogram signal. Based on the R wave location, the number of R waves in each electrocardiogram data and the amplitudes of all R waves are calculated. The number of R waves will be used as one of the features, and then the maximum value, minimum value, average value, and median value of the R wave amplitudes are calculated as features.

[0066] Standard deviation is a variable often used in the field of statistics. It can measure the degree of dispersion of data distribution. Now, a large number of studies apply standard deviation to time series. Many time series have irregular distributions, but their mean distributions show certain regularities. This requires an index to measure the relationship between each point in the time series and the mean. Therefore, statistical variables such as standard deviation are used to distinguish this situation of pseudo-regular distribution. In the present invention, the standard deviation of the R wave amplitude is calculated and used as one of the waveform features. Assuming that the time series has N points, defined as [X1, X2, X3... X N , and their mean is

[0067] The standard deviation S is calculated by the following formula:

[0068]

[0069] Based on the standard deviation, the skewness (SK) and kurtosis (KU) of the electrocardiogram record are calculated. Their calculation methods are as follows:

[0070]

[0071]

[0072] 2. Interphase Characteristics

[0073] The RR interval refers to the duration between two adjacent R waves in the ECG, which can reflect the duration of one cardiac contraction, and the heart rate of people is calculated based on this. The heart rate of patients with atrial fibrillation or other abnormal hearts may be irregular, and the RR intervals of their electrocardiogram signals will show excessive, too small, or unstable conditions. Therefore, after locating the R wave in the present invention, relevant parameters of the RR interval are calculated, namely the maximum value, minimum value, average value, median value, standard deviation, and heart rate characteristics of the RR interval. These characteristics can reflect whether a person's heart rate is normal from the side.

[0074] The PR interval refers to the time interval from the starting point of the P wave to the starting point of the QRS complex in the electrocardiogram signal. An overly long, overly short, or variable PR interval represents different conditions of the patient. Considering that there may be different situations for the separation of other categories in this database, in order to locate these situations to the greatest extent, relevant parameters of the PR interval are introduced, namely the maximum value, minimum value, median value, and standard deviation of the PR interval. Through the measurement of the PR interval, it is found that for some patients, the PR interval can well reflect the patient's condition.

[0075] 3. Frequency Domain Characteristics

[0076] In most machine learning methods, frequency domain characteristics are usually used to reflect the frequency and energy information in electrocardiogram records. The spectrum of the electrocardiogram segment is obtained through Fourier transform, and four frequency domain characteristics, namely the frequency centroid (FC), root mean square frequency (MSF), root mean square frequency (RMSF), and frequency variance (FV) of the electrocardiogram segment, are extracted and applied to the present invention. Assuming the frequency function is S(f), S represents the spectrum, and f represents the frequency of the segment. Their calculation methods are as follows:

[0077]

[0078]

[0079]

[0080]

[0081] 4. Nonlinear Characteristics

[0082] In this embodiment, the non-linear feature used is the permutation proportion entropy. This is a new entropy value improved based on permutation entropy, which is used to evaluate the complexity of time series. This method can reflect the amplitude difference between adjacent two data points in a certain time series. Traditional permutation entropy is very sensitive to signal mutations and various changes, so it is often used to measure the complexity of physiological signal sequences. However, permutation entropy does not measure the original time series, so some details in the time series will be lost, and permutation entropy is based on the sorting between data points, which also means that permutation entropy ignores the differences between adjacent data points. Combining the above points, permutation entropy will lose a lot of amplitude information, and using it in some occasions will reduce the test accuracy. Permutation proportion entropy can solve this problem by constructing a relationship matrix of adjacent elements, and better reflect the degree of chaos of the time series.

[0083] PRE first constructs a new relationship matrix B to represent the relationship between adjacent elements, and then calculates the number of new patterns c. Let B(i) be the i-th row vector of matrix B, and c(i) be the number of the i-th pattern. For B(i), when another vector B(j) of matrix B has the same pattern as B(i), then c(i) is incremented by 1, and at this time the two have a very high correlation; when each vector of matrix B represents a new pattern, the maximum total number of patterns c is n - m - 1, where n represents the points of the time series and m represents the embedding dimension of the matrix. Finally, the total number of patterns c contained in matrix B can be obtained.

[0084] Among them, P i is the probability of pattern c(i), and its definition is as follows:

[0085]

[0086] The definition of PRE is as follows:

[0087]

[0088] Among them, k is the total number of patterns c, and j only represents the serial number.

[0089] As Figure 6 shown, in order to prove the influence on noise classification in a low signal-to-noise ratio environment, this embodiment compares the results after removing the entropy value feature of non-linearity. It can be seen that whether it is the overall classification performance or the performance of noise classification, the classification effect is significantly improved after adding the entropy value feature. When classifying after removing the entropy value feature, the overall accuracy is 0.832, the F1 score is 0.807, and the F1 score for the noise category is only 0.668; after adding all features, the overall accuracy reaches 0.862, and the F1 score also reaches 0.815. The most obvious change is the F1 score for the noise category, which proves that entropy is effective for noise recognition.

[0090] In this embodiment, the noise can also be separated by using a deep learning algorithm or statistical features.

[0091] In step 4 of this embodiment, a hierarchical pyramid feature fusion vector is obtained, which specifically includes:

[0092] Step 4-1: Use the extracted abstract features as the features of each layer of the multi-level pyramid.

[0093] Step 4-2: Divide the extracted prior knowledge features according to the number of layers of the constructed multi-level pyramid minus 1 to obtain multiple prior knowledge feature groups with equal numbers.

[0094] Step 4-3: Starting from the second layer of the multi-level pyramid, sequentially add prior knowledge feature groups different from the previous layer to obtain the feature fusion vector of each layer of the pyramid.

[0095] In this embodiment, taking the construction of a 4-layer hierarchical pyramid as an example, the 38 abstract features extracted by the one-dimensional convolutional neural network are used as the top part of the pyramid, and 8 prior knowledge features are sequentially added to each layer downward.

[0096] As shown in formula (10), define S as the abstract feature, which contains 38 extracted features. Define R as the prior knowledge feature, where R1 represents the 1st to 8th prior knowledge feature vectors, R2 represents the 9th to 16th prior knowledge feature vectors, and R3 represents the 17th to 24th prior knowledge feature vectors.

[0097]

[0098] As Figure 3 shown, after the hierarchical pyramid feature fusion, the first-layer fusion feature is S, the second-layer fusion feature is S + R1, the third-layer fusion feature is S + R1 + R2, and the fourth-layer fusion feature is S + R1 + R2 + R3.

[0099] In step 5 of this embodiment, the random forest algorithm is used to train and classify the data. The random forest is composed of several decision trees inherited together, and each decision tree is a very small classifier. The random forest combines all the classification results to determine the final output category.

[0100] For the random forest, a random forest consisting of 300 decision trees is used, where each node randomly selects features during the generation process. Each tree is trained using Bootstrap, and the number of features in the randomly selected feature subset at each split is the square root of the total number of features.

[0101] After obtaining the fusion features of each layer of the hierarchical cone in step 4, the features of each layer are input into the random forest classifier in sequence from top to bottom. For the same data, the results ① - ④ may be the same or different. Finally, the classification weights are calculated according to the ratio of 1:2:3:4 to obtain the final classification result of a certain piece of data.

[0102] To prove the effectiveness of the hierarchical cone-shaped feature structure in improving the classification performance, the feature vectors of each layer are tested separately. The feature vectors of layers ① - ④ are input into the random forest classifier, and it is found that the final classification result of each piece of data is unstable. Generally speaking, the more the number of features, the more accurate the classification result, but there are also special cases. After calculating the weights of the results obtained by the hierarchical cone-shaped feature structure according to the ratio, the result is the best, proving that the present invention is effective for the classification effect.

[0103] In this embodiment, not only the widely used accuracy, sensitivity, and specificity are used as evaluation indicators, but also the F1 score is used as an evaluation indicator according to the competition rules of PhysioNet / CinC Challenge 2017.

[0104] The calculation of precision is as follows:

[0105]

[0106] Among them, TP represents the number of samples correctly classified as the positive class, FP represents the number of samples misclassified as the negative class, TN represents the number of samples correctly classified as the negative class, and FN represents the number of samples misclassified as the positive class.

[0107] The calculation of recall is as follows:

[0108]

[0109] The calculation of F1 score is as follows:

[0110]

[0111] The F1 score is defined as follows:

[0112] Normal heart rate:

[0113] Atrial fibrillation:

[0114] Other heart rhythms:

[0115] Noise:

[0116] In the formula, F 1n 、F 1a 、F 1o and F 1pThe F1 scores defined as categories N, A, O, and P respectively. The capital letters in Nn, Aa, Oo, Pp represent the number of records in the reference classification, and the lowercase letters represent the number of records in the predicted classification. ∑N represents the number of records with the reference classification of N, ∑n represents the number of records with the predicted classification of N, ∑A represents the number of records with the reference classification of A, ∑a represents the number of records with the predicted classification of A, ∑O represents the number of records with the reference classification of O, ∑o represents the number of records with the predicted classification of O, ∑P represents the number of records with the reference classification of and ∑p represents the number of records with the predicted classification of . The capital letters represent the categories of the data, and the lowercase letters represent the categories of the model classification.

[0117] A new evaluation method is proposed based on F1. This evaluation method does not calculate the classification results of noise. The F1 scores of normal heart rate, atrial fibrillation heart rate, and other types of heart rate are calculated separately, and the macro-average value of the three is taken to obtain the final F1 score. According to Clifford's method, we calculate the final F1 score, and its definition is:

[0118]

[0119] As Figure 5 shown, in this embodiment, 1684 test sets are used to evaluate the model. The recall rate, precision rate, F1 scores of each category, overall accuracy rate, and average score are used to evaluate the model architecture used in this article. By calculating the average value, it can be seen that the recall rate, precision rate, and F1 scores all exceed 0.8. It is worth noting that in the noise classification, the F1 score reaches 0.732.

[0120] Embodiment 2

[0121] The purpose of this embodiment is to provide an electrocardiogram classification system based on hierarchical pyramid-shaped feature fusion, including:

[0122] An acquisition module, which is configured to acquire the electrocardiogram data to be recognized for preprocessing to obtain a one-dimensional electrocardiogram signal;

[0123] A first feature extraction module, which is configured to perform abstract feature extraction on the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network;

[0124] A second feature extraction module, which is configured to extract prior knowledge features from the electrocardiogram data;

[0125] A feature fusion module, which is configured to construct a multi-level pyramid to perform feature fusion on the extracted abstract features and prior knowledge features to obtain the feature fusion vectors of each layer of the pyramid;

[0126] A classification module, configured to input the feature fusion vectors of each layer of the hierarchical cone into a random forest classifier for classification to obtain a classification result.

[0127] Embodiment III

[0128] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the above method are implemented.

[0129] Embodiment IV

[0130] The purpose of this embodiment is to provide a computer-readable storage medium.

[0131] A computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the above method are executed.

[0132] The steps involved in the devices of the above Embodiments II, III, and IV correspond to those of Method Embodiment I. For specific implementation manners, reference may be made to the relevant description part of Embodiment I. The term "computer-readable storage medium" should be understood to include a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode, or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0133] Those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computer device. Optionally, they can be implemented by program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0134] Although the specific implementation manners of the present invention are described above in conjunction with the accompanying drawings, it is not a limitation to the protection scope of the present invention. Those skilled in the art should understand that, based on the technical solutions of the present invention, various modifications or deformations that can be made without creative efforts by those skilled in the art are still within the protection scope of the present invention.

Claims

1. An electrocardiogram classification method based on hierarchical pyramid feature fusion, characterized in that, It includes the following steps: Obtain the electrocardiogram data to be recognized and perform preprocessing to obtain a one-dimensional electrocardiogram signal; Extract abstract features from the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network; Extract prior knowledge features from the electrocardiogram data; Construct a multi-level pyramid to fuse the extracted abstract features and prior knowledge features to obtain a feature fusion vector for each layer of the pyramid. Specifically, it includes: Use the extracted abstract features as the features for each layer of the multi-level pyramid; Divide the extracted prior knowledge features according to the number of layers of the constructed multi-level pyramid minus 1 to obtain multiple prior knowledge feature groups with equal numbers; Starting from the second layer of the multi-level pyramid, sequentially add prior knowledge feature groups different from the previous layer to obtain a feature fusion vector for each layer of the pyramid; Input the feature fusion vector for each layer of the pyramid into a trained random forest classifier for classification to obtain a classification result.

2. The electrocardiogram classification method based on hierarchical cone-shaped feature fusion according to claim 1, wherein The one-dimensional convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer, and the convolutional kernel size shows an upward trend from the first convolutional layer to the last convolutional layer.

3. The electrocardiogram classification method based on hierarchical pyramid feature fusion according to claim 1, wherein, The prior knowledge features include, but are not limited to, time domain features, interval features, frequency domain features, and non-linear features.

4. The electrocardiogram classification method based on hierarchical pyramid feature fusion according to claim 3, wherein The non-linear feature is permutation proportion entropy, and the permutation proportion entropy retains the signal amplitude information by constructing a relationship matrix of adjacent elements.

5. The electrocardiogram classification method based on hierarchical pyramid feature fusion according to claim 1, wherein, Perform weight assignment on the feature fusion vector for each layer of the pyramid, and then sequentially input the feature fusion vectors for each layer from top to bottom into a trained random forest classifier to obtain the final classification result.

6. An electrocardiogram classification system based on hierarchical pyramid feature fusion, characterized in that, It includes: An acquisition module configured to obtain the electrocardiogram data to be recognized and perform preprocessing to obtain a one-dimensional electrocardiogram signal; A first feature extraction module configured to extract abstract features from the one-dimensional electrocardiogram signal based on a one-dimensional convolutional neural network; A second feature extraction module configured to extract prior knowledge features from the electrocardiogram data; A feature fusion module configured to construct a multi-level pyramid to fuse the extracted abstract features and prior knowledge features to obtain a feature fusion vector for each layer of the pyramid. Specifically, use the extracted abstract features as the features for each layer of the multi-level pyramid; Divide the extracted prior knowledge features according to the number of layers of the constructed multi-level pyramid to obtain multiple prior knowledge feature groups with equal numbers; Starting from the second layer of the multi-level pyramid, sequentially add prior knowledge feature groups different from the previous layer to obtain a feature fusion vector for each layer of the pyramid; A classification module configured to input the feature fusion vector for each layer of the pyramid into a random forest classifier for classification to obtain a classification result.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in a method for electrocardiogram classification based on hierarchical pyramid type feature fusion as described in any one of claims 1-5.

8. A processing device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in a method for electrocardiogram classification based on hierarchical pyramid type feature fusion as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Classification method for arrhythmia based on one-dimension convolution neural-network and S transformation

    CN107811626A

  • Electroencephalogram and electrocardiogram-based fatigue detection method of electrocardiogram sensor embedded into steering wheel

    CN111407260A