Electrocardio waveform drawing method and device and storage medium
Through topological spatial mapping and co-modulation group analysis combined with weighted interpolation method, the problems of noise recognition and waveform recovery in ECG signal processing are solved, high-quality signal denoising and waveform reconstruction are achieved, and the accuracy and reliability of ECG signal processing are improved.
Patent Information
- Application Number
- CN202510618168.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-12
AI Technical Summary
The existing electrocardiogram signal processing technology has shortcomings in denoising and waveform recovery, especially in complex signal processing and precise recovery, and the topological characteristics of the signal cannot be effectively utilized, resulting in insufficient accuracy and reliability of the processing results.
After collecting the ECG signal and preprocessing it, it is mapped into topological space, using co-modulation group analysis to identify the noise segment, and using weighted interpolation method for waveform reconstruction, including bandpass filtering, standardization, building local neighborhoods, calculating adjacency matrix and co-modulation group, identifying the connectivity of the signal and significant waveform changes, eliminating noise and restoring key waveforms.
Significantly improve signal quality, ensure that the signal retained after the interference is removed is more accurate, can smooth and restore the key waveform characteristics of the ECG, improve the accuracy and reliability of ECG analysis, and is more effective in diagnosing complex heart diseases.
Smart Images

Figure CN120472042A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram signal processing, and in particular to an electrocardiogram waveform drawing method, device and storage medium. Background Art
[0002] Existing ECG signal processing techniques primarily rely on traditional filtering methods, such as low-pass, high-pass, and bandpass filters, to remove noise from the signal. These methods typically eliminate unwanted interference by limiting the frequency range. However, they often fail to effectively distinguish useful signal components from noise, which can cause signal distortion, particularly in complex environments or in the presence of strong noise. Traditional denoising methods, often based on simple threshold settings for amplitude and frequency range, fail to fully consider the signal's local structure and time-domain characteristics, leading to loss of ECG signal details or misjudgment.
[0003] Furthermore, existing waveform reconstruction methods often ignore the global topological structure of the signal and rely too heavily on traditional interpolation techniques. These techniques often suffer from oversmoothing or loss of detail when processing waveforms with strong noise components or irregular waveforms. Therefore, while existing technologies can accomplish signal denoising and waveform reconstruction tasks to a certain extent, they still face significant limitations in processing and accurately restoring complex signals. This is particularly true in the diagnosis of complex heart conditions, where insufficient processing accuracy can impact clinical decision-making.
[0004] Therefore, existing technologies have certain deficiencies in noise identification and removal, waveform recovery, etc., especially when performing high-precision analysis of complex electrocardiogram signals. They are unable to fully utilize the topological characteristics of the signal to distinguish between valid signals and noise, which leads to insufficient accuracy and reliability of the processing results. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention provides an ECG waveform drawing method, device and storage medium, which solve the problems of poor ECG signal denoising effect, inaccurate waveform recovery and difficulty in effectively analyzing complex signal topology structures in the existing technology.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for drawing an electrocardiogram waveform, comprising the following steps:
[0007] Collecting and preprocessing electrocardiogram signals, wherein the signals are a series of time series data;
[0008] Mapping the preprocessed electrocardiogram signal into a topological space, and analyzing the topological characteristics of the electrocardiogram signal by calculating the homology group;
[0009] Based on the results of topological group analysis, noise segments are identified and removed;
[0010] The waveform of the signal after noise removal is reconstructed, and the weighted interpolation method is used to smooth the signal and restore the waveform;
[0011] Output the reconstructed ECG waveform.
[0012] Preferably, the step of collecting the electrocardiogram signal includes collecting the electrocardiogram signal within a sampling frequency range of 1 kHz to 10 kHz by an electrocardiogram device, wherein the electrocardiogram signal is a plurality of time series data points.
[0013] Preferably, the pretreatment step comprises:
[0014] The collected electrocardiogram signal is subjected to bandpass filtering, where the frequency band of the bandpass filter is set to 0.5 Hz to 50 Hz to remove high-frequency noise and low-frequency drift in the signal;
[0015] The denoised signal is normalized so that the signal amplitude meets the predetermined range.
[0016] Preferably, the step of mapping the preprocessed electrocardiogram signal into a topological space includes:
[0017] Represent the ECG signal as a set of discrete time series data points ;
[0018] For each data point Building a local neighborhood , the local neighborhood includes the current data point and the data points in the time window before and after it, and the time window size is , the local neighborhood is defined as:
[0019]
[0020] in, For the The local neighborhood of the sampling points, Indicates the The timestamp of each data point, is the width of the local time window;
[0021] Define the adjacency relationship between data points through the adjacency matrix Indicates that two data points are considered adjacent if their differences in amplitude and time satisfy the following conditions:
[0022]
[0023] in, is the first Rank Elements of the column, representing data points and The connection relationship between is the tolerance threshold of signal amplitude difference, is the time difference of the data points, is the time difference threshold.
[0024] Preferably, the step of analyzing the topological features of the electrocardiogram signal by calculating the coherence group includes:
[0025] Based on the constructed adjacency matrix Forming the topological space of the signal , and calculate its homology group , used to analyze signal connectivity and significant changes;
[0026] Compute 0-homology group To identify connected components in a signal, the dimension of the 0-homology group reflects the continuity of the signal;
[0027] Calculation 1-Homology Group To identify significant waveform changes in the signal, the coherence group calculation formula is:
[0028]
[0029] in, is a topological space exist The homology group on dimension, for -WeChain Group, for -dimensional boundary group, is the dimension of the homology group.
[0030] Preferably, the step of identifying and removing noise segments based on the topological group analysis results includes:
[0031] Analyze the topological features of the ECG signal obtained through coherence group calculation to identify signal connectivity and significant waveform changes;
[0032] For each signal in the time window, calculate the 0-homology group If the dimension is less than the set threshold , then the signal segment corresponding to the time window is determined to be noise, and the judgment conditions are:
[0033] like , then the signal segment is noise;
[0034] in, is the dimension of the 0-homology group, is the preset connectivity threshold.
[0035] Preferably, the step of identifying and removing noise segments based on the topological group analysis results further includes:
[0036] Perform boundary detection on the signal segments identified as noise and calculate the 1-homology group If there is a significant 1-homology group structure in the noise segment, that is, Greater than the set threshold , then the signal segment is retained as a valid signal, otherwise it is discarded. The judgment condition is:
[0037] like , then keep the signal segment as a valid signal;
[0038] in, is the dimension of the 1-homology group, is the threshold for significant change.
[0039] Preferably, the step of reconstructing the waveform of the signal after noise removal includes:
[0040] Select the valid signal points after removing the noise;
[0041] Use weighted interpolation to smooth the signal and calculate the target time point The signal amplitude , the interpolation formula is:
[0042]
[0043] in, For the The weight of the sampling points satisfies ;
[0044] The weight According to the distance between the target time point and the sampling point, the weight calculation formula is:
[0045]
[0046] in, Indicates the target time point With sampling point The time distance between them.
[0047] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method when executing the computer program.
[0048] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0049] The present invention provides a method, device, and storage medium for drawing an electrocardiogram waveform. The invention has the following beneficial effects:
[0050] 1. This invention combines topological group analysis with the use of 0-coherence groups and 1-coherence groups to effectively distinguish noise from valid waveforms in electrocardiogram (ECG) signals. By accurately identifying and removing noise segments, signal quality can be significantly improved, ensuring that the remaining signal after removing interference factors is more accurate and avoiding the signal distortion common in traditional signal processing methods.
[0051] 2. This invention uses weighted interpolation to reconstruct the waveform of the denoised signal, smoothing the signal and restoring key ECG waveform features, such as the P wave, QRS complex, and T wave. This method optimizes the interpolation process by taking local rates of change into account, ensuring waveform smoothness and accuracy. It excels in recovering complex waveforms and detail.
[0052] 3. By constructing a topological space and calculating homology groups, this method comprehensively analyzes the topological characteristics of ECG signals, including signal connectivity and significant variations. This method not only captures the overall signal trend but also accurately identifies important changes within the signal, helping to improve the accuracy of ECG analysis, especially in diagnosing complex heart diseases.
[0053] 4. Unlike traditional frequency-based noise suppression methods, this invention uses coherence group analysis to identify and eliminate noise from multiple dimensions. Combining 0-coherence group and 1-coherence group analysis, it effectively identifies and retains noise segments containing significant waveform variations, further improving the reliability and accuracy of signal processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Schematic diagram of the method flow of the present invention;
[0055] Figure 2 Schematic diagram of the computer device structure of the present invention.
[0056] Among them, 40, computer equipment; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the present specification. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0058] The present invention provides an ECG waveform drawing method, which aims to improve the waveform reconstruction quality of ECG signals, accurately remove noise, and restore the true ECG waveform by combining the homology theory of algebraic topology and modern signal processing technology.
[0059] like Figure 1 As shown, the ECG waveform drawing method may include the following steps:
[0060] S1, collecting and preprocessing electrocardiogram signals, wherein the signals are a series of time series data;
[0061] S2. Mapping the preprocessed electrocardiogram signal into a topological space, and analyzing the topological features of the electrocardiogram signal by calculating the homology group;
[0062] S3. Based on the topological group analysis results, identify and remove noise segments;
[0063] S4, reconstructing the waveform of the signal after noise removal, smoothing the signal and restoring the waveform using a weighted interpolation method;
[0064] S5. Output the reconstructed ECG waveform.
[0065] The following is a detailed description of each step in the method of the present invention, which comprehensively explains the specific implementation principles, technical details and processes of each step.
[0066] Regarding step S1, in this embodiment, step S1 includes collecting and preprocessing the electrocardiogram signal. Specifically, this step first collects a series of time series data through the electrocardiogram device, which represents the time evolution of the electrocardiogram signal. The acquisition of the electrocardiogram signal generally adopts a sampling frequency of 1kHz to 10kHz to ensure that sufficient signal details are captured. For example, the electrocardiogram device detects the electrical activity of the heart through electrodes and converts these electrical signals into time series data. Each time point corresponds to a signal amplitude. These amplitudes constitute the basic data set of the electrocardiogram signal.
[0067] The acquired signal is usually presented as a discrete time series data set , where each data point The corresponding signal at time point The time point and amplitude of the signal are obtained in real time by the electrocardiogram device, ensuring the timeliness and accuracy of the sampling data.
[0068] Collected ECG signals often contain various types of noise, including power supply interference, myoelectric noise, and baseline drift. To ensure the effectiveness and accuracy of subsequent processing, the collected signals must be preprocessed. In this paper, a bandpass filter is used to preprocess the signals, removing high-frequency noise and low-frequency drift, thereby minimizing signal interference during subsequent analysis.
[0069] The frequency band of the bandpass filter is set to 0.5Hz to 50Hz, which is sufficient to remove common ECG signal noise while retaining the effective physiological information in the ECG. The transfer function of the bandpass filter is:
[0070]
[0071] in, and are the low and high frequency cutoff frequencies, respectively, is a complex frequency variable. This transfer function attenuates signal components outside the filter's frequency range, effectively removing unnecessary noise from the signal.
[0072] After denoising, the signal undergoes further normalization. This process aims to ensure that the ECG signal amplitude range conforms to a predetermined standard, facilitating subsequent signal analysis and processing. Specifically, normalization can be performed by normalizing each data point so that the maximum value is 1 and the minimum is -1, or by using other normalization methods to ensure that the signal is within a reasonable range, thereby reducing processing errors caused by inconsistent signal amplitudes.
[0073] In this embodiment, through the above preprocessing steps, a set of filtered and normalized electrocardiogram signals are obtained. These signal data provide clear and denoised basic signals for subsequent topological modeling and coherence group analysis.
[0074] Regarding step S2, in this embodiment, step S2 includes mapping the preprocessed ECG signal into a topological space and analyzing the signal's topological characteristics by calculating the coherence group. Specifically, this step constructs the signal's topological space, providing an effective data structure for subsequent noise removal and waveform reconstruction.
[0075] First, the ECG signal is represented as a set of discrete time series data points ,in For the The signal amplitude of the sampling point, The time point and amplitude corresponding to each signal point constitute the basic information of the signal.
[0076] Then, in order to better capture the local characteristics of the signal, this step is for each sampling point Constructing a local neighborhood The local neighborhood includes the current data point And the data points in a certain time window before and after it, the size of the time window is determined by Specifically, the local neighborhood is defined as:
[0077]
[0078] in, Indicates the The local neighborhood of the sampling points, It is The timestamp of each data point, is the width of the local time window. In this way, each sampling point of the signal not only considers its own information, but also combines the data in its adjacent time period, thereby capturing the local changes of the signal more accurately.
[0079] Next, in this embodiment, by constructing the adjacency matrix To define the adjacency relationship between data points. Each element of the adjacency matrix Represents data points and Are they adjacent? If the difference in the amplitude of the two data points is less than the set tolerance threshold , and the time difference is also less than the time difference threshold , then they are considered adjacent, the adjacency matrix The corresponding element value in is 1; otherwise, it is 0. The specific definition is as follows:
[0080]
[0081] in, is the adjacency matrix Middle Rank Elements of the column, representing data points and The connection relationship between is the tolerance threshold of signal amplitude difference, is the time difference, is the time difference threshold. The adjacency matrix can effectively describe the relationship and connectivity between each sampling point in the signal.
[0082] By calculating the adjacency matrix , this step further constructs the topological space of the signal In topological space On the other hand, by calculating the homology group To analyze the topological characteristics of the signal. Specifically, the coherence group can reflect the connectivity and significant waveform changes in the signal. Calculating the 0-coherence group and 1-coherence group based on different topological characteristics is the core of this step.
[0083] 0-homology group :Used to identify the connected components of the signal, indicating whether the signal is continuous. The dimension of can be used to understand the continuity of the signal. When it is higher, it means that the signal is more consistent during that period of time.
[0084] 1-Homology Group : It is used to identify significant waveform changes in the signal, especially the peaks and troughs in the waveform, such as the P wave, QRS wave and T wave in the electrocardiogram. The dimension can capture the key changes in the signal.
[0085] homology group The calculation formula is:
[0086]
[0087] in, Representing a topological space exist The homology group on dimension, for -WeChain Group, for -dimensional boundary group. By calculating the homology group, we can deeply analyze the topological characteristics of the ECG signal and help identify the key structures of the waveform.
[0088] This step can effectively capture the connectivity and significant waveform changes in the ECG signal by constructing a topological space and calculating the homology group, providing the necessary topological information and feature support for subsequent steps such as noise removal and waveform reconstruction.
[0089] In this embodiment, step S3 includes identifying and removing noise segments based on the topological group analysis results. Specifically, this step analyzes the topological characteristics of the ECG signal, particularly by calculating the coherence group to obtain signal connectivity and significant waveform variations. This determines which signal segments contain noise and removes these noise segments to ensure the accuracy and reliability of subsequent processing.
[0090] In this step, we first analyze the connectivity of the signal using the topological group analysis results obtained in step S2. Specifically, we calculate the 0-homology group Dimensions to identify connected components in the signal. 0-homology group It is mainly used to describe the continuity of the signal. If a certain signal has a 0-homology group dimension within a certain time window, Less than the set threshold , then the signal segment will be judged as noise. Noise segments usually indicate that the signal has a large interruption or lacks sufficient connectivity, which may be caused by factors such as device interference and sensor problems. The specific judgment conditions are:
[0091] like , then the signal segment is noise;
[0092] in, represents the dimension of the 0-homology group, reflecting the connectivity of the signal, is the preset connectivity threshold. By setting a reasonable threshold , which can ensure the effective identification of noise segments and avoid misjudging valid signals as noise.
[0093] Once the noise segments are identified, they are further processed. Specifically, the 1-homology group To perform boundary detection. 1-coherence groups reflect the structure of significant changes in the signal, especially in electrocardiogram signals, which usually correspond to the peaks and troughs of the waveform (such as P wave, QRS wave and T wave, etc.). If the dimension of the 1-coherence group is within the signal segment that is judged to be noise, Greater than the set threshold , then the signal segment is considered to contain valid waveform features and should be retained. The specific judgment conditions are:
[0094] like , then keep the signal segment as a valid signal;
[0095] in, is the dimension of the 1-homology group, representing the characteristics of significant changes in the signal, By using this method, even if some signal segments have weak connectivity due to noise interference, as long as the signal still shows significant waveform changes, these signal segments can be retained for subsequent analysis.
[0096] If there is no significant 1-homology group structure in the noise segment, that is, Less than threshold , then the signal segment will be removed. Through this method, this step can effectively distinguish the effective components and noise components in the signal, avoiding the signal distortion problem that may be caused by simple frequency domain or time domain filtering methods.
[0097] This noise removal method based on coherence group analysis is highly adaptable and accurate. By simultaneously considering signal connectivity and significant waveform variations, it can identify and retain signal segments that contain valid diagnostic information despite the presence of noise. Compared with traditional signal processing methods, coherence group analysis can more accurately extract key features of ECG signals, improving the quality of signal processing and subsequent waveform reconstruction.
[0098] In this embodiment, step S4 involves waveform reconstruction of the de-noised signal, smoothing the signal using weighted interpolation to restore the waveform. Specifically, this step aims to preserve the valid waveform features of the ECG as much as possible while ensuring noise removal. This step is achieved by smoothing the ECG signal using an interpolation algorithm to restore a complete and accurate waveform.
[0099] First, in this step, the ECG signal after noise removal is used as the input signal. Each signal point Still represents the ECG signal at the corresponding time point The amplitude on .
[0100] To reconstruct the waveform, this embodiment uses a weighted interpolation method. The weighted interpolation method combines the information of known sampling points and performs interpolation calculations based on the target time point. Specifically, for each target time point , calculate the signal amplitude corresponding to the time point The basic formula for weighted interpolation is:
[0101]
[0102] in, It is The amplitude of the denoised sampling points, is the corresponding weight, indicating the Sampling points to target time point The weight is calculated based on the time distance between the target time point and the sampling point. Specifically, the weight The calculation is inversely proportional to the time distance, ensuring that sampling points closer to the target time point have a greater impact on the interpolation result, while sampling points farther away have a smaller impact. The weight calculation formula is:
[0103]
[0104] in, Indicates the target time point With sampling point By using this weighted interpolation method, the signal value at the target time point is smoothly interpolated.
[0105] It should be pointed out that in actual implementation, in order to avoid possible fluctuations or over-smoothing during interpolation, the weights used are Normalization can also be performed. Normalization can be performed using the following formula:
[0106]
[0107] Through this normalization process, the sum of all weight values is ensured to be 1, thereby ensuring the stability of the interpolation result.
[0108] Furthermore, to further enhance the waveform reconstruction, this embodiment can also optimize the interpolation process based on the local rate of change of the signal. Specifically, when the signal changes dramatically over a period of time, the interpolation weight for that section of the signal can be appropriately increased to retain more information about the change; whereas, in relatively stable sections of the signal, the weight can be reduced to avoid loss of detail caused by excessive interpolation. This allows the interpolation method to not only restore the overall shape of the signal but also effectively preserve the details of the electrocardiogram, particularly key signals such as the QRS wave, P wave, and T wave.
[0109] The weighted interpolation method described above smooths and reconstructs the de-noised ECG signal. This step restores the complete ECG waveform and avoids signal loss or distortion caused by the noise removal process. This process ensures the accuracy of subsequent signal analysis and diagnosis, providing higher-quality ECG data, especially in scenarios requiring further automated analysis.
[0110] Regarding step S5, in this embodiment, step S5 includes outputting the reconstructed ECG waveform for further analysis and clinical diagnosis. Specifically, after noise removal and waveform reconstruction, the resulting ECG signal is output via a suitable display system and can serve as one of the key data in the ECG diagnostic process.
[0111] First, in step S4, the signal, smoothed and restored using weighted interpolation, is further processed to ensure waveform stability and integrity. At this point, the reconstructed signal has been free of noise and has restored key ECG waveform features. This reconstructed waveform reflects the true state of cardiac electrical activity and is crucial data for clinicians to rely on for diagnosis.
[0112] In step S5, the reconstructed signal is output to a display device or analysis system. The display device can be a traditional ECG display or a modern digital screen, providing a visual display of the ECG. The displayed waveform should clearly show the basic ECG waveforms, such as the P wave, QRS complex, and T wave, and be able to display the overall ECG trend to help doctors better understand the electrophysiological state of the heart.
[0113] For example, an ECG device can display reconstructed waveform data through a graphical interface. The display system automatically adjusts the waveform display range, amplitude, and time axis based on the device configuration, ensuring that the ECG display meets medical standards. The display interface typically presents a series of waveforms with time stamps, clearly showing important features such as peaks, troughs, and baselines of each waveform.
[0114] In some embodiments, the reconstructed waveform output is not limited to graphical display but may also be combined with other physiological data to provide further detailed diagnostic information. For example, by combining ECG data with physiological indicators such as heart rate and blood pressure, doctors can obtain a more comprehensive analysis of the condition.
[0115] Furthermore, the output step may include storing the reconstructed ECG waveform in a standardized format in a database to facilitate subsequent historical data retrieval, comparison, and remote consultation. Saving the reconstructed waveform and comparing it with other relevant patient data can help doctors monitor heart health over the long term, providing data support for follow-up and early warning.
[0116] Ultimately, the purpose of the output step is to ensure that the ECG data processed by the present method is presented in high-quality form, facilitating detailed analysis and diagnosis by clinicians. This high-quality signal output significantly improves the accuracy and efficiency of the diagnostic process, providing patients with reliable ECG information and supporting further treatment decisions.
[0117] In general, the present invention achieves efficient denoising, accurate reconstruction and waveform recovery of electrocardiogram signals by combining the homology group analysis technology in algebraic topology. The method includes collecting the electrocardiogram signal and performing preprocessing, using topological space mapping and homology group analysis to identify the connectivity and significant waveform changes of the signal, thereby removing noise and retaining the valid signal part. The denoised signal is smoothed and the waveform is reconstructed by weighted interpolation, and the reconstructed electrocardiogram waveform is finally output. This method can effectively remove noise, restore key waveform features in the electrocardiogram, and provide high-quality signal output, enhancing the accuracy and stability of electrocardiogram signal processing, and has broad clinical application prospects.
[0118] Please see the attached Figure 2The present invention further provides a computer device 40, comprising: a processor 41 and a memory 42, wherein the memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, the above method is performed.
[0119] The present invention further provides a storage medium 43 on which a computer program is stored. When the computer program is run by the processor 41 , the above method is executed.
[0120] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0121] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for drawing an electrocardiogram waveform, characterized in that: The following steps are involved: Collecting and preprocessing electrocardiogram signals, wherein the signals are a series of time series data; Mapping the preprocessed electrocardiogram signal into a topological space, and analyzing the topological characteristics of the electrocardiogram signal by calculating the homology group; Based on the results of topological group analysis, noise segments are identified and removed; The waveform of the signal after noise removal is reconstructed, and the weighted interpolation method is used to smooth the signal and restore the waveform; Output the reconstructed ECG waveform.
2. The method for drawing an electrocardiogram waveform according to claim 1, wherein: The step of collecting the electrocardiogram signal includes collecting the electrocardiogram signal within a sampling frequency range of 1 kHz to 10 kHz by an electrocardiogram device, wherein the electrocardiogram signal is a plurality of time series data points.
3. The method for drawing an electrocardiogram waveform according to claim 2, wherein: The pre-processing step comprises: The collected electrocardiogram signal is subjected to bandpass filtering, where the frequency band of the bandpass filter is set to 0.5 Hz to 50 Hz to remove high-frequency noise and low-frequency drift in the signal; The denoised signal is normalized so that the signal amplitude meets the predetermined range.
4. The electrocardiogram waveform drawing method according to claim 1, wherein: The step of mapping the preprocessed electrocardiogram signal into a topological space comprises: Represent the ECG signal as a set of discrete time series data points ; For each data point Building a local neighborhood , the local neighborhood includes the current data point and the data points in the time window before and after it, and the time window size is , the local neighborhood is defined as: in, For the The local neighborhood of the sampling points, Indicates the The timestamp of each data point, is the width of the local time window; Define the adjacency relationship between data points through the adjacency matrix Indicates that two data points are considered adjacent if their differences in amplitude and time satisfy the following conditions: in, is the first Rank Elements of the column, representing data points and The connection relationship between is the tolerance threshold of signal amplitude difference, is the time difference of the data points, is the time difference threshold.
5. The ECG waveform drawing method according to claim 4, characterized in that: The step of analyzing the topological features of the electrocardiogram signal by calculating the coherence group comprises: Based on the constructed adjacency matrix Forming the topological space of the signal , and calculate its homology group , used to analyze signal connectivity and significant changes; Compute 0-homology group To identify connected components in a signal, the dimension of the 0-homology group reflects the continuity of the signal; Calculation 1-Homology Group To identify significant waveform changes in the signal, the coherence group calculation formula is: in, is a topological space exist The homology group on dimension, for -WeChain Group, for -dimensional boundary group, is the dimension of the homology group.
6. The electrocardiogram waveform drawing method according to claim 1, characterized in that: The step of identifying and removing noise segments based on the topological group analysis results includes: Analyze the topological features of the ECG signal obtained through coherence group calculation to identify signal connectivity and significant waveform changes; For each signal in the time window, calculate the 0-homology group If the dimension is less than the set threshold , then the signal segment corresponding to the time window is determined to be noise, and the judgment conditions are: like , then the signal segment is noise; in, is the dimension of the 0-homology group, is the preset connectivity threshold.
7. The method for drawing an electrocardiogram waveform according to claim 6, wherein: The step of identifying and removing noise segments based on the topological group analysis results further includes: Perform boundary detection on the signal segments identified as noise and calculate the 1-homology group If there is a significant 1-homology group structure in the noise segment, that is, Greater than the set threshold , then the signal segment is retained as a valid signal, otherwise it is discarded. The judgment condition is: like , then keep the signal segment as a valid signal; in, is the dimension of the 1-homology group, is the threshold for significant change.
8. The electrocardiogram waveform drawing method according to claim 1, characterized in that: The step of reconstructing the waveform of the signal after noise removal comprises: Select the valid signal points after removing the noise; Use weighted interpolation to smooth the signal and calculate the target time point The signal amplitude , the interpolation formula is: in, For the The weight of the sampling points satisfies ; The weight According to the distance between the target time point and the sampling point, the weight calculation formula is: in, Indicates the target time point With sampling point The time distance between them.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Methods and systems for engineering wavelet-based features from biophysical signals for use in characterizing physiological systems
CA3229058A1
Heart disease computer-aided classification method based on continuous coherence and Fourier transform
CN114287950A
Time sequence abnormity intelligent detection method based on topology persistence spectrum theory
CN118940185A
Electrocardiogram waveform display and analysis system and method
CN119587039A