An electrocardiogram matching method based on electrocardiogram template
Through the matching method based on the ECG template, the artificial intelligence system is used to quickly identify the heartbeat category, which solves the problem of high medical resources in the interpretation of ECG and realizes efficient interpretation of dynamic ECG.
Patent Information
- Application Number
- CN202211058292.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-08-30
AI Technical Summary
In the prior art, interpreting ECG consumes high medical resources and requires professional knowledge, making it difficult to achieve regular examinations of dynamic ECG and read results by ordinary people on their own.
Using the electrocardiogram matching method based on the electrocardiogram template, by establishing voltage reference, time reference reference and labels, the artificial intelligence interprets the system and establishes search logic conditions in the system, and introduces the detected electrocardiogram into the system for matching, and quickly identify the heart. Fight category.
It has achieved rapid and accurate identification of cardiac beat categories, partially replacing manual analysis of electrocardiograms, reducing medical resource consumption.
Smart Images

Figure CN115590527B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical devices, and in particular relates to an electrocardiogram matching method based on an electrocardiogram template. Background Art
[0002] Electrocardiogram is a technique that uses an electrocardiograph to record the graph of electrical activity changes generated by each cardiac cycle from the body surface. Electrocardiogram records the curve of voltage changes over time. Electrocardiogram is recorded on coordinate paper, which is composed of small grids of 1mm width and 1mm height. The horizontal axis represents time and the vertical axis represents voltage. The composition of each wave and band of electrocardiogram includes P wave, PR interval, QRS complex, J point, ST segment, T wave, etc.
[0003] Holter is the most economical and effective method to detect hidden heart diseases such as paroxysmal arrhythmia, cardiac arrest, atrial fibrillation, ST-T changes, AV conduction block, etc. Regular 24-hour Holter examination is effective in preventing myocardial infarction, cerebral infarction and sudden death, but interpreting the electrocardiogram consumes too much medical resources, and regular Holter examinations for adults are not currently available. In addition, the interpretation of the electrocardiogram requires professional knowledge, and ordinary people cannot read the relevant results. To this end, we propose an electrocardiogram matching method based on the electrocardiogram template. Summary of the invention
[0004] The purpose of the present invention is to provide an electrocardiogram matching method based on an electrocardiogram template to solve the problems in the prior art mentioned in the above background technology.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] An electrocardiogram matching method based on an electrocardiogram template comprises the following steps:
[0007] Create an ECG template;
[0008] Establishing a voltage reference, a time reference and a label on the electrocardiogram template;
[0009] Using the voltage reference, time reference and label to allow an artificial intelligence interpretation system of an electrocardiogram to learn, and establishing search logic conditions in the artificial intelligence interpretation system;
[0010] Importing the examined electrocardiogram into the learned artificial intelligence interpretation system and matching it according to the search logic conditions;
[0011] Get matching results.
[0012] Furthermore, the electrocardiogram template includes a P wave, a Q wave, an R wave, an S wave, an ST turning point and a T wave;
[0013] The voltage reference includes the falling edge amplitude from the R wave peak to the S wave trough; the time reference includes the R wave peak or the S wave trough; and the label includes three groups of key values.
[0014] Furthermore, the setting condition of the time reference benchmark is: when the amplitude from the R wave peak to the baseline is greater than or equal to the amplitude from the baseline to the S wave trough or when the amplitude from the R wave peak to the baseline is greater than or equal to 0.5 millivolts, the R wave peak is used as the time reference benchmark.
[0015] Furthermore, the setting condition of the time reference benchmark is: when the amplitude from the R wave peak to the baseline is less than the amplitude from the baseline to the S wave trough and the amplitude from the R wave peak to the baseline is less than 0.5 millivolts, the S wave trough is used as the time reference benchmark.
[0016] Furthermore, the three groups of key values include: the interval from the Q wave trough to the R wave peak as the first key value; the interval from the R wave peak to the S wave trough as the second key value; and the interval from the S wave trough to the ST turning point as the third key value.
[0017] Further, the search logic condition is: when the three groups of key values of the detected ECG waveform are all equal to the three groups of key values of the template library, wherein a template is composed of two upper and lower sidebands forming an uneven curve band; the steps are as follows:
[0018] When a measured waveform does not completely fall between the upper and lower sidebands of a known template, the number of data points in the excess portion is the difference parameter;
[0019] When the difference parameter is 0, it is defined as a perfect match;
[0020] When the difference parameter is less than or equal to the specified threshold, it is defined as a successful match;
[0021] When the difference parameter is greater than the specified threshold, the match is defined as failed.
[0022] Furthermore, the template library includes an extended template, and the rule restrictions of the extended template include:
[0023] When the calibration waveform and the template key value are the same, if the starting point of the calibration waveform after normalization is higher than the upper sideband of the template waveform starting point by 0.2mV or lower than the lower sideband of the template waveform starting point by 0.2mV, the calibration waveform will be rejected;
[0024] If the end point of the measured waveform after standardization is higher than the upper sideband of the template waveform end point by 0.2mV or lower than the lower sideband of the template waveform end point by 0.2mV, the calibration waveform will also fail;
[0025] If the calibrated waveform that meets the conditions is higher than the data point of the upper sideband, the upper sideband data point in the template will be replaced; if it is lower than the data point of the lower sideband, the lower sideband data point in the template will be replaced.
[0026] Furthermore, the template library includes a merge template, and the rule restrictions of the merge template include:
[0027] When two template key values are the same, if the starting point of the upper sideband of one template is higher than the lower sideband of the other template waveform starting point by more than 0.2mV, or the starting point of the lower sideband is lower than the upper sideband of the other template waveform starting point by more than 0.2mV, then it is determined that the merging condition is not met;
[0028] If the end point of one template is higher than the lower sideband of the other template waveform end point by more than 0.2mV or lower than the upper sideband of the template waveform end point by more than 0.2mV, it is also considered that the merging condition is not met;
[0029] If the upper sideband waveform of the template that meets the merging conditions is higher than the data point of the upper sideband of another template, the upper sideband data point in the other template will be replaced; if the data point of the lower sideband of the template that meets the merging conditions is lower than the data point of the lower sideband of another template, the lower sideband data point in the other template will be replaced.
[0030] Furthermore, the template library includes a newly added template. When a newly calibrated waveform cannot find a template with the same key value in the existing template library, a newly added template can be generated. The steps are as follows:
[0031] First, according to the newly calibrated waveform key value, a specified position in the template library is searched, and the position satisfies that its key value is less than or equal to the newly calibrated waveform key value and its previous template key value is greater than the newly calibrated waveform key value;
[0032] Move the position template and the following templates by one template space to generate an empty template;
[0033] Then write the newly calibrated waveform into the upper sideband and lower sideband of the blank template respectively;
[0034] A new template is generated by writing the heartbeat type and key value into the corresponding position.
[0035] Furthermore, the template library includes split templates. When a template has a false positive judgment, it is necessary to split the template into two templates. The steps are as follows:
[0036] First, add an empty template before this template;
[0037] Then copy the specified template to the newly added empty template;
[0038] The lower sideband data + 1 / 3 of the upper and lower sideband difference forms new lower sideband data and writes the lower sideband data of the newly added template;
[0039] Then, the lower sideband data of the specified template + 2 / 3 of the upper and lower sideband difference is formed into new upper sideband data and written into the upper sideband data of the specified template.
[0040] Technical effects and advantages of the present invention: Compared with the prior art, the electrocardiogram matching method based on the electrocardiogram template proposed in the present invention has the following advantages:
[0041] The present invention establishes a voltage reference benchmark, a time reference benchmark and a label on an electrocardiogram template, and allows an artificial intelligence interpretation system of the electrocardiogram to learn the voltage reference benchmark, the time reference benchmark and the label, and establishes a search logic condition in the artificial intelligence interpretation system, and imports the electrocardiogram under test into the learned artificial intelligence interpretation system. The result of matching according to the search logic condition can quickly and accurately identify the heartbeat category, thereby replacing or partially replacing manual analysis of the electrocardiogram. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of an electrocardiogram matching method based on an electrocardiogram template according to an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of an electrocardiogram template according to an embodiment of the present invention;
[0044] Figure 3 This is a diagram showing an electrocardiogram template according to an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a difference parameter settlement method according to an embodiment of the present invention;
[0046] Figure 5 This is a flow chart of an expansion template according to an embodiment of the present invention;
[0047] Figure 6 This is a flow chart of merging templates according to an embodiment of the present invention;
[0048] Figure 7 This is a new template flow chart of an embodiment of the present invention;
[0049] Figure 8 This is a flow chart of splitting templates according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0051] In the embodiment of the present invention, there is provided Figure 1 An electrocardiogram matching method based on an electrocardiogram template is shown, comprising the following steps:
[0052] S1. Establish an ECG template;
[0053] S2, establishing a voltage reference, a time reference and a label on the electrocardiogram template;
[0054] S3, using the voltage reference, time reference and label to allow the artificial intelligence interpretation system of the electrocardiogram to learn, and establish a search logic condition in the artificial intelligence interpretation system;
[0055] S4, importing the examined electrocardiogram into the learned artificial intelligence interpretation system, and matching it according to the search logic conditions;
[0056] S5. Obtain matching results.
[0057] In this embodiment, a voltage reference benchmark, a time reference benchmark and a label are established on the electrocardiogram template, and the voltage reference benchmark, the time reference benchmark and the label are learned by the electrocardiogram artificial intelligence interpretation system, and a search logic condition is established in the artificial intelligence interpretation system, and the electrocardiogram under test is imported into the learned artificial intelligence interpretation system. The result of matching according to the search logic condition can quickly and accurately identify the heartbeat category, thereby replacing or partially replacing the manual analysis of the electrocardiogram.
[0058] Specifically, Figure 2 As shown, the electrocardiogram template includes P wave, Q wave, R wave, S wave, ST turning point and T wave. The falling edge amplitude from the R wave peak to the S wave trough is used as the voltage reference, and the R wave peak or S wave trough is used as the time reference.
[0059] When the amplitude from the R wave peak to the baseline is greater than or equal to the amplitude from the baseline to the S wave trough or when the amplitude from the R wave peak to the baseline is greater than or equal to 0.5 mV, the R wave peak is used as the time reference;
[0060] The S wave trough was used as the time reference when the amplitude from the R wave peak to the baseline was less than the amplitude from the baseline to the S wave trough and the amplitude from the R wave peak to the baseline was less than 0.5 mV.
[0061] The interval from the Q wave trough to the R wave peak is used as the first key value, the interval from the R wave peak to the S wave trough is used as the second key value, and the interval from the S wave trough to the ST turning point is used as the third key value. The three key values constitute the label of the template.
[0062] like Figure 3As shown, the search logic condition is when the three key values of the ECG waveform under test are all equal to the three key values of the template library. A template consists of two upper and lower curves (upper and lower sidebands) to form an uneven curve band. The data structure of the ECG template is as follows: heartbeat type (1 byte), first key value (1 byte), second key value (1 byte), third key value (1 byte), reserved (8 bytes) and template waveform data (two curves), as shown in Table 1;
[0063] Table 1:
[0064]
[0065] like Figure 4 As shown, the search logic conditions are: when the three groups of key values of the tested ECG waveform are all equal to the three groups of key values of the template library, a template consists of two upper and lower sidebands forming an uneven curve band; when a tested waveform does not completely fall between the upper and lower sidebands of a known template, the number of data points in the excess part is called the difference parameter; when the difference parameter is 0, it is defined as a complete match. When the difference parameter is less than or equal to the specified threshold, it is defined as a successful match. When the difference parameter is greater than the specified threshold, it is called a failed match.
[0066] like Figure 5 As shown, the template library includes extended templates. In order to allow the system to "learn" new data and improve the recognition rate, it is necessary to use a new calibrated waveform to expand the original generated template with the same key value. However, after "learning", it is likely to overflow and cause false positives, so there must be a rule to limit the expansion of the upper and lower sidebands.
[0067] When the calibration waveform and the template key value are the same, if the starting point of the calibration waveform after normalization is higher than the upper sideband of the template waveform starting point by 0.2mV or lower than the lower sideband of the template waveform starting point by 0.2mV, the calibration waveform will be rejected.
[0068] Similarly, if the end point of the measured waveform after standardization is higher than the upper sideband of the template waveform end point by 0.2mV or lower than the lower sideband of the template waveform end point by 0.2mV, the calibration waveform will also fail.
[0069] If the qualified calibration waveform is higher than the data point of the upper sideband, it will replace the upper sideband data point in the template; if it is lower than the data point of the lower sideband, it will replace the lower sideband data point in the template, thereby expanding the template and improving the recognition rate.
[0070] like Figure 6 As shown, the template library includes merged templates. In order to improve the recognition rate of the system and reduce storage space, templates with the same key value need to be merged. However, after merging, overflow is likely to cause false positives, so there must be a rule to limit the expansion of the upper and lower sidebands.
[0071] When two template key values are the same, if the starting point of the upper sideband of one template is higher than the lower sideband of the other template waveform starting point by more than 0.2mV or the starting point of the lower sideband is lower than the upper sideband of the other template waveform starting point by more than 0.2mV, then it is determined that the merging conditions are not met.
[0072] Similarly, if one template termination point is higher than the lower sideband of another template waveform termination point by more than 0.2 mV or lower than the upper sideband of the template waveform termination point by more than 0.2 mV, it is also determined that the merging conditions are not met.
[0073] If the upper sideband waveform of the template that meets the merging conditions is higher than the data point of the upper sideband of another template, the upper sideband data point in the other template is replaced; if the data point of the lower sideband of the template that meets the merging conditions is lower than the data point of the lower sideband of another template, the lower sideband data point in the other template is replaced, thereby compressing the template library and improving the recognition rate.
[0074] like Figure 7 As shown, the template library includes newly added templates. When a newly calibrated waveform cannot find a template with the same key value in the existing template library, a new template can be generated.
[0075] First, according to the newly calibrated waveform key value, the specified position of the template library is searched, and the position satisfies that its key value is less than or equal to the newly calibrated waveform key value and its previous template key value is greater than the newly calibrated waveform key value (the template library is sorted in descending order). The template at this position and the following templates are moved one template space to generate an empty template, and then the newly calibrated waveform is written into the upper sideband and lower sideband of the empty template respectively, and the heartbeat type and key value are written into the corresponding position to generate a new template.
[0076] like Figure 8 As shown, the template library includes split templates. When a false positive judgment occurs in a template (overflow), one template needs to be split into two templates.
[0077] First, add an empty template before the template, then copy the specified template to the newly added empty template, form new lower sideband data with the lower sideband data + 1 / 3 of the upper and lower sideband difference and write the lower sideband data of the newly added template. Then, form new upper sideband data with the lower sideband data of the specified template + 2 / 3 of the upper and lower sideband difference and write the upper sideband data of the specified template.
[0078] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An electrocardiogram matching method based on electrocardiogram template, It is characterized in that The steps include: Create an ECG template; Establishing a voltage reference, a time reference and a label on the electrocardiogram template; Using the voltage reference, time reference and label to allow the artificial intelligence interpretation system of the electrocardiogram to learn, and establishing search logic conditions in the artificial intelligence interpretation system; Importing the examined electrocardiogram into the learned artificial intelligence interpretation system and matching it according to the search logic conditions; Get the matching results; The search logic condition is: when the three key values of the detected ECG waveform are all equal to the three key values of the template library, a template is composed of two upper and lower sidebands forming an uneven curve band; the steps are as follows: When a measured waveform does not completely fall between the upper and lower sidebands of a known template, the number of data points in the excess portion is the difference parameter; When the difference parameter is 0, it is defined as a perfect match; When the difference parameter is less than or equal to the specified threshold, it is defined as a successful match; When the difference parameter is greater than the specified threshold, it is defined as a match failure; The three groups of key values include: the interval from the Q wave trough to the R wave peak as the first key value; the interval from the R wave peak to the S wave trough as the second key value; the interval from the S wave trough to the ST turning point as the third key value; The template library includes an extended template, and the rule restrictions of the extended template include: When the calibration waveform and the template key value are the same, if the starting point of the calibration waveform after normalization is higher than the upper sideband of the template waveform starting point by 0.2mV or lower than the lower sideband of the template waveform starting point by 0.2mV, the calibration waveform will be rejected; If the end point of the measured waveform after standardization is higher than the upper sideband of the template waveform end point by 0.2mV or lower than the lower sideband of the template waveform end point by 0.2mV, the calibration waveform will also fail; If the calibrated waveform that meets the conditions is higher than the data point of the upper sideband, the upper sideband data point in the template will be replaced; if it is lower than the data point of the lower sideband, the lower sideband data point in the template will be replaced; The template library includes a merge template, and the rule restrictions of the merge template include: When two template key values are the same, if the starting point of the upper sideband of one template is higher than the lower sideband of the other template waveform starting point by more than 0.2mV, or the starting point of the lower sideband is lower than the upper sideband of the other template waveform starting point by more than 0.2mV, then it is determined that the merging condition is not met; If the end point of one template is higher than the lower sideband of the other template waveform end point by more than 0.2mV or lower than the upper sideband of the template waveform end point by more than 0.2mV, it is also considered that the merging condition is not met; If the upper sideband waveform of the template that meets the merging conditions is higher than the data point of the upper sideband of another template, the upper sideband data point in the other template is replaced; if the data point of the lower sideband of the template that meets the merging conditions is lower than the data point of the lower sideband of another template, the lower sideband data point in the other template is replaced; The template library includes newly added templates. When a newly calibrated waveform cannot find a template with the same key value in the existing template library, a newly added template can be generated. The steps are as follows: First, according to the newly calibrated waveform key value, a specified position in the template library is searched, and the position satisfies that its key value is less than or equal to the newly calibrated waveform key value and its previous template key value is greater than the newly calibrated waveform key value; Move the position template and the following templates by one template space to generate an empty template; Then write the newly calibrated waveform into the upper sideband and lower sideband of the blank template respectively; A new template is generated by writing the heartbeat type and key value into the corresponding position; The template library includes split templates. When a template has a false positive judgment, it is necessary to split the template into two templates. The steps are as follows: First, add an empty template before this template; Then copy the specified template to the newly added empty template; The lower sideband data + 1 / 3 of the upper and lower sideband difference forms new lower sideband data and writes the lower sideband data of the newly added template; Then, the lower sideband data of the specified template + 2 / 3 of the upper and lower sideband difference is formed into new upper sideband data and written into the upper sideband data of the specified template.
2. The electrocardiogram matching method based on the electrocardiogram template according to claim 1, Features: The electrocardiogram template includes P wave, Q wave, R wave, S wave, ST turning point and T wave; The voltage reference includes the falling edge amplitude from the R wave peak to the S wave trough; the time reference includes the R wave peak or the S wave trough; and the label includes three groups of key values.
3. The electrocardiogram matching method based on the electrocardiogram template according to claim 2, Features: The setting condition of the time reference benchmark is: when the amplitude from the R wave peak to the baseline is greater than or equal to the amplitude from the baseline to the S wave trough or when the amplitude from the R wave peak to the baseline is greater than or equal to 0.5 millivolts, the R wave peak is used as the time reference benchmark.
4. The electrocardiogram matching method based on the electrocardiogram template according to claim 3, Features: The setting condition of the time reference benchmark is: when the amplitude from the R wave peak to the baseline is less than the amplitude from the baseline to the S wave trough and the amplitude from the R wave peak to the baseline is less than 0.5 millivolts, the S wave trough is used as the time reference benchmark.
