A canvas-based electrocardiogram drawing method and system

By real-time acquisition and adjustment of the sampling timestamp sequence of electrocardiogram (ECG) signals, combined with canvas drawing, the problem of misdiagnosis and missed diagnosis of diseases caused by errors in ECG drawing is solved, and efficient and accurate ECG drawing is achieved.

CN115670476BActive Publication Date: 2025-10-28FUJIAN ZHIKANGYUN MEDICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211364318.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2025-10-28
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

In the existing technology of electrocardiogram drawing, key voltage signals are missed due to the constant time interval of voltage signal collection, which leads to drawing errors and further causes the problems of misdiagnosis and omission of diseases.

Method used

An ECG drawing method based on canvas is adopted. ECG signals are collected in real time to obtain signals of each heartbeat cycle. The sampling timestamp sequence is adjusted according to the staggered time difference to fill in the voltage intensity signals of adjacent heartbeat cycles. The drawing is performed using a canvas, and the sampling frequency is adjusted according to the frequency of ECG signal changes.

Benefits of technology

It improves the accuracy of electrocardiogram (ECG) drawing, avoids misdiagnosis and missed diagnosis of diseases, reduces resource waste, and enhances the efficiency and accuracy of ECG drawing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115670476B_ABST
    Figure CN115670476B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for drawing electrocardiograms (ECGs) based on a canvas. The method includes: real-time acquisition of ECG signals to obtain ECG signals corresponding to each heartbeat cycle; in response to the arrival of a new heartbeat cycle, acquiring the first heartbeat cycle signal of the previous heartbeat cycle; calculating the second sampling timestamp sequence corresponding to the current heartbeat cycle based on the first sampling timestamp sequence; the sampling times of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; repeating the above steps until the total amount of acquired data reaches a preset amount; within two arbitrary adjacent heartbeat cycles, filling the corresponding positions of the voltage intensity signals from the earlier arriving heartbeat cycle into the later arriving heartbeat cycle; inputting the filled voltage intensity signals into a canvas and drawing the required ECG on the canvas. This invention effectively increases the accuracy of ECG drawing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical technology, and in particular to a method and system for drawing electrocardiograms based on canvas. Background Technology

[0002] Electrocardiography (ECG) is a widely used cardiac electrophysiological examination in clinical practice. Changes in the waveform of an ECG can reflect the conduction of bioelectric currents in the heart during systole and diastole. These changes can be used to monitor related diseases and conditions in patients, such as arrhythmias, cardiomyopathy, ventricular hypertrophy, angina pectoris, myocardial infarction, myocardial ischemia, myocarditis, hypertensive heart disease, and pulmonary heart disease—both functional and organic cardiac lesions. Depending on the specific situation, a standard 12-lead ECG, 24-hour Holter monitoring, and stress ECG after exercise testing can be selected.

[0003] Drawing accurate electrocardiograms (ECGs) can help people make more accurate diagnoses of diseases. Now, let's draw ECGs... Figure 1 Typically, voltage signals are acquired at intervals, and then these voltage signals are fitted onto a time-voltage coordinate axis to obtain an electrocardiogram (ECG). Current technologies generally use a constant time interval for acquisition, which leads to the omission of some crucial voltage signals. This results in discrepancies between the generated ECG and the actual situation, potentially causing misdiagnosis or missed diagnosis of diseases. Summary of the Invention

[0004] In view of the aforementioned deficiencies of the prior art, the technical problem to be solved by the present invention is to provide a canvas-based electrocardiogram (ECG) drawing method and system, which aims to increase the accuracy of ECG drawing and avoid misdiagnosis and missed diagnosis of diseases due to ECG errors.

[0005] To achieve the above objectives, the first aspect of this invention discloses a method for drawing electrocardiograms based on canvas, the method comprising:

[0006] Step S1: Real-time acquisition of electrocardiogram (ECG) signals, obtaining ECG signals corresponding to each heartbeat cycle in real time;

[0007] Step S2: In response to the arrival of a new heartbeat cycle, acquire the first heartbeat cycle signal of the previous heartbeat cycle of the current heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence;

[0008] Step S3: Based on the first sampling timestamp sequence, calculate the second sampling timestamp sequence corresponding to the current heartbeat cycle; the sampling times of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling period corresponding to the sampling frequency of their relative positions;

[0009] Step S4: Repeat steps S1-S3 until the total amount of collected data reaches the preset amount of data.

[0010] Step S5: In two any adjacent heartbeat cycles, fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle.

[0011] Step S6: Input the voltage intensity signals corresponding to each of the filled heartbeat cycles into the canvas according to the time sequence, and draw on the canvas according to the input voltage intensity signals to obtain the required electrocardiogram corresponding to the electrocardiogram signal.

[0012] Optionally, within the same heartbeat cycle, the sampling frequencies at different locations may be the same or different;

[0013] When the sampling frequencies at different locations within the same heartbeat cycle are not the same, the sampling frequency is configured such that the higher the sampling frequency of each segment within the heartbeat cycle changes with the frequency of the electrocardiogram signal, the higher the sampling frequency is set to.

[0014] Optionally, before step S2, the method further includes:

[0015] Based on the characteristic points in a traditional electrocardiogram, determine the start or end point of the heartbeat cycle;

[0016] Based on the start or end point of the heartbeat cycle, determine whether a new heartbeat cycle has arrived.

[0017] Optionally, step S5 includes:

[0018] Step S501: Within two arbitrary adjacent heartbeat cycles, determine the relative positions of each voltage intensity signal in the earlier heartbeat cycle in the later heartbeat cycle based on the positions of each voltage intensity signal in the earlier heartbeat cycle.

[0019] Step S502: Fill the relative positions in the later-arriving heartbeat cycles with the voltage intensity signals from the earlier-arriving heartbeat cycles.

[0020] Optionally, after step S5, the method further includes:

[0021] The voltage intensity signal corresponding to the first heartbeat cycle without filling is discarded to improve accuracy and avoid inconsistent canvas drawing accuracy.

[0022] The second aspect of this invention discloses an electrocardiogram drawing system based on canvas, the system comprising: a real-time acquisition module, a heartbeat cycle signal acquisition module, a second sampling timestamp sequence solving module, a repetitive work control module, a filling module, an input module, and a canvas drawing module;

[0023] The real-time acquisition module is used to acquire electrocardiogram (ECG) signals in real time and obtain ECG signals corresponding to each heartbeat cycle in real time.

[0024] The heartbeat cycle signal acquisition module is used to acquire the first heartbeat cycle signal of the previous heartbeat cycle in response to the arrival of a new heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence.

[0025] The second sampling timestamp sequence solving module is used to solve the second sampling timestamp sequence corresponding to the current heartbeat cycle based on the first sampling timestamp sequence; the sampling times of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling period corresponding to the sampling frequency of their relative positions;

[0026] The repetitive work control module is used to make the real-time acquisition module, the heartbeat cycle signal acquisition module and the second sampling timestamp sequence solving module work repeatedly until the total amount of acquired data reaches the preset amount of data.

[0027] The filling module is used to fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle in two any adjacent heartbeat cycles.

[0028] The input module is used to input the voltage intensity signals corresponding to each of the filled heartbeat cycles into the canvas drawing module according to the timing sequence.

[0029] The canvas drawing module is used to draw according to the input voltage intensity signal to obtain the required electrocardiogram corresponding to the electrocardiogram signal.

[0030] Optionally, within the same heartbeat cycle, the sampling frequencies at different locations may be the same or different;

[0031] When the sampling frequencies at different locations within the same heartbeat cycle are not the same, the sampling frequency is configured such that the higher the sampling frequency of each segment within the heartbeat cycle changes with the frequency of the electrocardiogram signal, the higher the sampling frequency is set to.

[0032] Optionally, the system further includes: a heartbeat cycle start point determination module and a heartbeat cycle arrival judgment module; the heartbeat cycle start point determination module and the heartbeat cycle arrival judgment module operate before the heartbeat cycle signal acquisition module operates;

[0033] The heartbeat cycle start point determination module is used to determine the start or end point of the heartbeat cycle based on the characteristic points in a traditional electrocardiogram.

[0034] The heartbeat cycle arrival determination module is used to determine whether a new heartbeat cycle has arrived based on the start or end point of the heartbeat cycle.

[0035] Optionally, the filling module includes: a relative position determination submodule and a specific filling submodule;

