ECG Classification Method and System Based on Multi-Granularity Cascade Hybrid Network

The extraction and classification of ECG features through a multi-particle cascade hybrid network has been solved, and the problem of insufficient robustness of inter-patient data, imbalanced data and noisy data of the existing central electrogram classification system has been solved, and efficient and accurate identification of ECG classification of coronary artery disease and congestive heart failure has been achieved.

CN116269423BActive Publication Date: 2025-07-18NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310207110.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2025-07-18
Estimated Expiration
2043-03-06

AI Technical Summary

Technical Problem

Existing ECG classification systems are less robust when processing inter-patient datasets, imbalanced data and noise-containing data, and are difficult to process small-scale data.

Method used

Multi-particle cascade hybrid network is used, including multi-particle cascade task-related component analysis-primary component analysis network (MGC-TPNet), multi-particle cascade independent component analysis-primary component analysis network (MGC-IPNet), and cascading weighted average and Dempster-Shafer (CWA-DS). The correlation characteristics between multi-scale leads are mined through MGC-TPNet, and the multi-scale single-lead specific features are mined, and decision-making probability fusion is carried out through LSVM and CWA-DS.

Benefits of technology

It shows excellent performance in distinguishing between normal, coronary disease and congestive heart failure heart failure heartbeat, can effectively process noise-containing data, has significant noise robustness, and can effectively process small-scale data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116269423B_ABST
    Figure CN116269423B_ABST
Patent Text Reader

Abstract

The present invention discloses an electrocardiogram classification method and system based on a multi-granularity cascaded hybrid network. The classification method performs electrocardiogram feature extraction and classification through the constructed multi-granularity cascaded hybrid network. The multi-granularity cascaded hybrid network includes a multi-granularity cascaded task-related component analysis - principal component analysis network (MGC-TPNet), a multi-granularity cascaded independent component analysis - principal component analysis network (MGC-IPNet), and cascaded weighted average and Dempster-Shafer (CWA-DS). Among them, MGC-TPNet is used to mine the multi-scale inter-lead correlation features in the electrocardiogram signal, while MGC-IPNet is used to mine the multi-scale single-lead specific features. Then, a linear support vector machine processes the above multi-scale features to obtain decision probabilities. Finally, CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label. The method of the present invention shows excellent performance in distinguishing normal, CAD, and CHF heartbeats; and the method can effectively identify and process noisy or small-scale data, and has significant noise robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electrocardiogram classification method and system based on a multi-granularity cascaded hybrid network, belonging to the field of biomedical signal processing and intelligent recognition. Background Art

