An analysis and identification method, system and storage medium for electrocardiogram
By constructing a concept tree of knowledge about electrocardiograms and arrhythmias, and combining data augmentation and preprocessing techniques, an ECG prior model was established, which solved the problem of ECG analysis relying on manual interpretation and achieved efficient and accurate automated analysis.
Patent Information
- Application Number
- CN202211390694.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-07
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-11-07
AI Technical Summary
Current electrocardiogram analysis relies on manual interpretation, which is inefficient and easily limited by the skill level of professionals. It also lacks a unified and objective standard, leading to frequent misjudgments and omissions.
A concept tree based on knowledge of electrocardiograms and arrhythmias is constructed. An ECG prior model is established through data augmentation and preprocessing. K-means clustering and preprocessing techniques are used to form a target recognition model to achieve automated analysis.
It improves the accuracy and efficiency of electrocardiogram analysis, reduces errors from manual interpretation, and provides a unified objective standard.
Smart Images

Figure CN115778400B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an analysis and identification method and system for electrocardiogram and a storage medium. BACKGROUND
[0002] Arrhythmia is often accompanied by a series of clinical symptoms and complications, and even life-threatening. With the aging of the population and the change of lifestyle, the incidence of arrhythmia is rapidly rising, and it is becoming more and more age-related and growing. ECG is a basic tool in medical practice, and more than 300 million ECGs are performed worldwide each year. It plays a key role in the diagnosis of arrhythmia. ECG can accurately reflect the nature and degree of arrhythmia. It is a challenging and significant task to detect arrhythmia from ECG records.
[0003] The error rate of ECG machine interpretation is still very high, and ECG detection in clinical practice still depends on visual observation by experienced physicians. The manual interpretation method is limited by the level and number of professionals, the process is tedious, time-consuming, inefficient, and lacks uniform objective standards, which can easily lead to misjudgment and missed judgment.
[0004] In recent years, the rapid development of deep learning has enabled computers to exhibit cognitive abilities close to or even surpassing human level in many tasks. Deep learning is a multi-layered representation algorithm that models the implicit distribution of data. In other words, deep learning algorithms automatically extract low-level or high-level features needed for classification. Therefore, deep learning can better represent the features of data. At the same time, due to the many levels and parameters of the model, the capacity is also sufficient, so the deep learning model has the ability to represent large-scale data, so for image, voice and other features that are not obvious, deep learning can achieve better results on large-scale training data. Moreover, since deep learning combines features and classifiers into one framework, it reduces the huge workload of manually extracting features in use, so not only can the effect be better, but also it is very convenient to apply. SUMMARY
[0005] Therefore, the embodiments of the present application provide an analysis and identification method and system for electrocardiogram with high accuracy and high efficiency, and a storage medium.
[0006] One aspect of the embodiments of the present application provides an analysis and identification method for electrocardiogram, comprising:
[0007] constructing a concept tree according to the definition of electrocardiogram and arrhythmia knowledge, and establishing an arrhythmia electrocardiogram data set;
[0008] performing data enhancement processing on the arrhythmia electrocardiogram data set according to the concept tree, and constructing prior data;
[0009] constructing an ECG prior model according to the prior data;
[0010] optimizing the ECG prior model to obtain a target recognition model;
[0011] analyzing and recognizing the electrocardiogram to be analyzed according to the target recognition model to determine a recognition result of the electrocardiogram to be analyzed.
[0012] Optionally, the data augmentation processing of the arrhythmia electrocardiogram data set according to the concept tree to construct prior data comprises:
[0013] locating feature points in the electrocardiogram data;
[0014] cutting out P-QRS-T characteristic waves and wave segments according to the located feature points;
[0015] determining control points of each wave segment to form ECG features;
[0016] adopting a K-means method to cluster each ECG feature to form prior data;
[0017] splicing the prior data of each segment to obtain expanded and augmented prior data.
[0018] Optionally, the step of constructing an ECG prior model according to the prior data comprises the step of constructing an ECG arrhythmia data set, which comprises:
[0019] extracting ECG data samples;
[0020] filtering the ECG data samples to obtain a training data set and a test data set;
[0021] analyzing data distribution and class similarity of the training data set and the test data set to improve the discrimination of the arrhythmia data of the training data set and the test data set.
[0022] Optionally, the step of constructing an ECG prior model according to the prior data further comprises the step of pre-processing the prior data, which comprises:
[0023] removing electromyographic signals in the prior data through a Butterworth low-pass filter;
[0024] removing power frequency interference signals in the prior data through a 50Hz finite impulse response notch filter with a Kaiser window function;
[0025] The ECG baseline drift in the prior data is removed by an infinite impulse response zero-phase shift digital filter.
[0026] Optionally, the feature points obtained by positioning are used to segment P-QRS-T characteristic waves and wave segments, including:
[0027] According to the feature points obtained by positioning, an R peak detection algorithm is used to determine the position of the R peak.
[0028] A 250ms moving window is used to iteratively query the left and right sides of the R peak, and the minimum value in the first window on the left is determined as the position of the Q peak, and the minimum value in the first window on the right is determined as the S peak.
[0029] According to the feature points obtained by positioning, a time window traversal is performed starting from the QRS complex to detect P waves and T waves.
[0030] According to the detected key points, the ECG signal is decomposed into multiple periodic heartbeats.
[0031] According to the positioning points, each heartbeat period is divided into six segments: P wave, P-Q interval, QRS complex, S-T interval, T wave, and T-P interval. The P wave is defined as the signal between the P start point and the P end point.
[0032] Specifically, according to the feature points obtained by positioning, a time window traversal is performed starting from the QRS complex to detect P waves and T waves, including:
[0033] According to the boundary detection method of local distance transformation, the maximum distance between the start point and the end point of the auxiliary line segment at each point on the signal is calculated to find the start point and the end point of the P wave and the T wave.
[0034] A 200ms time window is established before the Q start point of the QRS complex, and a 400ms time window is established after the S end point.
[0035] The same R peak detection algorithm as the R peak detection is used to detect P peaks and T peaks, and local distance transformation is used to determine the start point and the end point of the P wave and the T wave.
[0036] Optionally, the control points of each wave segment are determined to form ECG features, including:
[0037] The length distribution of each wave segment is counted respectively.
[0038] The average length of each type of wave segment is calculated.
[0039] According to the average length, the number of control points and the index number of each wave segment are determined.
[0040] According to the average length, the number of control points and the index number, the control points in each wave segment are calculated, and the corresponding ECG features are determined.
[0041] Optionally, the K-means method is used to cluster each ECG feature to form prior data, including:
[0042] The Euclidean distance is used to calculate the distance between the instance and the cluster center;
[0043] The number of clusters is configured;
[0044] According to the distance and the number of clusters, the K-means method is used to cluster each wave segment represented by the control points;
[0045] When the clustering is completed, each wave segment is assigned a cluster number according to the cluster category to which the wave segment belongs.
[0046] Optionally, the method further includes:
[0047] Based on the encoded features, the spliced electrocardiogram is classified by using the classification naive Bayes.
[0048] Another aspect of the embodiment of the application also provides an analysis and recognition system for electrocardiograms, including:
[0049] A first module is configured to construct a concept tree according to the definition of electrocardiograms and arrhythmia knowledge, and establish an arrhythmia electrocardiogram data set;
[0050] A second module is configured to perform data enhancement processing on the arrhythmia electrocardiogram data set according to the concept tree, and construct prior data;
[0051] A third module is configured to construct an ECG prior model according to the prior data;
[0052] A fourth module is configured to optimize the ECG prior model to obtain a target recognition model;
[0053] A fifth module is configured to analyze and recognize the electrocardiogram to be analyzed according to the target recognition model, and determine the recognition result of the electrocardiogram to be analyzed.
[0054] Another aspect of the embodiment of the application also provides a computer readable storage medium, the storage medium stores a program, and the program is executed by a processor to realize the method as described above.
[0055] The embodiment of the application also discloses a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the foregoing method.
[0056] The embodiment of the application constructs a concept tree according to definition of electrocardiogram and arrhythmia knowledge, and establishes an arrhythmia electrocardiogram data set; performs data enhancement processing on the arrhythmia electrocardiogram data set according to the concept tree, and constructs prior data; constructs an ECG prior model according to the prior data; optimizes the ECG prior model, and obtains a target recognition model; analyzes and recognizes a to-be-analyzed electrocardiogram according to the target recognition model, and determines a recognition result of the to-be-analyzed electrocardiogram. The application has high accuracy and high efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0058] Figure 1 The overall technical roadmap provided for the embodiment of the application;
[0059] Figure 2 The processing flowchart of the arrhythmia data set provided for the embodiment of the application;
[0060] Figure 3 The schematic diagram of different heartbeat positioning points provided for the embodiment of the application;
[0061] Figure 4 The flowchart of heartbeat splicing and coding provided for the embodiment of the application;
[0062] Figure 5 The overall step flowchart of the embodiment of the application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0064] Glossary:
[0065] The ECG categories classified and recognized by the present application are as follows:
[0066] Tachy- and brady-
[0067] 1. Atrial Flutter (AFL)
[0068] 2. Atrial Fibrillation (AF)
[0069] 3. Ventricular Tachycardia (VT)
[0070] 4. Atrial Tachycardia (AT)
[0071] 5. Sinus Tachycardia (ST)
[0072] 6. Atrioventricular Junction Tachycardia (JT)
[0073] 7. Sinus Bradycardia (SB)
[0074] 8. Sinus Arrhythmia (SA)
[0075] Conduction abnormalities
[0076] 9. Sinoatrial Conduction Block (SA block)
[0077] 10. Intraventricular Conduction Block (IV block)
[0078] 11. Atrioventricular Conduction Block (AV block)
[0079] Abnormalities of origin
[0080] 12. Premature Atrial Contraction (PAC)
[0081] 13. Premature Ventricular Contraction (PVC)
[0082] 14. Atrioventricular Junctional Premature Contraction (PJC)
[0083] 15. Ventricular escape (VE)
[0084] 16. Atrioventricular junction escape (JE)
[0085] 17. Atrioventricular junction escape rhythm (JER)
[0086] 18. Normal.
[0087] Electrocardiogram (ECG) is a technique that uses an electrocardiograph to record the electrical activity of the heart during each cardiac cycle. It reflects the changes in the occurrence, propagation and recovery of cardiac activation.
[0088] Composition of each wave and wave segment of electrocardiogram:
[0089] P wave: The electrical activation of a normal heart begins in the sinoatrial node. Since the sinoatrial node is located at the junction of the right atrium and the superior vena cava, the activation of the sinoatrial node is first conducted to the right atrium, through the atrial bundle to the left atrium, forming the P wave on the electrocardiogram. The P wave represents the activation of the atrium, with the first half representing the activation of the right atrium and the second half representing the activation of the left atrium. The P wave duration is 0.12 seconds, and the height is 0.25 mv. When the atrium is enlarged and the interatrial conduction is abnormal, the P wave can be high and sharp or double peaked.
[0090] PR interval: The PR interval represents the time required for the excitement generated by the sinoatrial node to reach the ventricle through the atrium, atrioventricular junction and atrioventricular bundle and cause the ventricular muscle to start to be excited, so it is also called atrioventricular conduction time. The normal PR interval is 0.12-0.20 seconds. When the conduction from the atrium to the ventricle is blocked, it shows as prolongation of the PR interval or disappearance of the ventricular wave after the P wave.
[0091] QRS complex: The activation is downward through the His bundle, left and right bundle branches, and synchronous activation of the left and right ventricles, forming the QRS complex. The QRS complex represents the ventricular depolarization, with a duration of less than 0.11 seconds. When there is conduction block of the left and right bundle branches, ventricular enlargement or hypertrophy, etc., the QRS complex appears to be widened, deformed and prolonged.
[0092] J point: The intersection point where the QRS wave ends and the ST segment begins. It represents the completion of the entire ventricular muscle cell depolarization.
[0093] ST segment: The period of time from the completion of ventricular depolarization to the beginning of repolarization. During this time, the ventricular muscle of all parts is in the depolarized state, and there is no electrical potential difference between cells. Therefore, under normal circumstances, the ST segment should be on the isoelectric line. When a part of the myocardium shows signs of ischemia or necrosis, there is still a potential difference after the ventricle is depolarized, which is manifested as a shift in the ST segment on the electrocardiogram.
[0094] T wave: The subsequent T wave represents the repolarization of the ventricle. In leads with the main QRS wave pointing upwards, the T wave should be in the same direction as the main QRS wave. Changes in the T wave on the electrocardiogram are influenced by many factors. For example, T wave flattening and inversion can occur in myocardial ischemia. T wave elevation can be seen in hyperkalemia, acute myocardial infarction, and other conditions.
[0095] U wave: U wave can be seen after T wave on some leads, which is currently believed to be related to ventricular repolarization.
[0096] QT interval: Represents the time from ventricular depolarization to repolarization. Normal QT interval is 0.44 seconds. Since the QT interval is affected by heart rate, the concept of corrected QT interval (QTC) is introduced. One of the calculation methods is QTc = QT / √RR. Prolongation of QT interval is often associated with the occurrence of malignant arrhythmias.
[0097] Electrocardiogram leads: The heart is a three-dimensional structure. In order to reflect the electrical activity of different surfaces of the heart, electrodes are placed at different parts of the body to record and reflect the electrical activity of the heart. When performing a routine electrocardiogram examination, usually only 4 limb lead electrodes and V1-V6 precordial lead electrodes are placed to record a routine 12-lead electrocardiogram.
[0098] Cardiac conduction system: The cardiac conduction system is composed of special myocardial cells located within the myocardium that can generate and conduct impulses, including the sinoatrial node, internodal tract, atrioventricular node, bundle of His, right bundle branch, left bundle branch, and Purkinje fibers. The sinoatrial node is the pacemaker of normal heart rate, located between the entrance of the superior vena cava and the right atrial appendage under the epicardium; the internodal tract is the conduction pathway between the sinoatrial node and the atrioventricular node, divided into three conduction tracts: anterior, middle, and posterior internodal tracts, of which the anterior internodal tract sends a branch to the left atrium called the atrial bundle. The atrioventricular node is located under the endocardium on the right side of the atrial septum, lying in the area between the coronary sinus ostium, oval fossa, and the upper edge of the tricuspid valve septum. It extends downward as the atrioventricular bundle. The atrioventricular node and the bundle of His (His bundle) form the atrioventricular junction, which further extends forward and downward to the lower end of the membranous interventricular septum, dividing into left and right bundle branches under the endocardium on the left and right sides of the interventricular septum. The left bundle branch starts at the left side of the interventricular septum and further divides into anterior and superior branches. The right bundle branch descends along the right side of the interventricular septum and only begins to branch into Purkinje fibers at the apex. The right bundle branch connects with the Purkinje fiber network under the endocardium and finally connects to the ventricular muscle.
[0099] The function of the cardiac conduction system is to generate and conduct impulses to the various parts of the heart, causing the atrial and ventricular myocardium to contract in a rhythmic manner.
[0100] 1) The cardiac conduction system includes the sinoatrial node, atrioventricular node, bundle of His, left and right bundle branches, and numerous fine branches that distribute to the papillary muscles and the ventricular wall.
[0101] 2) Except for the sinoatrial node, which is located in the deep part of the right atrial epicardium, the rest of the system is distributed in the subendocardial layer.
[0102] 3) The special myocardial fibers that make up the cardiac conduction system are of three types: pacemaker cells (involved in the composition of the sinoatrial node and atrioventricular node), transitional cells (which play a role in conducting impulses), and Purkinje fibers (which can rapidly transmit impulses).
[0103] 4) The Purkinje fibers at the end of the bundle branches connect with the ventricular myocardium.
[0104] 5) The function of the cardiac conduction system is to generate and conduct impulses, maintaining the rhythmic beating of the heart.
[0105] Arrhythmia is a group of important cardiovascular diseases caused by abnormal activation of the sinoatrial node or activation originating from outside the sinoatrial node, slow conduction, block, or conduction through abnormal pathways, i.e., abnormalities in the origin and / or conduction of the heart's activity, leading to abnormal frequency and / or rhythm of the heart's beats. Arrhythmia can occur alone or in conjunction with other cardiovascular diseases. Its prognosis is related to the cause, triggers, evolution trend, and whether it leads to severe hemodynamic disorders, and it can suddenly onset and cause sudden death, or persistently affect the heart and cause its failure.
[0106] 7. The classification of arrhythmia includes the following five types:
[0107] ① Premature beats, also known as extrasystoles, are heartbeats caused by premature impulses from a part of the heart. They are classified as atrial, junctional, or ventricular, depending on the location of origin. Premature beats may not cause symptoms, and in the absence of organic heart disease, the prognosis is good. Some patients may experience palpitations, dizziness, and fatigue, and symptomatic treatment may be required. If there is organic heart disease, the underlying heart disease should be treated.
[0108] ② Atrial flutter and atrial fibrillation. In atrial flutter, the atrial rate is usually 220-360 beats per minute, and generally not all of the impulses are transmitted to the ventricles, resulting in 2:1 or 3:1 transmission due to physiological atrioventricular block, and occasionally 1:1 atrioventricular conduction. Atrial fibrillation is a type of rapid arrhythmia with multiple foci in the atrium, with a frequency of 350-600 beats per minute and an irregular ventricular rhythm of 120-160 beats per minute. Atrial flutter and atrial fibrillation are commonly seen in patients with rheumatic heart disease, hyperthyroidism, coronary heart disease, cardiomyopathy, and hypertensive heart disease. The cause of atrial fibrillation in many patients is unknown.
[0109] ③Supraventricular paroxysmal tachycardia. It is a paroxysmal rapid and regular ectopic rhythm, with a heart rate of 160-220 beats per minute, but also slow to 130 beats per minute or fast up to 300 beats per minute. According to the mechanism of occurrence can be divided into atrial, atrioventricular nodal reentry and atrioventricular bypass reentry three kinds, often seen in patients without organic heart disease, etiology unknown, also seen in rheumatic heart disease, cardiomyopathy, coronary heart disease, etc. The clinical manifestations are sudden onset, lasting for several seconds, several minutes to several hours, even several days suddenly stop, severe episodes can cause heart and brain blood supply, leading to hypotension, dizziness, nausea, angina or syncope.
[0110] ④Ventricular tachycardia and ventricular fibrillation. Three or more consecutive ventricular premature beats are ventricular tachycardia, mostly seen in patients with organic heart disease. Persistent ventricular tachycardia is a duration of more than 30 seconds or severe hemodynamic dysfunction within 30 seconds. Non-persistent ventricular tachycardia refers to 30 seconds within which it is self-terminating. Twisted ventricular tachycardia is a special type of ventricular tachycardia, mostly seen in long QT syndrome, divided into congenital and acquired. Ventricular tachycardia can be converted to ventricular fibrillation if not treated in time. Ventricular fibrillation is the most serious arrhythmia and requires immediate electrical defibrillation to restore the rhythm.
[0111] ⑤Heart rate. Adult heart rate less than 60 beats per minute is called bradycardia, caused by sick sinus syndrome or atrioventricular block.
[0112] The mechanism of arrhythmia includes the following two kinds
[0113] 1. Abnormal impulse formation:
[0114] The sinoatrial node, intermodal bundle, coronary sinus orifice, distal atrioventricular node and His bundle-Purkinje system have self-regulation. Changes in excitability of the autonomic nervous system or its intrinsic lesions can lead to inappropriate impulse emission. In addition, myocardial cells that originally have no self-regulation, such as atrial and ventricular cells, can also exhibit abnormal self-regulation under pathological conditions, such as myocardial ischemia, drugs, electrolyte imbalance, and catecholamine increase.
[0115] 2. Abnormal impulse conduction:
[0116] Reentry is the most common mechanism of all rapid arrhythmias.
[0117] According to the mechanism of occurrence, the classification of arrhythmia includes the following two categories:
[0118] 1. Abnormal impulse formation:
[0119] 1) Sinus arrhythmia
[0120] (1) Sinus tachycardia (2) Sinus bradycardia (3) Sinus arrhythmia (4) Sinus arrest
[0121] 2) ectopic heart rate
[0122] ① Passive ectopic heart rate (1) escape (atrial, atrioventricular, ventricular); (2) paroxysmal tachycardia (atrial, atrioventricular, ventricular)
[0123] ② Active ectopic heart rate (1) premature contraction (atrial, atrioventricular, ventricular); (2) paroxysmal tachycardia (atrial, atrioventricular, atrioventricular reentry, ventricular); (3) atrial flutter, atrial fibrillation (4) ventricular flutter, ventricular fibrillation
[0124] 2. Abnormal impulse conduction:
[0125] 1) Physiological interference and atrioventricular separation
[0126] 2) Pathological (1) Sinus atrial block (2) Intra-atrial conduction block (3) Atrioventricular block (4) Bundle or branch block (left and right bundle branch and left bundle branch conduction block) or intraventricular block
[0127] 3) Abnormal interatrial conduction pathway Pre-excitation syndrome
[0128] Since the artificial interpretation method in the current electrocardiogram analysis method is limited by the level and quantity of professional personnel, the process is boring, time-consuming and low in efficiency, and in view of the problems existing in the prior art, an aspect of an embodiment of the present application provides an analysis and identification method for electrocardiogram, as shown in the figure, the method comprises the following steps: Figure 5
[0129] According to the definition of electrocardiogram and arrhythmia knowledge, a concept tree is constructed, and an arrhythmia electrocardiogram data set is established;
[0130] According to the concept tree, the arrhythmia electrocardiogram data set is subjected to data enhancement processing, and prior data is constructed;
[0131] According to the prior data, an ECG prior model is constructed;
[0132] The ECG prior model is optimized to obtain a target identification model;
[0133] According to the target identification model, the electrocardiogram to be analyzed is analyzed and identified to determine the identification result of the electrocardiogram to be analyzed.
[0134] Optionally, the data enhancement processing of the arrhythmia electrocardiogram data set according to the concept tree to construct prior data comprises:
[0135] The feature points in the electrocardiogram data are positioned;
[0136] According to the feature points obtained by positioning, P-QRS-T characteristic waves and wave segments are segmented out;
[0137] The control points of each wave segment are determined to form ECG features;
[0138] The K-means method is used to cluster each ECG feature to form prior data;
[0139] The prior data of each segment is spliced to obtain expanded and enhanced prior data.
[0140] Optionally, in the step of constructing an ECG prior model according to the prior data, a step of constructing an ECG arrhythmia data set is included, which comprises:
[0141] An ECG data sample is extracted;
[0142] The ECG data sample is filtered to obtain a training data set and a test data set;
[0143] Data distribution and class similarity analysis are performed on the training data set and the test data set to improve the discrimination of the training data set and the test data set.
[0144] Optionally, in the step of constructing an ECG prior model according to the prior data, a step of preprocessing the prior data is included, which comprises:
[0145] The electromyographic signal in the prior data is removed by a Butterworth low-pass filter;
[0146] The power frequency interference signal in the prior data is removed by a 50Hz finite impulse response notch filter with a Kaiser window function;
[0147] The ECG baseline drift in the prior data is removed by an infinite impulse response zero-phase shift digital filter.
[0148] Optionally, the step of segmenting out P-QRS-T characteristic waves and wave segments according to the feature points obtained by positioning comprises:
[0149] According to the feature points obtained by positioning, the position of the R peak is determined by an R peak detection algorithm;
[0150] A 250ms moving window is used to iteratively query the left and right sides of the R peak, and the minimum value in the first window on the left is determined as the position of the Q peak value, and the minimum value in the first window on the right is determined as the S peak value;
[0151] According to the positioning feature points, time window traversal is performed from the QRS complex to detect P wave and T wave;
[0152] According to the detected key points, the ECG signal is decomposed into multiple periodic heartbeats;
[0153] According to the positioning points, each heartbeat period is divided into six segments: P wave, P-Q interval, QRS complex, S-T interval, T wave, and T-P interval; wherein the P wave is defined as the signal between the P start point and the P end point;
[0154] Specifically, the QRS complex is detected according to the positioning feature points, time window traversal is performed from the QRS complex to detect P wave and T wave, including:
[0155] According to the boundary detection method of local distance transformation, the maximum distance between the start point and the end point of the auxiliary line segment at each point on the signal is calculated to find the start point and the end point of the P wave and the T wave;
[0156] A 200ms time window is established before the Q start point of the QRS complex, and a 400ms time window is established after the S end point;
[0157] The P peak and the T peak are detected by using the same R peak detection algorithm as the R peak detection algorithm, and the local distance transformation is used to determine the start point and the end point of the P wave and the T wave.
[0158] Optionally, the control points of each waveform segment are determined to form ECG features, including:
[0159] The length distribution of each wave segment is counted respectively;
[0160] The average length of each type of wave segment is calculated;
[0161] According to the average length, the number of control points and the index number of each wave segment are determined;
[0162] According to the average length, the number of control points and the index number, the control points in each wave segment are calculated, and the corresponding ECG features are determined.
[0163] Optionally, the K-means method is used to cluster each ECG feature to form prior data, including:
[0164] The distance between the instance and the cluster center is calculated using the Euclidean distance;
[0165] The number of clusters is configured;
[0166] According to the distance and the number of clusters, the K-means method is used to cluster the wave segments represented by the control points;
[0167] When the clustering is completed, each wave band is assigned a cluster number according to the cluster category to which each wave band belongs.
[0168] Optionally, the method further comprises:
[0169] Based on the coding features, the classified naive Bayes is used to classify the spliced electrocardio signal.
[0170] Another aspect of the embodiment of the present application further provides an analysis and recognition system for electrocardiogram, comprising:
[0171] The first module is configured to construct a concept tree according to the definition of electrocardiogram and arrhythmia knowledge, and establish an arrhythmia electrocardiogram data set;
[0172] The second module is configured to perform data enhancement processing on the arrhythmia electrocardiogram data set according to the concept tree, and construct prior data;
[0173] The third module is configured to construct an ECG prior model according to the prior data;
[0174] The fourth module is configured to optimize the ECG prior model to obtain a target recognition model;
[0175] The fifth module is configured to analyze and recognize the electrocardiogram to be analyzed according to the target recognition model, and determine the recognition result of the electrocardiogram to be analyzed.
[0176] Another aspect of the embodiment of the present application further provides a computer readable storage medium, the storage medium stores a program, and the program is executed by a processor to realize the method as described above.
[0177] The embodiment of the present application further discloses a computer program product or a computer program, the computer program product or the computer program comprises computer instructions stored in a computer readable storage medium. The processor of the computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method as described above.
[0178] The specific implementation process of the present application will be described in detail in combination with the accompanying drawings of the specification:
[0179] As shown in the figure, the overall implementation process of the present application includes 5 steps: Figure 1
[0180] 1. Electrocardiogram and arrhythmia concept tree: cardiology and arrhythmia knowledge are sorted and redefined to form a concept tree.
[0181] 2. Data: through an innovative preprocessing method, an arrhythmia electrocardiogram data set is established.
[0182] 3. Segmentation and Expression:
[0183] a) Using a self-developed method, feature points in the electrogram data are located, and P-QRS-T characteristic waves and bands are segmented based on the feature points;
[0184] b) Determine the control points for each waveform segment to form ECG features;
[0185] c) Use the K-means method to cluster the data segments to form prior data;
[0186] d) Segment the data fragments to expand and enhance the prior data.
[0187] 4. Prior Model: Establish an ECG prior model based on Bayesian theory.
[0188] 5. Application and deduction of prior models: Based on the ECG prior model, deduction and generalization are carried out to achieve small sample learning, ECG decomposition and generation.
[0189] The specific implementation process of each step is described in detail below:
[0190] 1. Concept tree of electrocardiogram and arrhythmia:
[0191] This invention systematically organizes the categories of arrhythmias to form an arrhythmia concept tree. It can be understood that the arrhythmia concept tree can be classified according to the location of the arrhythmia. This invention can diagnose and classify 18 ECG categories.
[0192] 2. GDPH ECG arrhythmia dataset
[0193] The data annotation, processing, and expression process in this embodiment of the invention is as follows: Figure 2 As shown, Figure 2 The upper half is the process of fine classification and labeling of samples, while the lower half is the process of processing and representing ECG data. ECG annotations and ECG data together constitute the dataset used by the ECG model in the later stages.
[0194] 2.1 Data Sample Extraction
[0195] The present application obtains ECG data from the relevant hospital database, and labels the ECG data of each participant as normal or other 17 arrhythmias. The 17 arrhythmias are: premature ventricular contraction (PVC), intraventricular block (IV block), ventricular tachycardia (VT), ventricular escape (VE), atrial flutter (AFL), atrial tachycardia (AT), atrial fibrillation (AF), premature atrial contraction (PAC), junctional premature contraction (PJC), junctional escape (JE), junctional tachycardia (JT), junctional escape rhythm (JER), atrioventricular block (AV block), sinoatrial block (SA block), sinus tachycardia (ST), sinus bradycardia (SB), and sinus arrhythmia (SA). According to the location of occurrence, the 17 arrhythmias can be divided into 4 super categories: sinus (including SA block, ST, SB and SA), atrium (including AFL, AT, AF and PAC), atrioventricular node (including PJC, JE, JT, JER and AV block) and ventricle (including PVC, IV block, VT and VE).
[0196] 2.2, the standard of exclusion
[0197] The present application embodiment excludes part of the ECG cases for the following reasons: (1) The ECG case is severely distorted due to signal loss or excessive noise. Since ECG records the electrical activity of the heart through electrodes placed on the skin, large movements and noisy surroundings can add irreducible noise to the signal. In addition, such distortion is more common in children's electrocardiograms. (2) The label of the ECG case is not available or uncertain. (3) For participants with multiple ECG tests, in order to avoid introducing bias in the participants, our study only uses the last ECG test and excludes other ECG tests. Finally, 48063 participants are excluded. The entire data set is randomly divided into a training data set and a test data set at a ratio of 4:1 at the label level.
[0198] In addition, the present application embodiment also analyzes the data distribution and class similarity of the constructed training data set and test data set. As a data set from the real world, the GDPH ECG arrhythmia data set is extremely unbalanced. The sample size of ST is the largest (N = 20273), and the sample size of VE is the smallest (N = 10). The standard deviation of the sample size of all arrhythmia types is 5249.63. The average and median of the sample size are 2670 and 106, respectively. The imbalance of the data set in the sample size may make the model unable to learn all arrhythmia categories equally.
[0199] Embodiments of the present application construct a class-level similarity matrix, where each element in the matrix is the similarity between two arrhythmia classes. The class-level similarity is the average similarity of all pairs of ECG signals from the two arrhythmia classes, respectively. Dynamic time warping (DTW) is used to measure the similarity between two ECG signals. The similarity matrix is normalized to the range of [0, 1] and sorted from the minimum to the maximum. Arrhythmias are not uniformly distributed in the representation space. SB, JER, SA, JE, AV block, PJC, PVC, AT, and AF are relatively similar. Those similar arrhythmia types can be more likely to fool the model. However, other arrhythmia types are more scattered and easier to distinguish.
[0200] 2.3, ECG preprocessing
[0201] ECG signals are a kind of weak physiological signals, which are easily disturbed in the process of acquisition, so the ECG signals need to be preprocessed before analysis. The three most common interferences of ECG signals are electromyography (EMG) interference, power frequency interference and baseline drift. The preprocessing of embodiments of the present application is based on the above three interferences.
[0202] Electromyography (EMG) is also a kind of physiological signal, which is the main noise in ECG signals. The frequency of EMG signal is related to muscle type, generally in the range of 30-300HZ, while the frequency of ECG signal is mainly in the range of 5-20HZ. Therefore, EMG signal can overlap with ECG signal. In our study, a Butterworth low-pass filter is used to remove EMG signal. Butterworth low-pass filter has the flattest band-pass frequency response curve, and gradually decreases to zero with the adjustment of stop band. In addition, the amplitude of the corner frequency decreases monotonously, and the higher the filter order, the faster the amplitude attenuation in the stop band.
[0203] With the existence of power supply network, power frequency interference is ubiquitous, and the interference signal with a frequency of 50Hz is the most common interference signal. In this study, a 50Hz finite impulse response (FIR) notch filter with Kaiser window function is used to eliminate power frequency signal. FIR filter has the linear phase characteristics required for ECG signal processing, and can obtain the best filtering performance with the least waveform distortion. Considering the overall difference of samples, Kaiser moving window is a window function close to the optimal structure, which can adaptively adjust the parameters of the filter according to different parameters.
[0204] Finally, an infinite impulse response zero phase shift digital filter is used to eliminate ECG baseline drift. As a routine preprocessing step for ECG analysis, it can prevent the introduction of artifact information that may distort the true oscillation phase. After preprocessing, the main noise is removed while the key information of ECG signal is preserved.
[0205] 2.4 P-QRS-T localization and segmentation
[0206] The embodiment of the present application locates the P-QRS-T feature points in the electrogram data, and segments the wave segments according to the feature points.
[0207] The main steps include the following:
[0208] 2.4.1 P-QRS-T localization in electrocardiogram data
[0209] This embodiment uses an adaptive and efficient R-peak detection algorithm to determine the position of the R-peak. Then, the Q-peak and S-peak are found by searching on both sides of the R-peak. Since there are rarely multiple peaks in the QRS complex, a moving window of 250 ms is used to iteratively query both sides. The minimum value in the first window on the left is the position of the Q-peak. The minimum value of the first window on the right is the S-peak.
[0210] Detecting P-wave and T-wave requires time window traversal from the QRS complex. Therefore, a wave onset and termination boundary detection algorithm is needed here. For this purpose, this embodiment proposes an improved boundary detection algorithm based on local distance transform. Local distance transform finds the onset and termination of a wave by calculating the maximum distance between the onset and termination of the auxiliary line segment at each point on the signal. From a morphological point of view, this is the point with the maximum curvature, which is consistent with the subjective judgment of doctors.
[0211] A 200 ms time window is established before the Q-onset, and a 400 ms time window is established after the S-termination. P-peak and T-peak are detected using the same detection algorithm as R-peak detection. Local distance transform is also used here to determine the onset and termination of P-wave and T-wave.
[0212] Figure 3 An example is shown, each heartbeat is divided into 6 wave segments by 11 locating points. A total of 11 points are identified in each heartbeat, which are P-onset, P-peak, P-termination, Q-onset, Q-peak, R-peak, S-peak, S-termination, T-onset, T-peak, and T-termination. The division of each heartbeat and the division of the waves within the heartbeat are based on the positioning of these feature points.
[0213] 2.4.2 Heartbeat period segmentation and heartbeat period wave segment segmentation
[0214] According to the key points detected in the previous step, this embodiment decomposes the ECG signal into multiple periodic heartbeats. The entire data set of this embodiment produces 459818 heartbeats, and the number of ECG samples and heartbeat periods in each class is shown in Table 1, which shows the number of heartbeats decomposed from the ECG signal in each class.
[0215] Table 1
[0216] Class Number of samples Number of heartbeats Premature atrial contractions 1287 12751 Atrial fibrillation 33 335 Sinus arrhythmia 9956 95233 Atrioventricular block 483 4527 Atrioventricular junctional escape rhythm 131 993 Atrioventricular junctional tachycardia 19 196 Ventricular escape 9 76 Atrioventricular junctional escape 33 284 Typical 7944 75675 Sinus bradycardia 1623 10464 Atrial tachycardia 80 793 Ventricular tachycardia 63 624 Intraventricular conduction block 3744 39050 Sinus tachycardia 20272 195493 Atrial fibrillation 64 653 Atrioventricular nodal premature beats 64 670 Sinoatrial conduction block 10 95 Ventricular premature beats 2230 21906 Total 48045 459818
[0217] Each heartbeat is further divided into 6 segments: P-wave, P-Q interval, QRS complex, S-T interval, T-wave, T-P interval. P-wave is defined as the signal between P-start and P-end, and similarly for other segments. Each heartbeat corresponds to 6 segments, so the number of instances in each segment is also 459818, which is equal to the number of samples of heartbeats.
[0218] 2.5. Determine the control points of each segment, form ECG features:
[0219] This embodiment extracts control points for each segment, and uses the extracted control points and their corresponding indices as the representation of each segment.
[0220] First, we count the distribution of the length of each segment.
[0221] Then, we calculate the average length of each segment.
[0222] Let l m (m = 1, 2, …, M) denote the length of the mth instance, where M is the total number of instances. The average length of a segment l^ can be obtained by the following equation:
[0223]
[0224] Take one control point every five points of the average length. Therefore, the number of control points N extracted for this segment is:
[0225]
[0226] For each instance, extract control points at equal intervals. Therefore, the nth control point of the mth instance can be obtained by the following equation:
[0227]
[0228] where, denotes the value of the nth control point of the mth instance, sig m (*) denotes the signal value of the mth instance with index *, denotes the corresponding index value of the nth control point.
[0229] The average length, number of control points, and number of indices of each segment are shown in Table 2 below, i.e., 12 control points will be extracted for each P-wave, 6 control points for P-Q interval, 20 control points for QRS wave, 6 control points for S-T interval, 14 control points for T-wave, and 18 control points for T-P interval. 82 control points will be extracted for each heartbeat cycle.
[0230] Table 2
[0231]
[0232] There are 459818 heartbeat cycles in the data set, each cycle has 6 wave segments, and there are 459818*6 instances in total. The index and its ECG signal value are calculated for each instance respectively, and finally 459818*82 pairs of control points (index, ECG signal value) are obtained.
[0233] 2.6, Wave segment clustering
[0234] For each type of wave segment represented by the control points, the K-means method is used to cluster the wave segments to form prior data.
[0235] The Euclidean distance is used to measure the distance between the instance and the cluster center. When the center does not change significantly in the iteration, the algorithm stops. A total of 54 (= 6 wave segments x 9 leads) clustering operations are required for 9 leads of 6 types of wave segments. In this embodiment, the number of clusters is one of the hyperparameters, which has 18 options: 3, 5, 8, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80.
[0236] In the embodiment of the application, the number of clusters is set to 25. After the number of clusters is determined, when the clustering is completed, each wave segment is assigned a cluster number according to the cluster category to which each wave segment belongs.
[0237] 2.7, Splicing and enhancement
[0238] This subsection splices the data segments to expand the prior data.
[0239] 2.7.1, Heartbeat splicing and coding
[0240] In this embodiment, multiple original heartbeats are spliced together as spliced ECG signals. The spliced ECG signals can be regarded as a permutation of the original heartbeats, and repetition is allowed in the permutation. The spliced ECG signals can simulate ECG signals that do not exist in the training data set, further enhancing the comprehensiveness of the training data set.
[0241] Assume represents the number of original heartbeats in the jth ECG signal of the ith type, where C is the total number of ECG types, M i represents the number of heartbeats of the ith ECG. N o represents the number of original heartbeats to be spliced. For the jth ECG signal of the ith type, the number of ECG signals that can be obtained by splicing can be obtained by the following equation:
[0242]
[0243] Therefore, the total number of spliced ECG signals No is:
[0244]
[0245] Substitute formula (4) into formula (5), we can get:
[0246]
[0247] In this embodiment, N o is another hyperparameter to control N^, which has 4 options: 2, 3, 4, 5. The value of N in the training dataset corresponds to N o There are four options: 2869966, 3021293, 11486438 and 25508046. For the computing resources of this embodiment, it is too difficult to analyze such a large number of ECG signals, so the upper limit of the number of spliced ECG signals in each class in the training dataset is set to 1500000. In the test dataset, for each original ECG signal, 20 spliced ECG signals are randomly selected. The prediction summary of 20 spliced ECG signals is used as the final prediction of the original ECG signal.
[0248] Based on the wave band cluster number, the spliced ECG signal can be encoded into a vector. Each heartbeat has 6 segments on each lead. In the unsupervised clustering step, a cluster number is assigned to each wave band. A heartbeat signal can be encoded into a vector with a size of 54 (= 6 segments x 9 leads). Therefore, the vector size of the spliced ECG signal is 54 x N o . Figure 4 Take the splicing length N o = 3 as an example to demonstrate the process of splicing and encoding of 3 original heartbeats. 3 original heartbeats with a splicing length of 3 can produce 33 = 27 new heartbeat sequences, each with 6 cluster numbers for 6 wave bands, and the vector length of each new heartbeat sequence is N0*6 = 18.
[0249] Each ECG contains 9 leads, and the ECG containing 3 heartbeats is finally encoded into 162 (= 6 wave bands x 9 leads x 3 heartbeats) features.
[0250] 3. Bayesian classification model
[0251] Based on the encoded features, the spliced ECG signal is classified using the classification naive Bayes (CNB). Assuming x i (i = 1, 2, …, n) is the feature of ECG, n is the number of features, and y is the category. According to the conditional probability, we have:
[0252] P(x1,x2,…,x n )P(y|x1,x2,…,x n )=P(y)P(x1,x2,…,xn |y)#(7)
[0253] It can be derived that:
[0254]
[0255] Based on the Naive Bayes assumption of feature independence, we have:
[0256] P(x i |y,x1,…,x i-1 ,x i+1 ,…,x i )=P(x i |y)#(9)
[0257] Equation 8 can be derived as:
[0258]
[0259] Because P(x1,x2,…,x n ) in equation 10 are constants, the classification rule can be written as:
[0260]
[0261] where y is the class label of the ECG signal, and P(x i |y) is calculated by the following equation:
[0262]
[0263] where Niac represents the number of concatenated ECG signals of the ith feature for class c, and Nc represents the number of concatenated ECG signals in class c. The predicted label of the original ECG signal is the average predicted label of the concatenated ECG signal.
[0264] 4. Control model:
[0265] In this embodiment, a control model is constructed using the feature engineering + classifier mode.
[0266] First, 114 features are extracted from the ECG signal. Among them, 10 features are defined on 9 individual lead signals (such as the average value of P-wave peak), so as to obtain 90 (10x9) scalar features. The remaining 24 features are related to the recording time when the segment key point appears (such as the position in the time dimension).
[0267] After determining the 114 features, three classic classifiers, K-nearest neighbor (KNN), random forest (RF), and extreme gradient boosting (XGBoost), are used. The three classifiers use the default configuration.
[0268] In addition, two deep learning-based models were also used as control models. The first one is a 1D CNN, which achieved state-of-the-art performance in the multi-classification of arrhythmia subtypes. The second one is an LSTM, which was proposed for ECG signal classification.
[0269] 5. Quantitative and statistical analysis
[0270] In this implementation, recall (sensitivity) was used to measure the diagnostic performance of the model for a certain arrhythmia. In addition, the overall diagnostic performance of the model was measured by macro-recall, which refers to the average of the recalls of all individual classes. In macro-recall, each class has the same weight when calculating the average recall, rather than setting the weight according to the sample size of each class. Therefore, macro-recall is fair at the class level and more sensitive to the performance of minority classes. The recall rate of the 95% confidence interval was calculated using the non-parametric bootstrap method with 1000 iterations. The linear correlation between the recall rate of the 18 classes and the sample size or class similarity was measured by the correlation coefficient (CC). The relationship of CC values is explained as follows: very weak (0.00-0.19), weak (0.20-0.39), moderate (0.40-0.59), strong (0.60-0.79), and very strong (0.80-1.00).
[0271] Therefore, due to the difference in sample size and inter-class similarity, arrhythmias can be further divided into strong arrhythmias and weak arrhythmias in computer-aided diagnosis. The crowding of strong arrhythmias on weak arrhythmias makes it possible that weak arrhythmia patients are underdiagnosed. To this end, inspired by the diagnostic thinking of cardiologists, the present invention proposes an arrhythmia diagnosis method combining ECG segment clustering and Bayesian theory. The GDPH ECG arrhythmia dataset is used to verify the method of the present invention. Through hyperparameter optimization, the optimal configuration of the method of the present invention in heartbeat splicing and segment clustering is determined.
[0272] Compared with other methods, the method of the present invention has comparable performance in strong arrhythmias, but better performance in weak arrhythmias. In addition, as the crowding behavior of strong arrhythmias increases, the method of the present invention can still make accurate diagnoses for weak arrhythmias.
[0273] In recent years, deep learning has shown outstanding performance in ECG interpretation. Its hierarchical structure allows higher-level features to be obtained, and its powerful feature extraction capability helps to adapt to complex mappings. Based on the definition of arrhythmia intensity, it is difficult for deep learning models to diagnose weak arrhythmias fairly during training.
[0274] In this study, the possible way to protect weak arrhythmia from strong arrhythmia is explored. The morphological features of ECG signals are the key information for cardiologists to diagnose arrhythmia. Inspired by this, the invention uses piecewise clustering to distinguish ECG signals with different morphological features. The arrangement of ECG signals at the beat level can effectively enrich the sample size of weak arrhythmia. On the other hand, compared with a single heartbeat, the splicing of multiple heartbeats increases the dimension of the ECG signal, which may increase the distance between different arrhythmias in the feature space. The method of the invention can alleviate the crowding out of weak arrhythmia by strong arrhythmia to some extent.
[0275] The interpretable ECG computer-aided interpretation system will be more trusted by cardiologists and therefore easy to use. In the method of the invention, the features are encoded by the number of segment clusters with clear practical meaning. The diagnostic decision is made based on the conditional probability of arrhythmia sub-segments, which is a simplified mathematical description of the previous diagnostic experience of cardiologists. Therefore, certain morphological features of arrhythmia may be implied in the segment clusters with high conditional probability. Some of the discovered morphological features match the current arrhythmia diagnostic criteria. Some of the discovered features may not match the current diagnostic criteria. However, these unmatched findings may hide new diagnostic markers of arrhythmia. The joint conditional probability of multiple segments may be a feasible method to discover new diagnostic markers.
[0276] In summary, compared with the prior art, the invention provides a complete set of systems, platforms and storage media containing ECG processing methods and arrhythmia intelligent diagnosis algorithms. The method includes: 1. ECG interference elimination algorithm based on signal filtering technology; 2. P-QRS-T feature point positioning and wave segment segmentation algorithm based on extreme value period iteration; 3. Wave segment control point selection and wave segment unsupervised classification algorithm; 4. Heartbeat period splicing and encoding algorithm based on cutting-splicing data augmentation. The invention can convert and enhance the original ECG into modeling and coding. The arrhythmia intelligent diagnosis algorithm of the invention models the ability of human learning and cognition through a Bayesian-based dynamic programming algorithm, and accurately diagnoses 17 types of arrhythmia beyond previous technologies; The model also has the ability of single-sample or small-sample learning, can identify and judge rare or unseen arrhythmia, and generalizes in an approximate human way. Finally, the method of the invention can also seamlessly interface with multiple hospital systems to form an ECG processing method and arrhythmia intelligent diagnosis algorithm system, platform and storage medium, and be applied to clinical ECG diagnosis practice.
[0277] In some alternative embodiments, the function / operations mentioned in the block diagrams can not occur in the order mentioned in the operational illustrations. For example, depending on the involved function / operation, two blocks shown in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in reverse order, depending upon the functionality / operations involved. Furthermore, embodiments presented and described in the flowcharts are only examples of implementing the present application. Alternative embodiments are possible where some of the steps are omitted, wherein additional steps are added, or wherein some of the steps are performed in a different order. It should be understood that the order of steps presented and described in the flowcharts illustrates implementations of the present application. The steps presented and described in the flowcharts are not necessarily performed in the order presented and described. Steps from one exemplary flowchart can be performed in a different order.
[0278] Furthermore, although the present application has been described in the context of functional modules, it is to be understood that one or more of the functions and / or features described can be integrated in a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It will also be appreciated that detailed discussion of the actual implementation of each module is not necessary for an understanding of the present application. Rather, the actual implementation of the modules, in light of the attributes, functions, and internal relationships of the various functional modules disclosed herein, will be apparent to one of ordinary skill in the art given the benefit of this disclosure. Accordingly, the present application is not limited to the specific embodiments illustrated herein, but is capable of being practiced with variations of and modifications to the specific embodiments disclosed herein without departing from the spirit and scope of the present application. It is to be understood that the specific concepts disclosed can be merely illustrative of specific concepts that can be implemented and that the scope of the present application is not to be limited to such specific embodiments. Rather, the scope of the present application is to be defined by the appended claims and equivalents thereof.
[0279] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0280] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be embodied in non-transitory computer-readable media, executed by one or more computing devices, and / or in any other way. The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered a list of executable instructions for implementing logic functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical), and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that can be later executed by a computer. In this context, a "computer-readable medium" can be any means that can store the program for use by or in connection with the instruction execution system, apparatus, or device.
[0281] The foregoing description, for purposes of explanation, describes specific embodiments and configurations to provide a thorough understanding of the application. However, it will be recognized by one skilled in the art that the application can be practiced without the specific details. The described embodiments and configurations are provided as examples and should not be construed as limiting the scope of the application. The description is not intended to be exhaustive or to limit the application to the precise forms disclosed. The described embodiments and configurations are provided for the purpose of example and understanding. Modifications or changes to the described embodiments and configurations can be readily made by those skilled in the art, and can be made individual ly to any embodiment or configuration. The described embodiments and configurations are chosen and described in order to best explain the principles of the application and the best way to implement and utilize the application. The embodiments and configurations set forth herein are to be considered in all respects as illustrative and not restrictive. The scope of the application is indicated by the appended claims, rather than the foregoing description, and all changes that come within the meaning and range of equivalents are intended to be embraced therein.
[0282] It will be appreciated that aspects of the application can be embodied in hardware and / or in software (including firmware, resident software, micro-code, etc.). Furthermore, aspects of the application can take many different forms of implementation. For example, the various functions discussed above can be implemented in hardware, software, firmware, or any combination thereof. In the implementation illustrated in the above-described embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following techniques, alone or in any combination(s), can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals; application specific integrated circuits having appropriate combinational logic gates; programmable gate arrays (PGA), field programmable gate arrays (FPGA), and so on.
[0283] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material, or characteristic being described is included in at least one embodiment or example of the application. The illustrative descriptions of these terms in the specification are not necessarily all referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0284] While the embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary and are not to be construed as limiting the scope of the application. The scope of the application is defined by the appended claims and their equivalents.
[0285] The above is a specific description of the preferred embodiment of the present application, but the present application is not limited to the described embodiment, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present application.
Claims
1. A method for analyzing and identifying electrocardiograms, characterized in that, include: A concept tree is constructed based on the definitions of electrocardiogram (ECG) and arrhythmia knowledge, and an arrhythmia ECG dataset is established. Data augmentation processing is performed on the arrhythmia electrocardiogram dataset based on the concept tree to construct prior data; Based on the prior data, construct an ECG prior model; The ECG prior model is optimized to obtain the target recognition model; Based on the target recognition model, the electrocardiogram to be analyzed is analyzed and recognized to determine the recognition result of the electrocardiogram to be analyzed; The step of performing data augmentation processing on the arrhythmia electrocardiogram dataset based on the concept tree to construct prior data includes: Locate feature points in electrocardiogram data; Based on the feature points obtained from the location, the characteristic waves and bands of P-QRS-T are segmented; Determine the control points for each waveform segment to form ECG features; The K-means method was used to cluster each ECG feature segment to form prior data; The prior data of each segment is concatenated to obtain the expanded and enhanced prior data; The step of determining the control points for each waveform segment to form ECG features includes: Analyze the length distribution of each band separately; Calculate the average length of each type of band; wherein the average length of the band satisfies: , , For the first The length of each instance, This represents the total number of instances. The average length of the band; Based on the average length, the number of control points and the number of indices for each band are determined; wherein, the number of control points for each band satisfies: , The number of control points for a band; the first The first instance Each control point satisfies: , Indicates the first The first instance The value of each control point Indicates the first The signal value at index * for each instance. Indicates the first The first instance The index value of each control point; Based on the average length, the number of control points, and the number of indices, the control points in each band are calculated, and the corresponding ECG features are determined.
2. The method for analyzing and identifying electrocardiograms according to claim 1, characterized in that, The step of constructing an ECG prior model based on the prior data includes the step of constructing an ECG arrhythmia dataset, which includes: Extract ECG data samples; The ECG data samples are filtered to obtain training and test datasets; Data distribution and class similarity analysis are performed on the training dataset and the test dataset to improve the distinguishability of the central law data in the training dataset and the test dataset.
3. The method for analyzing and identifying electrocardiograms according to claim 1, characterized in that, The step of constructing the ECG prior model based on the prior data also includes a step of preprocessing the prior data, which includes: Electromyographic signals in the prior data were removed using a Butterworth low-pass filter. The power frequency interference signal in the prior data is removed by a 50Hz finite impulse response notch filter with a Kaiser window function. The ECG baseline drift in the prior data is removed by using an infinite impulse response zero-phase-shift digital filter.
4. The method for analyzing and identifying electrocardiograms according to claim 1, characterized in that, The step of segmenting the P-QRS-T characteristic waves and bands based on the feature points obtained from the location includes: Based on the feature points obtained from localization, the position of the R-peak is determined using the R-peak detection algorithm; Use a 250ms moving window to iteratively query both sides of the R peak, determine the position of the Q peak by the minimum value in the first window on the left, and determine the position of the S peak by the minimum value in the first window on the right. Based on the feature points obtained from the localization, the time window is traversed starting from the QRS complex to detect the P wave and T wave. Based on the detected key points, the ECG signal is decomposed into multiple periodic heartbeats; Based on the location points, each heartbeat cycle is divided into 6 segments: P wave, PQ interval, QRS complex, ST interval, T wave, and TP interval; among them, the P wave is defined as the signal between the P initiation point and the P termination point; The step of detecting P-waves and T-waves by traversing a time window starting from the QRS complex based on the located feature points includes: Based on the boundary detection method of local distance transformation, the starting point and ending point of P-wave and T-wave are found by calculating the maximum distance between the starting point and ending point of the auxiliary line segment at each point on the signal. A 200ms time window is established before the Q start point of the QRS group and a 400ms time window is established after the S end point. The P-peak and T-peak are detected using the same R-peak detection algorithm as the R-peak detection algorithm. Local distance transformation is used to determine the start and end points of the P-wave and T-wave.
5. The method for analyzing and identifying electrocardiograms according to claim 1, characterized in that, The K-means method is used to cluster each ECG feature segment to form prior data, including: Use Euclidean distance to calculate the distance between the instance and the cluster centroid; Configure the number of clusters; Based on the distance and the number of clusters, the K-means method is used to cluster the bands for each band represented by control points; When clustering is complete, each band will be assigned a cluster number based on the cluster category to which it belongs.
6. The method for analyzing and identifying electrocardiograms according to claim 1, characterized in that, The method further includes: Based on the encoding features, Naive Bayes classification is used to classify the spliced electrocardiogram signals.
7. A system for analyzing and recognizing electrocardiograms, characterized in that, include: The first module is used to construct a concept tree based on the definition of electrocardiogram and arrhythmia knowledge, and to establish an arrhythmia electrocardiogram dataset. The second module is used to perform data augmentation processing on the arrhythmia electrocardiogram dataset based on the concept tree to construct prior data. The third module is used to construct an ECG prior model based on the prior data; The fourth module is used to optimize the ECG prior model to obtain the target recognition model; The fifth module is used to analyze and identify the electrocardiogram to be analyzed based on the target recognition model, and to determine the recognition result of the electrocardiogram to be analyzed. The step of performing data augmentation processing on the arrhythmia electrocardiogram dataset based on the concept tree to construct prior data includes: Locate feature points in electrocardiogram data; Based on the feature points obtained from the location, the characteristic waves and bands of P-QRS-T are segmented; Determine the control points for each waveform segment to form ECG features; The K-means method was used to cluster each ECG feature segment to form prior data; The prior data of each segment is concatenated to obtain the expanded and enhanced prior data; The step of determining the control points for each waveform segment to form ECG features includes: Analyze the length distribution of each band separately; Calculate the average length of each type of band; wherein the average length of the band satisfies: , , For the first The length of each instance, This represents the total number of instances. The average length of the band; Based on the average length, the number of control points and the number of indices for each band are determined; wherein, the number of control points for each band satisfies: , The number of control points for a band; the first The first instance Each control point satisfies: , Indicates the first The first instance The value of each control point Indicates the first The signal value at index * for each instance. Indicates the first The first instance The index value of each control point; Based on the average length, the number of control points, and the number of indices, the control points in each band are calculated, and the corresponding ECG features are determined.
8. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Vital sign comprehensive testing analytic system
CN208511016U
KR20220143400A