[0036] The relative position determination submodule is used to determine the relative position of each voltage intensity signal in the first heartbeat cycle in the second heartbeat cycle, based on the position of each voltage intensity signal in the first heartbeat cycle.

[0037] The specific filling submodule is used to fill the voltage intensity signals of the earlier arriving heartbeat cycle into the relative positions of the later arriving heartbeat cycles.

[0038] Optionally, the system further includes a heartbeat cycle discarding module, which operates after the filling module has started working;

[0039] The heartbeat cycle discarding module is used to discard the voltage intensity signal corresponding to the first heartbeat cycle without filling, so as to avoid inconsistent drawing accuracy of the canvas drawing module.

[0040] The beneficial effects of this invention are as follows: 1. This invention acquires ECG signals in real time, obtaining ECG signals corresponding to each heartbeat cycle in real time; in response to the arrival of a new heartbeat cycle, it acquires the first heartbeat cycle signal of the previous heartbeat cycle of the current heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence; based on the first sampling timestamp sequence, it solves for the second sampling timestamp sequence corresponding to the current heartbeat cycle; the sampling timestamps of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles. Through the above method, this invention ensures that when the sampling timestamps between adjacent heartbeat cycles are moved to the relative positions of the same heartbeat cycle, there will be no overlap. Thus, when plotting a heartbeat cycle, it can combine the voltage intensity signal of the previous heartbeat cycle (each heartbeat cycle is approximately the same in the same monitoring, and the voltage intensity of corresponding points in adjacent heartbeat cycles is also similar) for fitting and plotting. Using more voltage intensity signals (i.e., data points) makes the image more complete and accurate. Therefore, the electrocardiogram (ECG) generated by this invention has high accuracy, avoiding misdiagnosis and missed diagnosis of diseases due to ECG errors. Existing technologies require additional sampling time points to achieve the same accuracy; therefore, this invention effectively reduces the resource waste caused by adding additional sampling time points compared to existing technologies. When the sampling frequency of the sampling device is limited, this invention can increase the sampling frequency without changing the device performance, thereby further improving sampling accuracy. 2. This invention uses a canvas for drawing, which offers fast drawing speed and high accuracy, ensuring efficient ECG generation while preventing errors due to drawing techniques. 3. In this invention, the sampling frequency at different locations within the same heartbeat cycle may be the same or different; when the sampling frequencies at different locations within the same heartbeat cycle are different, the sampling frequency is configured such that the higher the frequency of change in the ECG signal, the higher the sampling frequency is set for each segment within the heartbeat cycle. This has the following advantages: First, it ensures that a high sampling frequency is used in segments with high electrical signal frequency changes, avoiding the occurrence of serious errors in the generated ECG due to some changes not being collected, thus improving ECG accuracy. Secondly, the sampling frequency is correspondingly reduced in segments with low electrical signal frequency changes, because these segments rarely experience uncollected changes, and a lower sampling frequency reduces resource waste. 4. This invention discards the voltage intensity signal corresponding to the first unfilled heartbeat cycle to improve accuracy and avoid inconsistent canvas rendering accuracy. Inconsistent accuracy can lead to errors in the obtained electrocardiogram and make it less intuitive. In summary, this invention effectively increases the accuracy of electrocardiogram rendering, avoiding misdiagnosis and missed diagnosis of diseases due to electrocardiogram errors. Attached Figure Description

[0041] Figure 1This is a flowchart illustrating a canvas-based electrocardiogram drawing method according to a specific embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of the structure of a canvas-based electrocardiogram drawing system provided in a specific embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of voltage intensity signals within adjacent heartbeat cycles provided in a specific embodiment of the present invention;

[0044] Figure 4 This is an electrocardiogram diagram drawn by merging the voltage intensity signals of two consecutive heartbeat cycles, as provided in a specific embodiment of the present invention. Detailed Implementation

[0045] This invention discloses a canvas-based electrocardiogram (ECG) drawing method. Those skilled in the art can refer to this document and appropriately modify the technical details for implementation. It should be particularly noted that all similar substitutions and modifications are obvious to those skilled in the art and are considered to be included in this invention. The methods and applications of this invention have been described through preferred embodiments. Those skilled in the art can clearly modify or appropriately change and combine the methods and applications described herein without departing from the content, spirit, and scope of this invention to implement and apply the technology of this invention.

[0046] The applicant's research revealed that: Currently, drawing electrocardiograms... Figure 1 Typically, voltage signals are acquired at intervals, and then these voltage signals are fitted onto a time-voltage coordinate axis to obtain an electrocardiogram (ECG). Current technology generally uses a constant time interval for acquisition. If the acquisition time is too long, some crucial voltage signals may be missed, leading to discrepancies between the generated ECG and the actual situation, resulting in misdiagnosis or missed diagnosis of diseases.

[0047] Therefore, embodiments of the present invention disclose a method for drawing electrocardiograms based on canvas, such as... Figure 1 As shown, the method includes:

[0048] Step S1: Real-time acquisition of electrocardiogram (ECG) signals, obtaining ECG signals corresponding to each heartbeat cycle in real time.

[0049] It should be noted that the electrocardiogram (ECG) signal is a voltage signal that changes over time, and the ECG signal changes periodically with the heartbeat. Not every cycle is necessarily the same, but in the same ECG monitoring system, each cycle is approximately identical.

[0050] Step S2: In response to the arrival of a new heartbeat cycle, acquire the first heartbeat cycle signal of the previous heartbeat cycle of the current heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence.

[0051] It should be noted that the first sampling timestamp sequence refers to the time points within this heartbeat cycle where voltage intensity was collected.

[0052] Optionally, before step S2, the method further includes:

[0053] Based on the characteristic points in a traditional electrocardiogram, determine the start or end point of the heartbeat cycle;

[0054] Based on the start or end of the heartbeat cycle, determine whether a new heartbeat cycle has arrived.

[0055] In one specific embodiment, the arrival of a new heartbeat cycle can be determined based on the end of the previous cycle; the end and arrival of the heartbeat cycle can be determined based on characteristic points on the electrocardiogram (ECG); these characteristic potentials can be determined by the start, end, peak, and trough values ​​of various waveforms within the ECG. Typically, an ECG includes the P wave, PR interval, QRS complex, J point, ST segment, T wave, U wave, and QT interval. Specifically, the start or end point of the heartbeat cycle can be set based on the corresponding positions (start, end, peak, and trough values) of the aforementioned waveforms.

[0056] It should be noted that almost all electrocardiograms will show the aforementioned special waveforms. Because the characteristic points in these waveforms (i.e., start point, end point, peak value, and trough value) are easily identifiable, they can be used as the start or end point of the heartbeat cycle in this embodiment of the invention. In this embodiment of the invention, the heartbeat cycle does not necessarily correspond to a complete heartbeat; it may correspond to a cycle from a point in the current beat to the corresponding point in the next beat.

[0057] Step S3: Based on the first sampling timestamp sequence, solve for the second sampling timestamp sequence corresponding to the current heartbeat cycle; the sampling times of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling period corresponding to the sampling frequency of their relative positions.

[0058] For example, assuming a heartbeat cycle of 0.8s, the first sampling timestamp sequence can be collected at 0.1s, 0.2s, 0.3s, 0.4s, 0.5s, 0.6s, 0.7s, and 0.8s of the previous heartbeat cycle. Correspondingly, the second sampling timestamp sequence can be collected at 0.05s, 0.15s, 0.25s, 0.35s, 0.45s, 0.55s, 0.65s, and 0.75s of the current heartbeat cycle. The staggered time difference is equal to half the sampling period corresponding to the relative sampling frequencies of the two sequences. In this example, it is 0.1s - 0.05s = 0.05s, which is equal to half the sampling period of 0.1s. The relative positions correspond to the sampling timestamp sequences of the first and second sampling timestamp sequences, such as 0.1s to 0.05s, 0.2s to 0.15s, and so on.

[0059] Step S4: Repeat steps S1-S3 until the total amount of collected data reaches the preset amount of data.

[0060] It should be noted that the preset data volume can be the number of heartbeat cycles collected within a preset time (such as the heartbeat cycles collected within two minutes), or it can be the preset number of heartbeat cycles (such as 100 heartbeat cycles).

[0061] Step S5: Within two arbitrary adjacent heartbeat cycles, fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle.

[0062] In one specific embodiment, step S5 includes:

[0063] Step S501: Within two arbitrary adjacent heartbeat cycles, determine the relative positions of each voltage intensity signal in the earlier heartbeat cycle in the later heartbeat cycle based on the positions of each voltage intensity signal in the earlier heartbeat cycle.

[0064] Step S502: Fill the relative positions of the voltage intensity signals in the first arriving heartbeat cycle into the later arriving heartbeat cycles.

[0065] In another specific embodiment, step S5 includes:

[0066] Within two arbitrary adjacent heartbeat cycles, the voltage intensity signals from the earlier heartbeat cycle are shifted one heartbeat cycle in the direction of the later heartbeat cycle to fill their relative positions in the later heartbeat cycle.

[0067] It should be noted that the implementation method of determining the position first and then filling has the advantage of high accuracy, but it is more cumbersome. Although translational filling is simple, its accuracy may be affected (mainly because each heartbeat cycle is not exactly the same).

[0068] Step S6: Input the voltage intensity signals corresponding to each heartbeat cycle after filling into the canvas according to the time sequence, and draw on the canvas according to the input voltage intensity signals to obtain the required electrocardiogram corresponding to the electrocardiogram signal.

[0069] It should be noted that canvas drawing has a fast rendering speed, allowing for more efficient drawing and higher precision.

[0070] In one specific embodiment, such as Figure 3 and Figure 4 As shown, Figure 3 The voltage intensity signals collected for two adjacent heartbeat cycles are defined as follows: the right side represents the current heartbeat cycle, and the left side represents the previous heartbeat cycle. Figure 4 for Figure 3 The ECG waveform is fitted by filling the current heartbeat cycle with the voltage intensity signal from the previous heartbeat cycle. Figure 4 The waveform represented by the dashed line is the fitted electrocardiogram waveform.

[0071] Optionally, the sampling frequency at each location may be the same or different within the same heartbeat cycle;

[0072] When the sampling frequencies at different locations within the same heartbeat cycle are not the same, the sampling frequency is configured such that the higher the frequency of the ECG signal changes within the heartbeat cycle, the higher the sampling frequency of each segment is set.

[0073] This sampling method has the following advantages: First, it ensures that a high sampling frequency is used in segments with high electrical signal frequency changes, preventing some changes from being missed and causing serious errors in the electrocardiogram (ECG), thus improving ECG accuracy. Second, the sampling frequency is correspondingly lower in segments with low electrical signal frequency changes, because it is rare for changes to go uncaptured in these segments, and a lower sampling frequency reduces resource waste.

[0074] Optionally, the method further includes:

[0075] Discard the voltage intensity signal corresponding to the first heartbeat cycle without filling to improve accuracy and avoid inconsistent canvas drawing accuracy.

[0076] Optionally, the method further includes:

[0077] Connect the output of the canvas drawing module to the printer so that the printer can print the electrocardiogram output by the canvas drawing module.

[0078] This invention provides real-time acquisition of electrocardiogram (ECG) signals, obtaining ECG signals corresponding to each heartbeat cycle. In response to the arrival of a new heartbeat cycle, it acquires the first heartbeat cycle signal of the preceding heartbeat cycle. The first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence. Based on the first sampling timestamp sequence, a second sampling timestamp sequence corresponding to the current heartbeat cycle is calculated. The sampling timestamps of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference compared to their respective heartbeat cycles. Through this method, this invention ensures that the sampling timestamps between adjacent heartbeat cycles do not overlap when moved to the relative positions within the same heartbeat cycle. Therefore, when plotting a heartbeat cycle, the voltage intensity signal of the preceding heartbeat cycle can be combined (each heartbeat cycle is approximately equal in the same monitoring, and the voltage intensity at corresponding points within adjacent heartbeat cycles is also similar) for fitting and plotting. Using more voltage intensity signals (i.e., data points) makes the image more complete and accurate. Therefore, the ECG plotted in this invention has high accuracy and can avoid misdiagnosis and missed diagnosis of diseases due to ECG errors. Existing technologies require additional sampling time points to achieve the same accuracy. Therefore, this invention effectively reduces the resource waste caused by adding additional sampling time points compared to existing technologies. This invention uses a canvas for drawing, which offers fast drawing speed and high accuracy, ensuring efficient ECG drawing while preventing errors due to drawing techniques. In this invention, the sampling frequency at different locations within the same heartbeat cycle may be the same or different. When the sampling frequencies at different locations within the same heartbeat cycle are different, the sampling frequency is configured such that the higher the frequency of change in the ECG signal, the higher the sampling frequency is set for each segment within the heartbeat cycle. This has the following advantages: First, it ensures that a high sampling frequency is used in segments with high electrical signal frequency changes, avoiding the possibility of some changes not being captured, which could lead to serious errors in the drawn ECG, thereby improving ECG accuracy. Second, the sampling frequency used in segments with low electrical signal frequency changes is correspondingly lower, because it is rare for changes to go uncaptured in these segments, and a lower sampling frequency reduces resource waste. This invention discards the voltage intensity signal corresponding to the first unfilled heartbeat cycle to avoid inconsistent canvas drawing accuracy. Inconsistent accuracy can lead to errors in the obtained electrocardiogram (ECG) and make it less intuitive. In summary, this invention effectively increases the accuracy of ECG drawing and avoids misdiagnosis and missed diagnosis of diseases due to ECG errors.

