CN115474941B - Heart beat datum point detection method, device, equipment and storage medium - Google Patents
Heart beat datum point detection method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115474941B CN115474941B CN202110669610.0A CN202110669610A CN115474941B CN 115474941 B CN115474941 B CN 115474941B CN 202110669610 A CN202110669610 A CN 202110669610A CN 115474941 B CN115474941 B CN 115474941B
- Authority
- CN
- China
- Prior art keywords
- point
- lead
- wave
- probability
- detection position
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 453
- 238000000034 method Methods 0.000 claims abstract description 71
- 238000010586 diagram Methods 0.000 claims description 89
- 238000004891 communication Methods 0.000 claims description 52
- 238000001914 filtration Methods 0.000 claims description 47
- 230000001629 suppression Effects 0.000 claims description 24
- 230000009467 reduction Effects 0.000 claims description 21
- 230000011218 segmentation Effects 0.000 claims description 21
- 238000012216 screening Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 6
- 238000007689 inspection Methods 0.000 claims description 5
- 230000005764 inhibitory process Effects 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000008569 process Effects 0.000 description 31
- 238000012545 processing Methods 0.000 description 27
- 230000000747 cardiac effect Effects 0.000 description 25
- 238000013527 convolutional neural network Methods 0.000 description 25
- 230000006870 function Effects 0.000 description 23
- 238000005070 sampling Methods 0.000 description 11
- 230000004913 activation Effects 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 8
- 238000013135 deep learning Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 6
- 238000009499 grossing Methods 0.000 description 4
- 238000010606 normalization Methods 0.000 description 4
- 230000000717 retained effect Effects 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000010287 polarization Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 208000024172 Cardiovascular disease Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001746 atrial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000002565 electrocardiography Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000002336 repolarization Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000002861 ventricular Effects 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/353—Detecting P-waves
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/355—Detecting T-waves
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/366—Detecting abnormal QRS complex, e.g. widening
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7203—Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/725—Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Cardiology (AREA)
- Surgery (AREA)
- Medical Informatics (AREA)
- Veterinary Medicine (AREA)
- Physics & Mathematics (AREA)
- Public Health (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Animal Behavior & Ethology (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Physiology (AREA)
- Artificial Intelligence (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
The embodiment of the application discloses a method, a device, equipment and a storage medium for detecting a heart beat datum point, it comprises the following steps: acquiring at least one lead electrocardiosignal; extracting electrocardio characteristics of lead electrocardiosignals to obtain an electrocardio characteristic map, and obtaining a plurality of electrocardio characteristic maps by one lead electrocardiosignal; obtaining a heart beat probability chart according to each electrocardio characteristic chart, wherein the heart beat probability chart shows a first detection position of the QRS wave in the lead electrocardiosignal; determining a second detection position of the beat datum point in the target electrocardio feature map according to the first detection position, and determining the type of the feature wave of each feature point in the target electrocardio feature map, wherein the target electrocardio feature map is an electrocardio feature map corresponding to the first detection position; and determining a third detection position of the center beat datum point of the lead electrocardiosignal according to the characteristic wave type and the second detection position of each characteristic point. The method can solve the technical problem that the heart beat datum point is difficult to accurately detect due to complex electrocardiosignal waveforms and low amplitude and is easy to be interfered in the related technology.
Description
Technical Field
The embodiment of the application relates to the technical field of electrocardiosignal detection, in particular to a method, a device, equipment and a storage medium for detecting a heart beat datum point.
Background
The electrocardiosignal can reflect the electrophysiological process of heart activity, and the electrocardiosignal detection equipment has low detection cost and convenient use, so the electrocardiosignal detection equipment is widely applied to the detection and diagnosis of cardiovascular diseases, such as electrocardiographs, electrocardiograph monitors and the like. For electrocardiosignal detection equipment, electrocardiosignal analysis is an important component, wherein the electrocardiosignal analysis refers to analysis of collected electrocardiosignals so as to screen out various abnormal conditions of the electrocardiosignals and early warn in time. In the electrocardiographic analysis process, it is an important link to accurately detect the cardiac beat reference point in the electrocardiographic signal.
Fig. 1 is a schematic diagram of a typical electrocardiograph signal in the related art, referring to fig. 1, an electrocardiograph signal includes an electrocardiograph waveform having a P wave, a QRS wave, and a T wave, and the P wave, the QRS wave, and the T wave form a typical heart beat, where the P wave represents an electrical activity of atrial polarization, and the QRS wave and the T wave represent electrical activity of ventricular polarization and repolarization, respectively. Sometimes, the heart beat also contains a U wave, which is a wide and low wave that appears from 0.02s to 0.04s after the T wave. For heart beats, commonly used beat reference points include a P-wave start point, a P-wave end point, a QRS-wave start point, a QRS-wave end point, and a T-wave end point.
In some techniques, a detection method of signal processing may be used to detect the beat reference points. For example, the QRS wave position in the electrocardiograph signal is acquired first, then the electrocardiograph signal is subjected to noise reduction filtering, hilbert transformation and other operations to obtain an enhanced electrocardiograph signal, then a search area is set in the enhanced electrocardiograph signal based on the QRS wave position, and sample points meeting the condition of the heart beat reference point in the search area are used as the start point and the end point of the corresponding feature wave, so that the heart beat reference point is detected. However, the signal processing process is simpler, the processing mode is simpler, the expression capability of the signal processing method is limited, and the waveform of the electrocardiosignal is complex, the amplitude is low and the electrocardiosignal is easy to be interfered, so that the accuracy of the obtained heart beat datum point is low after the electrocardiosignal is processed, and the subsequent electrocardiosignal analysis is not facilitated.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for detecting a heart beat datum point, which are used for solving the technical problem that the heart beat datum point is difficult to accurately detect due to complex waveform, low amplitude and easy interference of an electrocardiosignal in the related technology.
In a first aspect, an embodiment of the present application provides a method for detecting a beat reference point, including:
acquiring at least one lead electrocardiosignal;
extracting electrocardio characteristics of the lead electrocardiosignals to obtain an electrocardio characteristic map, wherein one lead electrocardiosignal is used for obtaining a plurality of electrocardio characteristic maps, and the length of each electrocardio characteristic map is different;
Obtaining a heart beat probability map according to each electrocardio feature map, wherein the heart beat probability map shows first detection positions of QRS waves in the lead electrocardiosignal, and each first detection position is determined through the corresponding electrocardio feature map;
Determining a second detection position of a beat datum point in a target electrocardio feature map according to the first detection position, and determining a feature wave type of each feature point in the target electrocardio feature map, wherein the target electrocardio feature map is an electrocardio feature map corresponding to the first detection position;
And determining a third detection position of the heart beat datum point in the lead electrocardiosignal according to the characteristic wave type of each characteristic point and the second detection position.
In a second aspect, an embodiment of the present application further provides a heart beat reference point detection apparatus, including:
the signal acquisition module is used for acquiring at least one lead electrocardiosignal;
the characteristic extraction module is used for extracting the electrocardio characteristics of the lead electrocardio signals to obtain an electrocardio characteristic diagram, one lead electrocardio signal is used for obtaining a plurality of electrocardio characteristic diagrams, and the length of each electrocardio characteristic diagram is different;
The probability determining module is used for obtaining a heart beat probability chart according to each electrocardio characteristic chart, wherein the heart beat probability chart shows first detection positions of QRS waves in the lead electrocardiosignal, and each first detection position is determined through the corresponding electrocardio characteristic chart;
The heart beat determining module is used for determining a second detection position of a heart beat datum point in a target heart electric characteristic map according to the first detection position and determining a characteristic wave type of each characteristic point in the target heart electric characteristic map, wherein the target heart electric characteristic map is an heart electric characteristic map corresponding to the first detection position;
And the position determining module is used for determining a third detection position of the heart beat datum point in the lead electrocardiosignal according to the characteristic wave type of each characteristic point and the second detection position.
In a third aspect, an embodiment of the present application further provides a heart beat reference point detection apparatus, including:
One or more processors;
A memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the beat reference point detection method as described in the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the heart beat reference point detection method according to the first aspect.
According to the method, the device, the equipment and the storage medium for detecting the heart beat reference point, the technical scheme that the heart beat reference point is difficult to accurately detect due to the fact that the waveform of the heart beat reference point is complex and the amplitude is low is easy to interfere can be solved, the heart beat reference point is detected based on the lead heart signal, the heart beat reference point is detected by combining the heart beat reference point, the amplitude of the heart beat reference point is not only referred to, the detection accuracy of the heart beat reference point is improved, and the detection accuracy is further improved when the third detection position of the heart beat reference point is obtained by combining the second detection position and the feature wave type of each feature point.
Drawings
FIG. 1 is a schematic diagram of a typical electrocardiosignal in the related art;
FIG. 2 is a flowchart of a method for detecting a beat reference point according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for detecting a beat reference point according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of the heart beat reference point detection according to the embodiment of the present application;
FIG. 5 is a first schematic diagram of a lead electrocardiograph signal according to an embodiment of the present application;
FIG. 6 is a second schematic diagram of a lead electrocardiograph signal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a fourth convolution module according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of the structure of the C0 sub-module in FIG. 7;
FIG. 9 is a schematic diagram of the structure of the sub-module C1 in FIG. 7;
FIG. 10 is a schematic flow chart of heartbeat positioning according to an embodiment of the present application;
FIG. 11 is a third schematic diagram of a lead electrocardiograph signal according to an embodiment of the present application;
FIG. 12 is a fourth schematic diagram of a lead electrocardiograph signal according to an embodiment of the present application;
FIG. 13 is a probability chart of heart beats according to an embodiment of the present application;
FIG. 14 is a schematic diagram of a second convolution module according to an embodiment of the present disclosure;
FIG. 15 is a schematic diagram of a second detection position according to an embodiment of the present application;
FIG. 16 is a schematic diagram of a process flow of a third convolution module according to an embodiment of the present disclosure;
FIG. 17 is a schematic diagram of characteristic wave type identification according to an embodiment of the present application;
FIG. 18 is a schematic view of a first characteristic wave according to an embodiment of the present application;
FIG. 19 is a schematic view of a second characteristic wave according to an embodiment of the present application;
FIG. 20 is a first schematic diagram of a detection result of a heart beat datum point according to an embodiment of the present application;
FIG. 21 is a second schematic diagram of a detection result of a heart beat datum point according to an embodiment of the present application;
FIG. 22 is a schematic structural diagram of a heart beat reference point detecting device according to an embodiment of the present application;
Fig. 23 is a schematic structural diagram of a heart beat reference point detection apparatus according to an embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not of limitation. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
In some related technologies, in order to solve the problem that in the electrocardiosignal processing process, a signal processing method is single, and when the electrocardiosignal is complex, the amplitude is low and is easy to be interfered, the heart beat datum point is difficult to accurately detect, and a deep learning method is adopted to detect the heart beat datum point. At this time, a more complex deep learning network is required to be constructed so as to carry out convolution filtering on the electrocardiosignals, and the deep learning network is trained by adopting an end-to-end training method, so that the deep learning network can better strengthen the electrocardiosignals and extract the characteristics of the electrocardiosignals, and further obtain the heart beat datum point. The processing speed of the method is high, but the deep learning network in the method needs to accurately position the characteristic waves (such as P waves, T waves and QRS waves) of the electrocardiosignal so as to obtain an accurate heart beat datum point. However, for the deep learning network, the difficulty of accurately positioning the characteristic waves of the electrocardiosignal is high, so that the detection errors of the P-wave starting point and the T-wave ending point in the heart beat datum point are large, and the accuracy of heart beat datum point detection is reduced.
Therefore, the embodiment of the application provides a heart beat datum point detection method, which can accurately detect the heart beat datum point when an electrocardiosignal is complex and has low amplitude and is easy to be interfered in the detection process, and optimizes the problem of inaccurate detection of the heart beat datum point caused by high difficulty of positioning characteristic waves of a deep learning network.
The method for detecting the heart beat reference point provided by the embodiment of the application can be implemented by heart beat reference point detection equipment, the heart beat reference point detection equipment can be implemented in a software and/or hardware mode, the heart beat reference point detection equipment can be formed by two or more physical entities or one physical entity, and the embodiment is not limited to the above. In one embodiment, the beat reference point detection device may be an electronic device with data processing and analysis capabilities, such as a desktop computer, a notebook computer, an interactive smart tablet, a server, an electrocardiograph monitor, and the like.
In an embodiment, the beat reference point detected by the beat reference point detection device includes a P-wave start point, a P-wave end point, a QRS-wave start point, a QRS-wave end point, and a T-wave end point, and the beat reference point detection means detecting positions of the P-wave start point, the P-wave end point, the QRS-wave start point, the QRS-wave end point, and the T-wave end point in the electrocardiographic signal.
Fig. 2 is a flowchart illustrating a method for detecting a beat reference point according to an embodiment of the present application. Referring to fig. 2, the method for detecting a heart beat reference point specifically includes:
Step 110, obtaining at least one lead electrocardiosignal.
In the technical term of electrocardiogram, the placement position of the electrode on the body surface of the human body when recording the electrocardiogram and the connection mode of the electrode and the amplifier are called as leads of the electrocardiogram. The electrocardiographic signals acquired by the leads can be recorded as lead electrocardiographic signals. The lead electrocardiosignals can be divided into single-lead electrocardiosignals (namely, lead electrocardiosignals collected through one lead) and multi-lead electrocardiosignals (namely, lead electrocardiosignals collected through a plurality of leads) according to the number of lead communication channels, wherein the multi-lead electrocardiosignals can be considered to consist of a plurality of single-lead electrocardiosignals, and the more common lead numbers of the multi-lead electrocardiosignals are three-lead, six-lead, twelve-lead, eighteen-lead and the like.
In the embodiment, one lead electrocardiosignal refers to a single lead electrocardiosignal, and the single lead electrocardiosignal can be a single lead electrocardiosignal which is directly acquired or a single lead electrocardiosignal which is selected from multi-lead electrocardiosignals. For example, the beat reference point detection device may acquire at least one lead electrocardiographic signal acquired by at least one lead. The number of the lead channels, the sampling time length and the sampling frequency can be set according to actual conditions. When acquiring a plurality of lead electrocardiosignals, each lead electrocardiosignal is an electrocardiosignal which is acquired simultaneously. In an embodiment, the lead electrocardiograph signal is composed of sampled sample points, wherein each sample point represents an electrocardiograph signal acquired at a corresponding sampling time. For the lead electrocardiosignals, the horizontal axis is a time axis, and the time is used for recording the sampling time of a sample point, at this time, the position of the sample point in the lead electrocardiosignals refers to the sampling time of the sample point, the vertical axis is the intensity of the electrocardiosignals, and the intensity is often characterized by voltage. Optionally, the characteristic waves in the lead electrocardiosignal at least include a P wave, a QRS wave and a T wave, and the number of the characteristic waves is not limited in embodiment. Wherein adjacent and consecutive one P wave, one QRS wave and one T wave form one heart beat, and a plurality of heart beats form a lead electrocardiosignal.
In one embodiment, an exemplary description is made with the acquisition of two lead electrocardiographic signals. At this time, if the single-lead electrocardiosignals are collected, the single-lead electrocardiosignals are duplicated to obtain two-lead electrocardiosignals. If the multi-lead electrocardiosignals are collected, two lead electrocardiosignals are selected from the multi-lead electrocardiosignals.
In one embodiment, when at least one lead electrocardiosignal is acquired, noise reduction filtering is performed on the lead electrocardiosignal to reduce the influence of noise on the detection of the heart beat datum point. The implementation process of the noise reduction filtering can be set according to actual conditions, for example, the noise reduction filtering comprises at least one of slope suppression, baseline drift filtering, high-frequency noise filtering and the like. The suppression slope can avoid the condition of step noise (larger slope between two adjacent sample points), the filtering baseline drift can avoid the condition that the lead electrocardiosignal deviates from the normal baseline position, and the filtering high-frequency noise can avoid the influence of the high-frequency noise on detection. In one embodiment, the lead electrocardiosignal is subjected to noise reduction and filtration and then standardized to obtain a more regular lead electrocardiosignal, wherein the embodiment of the standardized implementation process is not limited.
In one embodiment, a higher quality lead electrocardiograph signal is obtained to ensure accuracy of detection of the beat fiducial point. For example, when the ratio of the energy of the QRS wave in the frequency domain to the total energy of the lead electrocardiograph signal in the frequency domain exceeds a certain ratio (e.g., 50%), the quality of the lead electrocardiograph signal is considered to be higher, and thus, in an embodiment, the obtained lead electrocardiograph signal refers to an electrocardiograph signal in which the ratio of the energy of the QRS wave in the frequency domain to the total energy of the lead electrocardiograph signal exceeds a certain ratio. Optionally, for the multi-lead electrocardiosignals, if the quality of the plurality of single-lead electrocardiosignals is higher, the lead electrocardiosignals with higher quality can be selected randomly, or the lead electrocardiosignals with higher quality can be selected from the plurality of single-lead electrocardiosignals according to the preset lead priority.
And 120, extracting electrocardio characteristics of the lead electrocardiosignals to obtain an electrocardio characteristic map, wherein one lead electrocardiosignal is used for obtaining a plurality of electrocardio characteristic maps, and the lengths of each electrocardio characteristic map are different.
The electrocardiographic feature map is used for describing electrocardiographic features of the lead electrocardiographic signals, wherein for the field of detection of heart beat datum points, the electrocardiographic feature map needs to show electrocardiographic features related to heart beat datum points and feature waves, such as features of QRS waves, P wave features and T wave features. The extracted electrocardiographic features may be reflected by feature points in the electrocardiographic feature map, for example, feature points related to the feature waves may have a higher amplitude in the electrocardiographic feature map.
It is understood that for the lead electrocardiographic signals, the locations of the beat fiducial points may be mapped into the electrocardiographic feature map such that there are corresponding locations of the beat fiducial points in the electrocardiographic feature map.
When extracting the electrocardio characteristics, the electrocardio characteristics related to the characteristic wave and the heart beat datum point thereof need to be enhanced, and the electrocardio characteristics unrelated to the characteristic wave and the heart beat datum point thereof need to be restrained, so that the detection accuracy of the heart beat datum point is ensured when the heart beat datum point is detected based on the electrocardio characteristics. In one embodiment, a convolutional neural network is utilized to extract the electrocardiographic features and output an electrocardiographic feature map. The convolutional neural network is a trained convolutional neural network, and specific embodiments of the training process are not limited. The network structure of the convolutional neural network and the network parameter embodiments are not limited. It can be understood that in order to enrich the electrocardiographic features, the convolutional neural network outputs a plurality of electrocardiographic feature maps, i.e., a plurality of electrocardiographic feature maps can be obtained based on one lead electrocardiographic signal. In one embodiment, the plurality of electrocardiographic feature maps corresponding to the same lead electrocardiograph signal have different lengths, for example, the length of the lead electrocardiograph signal is 10s, the length of the electrocardiograph feature map is 10s, 5s, 2.5s, and the like, at this time, the electrocardiograph feature map of the 10s lead electrocardiograph signal is respectively shown by using the electrocardiograph feature maps of the three lengths, and it can be understood that when the number of the lead electrocardiograph signals is multiple, three electrocardiograph feature maps with the lengths of 10s, 5s, and 2.5s can be obtained by using the lead electrocardiograph signal of each 10s lead electrocardiograph signal. The length of each electrocardiographic characteristic diagram can be set according to actual conditions, and the electrocardiographic characteristic diagrams with different lengths can be utilized to enrich electrocardiographic characteristics.
For example, when obtaining the electrocardiographic feature map, a segment of lead electrocardiographic signal with a fixed length (for example, 10 s) is firstly intercepted and input into the convolutional neural network, so that the convolutional neural network outputs a plurality of electrocardiographic feature maps (for example, three electrocardiographic feature maps are obtained, and the lengths of the three electrocardiographic feature maps are respectively 10s, 5s and 2.5 s). When the number of the lead electrocardiosignals is multiple, each lead electrocardiosignal is sequentially input into the convolutional neural network so as to respectively obtain a plurality of corresponding electrocardiosignal characteristic diagrams. In an embodiment, the lead electrocardiographic signals described later are all the lead electrocardiographic signals with the fixed length.
And 130, obtaining a heart beat probability map according to each electrocardiograph characteristic map, wherein the heart beat probability map shows first detection positions of QRS waves in the lead electrocardiograph signals, and each first detection position is determined through the corresponding electrocardiograph characteristic map.
For a beat, the sequence of characteristic waves is P-wave, QRS-wave and T-wave, and QRS-wave is easier to detect. The position of the QRS wave is positioned, and the positions of the P wave and the T wave and the position of the heart beat datum point can be deduced according to the position of the QRS wave. Thus, in one embodiment, after obtaining the electrocardiographic feature map, the position of the QRS wave in the lead electrocardiographic signal is detected according to the electrocardiographic feature map, and the QRS wave position obtained according to the electrocardiographic feature map is recorded as the first detection position. Optionally, when the plurality of lead electrocardiosignals are provided, QRS waves belonging to the same heart beat should have the same first detection position in the plurality of lead electrocardiosignals.
In one embodiment, the first detection location of each QRS wave and the probability that each first detection location belongs to a QRS wave are illustrated using a heart beat probability map. Optionally, the length of the beat probability map is the same as the length of the lead electrocardiographic signal, and if the length of the lead electrocardiographic signal is 10s, then the length of the beat probability map is also 10s. The first detection location of the QRS wave shown in the beat probability map may be directly taken as the first detection location of the QRS wave in the lead electrocardiographic signal. The first detection positions shown in the heart beat probability map can be obtained based on the electrocardiographic feature maps.
In one embodiment, a pre-constructed convolutional neural network is used to identify each feature point in the electrocardiographic feature map, so as to determine the probability that each feature point belongs to the QRS wave, and a beat probability map is output, wherein the beat probability map shows the probability value that each feature point belongs to the QRS wave. The heart beat probability map comprises a plurality of probability points, each probability point represents the probability value that the corresponding feature point belongs to the QRS wave in the electrocardio feature map, at this time, for each probability point, the corresponding feature point can be found in the electrocardio feature map, and the corresponding sample point can be found in the lead electrocardio signal. It should be noted that the convolutional neural network currently used is a trained convolutional neural network, and specific embodiments of the training process are not limited. The network structure of the convolutional neural network and the network parameter embodiments are not limited. In general, the size of the convolutional neural network is much smaller than that used in recognizing the electrocardiographic feature map. After the heart beat probability diagrams corresponding to the heart beat feature diagrams are obtained, probability points in the heart beat probability diagrams are integrated according to the positions of the probability points, so that the probability points are summarized into one heart beat probability diagram. And selecting candidate probability points belonging to the QRS wave in the heart beat probability map, wherein the probability value corresponding to the candidate probability points is higher than a set probability threshold value. The candidate probability point can be understood as the probability that the sample point corresponding to the probability point is the QRS wave is larger. Then, non-maximum suppression is performed on each candidate probability point, wherein non-maximum suppression is understood as determining, in the heart beat probability map, a candidate probability point with the largest probability value in each local area (the area length can be set according to the actual situation) as the maximum value of the local area, further determining other candidate probability points in the local area as non-maximum values, and then deleting the candidate probability points belonging to the non-maximum values in the heart beat probability map. At this time, the sample points corresponding to the candidate probability points retained in the beat probability map can be regarded as sample points belonging to the QRS wave, and then the positions of the sample points corresponding to the candidate probability points are determined as the first detection positions of the QRS wave. It should be noted that the QRS wave is formed by a plurality of consecutive sample points in the lead electrocardiographic signal, and the first detection position may be understood as a position where one sample point in the QRS wave is located, and different first detection positions correspond to different QRS waves.
It can be understood that the probability points corresponding to the first detection positions are detected in the corresponding electrocardiographic feature map, that is, each first detection position in the heart beat probability map corresponds to one electrocardiographic feature map. After selecting a first detection position in the heart beat probability map, the first detection position obtained by identifying which feature point in which electrocardiographic feature map is identified can be clarified.
And 140, determining a second detection position of the beat datum point in the target electrocardio feature map according to the first detection position, and determining the type of the feature wave of each feature point in the target electrocardio feature map, wherein the target electrocardio feature map is an electrocardio feature map corresponding to the first detection position.
For example, according to the first detection position of the QRS wave, the region where the QRS wave is located and the regions where the P wave and the T wave connected to the QRS wave are located in the lead electrocardiograph signal can be deduced, so as to obtain the position of the heart beat datum point, that is, the positions of the P wave start point, the P wave end point, the QRS wave start point, the QRS wave end point and the T wave end point. It can be understood that the position of the corresponding heart beat datum point can be obtained according to each first detection position in the heart beat probability map. In the embodiment, the position of each beat reference point obtained from the first detection position is recorded as the second detection position.
In one embodiment, the second detection position of each cardiac beat datum point is obtained through an electrocardiographic feature map corresponding to the first detection position, for convenience of description, the electrocardiographic feature map corresponding to the first detection position is recorded as a target electrocardiographic feature map, and how to obtain the second detection position is described by taking processing one first detection position as an example. After obtaining a target electrocardiographic feature map corresponding to the first detection position in the electrocardiographic probability map, determining feature points representing reference points of each electrocardiographic feature map, and determining positions corresponding to the feature points in the lead electrocardiographic signals as obtained second detection positions. in one embodiment, when determining the feature points representing the reference points of each cardiac beat in the target electrocardiographic feature map, the implementation process may be: in the target electrocardiographic feature map, two detection regions are determined centering on the first detection position, wherein one detection region is a presumed region possibly representing a QRS wave, in an embodiment, the detection region is recorded as a QRS wave detection region, the other detection region is a presumed region possibly representing a P wave and a T wave, and the QRS wave is positioned between the P wave and the T wave, so that the detection region also comprises the region representing the QRS wave, namely the detection region can be considered as a presumed region comprising a heart beat, In an embodiment, the detection region is denoted as a beat detection region, and the beat detection region encompasses the QRS wave detection region. Optionally, the width of the QRS wave detection region and the width of the beat detection region are determined according to the width of the QRS wave convention and the width of the beat convention. It can be understood that, in the heart beat datum point, the QRS wave start point and the QRS wave end point correspond to the start point and the end point of the region where the QRS wave is located, respectively, and the P wave start point and the T wave end point correspond to the start point and the end point of the region where the heart beat is located, respectively, so in the embodiment, after the QRS wave detection region and the heart beat detection region are obtained, the QRS wave detection region and the heart beat detection region are respectively processed by using a convolutional neural network constructed in advance, where the convolutional neural network can be a feature point for identifying the region when processing the QRS wave detection region, so as to determine the difference between the midpoint of the region where the QRS wave is actually located and the first detection position based on each feature point, and the region width of the region where the QRS wave is actually located, and outputs the difference and the region width. Similarly, after the convolutional neural network processes the heart beat detection region, outputting the difference between the midpoint of the region where the heart beat actually is located and the first detection position, and the region width of the region where the heart beat actually is located. Then, according to the difference value and the area width corresponding to the QRS wave and the first detection position, determining the position of the starting point (the first characteristic point in the area) and the position of the ending point (the last characteristic point in the area) of the area where the QRS wave is actually positioned in the target electrocardio characteristic diagram, taking the position of the starting point as the second detection position of the starting point of the QRS wave, taking the position of the ending point as the second detection position of the ending point of the QRS wave, and likewise, according to the difference value and the area width corresponding to the heart beat and the first detection position, determining the position of the starting point (the first characteristic point in the area) and the position of the ending point (the last characteristic point in the area) of the area where the center beat of the target electrocardio characteristic diagram is actually positioned, and the starting point position is taken as a second detection position of the P wave starting point, and the end point position is taken as a second detection position of the T wave end point. And then, according to the conventional position relation among the characteristic waves in the heart beat, adding the second detection position of the P wave starting point and the second detection position of the QRS wave starting point to obtain a sum value of the positions, and taking half of the sum value as the second detection position of the P wave end point. The convolutional neural network mentioned above is a trained convolutional neural network, and specific embodiments of the training process are not limited. The network structure of the convolutional neural network and the network parameter embodiments are not limited. In general, the size of the convolutional neural network is much smaller than that used in recognizing the electrocardiographic feature map.
The method includes the steps of obtaining a characteristic wave type of each characteristic point in the target electrocardiographic characteristic diagram according to a first detection position of the QRS wave, wherein the characteristic wave comprises a P wave, a QRS wave and a T wave, and the characteristic wave type comprises the P wave type, the QRS wave type and the T wave type, namely, the characteristic wave corresponding to each characteristic point in the target electrocardiographic characteristic diagram can be clearly determined based on the first detection position. In the embodiment, taking a first detection position as an example, how to determine the type of the characteristic wave to which the characteristic point belongs is described.
In one embodiment, a segmented region is provided in the target electrocardiographic feature map based on the first detected location of the QRS wave, the segmented region including at least one complete beat. Optionally, after a first detection position is selected, a midpoint position between the first detection position and a previous first detection position and a midpoint position between the first detection position and a next first detection position are defined in the cardiac probability map, and then a region between the two midpoint positions in the target electrocardiographic feature map is used as a segmentation region. And if the first detection position is the last first detection position in the heart beat probability map, the last feature point in the target electrocardio feature map is used as the end point of the segmentation region. And then, processing the partitioned area by utilizing a pre-constructed convolution kernel to determine the probability that each characteristic point in the partitioned area belongs to each characteristic wave type, and further selecting the characteristic wave type with the highest probability as the characteristic wave type to which the corresponding characteristic point belongs. It can be understood that the characteristic wave of the corresponding sample point in the lead electrocardiosignal can be definitely determined according to the characteristic wave type of each characteristic point.
And 150, determining a third detection position of each heart beat datum point in the lead electrocardiosignal according to the characteristic wave type and the second detection position of each characteristic point.
The positions of the heart beat datum points can be obtained according to the characteristic wave types of the sample points in the lead electrocardiosignal, for example, the characteristic points representing the same P wave are obtained, further, the continuous sample points representing the P wave in the lead electrocardiosignal are determined according to the characteristic points, and the position of the first sample point is used as the position of the P wave starting point. Since the position is determined differently from the second detection position, there may be a difference between the position and the second detection position. In one embodiment, the position of the beat datum point is determined by using the characteristic wave type of the characteristic point, the second detection position is finely adjusted by using the position, and the position obtained after fine adjustment is recorded as a third detection position. The method includes the steps of searching a region where a characteristic wave is located according to the characteristic wave type of each characteristic point in a target electrocardiographic characteristic diagram, wherein the region is a section of communication region. At this time, each of the connected regions corresponds to one of the characteristic waves, and the start point and the end point of the characteristic wave can be understood as the position of the heart beat reference point determined based on the type of the characteristic wave to which the characteristic point belongs, and further, a third detection position is obtained based on the position and the second detection position. For example, when the characteristic wave is a P-wave, the start point of the communication region may be regarded as a P-wave start point determined based on the characteristic wave, and if an error between the position of the P-wave start point determined based on the characteristic wave and the second detection position of the determined P-wave start point is within a set range (e.g., 0.1 s), the start point position of the communication region is used to replace the second detection position as the third detection position of the finally obtained P-wave start point, and if the start point position is not within the set range, the second detection position is used as the third detection position of the finally obtained P-wave start point. After the other heart beat datum points are processed in the same way, a final third detection position of each heart beat datum point can be obtained. The setting ranges corresponding to the heart beat reference points can be set according to actual conditions, and the setting ranges corresponding to the different heart beat reference points can be different.
It will be appreciated that there may be instances where there is an error in determining the connected regions, and therefore, in one embodiment, the connected regions are first screened to preserve accurate connected regions. For a heart beat, the P wave should be located in the range of the front 0.3s to 0.15s of the heart beat, the QRS wave should be located in the range of the front 0.15s to the rear 0.15s of the heart beat, the T wave should be located in the range of the rear 0.15s to 0.5s of the heart beat, and the length of the characteristic wave should be greater than or equal to 0.02s and less than or equal to 0.5s, so in the embodiment, it is determined whether each characteristic wave represented by the communication region is in the above-mentioned corresponding position range, and whether the length of each characteristic wave represented by the communication region is greater than or equal to 0.02s and less than or equal to 0.5s, if the characteristic wave is in the corresponding position range and the length of the characteristic wave is greater than or equal to 0.02s and less than or equal to 0.5s, the communication region is determined to be accurate, otherwise, the communication region is determined to be inaccurate.
According to the technical scheme, the technical problems that the heart beat datum point is difficult to accurately detect due to the fact that the heart beat datum point is complex and easy to interfere due to the fact that the heart signal is complex and the amplitude is low in the related technology can be solved, the heart beat datum point is detected by extracting the heart signal characteristics based on the lead heart signal, and the heart beat datum point is detected by combining the heart signal characteristics. And, when the second detection position of each beat reference point is obtained from the first detection position of the QRS wave, although the features of each feature wave are not lost (as determined by combining the features of the feature waves in determining the QRS wave detection region and the beat detection region, the region width thereof), the types of the feature waves to which each feature point belongs are not identified one by one in this way, so that the accuracy of the determined second detection position is not high. When the type of the characteristic wave to which each characteristic point belongs is obtained according to the first detection position of the QRS wave, the sample points belonging to the same characteristic wave can be segmented to obtain the corresponding characteristic wave, and the position of the beat datum point is determined according to each characteristic wave. The feature points are identified one by one, so that the position accuracy of the detected heart beat datum points is higher, but errors can occur when the feature wave types of the feature points are identified, and the segmented feature waves are wrong, for example, a conventional electrocardio waveform (the conventional electrocardio waveform is a clinically available priori electrocardio waveform as shown in fig. 1) is not met, and if a plurality of feature points originally belonging to the P wave are identified as belonging to the QPR wave or the T wave, a small segment of QRS wave or the T wave appears in the P wave. For another example, a situation occurs in which the sequence of the characteristic waves is discontinuous, such as a situation in which a gap occurs between the P wave and the QRS wave. In order to avoid the occurrence of the errors, relatively complex processing is required to be performed on each characteristic wave so as to ensure the accuracy of the characteristic wave identification shape. Based on this, in the embodiment, the third detection position is obtained by combining the characteristic wave type and the second detection position, so that the condition of complex processing of the characteristic wave and the condition of low accuracy of the second detection position can be avoided, the detection accuracy of the electrocardiographic reference point is ensured, and meanwhile, the detection robustness is improved.
Fig. 3 is a flowchart of another method for detecting a beat reference point according to an embodiment of the present application, which is embodied based on the above embodiment.
Fig. 4 is a schematic flow chart of heart beat reference point detection according to an embodiment of the present application, which illustrates a signal processing procedure of the heart beat reference point detection method according to the present embodiment. As shown in fig. 4, in this embodiment, a plurality of lead electrocardiosignals are acquired first, then, noise reduction filtering is performed to obtain a plurality of lead electrocardiosignals after noise reduction filtering, then, signal quality evaluation is performed to select two lead electrocardiosignals meeting quality conditions, then, electrocardiosignals are extracted to obtain 3 electrocardio feature maps of different lengths (fig. 4 shows 3 signals of different lengths, in practical application, each lead electrocardiosignal corresponds to 3 electrocardio feature maps), then, the electrocardio feature maps are subjected to cardiac beat positioning to obtain a first detection position (black region in cardiac beat positioning of fig. 4) of QRS waves, then, cardiac beat reference point detection is performed to obtain a second detection position of cardiac beat reference point, wherein the second detection position can be obtained by segmenting the cardiac beat reference point region (black region in cardiac beat detection of fig. 4) and the cardiac beat region (black region in cardiac beat reference point detection and region in front of and behind the black region of fig. 4), and finally, the cardiac beat feature map is obtained by fusing the first detection position (black region in cardiac beat reference point detection of fig. 4) and the cardiac beat reference point region.
Referring to fig. 3, the method for detecting a heart beat reference point specifically includes:
step 201, at least one lead electrocardiosignal is acquired.
The lead electrocardiographic signals are acquired, illustratively, by the leads currently in use.
Step 202, noise reduction filtering is carried out on the lead electrocardiosignals, and the lead electrocardiosignals meeting the quality requirement are obtained, wherein the number of the lead electrocardiosignals meeting the quality requirement is the target number.
The noise reduction and filtering are performed on each lead electrocardiosignal, and the noise reduction and filtering implementation process of each lead electrocardiosignal is the same, so that the noise reduction and filtering implementation process is described by taking one lead electrocardiosignal as an example. In one embodiment, the noise reduction filtering includes slope suppression, baseline drift filtering, and high frequency noise filtering, and the lead electrocardiograph signal is normalized during the noise reduction filtering to obtain an accurate and regular lead electrocardiograph signal.
In one embodiment, noise reduction filtering the lead electrocardiographic signal includes steps 2021-2028:
step 2021, calculating the slope between each adjacent sample point in the lead electrocardiosignal.
The lead electrocardiosignal comprises a plurality of sample points, and each sample point represents the electrocardiosignal acquired at the time. Illustratively, after acquiring the lead electrocardiographic signals, calculating a slope between each two adjacent sample points, wherein the slope is obtained by performing differential calculation on the two adjacent sample points. It will be appreciated that the centrally located sample point has a slope with the previous sample point and a slope with the subsequent sample point.
Step 2022, when the slope is higher than the slope threshold, replacing the slope with the slope threshold to obtain a new slope.
For example, the slope threshold may be set according to practical situations, where the slope threshold is used to identify a noise step, and the noise step refers to a phenomenon that two adjacent sample points are stepped due to noise. For example, each slope is compared with a slope threshold, and when the slope is higher than the slope threshold, the slope between two corresponding sample points is too large, so that the two sample points are considered to have noise step phenomenon. In order to avoid the noise step phenomenon, in the embodiment, the slope is replaced by a slope threshold, that is, the slope between two sample points is updated to the slope threshold. When the slope is not above the slope threshold, the slope is preserved. That is, for two adjacent sample points, a small value is selected as a new slope between the adjacent sample points from among their corresponding slopes and slope thresholds. At this time, the maximum value of the new slopes is the slope threshold value.
Step 2023, sequentially adding each sample point to each slope to obtain the lead electrocardiographic signal with suppressed slope.
Illustratively, starting from a sample point, the new lead electrocardiograph signal is obtained by sequentially adding the slope to the slope, and since the slope used in the process is the slope after being suppressed, the new lead electrocardiograph signal can be understood as the lead electrocardiograph signal with the slope being suppressed. Wherein the sample point and slope addition is: the slope between the first sample point and the second sample point are added to obtain the value of the second sample point, then the slope between the second sample point and the third sample point are added to obtain the value of the third sample point, and so on, for the last sample point in the lead electrocardiosignal, the slope between the last sample point and the previous sample point can be added.
Step 2024, inputting the lead electrocardiosignal with the suppressed slope to a mean filter to obtain a baseline of the lead electrocardiosignal with the suppressed slope.
An average filter is a common filter that is mainly used for smoothing noise. In an embodiment, the lead electrocardiosignal with the suppressed slope is input to an average filter, so that the average filter filters the input signal to obtain a baseline of the signal. The parameters used by the mean filter can be set according to practical situations, and in an embodiment, the window length of the mean filter is 1s.
Step 2025, input the baseline to a first low pass filter to low pass filter the baseline.
Illustratively, the baseline obtained by the mean filter is low frequency and has glitches, and thus, in embodiments the baseline is low pass filtered using a low pass filter to obtain a low frequency and glitch free baseline. The low-pass filter is an electronic filter device which allows signals below the cut-off frequency to pass, but signals above the cut-off frequency cannot pass. In one embodiment, the low-pass filter used in this step is denoted as a first low-pass filter, i.e. the first low-pass filter is an electronic filtering means for low-pass filtering the baseline. Alternatively, the first low-pass filter may have a cutoff frequency of 0.5Hz, i.e., burrs above 0.5Hz in the baseline may be filtered after passing through the low-pass filter, so as to output a smoother baseline.
Step 2026, subtracting the baseline from the lead electrocardiographic signal with the suppressed slope to obtain a lead electrocardiographic signal with the baseline drift filtered.
Illustratively, the baseline (the baseline after low-pass filtering) is subtracted from the lead electrocardiographic signal with the suppressed slope to suppress baseline drift, and in an embodiment, the lead electrocardiographic signal with the baseline removed is recorded as the lead electrocardiographic signal with the baseline drift filtered.
Step 2027, inputting the lead electrocardiosignal with the baseline drift filtered to a second low-pass filter to obtain the lead electrocardiosignal with high-frequency noise filtered.
Illustratively, the lead electrocardiographic signal contains high-frequency noise, which reduces the accuracy of detection of the heart beat fiducial point, and therefore, signals above a certain frequency are filtered out by a low-pass filter to realize filtering out the high-frequency noise. In one embodiment, the currently used low-pass filter is denoted as a second low-pass filter, i.e. the second low-pass filter is a low-pass filter for filtering out high-frequency noise. Optionally, the cut-off frequency of the second low-pass filter is 35Hz, i.e. the second low-pass filter filters out signals higher than 35Hz to achieve filtering out high-frequency noise. In one embodiment, the signal output by the second low pass filter is recorded as a lead electrocardiograph signal that filters out high frequency noise.
Step 2028, calculating the average value and standard deviation of the lead electrocardiosignals for filtering the high-frequency noise, and normalizing the lead electrocardiosignals for filtering the high-frequency noise according to the average value and standard deviation.
In one embodiment, the lead electrocardiosignals with high-frequency noise filtered are standardized to obtain more regular lead electrocardiosignals, so that the lead electrocardiosignals are convenient for subsequent processing and analysis. The standardized implementation embodiment is not limited thereto. For example, the average value and standard deviation of the lead electrocardiosignals for filtering high-frequency noise are calculated first, and then the average value is subtracted from the lead electrocardiosignals for filtering high-frequency noise and then divided by the standard deviation, so that standardization is realized.
For example, fig. 5 is a first schematic diagram of a lead electrocardiograph signal provided by an embodiment of the present application, and fig. 6 is a second schematic diagram of a lead electrocardiograph signal provided by an embodiment of the present application. Referring to fig. 5, the lead electrocardiograph signal is the current lead electrocardiograph signal acquired by a certain lead, and after the lead electrocardiograph signal is processed in steps 2021-2028, a standardized lead electrocardiograph signal is obtained, and as shown in fig. 6, compared with fig. 5, the lead electrocardiograph signal in fig. 6 is more regular, so that the subsequent processing is facilitated.
The lead electrocardiosignals used in the subsequent processing process are all standardized lead electrocardiosignals.
In one embodiment, after noise reduction and filtering are performed on the lead electrocardiosignal, the lead electrocardiosignal meeting the quality requirement is selected, the lead electrocardiosignal is a set number, in the embodiment, the set number is recorded as a target number, the target number can be set according to actual conditions, and in the embodiment, the target number is exemplified as two.
The lead electrocardiosignal meeting the quality requirement refers to a lead electrocardiosignal which is characterized in that the energy of the frequency band where the QRS wave is positioned is higher in all the energies of the lead electrocardiosignals, so that the first detection position of the QRS wave in the lead electrocardiosignal can be conveniently and accurately identified, and when the target number is two, the lead electrocardiosignal meeting the quality requirement can be obtained by the following scheme:
When the first lead electrocardiosignal is a single lead electrocardiosignal, the step 2029 of obtaining the lead electrocardiosignal meeting the quality requirement comprises the following steps 20210:
step 2029, calculating a first energy of the single-lead electrocardiosignal in the set frequency band and a second energy of all frequency bands;
for example, when the lead electrocardiograph signal is a single lead electrocardiograph signal, it is indicated that there is only one lead electrocardiograph signal. At this time, only the quality of the lead electrocardiographic signal is judged.
In one embodiment, the single-lead electrocardiographic signal is first subjected to fourier transformation to convert the single-lead electrocardiographic signal into a frequency domain, and the frequency domain electrocardiographic signal is obtained. Then, the signal energy in the set frequency band is determined according to the frequency domain electrocardiosignal, wherein the set frequency band is the frequency band where the QRS wave is located, and in one embodiment, the set frequency band is the frequency band of 5Hz-15 Hz. The signal energy at the set frequency is noted as a first energy, which may represent the signal energy of the QRS wave. Similarly, the signal energy in all frequency bands is determined according to the frequency domain electrocardiosignals, wherein all frequency bands refer to the frequency bands where the single-lead electrocardiosignals are located, and the signal energy in all frequency bands is recorded as second energy.
If the first ratio between the first energy and the second energy reaches the first ratio threshold, the step 20210 copies the single-lead electrocardiograph signals, and uses the two single-lead electrocardiograph signals as the lead electrocardiograph signals meeting the quality requirement.
In an embodiment, a ratio of the first energy to the second energy is calculated and is recorded as a first ratio, where the first ratio may represent a ratio of signal energy of the QRS wave in the total signal energy, and it is understood that the higher the first ratio, the greater the ratio of signal energy of the QRS wave. In one embodiment, the first ratio is compared with a first ratio threshold, where the first ratio threshold may be set according to the actual situation, such as setting 50%. When the first ratio reaches (is equal to or higher than) the first ratio threshold, it is indicated that the quality of the single-lead electrocardiographic signal is higher, and therefore, the single-lead electrocardiographic signal is considered to satisfy the quality requirement. And then, the single-lead electrocardiosignals are duplicated to obtain two identical single-lead electrocardiosignals which are used as two lead electrocardiosignals meeting the quality requirement. If the first ratio is smaller than the first ratio threshold, the single-lead electrocardiosignal is lower in quality and does not meet the quality requirement, and at the moment, the single-lead electrocardiosignal is not used for subsequent processing and a prompt is sent out to prompt that the current-lead electrocardiosignal does not meet the quality requirement. Thereafter, the current process is exited.
In the second scheme, when the lead electrocardiosignal is a multi-lead electrocardiosignal, the step 20211 to 20215 of obtaining the lead electrocardiosignal meeting the quality requirement comprises the following steps:
Step 20211, calculating the third energy of each lead electrocardiosignal in the set frequency band and the fourth energy of all the frequency bands in the multi-lead electrocardiosignal.
For example, when the lead electrocardiosignal is a multi-lead electrocardiosignal, that is, when the multi-lead electrocardiosignal is acquired, two single-lead electrocardiosignals meeting the quality requirement are selected from the plurality of lead electrocardiosignals. In the embodiment, first, third energy of a set frequency band in each lead electrocardiosignal (single lead electrocardiosignal) and fourth energy of all frequency bands are determined, wherein the set frequency band refers to a frequency band in which a QRS wave is located in the lead electrocardiosignal, the third energy refers to signal energy of the frequency band in which the QRS wave is located, all the frequency bands refer to the frequency band in which the lead electrocardiosignal is located, and the fourth energy refers to signal energy of the frequency band in which the lead electrocardiosignal is located. It can be understood that the calculation manners of the third energy and the fourth energy are the same as those of the first energy and the second energy, and the embodiments will not be described in detail. At this time, each of the lead electrocardiograph signals corresponds to a third energy and a fourth energy.
Step 20212, selecting a target lead electrocardiograph signal from the multi-lead electrocardiograph signals, wherein a second ratio of the third energy to the fourth energy of the target lead electrocardiograph signal reaches a second ratio threshold.
Illustratively, a ratio between the third energy and the fourth energy in each of the lead electrocardiograph signals is calculated, and in an embodiment, the ratio is recorded as a second ratio, and the second ratio can represent a ratio of signal energy of the QRS wave in the corresponding lead electrocardiograph signals in all signal energy, and it is understood that the higher the second ratio, the greater the ratio of signal energy of the QRS wave. In one embodiment, the second ratios are arranged in order from large to small, and then each second ratio is compared with a second ratio threshold, where the second ratio threshold may be set according to practical situations, for example, set to 50%, and when the second ratio reaches (is equal to or higher than) the second ratio threshold, it is indicated that the quality of the lead electrocardiograph signal is higher, the quality requirement is met, and the lead electrocardiograph signal is reserved. If the second ratio is smaller than the second ratio threshold, the quality of the lead electrocardiosignal is lower, and the quality requirement is not met, so that the lead electrocardiosignal is abandoned.
It will be appreciated that the number of target lead electrocardiographic signals remaining after processing as described above may be zero, one or more. When the target lead electrocardiosignal is zero, the lead electrocardiosignal which does not meet the quality requirement is indicated, and at the moment, a prompt is sent out to prompt that the current lead electrocardiosignal does not meet the quality requirement and the current processing process is exited. When the target lead electrocardiograph signal is one, step 20213 is performed. When the target lead electrocardiographic signal is plural, step 20214 is performed.
And 20213, if the target lead electrocardiosignals are one, copying the target lead electrocardiosignals, and taking the two target lead electrocardiosignals as the lead electrocardiosignals meeting the quality requirement.
If the target lead electrocardiosignals are only one, the lead electrocardiosignals are duplicated to obtain two identical target lead electrocardiosignals as two lead electrocardiosignals meeting the quality requirement.
Step 20214, if there are multiple target lead electrocardiosignals, determining a third ratio of a third energy between two target lead electrocardiosignals with adjacent priorities according to a preset lead priority order, and executing step 20215.
For example, when the target lead electrocardiosignals are multiple, determining whether the target lead electrocardiosignals are two or more than two, if the target lead electrocardiosignals are two, the two target lead electrocardiosignals are directly used as the two lead electrocardiosignals meeting the quality requirement. When the target lead electrocardiosignals are more than two, selecting two lead electrocardiosignals meeting the quality requirement according to the preset lead priority order and the third energy corresponding to each target lead electrocardiosignal. In one embodiment, the preset lead priority ranking order may be set according to practical situations, for example, the lead priorities are respectively from high to low: the lead electrocardiosignals collected by the leads II and V1 are obvious in P wave, and are clinically recommended, so that the priorities of the leads II and V1 are highest, and the P wave in the lead electrocardiosignals collected by the leads V5 is obvious, so that the priorities of the leads II and V1 are only lower than those of the leads II and V1, and the priority sequence of the lead electrocardiosignals can be determined according to the lead names. And then, determining the priority among the target lead electrocardiosignals according to the preset lead priority. A ratio of a third energy between two target lead electrocardiographic signals with adjacent priorities is calculated, and in an embodiment, the ratio is recorded as a third ratio. The calculating of the third ratio may be that, in two target lead electrocardiosignals with adjacent priorities, a ratio of third energy of the target lead electrocardiosignal with high priority to the target lead electrocardiosignal with low priority is calculated.
Step 20215, selecting two target lead electrocardiosignals as the lead electrocardiosignals meeting the quality requirement according to the comparison result of the third ratio and the third ratio threshold.
For example, the third ratio threshold may be set according to practical situations, for example, the third ratio threshold is 0.9. The third ratio between the two target lead electrocardiosignals with the highest priority and the highest second priority is firstly obtained, if the third ratio is larger than 0.9, the third energy of the target lead electrocardiosignal with the high priority is higher than the third energy of the target lead electrocardiosignal with the low priority by 0.9 times, and at the moment, the quality of the target lead electrocardiosignal with the high priority is better than that of the target lead electrocardiosignal with the low priority, so that the target lead electrocardiosignal with the highest priority is selected as the lead electrocardiosignal meeting the quality requirement. And then determining the next highest and next highest target lead electrocardiosignals, and if the third ratio is greater than 0.9, selecting the next highest target lead electrocardiosignals, thereby selecting two lead electrocardiosignals meeting the quality requirement. If the third ratio between the next highest and next highest target lead electrocardiosignals is not greater than 0.9, continuously judging whether the third ratio between the next highest target lead electrocardiosignal and the target lead electrocardiosignals with the subsequent priority is greater than a third ratio threshold value or not so as to find out the high-quality target lead electrocardiosignals from all the target lead electrocardiosignals.
For the two target lead electrocardiosignals with highest priority and highest secondary, if the third ratio is smaller than or equal to 0.9, the third energy of the target lead electrocardiosignal with high priority is not higher than 0.9 times of the third energy of the target lead electrocardiosignal with low priority, at the moment, the quality of the target lead electrocardiosignal with low priority is better than that of the target lead electrocardiosignal with high priority, and at the moment, whether the third ratio of the target lead electrocardiosignals with high priority and the target lead electrocardiosignal with high secondary is larger than a third ratio threshold value is continuously compared so as to continuously search the target lead electrocardiosignal with high quality. When the priority is processed from high to low, for adjacent priority, if the quality of the high priority is high, selecting the high-priority target lead electrocardiosignals, and if the quality of the low priority is high, comparing the low-priority target lead electrocardiosignals with a third ratio threshold value when the low-priority target lead electrocardiosignals are used as the high-priority target lead electrocardiosignals, so as to find two target lead electrocardiosignals with the highest quality.
And 203, inputting the lead electrocardiosignal to a fourth convolution module which is constructed in advance, and acquiring a plurality of electrocardio feature maps output by the fourth convolution module.
In the embodiment, the electrocardiographic feature map is obtained by using a convolutional neural network, and the convolutional neural network is recorded as a fourth convolutional module, and it can be understood that the convolutional neural network is a trained convolutional neural network.
In one embodiment, fig. 7 is a schematic structural diagram of a fourth convolution module according to an embodiment of the present disclosure. Referring to fig. 7, after the lead electrocardiograph signal is input to the fourth convolution module, the lead electrocardiograph signal passes through the C0 sub-module and the C1 sub-module, then the output of the C1 sub-module is downsampled and passes through the C2 sub-module, and then the output of the C2 sub-module is downsampled and passes through the C3 sub-module, wherein fig. 8 is a schematic structural diagram of the C0 sub-module in fig. 7, and referring to fig. 8, the C0 sub-module is composed of a convolution layer, a normalization layer and an activation function layer. Fig. 9 is a schematic structural diagram of the C1 submodule in fig. 7, and referring to fig. 9, the C1 submodule includes a convolution layer, a normalization layer, an activation function layer, a convolution layer, a normalization layer, and an activation function layer, and an output of the second normalization layer is added to an input of the C1 submodule and then passes through the second activation function layer. The C2 sub-module and the C3 sub-module have the same structure as the C1 sub-module, and the embodiments will not be described in detail. And then, the output of the C3 submodule firstly passes through a convolution layer to obtain an output result corresponding to the C3 submodule, and the output result can be recorded as an electrocardiographic characteristic diagram C3. And up-sampling the output result of the C3 sub-module to obtain an up-sampling result. And then, the output of the C2 submodule is added with the up-sampling result of the C3 submodule after passing through a convolution layer to obtain an output result corresponding to the C2 submodule, and the output result is subjected to a convolution layer to obtain an electrocardiographic characteristic diagram C2. And up-sampling the output result of the C2 sub-module to obtain an up-sampling result. And then, the output of the C1 submodule is added with the up-sampling result of the C2 submodule after passing through a convolution layer to obtain an output result corresponding to the C1 submodule, and then, the output result passes through a convolution layer to obtain an electrocardiographic characteristic diagram C1. The parameters of each convolution layer mentioned in the fourth convolution module include c (channel number), k (convolution kernel length), p (filling size) and s (step size), wherein specific values of each parameter may refer to fig. 7. The activation function layers mentioned above all use ReLu activation functions.
For example, a segment of lead electrocardiograph signal with the length of 10s is respectively cut out from two lead electrocardiograph signals meeting the quality requirement, and then one lead electrocardiograph signal is input to a fourth convolution module shown in fig. 7 to obtain three electrocardiograph feature images, wherein the length of the electrocardiograph feature image C1 is 10s, the length of the electrocardiograph feature image C2 is 5s, and the length of the electrocardiograph feature image C3 is 2.5s. Then, another lead electrocardiosignal is input to a fourth convolution module shown in fig. 7 to obtain three electrocardio characteristic diagrams, wherein the lengths of the three electrocardio characteristic diagrams are 10s,5s and 2.5s respectively. Six electrocardiographic feature maps are obtained currently.
It can be understood that when three electrocardiograph feature images are obtained based on each lead electrocardiograph signal, the requirement of accuracy of detecting the heart beat datum point can be met, and in practical application, the structure of the fourth convolution module can be modified according to the requirement, and other electrocardiograph feature images can be obtained.
It should be noted that the lead electrocardiograph signals mentioned later refer to lead electrocardiograph signals with set lengths.
Step 204, inputting each electrocardiographic feature map to a first convolution module respectively to obtain a first alternative heartbeat probability map corresponding to each electrocardiographic feature map, wherein the first alternative heartbeat probability map comprises a plurality of probability points, and each probability point represents a probability value of the corresponding position belonging to the QRS wave.
The first convolution module is used for identifying each feature point in the electrocardiographic feature map to obtain probability values of the feature points belonging to the QRS waves, and further corresponding probability points are obtained based on the probability values, wherein a map containing the probability points output by the first convolution module is a first alternative heart beat probability map. Each electrocardiographic feature map corresponds to a first alternative heartbeat probability map, and each probability point in the first alternative heartbeat probability map represents the probability that a sample point at a corresponding position in the lead electrocardiograph signal (or a feature point at a corresponding position in the electrocardiograph feature map) belongs to the QRS wave.
In one embodiment, the first convolution module is composed of a convolution layer, an activation function layer and a smoothing layer, wherein c=1, k=0.06 s and p=0.028 s are parameters of the convolution layer. The active function layer adopts a sigmoid function, and k=0.06 s and p=0.028 s are included in parameters of the smoothing layer. Each network layer in the first convolution module has been trained.
Step 205, summarizing probability points in each first alternative beat probability map to obtain a second alternative beat probability map.
Illustratively, the probability points in each first alternative beat probability map are integrated together according to the corresponding positions of the probability points to obtain a summarized map, wherein the map is referred to as a second alternative beat probability map, the length of the second alternative beat probability map is the same as that of the lead electrocardiosignal, and if the length of the lead electrocardiosignal is 10s, the length of the second alternative beat probability map is also 10s. Optionally, if the probability points in the two first alternative beat probability maps correspond to the same positions, selecting one probability point to be remained in the second alternative beat probability map, and setting the selection mode of the probability point according to actual conditions. It will be appreciated that for each probability point there is a corresponding electrocardiographic feature map, i.e. the probability point is derived from the feature points in the corresponding electrocardiographic feature map.
And 206, performing non-maximum suppression on each probability point in the second alternative heart beat probability map, taking the second alternative heart beat probability map after the non-maximum suppression as a heart beat probability map, and taking the position corresponding to the probability point reserved in the heart beat probability map as the first detection position of the QRS wave in the lead electrocardiosignal.
Illustratively, in the second alternative beat probability map, the maxima of the probability points in the local region are determined, the probability points of the maxima are retained, and the probability points of other non-maxima are deleted for non-maxima suppression. After non-maximum suppression, the position corresponding to the probability point reserved in the second alternative beat probability map can be regarded as the first detection position of the QRS wave, and the second beat probability map can be regarded as the beat probability map.
In one embodiment, non-maximum suppression of each probability point in the second alternative beat probability map includes steps 2061-2066:
Step 2061, reserving probability points with probability values larger than the pre-probability threshold in the second alternative heart beat probability map.
Illustratively, each probability point in the second alternative beat probability map is initially filtered to obtain probability points possibly representing QRS waves, and at this time, the probability points remaining after filtering can also be considered as candidate probability points of QRS waves. The implementation process of the preliminary filtration is as follows: and comparing the probability value of each probability point with a probability threshold, if the probability value is higher than the probability threshold, reserving the probability point as a candidate probability point, otherwise, filtering the probability point in a second alternative heart beat probability map, and updating the second alternative heart beat probability map after preliminary filtering of each probability point. Wherein the probability threshold may be set according to practical situations, for example, when the quality of the lead electrocardiographic signal is high, the probability threshold may be set to 0.5. When the quality of the lead electrocardiosignal is low (such as strong motion disturbance when the electrocardiosignal is acquired), the probability threshold value can be set to be 0.05. The probability threshold is understood as the lowest probability that needs to be referred to when determining that the location of the probability point belongs to the QRS wave.
Step 2062, sorting the reserved probability points according to the order of the probability values from big to small to obtain a checking list.
The retained probability points (candidate probability points) are ordered according to the probability values of the probability points to obtain a list, and in the embodiment, the list is marked as a checking list, and the probability value of the probability point before the position in the checking list is larger.
Step 2063, obtaining the first probability point in the current inspection list.
The first probability point in the check list is the probability point representing the most probable QRS wave among all the candidate probability points currently, so in the embodiment, the position corresponding to the first probability point is determined to belong to the QRS wave, and the first probability point is selected.
Step 2064, taking the probability point with the distance smaller than the distance threshold value from the first probability point in the second alternative heart beat probability map as the non-maximum probability point.
The distance threshold may be set according to practical situations, such as the maximum heart rate of an adult is typically not more than 300bpm, and thus the distance threshold is set to 0.2s, and the maximum heart rate of an infant is typically not more than 350bpm, and thus the distance threshold is set to 0.15s. And searching probability points with the distance from the first probability point being smaller than a distance threshold in the second alternative heart beat probability map, wherein the searched probability points can be considered as non-maximum probability points in a local area in non-maximum suppression. And the probability value of the first probability point is largest, so the first probability point can be considered as a maximum probability point within the local area.
Step 2065, deleting the non-maximum probability point in the second alternative beat probability map, and deleting the first probability point and the non-maximum probability point in the check list.
Illustratively, non-maximum probability points in the second alternative beat probability map are deleted, so that only the maximum probability points remain in the current local region in the second alternative beat probability map. Meanwhile, since the first probability point and the corresponding non-maximum probability point are found in the second alternative beat probability map, the probability points are deleted from the check list so as not to be repeatedly processed.
Step 2066, judging whether the detection list is empty, stopping if the detection list is empty, and returning to step 2063 if the detection list is not empty.
When the detection list is empty, it is illustrated that each probability point in the detection list has been subjected to non-maximum suppression, at this time, a position corresponding to each maximum probability point retained in the second alternative beat probability map is determined as a first detection position, and the second alternative beat probability map is taken as a beat probability map.
When the detection list is not empty, it is determined that there are probability points for which the non-maximum suppression is not performed, and the non-maximum suppression needs to be continued, and therefore, the process returns to step 2063, i.e., selecting the first probability point having the highest probability value among the probability points of the detection list, and performing the non-maximum suppression based on the first probability point until the detection list is empty.
It will be appreciated that the process of deriving a beat probability map from an electrocardiographic signature may be considered a beat localization process, which is used primarily to determine the first detection location of the QRS wave. Fig. 10 is a schematic flow chart of cardiac beat positioning according to an embodiment of the present application, and referring to fig. 10, an electrocardiographic feature map outputs a first detection position of QRS wave after a convolution layer, an activation function layer, a smoothing layer, and non-maximum suppression. Fig. 11 is a third schematic diagram of a lead electrocardiograph signal according to an embodiment of the present application. Fig. 12 is a fourth schematic diagram of a lead electrocardiograph signal provided by an embodiment of the present application, and fig. 13 is a beat probability chart provided by an embodiment of the present application. Wherein, fig. 11 and fig. 12 are two lead electrocardiosignals with equal length input to the fourth convolution module, and the length of the center beat probability map of fig. 13 is equal to the length of the lead electrocardiosignals. Fig. 13 is a first detection position obtained based on two lead electrocardiographic signals, wherein a circle "+_" in fig. 13 represents the first detection position, and circles in fig. 11 and 12 represent the first detection position of QRS in the lead electrocardiographic signals after mapping the first detection position in fig. 13 to the lead electrocardiographic signals. The plus sign "+" in fig. 13 indicates the probability points that remain after the preliminary filtering, i.e., the probability points in the check list.
Step 207, acquiring a reference point detection region in the target electrocardiographic feature map corresponding to the first detection position, where the reference point detection region includes a heart beat detection region and a QRS wave detection region, and the midpoint positions of the heart beat detection region and the QRS wave detection region are both the first detection position.
Illustratively, a first detection position of one QRS wave is selected according to the beat probability map, and a target electrocardiographic feature map corresponding to the first detection position is specified. Then, a reference point detection area for detecting a heart beat reference point is set in the target electrocardiographic feature map with the first detection position as a midpoint. In one embodiment, the fiducial detection area includes a beat detection area, which is an area that may include a beat, by which the P-wave start point and the T-wave end point can be located. The area width of the cardiac beat detection area can be set according to practical situations, in one embodiment, the area width of the cardiac beat detection area is set to be 1s, that is, the cardiac beat detection area is obtained in the target electrocardiographic feature map by taking the first detection position as the midpoint, and the signal length corresponding to the cardiac beat detection area in the lead electrocardiographic signal is set to be 1s. I.e. the area width is understood as the length of the electrocardiographic signal corresponding to each feature point in the area in the lead electrocardiographic signal. Because the QRS wave is located intermediate the P-wave and the T-wave, the beat detection region cannot be more accurately located to the QRS wave start point and QRS wave end point, and thus, in one embodiment, the fiducial point detection region further includes a QRS wave detection region, which is a region that may contain a QRS wave, by which the QRS wave start point and QRS wave end point can be located. The area width of the QRS wave detection area may be set according to practical situations, and in one embodiment, the area width of the QRS wave detection area is set to 0.3s.
Optionally, if the reference point detection area constructed based on the first detection position exceeds the target electrocardiographic feature map, the processing of the reference point detection area is abandoned.
Step 208, inputting the reference point detection region to the second convolution module to obtain an offset of the midpoint position of the reference point actual region relative to the first detection position and a region width of the reference point actual region, where the reference point actual region includes a heart beat region corresponding to the heart beat detection region and a QRS wave region corresponding to the QRS wave detection region.
Illustratively, feature points in the fiducial detection area are identified using a second convolution module to output an offset and an area width. Fig. 14 is a schematic structural diagram of a second convolution module according to an embodiment of the present disclosure, and referring to fig. 14, the second convolution module is composed of a convolution layer and a global pooling layer, where c=2, k=1, and p=1 in parameters of the convolution layer. For example, after inputting the reference point detection area into the second convolutional neural network, a 2-dimensional vector [ ctr offset, width ] is output, where ctr offset is an offset, and the offset is an absolute value of a difference between a midpoint position of the reference point actual area and the first detection position. width is the area width of the actual reference point area, the actual reference point area is the area which is identified by the second convolution module and is defined to contain the heart beat reference point, the corresponding actual reference point area is marked as a heart beat area for the heart beat detection area, and the heart beat area is the area which is identified and is defined to contain one heart beat. For the QRS wave detection region, the corresponding reference point actual region is denoted as the QRS wave region, which is the region that, after recognition, should definitely contain the QRS wave. At this time, the QRS wave detection area corresponds to one offset and one area width, and the heart beat detection area corresponds to one offset and one area width.
Step 209, determining a first start point position and a first end point position of the reference point actual area according to the first detection position, the offset amount and the area width.
The starting point position and the end point position of the heart beat area and the QRS wave area are obtained through calculation of the first detection position, the corresponding offset and the area width, and in the embodiment, the starting point position of the reference point actual area is recorded as the first starting point position, and the end point position is recorded as the first end point position. The calculation formulas of the first starting point position and the first end point position are as follows:
onset=qrsloc+ctroffset-exp(width)/2
offset=onset+exp(width)/2
Where onset denotes a first start position, offset denotes a first end position, qrs loc denotes a first detection position, ctr offset denotes an offset amount, width denotes a region width, and exp () is an exponential function with a natural constant e as a base.
After calculation according to the above formula, the heart beat region corresponds to a first starting point position and a first end point position, and the QRS wave region corresponds to a first starting point position and a first end point position.
Step 2010, obtaining a second detection position of the heart beat datum point in the target electrocardio feature map according to the first starting point position and the first end point position.
In one embodiment, the method specifically includes: the method comprises the steps of taking a first point position of a heart beat area as a second detection position of a P wave starting point in a target electrocardio characteristic diagram, taking a first end point position of the heart beat area as a second detection position of a T wave ending point in the target electrocardio characteristic diagram, taking a first point position of a QRS wave area as a second detection position of the QRS wave starting point in the target electrocardio characteristic diagram, taking a first end point position of the QRS wave area as a second detection position of the QRS wave ending point in the target electrocardio characteristic diagram, and taking half of the addition result of the P wave starting point and the second detection position of the QRS wave starting point as a second detection position of the P wave ending point in the target electrocardio characteristic diagram.
Illustratively, since the heart beat region is a region containing the P wave, QRS wave, and T wave, the first start point position of the heart beat region may be regarded as the second detection position of the start point of the P wave, and the first end point position of the heart beat region may be regarded as the second detection position of the end point of the T wave. Since the QRS wave region is a region containing the QRS wave, the first start position of the QRS wave region can be regarded as the second detection position of the start point of the QRS wave, and the first end position of the QRS wave region can be regarded as the second detection position of the end point of the QRS wave. Since the position of the P-wave end point cannot be obtained according to the heart beat region, in the embodiment, the second detection position of the P-wave start point and the second detection position of the QRS-wave start point are added together in combination with the positional relationship of the heart beat reference points in clinic, and half of the added result is taken as the second detection position of the P-wave end point.
Alternatively, for a non-sinus beat, there is a case where there is no normal P wave, at this time, the second detection position of the QRS wave start point is taken as the second detection position of the P wave start point.
The above-described process of obtaining the second detection position from the first detection position may be regarded as a heart beat reference point detection process.
For example, fig. 15 is a schematic diagram of a second detection position according to an embodiment of the present application, and referring to fig. 15, a schematic diagram of the second detection position after being mapped to a lead electrocardiographic signal is shown. As can be seen from fig. 15, the detected heart beat reference points are, from left to right, a P-wave start point, a P-wave end point, a QRS-wave start point, a QRS-wave end point, and a T-wave end point, respectively. It will be appreciated that fig. 15 only shows the detection result obtained based on one first detection position, and in practical application, when there are a plurality of first detection positions, each first detection position has a corresponding detection result (i.e. the second detection positions of the 5 heart beat datum points).
In step 2011, a segmentation area is set in the target electrocardiographic feature map corresponding to the first detection position, a second starting point position of the segmentation area is a midpoint position of the current QRS wave and the previous QRS wave corresponding to the first detection position, and a second ending point position of the segmentation area is a midpoint position of the current QRS wave and the next QRS wave.
The first detection position is selected from the heart beat probability map, and the target electrocardiographic feature map corresponding to the first detection position is defined. Then, in the target electrocardiographic feature map, a segmentation area is set, wherein the segmentation area is determined according to the first detection position, in the embodiment, the QRS wave corresponding to the first detection position selected currently is recorded as the current QRS wave, meanwhile, the QRS wave corresponding to the first detection position before the first detection position selected currently is used as the previous QRS wave, the QRS wave corresponding to the first detection position after the first detection position selected currently is used as the next QRS wave, and then, the midpoint position of the current QRS wave and the midpoint position of the previous QRS wave is used as the starting point position of the segmentation area, and the starting point position is recorded as the second starting point position. The midpoint position of the current QRS wave and the subsequent QRS wave is taken as the end position of the divided region, and the end position is recorded as the second end position. The second start position and the second end position are calculated from the first detection position of each QRS wave. It is understood that the segmentation region includes at least the complete current QRS wave and the P-wave and T-wave adjacent to the current QRS wave.
Optionally, if the segmented region constructed based on the first detection position exceeds the target electrocardiographic feature map, processing of the segmented region is abandoned.
Step 2012, inputting the segmented region to a third convolution module to obtain the type of the characteristic wave to which each characteristic point in the segmented region belongs.
Illustratively, the third convolution module is utilized to identify each feature point in the segmented region to output a probability value of each feature point belonging to each feature wave type, optionally, the probability value of each feature point belonging to each feature wave type is shown in an image manner, and the image is recorded as a feature wave type probability map. In an embodiment, the third convolution module is composed of a convolution kernel with a size of 1 and a channel number of 4 (which respectively indicates that the feature points belong to a non-feature wave type, a P-wave type, a QRS-wave type or a T-wave type), and the convolution kernel can implement convolution and softmax functions. Fig. 16 is a schematic diagram of a processing flow of a third convolution module according to an embodiment of the present application, and referring to fig. 16, a convolution check segmentation region of the third convolution module performs convolution and softmax functions to output probability values of each feature point belonging to each feature wave type. And then, selecting the type of the characteristic wave to which the maximum probability value corresponding to each characteristic point belongs. Fig. 17 is a schematic diagram of feature wave type recognition provided by the embodiment of the present application, which shows the feature wave type with the maximum probability value of each feature point, wherein 0.0 represents a non-feature wave, 1.0 represents a P wave, 2.0 represents a QRS wave, and 3.0 represents a T wave in the ordinate. The position of each characteristic wave in the lead electrocardiosignal can be definitely determined according to the type of the characteristic wave to which each characteristic point belongs. For example, fig. 18 is a schematic diagram of a first characteristic wave provided in an embodiment of the present application, which is a characteristic wave identified in a lead electrocardiographic signal according to the identification result of the type of the characteristic wave in fig. 17, where the characteristic wave includes a P wave, a QRS wave, a T wave, and a non-characteristic wave (other than the P wave, the QRS wave, and the T wave), and the non-characteristic wave has no analysis meaning. Fig. 19 is a schematic diagram of a second characteristic wave provided in an embodiment of the present application, which is a characteristic wave identified in another lead electrocardiographic signal according to the identification result of the type of the characteristic wave in fig. 17, where the characteristic wave includes a P wave, a QRS wave, a T wave, and further includes a non-characteristic wave.
The process of obtaining the characteristic wave according to the first detection position can be regarded as a heart beat segmentation process, namely, the characteristic wave of each heart beat can be segmented from the lead electrocardiosignal.
And 2013, acquiring continuous characteristic points belonging to the same characteristic wave in the target electrocardio characteristic diagram according to the characteristic wave type of each characteristic point in the target electrocardio characteristic diagram.
For example, since the type of the characteristic wave to which each characteristic point belongs in the target electrocardiographic characteristic map has been determined, the continuous characteristic points belonging to the same characteristic wave can be acquired in the target electrocardiographic characteristic map according to the type of the characteristic wave in this step. It will be appreciated that from this succession of feature points, a corresponding feature wave may be obtained in the lead electrocardiographic signal.
And 2014, obtaining a plurality of communication areas according to the continuous feature points, wherein each communication area corresponds to one feature wave.
The connected region refers to a region containing one characteristic wave, wherein the connected region representing the P wave, QRS wave, and T wave may constitute a region where one heart beat is located. For example, the continuous feature point corresponding to the P wave is taken as a communication area, the continuous feature point corresponding to the QRS wave is taken as a communication area, and the continuous feature point corresponding to the T wave is taken as a communication area. At this time, a plurality of segments of connected regions can be obtained in the target electrocardiographic feature map.
In step 2015, in each communication region, a communication region satisfying a screening condition is reserved, wherein the screening condition is that the length of the communication region satisfies a set length and the communication region is in a corresponding set position range.
Illustratively, connected regions are screened to filter out misdetected connected regions. Wherein, through setting up the intercommunication district that screening condition discerned the false detection. In one embodiment, the screening condition is that the length of the communication region satisfies a set length and the communication region is within a corresponding set position range. The set length is a length of a characteristic wave in general, and in the embodiment, the set length is a length of 0.02s or more and 0.5s or less, and if the length of the communication region is less than 0.02s or more than 0.5s, it is considered that false detection may occur. The set position range refers to a position range where a P wave, a QRS wave or a T wave should appear in a heart beat in general, wherein the P wave, the QRS wave and the T wave respectively correspond to one set position range, and each set position range can be set according to actual conditions. For example, the set position range of the P wave is the front 0.3s to the front 0.15s of the heart beat, the set position range of the qrs wave is the front 0.15s to the rear 0.15s of the heart beat, and the set position range of the t wave is the rear 0.15s to the rear 0.5s of the heart beat. If one or more of the communication areas constituting one heart beat are not within the corresponding set position range, it is considered that false detection may occur in one or more of the communication areas. In the embodiment, when the connected region satisfies that the connected region is not in the set position range or does not satisfy the set length, determining that the connected region is false detection, deleting the connected region, namely deleting the corresponding electrocardiosignal in the lead electrocardiosignal, otherwise, determining that the screening condition is satisfied, and reserving the connected region.
Step 2016, the second detection position is adjusted according to the reserved communication area, so as to obtain a third detection position of each beat datum point in the lead electrocardiosignal.
Illustratively, in the reserved communication area, the second detection position is adjusted according to the position of each heart beat datum point in the communication area to obtain the third detection position. At this time, the present step specifically includes steps 20161 to 20164:
Step 20161, determining a fourth detection position of the beat reference point according to the third start point position and the third end point position of the communication region.
It is understood that the type of the feature wave to which each feature point belongs in the connected region is clear, that is, the positions of the P wave, QRS wave, and T wave indicated by the connected region are clear, and therefore, the positions of each heart beat reference point can be clear in the connected region, and in the embodiment, the positions of the heart beat reference points clear by the connected region are recorded as the fourth detection positions. For example, the position corresponding to the first feature point in the connected region representing the P-wave is the fourth detection position of the start point of the P-wave, the position corresponding to the last feature point in the connected region is the fourth detection position of the end point of the P-wave, and so on.
Step 20162, determining a position error between the fourth detection position and the second detection position of the same beat datum point.
For example, the absolute value of the difference between the fourth detection position and the second detection position of the same beat reference point is calculated and recorded as a position error, wherein the position error can represent the position difference between the beat reference point obtained by the beat reference point detection and the beat reference point obtained by the beat segmentation.
Each heart beat datum point corresponds to an error threshold, and the error threshold can be set according to practical situations, for example, the error thresholds corresponding to the P wave starting point, the QRS wave starting point, the P wave ending point and the QRS wave ending point are all 0.1s, and the error threshold corresponding to the T wave ending point is 0.2s. Comparing the position error of the heart beat reference point with a corresponding error threshold, if the position error is smaller than the error threshold, executing step 20163, and if the position error is larger than or equal to the error threshold, executing step 20164.
In step 20163, if the position error is smaller than the corresponding error threshold, the fourth detection position is used as the third detection position of the heart beat reference points, and each heart beat reference point corresponds to an error threshold.
It should be noted that, the fourth detection position is obtained by identifying the feature points one by one, and if the feature points are accurately identified, the fourth detection position and the second detection position are very close or identical, and the accuracy of the fourth detection position is higher than that of the second detection position. Therefore, if the position error is smaller than the error threshold, the second detection position and the fourth detection position are considered to be relatively close, and further the fourth detection position is determined relatively accurately, so that the fourth detection position is adopted as the final third detection position corresponding to the heart beat datum point.
In step 20164, if the position error is greater than or equal to the corresponding error threshold, the second detection position is used as the third detection position of the heart beat datum point.
If the position error is greater than or equal to the error threshold, the second detection position and the fourth detection position are considered to be not close, and the fourth detection position is determined to be not accurate, so that the second detection position is used as a final third detection position corresponding to the heart beat datum point.
It can be understood that the third detection position is obtained based on the target electrocardiographic feature map, and the position of each cardiac beat datum point in the lead electrocardiographic signal can be obtained according to the mapping relation of the position between the target electrocardiographic feature map and the electrocardiographic signal.
For example, fig. 20 is a first schematic diagram of a detection result of a cardiac beat reference point provided by the embodiment of the present application, which is a detection result of a cardiac beat reference point obtained by performing the above steps on a lead cardiac signal, wherein a dashed box 11 and a dashed box 12 are a cardiac beat region and a QRS wave region identified in step 209, line segments 13 to 17 respectively represent fourth detection positions of a P wave start point, a P wave end point, a QRS wave start point, a QRS wave end point, and a T wave end point, and triangles 18 to 22 respectively represent third detection positions of a P wave start point, a P wave end point, a QRS wave start point, a QRS wave end point, and a T wave end point, which are finally obtained, as can be seen from fig. 20, respectively use the fourth detection positions as the third detection positions, and the remaining reference points use the second detection positions as the third detection positions. Fig. 21 is a second schematic diagram of a detection result of a heart beat reference point provided by the embodiment of the present application, which is a detection result of the heart beat reference point obtained by performing the above steps on another lead electrocardiosignal, wherein, the dashed line frame 14 and the dashed line frame 15 are respectively a heart beat area and a QRS wave area identified in step 209, the line segments 16 to 20 respectively represent fourth detection positions of a P wave start point, a P wave end point, a QRS wave start point, a QRS wave end point and a T wave end point, and the triangles 21 to 25 respectively represent third detection positions of a finally obtained P wave start point, a P wave end point, a QRS wave start point, a QRS wave end point and a T wave end point, and as can be seen from fig. 21, the QRS wave start point, the QRS wave end point and the T wave end point all use the fourth detection positions as the third detection positions, and the rest reference points use the second detection positions as the third detection positions.
By collecting at least one lead electrocardiosignal and carrying out noise reduction and filtering on the lead electrocardiosignal, the noise in the lead electrocardiosignal can be reduced, the signal to noise ratio of the lead electrocardiosignal is improved, then, the lead electrocardiosignal meeting the quality requirement is selected, the high-quality lead electrocardiosignal can be used when the first detection position of the QRS wave is determined, the accuracy of the first detection position is ensured, and then, a plurality of electrocardiosignal feature images are obtained by utilizing a fourth convolution module, so that the electrocardiosignal feature can be enhanced, the structure of the fourth convolution module is simple, and the processing speed is high. And then, determining the probability value of each characteristic point belonging to the QRS wave according to the electrocardio characteristic diagram, and obtaining the first detection position of each QRS wave based on non-maximum suppression, so that the accuracy of the first detection position can be ensured, and the implementation mode is simple. And then, obtaining a heart beat region and a QRS wave region according to the first detection position, further obtaining a second detection position of a heart beat datum point, determining the position of each characteristic wave in the target lead electrocardiosignal according to the first detection position, further obtaining a fourth detection position of the heart beat datum point based on the characteristic wave, and then obtaining a third detection position of the heart beat datum point by combining the second detection position and the fourth detection position, thereby further improving the detection accuracy of the heart beat datum point and the detection robustness.
Fig. 22 is a schematic structural diagram of a heart beat reference point detection device according to an embodiment of the present application, and referring to fig. 22, the heart beat reference point detection device includes a signal acquisition module 301, a feature extraction module 302, a probability determination module 303, a heart beat determination module 304, and a position determination module 305.
Wherein, the signal acquisition module 301 is configured to acquire at least one lead electrocardiograph signal; the feature extraction module 302 is configured to extract an electrocardiographic feature of a lead electrocardiograph signal to obtain an electrocardiographic feature map, where one lead electrocardiograph signal obtains a plurality of electrocardiograph feature maps, and each electrocardiograph feature map has a different length; the probability determining module 303 is configured to obtain a beat probability map according to each electrocardiograph feature map, where the beat probability map shows first detection positions of QRS waves in the lead electrocardiograph signals, and each first detection position is determined by a corresponding electrocardiograph feature map; the heart beat determining module 304 is configured to determine, according to the first detection position, a second detection position of a heart beat reference point in the target electrocardiographic feature map, and determine a feature wave type to which each feature point in the target electrocardiographic feature map belongs, where the target electrocardiographic feature map is an electrocardiographic feature map corresponding to the first detection position; and the position determining module is used for determining a third detection position of the center beat datum point of the lead electrocardiosignal according to the characteristic wave type and the second detection position of each characteristic point.
On the basis of the above embodiment, the probability determination module 303 includes: the first alternative determining unit is used for inputting each electrocardiographic feature map to the first convolution module respectively to obtain a first alternative heart beat probability map corresponding to each electrocardiographic feature map, wherein the first alternative heart beat probability map comprises a plurality of probability points, and each probability point represents a probability value of the corresponding position belonging to the QRS wave; the second alternative determining unit is used for summarizing probability points in each first alternative heart beat probability map to obtain a second alternative heart beat probability map; the suppression unit is used for performing non-maximum suppression on each probability point in the second alternative heart beat probability map, taking the second alternative heart beat probability map after the non-maximum suppression as a heart beat probability map, and taking the position corresponding to the probability point reserved in the heart beat probability map as the first detection position of the QRS wave in the lead electrocardiosignal.
On the basis of the above embodiment, the suppressing unit includes: a first retaining subunit, configured to retain probability points with probability values greater than a probability threshold in the second alternative beat probability map; the sorting subunit is used for sorting the reserved probability points according to the sequence from the high probability value to the low probability value to obtain an inspection list; a first probability point obtaining subunit, configured to obtain a first probability point in the current inspection list; the non-maximum value determining subunit is used for taking a probability point, of which the distance from the first probability point is smaller than a distance threshold, in the second alternative heart beat probability map as a non-maximum value probability point; a deleting subunit, configured to delete the non-maximum probability point in the second alternative beat probability map, and delete the first probability point and the non-maximum probability point in the inspection list; and the returning subunit is used for returning to execute the operation of acquiring the first probability point in the current checking list until the checking list is empty, taking the second alternative heart beat probability map after the non-maximum value inhibition as a heart beat probability map, and taking the position corresponding to the probability point reserved in the heart beat probability map as the first detection position of the QRS wave in the lead electrocardiosignal.
Based on the above embodiment, the beat determination module 304 includes: the detection region acquisition unit is used for acquiring a reference point detection region in the target electrocardiographic feature map corresponding to the first detection position, wherein the reference point detection region comprises a heart beat detection region and a QRS wave detection region, and the midpoint positions of the heart beat detection region and the QRS wave detection region are both the first detection position; the offset determining unit is used for inputting the reference point detection area into the second convolution module to obtain the offset of the midpoint position of the reference point actual area relative to the first detection position and the area width of the reference point actual area, wherein the reference point actual area comprises a heart beat area corresponding to the heart beat detection area and a QRS wave area corresponding to the QRS wave detection area; a first position determining unit configured to determine a first start point position and a first end point position of the reference point actual area based on the first detection position, the offset amount, and the area width; the second position determining unit is used for obtaining a second detection position of the heart beat datum point in the target electrocardio characteristic diagram according to the first starting point position and the first end point position; the segmentation area setting unit is used for setting a segmentation area in the target electrocardio feature map corresponding to the first detection position, wherein the second starting point position of the segmentation area is the midpoint position of the current QRS wave and the previous QRS wave corresponding to the first detection position, and the second ending point position of the segmentation area is the midpoint position of the current QRS wave and the next QRS wave; and the waveform determining unit is used for inputting the division area into the third convolution module to obtain the characteristic wave type of each characteristic point in the division area.
On the basis of the above embodiment, the second position determining unit specifically includes: the method comprises the steps of taking a first point position of a heart beat area as a second detection position of a P wave starting point in a target electrocardio characteristic diagram, taking a first end point position of the heart beat area as a second detection position of a T wave ending point in the target electrocardio characteristic diagram, taking a first point position of a QRS wave area as a second detection position of the QRS wave starting point in the target electrocardio characteristic diagram, taking a first end point position of the QRS wave area as a second detection position of the QRS wave ending point in the target electrocardio characteristic diagram, and taking half of the addition result of the P wave starting point and the second detection position of the QRS wave starting point as a second detection position of the P wave ending point in the target electrocardio characteristic diagram.
Based on the above embodiment, the position determining module 305 includes: the continuous characteristic acquisition unit is used for acquiring continuous characteristic points belonging to the same characteristic wave in the target electrocardio characteristic diagram according to the characteristic wave type of each characteristic point in the target electrocardio characteristic diagram; a communication region determining unit, configured to obtain a plurality of communication regions according to the continuous feature points, where each communication region corresponds to one feature wave; the area screening unit is used for reserving the communication areas meeting the screening conditions in each communication area, wherein the screening conditions are that the length of the communication areas meets the set length and the communication areas are in the corresponding set position range; and the position adjusting unit is used for adjusting the second detection position according to the reserved communication area so as to obtain a third detection position of the center beat datum point of the lead electrocardiosignal.
On the basis of the above embodiment, the position adjustment unit includes: a third position determining subunit configured to determine a fourth detection position of the beat reference point according to the third start point position and the third end point position of the communication area; an error determination subunit, configured to determine a position error between the fourth detection position and the second detection position of the same beat reference point; a fourth position determining subunit, configured to use the fourth detection position as a third detection position of the heart beat reference points if the position error is smaller than the corresponding error threshold, where each heart beat reference point corresponds to one error threshold; and a fifth position determining subunit, configured to take the second detection position as a third detection position of the heart beat reference point if the position error is greater than or equal to the corresponding error threshold.
Based on the above embodiment, the feature extraction module 302 is specifically configured to: and inputting the lead electrocardiosignal into a fourth convolution module which is constructed in advance, and acquiring a plurality of electrocardio feature images output by the fourth convolution module.
On the basis of the above embodiment, the signal acquisition module includes: the acquisition unit is used for acquiring at least one lead electrocardiosignal; the noise reduction unit is used for carrying out noise reduction and filtering on the lead electrocardiosignals, and obtaining the lead electrocardiosignals meeting the quality requirement, wherein the number of the lead electrocardiosignals meeting the quality requirement is the target number.
On the basis of the above embodiment, the noise reduction unit includes: the slope calculating subunit is used for calculating the slope between each adjacent sample point in the lead electrocardiosignal; a slope replacement subunit, configured to replace the slope with a slope threshold when the slope is higher than the slope threshold, so as to obtain a new slope; a slope adding subunit, configured to sequentially add each sample point to each slope, so as to obtain a lead electrocardiographic signal that suppresses the slope; a baseline determination subunit, configured to input the lead electrocardiosignal with the suppression gradient to the mean filter, so as to obtain a baseline of the lead electrocardiosignal with the suppression gradient; a first filtering subunit for inputting the baseline to a first low-pass filter to low-pass filter the baseline; a baseline removal subunit, configured to subtract the baseline from the lead electrocardiograph signal with the suppressed slope, so as to obtain a lead electrocardiograph signal with the baseline drift filtered; the second filtering subunit is used for inputting the lead electrocardiosignal with the baseline drift filtered to the second low-pass filter so as to obtain the lead electrocardiosignal with the high-frequency noise filtered; the standardized subunit is used for calculating the average value and the standard deviation of the lead electrocardiosignals for filtering the high-frequency noise and standardizing the lead electrocardiosignals for filtering the high-frequency noise according to the average value and the standard deviation; and the signal selection subunit is used for obtaining the lead electrocardiosignals meeting the quality requirement, and the number of the lead electrocardiosignals meeting the quality requirement is the target number.
On the basis of the above embodiment, the target number is two, the lead electrocardiosignals are single-lead electrocardiosignals, and the signal selection subunit comprises: the first energy calculating sun unit is used for calculating the first energy of the single-lead electrocardiosignal in the set frequency band and the second energy of all the frequency bands; the first copying grandson unit is used for copying the single-lead electrocardiosignals and taking the two single-lead electrocardiosignals as the lead electrocardiosignals meeting the quality requirement if the first ratio between the first energy and the second energy reaches a first ratio threshold; the lead electrocardiosignals are multi-lead electrocardiosignals, and the signal selection subunit comprises: the second energy calculation grand unit is used for calculating third energy of each lead electrocardiosignal in the set frequency band and fourth energy of all frequency bands in the multi-lead electrocardiosignal; a target selection subunit, configured to select a target lead electrocardiograph signal from the multiple lead electrocardiograph signals, where a second ratio of the third energy to the fourth energy of the target lead electrocardiograph signal reaches a second ratio threshold; the second copying grandson unit is used for copying the target lead electrocardiosignals if only one target lead electrocardiosignal exists, and taking the two target lead electrocardiosignals as the lead electrocardiosignals meeting the quality requirement; the ratio determining grandson unit is used for determining a third ratio of third energy between two target lead electrocardiosignals with adjacent priorities according to a preset lead priority order if the target lead electrocardiosignals are multiple; and the selecting grandson unit is used for selecting two target lead electrocardiosignals as lead electrocardiosignals meeting the quality requirement according to the comparison result of the third ratio and the third ratio threshold.
The heart beat reference point detection device provided by the above can be used for executing the heart beat reference point detection method provided by any embodiment, and has corresponding functions and beneficial effects.
It should be noted that, in the embodiment of the heart beat reference point detection device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Fig. 23 is a schematic structural diagram of a heart beat reference point detection apparatus according to an embodiment of the present application. As shown in fig. 23, the heart beat reference point detection apparatus includes a processor 40, a memory 41, an input device 42, an output device 43; the number of processors 40 in the heart beat reference point detection device may be one or more, and one processor 40 is exemplified in fig. 23. The processor 40, the memory 41, the input device 42, and the output device 43 in the heart beat reference point detection apparatus may be connected by a bus or other means, and in fig. 23, connection by a bus is exemplified.
The memory 41 is a computer-readable storage medium that can be used to store a software program, a computer-executable program, and a module, such as program instructions/modules corresponding to the beat reference point detection method in the embodiment of the present application (e.g., a signal acquisition module, a feature extraction module, a probability determination module, a beat determination module, and a position determination module in the beat reference point detection device). The processor 40 executes various functional applications and data processing of the heart beat reference point detection apparatus by executing software programs, instructions and modules stored in the memory 41, i.e., implements the heart beat reference point detection method described above.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created from the use of the heart beat reference point detection device, and the like. In addition, memory 41 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 41 may further include memory remotely located relative to processor 40, which may be connected to the beat reference point detection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the heart beat fiducial point detection device, and may also include devices needed to collect leads when needed for electrocardiography. The output means 43 may comprise a display device such as a display screen.
The heart beat reference point detection equipment comprises a heart beat reference point detection device, can be used for executing any heart beat reference point detection method, and has corresponding functions and beneficial effects.
In addition, the embodiment of the application further provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used for executing the related operations in the heart beat reference point detection method provided by any embodiment of the application, and have corresponding functions and beneficial effects.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product.
Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.
Claims (14)
1. A method for detecting a heart beat reference point, comprising:
acquiring at least one lead electrocardiosignal;
extracting electrocardio characteristics of the lead electrocardiosignals to obtain an electrocardio characteristic map, wherein one lead electrocardiosignal is used for obtaining a plurality of electrocardio characteristic maps, and the length of each electrocardio characteristic map is different;
Obtaining a heart beat probability map according to each electrocardio feature map, wherein the heart beat probability map shows first detection positions of QRS waves in the lead electrocardiosignal, and each first detection position is determined through the corresponding electrocardio feature map;
Determining a second detection position of a beat datum point in a target electrocardio feature map according to the first detection position, and determining a feature wave type of each feature point in the target electrocardio feature map, wherein the target electrocardio feature map is an electrocardio feature map corresponding to the first detection position;
Determining a third detection position of the heart beat datum point in the lead electrocardiosignal according to the characteristic wave type of each characteristic point and the second detection position;
the determining a third detection position of the heart beat datum point in the lead electrocardiosignal according to the characteristic wave type of each characteristic point and the second detection position comprises the following steps:
According to the type of the characteristic wave of each characteristic point in the target electrocardio characteristic diagram, acquiring continuous characteristic points belonging to the same characteristic wave from the target electrocardio characteristic diagram;
Obtaining a plurality of communication areas according to the continuous characteristic points, wherein each communication area corresponds to one characteristic wave;
Reserving a communication region meeting a screening condition in each communication region, wherein the screening condition is that the length of the communication region meets a set length and the communication region is in a corresponding set position range;
and adjusting the second detection position according to the reserved communication area to obtain a third detection position of the heart beat datum point in the lead electrocardiosignal.
2. The method of claim 1, wherein obtaining a beat probability map from each of the electrocardiographic feature maps comprises:
Inputting each electrocardiographic feature map to a first convolution module respectively to obtain a first alternative heart beat probability map corresponding to each electrocardiographic feature map, wherein the first alternative heart beat probability map comprises a plurality of probability points, and each probability point represents a probability value of a corresponding position belonging to a QRS wave;
summarizing probability points in each first alternative heart beat probability map to obtain a second alternative heart beat probability map;
Performing non-maximum suppression on each probability point in the second alternative heart beat probability map, taking the second alternative heart beat probability map after the non-maximum suppression as a heart beat probability map, and taking the position corresponding to the probability point reserved in the heart beat probability map as the first detection position of the QRS wave in the lead electrocardiosignal.
3. The beat reference point detection method of claim 2, wherein non-maxima suppressing each probability point in the second alternative beat probability map comprises:
In the second alternative heart beat probability map, probability points with probability values larger than a probability threshold value are reserved;
Sorting the reserved probability points according to the sequence from the big probability value to the small probability value to obtain an inspection list;
acquiring a first probability point in the current checking list;
Taking probability points, of which the distance from the first probability point in the second alternative heart beat probability map is smaller than a distance threshold, as non-maximum probability points;
Deleting the non-maximum probability point in the second alternative beat probability map, and deleting the first probability point and the non-maximum probability point in the check list;
And returning to execute the operation of acquiring the first probability point in the checking list until the checking list is empty.
4. The method of claim 1, wherein determining, based on the first detection position, that the beat reference point is at a second detection position of the target electrocardiographic feature map comprises:
Acquiring a reference point detection region in a target electrocardiographic feature map corresponding to the first detection position, wherein the reference point detection region comprises a heart beat detection region and a QRS wave detection region, and the midpoint positions of the heart beat detection region and the QRS wave detection region are both the first detection position;
Inputting the reference point detection region to a second convolution module to obtain the offset of the midpoint position of the reference point actual region relative to the first detection position and the region width of the reference point actual region, wherein the reference point actual region comprises a heart beat region corresponding to the heart beat detection region and a QRS wave region corresponding to the QRS wave detection region;
Determining a first starting point position and a first end point position of the reference point actual area according to the first detection position, the offset and the area width;
and obtaining a second detection position of the heart beat datum point in the target electrocardio feature map according to the first starting point position and the first end point position.
5. The method of claim 4, wherein obtaining a second detection position of the beat reference point in the target electrocardiographic feature map from the first start point position and the first end point position comprises:
Taking the first starting point of the heart beat area as the second detection position of the P wave starting point in the target electrocardio characteristic diagram, taking the first ending point of the heart beat area as the second detection position of the T wave ending point in the target electrocardio characteristic diagram, taking the first starting point of the QRS wave area as the second detection position of the QRS wave starting point in the target electrocardio characteristic diagram, taking the first ending point of the QRS wave area as the second detection position of the QRS wave ending point in the target electrocardio characteristic diagram, and taking half of the addition result of the P wave starting point and the second detection position of the QRS wave starting point as the second detection position of the P wave ending point in the target electrocardio characteristic diagram.
6. The method of claim 1, wherein determining, from the first detection position, a type of feature wave to which each feature point in the target electrocardiographic feature map belongs comprises:
Setting a segmentation area in a target electrocardiographic feature map corresponding to the first detection position, wherein a second starting point position of the segmentation area is a midpoint position of a current QRS wave and a previous QRS wave corresponding to the first detection position, and a second end point position of the segmentation area is a midpoint position of the current QRS wave and a next QRS wave;
And inputting the segmentation area into a third convolution module to obtain the type of the characteristic wave of each characteristic point in the segmentation area.
7. The method of claim 1, wherein adjusting the second detection position to obtain a third detection position of the beat reference point in the lead electrocardiograph signal based on the reserved communication region comprises:
Determining a fourth detection position of the heart beat datum point according to the third starting point position and the third ending point position of the communication area;
determining a position error between the fourth detection position and the second detection position of the same heart beat reference point;
If the position error is smaller than the corresponding error threshold, taking the fourth detection position as a third detection position of the heart beat datum points, wherein each heart beat datum point corresponds to an error threshold;
And if the position error is greater than or equal to a corresponding error threshold, taking the second detection position as a third detection position of the heart beat datum point.
8. The method of claim 1, wherein extracting the electrocardiographic features of the lead electrocardiograph signals to obtain an electrocardiographic feature map comprises:
And inputting the lead electrocardiosignal to a fourth convolution module which is constructed in advance, and acquiring a plurality of electrocardio feature images output by the fourth convolution module.
9. The method of claim 1, wherein acquiring at least one lead electrocardiographic signal comprises:
Collecting at least one lead electrocardiosignal;
and carrying out noise reduction and filtering on the lead electrocardiosignals to obtain the lead electrocardiosignals meeting the quality requirement, wherein the number of the lead electrocardiosignals meeting the quality requirement is the target number.
10. The method of claim 9, wherein noise reduction filtering the lead electrocardiographic signal comprises:
calculating the slope between each adjacent sample point in the lead electrocardiosignal;
When the slope is higher than a slope threshold, replacing the slope with the slope threshold to obtain a new slope;
Sequentially adding each sample point and each slope to obtain a lead electrocardiosignal with a suppressed slope;
inputting the lead electrocardiosignals with the inhibition slope to an average filter to obtain a baseline of the lead electrocardiosignals with the inhibition slope;
Inputting the baseline to a first low pass filter to low pass filter the baseline;
subtracting the baseline from the lead electrocardiosignal with the inhibition slope to obtain a lead electrocardiosignal with baseline drift filtered;
Inputting the lead electrocardiosignal with the baseline drift filtered to a second low-pass filter to obtain a lead electrocardiosignal with high-frequency noise filtered;
And calculating the average value and standard deviation of the lead electrocardiosignals for filtering the high-frequency noise, and normalizing the lead electrocardiosignals for filtering the high-frequency noise according to the average value and the standard deviation.
11. The method of claim 9, wherein the target number is two,
The lead electrocardiosignal is a single lead electrocardiosignal, and the obtained lead electrocardiosignal meeting the quality requirement comprises the following components:
calculating the first energy of the single-lead electrocardiosignal in the set frequency band and the second energy of all the frequency bands;
if the first ratio of the first energy to the second energy reaches a first ratio threshold, copying the single-lead electrocardiosignals, and taking the two single-lead electrocardiosignals as the lead electrocardiosignals meeting the quality requirement;
the lead electrocardiosignals are multi-lead electrocardiosignals, and the obtained lead electrocardiosignals meeting the quality requirement comprise:
Calculating third energy of each lead electrocardiosignal in the multi-lead electrocardiosignal in a set frequency band and fourth energy of all frequency bands;
Selecting a target lead electrocardiosignal from the multi-lead electrocardiosignals, wherein a second ratio of third energy to fourth energy of the target lead electrocardiosignal reaches a second ratio threshold;
If the target lead electrocardiosignals are one, copying the target lead electrocardiosignals, and taking the two target lead electrocardiosignals as lead electrocardiosignals meeting the quality requirement;
if the target lead electrocardiosignals are multiple, determining a third ratio of third energy between two target lead electrocardiosignals with adjacent priorities according to a preset lead priority order;
and selecting two target lead electrocardiosignals as lead electrocardiosignals meeting the quality requirement according to the comparison result of the third ratio and the third ratio threshold.
12. A heart beat reference point detection device, comprising:
the signal acquisition module is used for acquiring at least one lead electrocardiosignal;
the characteristic extraction module is used for extracting the electrocardio characteristics of the lead electrocardio signals to obtain an electrocardio characteristic diagram, one lead electrocardio signal is used for obtaining a plurality of electrocardio characteristic diagrams, and the length of each electrocardio characteristic diagram is different;
The probability determining module is used for obtaining a heart beat probability chart according to each electrocardio characteristic chart, wherein the heart beat probability chart shows first detection positions of QRS waves in the lead electrocardiosignal, and each first detection position is determined through the corresponding electrocardio characteristic chart;
The heart beat determining module is used for determining a second detection position of a heart beat datum point in a target heart electric characteristic map according to the first detection position and determining a characteristic wave type of each characteristic point in the target heart electric characteristic map, wherein the target heart electric characteristic map is an heart electric characteristic map corresponding to the first detection position;
The position determining module is used for determining a third detection position of the heart beat datum point in the lead electrocardiosignal according to the characteristic wave type of each characteristic point and the second detection position;
The location determination module includes: the continuous characteristic acquisition unit is used for acquiring continuous characteristic points belonging to the same characteristic wave in the target electrocardio characteristic diagram according to the characteristic wave type of each characteristic point in the target electrocardio characteristic diagram; a communication region determining unit, configured to obtain a plurality of communication regions according to the continuous feature points, where each communication region corresponds to one feature wave; the area screening unit is used for reserving the communication areas meeting the screening conditions in each communication area, wherein the screening conditions are that the length of the communication areas meets the set length and the communication areas are in the corresponding set position range; and the position adjusting unit is used for adjusting the second detection position according to the reserved communication area so as to obtain a third detection position of the center beat datum point of the lead electrocardiosignal.
13. A heart beat reference point detection apparatus, comprising:
One or more processors;
A memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the beat reference point detection method of any of claims 1-11.
14. A computer-readable storage medium having stored thereon a computer program, which when executed by a processor implements the heart beat reference point detection method of any one of claims 1-11.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110669610.0A CN115474941B (en) | 2021-06-16 | 2021-06-16 | Heart beat datum point detection method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110669610.0A CN115474941B (en) | 2021-06-16 | 2021-06-16 | Heart beat datum point detection method, device, equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115474941A CN115474941A (en) | 2022-12-16 |
| CN115474941B true CN115474941B (en) | 2024-09-06 |
Family
ID=84419415
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110669610.0A Active CN115474941B (en) | 2021-06-16 | 2021-06-16 | Heart beat datum point detection method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115474941B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240285217A1 (en) * | 2023-02-23 | 2024-08-29 | Draeger Medical Systems, Inc. | Electrocardiogram ("ecg") signal analysis |
| CN118319321B (en) * | 2024-05-08 | 2024-10-08 | 中国人民解放军总医院第八医学中心 | Electrocardiogram data optimization processing method for trauma patient |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109009084A (en) * | 2018-06-08 | 2018-12-18 | 广州视源电子科技股份有限公司 | QRS wave group calibration method, device, equipment and medium for multi-lead electrocardiosignal |
| CN110236520A (en) * | 2019-05-20 | 2019-09-17 | 上海数创医疗科技有限公司 | ECG type recognition methods and device based on double convolutional neural networks |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05226119A (en) * | 1992-06-30 | 1993-09-03 | Murata Mfg Co Ltd | High-voltage variable resistor |
| KR100198760B1 (en) * | 1996-07-02 | 1999-06-15 | 이명호 | Q.R.S.S complex characteristic indicator of ECG signal |
| US8224432B2 (en) * | 2007-05-08 | 2012-07-17 | C.R.Bard, Inc. | Rapid 3D mapping using multielectrode position data |
| CN107951485B (en) * | 2017-11-27 | 2019-06-11 | 深圳市凯沃尔电子有限公司 | Dynamic electrocardiogram analysis method and device based on artificial intelligence self-learning |
| CN209884132U (en) * | 2018-09-25 | 2020-01-03 | 云南省第三人民医院 | An anti-interference electrocardiogram examination device |
| CN111345814B (en) * | 2020-02-11 | 2023-04-18 | 广州视源电子科技股份有限公司 | Analysis method, device, equipment and storage medium for electrocardiosignal center beat |
| CN111345816B (en) * | 2020-02-25 | 2022-11-04 | 广州视源电子科技股份有限公司 | Multi-lead QRS complex detection method, device, equipment and storage medium |
-
2021
- 2021-06-16 CN CN202110669610.0A patent/CN115474941B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109009084A (en) * | 2018-06-08 | 2018-12-18 | 广州视源电子科技股份有限公司 | QRS wave group calibration method, device, equipment and medium for multi-lead electrocardiosignal |
| CN110236520A (en) * | 2019-05-20 | 2019-09-17 | 上海数创医疗科技有限公司 | ECG type recognition methods and device based on double convolutional neural networks |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115474941A (en) | 2022-12-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110393519B (en) | Electrocardiosignal analysis method and device, storage medium and processor | |
| Jekova et al. | Assessment and comparison of different methods for heartbeat classification | |
| CN105411567B (en) | A kind of ECG data analysis method and system | |
| CN111345816B (en) | Multi-lead QRS complex detection method, device, equipment and storage medium | |
| CN115474941B (en) | Heart beat datum point detection method, device, equipment and storage medium | |
| Krasteva et al. | QRS template matching for recognition of ventricular ectopic beats | |
| Maršánová et al. | Advanced P wave detection in ECG signals during pathology: evaluation in different arrhythmia contexts | |
| CN102805620B (en) | Method and device for detecting atrial fibrillation | |
| JP2016530019A (en) | Extraction of fetal heart rate from maternal abdominal ECG records | |
| US20120316452A1 (en) | Method for determining a heart period from an ecg waveform using image representation of ecg | |
| CN109009084B (en) | QRS wave group calibration method, device, equipment and medium for multi-lead electrocardiosignal | |
| EP3616605A1 (en) | Non-invasive detection of coronary heart disease from short single-lead ecg | |
| CN107622259B (en) | A T wave detection method, electrocardiographic data analysis method and device | |
| CN107688553B (en) | Method for detecting electrocardiographic waveform characteristics based on wavelet transform and logistic regression algorithm | |
| US20230309899A1 (en) | Determination method and determination apparatus for beginning of t-wave, storage medium and computer program product | |
| CN115120248A (en) | Histogram-based adaptive threshold R peak detection and heart rhythm classification method and device | |
| Saclova et al. | Reliable P wave detection in pathological ECG signals | |
| Huerta et al. | Quality assessment of very long-term ECG recordings using a convolutional neural network | |
| Dalvi et al. | Heartbeat classification system based on neural networks and dimensionality reduction | |
| Plesinger et al. | Robust multichannel QRS detection | |
| CN104644160A (en) | Electrocardiogram pseudo-difference signal identification method and device | |
| CN116473569A (en) | A method, system and storage medium for electrocardiogram data processing | |
| CN119055210B (en) | Method and device for generating heart rate variability nonlinear analysis and electrocardiographic scatter diagram | |
| KR20210063997A (en) | Apparatus and method for detecting qrs of ecg | |
| KR20230147911A (en) | Method and apparatus for QRS detection of ECG signal for cardiac diagnosis |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |