Electrocardiogram signal processing method and device, electronic device and storage medium
By performing noise reduction processing and characteristic parameter identification on ECG signals, combined with ST-T wave and Q wave abnormal characteristics, the problem of inaccurate myocardial infarction identification in the existing technology is solved, and more reliable myocardial infarction identification results are achieved.
Patent Information
- Application Number
- CN202111361859.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-11-17
AI Technical Summary
In the existing technology, when using a simple neural network model to identify myocardial infarction on ECG signals, there are problems such as insufficient accuracy in waveform abnormality identification and low reliability of model output probability data.
By performing noise reduction processing and heart beat detection on the original ECG signal, based on the preset ST-T wave abnormal characteristic parameters and Q wave abnormal characteristic parameters, abnormal heartbeat segments are identified, and combined with the ST-T wave and Q wave abnormal classification results Probabilistic data for determining stage of MI.
The accurate identification of myocardial infarction is achieved, the reliability of the identification results is improved, and the accuracy of the myocardial infarction classification results is enhanced.
Smart Images

Figure CN116135147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing technology, and in particular to a method, device, electronic equipment and storage medium for processing electrocardiogram signals. Background Art
[0002] ECG signals reflect the electrophysiological process of cardiac activity. Therefore, long-term monitoring of ECG signals can help detect cardiovascular abnormalities as early as possible for timely treatment. Normal ECG signals are generally composed of P waves, QRS complex waves and T waves, and sometimes U waves. Among them, the P wave represents the electrical activity of atrial contraction, and the QRS complex wave and T represent the electrical activity of ventricular contraction. The shape, amplitude and duration of each ECG waveform can be used to evaluate the health of the cardiovascular system.
[0003] Myocardial infarction is a malignant disease caused by the formation of blood clots in the coronary arteries of the heart, leading to myocardial ischemia and subsequent myocardial necrosis. After myocardial infarction, most patients may show specific changes in the electrocardiogram, such as ischemic T waves, damaged ST segments, and necrotic Q waves. The general myocardial infarction identification and classification method uses a simple neural network model to identify the characteristics of each waveform. However, since the electrocardiogram abnormalities of myocardial infarction may be similar to waveform abnormalities caused by other lesions or mutations, feature recognition through a simple neural network model may result in inaccurate waveform abnormality recognition and low reliability of the probability data output by the model. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the embodiments of the present invention provide a method, device, electronic device and storage medium for processing electrocardiogram signals. The method for processing electrocardiogram signals has the advantages of being able to accurately identify myocardial infarction and having a high reliability of the identification result.
[0005] According to a first aspect of an embodiment of the present invention, there is provided a method for processing an electrocardiogram signal, comprising the following steps:
[0006] Acquire an original electrocardiogram signal, perform noise reduction processing on the original electrocardiogram signal to obtain a sample signal, and detect the sample signal to obtain a heartbeat segment;
[0007] Based on the preset ST-T wave abnormality characteristic parameters, performing ST-T wave abnormality recognition on the heart beat segment to obtain an ST-T wave abnormality classification result;
[0008] Based on the preset Q wave abnormality characteristic parameters, performing Q wave abnormality recognition on the heart beat segment to obtain a Q wave abnormality classification result;
[0009] The probability data of the myocardial infarction stage is determined according to the ST-T wave abnormality classification results and the Q wave abnormality classification results.
[0010] According to a second aspect of an embodiment of the present invention, there is provided an electrocardiogram signal processing device, comprising:
[0011] An acquisition module, used for acquiring an original ECG signal, performing noise reduction processing on the original ECG signal to obtain a sample signal, and performing heartbeat detection on the sample signal to obtain a heartbeat segment;
[0012] A first classification module is used to perform ST-T wave abnormality recognition on the heart beat segment based on preset ST-T wave abnormality characteristic parameters to obtain an ST-T wave abnormality classification result;
[0013] A second classification module is used to perform Q wave abnormality recognition on the heart beat segment based on preset Q wave abnormality characteristic parameters to obtain a Q wave abnormality classification result;
[0014] A determination module is used to determine the probability data of the myocardial infarction stage according to the ST-T wave abnormality classification result and the Q wave abnormality classification result.
[0015] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: at least one processor and at least one memory; wherein the memory is used to store one or more computer programs, and the computer programs are suitable for being loaded by the processor and executing the method for processing electrocardiogram signals as described in any one of the above embodiments.
[0016] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the method for processing an electrocardiogram signal as described in any one of the above embodiments.
[0017] By applying the above-mentioned technical scheme of the present application, the original electrocardiogram signal is subjected to noise reduction processing, and heartbeat detection is performed to obtain heartbeat segments. Then, based on preset ST-T wave abnormality characteristic parameters, ST-T wave abnormality recognition is performed on the heartbeat segments to obtain ST-T wave abnormality classification results. Then, based on preset Q wave abnormality characteristic parameters, Q wave abnormality recognition is performed on the heartbeat segments to obtain Q wave abnormality classification results. Finally, the ST-T wave abnormality classification results and the Q wave abnormality classification results are combined to determine the probability data of the myocardial infarction stage.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 creative work. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of a waveform of an electrocardiogram signal showing an optional embodiment of the present invention;
[0021] Figure 2 A schematic diagram of an electrocardiogram showing myocardial infarction according to an optional embodiment of the present invention;
[0022] Figure 3 A schematic flow chart of a method for processing an electrocardiogram signal according to an optional embodiment of the present invention;
[0023] Figure 4 This is a flow chart of step S2 of a method for processing an electrocardiogram signal according to an optional embodiment of the present invention;
[0024] Figure 5 A neural network structure diagram for ST-T wave abnormality recognition shown in an optional embodiment of the present invention;
[0025] Figure 6 A flow chart of a method for obtaining a ST-T waveform feature vector according to an embodiment of the present invention;
[0026] Figure 7 A flow chart of a method for obtaining mask fragments according to an embodiment of the present invention;
[0027] Figure 8 A flow chart of a method for acquiring abnormal ST-T wave characteristic parameters according to an embodiment of the present invention;
[0028] Fig. 9 This is a flow chart of step S3 of a method for processing an electrocardiogram signal according to an embodiment of the present invention;
[0029] Fig.10 A schematic diagram of the structure of an electrocardiogram signal processing device according to an embodiment of the present invention;
[0030] Fig.11 This is a schematic structural diagram of an electronic device according to an optional embodiment of the present invention. DETAILED DESCRIPTION
[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0032] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0033] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0034] like Figure 1 As shown, a normal ECG signal is generally composed of a P wave, a QRS complex wave and a T wave, and sometimes a U wave.
[0035] The P wave is the atrial depolarization wave, representing the excitation of the left and right atria. Since the sinoatrial node is located under the endocardium of the right atrium, the excitation is transmitted to the right atrium first and to the left atrium later. Therefore, the depolarization of the right atrium is completed slightly earlier than that of the left atrium. In clinical practice, for practical purposes, the front part of the P wave represents the excitation of the right atrium, and the back part represents the excitation of the left atrium.
[0036] The QRS complex reflects the changes in the depolarization potential and time of the left and right ventricles. The first downward wave is the Q wave, the upward wave is the R wave, and the next downward wave is the S wave. The time from the start of the QRS complex to the end of the QRS complex is the QRS duration. The process of T wave generation is the process of ventricular repolarization. The normal T wave has a long ascending branch and a short descending branch, and the peak is round and blunt.
[0037] Abnormal T waves are one of the most common and widespread phenomena in electrocardiogram changes. Some T wave changes may be related to temperature, emotions, and nerves, and are a physiological change. However, some T wave changes, although quite small, are important clues for diagnosing heart disease. Abnormally tall T waves are seen in the hyperacute injury period of myocardial infarction, hyperkalemia, increased vagal tension, etc.; abnormally deep T waves are seen in acute subendocardial myocardial infarction, the evolutionary stage of acute myocardial infarction, severe electrolyte disorders, etc.
[0038] The U wave is a smaller wave in the electrocardiogram (ECG). It is a wide and low wave that appears 0.02 to 0.04 seconds after the T wave. It is generally believed that it may be formed by the negative afterpotential generated by various parts of the heart during diastole, and some people believe that it is the result of Purkinje fiber repolarization.
[0039] Myocardial infarction is a malignant disease caused by the formation of blood clots in the coronary arteries of the heart, leading to myocardial ischemia and subsequent myocardial necrosis. After myocardial infarction, most patients may have specific changes in their electrocardiograms, such as Figure 2 As shown in the figure, after myocardial infarction occurs, the patient's ECG signal will show changes such as ischemic T waves, damaged ST segments and necrotic Q waves.
[0040] There is a method for processing ECG signals in the prior art, which uses a simple neural network model to identify the characteristics of each waveform. However, since the ECG abnormalities of myocardial infarction may be similar to the waveform abnormalities caused by other lesions or mutations, the use of a simple neural network model for feature recognition may result in inaccurate waveform abnormality recognition and low reliability of the probability data output by the model.
[0041] Based on this, an embodiment of the present invention provides a method, device, electronic device and storage medium for processing an electrocardiogram signal. The method for processing an electrocardiogram signal has the advantages of being able to accurately identify myocardial infarction and having a high reliability of the identification result.
[0042] Various embodiments of the present invention are described below with reference to the accompanying drawings.
[0043] Embodiment 1
[0044] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of a method for processing an electrocardiogram signal according to an optional embodiment of the present invention. Figure 3 As shown, the method for processing an ECG signal in the first embodiment includes the following steps:
[0045] S1: Acquire an original ECG signal, perform noise reduction processing on the original ECG signal to obtain a sample signal, and detect the sample signal to obtain a heart beat segment.
[0046] In this embodiment, the original ECG signal is a signal of the change of electrical activity generated by each cardiac cycle of the heart recorded from the body surface, usually recorded in a graphical manner through an electrocardiogram (ECG). In the embodiment of the present application, multi-channel synchronous data acquisition and storage of human heart signals, background noise and ECG signals can be used. For example, ECG signals can be collected through ECG leads and sensors, and analog signals of human physiological parameters can be converted into digital signals by an analog-to-digital converter and stored in a memory.
[0047] When the original ECG signal is subjected to noise reduction processing, the original ECG signal is resampled to 250HZ, and then the high-frequency noise with a frequency greater than 40HZ, such as the electromyographic signal and fair interference, is filtered out. When the original ECG signal is subjected to noise reduction processing, the collected ECG signal can be subjected to impedance matching, filtering, amplification, and other processing through an analog circuit. Since the ECG signal actually collected contains various noises, the waveform is rough and not smooth, making it difficult to extract the useful information contained in the QRS complex wave, a low-pass digital filter (Butterworth filter) can also be used for low-pass filtering to filter out high-frequency noise (above 40Hz) and obtain a filtered sample signal.
[0048] When the sample signal is detected to obtain the heartbeat segment, the sample signal is detected to obtain the heartbeat position, type (sinus, supraventricular, ventricular and other types), and the reference points of each band (the starting and ending point of the P wave, the starting and ending point of the QRS complex and its sub-waves, and the T wave end point.
[0049] In an optional embodiment, when the sample signal is detected to obtain the heartbeat segment, the sample signal is also subjected to signal quality evaluation, and part of the signal is filtered out to obtain a heartbeat segment with higher quality. The signal quality evaluation includes the following steps:
[0050] If the number of heartbeats contained in the detected sample signal is greater than or equal to three, then for the second heartbeat to the second to last heartbeat, the ECG signal and ECG baseline between the start point of the P wave and the end point of the T wave are used to divide the heartbeat segment and the baseline segment respectively;
[0051] The energy proportion of the high frequency part of each heartbeat segment is calculated, and the heartbeat segments whose energy proportion of the high frequency part exceeds a preset energy threshold are filtered out; wherein the preset energy threshold may be 30% or other values.
[0052] The peak-to-peak value difference of the baseline segments is calculated, and the baseline segments whose peak-to-peak value exceeds a preset peak-to-peak value threshold are filtered out to obtain the heart beat segments. The preset peak-to-peak value threshold may be 0.2 mV or other values.
[0053] S2: Based on the preset ST-T wave abnormality characteristic parameters, ST-T wave abnormality recognition is performed on the heart beat segment to obtain the ST-T wave abnormality classification result.
[0054] The electrocardiogram manifestations of myocardial infarction are mainly ST-T abnormalities and Q wave abnormalities. However, since ST-T wave abnormalities can also be caused by other lesions, normal variations and other factors, and ST-T changes caused by different factors are mostly non-specific, they are difficult to identify.
[0055] In this embodiment, in order to eliminate the interference of ST-T wave abnormalities caused by other lesions, ST-T wave abnormality recognition is performed on heart beat segments in combination with preset ST-T wave abnormality characteristic parameters to obtain ST-T wave abnormality classification results, which helps to improve the accuracy of the classification results of myocardial infarction.
[0056] Among them, the ST-T wave abnormal characteristic parameter is a kind of clinical prior information, which is a set of ST-T abnormal characteristics of the ECG signal of myocardial infarction. Combining the ST-T wave abnormal characteristic parameters to identify ST-T wave abnormalities in heart beat segments can prevent the interference caused by abnormal ST-T waves caused by other lesions, so as to obtain more accurate ST-T wave abnormality classification results.
[0057] In this embodiment, please refer to Figure 4 and Figure 5 , Figure 4 This is a flow chart of step S2 of a method for processing an electrocardiogram signal according to an optional embodiment of the present invention; Figure 5 A neural network structure diagram for ST-T wave abnormality recognition shown as an optional embodiment of the present invention.
[0058] according to Figure 4 As shown, step S2 includes the following steps:
[0059] S21: The heart beat segments are sequentially input into the ST-T wave abnormality recognition model, and the ST-T waveform feature vector is obtained after convolution, normalization, activation and residual block processing.
[0060] The chip fragments may be heartbeat fragments that are relatively pure, conducive to abnormality detection, and of good quality after quality evaluation.
[0061] In this embodiment, the heartbeat segment is input into the ST-T wave abnormality recognition model for ST-T wave abnormality recognition, that is, the ST-T wave abnormality feature is extracted, so that the ST-T wave abnormality feature vector can be obtained. Among them, the ST-T wave abnormality recognition model is a classifier model, which is a ST-T wave abnormality recognition model pre-trained by a training set, and can realize ST-T wave abnormality recognition of heartbeat segments.
[0062] In other embodiments, the ST-T wave abnormality feature vector may be obtained by other methods, or the heart beat segment may be input into other ST-T wave recognition models for ST-T wave abnormality recognition.
[0063] See also Figure 6 , Figure 6 The flowchart of the method for obtaining ST-T waveform feature vector is shown as an embodiment of the present invention.
[0064] Step S21 includes the following steps:
[0065] Step S211: Input the heartbeat segment into the convolution layer of the ST-T wave abnormality recognition and classification model ( Figure 4 In (C0), the heart beat segment and the convolution kernel function are convolved to obtain the first feature matrix.
[0066] The convolution layer is a convolutional network, which is used to extract features from the input heartbeat segment and output a first feature matrix. The dimension of the convolution kernel of the convolution layer is 32. The convolution layer includes a first convolution layer, a first normalization layer and a first activation layer.
[0067] Step S212: Perform residual analysis on the first characteristic matrix ( Figure 4 C1, C2 and C3) to obtain the second characteristic matrix.
[0068] The residual block is a deep residual network layer. The first feature matrix output by the convolutional network is input into the deep residual network layer for further feature extraction to obtain the second feature matrix, thereby avoiding the problem of gradient disappearance or gradient explosion.
[0069] Among them, the dimension of the convolution kernel of the deep residual network layer C1 is 32; the deep residual network layer C2 includes the second convolution layer, the second normalization layer, the second activation layer, the third convolution layer and the third normalization layer, the third activation layer, and the dimension of the convolution kernel in the C2 layer is 64; the dimension of the convolution kernel of the deep residual network layer C3 is 128.
[0070] Step S213: Obtain the mask fragment, and perform a product operation on the mask fragment and the second characteristic matrix to obtain a third characteristic matrix, so as to obtain a third characteristic matrix that only retains the ST-T characteristic information.
[0071] In this embodiment, the mask segment is a binary signal composed of 0 and 1, wherein the region with a value of 1 is processed, and the region with a value of 0 is not processed. The value of the ST-T region on the mask segment is 1, and the value of other regions is 0. After the mask segment is multiplied point by point with the second feature matrix, the value of the ST-T region on the second feature matrix is retained, and the value of other regions is set to 0. In the subsequent analysis, only the ST-T region on the second feature matrix is further analyzed, and other regions are no longer analyzed, that is, the features of other bands of the heartbeat segment are filtered out, so that the ST-T waveform feature vector can be finally obtained.
[0072] See also Figure 7 , Figure 7 A flow chart of a method for obtaining mask fragments according to an embodiment of the present invention.
[0073] Optionally, the step of obtaining the mask fragment includes:
[0074] S2131: Analyze the heartbeat segment to obtain the heartbeat position, and pad the heartbeat segment with zeros based on the heartbeat position to extend the heartbeat segment to a preset length, thereby obtaining a reference signal.
[0075] S2132: Generate an initial mask segment, resample the initial mask segment to obtain a mask segment whose length is consistent with the length of the reference signal, thereby changing the length of the mask segment. The value of the mask region from the QRS wave end point to the T wave end point of the mask segment is 1, and the value of the remaining region is 0.
[0076] Step S214: Input the third feature matrix into the global pooling layer for pooling processing to obtain the ST-T waveform feature vector.
[0077] The pooling layer is used to compress the output third feature matrix to obtain the ST-T waveform feature vector for subsequent ST-T waveform abnormality classification.
[0078] S22: Input the ST-T waveform feature vector and the preset ST-T wave abnormality feature parameters into the fully connected layer of the ST-T wave abnormality recognition model to output a three-dimensional vector.
[0079] In this embodiment, the ST-T waveform feature vector is a deep feature vector with a dimension of 128, and the ST-T wave abnormality feature parameters include a number of clinical prior ST-T wave abnormality features, and the number of clinical prior ST-T wave abnormality features constitute a feature parameter vector with a dimension of 7; the deep feature vector with a dimension of 128 and the feature parameter vector with a dimension of 7 are input into the fully connected layer of the ST-T wave abnormality recognition model, and after full connection, a three-dimensional vector with a dimension of 135 is output.
[0080] Among them, the three-dimensional vector is used to represent the probability of the ST-T wave corresponding to the three types of ST-T wave abnormalities. The numerical size of each vector can be calculated by obtaining the three-dimensional vector.
[0081] In an alternative embodiment, see Figure 8 , Figure 8 The figure is a flow chart of a method for acquiring abnormal ST-T wave characteristic parameters according to an embodiment of the present invention.
[0082] The method for obtaining ST-T wave abnormal characteristic parameters comprises the following steps:
[0083] S221: Acquire an electrocardiogram signal showing abnormal ST-T waves.
[0084] The ECG signal with abnormal ST-T wave can be obtained from prior clinical experience. It is an ECG signal with abnormal ST-T wave and myocardial infarction. The abnormal ST-T wave feature in the ECG signal with abnormal ST-T wave is extracted to facilitate the extraction of abnormal ST-T wave features in the heart beat segments of the detection set.
[0085] S222: Identify the P wave band, QRS wave group and ST wave band of the ECG signal, determine the midpoint between the end point of the P wave band and the start point of the QRS wave group as the reference point, and calculate the voltage value ST of the reference point. ref .
[0086] S223: Selecting a number of sampling points after the QRS wave end point, and calculating the voltage values of the number of sampling points relative to the reference point, so as to construct an ST-T wave abnormality feature vector representing the ST-T wave abnormality feature.
[0087] Specifically, the sampling points include 20ms, 40ms, 60ms and 80ms after the end point of the QRS wave, and the voltage values of the above sampling points relative to the reference point are calculated, which are st 20 、st 40 、st 60 and st 80 .
[0088] st 20 、st 40 、st 60 and st 80 The calculation formula is:
[0089] st 20 =stj 20 -st ref
[0090] st 40 =stj 40 -stref
[0091] st 60 =stj 60 -st ref ;
[0092] st 80 =stj 80 -st ref
[0093] Among them, stj 20 The voltage value is 20ms after the end point of the QRS wave. The voltage value is compared with the voltage value of the reference point st ref Subtracting them will give the voltage value st relative to the reference point 20ms after the end of the QRS wave. 20 ;
[0094] stj 40 The voltage value is 40ms after the end point of the QRS wave. The voltage value is compared with the voltage value of the reference point st ref Subtracting them will give the voltage value st relative to the reference point 40ms after the end of the QRS wave. 40 ;
[0095] stj 60 The voltage value is 60ms after the end point of the QRS wave. The voltage value is compared with the voltage value of the reference point st ref Subtracting them will give the voltage value st relative to the reference point 60ms after the end of the QRS wave. 60 ;
[0096] stj 80 The voltage value is 80ms after the end point of the QRS wave. The voltage value is compared with the voltage value of the reference point st ref Subtracting them, we can get the voltage value st relative to the reference point 80ms after the end of the QRS wave. 80 .
[0097] S224: Divide the T wave band in the electrocardiogram signal and determine the positive amplitude t of the T wave band + , negative amplitude t - and standard deviation t std .
[0098] Among them, the positive amplitude of the T wave band is t + The determination method is: calculate the maximum value of the T wave band, if the maximum value is greater than the first preset threshold, the positive amplitude value of the T wave band is the maximum value, otherwise it is 0; the first preset threshold can be 0.15mV.
[0099] Among them, the negative amplitude of the T wave band is t -The determination method is: calculate the minimum value of the T wave band, if the minimum value is less than the second preset threshold, the negative amplitude value of the T wave band is the minimum value, otherwise it is 0; the second preset threshold can be -0.15mV.
[0100] When the T wave is not abnormal, the positive amplitude of the T wave should be greater than the first preset threshold; the negative amplitude of the T wave should be less than the second preset threshold. According to the positive amplitude and negative amplitude of the T wave band, the characteristics of the abnormal T wave can be obtained, so as to facilitate the construction of the ST-T wave abnormal feature vector that characterizes the abnormal characteristics of the ST-T wave. Among them, the T wave abnormality includes: bidirectional T wave, or T wave inversion.
[0101] S225: constructing an ST-T wave abnormality feature vector representing the abnormal characteristics of the ST-T wave according to the voltage values of several sampling points, the positive amplitude of the T wave band, the negative amplitude of the T wave band and the standard deviation of the T wave band, and determining the ST-T wave abnormality feature vector as the ST-T wave abnormality feature parameter.
[0102] Among them, the ST-T wave abnormal feature vector is: fea param =[st 20 ,st 40 ,st 60 ,st 80 ,t + ,t - ,t std ].
[0103] S23: Determine the vector with the highest value in the three-dimensional vector, and determine the ST-T wave abnormality classification result according to the category to which the vector with the highest value belongs, that is, output the ST-T abnormality type with the highest probability, so as to classify and output the probability of myocardial infarction.
[0104] S3: Based on the preset Q wave abnormality characteristic parameters, Q wave abnormality recognition is performed on the heart beat segment to obtain a Q wave abnormality classification result.
[0105] In this embodiment, combined with the preset ST-T wave abnormality characteristic parameters, ST-T wave abnormality recognition is performed on the heart beat segment to obtain the ST-T wave abnormality classification result, which can obtain a more accurate Q wave abnormality classification result, which helps to improve the accuracy of the output probability data of myocardial infarction. Among them, the Q wave abnormality characteristic parameters are the Q wave abnormality feature set of the electrocardiogram signal that has already suffered myocardial infarction.
[0106] Specifically, the preset Q wave abnormality characteristic parameters and heart beat segments may be input into the Q wave abnormality recognition model to perform recognition of the Q wave abnormality characteristics.
[0107] See also Fig. 9 , Fig. 9This is a flow chart of step S3 of a method for processing an electrocardiogram signal according to an embodiment of the present invention.
[0108] Step S3 includes:
[0109] S31: Analyze the heart beat segments to obtain the data of each lead, and calculate the Q wave amplitude, Q wave duration and R wave amplitude of each lead data. The lead data includes 12 lead data, using the international universal lead system, namely, lead I, lead II, lead III, lead aVL, lead aVF, lead aVR, lead V1, lead V2, lead V3, lead V4, lead V5 and lead V6.
[0110] S32: In combination with the preset Q wave abnormality characteristic parameters, determine whether the Q wave is abnormal according to the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data, and output Q wave abnormality probability data; wherein the preset Q wave abnormality characteristic parameters include several clinical prior Q wave abnormality characteristics.
[0111] In this embodiment, in combination with the preset Q wave abnormality characteristic parameters, when determining whether the Q wave is abnormal according to the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data, the Q wave abnormality is judged.
[0112] In the 12-lead ECG data, if there is any of the following abnormalities, it is judged as a Q wave abnormality, which includes:
[0113] In leads I, II, III, aVL, V3, V4, V5, and V6, if the ratio of the Q wave amplitude to the R wave amplitude is greater than or equal to one-fourth, and / or the Q wave duration is greater than or equal to 0.04 seconds, the Q wave is considered abnormal;
[0114] In V1, V2, V3, V4, V5, and V6, if the Q wave duration of a lead is greater than or equal to the Q wave duration of the next lead, or the Q wave amplitude of a lead is greater than or equal to the Q wave amplitude of the next lead;
[0115] In leads V1, V2, V3, and V4, there was no lead-by-lead increase in the R wave amplitude;
[0116] In leads V1, V2, V3, and V4, the difference in R wave amplitude between two adjacent leads is greater than or equal to 50%.
[0117] S33: Determine the Q wave abnormality classification result based on the Q wave abnormality probability data and output it.
[0118] S4: Determine the probability data of the myocardial infarction stage based on the ST-T wave abnormality classification results and the Q wave abnormality classification results.
[0119] After a myocardial infarction occurs, the patient's electrocardiogram will show specific changes, such as ischemic T waves, damaged ST segments and necrotic Q waves, and the waveform characteristics of each stage are different. Therefore, the probability data of the myocardial infarction stage can be obtained based on the waveform abnormality classification results, that is, the probability data of the myocardial infarction stage can be obtained based on the ST-T wave abnormality classification results and the Q wave abnormality classification results.
[0120] By applying the above-mentioned technical scheme of the present application, the original electrocardiogram signal is subjected to noise reduction processing, and heartbeat detection is performed to obtain heartbeat segments. Then, based on the preset ST-T wave abnormality characteristic parameters, ST-T wave abnormality recognition is performed on the heartbeat segments to obtain ST-T wave abnormality classification results. Then, based on the preset Q wave abnormality characteristic parameters, Q wave abnormality recognition is performed on the heartbeat segments to obtain Q wave abnormality classification results. Finally, the ST-T wave abnormality classification results and the Q wave abnormality classification results are combined to determine the probability data of the myocardial infarction stage.
[0121] Embodiment 2
[0122] According to a second aspect of an embodiment of the present invention, an electrocardiogram signal processing device is disclosed, which can be used to execute the content of the electrocardiogram signal processing method in the first embodiment of the present application, and has corresponding functions and beneficial effects. For details not disclosed in the embodiment of the electrocardiogram signal processing device of the present application, please refer to the content of the electrocardiogram signal processing method of the present application.
[0123] See also Fig.10 , Fig.10 It is a schematic diagram of the structure of an electrocardiogram signal processing device shown in an embodiment of the present invention.
[0124] The electrocardiogram signal processing device 800 is characterized by comprising:
[0125] The acquisition module 801 is used to acquire the original ECG signal, perform noise reduction processing on the original ECG signal to obtain a sample signal, and perform heartbeat detection on the sample signal to obtain a heartbeat segment;
[0126] The first classification module 802 is used to identify ST-T wave abnormalities on heart beat segments based on preset ST-T wave abnormality characteristic parameters to obtain ST-T wave abnormality classification results;
[0127] The second classification module 803 is used to perform Q wave abnormality recognition on the heart beat segment based on the preset Q wave abnormality characteristic parameters to obtain a Q wave abnormality classification result;
[0128] The determination module 804 is used to determine the probability data of the myocardial infarction stage according to the ST-T wave abnormality classification result and the Q wave abnormality classification result.
[0129] In an embodiment of the present application, noise reduction processing is performed on the original ECG signal, and heartbeat detection is performed to obtain heartbeat segments. Then, based on preset ST-T wave abnormality characteristic parameters, ST-T wave abnormality recognition is performed on the heartbeat segments to obtain ST-T wave abnormality classification results. Then, based on preset Q wave abnormality characteristic parameters, Q wave abnormality recognition is performed on the heartbeat segments to obtain Q wave abnormality classification results. Finally, the ST-T wave abnormality classification results and the Q wave abnormality classification results are combined to determine the probability data of the myocardial infarction stage.
[0130] In an optional embodiment, the first classification module 802 is used to obtain ST-T wave abnormality classification results.
[0131] The first classification module 802 includes:
[0132] The ST-T waveform feature vector unit is used to input the heart beat segments into the ST-T wave abnormality recognition model in sequence, and obtain the ST-T waveform feature vector after convolution, normalization, activation and residual block processing.
[0133] The identification output unit is used to input the ST-T waveform feature vector and the preset ST-T wave abnormality feature parameters into the fully connected layer of the ST-T wave abnormality recognition model to output a three-dimensional vector; the three-dimensional vector is used to characterize the probability of the ST-T wave corresponding to the three types of ST-T wave abnormalities; wherein the preset ST-T wave abnormality feature parameters include several ST-T wave abnormality features based on clinical prior information.
[0134] The classification output unit is used to determine the vector with the highest value in the three-dimensional vector, and determine the ST-T wave abnormality classification result according to the category to which the vector with the highest value belongs.
[0135] In an optional embodiment, the second classification module 803 is used to obtain a Q wave abnormality classification result.
[0136] The second classification module 803 includes:
[0137] The calculation unit is used to analyze the heart beat segments to obtain the data of each lead, and calculate the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data.
[0138] A probability output unit is used to determine whether the Q wave is abnormal according to the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data in combination with preset Q wave abnormal characteristic parameters, and output Q wave abnormal probability data; wherein the preset Q wave abnormal characteristic parameters include a number of clinical prior Q wave abnormal characteristics;
[0139] The classification result output unit is used to determine and output the Q wave abnormality classification result based on the Q wave abnormality probability data.
[0140] It is worth noting that the ECG signal processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the above ECG signal processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the ECG signal processing device and the ECG signal processing method provided in the above embodiment belong to the same concept, and the embodiment process is detailed in the embodiment, which will not be repeated here.
[0141] Embodiment 3
[0142] According to a third aspect of an embodiment of the present invention, an electronic device is disclosed. Fig.11 , Fig.11 This is a schematic structural diagram of an electronic device according to an optional embodiment of the present invention.
[0143] The electronic device 900 includes: at least one processor 901 and at least one memory 902;
[0144] The memory 902 is used to store one or more computer programs, and the computer programs are suitable for being loaded by the processor and executing the method for processing ECG signals in any one of the above embodiments.
[0145] The electronic device 900 also includes at least one network interface, a user interface, a memory and at least one communication bus, wherein the communication bus is used to realize the connection and communication between these components.
[0146] The user interface may include an interface for connecting to a display screen and an interface for connecting to a camera. The optional user interface may also include a standard wired interface and a wireless interface.
[0147] The network interface may include a standard wired interface or a wireless interface (such as a WIFI interface).
[0148] Among them, the processor 901 may include one or more processing cores. The processor 901 uses various interfaces and lines to connect various parts within the entire electronic device 900, and executes various functions and processes data of the electronic device 900 by running or executing instructions, programs, code sets or instruction sets stored in the processor 901, and calling data stored in the memory 902. Optionally, the processor 901 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable logic arrays, PLA). The processor 901 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 901, and it can be implemented separately through a chip.
[0149] Among them, the memory 902 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 902 includes a non-transitory computer-readable storage medium. The memory 902 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 902 may optionally be at least one storage device located away from the aforementioned processor 901. As Fig. 9 As shown, the memory 902 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application program of a smart device.
[0150] exist Fig. 9In the electronic device 900 shown, the user interface is mainly used to provide an input interface for the user, obtain user input data, and provide a video input interface for the camera to obtain image signals; and the processor 901 can be used to call the operating application of the smart device stored in the memory 902, and execute the relevant operations in the image quality adjustment method in the above-mentioned embodiment.
[0151] The above-mentioned smart device can be used to execute the contents of the electrocardiogram signal processing method of the corresponding embodiment of the present application, and has corresponding functions and beneficial effects.
[0152] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the relevant operations in the method for processing an electrocardiogram signal in any of the above embodiments are implemented, and the corresponding functions and beneficial effects are obtained. Among them, the computer-readable medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette, magnetic tape magnetic disk storage or other magnetic storage device or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carriers.
[0153] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0154] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for processing an electrocardiogram signal, characterized in that: The steps include: Acquire an original electrocardiogram signal, perform noise reduction processing on the original electrocardiogram signal to obtain a sample signal, and detect the sample signal to obtain a heartbeat segment; Based on the preset ST-T wave abnormality characteristic parameters, the heart beat segments are subjected to ST-T wave abnormality recognition to obtain ST-T wave abnormality classification results, including: inputting the heart beat segments into the ST-T wave abnormality recognition model in sequence, and obtaining the ST-T waveform feature vector after convolution, normalization, activation and residual block processing; Inputting the heartbeat segment into the convolution layer of the ST-T wave abnormality recognition and classification model, and performing a convolution operation on the heartbeat segment and the convolution kernel function to obtain a first feature matrix; Performing residual analysis on the first characteristic matrix to obtain a second characteristic matrix; Obtaining a mask fragment, and performing a product operation on the mask fragment and the second characteristic matrix to obtain a third characteristic matrix; The third feature matrix is input into the global pooling layer for pooling processing to obtain the ST-T waveform feature vector; The ST-T waveform feature vector and the preset ST-T wave abnormality feature parameters are input into the fully connected layer of the ST-T wave abnormality recognition model to output a three-dimensional vector, wherein the three-dimensional vector is used to characterize the probability of the ST-T wave corresponding to the three ST-T wave abnormality types; wherein the preset ST-T wave abnormality feature parameters include a number of ST-T wave abnormality features based on clinical prior information; Determine the vector with the highest value in the three-dimensional vectors, and determine the ST-T wave abnormality classification result according to the category to which the vector with the highest value belongs; Based on the preset Q wave abnormality characteristic parameters, performing Q wave abnormality recognition on the heart beat segment to obtain a Q wave abnormality classification result; Determine the probability data of the myocardial infarction stage according to the ST-T wave abnormality classification result and the Q wave abnormality classification result; The step of obtaining the mask fragment comprises: Analyze the heartbeat segment to obtain the heartbeat position, and pad the heartbeat segment with zeros based on the heartbeat position so as to extend the heartbeat segment to a preset length, thereby obtaining a reference signal; Generate an initial mask segment, and resample the initial mask segment to obtain a mask segment having a length consistent with the length of the reference signal, wherein the value of the mask region from the QRS wave end point to the T wave end point of the mask segment is 1, and the value of the remaining region is 0; The method for obtaining the abnormal ST-T wave characteristic parameters comprises: Acquire ECG signals with abnormal ST-T waves; Identify the electrocardiogram signal to obtain a P wave segment, a QRS wave group, and an ST wave segment, determine the midpoint between the end point of the P wave segment and the start point of the QRS wave group as a reference point, and calculate the voltage value of the reference point; Selecting a number of sampling points after the end point of the QRS wave, and calculating the voltage values of the sampling points relative to the reference point; Dividing a T wave band in the electrocardiogram signal, and determining a positive amplitude, a negative amplitude and a standard deviation of the T wave band; According to the voltage values of several sampling points, the positive amplitude of the T wave band, the negative amplitude of the T wave band and the standard deviation of the T wave band, an ST-T wave abnormality feature vector representing the ST-T wave abnormality is constructed, and the ST-T wave abnormality feature vector is determined as the ST-T wave abnormality feature parameter The method for determining the positive amplitude of the T wave band is as follows: calculating the maximum value of the T wave band, and if the maximum value is greater than a first preset threshold, the positive amplitude of the T wave band is the maximum value, otherwise it is 0; The method for determining the negative amplitude of the T wave band is: calculate the minimum value of the T wave band. If the minimum value is smaller than the second preset threshold, the negative amplitude of the T wave band is the minimum value, otherwise it is 0.
2. The method for processing an electrocardiogram signal according to claim 1, characterized in that: The step of performing Q wave abnormality recognition on the heart beat segment based on the preset Q wave abnormality characteristic parameters to obtain a Q wave abnormality classification result includes: Analyze the heartbeat segments to obtain data of each lead, and calculate the Q wave amplitude, Q wave duration and R wave amplitude of each lead data; Combined with the preset Q wave abnormality characteristic parameters, determine whether the Q wave is abnormal according to the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data, and output Q wave abnormality probability data; wherein the preset Q wave abnormality characteristic parameters include a number of clinical prior Q wave abnormality characteristics; The Q wave abnormality classification result is determined based on the Q wave abnormality probability data and outputted.
3. The method for processing electrocardiogram signals according to claim 2, characterized in that: When determining whether the Q wave is abnormal based on the Q wave amplitude, Q wave time limit and R wave amplitude of each lead data in combination with the preset Q wave abnormal characteristic parameters, In the 12-lead electrocardiogram data, if there is one of the following abnormalities, it is judged as a Q wave abnormality, and the abnormalities include: In lead I, lead II, lead III, lead aVL, lead V3, lead V4, lead V5, and lead V6, if the ratio of the Q wave amplitude to the R wave amplitude is greater than or equal to one quarter, and / or the Q wave duration is greater than or equal to 0.04 seconds, the Q wave is judged to be abnormal; In V1, V2, V3, V4, V5, and V6, if the Q wave duration of a lead is greater than or equal to the Q wave duration of the next lead, or the Q wave amplitude of a lead is greater than or equal to the Q wave amplitude of the next lead; In leads V1, V2, V3, and V4, the R wave amplitude does not have a lead-by-lead increasing trend; In leads V1, V2, V3, and V4, the difference in R wave amplitude between two adjacent leads is greater than or equal to 50%.
4. An electrocardiogram signal processing device, characterized in that: include: An acquisition module, used for acquiring an original ECG signal, performing noise reduction processing on the original ECG signal to obtain a sample signal, and performing heartbeat detection on the sample signal to obtain a heartbeat segment; The first classification module is used to perform ST-T wave abnormality recognition on the heart beat segment based on preset ST-T wave abnormality characteristic parameters to obtain ST-T wave abnormality classification results, including: inputting the heart beat segment into the ST-T wave abnormality recognition model in sequence, and obtaining the ST-T waveform feature vector after convolution, normalization, activation and residual block processing; Inputting the heartbeat segment into the convolution layer of the ST-T wave abnormality recognition and classification model, and performing a convolution operation on the heartbeat segment and the convolution kernel function to obtain a first feature matrix; Performing residual analysis on the first characteristic matrix to obtain a second characteristic matrix; Obtaining a mask fragment, and performing a product operation on the mask fragment and the second characteristic matrix to obtain a third characteristic matrix; The third feature matrix is input into the global pooling layer for pooling processing to obtain the ST-T waveform feature vector; The ST-T waveform feature vector and the preset ST-T wave abnormality feature parameters are input into the fully connected layer of the ST-T wave abnormality recognition model to output a three-dimensional vector, wherein the three-dimensional vector is used to characterize the probability of the ST-T wave corresponding to the three ST-T wave abnormality types; wherein the preset ST-T wave abnormality feature parameters include a number of ST-T wave abnormality features based on clinical prior information; Determine the vector with the highest value in the three-dimensional vectors, and determine the ST-T wave abnormality classification result according to the category to which the vector with the highest value belongs; A second classification module is used to perform Q wave abnormality recognition on the heart beat segment based on preset Q wave abnormality characteristic parameters to obtain a Q wave abnormality classification result; A determination module, used to determine the probability data of the myocardial infarction stage according to the ST-T wave abnormality classification result and the Q wave abnormality classification result; The step of obtaining the mask fragment comprises: Analyze the heartbeat segment to obtain the heartbeat position, and pad the heartbeat segment with zeros based on the heartbeat position so as to extend the heartbeat segment to a preset length, thereby obtaining a reference signal; Generate an initial mask segment, and resample the initial mask segment to obtain a mask segment having a length consistent with the length of the reference signal, wherein the value of the mask region from the QRS wave end point to the T wave end point of the mask segment is 1, and the value of the remaining region is 0; The method for obtaining the abnormal ST-T wave characteristic parameters comprises: Acquire ECG signals with abnormal ST-T waves; Identify the electrocardiogram signal to obtain a P wave segment, a QRS wave group, and an ST wave segment, determine the midpoint between the end point of the P wave segment and the start point of the QRS wave group as a reference point, and calculate the voltage value of the reference point; Selecting a number of sampling points after the end point of the QRS wave, and calculating the voltage values of the sampling points relative to the reference point; Dividing a T wave band in the electrocardiogram signal, and determining a positive amplitude, a negative amplitude and a standard deviation of the T wave band; According to the voltage values of several sampling points, the positive amplitude of the T wave band, the negative amplitude of the T wave band and the standard deviation of the T wave band, an ST-T wave abnormality feature vector representing the ST-T wave abnormality is constructed, and the ST-T wave abnormality feature vector is determined as the ST-T wave abnormality feature parameter The method for determining the positive amplitude of the T wave band is as follows: calculating the maximum value of the T wave band, and if the maximum value is greater than a first preset threshold, the positive amplitude of the T wave band is the maximum value, otherwise it is 0; The method for determining the negative amplitude of the T wave band is: calculate the minimum value of the T wave band. If the minimum value is smaller than the second preset threshold, the negative amplitude of the T wave band is the minimum value, otherwise it is 0.
5. An electronic device, characterized in that: The electronic device comprises: at least one processor and at least one memory; Wherein, the memory is used to store one or more computer programs, and the computer programs are suitable for being loaded by the processor and executing the method for processing electrocardiogram signals as described in any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing an electrocardiogram signal as claimed in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Paralemmin as a marker of cardiovascular disorders and cardiovascular disorders diagnostic kit using thereof
KR101589285B1
Classification of ST waves and ST segment type
US11134882B1
