Electrocardiosignal interference removal method and device, denoising system and storage medium
By comparing and correcting the ECG signal's open operation results and closed operation results, the problem of difficulty in ensuring the trueness of the signal in the prior art is solved, and the effect of retaining signal characteristics while removing noise is achieved.
Patent Information
- Application Number
- CN202510298373.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-20
AI Technical Summary
In the process of removing interference from electrocardiogram signals, it is difficult to ensure the authenticity of the signal, especially when the effective signal and the noise frequency band overlap.
By obtaining the real-time ECG signal and the filtering results of the ECG signal at the previous moment, the opening and closing operation results of the real-time ECG signal are determined, and the difference value and threshold value are compared, and the appropriate result is selected as the target ECG signal, or the weighted operation results and closed operation results are processed.
It effectively avoids signal distortion, improves the signal authenticity of the target ECG signal, and ensures that the characteristics of the effective signal are retained while removing noise.
Smart Images

Figure CN120167974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram (ECG) signal processing, and particularly to a method, device, denoising system and computer-readable storage medium for removing interference from ECG signals. Background Art
[0002] In ECG signal processing, the frequency ranges of the effective signals (such as ECG waveforms) and the noises (such as baseline drift and electromyogram interference) often have a large overlap, which makes it more difficult to apply morphological filtering in ECG signal processing. Also, due to the characteristics of low signal-to-noise ratio and susceptibility to interference of ECG signals, the difficulty of filtering is further increased.
[0003] In order to improve the performance and adaptability of morphological filtering in processing signals with overlapping frequency bands, the existing technology mainly performs morphological operations on ECG signals at different scales by improving the morphological filtering algorithm to better capture different features of the signals, so as to highlight the features of the ECG signals. However, since there is an overlap between the effective signal frequency band and the noise signal frequency band, it is obviously difficult to ensure the fidelity of the effective signal while effectively removing the noise based on the same improved morphological filtering algorithm.
[0004] Therefore, in the process of removing interference from ECG signals in the prior art, there is a problem that it is difficult to ensure the authenticity of the signals. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, device, denoising system and computer-readable storage medium for removing interference from ECG signals to solve the problem in the prior art that it is difficult to ensure the authenticity of the signals in the process of removing interference from ECG signals.
[0006] To solve the above problems, in a first aspect, the present invention provides a method for removing interference from ECG signals, including: Obtaining the real-time ECG signal at the current moment and the filtering result of the ECG signal at the previous moment; Determining the opening operation result and the closing operation result of the real-time ECG signal; When the difference between the opening operation result and the closing operation result is greater than a first threshold, using the real-time ECG signal as the target ECG signal after interference removal; When the difference between the opening operation result and the filtering result is greater than a second threshold, using the closing operation result as the target ECG signal; When the difference between the closing operation result and the filtering result is greater than the second threshold, using the opening operation result as the target ECG signal; Otherwise, using the weighted sum of the opening operation result and the closing operation result as the target ECG signal.
[0007] In a possible implementation, when the weighted sum of the opening operation result and the closing operation result is used as the target electrocardiogram (ECG) signal, the weights of the opening operation result and the closing operation result are the same.
[0008] In a possible implementation, determining the opening operation result and the closing operation result of the real-time ECG signal includes: Constructing a structural element sequence of the real-time ECG signal; Based on the structural element sequence, performing erosion operations and dilation operations on the real-time ECG signal in sequence to obtain the opening operation result; Based on the structural element sequence, performing dilation operations and erosion operations on the real-time ECG signal in sequence to obtain the closing operation result.
[0009] In a possible implementation, after determining the target ECG signal, it further includes: Setting a quantization level and performing quantization and discretization processing on the target ECG signal based on the quantization level to obtain a quantized wave signal; Performing sliding de-jitter processing on the quantized wave signal to obtain a de-noised ECG signal.
[0010] In a possible implementation, setting a quantization level and performing quantization and discretization processing on the target ECG signal based on the quantization level to obtain a quantized wave signal includes: Constructing a rounding function including the quantization level; Calculating the quantization results of the target ECG signal in sequence according to the rounding function, and determining the quantized wave signal based on the quantization results.
[0011] In a possible implementation, the calculation formula of the rounding function is:
[0012] where is the quantization result, is the rounding function, is the target ECG signal, is the quantization level.
[0013] In a possible implementation, performing sliding de-jitter processing on the quantized wave signal to obtain a de-noised ECG signal includes: Passing through the quantized wave signal based on the de-jitter window in sequence, and determining whether there are values at other positions equal to the first value in the de-jitter window; When there is a second value equal to the first value in the de-jitter window and the difference between the extreme values of the values at other positions between the second value and the first value is less than the de-jitter threshold, it is determined that there is data jitter in the de-jitter window, and the values at other positions between the second value and the first value are revised to the magnitude of the first value; When there is no second value equal to the first value in the debounce window, it is determined that there is no data jitter in the debounce window; Wherein, the first value refers to the value at the first position of the debounce window; the second value refers to a value other than the first position in the debounce window and equal to the first value.
[0014] In a second aspect, the present invention further provides an interference removal device for electrocardiogram signals, including: A filtering module for obtaining the real-time electrocardiogram signal at the current moment and the filtering result of the electrocardiogram signal at the previous moment; A morphological operation module for determining the opening operation result and the closing operation result of the real-time electrocardiogram signal; A comparison module for taking the real-time electrocardiogram signal as the target electrocardiogram signal after interference removal when the difference between the opening operation result and the closing operation result is greater than a first threshold; When the difference between the opening operation result and the filtering result is greater than a second threshold, taking the closing operation result as the target electrocardiogram signal; When the difference between the closing operation result and the filtering result is greater than a second threshold, taking the opening operation result as the target electrocardiogram signal; Otherwise, taking the weighted sum of the opening operation result and the closing operation result as the target electrocardiogram signal.
[0015] In a third aspect, the present invention further provides an electrocardiogram signal denoising system, including a memory and a processor, wherein, The memory is used for storing programs; The processor is coupled to the memory and is used for executing the programs stored in the memory to implement the steps in the above-mentioned interference removal method for electrocardiogram signals.
[0016] In a fourth aspect, the present invention further provides a computer-readable storage medium for storing computer-readable programs or instructions, and when the programs or instructions are executed by a processor, the steps in the above-mentioned interference removal method for electrocardiogram signals can be implemented.
[0017] The beneficial effects of adopting the above embodiments are as follows: The present invention provides a method for removing interference from electrocardiogram (ECG) signals. By using the filtering result of the ECG signal at the previous moment as a reference standard, the opening operation result and the closing operation result of the real-time ECG signal are compared twice. When the difference between the opening operation result and the closing operation result is greater than the first threshold, it indicates that the opening and closing operation results deviate severely. Therefore, the real-time ECG signal needs to be used as the target ECG signal to avoid distortion of the target ECG signal. When the difference between the opening operation result and the filtering result is greater than the second threshold, it indicates that the reliability of the opening operation result is low. Therefore, the closing operation result needs to be used as the target ECG signal. When the difference between the closing operation result and the filtering result is greater than the second threshold, it indicates that the reliability of the closing operation result is low. Therefore, the opening operation result needs to be used as the target ECG signal. In other cases, it indicates that neither the opening operation result nor the closing operation result shows obvious deviation. Therefore, the weighted sum of the opening operation result and the closing operation result is used as the target ECG signal. The present application corrects the opening and closing operation results of the ECG signal to avoid signal distortion problems, thereby ensuring the signal authenticity of the target ECG signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic flowchart of an embodiment of the method for removing interference from the electrocardiogram signal provided by the present invention; Figure 2 It is a schematic flowchart of an embodiment of determining the opening operation result and the closing operation result of the real-time electrocardiogram signal provided by the present invention; Figure 3 It is a schematic flowchart of an embodiment of improving the display effect of the electrocardiogram signal provided by the present invention; Figure 4 It is a schematic flowchart of an embodiment of obtaining a quantization wave signal provided by the present invention; Figure 5 It is a schematic flowchart of an embodiment of obtaining an interference-removed electrocardiogram signal provided by the present invention; Figure 6 It is a schematic diagram of the result of an embodiment of removing interference from the real-time electrocardiogram signal provided by the present invention; Figure 7 It is a schematic structural diagram of an embodiment of the device for removing interference from the electrocardiogram signal provided by the present invention; Figure 8 It is a schematic block diagram of an embodiment of the electrocardiogram signal denoising system provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0020] It should be understood that the schematic drawings are not drawn to scale. The flowcharts used in the present invention illustrate the operations implemented according to some embodiments of the present invention. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context relationships may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present invention. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor systems and / or microcontroller systems.
[0021] The descriptions such as "first" and "second" involved in the embodiments of the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Therefore, the technical features defined with "first" and "second" may explicitly or implicitly include at least one such feature.
[0022] Referring to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0023] Before presenting the embodiments, the morphological filtering is defined as follows: Morphological filtering is a non-linear signal processing technique that uses specific structural elements to perform operations such as erosion, dilation, opening operation, and closing operation on the signal, so as to extract specific forms or waveforms in the signal.
[0024] In order to solve the problem that it is difficult to ensure the signal authenticity in the process of removing interference from electrocardiogram (ECG) signals in the prior art, the present invention provides a method, device, denoising system, and computer-readable storage medium for removing interference from ECG signals, which will be described in detail below.
[0025] As Figure 1As shown Figure 1 FIG. is a schematic flowchart of an embodiment of the method for removing interference from electrocardiogram signals provided by the present invention, including: S101: Obtain the real-time electrocardiogram signal at the current moment and the filtering result of the electrocardiogram signal at the previous moment; In some embodiments of the present invention, the electrocardiogram signal is an electrical signal generated by the heart during its operation, which records the electrical activities of the contraction and relaxation of the heart muscle. These electrical signals reflect the activity status of the cardiac pacemaker cells and the conduction system, and are one of the important indicators for evaluating cardiac function and health status. Specifically, the electrocardiogram signal is usually recorded and displayed through an electrocardiogram (ECG). An electrocardiogram is a graphical representation of the electrical activities of the heart, which can show the electrical activities of various parts of the heart, including the depolarization and repolarization processes of the atria and ventricles. By analyzing the waveforms and parameters on the electrocardiogram, medical professionals can evaluate cardiac function, detect heart diseases, and perform clinical diagnosis and monitoring.
[0026] In some embodiments of the present invention, the filtering result of the electrocardiogram signal at the previous moment refers to the reliable result after removing interference from the electrocardiogram signal at the previous moment point relative to the current moment point of the real-time electrocardiogram signal. In particular, when there is no electrocardiogram signal at the previous moment, the filtering result of the electrocardiogram signal at the previous moment takes a value of zero.
[0027] S102: Determine the opening operation result and the closing operation result of the real-time electrocardiogram signal; In some embodiments of the present invention, the opening operation is a mathematical morphology operation. The result of the opening operation is a signal that has been smoothed, and the small noises and protrusions in the upward direction have been removed. In electrocardiogram signal processing, this means that the opening operation helps to reduce high-frequency noise and smooth the signal, but at the same time suppresses the main features such as the P wave, QRS complex, and T wave in the upward direction.
[0028] In some embodiments of the present invention, the closing operation is another basic operation in mathematical morphology. Contrary to the opening operation, the result of the closing operation is a processed signal, and the small noises and depressions in the downward direction have been removed. In electrocardiogram signal processing, this means that the closing operation also helps to reduce high-frequency noise and smooth the signal, but at the same time suppresses the main features such as the P wave, QRS complex, and T wave in the downward direction.
[0029] S103: When the difference between the opening operation result and the closing operation result is greater than the first threshold, use the real-time electrocardiogram signal as the target electrocardiogram signal after removing interference; In some embodiments of the present invention, by setting the first threshold as an evaluation of the deviation degree of the opening and closing operation results of the electrocardiogram signal, the opening and closing results are adaptively corrected, thereby improving the reliability of the target electrocardiogram signal.
[0030] S104: When the difference between the result of the opening operation and the result of the filtering is greater than the second threshold, use the result of the closing operation as the target ECG signal; In some embodiments of the present invention, the first threshold is preferably twice the second threshold. In other embodiments, the magnitudes of the first threshold and the second threshold can also be adjusted according to actual needs to achieve more refined screening.
[0031] S105: When the difference between the result of the closing operation and the result of the filtering is greater than the second threshold, use the result of the opening operation as the target ECG signal; S106: Otherwise, use the weighted sum of the result of the opening operation and the result of the closing operation as the target ECG signal.
[0032] It should be noted that the first threshold is greater than the second threshold.
[0033] In this embodiment, taking the filtering result of the previous moment's ECG signal as the reference standard, the results of the opening operation and the closing operation of the real-time ECG signal are compared twice. When the difference between the result of the opening operation and the result of the closing operation is greater than the first threshold, it indicates that the results of the opening and closing operations deviate severely. Therefore, the real-time ECG signal needs to be used as the target ECG signal to avoid distortion of the target ECG signal. When the difference between the result of the opening operation and the result of the filtering is greater than the second threshold, it indicates that the reliability of the result of the opening operation is low. Therefore, the result of the closing operation needs to be used as the target ECG signal. When the difference between the result of the closing operation and the result of the filtering is greater than the second threshold, it indicates that the reliability of the result of the closing operation is low. Therefore, the result of the opening operation needs to be used as the target ECG signal. In other cases, it indicates that there is no obvious deviation between the result of the opening operation and the result of the closing operation. Therefore, the weighted sum of the result of the opening operation and the result of the closing operation is used as the target ECG signal. This application corrects the results of the opening and closing operations of the ECG signal to avoid signal distortion problems, thereby ensuring the signal authenticity of the target ECG signal.
[0034] In some embodiments of the present invention, in S101, in order to determine the results of the opening operation and the closing operation of the real-time ECG signal, as Figure 2 shown, Figure 2 is a schematic flowchart of an embodiment for determining the results of the opening operation and the closing operation of the real-time ECG signal provided by the present invention, including: S201: Construct a structural element sequence of the real-time ECG signal; In some embodiments of the present invention, the structural element sequence is a set composed of a series of structural elements with specific shapes, sizes, and directions. These structural elements are used to define the neighborhood relationship and spatial characteristics in morphological operations.
[0035] It should be noted that by changing the size of the structural elements, multi-scale analysis of images or signals can be performed. Smaller structural elements can capture detailed features, while larger structural elements are used to extract global features. The sequence of structural elements allows morphological operations to be continuously applied at different scales, thus providing a comprehensive understanding of the image or signal. Therefore, a reasonable sequence of structural elements can ensure the reliability of subsequent opening and closing operations.
[0036] S202: Based on the sequence of structural elements, perform erosion operation and dilation operation on the real-time electrocardiogram signal in sequence to obtain the result of the opening operation; S203: Based on the sequence of structural elements, perform dilation operation and erosion operation on the real-time electrocardiogram signal in sequence to obtain the result of the closing operation.
[0037] In some embodiments of the present invention, for the sequence of structural elements hL ={ h1 , h2 , h3 ,..., hL}, the structural elements can select common sequences in morphology, for example: h1 = h2 =...= hL =0.
[0038] In order to use the structural element hL to perform opening and closing operations on the original signal x(n) to obtain the opening operation result Op (n) and the closing operation result Cl(n) , specifically: Op(n)
[0039] Cl(n)
[0040] In some embodiments of the present invention, when the weighted sum of the opening operation result and the closing operation result is used as the target electrocardiogram signal, the weights of the opening operation result and the closing operation result are the same, that is, the mean value of the opening operation result and the closing operation result is used as the target electrocardiogram signal.
[0041] Furthermore, in order to compare the relationship between the opening operation result, the closing operation result, the filtering result, and the real-time electrocardiogram signal in a standardized manner to determine the final target electrocardiogram signal, it is specifically implemented by constructing a selection function.
[0042] In some embodiments of the present invention, the calculation formula of the selection function is:
[0043] Among them, x(n) is then the electrocardiogram signal at a moment, Op(n) is the n result of opening operation at the Cl(n) is the n result of closing operation at the fM(n) is the n function output at the fM(n-1) is the n-1 function output at the is the first judgment threshold, A represents taking the A absolute value.
[0044] In this embodiment, based on the selection function, the opening and closing operation results of the electrocardiogram signal are subjected to secondary verification processing, and the target electrocardiogram signal is adaptively corrected, improving the reliability of the target electrocardiogram signal.
[0045] In some embodiments of the present invention, after determining the target electrocardiogram signal of the electrocardiogram signal, in order to improve the display effect of the electrocardiogram signal, as Figure 3 shown, Figure 3 is a schematic flowchart of an embodiment for improving the display effect of the electrocardiogram signal provided by the present invention, including: S301: Set the quantization level, and perform quantization and discretization processing on the target electrocardiogram signal based on the quantization level to obtain a quantized wave signal; In some embodiments of the present invention, the quantization level refers to the level or threshold set when performing quantization processing on the electrocardiogram signal after morphological filtering. The setting of the quantization level needs to be determined according to the resolution of the electrocardiogram paper and the minimum amplitude unit distinguishable by the human eye. Since the amplitude of the electrocardiogram signal distinguishable by the human eye is usually above 5uV, that is, 0.05 millimeters on the electrocardiogram paper, the quantization level can be set to a value corresponding to this resolution. For example, the quantization level can be set to different thresholds such as 5uV, 10uV, 20uV, etc., and a suitable level can be selected for quantization processing according to actual needs, which is not limited here.
[0046] S302: Perform sliding de-jitter processing on the quantized wave signal to obtain a de-noised electrocardiogram signal.
[0047] In some embodiments of the present invention, sliding de-jitter processing is a signal processing technology mainly used to remove jitter or unstable fluctuations in the signal. In the fields of electrocardiogram signal processing, biological signal processing, mechanical vibration analysis, etc., due to the signal being affected by various external interferences or system instabilities, the signal may exhibit unnecessary rapid changes or jitter. These jitters not only reduce the signal quality but may also affect subsequent signal analysis, feature extraction, and diagnostic accuracy.
[0048] In this embodiment, by performing quantization and discretization processing on the target electrocardiogram (ECG) signal, the target ECG signal can better meet the requirements of the resolution of the ECG paper, thereby removing the tiny noise or fluctuations in the target ECG signal and making the signal more stable. By performing sliding de-jitter processing on the quantized wave signal, the fast-changing or jittery parts in the signal can be removed, making the signal smoother and more stable, effectively ensuring the stability and visibility of the display result of the interference-removed ECG signal.
[0049] In some embodiments of the present invention, in S301, in order to perform quantization and discretization processing on the target ECG signal to obtain a quantized wave signal, as Figure 4 shown, Figure 4 is a schematic flowchart of an embodiment for obtaining a quantized wave signal provided by the present invention, including: S401: Construct a rounding function including quantization levels; S402: Calculate the quantization results of the target ECG signal in sequence according to the rounding function, and determine the quantized wave signal based on the quantization results.
[0050] In this embodiment, by performing quantization and discretization processing on the target ECG signal, the negligible-order interference therein can be effectively removed, thereby improving the stability of the data in the quantized wave signal and reducing the subsequent data processing volume.
[0051] In some embodiments of the present invention, the calculation formula of the rounding function is:
[0052] where, is the quantization result, is the rounding function, is the target ECG signal, is the quantization level.
[0053] In some embodiments of the present invention, in S302, in order to perform sliding de-jitter processing on the quantized wave signal to obtain an interference-removed ECG signal, as Figure 5 shown, Figure 5 is a schematic flowchart of an embodiment for obtaining an interference-removed ECG signal provided by the present invention, including: S501: Set a de-jitter window and a de-jitter threshold; In some embodiments of the present invention, the de-jitter window is a time period or the number of sample points of a fixed size, which slides along the time axis of the signal. At each window position, a series of operations are performed to judge and process the signal values within the window. These operations may include comparing the change rate of the signal values within the window, calculating the average or median of the signal values within the window, detecting whether there are outliers within the window, etc.
[0054] It should be noted that the size of the debounce window should be determined according to the characteristics of the signal and the processing requirements. An overly large window may result in the loss of signal details, while an overly small window may not be able to effectively remove jitter. Therefore, when determining the debounce window, it is necessary to set it according to actual needs to avoid affecting the subsequent data reliability.
[0055] In some embodiments of the present invention, the debounce threshold is a critical value or boundary set during signal processing, especially during the process of removing signal jitter. This threshold is used to determine whether the changes in the signal belong to the normal fluctuation range or should be regarded as jitter that needs to be processed. Specifically, when the amplitude of the change in the signal exceeds the preset debounce threshold, the system may consider this as a jitter; on the contrary, if the amplitude of the change does not exceed the threshold, the system may consider this as a normal signal fluctuation.
[0056] S502: Sequentially pass through the quantization wave signal based on the debounce window, and determine whether there are values at other positions equal to the first value in the debounce window; S503: When there is a second value equal to the first value in the debounce window, and the difference between the extreme values of the values at other positions between the second value and the first value is less than the debounce threshold, it is determined that there is data jitter in the debounce window, and the values at other positions between the second value and the first value are revised to the size of the first value; In some embodiments of the present invention, the difference between the extreme values of the values at other positions between the second value and the first value specifically refers to: comparing the sizes of all other values between the position of the first value and the position of the second value to obtain the maximum value and the minimum value, and the difference between the maximum value and the minimum value is the difference between the extreme values.
[0057] S504: When there is no second value equal to the first value in the debounce window, it is determined that there is no data jitter in the debounce window; Wherein, the first value refers to the value at the first position of the debounce window; the second value refers to the value outside the first position in the debounce window and equal to the first value.
[0058] It should be noted that when the difference between the extreme values of the values at other positions between the second value and the first value is not less than the debounce threshold, it indicates that there is significant jitter in the debounce window. Since this jitter may be caused by effective waveforms such as pacing, Q waves, and S waves, this jitter is not processed in this embodiment.
[0059] In this embodiment, by setting a debounce threshold to adaptively screen and revise small jitters in the debounce window, the smoothness of the interference-removed electrocardiogram (ECG) signal is improved. Moreover, since large-jitter data in the debounce window is not processed, the information that the quantization wave signal itself needs to convey is retained, facilitating subsequent reverse inference of the data information of the quantization wave signal from the interference-removed ECG signal.
[0060] In this embodiment, through quantization and discretization processing of the target ECG signal, the target ECG signal can better meet the requirements of the resolution of the ECG paper, thereby removing tiny noises or fluctuations in the target ECG signal and making the signal more stable. Through sliding debounce processing of the quantization wave signal, the fast-changing or jittery parts in the signal can be removed, making the signal smoother and more stable, effectively ensuring the stability and visibility of the display result of the interference-removed ECG signal. Further, by setting a debounce threshold to adaptively screen and revise small jitters in the debounce window, the smoothness of the interference-removed ECG signal is improved. Moreover, since large-jitter data in the debounce window is not processed, the information that the target ECG signal itself needs to convey is retained, facilitating subsequent reverse inference of the data information of the target ECG signal from the interference-removed ECG signal.
[0061] In some embodiments of the present invention, to visually display the processing effect on the real-time ECG signal containing noise, as Figure 6 shown, Figure 6 is a schematic diagram of the result of an embodiment of the interference removal of the real-time ECG signal provided by the present invention.
[0062] Among them, the noisy signal refers to the initial real-time ECG signal; the morphological filtering refers to the filtering result of the real-time ECG signal; the morphological selection refers to the target ECG signal obtained after correcting the opening operation result and the closing operation result of the real-time ECG signal based on the filtering result of the previous moment's ECG signal; the quantization and debounce refers to the interference-removed ECG signal obtained after quantization and discretization processing and sliding debounce processing of the target ECG signal.
[0063] To better implement the interference removal method of the ECG signal in the embodiments of the present invention, correspondingly, the embodiments of the present invention also provide an interference removal device for the ECG signal, as Figure 7 shown, Figure 7 is a schematic structural diagram of an embodiment of the interference removal device for the ECG signal provided by the present invention. The interference removal device 700 for the ECG signal includes: A filtering module 701, configured to obtain the real-time ECG signal at the current moment and the filtering result of the previous moment's ECG signal; An opening and closing operation module 702, configured to determine the opening operation result and the closing operation result of the real-time ECG signal; A comparison module 703, configured to use the real-time electrocardiogram signal as the target electrocardiogram signal after interference removal when the difference between the result of the opening operation and the result of the closing operation is greater than twice the first threshold; When the difference between the result of the opening operation and the result of the filtering is greater than the first threshold, use the result of the closing operation as the target electrocardiogram signal; When the difference between the result of the closing operation and the result of the filtering is greater than the first threshold, use the result of the opening operation as the target electrocardiogram signal; Otherwise, use the weighted sum of the result of the opening operation and the result of the closing operation as the target electrocardiogram signal.
[0064] As Figure 8 shown, Figure 8 FIG. is a structural block diagram of an embodiment of the electrocardiogram signal denoising system provided by the present invention. The electrocardiogram signal denoising system 800 includes a processor 801, a memory 802, and a display 803. Figure 8 Only some components of the electrocardiogram signal denoising system 800 are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0065] In some embodiments, the processor 801 may be a central processing unit (CPU), a microprocessor, or other data processing chips, and is configured to run program codes stored in the memory 802 or process data, such as the interference removal method of the electrocardiogram signal in the present invention.
[0066] In some embodiments, the processor 801 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 801 may be local or remote. In some embodiments, the processor 801 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination of the above.
[0067] In some embodiments, the memory 802 may be an internal storage unit of the electrocardiogram signal denoising system 800, such as a hard disk or a memory of the electrocardiogram signal denoising system 800. In some other embodiments, the memory 802 may also be an external storage device of the electrocardiogram signal denoising system 800, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electrocardiogram signal denoising system 800.
[0068] Further, the memory 802 may also include both the internal storage unit of the electrocardiogram signal denoising system 800 and an external storage device. The memory 802 is used to store the application software and various types of data for installing the electrocardiogram signal denoising system 800.
[0069] In some embodiments, the display 803 may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. The display 803 is used to display the information in the electrocardiogram signal denoising system 800 and to display a visual user interface. The components 801 - 803 of the electrocardiogram signal denoising system 800 communicate with each other through the system bus.
[0070] In one embodiment, when the processor 801 executes the interference removal program for electrocardiogram signals in the memory 802, the following steps may be implemented: Obtain the real-time electrocardiogram signal at the current moment and the filtering result of the electrocardiogram signal at the previous moment; Determine the opening operation result and the closing operation result of the real-time electrocardiogram signal; When the difference between the opening operation result and the closing operation result is greater than twice the first threshold, use the real-time electrocardiogram signal as the target electrocardiogram signal after interference removal; When the difference between the opening operation result and the filtering result is greater than the first threshold, use the closing operation result as the target electrocardiogram signal; When the difference between the closing operation result and the filtering result is greater than the first threshold, use the opening operation result as the target electrocardiogram signal; Otherwise, use the weighted sum of the opening operation result and the closing operation result as the target electrocardiogram signal.
[0071] It should be understood that when the processor 801 executes the interference removal program for electrocardiogram signals in the memory 802, in addition to the above functions, other functions may also be implemented. For specific details, reference may be made to the description of the corresponding method embodiments above.
[0072] Furthermore, the embodiments of the present invention do not specifically limit the type of the mentioned electrocardiogram signal denoising system 800. The electrocardiogram signal denoising system 800 can be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop, etc. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices running IOS, android, microsoft or other operating systems. The above portable electronic device can also be other portable electronic devices, such as a laptop with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electrocardiogram signal denoising system 800 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0073] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer-readable program or instruction. When the program or instruction is executed by a processor, it can implement the steps or functions in the interference removal method of the electrocardiogram signal provided by the above-mentioned method embodiments.
[0074] Those skilled in the art can understand that all or part of the processes for implementing the methods of the above embodiments can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The computer program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disk, a read-only memory or a random access memory, etc.
[0075] The above has introduced in detail the interference removal method, device, electronic device and storage medium of the electrocardiogram signal provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for removing interference from an electrocardiogram signal, characterized in that: include: Obtain the real-time ECG signal at the current moment and the filtering result of the ECG signal at the previous moment; Determining an opening operation result and a closing operation result of the real-time electrocardiogram signal; When the difference between the opening operation result and the closing operation result is greater than a first threshold, taking the real-time ECG signal as a target ECG signal after interference removal; When the difference between the opening operation result and the filtering result is greater than a second threshold, taking the closing operation result as the target ECG signal; When the difference between the closing operation result and the filtering result is greater than a second threshold, taking the opening operation result as the target ECG signal; Otherwise, the weighted sum of the opening operation result and the closing operation result is taken as the target electrocardiogram signal.
2. The method for removing interference from an electrocardiogram signal according to claim 1, characterized in that: When the weighted sum of the opening operation result and the closing operation result is taken as the target electrocardiogram signal, the weights of the opening operation result and the closing operation result are the same.
3. The method for removing interference from an electrocardiogram signal according to claim 1, characterized in that: The step of determining the opening operation result and the closing operation result of the real-time electrocardiogram signal comprises: Constructing a structural element sequence of the real-time electrocardiogram signal; Based on the structure element sequence, sequentially performing corrosion operation and dilation operation on the real-time electrocardiogram signal to obtain the opening operation result; Based on the structure element sequence, the real-time electrocardiogram signal is sequentially subjected to dilation operation and erosion operation to obtain the closing operation result.
4. The method for removing interference from an electrocardiogram signal according to claim 1, characterized in that: After determining the target ECG signal, the method further includes: Setting a quantization level, and performing quantization discrete processing on the target electrocardiogram signal based on the quantization level to obtain a quantized wave signal; The quantized wave signal is subjected to sliding de-jittering processing to obtain an interference-free electrocardiogram signal of the target electrocardiogram signal.
5. The method for removing interference from an electrocardiogram signal according to claim 4, characterized in that: The step of setting a quantization level and performing quantization discrete processing on the target electrocardiogram signal based on the quantization level to obtain a quantized wave signal includes: constructing a rounding function including the quantization level; The quantization results of the target electrocardiogram signal are calculated in sequence according to the rounding function, and the quantization wave signal is determined based on the quantization results.
6. The method for removing interference from an electrocardiogram signal according to claim 5, characterized in that: The calculation formula of the rounding function is: in, For the quantitative results, is the rounding function, is the target ECG signal, is the quantization level.
7. The method for removing interference from an electrocardiogram signal according to claim 4, characterized in that: The step of performing sliding de-jittering processing on the quantized wave signal to obtain a de-interferenced ECG signal of the target ECG signal includes: Based on the de-jitter window passing through the quantized wave signal in sequence, determining whether there is a value at another position in the de-jitter window that is equal to the first value; When a second value in the de-jitter window is equal to the first value, and the difference between the extreme values of values at other positions between the second value and the first value is less than the de-jitter threshold, it is determined that data jitter exists in the de-jitter window, and the values at other positions between the second value and the first value are revised to the size of the first value; When the second value does not exist in the de-jitter window and is equal to the first value, it is determined that there is no data jitter in the de-jitter window; The first value refers to the value of the first position of the de-jitter window; the second value refers to a value outside the first position of the de-jitter window and equal to the first value.
8. An electrocardiogram signal interference removal device, characterized in that: include: A filtering module is used to obtain the real-time ECG signal at the current moment and the filtering result of the ECG signal at the previous moment; An opening and closing operation module, used to determine an opening operation result and a closing operation result of the real-time ECG signal; A comparison module, configured to use the real-time ECG signal as a target ECG signal after interference removal when the difference between the opening operation result and the closing operation result is greater than a first threshold; When the difference between the opening operation result and the filtering result is greater than a second threshold, taking the closing operation result as the target ECG signal; When the difference between the closing operation result and the filtering result is greater than a second threshold, taking the opening operation result as the target ECG signal; Otherwise, the weighted sum of the opening operation result and the closing operation result is taken as the target electrocardiogram signal.
9. An electrocardiogram signal denoising system, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the method for removing interference from electrocardiographic signals as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the method for removing interference from electrocardiographic signals as described in any one of claims 1 to 7.