Heart disease recognition system and method based on 12-lead electrocardiosignal HRV feature extraction
Through the HRV feature extraction system based on 12-lead ECG signal, the problems of large amount of data and noise influence in ECG analysis are solved, and the accurate identification and classification of heart diseases are achieved, and the accuracy and reliability of identification are improved.
Patent Information
- Application Number
- CN202411104682.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-01-07
AI Technical Summary
The existing electrocardiogram analysis methods have problems such as large amount of data, complex processing, large noise impact, and insufficient feature extraction accuracy in heart disease detection, especially when facing diverse heart diseases, it is difficult to accurately identify.
A HRV feature extraction system based on 12-lead ECG signals is proposed. The standard rule database is generated through distributed denoising preprocessing, short-time Fourier transform spectrum decomposition, sliding window and frequent item set association rule mining algorithm, and Random forest method was used to classify heart disease.
It improves the accuracy and reliability of identification of heart diseases, can more effectively extract the amplitude characteristics of the heart rate variability spectrum, directly reflect the activity status of the heart, and enhances the recognition ability of diverse heart diseases.
Smart Images

Figure CN119274813A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart medical technology, and in particular to a heart disease identification system and method based on 12-lead electrocardiogram (ECG) signal HRV feature extraction. Background Art
[0002] Heart disease is one of the major health problems worldwide, with high morbidity and mortality. Early detection and accurate diagnosis of heart disease are essential for effective treatment and prevention. As a non-invasive, convenient and economical diagnostic tool, electrocardiogram (ECG) has been widely used in the detection and monitoring of heart disease. Traditional ECGs usually use 12 leads to record the electrical activity of the heart, and a large amount of heart health information can be obtained by analyzing these signals. The 12-lead ECG includes three standard leads, three enhanced leads and six chest leads, which record the electrical activity of the heart from multiple angles and provide comprehensive ECG information. Heart rate variability (HRV) refers to the variability of the time interval between heart beats, reflecting the ability of the autonomic nervous system to regulate the heart. HRV analysis can reveal the health status of the heart and the dysfunction of the autonomic nervous system.
[0003] Although the existing ECG analysis methods have played an important role in the detection of heart diseases, there are still some shortcomings. The 12-lead ECG signal data volume is large, and processing and analysis require complex algorithms and high computing power. Different types of heart diseases may show different ECG characteristics. When facing a variety of heart diseases, the existing recognition algorithms are completely insufficient to simply identify the characteristics of ECG signals. When extracting HRV features, the existing methods may be affected by noise and baseline drift, resulting in insufficient accuracy of feature extraction. At the same time, in terms of HRV feature extraction, most research methods extract features such as time domain, frequency domain, and nonlinearity, etc., which are difficult to achieve ideal results using existing heart disease recognition methods. Summary of the invention
[0004] The present invention aims to solve at least one of the problems in the prior art. To this end, the present invention provides a system and method for accurately identifying and classifying heart diseases.
[0005] Specifically, the technical solution of the present invention is as follows:
[0006] In a first aspect, the present invention proposes a heart disease identification system based on HRV feature extraction of 12-lead electrocardiogram signals. According to an embodiment of the present invention, the system includes: a 12-lead ECG signal preprocessing module, which is used to collect 12-lead ECG signals for distributed denoising preprocessing; a heart rate variability HRV signal extraction module, which extracts R peaks from preprocessed ECG signals, makes differences between adjacent R peak signal values, constructs a difference sequence (i.e., an HRV signal sequence) according to continuous time nodes, and then performs spectrum decomposition on the HRV signal sequence through short-time Fourier transform, calculates the spectrum amplitude of the frequency band for level division, and divides the 12 leads into 12 matching segments; an HRV feature rule mining and rule base construction module, which performs sequence combination mining on the 12-lead HRV signal sequence of heart disease based on a sliding window and frequent item set association rule mining algorithm, mines the frequent item sets of the sequence combination and the potential rule sets of the 12 matching segments, and generates a standard rule base through deduplication screening and filtering; a multi-classification heart disease recognition module, which obtains heart disease sequence matching features by rule matching calculation, and at the same time, performs feature influencing factor analysis on heart disease, combines new features, and uses a random forest method to classify and calculate heart disease.
[0007] In some embodiments of the present disclosure, the 12-lead ECG signal preprocessing module: an ECG signal preprocessing device;
[0008] The configuration of the electrocardiogram signal preprocessing device includes:
[0009] (1) Setting a notch filter. In the present invention, the notch filter is used to filter out the power frequency interference (50Hz) in the ECG signal. The power frequency interference is a common noise source in ECG signal processing, usually caused by the power line. We use the notch filter to accurately remove the interference of this frequency, thereby improving the clarity of the signal. We design a 50Hz notch filter to ensure that the bandwidth of the filter is narrow enough to filter out only the 50Hz frequency;
[0010] (2) Setting a smoothing filter. Smoothing filtering is used to remove high-frequency noise in the ECG signal. We use a moving average filter to achieve this goal. The moving average filter smoothes the signal by calculating the average value of the signal within a certain window size, thereby reducing the impact of high-frequency noise. Here, the window size is selected as 10 to smooth the high-frequency noise in the signal.
[0011] (3) Set the high-pass filter. Select the high-pass Butterworth filter and set its order to 6.
[0012] In some embodiments of the present disclosure, the heart rate variability HRV signal extraction module includes: an HRV signal sequence extraction device;
[0013] The configuration of the HRV signal sequence extraction device includes:
[0014] (1) According to the time series, the preprocessed ECG signal is traversed, the maximum value K and the minimum value M are calculated, and the difference between the maximum and minimum values AC = KM is calculated using the difference calculation method. A fixed difference threshold T = 0.6 × AC + M is set, and a sliding window Wn is set with a window size of 5. Points less than the threshold T are set to 0. The ECG signal nodes are converted into a sequence RR according to the time series, RR = {C1, ..., C i},C i Represents the value of the i-th node in the sequence;
[0015] (2) C in the RR sequence set i The sequence data with a value of ≠0 is input into the dynamic sliding window Wm, and the maximum value P under each Wm window is calculated. The maximum value P calculated in each Wm window is combined into a sequence set RI, and the values in the RI set are subtracted from adjacent elements. The calculated difference sequence is the heart rate variability RRI sequence.
[0016] In some embodiments of the present disclosure, the heart rate variability HRV signal extraction module further includes: an HRV spectrum leveling device;
[0017] The configuration contents of the HRV spectrum grading device include:
[0018] (1) In order to obtain the feature rule set to the maximum extent, the distribution balance calculation was performed, and then the RRI sequence of the extracted 12-lead ECG signal was spectrally analyzed and frequency band decomposed using short-time Fourier transform, which was divided into three frequency bands: LF, HF1, and HF2. Here, the LF frequency band range is 0 Hz-0.15 Hz, the HF1 frequency band range is 0.15 Hz-0.25 Hz, and the HF2 frequency band range is 0.25 Hz-0.4 Hz;
[0019] (2) Define the maximum absolute value of the frequency domain amplitude as Ax;
[0020] (3) Define the signal value level quantization sequence as MQ, and classify the values of the three frequency bands LF, HF1, and HF2. In order to ensure the rationality of the level division, by calculating the value granularity and distribution balance of the frequency band interval, the Ax range of (0, 0.25) is defined as level 'A', the Ax range of (0.25, 0.5) is defined as level 'B', the Ax range of (0.5, 0.75) is defined as level 'C', and the Ax range of (greater than 0.75) is defined as level 'D';
[0021] (4) The hierarchical sequence set of the 12-lead signal values obtained by calculation is MQ, which includes three sequence combinations, among which the hierarchical sequence sets for LF, HF1, and HF2 are MQ1, MQ2, and MQ3 respectively.
[0022] In some embodiments of the present disclosure, the HRV feature rule mining and rule base construction module includes: a feature rule processing device;
[0023] The configuration of the feature rule processing device includes:
[0024] (1) Extracting the sequence combination rule set AMQ = {AMQ1, AMQ2, AMQ3} from the 12-lead MQ = {MQ1, MQ2, MQ3} by a progressive sliding window calculation method, with sliding window length values of 2, 3, and 4;
[0025] (2) Calculate the frequent item sets in the sequence combination rule set, and calculate the support of each frequent item set through the FP-growth algorithm, then calculate the association between frequent item sets, and set the confidence level to 0.7 to extract potential rule sets;
[0026] (3) The frequent item sets that satisfy the support degree of 0.7 are combined with the extracted potential rule sets to generate a standard rule set. After deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained.
[0027] In some embodiments of the present disclosure, the multi-classification heart disease identification module: a multi-dimensional heart disease identification device;
[0028] The configuration contents of the multi-dimensional heart disease identification device include:
[0029] (1) The 12-lead heart disease ECG data monitored are used to perform feature matching calculations on the three frequency bands of LF, HF1, and HF2 based on the sequence combination rule set AMQ'={AMQ1', AMQ2', AMQ3'} calculated by the HRV feature rule mining and rule base construction module and the generated standard rule base BFF={BFF1, BFF2, BFF3};
[0030] (2) According to the three frequency bands, the matching rules are calculated and extracted to establish a matching rule set MK = {MK1, MK2, MK3}, and the support of the corresponding rules in the set is combined into a support sequence set SQ = {SQ1, SQ2, SQ3}, SQ z is the support of the Zth rule in MK;
[0031] (3) Corresponding AMQ'={AMQ1', AMQ2', AMQ3'} and BFF={BFF1, BFF2, BFF3} to three frequency bands, and calculating the number of rule matches MR={MR1, MR2, MR3};
[0032] (4) According to the three frequency bands, the support of each matching rule is summed up and the total support is TS = {TS1, TS2, TS3};
[0033] (5) According to the three frequency bands, the confidences of the matched rules are summed up and the total confidence is TC = {TC1, TC2, TC3};
[0034] (6) Calculate the total number of rules LE = {LE1, LE2, LE3} of the three frequency band standard rule bases BFF = {BFF1, BFF2, BFF3} respectively, and obtain the matching frequency FR = {FR1, FR2, FR3} of the three frequency bands by the calculation formula FR = MR / LE;
[0035] (7) According to the three frequency bands, the support scores of each sequence matching are calculated respectively. SQX = {SQX1, SQX2, SQX3}, SQ (MR) / 2 is the support of the MR / 2 rule in MK, SQ (MR+1) / 2 is the support of the (MR+1) / 2th rule in MK. When MR is an even number, the calculation formula is: When MR is an odd number, the calculation formula is SQX=SQ (MR+1) / 2 ;
[0036] (8) According to the three frequency bands, the support skewness of each sequence matching is calculated. SS = {SS1, SS2, SS3}, MK = {MK1, MK2, MK3}. The average support of the rule is MK={MK1,MK2,MK3} The standard deviation of rule support is S={S1,S2,S3}, and the formula is
[0037] (9) According to the three frequency bands, the support kurtosis of each sequence matching is calculated as SK = {SK1, SK2, SK3}, and the formula is:
[0038]
[0039] (10) The seven feature sets Y of MR, TS, TC, FR, SQX, SS, and SK in the three frequency bands are used to calculate the influence of the feature set on cardiac conduction obstruction, myocardial infarction, cardiac hypertrophy, abnormal changes of ST segment and T wave through the average Gini impurity reduction of random forest. The Gini impurity calculation formula is: The child nodes after segmentation have left nodes and right nodes, where the left node Gini impurity calculation formula is: The calculation formula of the right node Gini impurity is: The formula for the reduction of Gini impurity is: In (10), the definitions of these symbols are:K is the number of samples of heart disease category K, N is the total number of samples of the node, G(t) is the Gini impurity of feature node t, G(t L ) is the left child node t L The Gini impurity of Gini impurity, G(t R ) is the right child node t R Gini impurity of Gini impurity, N L is the left child node t L The number of samples in, N R is the left child node t R The number of samples in the dataset, mining and evaluating the importance of features Among them, GI BU GII is the reduction in Gini impurity of the Uth feature in the Bth heart disease feature set Y, B is the sum of the Gini impurity reductions of all features in the B-th type of heart disease feature set Y, O BU is the importance index of the Uth feature in the heart disease set Y of the B set, all O BU The influencing factor set W of the B-th type of heart disease is formed, and the characteristic influencing factor sets W = {W1, W2, W3, W4, W5} for cardiac conduction obstruction, myocardial infarction, cardiac hypertrophy, abnormal changes of ST segment and T wave are output respectively, where W1, W2, W3, W4 and W5 correspond to the influencing factor sets of cardiac conduction obstruction, myocardial infarction, cardiac hypertrophy, abnormal changes of ST segment and T wave, n is the number of characteristic sets of set Y, W v is the impact factor of the Vth feature in set Y, Y v is the eigenvalue of the Vth feature in set Y, using the formula The characteristic set FN={FN1, FN2, FN3, FN4, FN5} of cardiac conduction obstruction, myocardial infarction, cardiac hypertrophy, abnormal changes of ST segment and T wave are calculated respectively;
[0040] (11) All MR, TS, TC, FR, SQX, SS, SK, and FN features of the three frequency bands are extracted. The Gini impurity reduction algorithm is used to first calculate the Gini impurity of the parent node. For a parent node D, the formula is: Where pj is the ratio of category j to the total number of all categories. In the formula, n is the number of different categories of the current node. For each possible split point of the feature value, the Gini impurity of each feature after being divided into two subsets D1 and D2 at the split point is calculated. The subset division standard is the median of the feature. The formula is: Where |D| is the number of samples contained in the parent node, |D1| and |D1| are the two subsets into which the parent node dataset D is divided, and the Gini impurity reduction △Gini=Gini(D)-Ginisplit , the split point with the largest reduction in Gini impurity is selected as the optimal split point, and the random forest majority voting mechanism is used to classify and identify heart disease.
[0041] In the second aspect, the present invention proposes a processing method for a heart disease identification system based on 12-lead ECG signal HRV feature extraction. According to an embodiment of the present application, the method includes: step 1: collecting 12-lead ECG signals for distributed denoising preprocessing; step 2: extracting R peaks from the preprocessed ECG signals, taking differences between adjacent R peak signal values, constructing difference sequences based on continuous time nodes, and then performing spectrum decomposition of the HRV signal sequence through short-time Fourier transform, calculating the spectrum amplitude of the frequency band for level division, and dividing the 12 leads into 12 matching segments; step 3: based on the sliding window and frequent item set association rule mining algorithm, performing sequence combination mining on the 12-lead HRV signal sequence of heart disease, mining the frequent item sets of sequence combinations and the potential rule sets of 12 matching segments, and generating a standard rule base through deduplication screening and filtering; step 4: using rule matching calculation to obtain the matching features of the heart disease sequence, and at the same time, performing feature influencing factor analysis on the heart disease, combining new features, and using the random forest method to classify and calculate the heart disease.
[0042] In some embodiments of the present disclosure, step 1 includes: performing smoothing filtering and high-pass filtering on the 12-lead ECG signal, and performing denoising preprocessing on the ECG signal.
[0043] In some embodiments of the present disclosure, step 2 includes: performing differential calculation on the preprocessed 12-lead ECG signal to set a threshold T, performing R wave identification and extracting R peaks, calculating the R peak difference to obtain the heart rate variability RRI sequence; using short-time Fourier transform to perform frequency band decomposition on the RRI sequence of the extracted 12-lead ECG signal, decomposing it into LF, HF1, and HF2; dividing the amplitude values in the decomposed frequency bands into levels according to A, B, C, and D; calculating the hierarchical sequence set MQ={MQ1, MQ2, MQ3} of the 12-lead signal values in the three frequency bands. Among them, the frequency band of the LF is 0-0.15HZ, the frequency band of the HF1 is 0.15-0.25HZ, and the frequency band of the HF2 is 0.25-0.4HZ; the A level value is 0-0.25, the B level value is 0.25-0.5, the C level value is 0.5-0.75, and the D level value is greater than 0.75.
[0044] In some embodiments of the present disclosure, step 3 includes: extracting a sequence combination rule set AMQ = {AMQ1, AMQ2, AMQ3} from MQ through a progressive sliding window calculation method; calculating frequent item sets in AMQ through an FP-growth algorithm, and then extracting potential rule sets through association rules, combining frequent item sets with potential rule sets to generate a standard rule set, and obtaining a standard rule base BFF = {BFF1, BFF2, BFF3} after deduplication calculation.
[0045] In some embodiments of the present disclosure, step 4 includes: calculating the sequence combination rule set AMQ'={AMQ1', AMQ2', AMQ3'} and the generated standard rule base BFF={BFF1, BFF2, BFF3} to perform feature matching calculations for the three frequency bands LF, HF1, and HF2; feature matching calculates the rule matching number MR, total support TS, total confidence TC, matching frequency FR, support score SQX, support skewness SS, and support kurtosis SK of the three frequency bands, and uses these features to calculate the feature influence factor of each type of heart disease, and calculates the new feature FN through the feature influence factor; all MR, TS, TC, FR, SQX, SS, SK, and FN features of the three frequency bands are extracted and classified and identified using the random forest majority voting mechanism.
[0046] It should be understood that the system embodiment and the method embodiment can correspond to each other, and similar descriptions can refer to the system embodiment. To avoid repetition, it will not be repeated here. Specifically, the above system can execute the above-mentioned embodiment of the processing method of the heart disease identification system based on 12-lead ECG signal HRV feature extraction, and the description of each module in the system corresponds to the method embodiment, which will not be repeated here for the sake of brevity.
[0047] The heart disease identification system and method based on 12-lead ECG signal HRV feature extraction of the present invention have the following advantages:
[0048] (1) The heart disease identification system based on 12-lead ECG signal HRV feature extraction of the present invention is a method for identifying heart diseases using 12-lead ECG signals, which is mainly used to mine the characteristics of the heart rate variability spectrum amplitude and extract corresponding rules to identify and classify heart diseases;
[0049] (2) The present invention comprehensively considers the correlation between heart rate variability characteristics and various heart diseases, making the identification of heart diseases more reliable, thereby ensuring accurate identification;
[0050] (3) This system directly reflects the activity state of the heart by analyzing the HRV spectrum amplitude characteristics of various heart diseases, and extracts its spectrum amplitude change sequence combination to construct a rule base. By matching and calculating the spectrum amplitude sequence with the rule base, the accuracy of heart disease identification is improved;
[0051] (4) This method is scientific and reasonable and has wide applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 It is a flowchart of a heart disease identification system based on 12-lead ECG signal HRV feature extraction provided in a specific embodiment of the present application;
[0054] Figure 2 It is a structural block diagram of a heart disease identification system based on 12-lead ECG signal HRV feature extraction according to an exemplary embodiment;
[0055] Figure 3 A flowchart of heart disease identification based on 12-lead ECG signal HRV feature extraction is provided according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0057] In one embodiment of the present invention, a heart disease recognition system based on 12-lead ECG signal HRV feature extraction is provided to identify and classify heart diseases. Figure 1 , Figure 2 As shown, a heart disease identification system based on 12-lead ECG signal HRV feature extraction of the present invention includes:
[0058] The 12-lead ECG signal preprocessing module 100 is used to collect 12-lead ECG signals for distributed denoising preprocessing, including an ECG signal preprocessing device;
[0059] The heart rate variability HRV signal extraction module 200 extracts the R peak of the preprocessed ECG signal, makes a difference between adjacent R peak signal values, and constructs a difference sequence, i.e., an HRV signal sequence, according to the continuous time nodes. Then, the HRV signal sequence is spectrum-decomposed by short-time Fourier transform, the spectrum amplitude of the frequency band is calculated and graded, and the 12 leads are divided into 12 matching segments, including an HRV signal sequence extraction device and an HRV spectrum grade division device;
[0060] The HRV feature rule mining and rule base construction module 300 performs sequence combination mining on the 12-lead HRV signal sequence of heart disease based on the sliding window and frequent item set association rule mining algorithm, mines the frequent item sets of the sequence combination and the potential rule sets of 12 matching segments, generates a standard rule base through deduplication screening and filtering, and includes a feature rule processing device;
[0061] The multi-classification heart disease recognition module 400 obtains the heart disease sequence matching features by rule matching calculation, and at the same time, analyzes the feature influencing factors of the heart disease, combines new features, and classifies the heart disease by random forest method, including a multi-classification heart disease recognition device;
[0062] The function of the 12-lead ECG signal preprocessing module is to preprocess the 12-lead ECG signal data using high-pass filtering, smoothing filtering, and notch filtering denoising methods;
[0063] The function of the heart rate variability HRV feature extraction module is to accurately identify and extract the R peak of the denoised ECG signal, perform difference processing on the extracted adjacent R peak signal values, express the difference as a time series to obtain the HRV signal, decompose and segment the extracted HRV signal using short-time Fourier transform, and perform graded processing on the spectrum amplitude of the frequency band, while dividing the 12 leads into 12 matching segments.
[0064] The function of the HRV feature rule mining and rule base construction module is to mine the frequent item sets of sequence combinations and the potential rule sets of 12 matching segments to generate a standard rule base; first, the frequent item sets are mined using the frequent item set mining algorithm in the association rules, and secondly, the frequent item sets of each heart disease sequence are calculated, the support and confidence of the permutations and combinations between each matching segment in the rule are calculated, and the frequent item sets with higher support and confidence are retained. Finally, the combination between these matching segments is included in the potential rule set, the frequent item sets and the potential rule set are merged into the standard rule set, the standard set and the frequent item sets of various heart diseases are deduplicated, and finally the rule set is generated.
[0065] The function of the multi-classification heart disease recognition module is to first use rule matching to calculate the number of matching rules, total support, total confidence, matching frequency, support score, support skewness, support kurtosis and other features after the numerical quantization of the spectrum amplitude of each frequency band; secondly, perform feature influencing factor analysis on each heart disease category and combine new features; finally, use the random forest classification method to classify each feature and analyze the type of heart disease.
[0066] In this embodiment, the 12-lead ECG signal preprocessing module preprocesses the 12-lead ECG signal data using high-pass filtering, smoothing filtering, and band-pass filtering denoising methods.
[0067] The function of the heart rate variability HRV signal extraction module is to accurately identify and extract the R peak of the denoised ECG signal, perform difference processing on the extracted adjacent R peak signal values, express the difference as a time series to obtain the HRV signal, and decompose and segment the extracted HRV signal using short-time Fourier transform. The decomposed signal sequence is MHRV, where the decomposed frequency bands LF, HF1, and HF2 are: 0HZ-0.15HZ, 0.15HZ-0.25HZ, and 0.25HZ-0.4HZ, respectively; first, Each decomposed spectrum band is divided into amplitude levels, where the level division range of (0, 0.25) is defined as level 'A', (0.25, 0.5) is defined as level 'B', (0.5, 0.75) is defined as level 'C', and (greater than 0.75) is defined as level 'D'. The hierarchical sequence set of the 12-lead signal values is calculated to be MQ, which contains three sequence combinations, among which the numerical hierarchical sequence sets for LF, HF1, and HF2 are MQ1, MQ2, and MQ3 respectively.
[0068] The function of the HRV feature rule mining and rule base construction module is to extract the sequence combination rule set AMQ = {AMQ1, AMQ2, AMQ3} from the 12-lead MQ = {MQ1, MQ2, MQ3} through a progressive sliding window calculation method, and the sliding window length values are 2, 3, and 4. Secondly, the frequent item sets in the sequence combination rule set are calculated, and the support of each frequent item set is calculated by the FP-growth algorithm, and then the association relationship between the frequent item sets is calculated to extract the potential rule set. Finally, the standard rule set is combined and generated, and after deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained.
[0069] The function of the multi-classification heart disease recognition module is to first use rule matching to calculate the number of matching rules MR, total support SQ, total confidence CQ, matching frequency FR, support score SQX, support skewness SS, support kurtosis SK and other features after the numerical quantization of the spectrum amplitude of each frequency band; secondly, perform feature influencing factor analysis on each heart disease category and combine new features FN; finally, use the random forest classification method to classify each feature and analyze the type of heart disease.
[0070] In this embodiment, the specific steps provided are:
[0071] Step 1: Preprocess the ECG signal data:
[0072] (1) Design a 50 Hz notch filter and ensure that the filter bandwidth is narrow enough to filter out only the 50 Hz frequency.
[0073] (2) Select a window size of 10 to smooth out the high-frequency noise in the signal;
[0074] (3) Set a high-pass filter, select a high-pass Butterworth filter and set its order to 6;
[0075] Step 2: Heart rate variability extraction:
[0076] (1) According to the time series, the preprocessed ECG signal is traversed, the maximum value K and the minimum value M are calculated, and the difference between the maximum and minimum values AC = KM is calculated using the difference calculation method. A fixed difference threshold T = 0.6 × AC + M is set, and a sliding window Wn is set with a window size of 5. Points less than the threshold T are set to 0. The ECG signal nodes are converted into a sequence RR according to the time series, RR = {C1, ..., C i},C i Represents the value of the i-th node in the sequence;
[0077] (2) C in the RR sequence set i ≠0 is input into the dynamic sliding window Wm, and the maximum value P under each Wm window is calculated. The maximum value P calculated in each Wm window is combined into a sequence set RI, and the values in the RI set are subtracted from adjacent elements. The calculated difference sequence is the heart rate variability RRI sequence;
[0078] Step 3: HRV spectrum ranking:
[0079] (1) Using short-time Fourier transform, the RRI sequence of the extracted 12-lead ECG signal is subjected to spectrum analysis and frequency band decomposition, and is divided into three frequency bands: LF, HF1, and HF2. Here, the LF frequency band ranges from 0 Hz to 0.15 Hz, the HF1 frequency band ranges from 0.15 Hz to 0.25 Hz, and the HF2 frequency band ranges from 0.25 Hz to 0.4 Hz.
[0080] (2) Define the maximum absolute value of the frequency domain amplitude as Ax;
[0081] (3) Define the signal value level quantization sequence as MQ, and classify the values of the three frequency bands LF, HF1, and HF2. Define the Ax range of (0, 0.25) as level 'A', the Ax range of (0.25, 0.5) as level 'B', the Ax range of (0.5, 0.75) as level 'C', and the Ax range of (greater than 0.75) as level 'D';
[0082] (4) The hierarchical sequence set of the 12-lead signal values is calculated as MQ, which includes three sequence combinations, among which the hierarchical sequence sets for LF, HF1, and HF2 are MQ1, MQ2, and MQ3 respectively;
[0083] Step 4: Feature rule processing:
[0084] (1) Extracting the sequence combination rule set AMQ = {AMQ1, AMQ2, AMQ3} from the 12-lead MQ = {MQ1, MQ2, MQ3} by the progressive sliding window calculation method, with the sliding window length values of 2, 3, and 4;
[0085] (2) Calculate the frequent item sets in the sequence combination rule set, and calculate the support of each frequent item set through the FP-growth algorithm, then calculate the association between frequent item sets, and set the confidence level to 0.7 to extract potential rule sets;
[0086] (3) The frequent item sets that satisfy the support degree of 0.7 are combined with the extracted potential rule sets to generate a standard rule set. After deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained.
[0087] Step 5: Multi-classification heart disease recognition:
[0088] (1) The monitored 12-lead heart disease ECG data is calculated according to claims 2, 3, and 4, and its sequence combination rule set AMQ'={AMQ1', AMQ2', AMQ3'} is used to perform feature matching calculations on the three frequency bands of LF, HF1, and HF2 with the generated standard rule base BFF={BFF1, BFF2, BFF3};
[0089] (2) Corresponding AMQ'={AMQ1', AMQ2', AMQ3'} and BFF={BFF1, BFF2, BFF3} to three frequency bands, and calculating the number of rule matches MR={MR1, MR2, MR3};
[0090] (3) According to the three frequency bands, the matching rules are calculated and extracted to establish a matching rule set MK = {MK1, MK2, MK3}, and the support of the corresponding rules in the set is combined into a support sequence set SQ = {SQ1, SQ2, SQ3}, SQ z is the support of the Zth rule in MK;
[0091] (4) According to the three frequency bands, the support of each matching rule is summed up and the total support is TS = {TS1, TS2, TS3};
[0092] (5) According to the three frequency bands, the confidences of the matched rules are summed up and the total confidence is TC = {TC1, TC2, TC3};
[0093] (6) Calculate the total number of rules LE = {LE1, LE2, LE3} of the three frequency band standard rule bases BFF = {BFF1, BFF2, BFF3} respectively, and obtain the matching frequency FR = {FR1, FR2, FR3} of the three frequency bands by the calculation formula FR = MR / LE;
[0094] (7) According to the three frequency bands, the support scores of each sequence matching are calculated respectively. SQX = {SQX1, SQX2, SQX3}, SQ (MR) / 2 is the support of the MR / 2 rule in MK, SQ (MR+1) / 2 is the support of the (MR+1) / 2th rule in MK. When MR is an even number, the calculation formula is: When MR is an odd number, the calculation formula is SQX=SQ (MR+1) / 2 ;
[0095] (8) According to the three frequency bands, the support skewness of each sequence matching is calculated. SS = {SS1, SS2, SS3}, MK = {MK1, MK2, MK3}. The average support of the rule is MK={MK1,MK2,MK3} The standard deviation of rule support is S={S1,S2,S3}, and the formula is
[0096] (9) According to the three frequency bands, the support kurtosis of each sequence matching is calculated as SK = {SK1, SK2, SK3}, and the formula is:
[0097]
[0098] (10) The seven feature sets Y of MR, TS, TC, FR, SQX, SS, and SK in the three frequency bands are used to calculate the influence of the feature sets on the five types of heart diseases through the random forest algorithm, and the importance index of the features is mined and evaluated. Among them, GI BU GII is the reduction in Gini impurity of the Uth feature in the Bth heart disease feature set Y, B is the sum of the Gini impurity reductions of all features in the B-th type of heart disease feature set Y, O BU is the importance index of the Uth feature in the Bth heart disease set Y, all O BU The influencing factor set W of the Bth type of heart disease is formed, and the characteristic influencing factor sets W = {W1, W2, W3, W4, W5} for the five types of heart diseases are output respectively, where W1, W2, W3, W4 and W5 correspond to the influencing factor sets of the five types of heart diseases respectively, n is the number of characteristic sets of set Y, W v is the impact factor of the Vth feature in set Y, Y v is the eigenvalue of the Vth feature in set Y, using the formula The feature sets FN = {FN1, FN2, FN3, FN4, FN5} of five heart diseases are calculated respectively;
[0099] (11) All MR, TS, TC, FR, SQX, SS, SK, and FN features extracted from the three frequency bands are used to select the split point with the largest Gini impurity reduction as the optimal split point using the Gini impurity reduction algorithm, and the random forest majority voting mechanism is used for heart disease classification and identification.
[0100] In other embodiments of the present invention, a processing method for a heart disease identification system based on 12-lead ECG signal HRV feature extraction is provided. Figure 3 As shown, the processing method includes:
[0101] Acquire 12-lead ECG signals, and use one or more of high-pass filtering, smoothing filtering, and notch filtering to denoise the 12-lead ECG signals;
[0102] The 12-lead ECG signals after denoising are differentially calculated to set the threshold T, and the R wave is identified and the R peak is extracted. The R peak difference is calculated to obtain the heart rate variability RRI sequence;
[0103] The RRI sequence of the extracted 12-lead ECG signal was decomposed into LF (0-0.15HZ), HF1 (0.15-0.25HZ), and HF2 (0.25-0.4HZ) using short-time Fourier transform.
[0104] The decomposed HRV spectrum is classified into grades, and the Ax range of (0, 0.25) is defined as grade 'A', the Ax range of (0.25, 0.5) is defined as grade 'B', the Ax range of (0.5, 0.75) is defined as grade 'C', and the Ax range of (greater than 0.75) is defined as grade 'D';
[0105] Calculate the hierarchical sequence set MQ of the 12-lead signal values of the three frequency bands = {MQ1, MQ2, MQ3};
[0106] The MQ extraction sequence combination rule set AMQ = {AMQ1, AMQ2, AMQ3} is calculated by a progressive sliding window method;
[0107] The frequent item sets (referred to as "frequent item sets") in AMQ are calculated by the FP-growth algorithm, and then potential rule sets are extracted through association rules. The frequent item sets and potential rule sets are combined to generate standard rule sets. After deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained;
[0108] The calculation sequence combination rule set AMQ'={AMQ1', AMQ2', AMQ3'} and the generated standard rule base BFF={BFF1, BFF2, BFF3} are used to perform feature matching calculations on the three frequency bands of LF, HF1 and HF2;
[0109] The feature matching calculates the rule matching number MR, total support TS, total confidence TC, matching frequency FR, support score SQX, support skewness SS, and support kurtosis SK of the three frequency bands. These features are used to calculate the feature influence factor of each type of heart disease, and the new feature FN is calculated through the feature influence factor;
[0110] All MR, TS, TC, FR, SQX, SS, SK, and FN features extracted from the three frequency bands are used to classify and identify heart disease using the random forest majority voting mechanism.
[0111] The above system and method embodiments correspond to each other, and the method embodiments can also refer to the above system embodiments. Based on the above system or method, accurate identification of heart disease can be achieved.
[0112] The software program involved in the present invention is compiled based on machine learning processing technology, which is a technology familiar to people in this field.
[0113] Obviously, the above embodiments are only examples for the purpose of clearly explaining the invention, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A heart disease identification system based on 12-lead ECG signal HRV feature extraction, characterized in that: include: 12-lead ECG signal preprocessing module, used to collect 12-lead ECG signals for distributed denoising preprocessing; The heart rate variability (HRV) signal extraction module extracts the R peak of the preprocessed ECG signal, makes a difference between adjacent R peak signal values, constructs a difference sequence based on the continuous time nodes, and then performs spectrum decomposition of the HRV signal sequence through short-time Fourier transform, calculates the spectrum amplitude of the frequency band, and divides the 12 leads into 12 matching segments. The HRV feature rule mining and rule base construction module, based on the sliding window and frequent item set association rule mining algorithm, conducts sequence combination mining on the 12-lead HRV signal sequence of heart disease, mines the frequent item sets of sequence combinations and the potential rule sets of 12 matching segments, and generates a standard rule base through deduplication screening and filtering; The multi-classification heart disease recognition module uses rule matching calculations to obtain the matching features of heart disease sequences. At the same time, it analyzes the influencing factors of heart disease features, combines new features, and uses the random forest method to classify and calculate heart disease.
2. The heart disease identification system according to claim 1, characterized in that: The 12-lead ECG signal preprocessing module comprises: an ECG signal preprocessing device; The settings of the ECG signal preprocessing device include: setting a smoothing filter, setting the filter port window size to 10, setting the high-pass filter order to 6, and performing denoising on the ECG signal.
3. The heart disease identification system according to claim 1, characterized in that: The heart rate variability HRV signal extraction module includes: an HRV signal sequence extraction device, an HRV spectrum level classification device; The configuration contents of the HRV signal sequence extraction device include: (1) According to the time series, the preprocessed ECG signal is traversed, the maximum value K and the minimum value M are calculated, and the difference between the maximum and minimum values AC = KM is calculated using the difference calculation method. The fixed difference threshold T is set to 0.6 × AC + M, and the sliding window Wn is set with a window size of 5. The points less than the threshold T are set to 0. The ECG signal nodes are converted into a sequence RR according to the time series, RR = {C1, ..., C i },C i Represents the value of the i-th node in the sequence; (2) C in the RR sequence set i ≠0 is input into the dynamic sliding window Wm, and the maximum value P under each Wm window is calculated. The maximum value P calculated in each Wm window is combined into a sequence set RI, and the values in the RI set are subtracted from adjacent elements. The calculated difference sequence is the heart rate variability RRI sequence; The configuration contents of the HRV spectrum grading device include: The short-time Fourier transform is used to perform spectrum analysis and frequency band decomposition on the RRI sequence of the extracted 12-lead ECG signal. The decomposed frequency bands are defined as LF, HF1, and HF2. The amplitude values in the decomposed frequency bands are divided into levels according to A, B, C, and D. The hierarchical sequence set of the 12-lead signal values is calculated to be MQ. MQ contains three sequence combinations, among which the hierarchical sequence sets of LF, HF1, and HF2 are MQ1, MQ2, and MQ3 respectively. Optionally, the frequency band of the LF is 0-0.15 Hz, the frequency band of the HF1 is 0.15-0.25 Hz, and the frequency band of the HF2 is 0.25-0.4 Hz; Optionally, the A grade value is 0-0.25, the B grade value is 0.25-0.5, the C grade value is 0.5-0.75, and the D grade value is greater than 0.
75.
4. The heart disease identification system according to claim 1, characterized in that: The HRV feature rule mining and rule base construction module includes: a feature rule processing device; The configuration contents of the feature rule processing device include: The sequential combination rule sets AMQ = {AMQ1, AMQ2, AMQ3} are extracted from the 12-lead MQ = {MQ1, MQ2, MQ3} by the progressive sliding window calculation method. Then, the frequent item sets in the sequential combination rule sets are calculated, and the support of each frequent item set is calculated by the FP-growth algorithm. Then, the association between the frequent item sets is calculated, and the confidence is set to 0.7 to extract the potential rule sets. Finally, the frequent item sets that meet the support of 0.7 are combined with the extracted potential rule sets to generate a standard rule set. After deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained.
5. The heart disease identification system according to claim 1, characterized in that: The multi-classification heart disease recognition module includes: a multi-classification heart disease recognition device; The configuration contents of the multi-classification heart disease identification device include: (1) The monitored 12-lead heart disease ECG data is used to calculate the sequence combination rule set AMQ' = {AMQ1', AMQ2', AMQ3'}, and the feature matching calculation of the three frequency bands LF, HF1, and HF2 is performed with the generated standard rule base BFF = {BFF1, BFF2, BFF3}; (2) Corresponding AMQ'={AMQ1', AMQ2', AMQ3'} and BFF={BFF1, BFF2, BFF3} to three frequency bands, and calculating the number of rule matches MR={MR1, MR2, MR3}; (3) According to the three frequency bands, the matching rules are calculated and extracted to establish a matching rule set MK = {MK1, MK2, MK3}, and the support of the corresponding rules in the set is combined into a support sequence set SQ = {SQ1, SQ2, SQ3}, SQ z is the support of the Zth rule in MK; (4) According to the three frequency bands, the support of each matching rule is summed up and the total support is TS = {TS1, TS2, TS3}; (5) According to the three frequency bands, the confidences of the matched rules are summed up and the total confidence is TC = {TC1, TC2, TC3}; (6) Calculate the total number of rules LE = {LE1, LE2, LE3} of the three frequency band standard rule bases BFF = {BFF1, BFF2, BFF3} respectively, and obtain the matching frequency FR = {FR1, FR2, FR3} of the three frequency bands by the calculation formula FR = MR / LE; (7) According to the three frequency bands, the support scores of each sequence matching are calculated respectively. SQX = {SQX1, SQX2, SQX3}, SQ (MR) / 2 is the support of the MR / 2 rule in MK, SQ (MR+1) / 2 is the support of the (MR+1) / 2th rule in MK. When MR is an even number, the calculation formula is: When MR is an odd number, the calculation formula is SQX=SQ (MR+1) / 2 ; (8) According to the three frequency bands, the support skewness of each sequence matching is calculated. SS = {SS1, SS2, SS3}, MK = {MK1, MK2, MK3}. The average support of the rule is MK={MK1,MK2,MK3} The standard deviation of rule support is S={S1,S2,S3}, and the formula is (9) According to the three frequency bands, the support kurtosis of each sequence matching is calculated as SK = {SK1, SK2, SK3}, and the formula is: (10) The seven feature sets Y of MR, TS, TC, FR, SQX, SS, and SK in the three frequency bands are used to calculate the influence of the feature set on the heart disease B = {cardiac conduction obstruction - B1, myocardial infarction - B2, cardiac hypertrophy - B3, abnormal changes of ST segment and T wave - B4-B5}, and the importance index of the features is mined and evaluated. Among them, GI BU GII is the reduction in Gini impurity of the Uth feature in the Bth heart disease feature set Y, B is the sum of the Gini impurity reductions of all features in the B-th type of heart disease feature set Y, O BU is the importance index of the Uth feature in the Bth heart disease set Y, all O BU The influencing factor set W of heart disease in set B is composed, and the characteristic influencing factor sets W = {W1, W2, W3, W4, W5} for heart diseases B1, B2, B3, B4, and B5 in set B are output respectively, where n is the number of characteristic sets of set Y, W v is the impact factor of the Vth feature in set Y, Y v is the eigenvalue of the Vth feature in set Y, using the formula The feature sets FN = {FN1, FN2, FN3, FN4, FN5} of five heart diseases are calculated respectively; (11) All MR, TS, TC, FR, SQX, SS, SK, and FN features extracted from the three frequency bands are used to select the split point with the largest Gini impurity reduction as the optimal split point using the Gini impurity reduction algorithm, and the random forest majority voting mechanism is used to classify and identify heart disease.
6. A processing method for a heart disease identification system based on 12-lead ECG signal HRV feature extraction, characterized in that: include: Step 1: Collect 12-lead ECG signals for distributed denoising preprocessing; Step 2: Extract the R peak of the preprocessed ECG signal, make a difference between the adjacent R peak signal values, construct a difference sequence according to the continuous time nodes, and then perform spectrum decomposition of the HRV signal sequence through short-time Fourier transform, calculate the spectrum amplitude of the frequency band, and divide the 12 leads into 12 matching segments; Step 3: Based on the sliding window and frequent item set association rule mining algorithm, the 12-lead HRV signal sequence of heart disease is mined for sequence combination, and the frequent item sets of sequence combination and the potential rule sets of 12 matching segments are mined. The standard rule base is generated through deduplication screening and filtering; Step 4: Use rule matching calculations to obtain the matching features of the heart disease sequence. At the same time, perform feature influencing factor analysis on heart disease, combine new features, and use the random forest method to classify and calculate heart disease.
7. The processing method according to claim 6, characterized in that: The step 1 comprises: performing smoothing filtering and high-pass filtering on the 12-lead ECG signal, and performing denoising preprocessing on the ECG signal; Optionally, step 2 comprises: The preprocessed 12-lead ECG signal is differentially calculated to set the threshold T, the R wave is identified and the R peak is extracted, and the R peak difference is calculated to obtain the heart rate variability RRI sequence; The RRI sequence of the extracted 12-lead ECG signal is decomposed into LF, HF1, and HF2 using short-time Fourier transform. The amplitude values in the decomposed frequency bands are divided into grades A, B, C, and D; Calculate the hierarchical sequence set MQ of the 12-lead signal values of the three frequency bands = {MQ1, MQ2, MQ3}; Optionally, the frequency band of the LF is 0-0.15 Hz, the frequency band of the HF1 is 0.15-0.25 Hz, and the frequency band of the HF2 is 0.25-0.4 Hz; Optionally, the A grade value is 0-0.25, the B grade value is 0.25-0.5, the C grade value is 0.5-0.75, and the D grade value is greater than 0.75; Optionally, the step 3 includes: extracting the MQ sequence combination rule set AMQ={AMQ1, AMQ2, AMQ3} by a progressive sliding window calculation method; The frequent item sets in AMQ are calculated by FP-growth algorithm, and then potential rule sets are extracted through association rules. The frequent item sets and potential rule sets are combined to generate standard rule sets. After deduplication calculation, the standard rule base BFF = {BFF1, BFF2, BFF3} is obtained; Optionally, the step 4 includes: calculating the sequence combination rule set AMQ'={AMQ1', AMQ2', AMQ3'} and the generated standard rule base BFF={BFF1, BFF2, BFF3} to perform feature matching calculations on the three frequency bands of LF, HF1 and HF2; The feature matching calculates the rule matching number MR, total support TS, total confidence TC, matching frequency FR, support score SQX, support skewness SS, and support kurtosis SK of the three frequency bands. These features are used to calculate the feature influence factor of each type of heart disease, and the new feature FN is calculated through the feature influence factor; All MR, TS, TC, FR, SQX, SS, SK, and FN features extracted from the three frequency bands are used to classify and identify heart disease using the random forest majority voting mechanism.
Citation Information
Cited By
Myocardial infarction auxiliary prediction method based on machine learning
CN119423779A