[0079] Based on the canvas-based electrocardiogram (ECG) drawing method provided above, this invention also provides a canvas-based ECG drawing system, such as... Figure 2As shown, the system includes: a real-time acquisition module 201, a heartbeat cycle signal acquisition module 202, a second sampling timestamp sequence solving module 203, a repetitive work control module 204, a filling module 205, an input module 206, and a canvas drawing module 207.

[0080] The real-time acquisition module 201 is used to acquire electrocardiogram (ECG) signals in real time and obtain ECG signals corresponding to each heartbeat cycle in real time.

[0081] The heartbeat cycle signal acquisition module 202 is used to acquire the first heartbeat cycle signal of the previous heartbeat cycle in response to the arrival of a new heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence.

[0082] The second sampling timestamp sequence solving module 203 is used to solve the second sampling timestamp sequence corresponding to the current heartbeat cycle based on the first sampling timestamp sequence; the sampling time points of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling period corresponding to the sampling frequency of their relative positions;

[0083] The repetitive work control module 204 is used to make the real-time acquisition module 201, the heartbeat cycle signal acquisition module 202 and the second sampling timestamp sequence solving module 203 work repeatedly until the total amount of acquired data reaches the preset amount of data.

[0084] The filling module 205 is used to fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle within two arbitrary adjacent heartbeat cycles.

[0085] Input module 206 is used to input the voltage intensity signals corresponding to each heartbeat cycle after filling into the canvas according to the timing sequence.

[0086] The canvas drawing module 207 is used to draw based on the input voltage intensity signal to obtain the required electrocardiogram corresponding to the electrocardiogram signal.

[0087] Optionally, the sampling frequency at each location may be the same or different within the same heartbeat cycle;

[0088] When the sampling frequencies at different locations within the same heartbeat cycle are not the same, the sampling frequency is configured such that the higher the frequency of the ECG signal changes within the heartbeat cycle, the higher the sampling frequency of each segment is set.

[0089] Optionally, the system also includes: a heartbeat cycle start point determination module and a heartbeat cycle arrival judgment module; the heartbeat cycle start point determination module and the heartbeat cycle arrival judgment module operate before the heartbeat cycle signal acquisition module 202 operates;

[0090] The heartbeat cycle start point determination module is used to determine the start or end point of the heartbeat cycle based on the characteristic points in a traditional electrocardiogram.

[0091] The heartbeat cycle arrival judgment module is used to determine whether a new heartbeat cycle has arrived based on the start or end of the heartbeat cycle.

[0092] Optionally, the filling module 205 includes: a relative position determination submodule and a specific filling submodule;

[0093] The relative position determination submodule is used to determine the relative position of each voltage intensity signal in the first heartbeat cycle in the second heartbeat cycle, based on the position of each voltage intensity signal in the first heartbeat cycle.

[0094] The specific filling submodule is used to fill the voltage intensity signals of the earlier arriving heartbeat cycles into their relative positions in the later arriving heartbeat cycles.