[0002] Cardiovascular diseases are an important factor leading to human death globally. According to the American Heart Association, more than 17 million people worldwide suffer from cardiovascular diseases every year. In 2019, the Global Health Assessment Report stated that CVD had caused approximately 9 million deaths, exceeding the death tolls of other common non-communicable diseases (such as lung cancer, tuberculosis, Alzheimer's disease, and diabetes). Among various cardiovascular diseases, Coronary Artery Disease (CAD) is the main cause of death, accounting for more than 40% of the deaths. As a non-communicable disease with a very high prevalence, CAD is caused by the accumulation of plaques such as cholesterol and fatty substances in the coronary arteries, which obstructs the blood circulation of the heart. Therefore, CAD usually causes symptoms such as chest tightness and palpitations in patients. More seriously, long-term coronary artery disease is prone to deteriorate into Congestive Heart Failure (CHF), with a five-year mortality rate of 50%. Therefore, timely diagnosis and treatment of CAD and CHF patients are important means to reduce the mortality rate. Medical staff often diagnose CAD and CHF by observing the waveform changes of the electrocardiogram (ECG). When the symptoms of CAD and CHF are mild, the changes in the ECG signal are very subtle, which poses challenges and difficulties for medical staff in the process of diagnosing heart abnormalities. Therefore, developing an accurate and efficient computer-based intelligent recognition system is particularly important for the diagnosis of CAD and CHF.

[0003] In recent years, many researchers have developed machine learning (ML)-based ECG recognition systems for the automatic diagnosis of CAD and CHF. Usually, an ECG recognition system includes three main steps: preprocessing, feature extraction, and classification. First, the preprocessing stage typically includes denoising, segmentation, and normalization, which are used to convert the original long-term ECG into a noise-free standard short-term ECG segment. The aim is to improve the quality of the ECG waveform and increase the sample size. Then, the feature extraction stage is used to mine discriminative features and reduce redundant information in the ECG signal, thereby improving the performance of the subsequent classification stage. Therefore, designing a feature extraction method with the ability to mine key information is crucial for developing a high-performance ECG diagnosis system. Finally, in the classification stage, the classifier model processes the above features to obtain the final heartbeat label. For example, in 2017, Caliskan et al. proposed an ECG feature extraction and classification method based on a deep neural network (DNN), achieving a recognition accuracy of 92.2% by identifying CAD heartbeats. In 2019, Acharya et al. proposed an ECG feature extraction and classification system based on a convolutional neural network (CNN), achieving an accuracy of 96% by identifying CHF heartbeats; in 2020, Hussain et al. extracted non-linear features from ECGs and achieved a CHF recognition accuracy of 93.1% by using a support vector machine as a classifier; in the same year, Lih et al. proposed an ECG feature extraction and classification method based on CNN and long short-term memory (LSTM), achieving an accuracy of 98.6% by differentiating CAD and CHF heartbeats.

[0004] Although the above studies have shown excellent performance in the automatic recognition of CAD and CHF, some problems remain unresolved. First, most studies only use within-patient experiments to verify the classification performance of the system. Within-patient experiments mean that the training and test set data are from the same patients. However, since the ECG records both the information of cardiac abnormal states and the inter-individual difference information at the same time, and it is difficult to exclude the negative impact of inter-individual difference information in within-patient experiments, this leads to overfitting when the system developed based on within-patient experiments processes the ECGs of other patients. Therefore, between-patient experiments are particularly important for verifying the performance of the proposed classification system. Second, these studies ignore verifying the ability of the system to handle extremely imbalanced data. In real-world scenarios, there are unpredictable differences in the number of electrocardiograms collected between classes, and even the data ratio may exceed an order of magnitude, which causes the established model to tend to match the class with the largest data scale, that is, overfitting. Although the data used in most studies is not completely balanced, the difference in the number of heartbeats between classes is much less than an order of magnitude. Therefore, it cannot be proven that the system has a strong ability to process imbalanced data. Third, most researchers do not verify the noise robustness of the classification system. Specifically, they usually remove the noise in the ECG during the preprocessing stage. However, since the signal-to-noise ratio of the ECGs obtained in different environments is usually different, the design process of accurate denoising algorithms is complex and highly dependent on the experience of the researchers. In addition, denoising methods usually cannot avoid removing some useful information for classification. Therefore, during the process of developing an ECG recognition system, it is necessary to ensure that the proposed method has a certain degree of noise robustness to avoid relying on accurate denoising algorithms. Although some researchers do not remove the ECG noise before the electrocardiogram features, since the database creators have removed the main noise in the electrocardiograms of all subjects, these studies are not sufficient to prove the noise robustness of the algorithm. Fourth, the excellent performance of machine learning usually depends on a large amount of data. However, in some cases, due to limited patient numbers or poor quality of acquisition devices, only limited training data can be obtained. But for these related studies, the researchers used a large number of electrocardiograms as training data, and it is difficult to guarantee the ability of the classification system to process small-scale data. Therefore, it is particularly important to verify the classification performance of the system in small-scale data. Summary of the Invention

[0005] Object of the Invention: The object of the present invention is to solve the problem that the existing intelligent recognition technologies for Coronary Artery Disease (CAD) and Congestive Heart Failure (CHF) have poor robustness to between-patient datasets, imbalanced data, and noisy data, and to provide an electrocardiogram classification method based on a multi-granularity cascaded hybrid network that can effectively identify noisy data and has significant noise robustness; another object of the present invention is to provide an electrocardiogram classification system based on a multi-granularity cascaded hybrid network.

[0006] Technical solution: A method for classifying electrocardiograms based on a multi-granularity cascaded hybrid network according to the present invention, the classification method comprising:

[0007] Obtain the electrocardiogram of the first lead and the electrocardiogram of the second lead;

[0008] Preprocess the electrocardiogram of the first lead and the electrocardiogram of the second lead respectively;

[0009] Extract and classify electrocardiogram features through the constructed multi-granularity cascaded hybrid network, which includes a multi-granularity cascaded task-related component analysis - principal component analysis network (MGC-TPNet), a multi-granularity cascaded independent component analysis - principal component analysis network (MGC-IPNet), and cascaded weighted average and Dempster-Shafer (CWA-DS); among them, MGC-TPNet is used to mine the multi-scale inter-lead correlation features in the electrocardiogram signal, while MGC-IPNet is used to mine the multi-scale single-lead specific features, and then a linear support vector machine processes the above multi-scale features to obtain decision probabilities. Finally, CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

[0010] As a further improvement of the above solution, the method for preprocessing the electrocardiograms of the first lead and the second lead includes:

[0011] Heartbeat segmentation: Use the segment alignment segmentation method to divide the long-term electrocardiogram signal into short-term heartbeats;

[0012] Normalization: The difference normalization method is used to normalize the amplitude of the heartbeat to between 0 and 1;

[0013] Matrix formation: Reconstruct the heartbeats of N sample points into a two-dimensional electrocardiogram matrix with a size of n×m.

[0014] As a further improvement of the above solution, the multi-granularity cascaded task-related component analysis - principal component analysis network (MGC-TPNet) is composed of a multi-granularity scanning layer, a task correlation analysis convolutional layer, a primary output layer, a principal component analysis convolutional layer, and a cascaded output layer, and is used to extract multi-scale inter-lead correlation features from the dual-lead electrocardiogram.

[0015] Preferably, the task correlation analysis convolutional layer is specifically:

[0016] According to equation (2), obtain the task-related component r(t) and the task-unrelated component u(t) from u(t);

[0017]

[0018] Where and maps \(r(t)\) and \(u(t)\) to \(X\). c is the confusion coefficient;

[0019] The task-related component \(r(t)\) needs to be extracted according to Equation (3);

[0020]

[0021] To obtain \(y(t)=r(t)\), it is necessary to implement and The problem is solved by maximizing the covariance between trials; Equation (4) describes all possible combinations of the covariance between the \(h1\)th and \(h2\)th trials;

[0022]

[0023] where \(x\) h (t) and \(y\) h (t) represent the electrocardiogram data and the task-related component of the \(h\)th trial respectively, and the trial interval is \(t\in[t\) h ,t h +T], and

[0024] The variance of \(y(t)\) is constrained by Equation (5);

[0025]

[0026] Solve the constrained optimization problem of Equation (5) according to Equation (6);

[0027]

[0028] Calculate the TRCA convolution kernel according to Equation (7);

[0029] \(W\) l 1 =\(mat\) k (q l (Q -1 S)), \(l = 1, 2, \cdots, L1\) (7)

[0030] where \(q\) l () extracts \(L1\) eigenvectors from \(Q\) -1 S in descending order of their corresponding eigenvalues, and \(mat\) k () maps each eigenvector to the corresponding TRCA convolution kernel \(W\) l 1 ;

[0031] Then, convolve the TRCA convolution kernel \(W\) l 1 with \(X\) c to obtain the first-order feature matrix

[0032] As a further improvement of the above solution, the multi-granularity cascaded independent component analysis - principal component analysis network (MGC-IPNet) mainly consists of a multi-granularity scanning layer, an independent component analysis convolutional layer, a primary output layer, a principal component analysis convolutional layer, and a cascaded output layer, and is used to extract multi-scale single-lead specific features from the most valuable lead electrocardiograms in the first-lead electrocardiogram and the second-lead electrocardiogram.

[0033] Preferably, the independent component analysis convolutional layer is specifically:

[0034] Whiten X using PCA technology c To calculate matrix Z c = V c X c where is the whitening matrix.

[0035] Process Z with the FastICA tool with Gaussian nonlinearity c To calculate the orthogonal matrix B c .

[0036] The orthogonal matrix B c is used to calculate the demixing matrix

[0037] Calculate the ICA convolution kernel W according to equation (9) l 1 .

[0038]

[0039] where mat k () reconstructs each eigenvector as the corresponding ICA convolution kernel W l 1 , l = 1, 2, …, L1.

[0040] The ICA convolution kernel W l 1, l = 1, 2, …, L1 is convolved with X c to obtain the first-order feature matrix

[0041] Preferably, the principal component analysis convolutional layer is specifically:

[0042] A window with side length k scans each first-order eigenvector with a step size of 1 to obtain matrix blocks and subtract the mean value from the elements of each matrix block;

[0043] Convert these mean-free matrix blocks into vectors

[0044] After processing all the first-order feature matrices, combine all the vectors Obtain and

[0045] According to Equation (10), calculate L2 PCA convolution kernels

[0046]

[0047] Calculate the second-order feature matrix

[0048] On the other hand, the present invention provides an electrocardiogram classification system applying the above electrocardiogram classification method, and the electrocardiogram heartbeat classification system includes:

[0049] A data acquisition module, configured to acquire a first-lead electrocardiogram and a second-lead electrocardiogram;

[0050] A preprocessing module, configured to preprocess the first-lead electrocardiogram and the second-lead electrocardiogram in the data acquisition module;

[0051] An electrocardiogram feature extraction and classification module, which extracts and classifies electrocardiogram features based on a multi-granularity cascaded hybrid network; wherein, the multi-granularity cascaded hybrid network includes a multi-granularity cascaded task-related component analysis - principal component analysis network (MGC-TPNet), a multi-granularity cascaded independent component analysis - principal component analysis network (MGC-IPNet), and cascaded weighted average and Dempster-Shafer (CWA-DS); wherein MGC-TPNet is used to mine multi-scale inter-lead correlation features in the electrocardiogram signal, while MGC-IPNet is used to mine multi-scale single-lead specific features, and then a linear support vector machine processes the above multi-scale features to obtain decision probabilities, and finally CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

[0052] On the other hand, the present invention provides a computer device, which includes a memory and a processor, and the memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the above electrocardiogram classification method.

[0053] On the other hand, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above electrocardiogram classification method.

[0054] Advantageous effects: Compared with the prior art, the present invention has the following remarkable advantages:

[0055] (1) Demonstrate excellent performance in distinguishing normal, CAD, and CHF heartbeats;

[0056] (2) Effectively identify noisy data and have significant noise robustness;

[0057] (3) Effectively process small-scale data. Description of the Drawings

[0058] Figure 1 Shown is the overall flowchart of the electrocardiogram classification method according to an embodiment of the present invention;

[0059] Figure 2 Shown is the schematic flowchart of the preprocessing method according to an embodiment of the present invention;

[0060] Figure 3 Shown is the schematic structural diagram of MGC-TPNet according to an embodiment of the present invention;

[0061] Figure 4 Shown is the schematic structural diagram of MGC-IPNet according to an embodiment of the present invention;

[0062] Figure 5 Shown is the system diagram of the electrocardiogram classification according to an embodiment of the present invention;

[0063] Figure 6 Shown is the experimental result diagram of the method according to an embodiment of the present invention on a noisy data set. Detailed Embodiments

[0064] The technical solutions of the present invention will be further described below with reference to the accompanying drawings.

[0065] An embodiment of the present invention provides an electrocardiogram classification method based on a multi-granularity cascaded hybrid network: First, the electrocardiogram signal is segmented into several heartbeats during preprocessing. Then, MGCH-Net is developed as an electrocardiogram feature extraction and classification method, which can be regarded as consisting of a Multi-granularity Cascaded Task-Related Component Analysis-Principal Component Analysis Network (MGC-TPNet), a Multi-granularity Cascaded Independent Component Analysis-Principal Component Analysis Network (MGC-IPNet), and a Cascaded Weighted Average and Dempster-Shafer (CWA-DS). Among them, MGC-TPNet is used to mine the multi-scale inter-lead correlation features in the electrocardiogram signal, while MGC-IPNet is used to mine the multi-scale single-lead specific features. Then, a Linear Support Vector Machine (LSVM) processes the above multi-scale features to obtain decision probabilities. Finally, CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

[0066] Figure 1 The following shows the overall flowchart of the electrocardiogram classification method according to the embodiment of the present invention. An embodiment of the present invention provides an electrocardiogram classification method based on a multi-granularity cascaded hybrid network, which includes:

[0067] S100 Obtain the electrocardiogram of the first lead and the electrocardiogram of the second lead;

[0068] S200 Preprocessing: Use the segment alignment and segmentation method to segment the long-term electrocardiogram signal into heartbeats, normalize the amplitude of the heartbeats, and convert it into an electrocardiogram matrix;

[0069] S300 Perform electrocardiogram feature extraction and classification through the constructed multi-granularity cascaded hybrid network:

[0070] S310 Use MGC-TPNet to extract the multi-scale inter-lead correlation feature 1 in the dual-lead heartbeats;

[0071] S320 Use MGC-IPNet to extract the multi-scale single-lead specific feature as feature 2 from the most valuable lead;

[0072] S330 uses the LSVM and softmax functions to process various features at different scales to obtain decision probabilities;

[0073] S340 uses the CWA-DS method to fuse all decision probabilities to obtain the final classification result, realizing the intelligent identification of CAD and CHF.

[0074] Figure 2 As shown, it is a schematic flowchart of the preprocessing method in the embodiment of the present invention, which is used to further explain the preprocessing stage. The preprocessing method in the embodiment of the present invention mainly includes the following steps:

[0075] S210 Heartbeat segmentation stage:

[0076] In this work, the segment alignment segmentation method is used to divide the long-term electrocardiogram signal into short-term heartbeats. First, the position of the R point is determined according to the annotation. Then, the sampling points 0.06 seconds before and after the R point are set as points A1 and A2. For each R peak, the previous R peak is set as point R1, and the samples 0.1 seconds after that are set as point B1, while the next R peak is R2, and the sampling 0.1 seconds before that is set as point B2. After the above operations, three segments will be obtained, namely B1-A1, A1-A2, and B1-B2. Then, each segment is resampled to 100. Finally, these segments are connected to obtain a heartbeat containing 300 sampling points.

[0077] S220 Normalization stage:

[0078] Then, deviation normalization is used to normalize the amplitude of the heartbeat between 0 and 1.

[0079] S230 Matrix formation stage:

[0080] The 300-sample-point heartbeat is reconstructed into a two-dimensional electrocardiogram matrix with dimensions of n×m, and the electrocardiogram matrices obtained from the dual-lead electrocardiogram signals are respectively represented as where c is the lead number and i is the sample number.

[0081] Figure 3 As shown, it is a schematic structural diagram of MGC-TPNet in the embodiment of the present invention, which is used to further explain MGC-TPNet. MGC-TPNet mainly consists of a multi-granularity scanning layer, a task-related component analysis (TRCA) convolutional layer, a primary output layer, a principal component analysis (PCA) convolutional layer, and a cascaded output layer, and is used to realize the feature extraction of dual-lead ECG. MGC-TPNet includes:

[0082] S3101 Multi-granularity scanning layer:

[0083] For each element in , scan it with a window of side length (granularity value) \(k = 3, 5, \ldots, K\) (\(k\) is odd) with a step size of 1 above to obtain a number of matrix blocks

[0084] Subtract the average value of all elements in the corresponding matrix block from each element in the special matrix block, and reconstruct it into a vector

[0085] By combining all vectors to obtain a first-order matrix to be processed

[0086] S3102 TRCA convolutional layer:

[0087] According to equation (2), obtain the task-related component \(r(t)\) and the task-unrelated component \(u(t)\) from \(u(t)\).

[0088]

[0089] where and are the confusion coefficients that map \(r(t)\) and \(u(t)\) to \(X\) c .

[0090] The task-related component \(r(t)\) needs to be extracted according to equation (3).

[0091]

[0092] To obtain \(y(t)=r(t)\), it is necessary to implement and and use inter-trial covariance maximization to solve this problem. Equation (4) describes all possible combinations of the covariance between the \(h1\) and \(h2\) trials.

[0093]

[0094] where \(x\) h (t) and \(y\) h (t) represent the electrocardiogram data and the task-related component of the \(h\)th trial respectively, and the interval of the trial is \(t\in[t h ,t h +T]\), and

[0095] The variance of \(y(t)\) is constrained by equation (5).

[0096]

[0097] Solve the constrained optimization problem of equation (5) according to equation (6).

[0098]

[0099] Calculate the TRCA convolution kernel according to equation (7).

[0100] W l 1 = mat k (q l (Q -1 S)), l = 1, 2, …, L1 (7)

[0101] where q l () extracts L1 eigenvectors from Q -1 S in descending order of their corresponding eigenvalues, and mat k () maps each eigenvector to the corresponding TRCA convolution kernel W l 1 .

[0102] Then, convolve the TRCA convolution kernel W l 1 with X c to obtain the first-order feature matrix

[0103] S3103 First-order output layer:

[0104] First, use the hash coding function H(·) to convert each FOF matrix into a binary matrix, which maps positive values to 1 and other values to 0.

[0105] Then, calculate the decimal matrix where the range of the element values is

[0106] Then, use the block histogram statistical method to obtain the first-level feature vectors. Specifically, extract P sample blocks b i 1 with a size of u1×u2 from Ψ p 1 with an overlap rate R, p = 1, …, P.

[0107] Finally, for each granularity k, use histogram statistics to process all sample blocks to obtain the first-level feature vectors

[0108] S3104 PCA convolution layer:

[0109] Adopt a window of size k 2 to scan each with a step size of 1 to obtain matrix blocks and subtract the average value of all elements of the corresponding matrix block from each element of the matrix block.

[0110] Convert each zero-mean matrix block into a vector

[0111] After obtaining all calculate and where Y c is the second-order matrix to be processed.

[0112] Calculate the PCA convolution kernel according to formula (8).

[0113]

[0114] where q l () extracts L2 eigenvectors with the largest eigenvalues from the covariance matrix of Y c , and mat k () maps these eigenvectors to the PCA convolution kernel

[0115] PCA convolution kernel convolves with Y c to obtain the second-order feature matrix

[0116] S3105 Cascade output layer:

[0117] Similar to the primary output layer, convert all second-order matrices to be processed into decimal matrices Then, with an overlap rate R from extract sample blocks b of size u1×u2 l,p , l = 1, …, L1, p = 1, … P. Next, process all sample blocks b using the histogram statistics method l,p to obtain the second-level feature vectors Finally, concatenate the first-level feature vectors and the second-level feature vectors to obtain the concatenated feature vectors

[0118] Figure 4 The following shows the structural schematic diagram of MGC-IPNet according to an embodiment of the present invention, which is used to further explain MGC-TPNet. It mainly consists of a multi-granularity scanning layer, an independent component analysis (ICA) convolution layer, a primary output layer, a principal component analysis (PCA) convolution layer, and a cascade output layer, and is used to extract single-lead specific features from the most valuable leads of the ECG. MGC-TPNet includes:

[0119] S3201 Multi - granularity scanning layer:

[0120] Similar to the multi - granularity scanning layer of MGC - TPNet, it scans with a window of side length (granularity value) k to obtain matrix blocks and subtract the average value of all elements of the corresponding feature block from each element of the matrix block..

[0121] Reconstruct all mean - free matrix blocks into vectors

[0122] By combining all vectors to obtain the first - order matrix to be processed

[0123] S3202 ICA convolution layer:

[0124] Use the PCA technique to whiten X c to calculate matrix Z c = V c X c where is the whitening matrix.

[0125] Process Z with the FastICA tool with Gaussian non - linearity c to calculate the orthogonal matrix B c .

[0126] The orthogonal matrix B c is used to calculate the demixing matrix

[0127] Calculate the ICA convolution kernel W according to equation (9) l 1 .

[0128]

[0129] where mat k () reconstructs each eigenvector into the corresponding ICA convolution kernel W l 1, l = 1, 2, …, L1.

[0130] The ICA convolution kernel W l 1, l = 1, 2, …, L1 convolves with X c to obtain the first - order feature matrix

[0131] S3203 First - order output layer:

[0132] Similar to the first - order output layer of MGC - TPNet, convert each Γ i into a decimal matrix Then, with an overlap rate R from Extract P sample blocks b of size u1×u2 p , where p = 1, …, P. Finally, for each granularity k, histogram statistics are performed on all sample blocks to obtain the first-level feature vector

[0133] S3204 PCA Convolutional Layer:

[0134] Similar to the PCA convolutional layer of MGC-TPNet, a window with side length k scans each first-order feature vector with a step size of 1 to obtain matrix blocks and subtract the mean of all elements of each matrix block from the elements of each matrix block.

[0135] Convert these mean-free matrix blocks into vectors

[0136] After processing all first-order feature matrices, combine all vectors to obtain and

[0137] According to equation (10), calculate L2 PCA convolution kernels

[0138]

[0139] where the functions q l () and mat k () are the same as those in equation 7.

[0140] Calculate the second-order feature matrix

[0141] S3205 Cascade Output Layer:

[0142] Similar to the primary output layer, convert all second-order feature matrices into decimal matrices

[0143] Extract sampling blocks b of size u1×u2 from with an overlap rate R l,p , where l = 1, …, L1, p = 1, …, P.

[0144] Perform histogram statistics on all b l,p to obtain the second-level feature vector

[0145] Cascade and to obtain the final feature vector

[0146] In the embodiment of the present invention, S330 processes various features at different scales using LSVM and softmax functions to obtain decision probabilities, specifically including:

[0147] S3301 LSVM classification:

[0148] Use the LSVM classifier to process the features of each electrocardiogram matrix and to obtain the decision value corresponding to each label h i of and

[0149] S3302 Probability assignment:

[0150] According to formula (11), use the softmax function to convert all decision values and into decision probabilities and

[0151]

[0152] where method is MGC-TPNet or MGC-IPNet.

[0153] In the embodiment of the present invention, S340 uses the CWA-DS method to fuse all decision probabilities to obtain the final classification result and realize the intelligent identification of CAD and CHF, specifically including:

[0154] CWA-DS decision layer information fusion:

[0155] For MGC-TPNet or MGC-IPNet, according to equation (12), use the weighted average method to fuse the features under various granularity values k or to obtain the multi-granularity probability s i,h,method .

[0156]

[0157] where SE h is the recall rate of each category obtained by MGC-TPNet or MGC-IPNet and LSVM in the validation set experiment.

[0158] According to formula (13), use the weighted D-S combination rule to process all s i,h,method to obtain the final classification result.

[0159]

[0160] where SE h,MGC-TPNet and SEh,MGC-IPNet They are the recall rates of each category obtained by MGC-TPNet or MGC-IPNet features and LSVM in the validation set experiment, and the one with the largest m a (I i ) The label h is used as the final prediction result of the electrocardiogram matrix I i .

[0161] Figure 5 Fig. shows a system diagram of an electrocardiogram classification system according to an embodiment of the present invention. The electrocardiogram classification system 400 includes:

[0162] A data acquisition module 410 for acquiring a first-lead electrocardiogram and a second-lead electrocardiogram;

[0163] A preprocessing module 420 for preprocessing the first-lead electrocardiogram and the second-lead electrocardiogram in the data acquisition module;

[0164] An electrocardiogram feature extraction and classification module 430, which extracts and classifies electrocardiogram features based on a multi-granularity cascaded hybrid network; wherein, the multi-granularity cascaded hybrid network includes a multi-granularity cascaded task-related component analysis - principal component analysis network (MGC-TPNet), a multi-granularity cascaded independent component analysis - principal component analysis network (MGC-IPNet), and cascaded weighted average and Dempster-Shafer (CWA-DS); wherein MGC-TPNet is used to mine multi-scale inter-lead correlation features in the electrocardiogram signal, and MGC-IPNet is used to mine multi-scale single-lead specific features, and then a linear support vector machine processes the above multi-scale features to obtain decision probabilities. Finally, CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

[0165] In specific implementation, the publicly available Normal Sinus Rhythm Database (Nsrdb), the St Petersburg INCART 12-lead Arrhythmia Database (Incardb), and the BIDMC Congestive Heart Failure Database (Chfdb) are respectively used as data sources for normal, Coronary Artery Disease (CAD), and Congestive Heart Failure (CHF). The performance verification of the present invention is carried out using MTLAB2018 software. The datasets used include 18 normal individuals, 7 CAD patients, and 15 CHF patients from the Nsrdb database, the Incartdb database, and the Chfdb database. First, 3 experimental data groups are set up. Among them, Group A is used to verify the classification experimental performance of the system for normal, CAD, and CHF heartbeats within a patient. The training set and test set data are sourced from the same patient, while Group B is used to verify the classification experimental performance of the system for normal, CAD, and CHF heartbeats between patients. The training set and test machine data are sourced from different patients. Group C is used to verify the experimental performance of the system in differentiating normal, CAD, and CHF heartbeats in small-scale data. Then, the two-lead electrocardiogram signal is processed into single-cycle heartbeats using the segment alignment and segmentation method. Then, multi-granularity depth lead correlation features are extracted from the two-lead heartbeats using MGC-TPNet to achieve feature-level information fusion and extraction. And multi-granularity single-lead specific features are extracted from the heartbeats of the most valuable leads using MGC-IPNet. The value of the lead is determined according to the highest recognition accuracy achieved by MGC-IPNet and the support vector machine. Then, the features under the above different granularities are input into LSVM to obtain decision values, and are transformed into decision probabilities through the softmax function. Finally, the CWA-DS method is used to fuse the above decision probabilities to obtain the final classification result.

[0166] Table 1 Experimental result table of the system of the present invention in Set A with balanced data

[0167]

[0168]

[0169] Table 1 shows the experimental result table of the system of the present invention for Set A with balanced data. It can be seen that in differentiating normal, CHF, and CAD heartbeats, the system misclassified only 0.02% of the heartbeats, including 5 normal heartbeats, 9 CHF heartbeats, and 11 CAD heartbeats. In addition, in identifying CHF and CAD, the method achieved a specificity close to 100% and a precision rate and F1-score of over 99.87%. In summary, the present invention can accurately identify normal, CHF, and CAD heartbeats in in-patient experiments.

[0170] Table 2 shows the experimental results of the method according to an embodiment of the present invention for Set A with multi-level unbalanced data. Among them, N is the ratio between the number of normal heartbeats and the number of CAD and CHF heartbeats, which is used to represent the degree of imbalance. To verify the discrimination ability of the present invention for small-scale data in unbalanced data, the indicators mainly showing the recognition results for identifying CHF and CAD heartbeats are presented. In identifying CHF heartbeats, the present invention achieved a precision rate, recall rate, specificity, and F1-score of over 99.4% at all N values. In identifying CAD heartbeats, when the N value varied from 2 to 50, the values of all indicators reached over 99%. Although when N was 100, the recall rate of the system for CAD heartbeats decreased to 95%, the F1-score, which can comprehensively reflect the recall rate and precision rate, was still over 97.4%. More importantly, the specificity and precision rate of the system for CAD heartbeats were as high as 100%. In summary, the present invention exhibits excellent performance when dealing with unbalanced data.

[0171] Table 2 Experimental results of the system of the present invention for Set A with unbalanced data

[0172]

[0173]

[0174] Table 3 Experimental result table of the system of the present invention for Group B

[0175]

[0176] Table 3 shows the experimental result table of the system of the present invention in Group B, which is used to verify the performance of the system in identifying normal, CAD, and CHF heartbeats in inter-patient experiments. According to Table 3, the system achieved an overall accuracy of 97.46% by differentiating normal, CHF, and CAD heartbeats. In addition, all the precision rates and specificities achieved by this method exceeded 95%. In terms of differentiating CAD heartbeats, although the recall rate achieved was only 88.51%, the precision rate was as high as 96.87%; thus, the F1 score exceeded 92%. In addition, among all 40 patients, the OA of 29 patients reached 100%, and the overall accuracy of 7 patients exceeded 95%. In addition, the accuracy of only one CAD patient was lower than 70%. In summary, in the inter-patient experiment, the proposed method showed excellent performance in differentiating normal, CAD, and CHF heartbeats.

[0177] Figure 6 The figure shows the experimental result diagram of the method according to the embodiment of the present invention on a noisy data set. In this work, heartbeats from Group A and Group B with different levels of mixed noise were used to verify the noise robustness of the system. The awgn function in MATLAB was used to add noise to all heartbeats. According to Figure 6 , the overall accuracy achieved in Group A and Group B decreased slightly as the signal-to-noise ratio (SNR) decreased. However, when the SNR was 18 dB (where the P wave and T wave of the heartbeat were severely distorted), the overall accuracy achieved in Group B exceeded 92.32%, while the overall accuracy achieved in Group A was only 1.12% lower than the overall accuracy without noise. More importantly, when the SNR was reduced to 12 dB, the system still obtained an overall accuracy of more than 96% in the experiment of Group A. The above results show that the system can effectively identify noisy data, so it has significant noise robustness.

[0178] Table 4 shows the experimental result table of the system of the present invention on Group C with small-scale data

[0179]

[0180] Table 4 shows the experimental results of the system on Group C with small-scale data. According to the above table, the overall accuracy achieved by the system reached 97.42%. In terms of identifying CHF heartbeats, the system achieved a precision rate of 94.5%, a recall rate of 99.33%, a specificity of 96.53%, and an F1 score of 96.85%. In terms of identifying CAD heartbeats, although the recall rate achieved was only 87.62%, the F1 score, which comprehensively reflects the precision rate and recall rate, reached 92.46%. In addition, the precision rate and specificity for identifying CAD heartbeats both exceeded 97%. Therefore, the above results show that this method can effectively process small-scale data.

[0181] As described above, these are only the preferred embodiments of the present invention. The present invention is not limited to the above-described embodiments. As long as the same means are used to achieve the technical effects of the present invention, they should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to its technical solutions and / or implementation manners.

Claims

1. An electrocardiogram classification method based on a multi-granularity cascaded hybrid network, characterized in that, The classification method includes: Obtain the first-lead electrocardiogram and the second-lead electrocardiogram; Preprocess the first-lead electrocardiogram and the second-lead electrocardiogram respectively; Extract and classify electrocardiogram features through the constructed multi-granularity cascaded hybrid network, which includes the multi-granularity cascaded task-related component analysis - principal component analysis network MGC-TPNet, the multi-granularity cascaded independent component analysis - principal component analysis network MGC-IPNet, and the cascaded weighted average and Dempster-Shafer CWA-DS; where MGC-TPNet is used to mine the multi-scale inter-lead correlation features in the electrocardiogram signal, and MGC-IPNet is used to mine the multi-scale single-lead specific features, and then the linear support vector machine processes the above multi-scale inter-lead correlation features and multi-scale single-lead specific features to obtain decision probabilities, and finally CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

2. The electrocardiogram classification method based on the multi-granularity cascaded hybrid network according to claim 1, the method for preprocessing the first-lead electrocardiogram and the second-lead electrocardiogram includes: Heartbeat segmentation: Use the segment alignment segmentation method to divide the long-term electrocardiogram signal into short-term heartbeats; Normalization: The difference normalization method is used to normalize the amplitude of the heartbeat to between 0 and 1; Matrixization: Reconstruct the N-sample-point heartbeat into a two-dimensional electrocardiogram matrix of size n×m.

3. The electrocardiogram classification method based on a multi-granularity cascaded hybrid network according to claim 1, wherein The multi-granularity cascaded task-related component analysis - principal component analysis network MGC-TPNet consists of a multi-granularity scanning layer, a task-related analysis convolutional layer, a primary output layer, a principal component analysis convolutional layer, and a cascaded output layer, and is used to extract multi-scale inter-lead correlation features from the dual-lead electrocardiogram.

4. The electrocardiogram classification method based on a multi-granularity cascaded hybrid network according to claim 3, characterized in that, Among them, the task-related analysis convolutional layer is specifically: According to Equation (2), obtain the arbitrarily divided component r(t) and the task-irrelevant component u(t) from the first-order matrix X(t) to be processed in the multi-granularity scanning layer; c (t). where and map r(t) and u(t) to X c is the confusion coefficient, where c represents the guiding coefficient and t represents the element position in matrix X c ; It is necessary to extract the task-related component r(t) according to equation (3); where y(t) is the matrix after weighting X c (t), and w c is the weight; to obtain y(t) = r(t), it is necessary to implement and maximize the inter-trial covariance to solve this problem; Equation (4) describes all possible combinations of the covariance between the h1-th and h2-th trials; where x h (t) and y h (t) represent the electrocardiogram data and the task-related components of the h-th trial, respectively, and the trial interval is t ∈ [t h , t h +T], and the covariance matrix The variance Var(y(t)) of y(t) is constrained by equation (5); Solve the constrained optimization problem of equation (5) according to equation (6); Calculate the TRCA convolution kernel according to equation (7); W l 1 = mat k (ql(Q -1 (S)), l = 1, 2, …, L1 (7) where q l () Extract L1 eigenvectors from Q -1 S in descending order of their corresponding eigenvalues, and mat k () Map each eigenvector to the corresponding TRCA convolution kernel W l 1 ; Then, the TRCA convolution kernel W l 1 is convolved with X c to obtain the first-order feature matrix 5. The electrocardiogram classification method based on a multi-granularity cascaded hybrid network according to claim 1, wherein The multi-granularity cascaded independent component analysis - principal component analysis network MGC-IPNet mainly consists of a multi-granularity scanning layer, an independent component analysis convolutional layer, a primary output layer, a principal component analysis convolutional layer, and a cascaded output layer, and is used to extract multi-scale single-lead specific features from the most valuable lead electrocardiogram among the first-lead electrocardiogram and the second-lead electrocardiogram.

6. The electrocardiogram classification method based on a multi-granularity cascaded hybrid network according to claim 5, characterized in that The independent component analysis convolutional layer is specifically: Whiten X using PCA technology c to calculate matrix Z c = V c X c , where is the whitening matrix; The FastICA tool with Gaussian non-linearity processes Z c to calculate the orthogonal matrix B c ; Orthogonal matrix B c For calculating the deconfusion matrix Calculate the ICA convolution kernel W according to equation (9). l 1 ; where mat k () reconstruct each eigenvector as the corresponding ICA convolution kernel W l 1 , l = 1, 2, …, L1; ICA convolution kernel W l 1 , l = 1, 2, …, L1 and X c Convolve to obtain the first-order feature matrix 7. The electrocardiogram classification method based on a multi-granularity cascaded hybrid network according to claim 5, characterized in that The principal component analysis convolutional layer is specifically: A window with side length k scans each first-order eigenvector Γ with a step size of 1 i c Obtain matrix blocks And subtract the mean from the elements of each matrix block; Convert these zero-mean matrix blocks into vectors After processing all the first-order feature matrices, combine all the vectors Obtain and According to Equation (10), calculate L2 PCA convolution kernels Calculate the second-order feature matrix 8. An electrocardiogram classification system applying the electrocardiogram classification method according to any one of claims 1 to 7, characterized in that, The electrocardiogram classification system includes: A data acquisition module for obtaining the first-lead electrocardiogram and the second-lead electrocardiogram; A preprocessing module for preprocessing the first-lead electrocardiogram and the second-lead electrocardiogram in the data acquisition module; An electrocardiogram feature extraction and classification module, wherein the electrocardiogram feature extraction and classification module performs electrocardiogram feature extraction and classification based on a multi-granularity cascaded hybrid network; among them, the multi-granularity cascaded hybrid network includes a multi-granularity cascaded task-related component analysis - principal component analysis network MGC-TPNet, a multi-granularity cascaded independent component analysis - principal component analysis network MGC-IPNet, and a cascaded weighted average and Dempster-Shafer CWA-DS; where MGC-TPNet is used to mine the multi-scale inter-lead correlation features in the electrocardiogram signal, and MGC-IPNet is used to mine the multi-scale single-lead specific features, and then a linear support vector machine processes the above multi-scale inter-lead correlation features and multi-scale single-lead specific features to obtain decision probabilities, and finally CWA-DS fuses the above decision probabilities at the decision layer to obtain the final classification label.

9. A computer device, characterized in that, The computer device includes a memory and a processor, and the memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the electrocardiogram classification method according to any one of claims 1 to 7.

10. A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the electrocardiogram classification method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • 12-lead ECG arrhythmia detection and classification model construction method based on residual network

    CN112906748A

  • Electrocardiogram image processing method and device, medium, and electrocardiograph

    WO2021218943A1