A Method and System for Identifying the Rotation Direction of Electrocardiogram Vector Loops
By preprocessing and expanding the electrocardiogram waveform data, combined with the cross-judgment method, the problems of low efficiency and insufficient accuracy of the rotation direction identification of the existing central electrical vector ring are solved, and efficient identification of the "8" shape ring is achieved.
Patent Information
- Application Number
- CN202211337076.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-10-28
AI Technical Summary
In the existing electrocardiogram vector ring rotation direction recognition methods, manual recognition efficiency is low, while computer recognition methods cannot correctly identify the "8" shape ring when the QRS band waveform is vertical.
By obtaining the ECG waveform data, preprocessing and expansion, adding attribute numbers, data conversion and sorting are performed, cross-judgment identification is selected, and if the recognition is not successful, rotate the waveform to 90 degrees and try again.
It improves the accuracy of identifying the rotation direction of the ECG vector ring, especially when the waveform is vertical, it can correctly identify the "8" shape ring.
Smart Images

Figure CN115590525B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electrocardiogram vector analysis, and particularly to a method and system for identifying the rotation direction of an electrocardiogram vector loop. Background Art
[0002] The statements in this part merely provide background technical information related to the present disclosure and do not necessarily constitute prior art.
[0003] The electrocardiogram vector is different in direction and magnitude at each instant according to the cardiac electrical excitation. The electrocardiogram vector is a special examination that records the direction and magnitude of the electrical excitation generated at each instant of the electrocardiogram vector concept of the heart in three dimensions. It can record the three-dimensional image of the cardiac action current more realistically and can be used to clarify the principle of electrocardiogram generation and explain the electrocardiogram waveform, thereby improving the recognition effect of the rotation direction of the electrocardiogram vector loop in clinical practice.
[0004] The analysis method of the electrocardiogram vector is based on the recognition of the running direction of the vector loop. Generally, in the analysis of the QRS vector loop, the rotation directions are divided into clockwise, counterclockwise, and "8"-shaped. The running direction of the "8"-shaped loop can be divided into counterclockwise first and then clockwise, or clockwise first and then counterclockwise, or based on the running direction of most of the loop according to its sequence. Therefore, in electrocardiogram vector analysis, correctly identifying the "8"-shaped in the rotation direction of the electrocardiogram vector has great value for diagnostic analysis. The current recognition methods for the "8"-shaped rotation direction are, one is manual recognition, but the efficiency of manual recognition is relatively low; the other is computer recognition, using the magnitude of the cross product modulus of the node-free sub-loop vector to judge whether the parent loop is an "8"-shaped loop, but it often cannot correctly identify the "8"-shaped when the waveform in the QRS band is vertical. Summary of the Invention
[0005] In order to solve the above problems, the present disclosure proposes a method and system for identifying the rotation direction of an electrocardiogram vector loop. The present disclosure uses the start and end points of the QRS complex to identify the "8"-shaped rotation direction of the electrocardiogram vector.
[0006] According to some embodiments, the present disclosure adopts the following technical solutions:
[0007] Obtain the input waveform data x_wave and y_wave to be recognized, and preprocess the waveform data;
[0008] Expand the waveform data according to the rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs;
[0009] Convert and sort the expanded data, and select the data pairs for judging and identifying the "8"-shaped loop;
[0010] Perform cross - judgment on the selected data pairs, and perform an "8" - shaped recognition on the waveform to be recognized currently. If the "8" - shape is recognized, return the "8" - shape; if the "8" - shape is not recognized, rotate the current waveform data by 90 degrees and then perform the "8" - shaped recognition again.
[0011] According to some embodiments, the present disclosure adopts the following technical solutions:
[0012] An electrocardiogram vector loop rotation direction recognition system, comprising:
[0013] A data acquisition module, configured to acquire the input waveform data x_wave and y_wave to be recognized, and pre - process the waveform data;
[0014] A data processing module, configured to expand the waveform data according to rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs;
[0015] Perform data conversion and sorting on the expanded data, and select the data pairs for "8" - shaped loop judgment recognition;
[0016] A data recognition module, configured to perform cross - judgment on the selected data pairs, and perform an "8" - shaped recognition on the waveform to be recognized currently. If the "8" - shape is recognized, return the "8" - shape; if the "8" - shape is not recognized, rotate the current waveform data by 90 degrees and then perform the "8" - shaped recognition again.
[0017] Compared with the prior art, the beneficial effects of the present disclosure are as follows:
[0018] The present disclosure adopts an electrocardiogram vector loop rotation direction recognition method. During recognition, select the data pairs for "8" - shaped judgment, perform cross - judgment on the data pairs. If the data pairs cross, judge whether the major axis of the small loop is greater than 1 / 4 of the major loop based on the crossed data. If it is greater, then judge it as an "8" - shape. If the "8" - shape is recognized, return the "8" - shape. If the "8" - shape is not recognized, rotate the current waveform data by 90 degrees and then perform the "8" - shaped recognition again, overcoming the problem that the "8" - shape cannot be correctly recognized when the waveform is vertical. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings forming a part of this disclosure are used to provide a further understanding of the present disclosure. The schematic embodiments and descriptions thereof of the present disclosure are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure.
[0020] Figure 1 It is a flowchart for implementing the method described in the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] The present disclosure will be further described below in conjunction with the drawings and embodiments.
[0022] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present disclosure belongs.
[0023] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0024] Embodiment 1
[0025] In an embodiment of the present disclosure, a method for identifying the rotation direction of an electrocardiogram vector loop is provided, including:
[0026] Step 1: Obtain the input waveform data x_wave and y_wave to be identified, and preprocess the waveform data;
[0027] Step 2: Expand the waveform data according to the rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs;
[0028] Step 3: Convert and sort the expanded data, and select the data pairs for judging and identifying the "8" - shaped loop;
[0029] Step 4: Make a cross - judgment on the selected data pairs, perform "8" - shaped recognition on the waveform to be identified currently. If the "8" - shaped is recognized, return the "8" - shaped; if the "8" - shaped is not recognized, rotate the current waveform data by 90 degrees and then perform "8" - shaped recognition.
[0030] As an embodiment, in Step 1, the acquisition method of the waveform data is:
[0031] Obtain the Frank lead data of the electrocardiogram and store it as Frank_xyz, and save the data signal format as the Original_Frank_xyz signal after preprocessing;
[0032] Identify the start and end points of the QRS complex in the Original_Frank_xyz signal, and intercept the x - lead data and y - lead data from the Original_Frank_xyz using the start and end points to obtain the waveform data.
[0033] Among them, the original data comes from the extracted PTB dataset, and the Frank lead data of electrocardiogram is obtained and stored as Frank_xyz.
[0034] Furthermore, the Frank_xyz = {Frank x , Frank y , Frank z}, where Frank x is the x-lead data of the Frank lead system; Frank y is the y-lead data of the Frank lead system; Frank z is the z-lead data of the Frank lead system.
[0035] Then, the baseline drift of Frank_xyz is removed, and the signal is saved as the Original_Frank_xyz signal.
[0036] Specifically, when identifying the start and end points of the QRS complex in the Original_Frank_xyz signal, the Pan-Tompkins algorithm is used to identify the start and end points of the QRS complex, and a set of start and end point positions of the QRS complex is selected. Assuming that the start point in the start and end points of the QRS complex is qrs1 and the end point is qrs2, the x-lead data is intercepted from the Original_Frank_xyz using the start point qrs1 and the end point qrs2, the y-lead data is intercepted, and the y-lead data is inverted to obtain the waveforms x_wave and y_wave.
[0037] In addition, in step 1, the method for preprocessing the waveform data is as follows: the waveform data points of the input x_wave and y_wave are converted into integer form, and after directly multiplying the waveform data points by 1000, the waveforms x_wave_int and y_wave_int are obtained. After finding the maximum and minimum values of x_wave_int, they are saved in the form of x_wave_min and x_wave_max. Then, x_wave_min and x_wave_max are saved for subsequent use.
[0038] As an embodiment, in step 2, the method for expanding the waveform data according to certain rules to obtain newly added data pairs is as follows:
[0039] First, form a set of data pairs from the x_wave_int and y_wave_int waveforms and store them in pair_xy. Then, first determine whether the absolute value of the difference between the current numerical point and the next numerical point of the x_wave_int waveform is greater than 1. If so, then determine the magnitude relationship between the current numerical point and the next numerical point of the x_wave_int waveform. If the current numerical point is larger, then store the pair_xy data pair corresponding to the current numerical point in pair_xy_fill, and then obtain the newly added data pairs and store them in pair_xy_fill.
[0040] Specific rules for expanding waveform data are as follows:
[0041] First, determine whether the absolute value of the difference between the current numerical point and the next numerical point of the x_wave_int waveform is greater than 1.
[0042] Among them, if it is not greater than 1, store the pair_xy data pairs corresponding to the current data point and the next data point in pair_xy_fill.
[0043] If it is greater than 1, it is necessary to further determine which value is larger between the current numerical point and the next numerical point of the x_wave_int waveform. Among them, if the current numerical point is larger:
[0044] 1. Store the pair_xy data pair corresponding to the current numerical point in pair_xy_fill.
[0045] 2. Obtain the newly added data pairs and store them in pair_xy_fill. The x data of the newly added data pairs is the set of data points obtained by taking the next data point and the current data point at an interval of 1. The y data of the newly added data pairs is linearly interpolated from the y_wave_int value corresponding to the current data point to the y_wave_int value corresponding to the next data point corresponding to the x data points.
[0046] If the next numerical point is larger:
[0047] 1. Store the pair_xy data pair corresponding to the current numerical point in pair_xy_fill.
[0048] 2. Obtain the newly added data pairs and store them in pair_xy_fill. The x data of the newly added data pairs is the set of data points obtained by taking the current data point and the next data point at an interval of 1. The y data of the newly added data pairs is linearly interpolated from the y_wave_int value corresponding to the current data point to the y_wave_int value corresponding to the next data point corresponding to the x data points.
[0049] Furthermore, add an attribute number to the newly added data pairs. Specifically, the numbers start from 1 and are numbered in sequence.
[0050] As an embodiment, in step 3, the method for performing data conversion and sorting is as follows:
[0051] Save the pair_xy_fill with the same x data in the pair_xy_fill data to pair_xy_fill_t; and sort pair_xy_fill_t in ascending order of x to obtain pair_xy_fill_t_sort.
[0052] Furthermore, select the data pairs for "8"-shaped loop judgment and recognition. The method for selecting the data pairs for "8"-shaped loop judgment and recognition is as follows:
[0053] The rule for selecting data pairs is to select data from the pair_xy_fill_t_sort data in ascending order. Assume that the first data of the data pair is the nth data in the pair_xy_fill_t_sort data, then the second data of the data pair is the (n + 5)th data in the pair_xy_fill_t_sort data.
[0054] As an embodiment, perform cross-judgment on the selected data pairs. The specific method for performing "8"-shaped recognition on the waveform to be recognized currently is as follows:
[0055] Each data in the selected data pair corresponds to one or more values (one x data corresponds to one or more y data values and also corresponds to one or more numbered values).
[0056] Assume that the first data point in the data pair contains n_data numbered data, and the second data point in the data pair contains m_data numbered data.
[0057] If n_data is equal to m_data and equal to 2, directly judge whether there is a cross.
[0058] If n_data is equal to m_data and greater than 2, divide it into k parts according to the distance. Each part has n_data equal to m_data and equal to 2, and then perform cross-judgment.
[0059] The rules for the cross-judgment are as follows:
[0060] Sort the numbered data in n_data and m_data respectively, and convert the y data corresponding to the n_data and m_data numbers into values greater than or equal to 0.
[0061] If the maximum value of the data numbers in n_data is greater than the minimum value of the data numbers in m_data, further judgment is carried out. If the y value corresponding to the larger data number in n_data minus the y value corresponding to the smaller data number in n_data is greater than 0, the flag bit is set to 1. Similar operations are performed on m_data. If the flag bits of the two data points are different, it indicates a cross data point.
[0062] Furthermore, taking the cross data as the base point, judge whether the major axis of the small loop is greater than 1 / 4 of the major loop; specifically: regard the data points corresponding to n_data as the left loop and the data points corresponding to m_data as the right loop.
[0063] 1. According to the numbers, add all the data points connected to n_data from the current x data point to the end of x_wave_min to the left loop, and add all the data points connected to m_data from the current data point to the end of x_wave_max to the right loop. And calculate the longest diameter of the left loop and record it as left_max_length, and calculate the longest diameter of the right loop and record it as right_max_length;
[0064] 2. Calculate the longest value of all data to the current point and record it as global_max_length;
[0065] 3. Obtain the maximum value of left_max_length and right_max_length in the first step. If the maximum value is greater than one-fourth of global_max_length, calculate the minimum value of left_max_length and right_max_length divided by the maximum value of left_max_length and right_max_length. If it is greater than or equal to one-fourth, return the figure-eight shape.
[0066] Perform figure-eight recognition on the waveform to be recognized currently. If the figure-eight shape is recognized, return the figure-eight shape. If the figure-eight shape is not recognized, rotate the current waveform data by 90 degrees and then perform figure-eight recognition.
[0067] Specifically, the above method can also be adopted for the recognition of P waves and T waves in the electrocardiogram vector.
[0068] Embodiment 2
[0069] In an embodiment of the present disclosure, a system for identifying the rotation direction of an electrocardiogram vector loop is provided, which is characterized in that it includes:
[0070] A data acquisition module, configured to acquire the input waveform data x_wave and y_wave to be recognized, and preprocess the waveform data;
[0071] A data processing module, which is used to expand waveform data according to rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs;
[0072] Perform data conversion and sorting on the expanded data, and select the data pairs for "8"-shaped loop judgment and recognition;
[0073] A data recognition module, which is used to perform cross-judgment on the selected data pairs, perform "8"-shaped recognition on the waveform to be recognized currently. If the "8" shape is recognized, return the "8" shape; if the "8" shape is not recognized, rotate the current waveform data by 90 degrees and then perform "8"-shaped recognition.
[0074] Further, in the method for obtaining the waveform data x_wave and y_wave, the starting and ending positions of the QRS complex are used to intercept the x-lead data from Original_Frank_xyz, intercept the y-lead data, and perform an inversion operation on the y-lead data to obtain the waveforms x_wave and y_wave.
[0075] The system in Embodiment 2 specifically executes the specific steps of the method in Embodiment 1.
[0076] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, so that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0078] Although the specific embodiments of the present disclosure have been described above in conjunction with the accompanying drawings, they are not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications or deformations that can be made without creative efforts on the basis of the technical solutions of the present disclosure are still within the scope of protection of the present disclosure.
Claims
1. A method for identifying the rotation direction of an electrocardiogram vector loop, characterized in that Including: Obtain the waveform data x_wave and y_wave of the input to be recognized, and preprocess the waveform data; Expand the waveform data according to the rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs; the method of expanding the waveform data is as follows: convert the waveform data points of the input x_wave and y_wave into integer form, directly multiply the waveform data points by 1000 to obtain the x_wave_int and y_wave_int waveforms, form a group of data pairs of the x_wave_int and y_wave_int waveforms and store them in pair_xy, then first judge whether the absolute value of the difference between the current numerical point and the next numerical point of the x_wave_int waveform is greater than 1; if so, then judge the size of the current numerical point and the next numerical point of the x_wave_int waveform. If the current numerical point is larger, the data pair corresponding to the current numerical point in pair_xy is stored in pair_xy_fill, and then the newly added data pair is obtained and stored in pair_xy_fill; Perform data conversion and sorting on the expanded data, and select the data pairs for "8"-shaped loop judgment and recognition; Perform cross-judgment on the selected data pairs, perform "8"-shaped recognition on the waveform to be recognized currently. If the "8" shape is recognized, return the "8" shape; if the "8" shape is not recognized, rotate the current waveform data by 90 degrees and then perform "8"-shaped recognition; The rules of the cross-judgment are as follows: each data in the selected data pair corresponds to one or more values; assume that the first data point in the data pair contains n_data numbered data, and the second data point in the data pair contains m_data numbered data; sort the numbered data in n_data and m_data respectively, and convert the y data corresponding to the numbered data in n_data and m_data into values greater than or equal to 0; if the maximum value of the data numbers in n_data is greater than the minimum value of the data numbers in m_data, then perform further judgment. Subtract the y value corresponding to the small data number in n_data from the y value corresponding to the large data number in n_data. If it is greater than 0, set the flag bit to 1; subtract the y value corresponding to the small data number in m_data from the y value corresponding to the large data number in m_data. If it is greater than 0, set the flag bit to 1; if the flag bits of the two data points are different, it means it is a cross data point.
2. The method for identifying the rotation direction of an electrocardiogram vector loop according to claim 1, wherein The method for obtaining the waveform data is as follows: Obtain the Frank lead data of the electrocardiogram and store it as Frank_xyz, and save the data signal format as the Original_Frank_xyz signal after preprocessing; Identify the start and end points of the QRS complex in the Original_Frank_xyz signal, and intercept the x-lead data and y-lead data from the Original_Frank_xyz using the start and end points to obtain the waveform data.
3. A method for identifying the rotation direction of an electrocardiogram vector loop as described in claim 2, characterized in that The said , wherein is the x-lead data of the Frank lead system; is the y-lead data of the Frank lead system; is the z-lead data of the Frank lead system.
4. The electrocardiogram vector loop rotation direction recognition method according to claim 1, wherein, The method for preprocessing the waveform data is as follows: After finding the maximum and minimum values of x_wave_int, save them in the form of x_wave_min and x_wave_max.
5. The method for identifying the rotation direction of an electrocardiogram vector loop according to claim 1, wherein The method for numbering the attributes of the data is as follows: The numbering starts from 1 and is numbered in sequence.
6. The electrocardiogram vector loop rotation direction recognition method according to claim 1, characterized in that, The method for data conversion and sorting is as follows: Save the pair_xy_fill with the same x data in the pair_xy_fill data to pair_xy_fill_t; and sort pair_xy_fill_t in ascending order of x to obtain pair_xy_fill_t_sort.
7. The method for identifying the rotation direction of an electrocardiogram vector loop according to claim 6, wherein The method for selecting data pairs for "8"-shaped loop judgment and identification is as follows: The rule for selecting data pairs is to select data from the pair_xy_fill_t_sort data in ascending order. Assuming that the first data of the data pair is the nth data in the pair_xy_fill_t_sort data, then the second data of the data pair is the (n + 5)th data in the pair_xy_fill_t_sort data.
8. An electrocardiogram vector loop rotation direction recognition system, characterized in that, Including: A data acquisition module, used to acquire the input waveform data x_wave and y_wave to be identified, and preprocess the waveform data; A data processing module, used to expand the waveform data according to the rules to obtain newly added data pairs, and add attribute numbers to the newly added data pairs; The method for expanding the waveform data is as follows: Convert the waveform data points of the input x_wave and y_wave into integer form, directly multiply the waveform data points by 1000 to obtain the x_wave_int and y_wave_int waveforms, form a group of data pairs from the x_wave_int and y_wave_int waveforms and store them in pair_xy, then first judge whether the absolute value of the difference between the current numerical point and the next numerical point of the x_wave_int waveform is greater than 1; if so, then judge the size of the current numerical point and the next numerical point of the x_wave_int waveform. If the current numerical point is larger, the pair_xy data pair corresponding to the current numerical point is stored in pair_xy_fill, and then the newly added data pair is obtained and stored in pair_xy_fill; Perform data conversion and sorting on the expanded data, and select data pairs for "8"-shaped loop judgment and identification; A data identification module, used to perform cross-judgment on the selected data pairs, perform "8"-shaped identification on the waveform to be identified currently. If the "8"-shaped is recognized, return the "8"-shaped; if the "8"-shaped is not recognized, rotate the current waveform data by 90 degrees and then perform "8"-shaped identification; The rules for the cross-judgment are as follows: Sort the numbered data in n_data and m_data respectively, and convert the y data corresponding to the numbers in n_data and m_data into values greater than or equal to 0; if the maximum value of the data numbers in n_data is greater than the minimum value of the data numbers in m_data, then further judgment is carried out. Subtract the y value corresponding to the small data number in n_data from the y value corresponding to the large data number in n_data. If it is greater than 0, set the flag bit to 1; subtract the y value corresponding to the small data number in m_data from the y value corresponding to the large data number in m_data. If it is greater than 0, set the flag bit to 1; if the flag bits of the two data points are different, it indicates a cross data point.
9. A system for identifying the rotation direction of an electrocardiogram vector loop according to claim 8, wherein Obtain the Frank lead data of the electrocardiogram and store it as Frank_xyz. After preprocessing, save the data signal format as the Original_Frank_xyz signal. In the acquisition methods of the waveform data x_wave and y_wave, use the start and end positions of the QRS complex to intercept the x lead data from Original_Frank_xyz, intercept the y lead data and perform an inversion operation on the y lead data to obtain the waveforms x_wave and y_wave.
Citation Information
Patent Citations
Method and apparatus for multi-domain processing and correlation analysing of electrocardiosignal
CN1032288A
Stereo electrocardiogram forming method and instrument thereof
CN1206580A