[0095] Optionally, the system also includes a heartbeat cycle discarding module, which operates after the filling module 205 has started working;

[0096] The heartbeat cycle discard module is used to discard the voltage intensity signal corresponding to the first heartbeat cycle without filling in order to improve accuracy and avoid inconsistent drawing accuracy of the canvas.

[0097] In this embodiment of the invention, the real-time acquisition module 201 acquires ECG signals in real time, obtaining ECG signals corresponding to each heartbeat cycle. The heartbeat cycle signal acquisition module 202, in response to the arrival of a new heartbeat cycle, acquires the first heartbeat cycle signal of the previous heartbeat cycle. The first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence. The second sampling timestamp sequence solving module 203 solves for the second sampling timestamp sequence corresponding to the current heartbeat cycle based on the first sampling timestamp sequence. The sampling timestamps of the second timestamp sequence and the first sampling timestamp sequence have an interleaved time difference compared to their respective heartbeat cycles. This embodiment of the invention ensures that when the sampling timestamps of adjacent heartbeat cycles are moved to the relative positions of the same heartbeat cycle, there is no overlap. Therefore, when plotting a heartbeat cycle, the voltage intensity signal of the previous heartbeat cycle can be combined (each heartbeat cycle is approximately the same in the same monitoring, and the voltage intensity of corresponding points in adjacent heartbeat cycles is also similar) for fitting and plotting. Using more voltage intensity signals (i.e., data points) makes the image more complete and accurate. Therefore, the electrocardiogram (ECG) drawn in this embodiment of the invention has high accuracy, avoiding misdiagnosis and missed diagnosis of diseases due to ECG errors. Existing technologies require additional sampling time points to achieve the same accuracy; therefore, this embodiment of the invention effectively reduces the resource waste caused by adding additional sampling time points compared to existing technologies. This embodiment of the invention uses a canvas drawing module 207 for drawing. The canvas drawing speed is fast and the accuracy is high, ensuring ECG drawing efficiency while preventing errors due to drawing techniques. In this embodiment of the invention, the sampling frequency at different locations within the same heartbeat cycle is the same or different. When the sampling frequencies at different locations within the same heartbeat cycle are different, the sampling frequency is configured such that the higher the frequency of change in the ECG signal, the higher the sampling frequency is set for each segment within the heartbeat cycle. This has the following advantages: First, it ensures that a high sampling frequency is used in segments with high electrical signal frequency changes, avoiding serious errors in the drawn ECG due to some changes not being collected, thereby improving ECG accuracy. Secondly, the sampling frequency is correspondingly reduced in segments with low electrical signal frequency changes, because these segments rarely experience uncollected changes, and a lower sampling frequency reduces resource waste. In this embodiment, the heartbeat cycle discarding module discards the voltage intensity signal corresponding to the first unfilled heartbeat cycle, avoiding inconsistent canvas drawing accuracy. Inconsistent accuracy can lead to errors in the obtained electrocardiogram and make it less intuitive. In summary, this embodiment effectively increases the accuracy of electrocardiogram drawing, avoiding misdiagnosis and missed diagnosis of diseases due to electrocardiogram errors.

[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0099] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0100] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for drawing electrocardiograms based on canvas, characterized in that, The method includes: Step S1: Real-time acquisition of electrocardiogram (ECG) signals, obtaining ECG signals corresponding to each heartbeat cycle in real time; Step S2: In response to the arrival of a new heartbeat cycle, acquire the first heartbeat cycle signal of the previous heartbeat cycle of the current heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence; Step S3: Based on the first sampling timestamp sequence, calculate the second sampling timestamp sequence corresponding to the current heartbeat cycle; wherein, within the same heartbeat cycle, the sampling frequency of each segment is set to a higher sampling frequency as the frequency of change of the electrocardiogram signal increases, and the sampling time points of the second sampling timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling cycle corresponding to the sampling frequency of their relative positions; Step S4: Repeat steps S1-S3 until the total amount of collected data reaches the preset amount of data. Step S5: In two any adjacent heartbeat cycles, fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle. Step S6: Input the voltage intensity signals corresponding to each of the filled heartbeat cycles into the canvas according to the time sequence, and draw on the canvas according to the input voltage intensity signals to obtain the required electrocardiogram corresponding to the electrocardiogram signal; Before step S2, the method further includes: Based on the characteristic points in a traditional electrocardiogram, determine the start or end point of the heartbeat cycle; Based on the start or end point of the heartbeat cycle, determine whether a new heartbeat cycle has arrived; Step S5 includes: Step S501: Within two arbitrary adjacent heartbeat cycles, determine the relative positions of each voltage intensity signal in the earlier heartbeat cycle in the later heartbeat cycle based on the positions of each voltage intensity signal in the earlier heartbeat cycle. Step S502: Fill the relative positions in the later-arriving heartbeat cycles with the voltage intensity signals from the earlier-arriving heartbeat cycles; After step S5, the method further includes: The voltage intensity signal corresponding to the first heartbeat cycle without filling is discarded to improve accuracy and avoid inconsistent canvas drawing accuracy.

2. A canvas-based electrocardiogram (ECG) drawing system, characterized in that, The system includes: a real-time acquisition module, a heartbeat cycle signal acquisition module, a second sampling timestamp sequence solving module, a repetitive work control module, a filling module, an input module, and a canvas drawing module; The real-time acquisition module is used to acquire electrocardiogram (ECG) signals in real time and obtain ECG signals corresponding to each heartbeat cycle in real time. The heartbeat cycle signal acquisition module is used to acquire the first heartbeat cycle signal of the previous heartbeat cycle in response to the arrival of a new heartbeat cycle; the first heartbeat cycle signal includes a first sampling timestamp sequence and a voltage intensity signal corresponding to the first sampling timestamp sequence. The second sampling timestamp sequence solving module is used to solve the second sampling timestamp sequence corresponding to the current heartbeat cycle based on the first sampling timestamp sequence; wherein, within the same heartbeat cycle, the sampling frequency of each segment is set to a higher sampling frequency as the frequency of change of the electrocardiogram signal increases, and the sampling time points of the second sampling timestamp sequence and the first sampling timestamp sequence have an interleaved time difference with their respective heartbeat cycles; the interleaved time difference is equal to half of the sampling cycle corresponding to the sampling frequency of their relative positions; The repetitive work control module is used to make the real-time acquisition module, the heartbeat cycle signal acquisition module and the second sampling timestamp sequence solving module work repeatedly until the total amount of acquired data reaches the preset amount of data. The filling module is used to fill the corresponding positions in the later heartbeat cycle with the voltage intensity signals from the earlier heartbeat cycle in two any adjacent heartbeat cycles. The input module is used to input the voltage intensity signals corresponding to each of the filled heartbeat cycles into the canvas drawing module according to the timing sequence. The canvas drawing module is used to draw according to the input voltage intensity signal to obtain the required electrocardiogram corresponding to the electrocardiogram signal; The system further includes: a heartbeat cycle start point determination module and a heartbeat cycle arrival judgment module; the heartbeat cycle start point determination module and the heartbeat cycle arrival judgment module operate before the heartbeat cycle signal acquisition module operates; The heartbeat cycle start point determination module is used to determine the start or end point of the heartbeat cycle based on the characteristic points in a traditional electrocardiogram. The heartbeat cycle arrival determination module is used to determine whether a new heartbeat cycle has arrived based on the start or end point of the heartbeat cycle. The filling module includes: a relative position determination submodule and a specific filling submodule; The relative position determination submodule is used to determine the relative position of each voltage intensity signal in the first heartbeat cycle in the second heartbeat cycle, based on the position of each voltage intensity signal in the first heartbeat cycle. The specific filling submodule is used to fill the voltage intensity signals of the first arriving heartbeat cycle into the relative positions of the later arriving heartbeat cycles. The system also includes a heartbeat cycle discarding module, which operates after the filling module has started working. The heartbeat cycle discarding module is used to discard the voltage intensity signal corresponding to the first heartbeat cycle without filling in order to improve accuracy and avoid inconsistent drawing accuracy of the canvas drawing module.

Citation Information

Patent Citations

  • Real-time and accurate electrocardiographic wave drawing method of smartphone platforms

    CN103549947A

  • Successive approximation type analog-to-digital converter and electrocardiosignal acquisition equipment and method

    CN108649955A

  • Heartbeat synchronized cardiac imaging

    US20150139388A1