A real-time noise detection method and device for electrocardiogram signal

By detecting low-frequency and high-frequency noise in real time during the electrocardiogram acquisition process, the problem of noise detection in the prior art is solved, and the diagnosis quality and acquisition efficiency of the electrocardiogram are improved.

CN118285808BActive Publication Date: 2025-01-03SHENZHEN ECGMAC MEDICAL ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410254518.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-06
Publication Date
2025-01-03
Estimated Expiration
2044-03-06

AI Technical Summary

Technical Problem

The existing ECG signal noise detection is mainly carried out after the signal acquisition is completed, and noise interference cannot be detected in real time, resulting in errors and fatigue during the acquisition process, affecting the diagnostic quality of the ECG.

Method used

In the process of electrocardiogram signal acquisition, low-frequency and high-frequency noise is detected in real time, by calculating the baseline drift value and absolute value summing result, judging the noise status with preset conditions, and outputting real-time noise detection results.

Benefits of technology

It improves the noise detection efficiency during the ECG signal acquisition process, reduces noise interference, and enhances the reliability of ECG diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118285808B_ABST
    Figure CN118285808B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time noise detection method and device for electrocardiogram signals, and the method comprises: converting the collected analog electrocardiogram signals into electrocardiogram signals; intercepting the electrocardiogram signals of a first preset time period during the collection process, calculating the baseline drift value of the low-frequency noise of the first preset time period, comparing the baseline drift value with a first judgment condition, and outputting the low-frequency noise detection result according to the comparison result; intercepting the electrocardiogram signals of a second preset time period during the collection process, calculating the absolute value sum result of the high-frequency noise of the second preset time period, and outputting the high-frequency noise detection result based on the absolute value sum result and the second judgment condition. The present invention can analyze and determine whether there is noise in the signal in real time during the electrocardiogram signal collection stage, assist the user in selecting the collection time, ensure that the collected electrocardiogram signals have less noise interference, and thus improve the reliability of the electrocardiogram diagnosis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram processing, and in particular to a method and device for real-time noise detection of electrocardiogram signals. Background Art

[0002] ECG signals are inevitably interfered by noise during the acquisition process, mainly low-frequency and high-frequency noise. Low-frequency noise is manifested on the ECG as a directional and slow change in the baseline of the waveform over time, while high-frequency noise is manifested on the ECG as a rapidly changing waveform.

[0003] At present, ECG signal noise detection mainly focuses on signal quality analysis after signal acquisition is completed, that is, noise detection is performed on the acquired signal to evaluate the signal quality. In the acquisition stage, the user mainly makes subjective judgments on the noise interference and collects ECG signals when the noise interference is small. Due to differences in factors such as the experience of the collector, some ECGs collected are of low quality and cannot be effectively diagnosed. At the same time, during the acquisition process, it is necessary to constantly pay attention to the noise of the signal, which makes the collector easily fatigued and increases the risk of errors in the acquisition process. Summary of the invention

[0004] In view of the above technical problems, the present invention provides a method and device for real-time noise detection of ECG signals, which can analyze and determine whether there is noise in the signal in real time during the ECG signal acquisition stage.

[0005] A first aspect of the present invention provides a real-time noise detection method for an electrocardiogram signal, comprising: converting a collected analog electrocardiogram signal into an electrocardiogram signal;

[0006] During the acquisition process, the electrocardiogram signal of a first preset time period is intercepted, a baseline drift value of the low-frequency noise of the first preset time period is calculated, and a low-frequency noise detection result is output based on the comparison result based on the baseline drift value and the first judgment condition;

[0007] During the acquisition process, the ECG signal of a second preset time period is intercepted, the absolute value sum of the high-frequency noise of the second preset time period is calculated, and the high-frequency noise detection result is output based on the absolute value sum and a second judgment condition.

[0008] In an optional implementation, the step of intercepting the electrocardiogram signal of a first preset time period during the acquisition process and calculating the baseline drift value of the low-frequency noise of the first preset time period includes:

[0009] The electrocardiogram signals in the first preset time period are sorted, and the middle value of the sorted electrocardiogram signals is taken as the baseline drift value at the current moment.

[0010] In an optional implementation manner, the comparing the baseline drift value with the first judgment condition and outputting the low-frequency noise detection result according to the comparison result includes:

[0011] If the absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold, the low-frequency noise state of the current ECG digital signal is valid;

[0012] Or if the low-frequency noise state at the previous moment is valid and the current ECG signal baseline is not stable, then the low-frequency noise state of the current ECG signal is valid.

[0013] In an optional implementation manner, the comparing the baseline drift value with the first judgment condition and outputting the low-frequency noise detection result according to the comparison result further includes:

[0014] If neither of the following two conditions is met, the low-frequency noise state of the current ECG signal is invalid:

[0015] The absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold;

[0016] The low-frequency noise state at the moment before the current moment is valid, and the current ECG signal baseline is not stable.

[0017] In an optional implementation, intercepting the ECG signal of a second preset time period during the acquisition process and calculating the absolute value sum of the high-frequency noise of the second preset time period includes:

[0018] Performing delay processing and low-pass filtering on the electrocardiogram signal respectively;

[0019] Then, an addition process is performed to obtain a high-frequency noise signal by subtracting the ECG signal after low-pass filtering from the ECG digital signal after delayed processing;

[0020] The absolute values ​​of the high-frequency noises in the second preset time period are summed.

[0021] In an optional implementation manner, outputting the high-frequency noise detection result based on the absolute value addition result and the second judgment condition includes:

[0022] If the high-frequency noise state is valid at the previous moment, and the absolute value sum is greater than the second threshold, the high-frequency noise invalid count is set to zero, and the high-frequency noise state is valid;

[0023] If the high-frequency noise state is valid at the previous moment, and the absolute value sum is not greater than the second threshold, the high-frequency noise invalid count is increased, and it is determined whether the high-frequency noise invalid count is greater than the third threshold. If the high-frequency noise invalid count does not meet the condition of being greater than the third threshold, the high-frequency noise state is valid, otherwise, the high-frequency noise state is invalid;

[0024] If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is greater than the second threshold, the high-frequency noise count is increased to determine whether the high-frequency noise count is greater than the fourth threshold. If the high-frequency noise count does not meet the greater-than-threshold condition, the high-frequency noise state is invalid; otherwise, the high-frequency noise state is valid.

[0025] If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is not greater than the second threshold, the high-frequency noise count is set to zero, and the high-frequency noise state is invalid.

[0026] In an optional embodiment, the real-time noise detection method for ECG signals further includes: after completing the high-frequency noise and low-frequency noise detection, integrating the detection results of the two noises, and outputting the noise detection result of the current data: if neither the low-frequency noise nor the high-frequency noise exists, then the output is no noise interference; if at least one of the low-frequency noise or the high-frequency noise exists, then the output is noise interference.

[0027] A second aspect of the present invention provides a real-time noise detection device for an electrocardiogram signal, comprising:

[0028] A conversion module, used for converting the collected analog ECG signal into an ECG signal;

[0029] A low-frequency detection module, used to intercept the electrocardiogram signal of a first preset time period during the acquisition process, calculate the baseline drift value of the low-frequency noise in the first preset time period, compare the baseline drift value with the first judgment condition, and output a low-frequency noise detection result according to the comparison result;

[0030] The high-frequency detection module is used to intercept the electrocardiogram signal of a second preset time period during the acquisition process, calculate the absolute value sum of the high-frequency noise in the second preset time period, and output the high-frequency noise detection result based on the absolute value sum and the second judgment condition.

[0031] According to a third aspect of the present invention, there is provided an electronic device, comprising:

[0032] At least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in the first aspect of the embodiment of the present invention.

[0033] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the method according to the first aspect of the embodiment of the present invention is executed.

[0034] The present invention can analyze and determine in real time whether there is noise in the signal during the ECG signal acquisition stage, assist the user in selecting the acquisition time, ensure that the acquired ECG signal has less noise interference, and thus improve the reliability of the ECG diagnosis result. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 The figure is a flow chart of a method for real-time noise detection of digital ECG signals in an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram of data sorting for calculating the baseline drift value at the current moment in an embodiment of the present invention.

[0037] Figure 3 The figure is a schematic diagram of the process of high-frequency noise detection preprocessing in an embodiment of the present invention.

[0038] Figure 4 The module diagram of a real-time noise detection device for electrocardiogram signals in an embodiment of the present invention is shown in FIG. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0040] See also Figure 1 The present invention provides a real-time noise detection method for ECG signals, which converts analog signals into digital signals through a signal collector, performs low-frequency noise and high-frequency noise detection on the obtained digital ECG signals, and finally combines the two results of low-frequency noise detection and high-frequency noise detection to output the final noise detection result: if there is low-frequency noise or high-frequency noise, it is considered that the current ECG signal has noise interference. The above-mentioned real-time noise detection method for ECG signals specifically includes:

[0041] Step 100: Convert the collected analog ECG signal into an ECG signal.

[0042] Step 200: During the acquisition process, the ECG signal of a first preset time period is intercepted, a baseline drift value of the low-frequency noise of the first preset time period is calculated, the baseline drift value is compared with a first judgment condition, and a low-frequency noise detection result is output according to the comparison result.

[0043] Specifically, the electrocardiogram signals in the first preset time period are sorted, and the middle value of the sorted electrocardiogram signals is taken as the baseline drift value at the current moment.

[0044] For example, when a digital ECG signal is input at time t0, the ECG data with a length of T_BL from time point t0-T_BL to time point t0 is intercepted, the ECG data in this time period is sorted, and the middle value after sorting is taken as the baseline drift value at the current moment.

[0045] When compared with the first judgment condition, whether low-frequency noise exists is judged according to the following method.

[0046] If the absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold, the low-frequency noise state of the current ECG signal is valid;

[0047] Or if the low-frequency noise state at the previous moment is valid and the current ECG signal baseline is not stable, then the low-frequency noise state of the current ECG signal is valid.

[0048] Furthermore, the state of the low-frequency noise is judged by two conditions: first, the absolute value of the difference between the current baseline drift value and the signal reference value is greater than the threshold; second, the low-frequency noise state at the previous moment is valid and the current ECG signal baseline is not stable.

[0049] If one of the above conditions is met, the low-frequency noise state of the current ECG signal is valid; if neither condition is met, the low-frequency noise state of the current ECG signal is invalid. Finally, the signal reference value is updated, and the detection result is output according to the low-frequency noise state.

[0050] See also Figure 2 , the continuous ECG signal can be expressed as: {x(1), x(2), ..., x(m-1), x(m)}, where x(1) is the first signal collected, x(2) is the second signal collected, and x(m) is the signal collected at the current moment (the following representations are similar, m represents the current data, and m-1 represents the data at the previous moment). When the x(m) signal data is collected, an ECG data segment with a length of T_BL (generally 800 milliseconds) is taken from the current point forward (assuming a total of M data), expressed as {x(m-M+1), x(n-M+2), ..., x(m-1), x(m)}, and the data segment is sorted in ascending order, and the middle value (Xmed) is taken to obtain the baseline drift value Data_BL of the current point. The continuous baseline drift value is recorded as the baseline drift signal bl(n).

[0051] Then make a judgment based on the above two conditions:

[0052] Whether the absolute value of the difference between the current baseline drift value Data_BL and the signal reference value Data_ISO is greater than the first threshold value DIFF_TH, that is, whether |Data_BL-Data_ISO| is greater than the first threshold value DIFF_TH;

[0053] And the low-frequency noise state of the ECG signal at the previous moment is valid, and the current ECG signal baseline is not stable. In an embodiment of the present invention, the judgment process of whether the current ECG signal baseline is stable is: on the baseline drift signal bl(n) obtained by the median method, take a baseline drift data segment (assuming a total of N data) with a length of T_STABLE (generally 400ms) from the current point forward, expressed as {bl(m-N+1), bl(m-N+2),…, bl(m-1), bl(m)}, calculate the maximum and minimum values ​​in this data segment, if the maximum and minimum values ​​meet the following three conditions at the same time, the baseline is considered to be stable, otherwise the baseline is considered to be unstable. First, the maximum value is less than the threshold TH_STABLE, second, the minimum value is greater than -TH_STABLE, and third, the maximum value minus the minimum value is less than the threshold PP_STABLE.

[0054] Among them, TH_STABLE is the upper threshold of signal stability. If the bl(n) signal is within the range of ±TH_STABLE, it means that the signal is limited to a relatively stable range near 0; PP_STABLE is the threshold of the peak-to-peak value of the signal. The peak-to-peak value of the signal during this period can be obtained by subtracting the minimum value from the maximum value. If the peak-to-peak value is less than the threshold, it means that the signal does not fluctuate much within the limited range. The extracted bl(n) is the baseline drift signal. The closer the value is to 0, the smaller the signal drift. Conversely, the more it deviates from 0, the larger the signal drift.

[0055] After completing the low-frequency noise state judgment, the signal reference value Data_ISO is updated. On the baseline drift signal bl(n), take a baseline drift data segment of length T_ISO (generally 1 second) from the current point forward (assuming a total of K data), expressed as {bl(m-K+1), bl(m-K+2),…, bl(m-1), bl(m)}, and find the maximum and minimum values ​​in this data segment. If the following three conditions are met, the signal reference value Data_ISO is updated to the average value of the data segment, otherwise the reference value remains unchanged. First, the maximum value is less than the threshold TH_ISO, second, the minimum value is greater than -TH_ISO, and third, the maximum value minus the minimum value is less than the threshold PP_ISO. Among them, H_ISO is the signal deviation upper limit threshold, and PP_ISO is the signal fluctuation threshold. The three conditions limit the signal to the range of ±TH_ISO, and the fluctuation is not greater than PP_ISO, ensuring the signal stability. If all three conditions above are met, the signal reference value is updated according to the following formula.

[0056]

[0057] Finally, the detection result is output. If the low-frequency noise state is valid, the output indicates that low-frequency noise interference exists; if the low-frequency noise state is invalid, the output indicates that low-frequency noise interference does not exist.

[0058] Step 300: intercepting the ECG signal of a second preset time period during the acquisition process, calculating the absolute value sum of the high-frequency noise of the second preset time period, and outputting a high-frequency noise detection result based on the absolute value sum and a second judgment condition.

[0059] Specifically, the ECG signal is subjected to delay processing and low-pass filtering respectively; then, a summing process is performed to obtain a high-frequency noise signal by subtracting the ECG signal subjected to low-pass filtering from the ECG signal subjected to delay processing; and the absolute values ​​of the high-frequency noise in the second preset time period are summed.

[0060] For example, the ECG signal acquired at time t0 is preprocessed to obtain a high-frequency noise signal. For the high-frequency noise signal sequence, a high-frequency noise signal segment of length T_HF is intercepted from the current time point t0 forward, the absolute value of the high-frequency noise signal in this time period is calculated, and the absolute values ​​calculated in the segment are summed. The high-frequency noise information is updated according to the summation result, and finally the detection result is output according to the high-frequency noise state.

[0061] The ECG digital signal x(n) passes through a delay processor and a low-pass filter respectively, and then is summed up. The data obtained after the delay T0 (the value of T0 is consistent with the delay of the low-pass filter) is subtracted from the result of the low-pass filter to obtain a high-frequency noise signal, recorded as hf(n).

[0062] Then, on the high-frequency noise signal hf(n), take a high-frequency noise data segment of length T_HF (generally 40ms) from the current point forward (assuming a total of L data), expressed as {hf(m-L+1), hf(m-L+2),…, hf(m-1), hf(m)}, take the absolute value of all the data in the data segment and add them up to obtain the absolute value sum result Data_Abs_Sum. The calculation formula is as follows.

[0063]

[0064] See also Figure 3 The present invention mainly updates two statistics through the calculated absolute value sum result Data_Abs_Sum and the high-frequency noise state of the previous moment: the high-frequency noise count Cnt_HF and the high-frequency noise invalid count Cnt_HF_Invalid. The high-frequency noise count is used to count the duration of the uninterrupted high-frequency noise. When it exceeds a certain value, it indicates that high-frequency noise has appeared; the high-frequency noise invalid count is used to count the duration of the uninterrupted non-high-frequency noise. When it exceeds a certain value, it indicates that the signal is normal and the high-frequency interference disappears.

[0065] Furthermore, four types of processing are performed by judging whether the high-frequency noise state at the previous moment is valid and whether the absolute value sum result Data_Abs_Sum is greater than the second threshold value DATA_TH_HF:

[0066] 1. If the high-frequency noise state is valid at the previous moment, and the absolute value sum result Data_Abs_Sum is greater than the second threshold value DATA_TH_HF, the high-frequency noise invalid count Cnt_HF_Invalid is set to zero, and the high-frequency noise state is valid;

[0067] 2. If the high-frequency noise state is valid at the previous moment, and the absolute value sum result Data_Abs_Sum is not greater than the second threshold value DATA_TH_HF, the high-frequency noise invalid count Cnt_HF_Invali is increased (Cnt_HF_Invalid plus 1), and it is determined whether the high-frequency noise invalid count is greater than the third threshold value CNT_TH_INVALID. If the high-frequency noise invalid count Cnt_HF_Invalid does not meet the greater than threshold condition, the high-frequency noise state is valid, otherwise, the high-frequency noise state is invalid;

[0068] 3. If the high-frequency noise state at the previous moment is invalid, and the absolute value sum result Data_Abs_Sum is greater than the second threshold value DATA_TH_HF, the high-frequency noise count is increased (Cnt_HF plus 1), and it is determined whether the high-frequency noise count is greater than the fourth threshold value CNT_TH_HF. If the high-frequency noise count does not meet the greater than threshold condition, the high-frequency noise state is invalid, otherwise, the high-frequency noise state is valid;

[0069] 4. If the high-frequency noise state at the previous moment is invalid, and the absolute value sum result Data_Abs_Sum is not greater than the second threshold value DATA_TH_HF, the high-frequency noise count Cnt_HF is set to zero, and the high-frequency noise state is invalid.

[0070] After the high-frequency noise information is updated, the high-frequency noise detection result is output through the high-frequency noise state. If the high-frequency noise state is valid, it is output that there is high-frequency noise interference; if the high-frequency noise state is invalid, it is output that there is no high-frequency noise interference.

[0071] After the above step 300, the method for real-time noise detection of ECG signals further comprises the following steps:

[0072] After completing the high-frequency noise and low-frequency noise detection, the detection results of the two noises are combined to output the noise detection result of the current data: if both low-frequency noise and high-frequency noise do not exist, the output is no noise interference; if at least one of the low-frequency noise or high-frequency noise exists, the output is noise interference.

[0073] It should be noted that the above algorithms for obtaining the median and the absolute value and the like all use the original description. In actual implementation, fast algorithms can be used to achieve lower computational complexity through data structures such as queues, thereby achieving real-time detection of noise interference during signal acquisition, improving acquisition efficiency and the reliability of diagnostic results.

[0074] The present invention can analyze and determine whether there is noise in the signal in real time during the ECG signal acquisition stage, assist the user in selecting the acquisition time, ensure that the acquired ECG digital signal has less noise interference, and thus improve the reliability of the ECG diagnosis result.

[0075] See also Figure 4 The present invention also provides a real-time noise detection device for an electrocardiogram signal, comprising:

[0076] A conversion module 41, used to convert the collected analog ECG signal into an ECG signal;

[0077] The low-frequency detection module 42 is used to intercept the electrocardiogram signal of a first preset time period during the acquisition process, calculate the baseline drift value of the low-frequency noise in the first preset time period, compare the baseline drift value with the first judgment condition, and output the low-frequency noise detection result according to the comparison result;

[0078] The high-frequency detection module 43 is used to intercept the ECG signal of a second preset time period during the acquisition process, calculate the absolute value sum of the high-frequency noise in the second preset time period, and output a high-frequency noise detection result based on the absolute value sum and a second judgment condition.

[0079] The specific implementation process of the above modules can refer to the real-time noise detection method of ECG signal, which will not be repeated here.

[0080] The present invention also provides an electronic device, comprising:

[0081] At least one processor; and at least one memory in communication with the processor, wherein: the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the above-mentioned real-time noise detection method for ECG signals.

[0082] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned real-time noise detection method for electrocardiogram signals is implemented.

[0083] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0084] More specific examples of computer-readable media include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.

[0085] It should be understood that the various parts of the present invention can be implemented with hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented with hardware, as in another embodiment, any one of the following technologies known in the art or their combination can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0086] Although the 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 the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time noise detection method for an electrocardiogram signal, characterized in that: include: Convert the collected analog ECG signals into digital ECG signals; During the acquisition process, the electrocardiogram signal of a first preset time period is intercepted, a baseline drift value of the low-frequency noise of the first preset time period is calculated, and a low-frequency noise detection result is output based on the comparison result based on the baseline drift value and the first judgment condition; During the acquisition process, the ECG signal of a second preset time period is intercepted, an absolute value sum result of the high-frequency noise of the second preset time period is calculated, and a high-frequency noise detection result is output based on the absolute value sum result and a second judgment condition; The method of intercepting the electrocardiogram signal of a first preset time period during the acquisition process and calculating the baseline drift value of the low-frequency noise of the first preset time period includes: Sorting the ECG signals in the first preset time period, and taking the middle value of the sorted ECG signals as the baseline drift value at the current moment; The step of comparing the baseline drift value with the first judgment condition and outputting a low-frequency noise detection result according to the comparison result includes: If the absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold, the low-frequency noise state of the current ECG signal is valid; Or if the low-frequency noise state at the previous moment is valid and the current ECG signal baseline is not stable, then the low-frequency noise state of the current ECG signal is valid; The step of comparing the baseline drift value with the first judgment condition and outputting a low-frequency noise detection result according to the comparison result further includes: If neither of the following two conditions is met, the low-frequency noise state of the current ECG signal is invalid: The absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold; The low-frequency noise state at the moment before the current moment is valid, and the current ECG digital signal baseline is not stable; The method of intercepting the electrocardiogram signal of the second preset time period during the acquisition process and calculating the absolute value sum of the high-frequency noise of the second preset time period includes: Performing delay processing and low-pass filtering on the electrocardiogram signal respectively; Then, an addition process is performed to obtain a high-frequency noise signal by subtracting the ECG signal after low-pass filtering from the ECG digital signal after delayed processing; summing up the absolute values ​​of the high frequency noise in the second preset time period; The outputting of the high-frequency noise detection result based on the absolute value addition result and the second judgment condition comprises: If the high-frequency noise state is valid at the previous moment, and the absolute value sum is greater than the second threshold, the high-frequency noise invalid count is set to zero, and the high-frequency noise state is valid; If the high-frequency noise state is valid at the previous moment, and the absolute value sum is not greater than the second threshold, the high-frequency noise invalid count is increased, and it is determined whether the high-frequency noise invalid count is greater than the third threshold. If the high-frequency noise invalid count does not meet the condition of being greater than the third threshold, the high-frequency noise state is valid, otherwise, the high-frequency noise state is invalid; If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is greater than the second threshold, the high-frequency noise count is increased to determine whether the high-frequency noise count is greater than the fourth threshold. If the high-frequency noise count does not meet the greater-than-threshold condition, the high-frequency noise state is invalid; otherwise, the high-frequency noise state is valid. If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is not greater than the second threshold, the high-frequency noise count is set to zero, and the high-frequency noise state is invalid; It also includes: after completing the high-frequency noise and low-frequency noise detection, integrating the detection results of the two noises, and outputting the noise detection result of the current data: if both the low-frequency noise and the high-frequency noise do not exist, then outputting no noise interference; if at least one of the low-frequency noise or the high-frequency noise exists, then outputting noise interference.

2. A real-time noise detection device for electrocardiogram signals, characterized in that: include: A conversion module, used for converting the collected analog ECG signal into a digital ECG signal; A low-frequency detection module, used to intercept the electrocardiogram signal of a first preset time period during the acquisition process, calculate the baseline drift value of the low-frequency noise in the first preset time period, compare the baseline drift value with the first judgment condition, and output a low-frequency noise detection result according to the comparison result; A high-frequency detection module, used to intercept the electrocardiogram signal of a second preset time period during the acquisition process, calculate the absolute value sum of the high-frequency noise of the second preset time period, and output a high-frequency noise detection result based on the absolute value sum and a second judgment condition; The method of intercepting the electrocardiogram signal of a first preset time period during the acquisition process and calculating the baseline drift value of the low-frequency noise of the first preset time period includes: Sorting the ECG signals in the first preset time period, and taking the middle value of the sorted ECG signals as the baseline drift value at the current moment; The step of comparing the baseline drift value with the first judgment condition and outputting a low-frequency noise detection result according to the comparison result includes: If the absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold, the low-frequency noise state of the current ECG signal is valid; Or if the low-frequency noise state at the previous moment is valid and the current ECG signal baseline is not stable, then the low-frequency noise state of the current ECG signal is valid; The step of comparing the baseline drift value with the first judgment condition and outputting a low-frequency noise detection result according to the comparison result further includes: If neither of the following two conditions is met, the low-frequency noise state of the current ECG signal is invalid: The absolute value of the difference between the baseline drift value and the signal reference value at the current moment is greater than the first preset threshold; The low-frequency noise state at the moment before the current moment is valid, and the current ECG digital signal baseline is not stable; The method of intercepting the electrocardiogram signal of the second preset time period during the acquisition process and calculating the absolute value sum of the high-frequency noise of the second preset time period includes: Performing delay processing and low-pass filtering on the electrocardiogram signal respectively; Then, an addition process is performed to obtain a high-frequency noise signal by subtracting the ECG signal after low-pass filtering from the ECG digital signal after delayed processing; summing up the absolute values ​​of the high frequency noise in the second preset time period; The outputting of the high-frequency noise detection result based on the absolute value addition result and the second judgment condition comprises: If the high-frequency noise state is valid at the previous moment, and the absolute value sum is greater than the second threshold, the high-frequency noise invalid count is set to zero, and the high-frequency noise state is valid; If the high-frequency noise state is valid at the previous moment, and the absolute value sum is not greater than the second threshold, the high-frequency noise invalid count is increased, and it is determined whether the high-frequency noise invalid count is greater than the third threshold. If the high-frequency noise invalid count does not meet the condition of being greater than the third threshold, the high-frequency noise state is valid, otherwise, the high-frequency noise state is invalid; If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is greater than the second threshold, the high-frequency noise count is increased to determine whether the high-frequency noise count is greater than the fourth threshold. If the high-frequency noise count does not meet the greater-than-threshold condition, the high-frequency noise state is invalid; otherwise, the high-frequency noise state is valid. If the high-frequency noise state at the previous moment is invalid, and the absolute value sum is not greater than the second threshold, the high-frequency noise count is set to zero, and the high-frequency noise state is invalid; It also includes: after completing the high-frequency noise and low-frequency noise detection, integrating the detection results of the two noises, and outputting the noise detection result of the current data: if both the low-frequency noise and the high-frequency noise do not exist, then outputting no noise interference; if at least one of the low-frequency noise or the high-frequency noise exists, then outputting noise interference.

3. An electronic device, characterized in that: include: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the real-time noise detection method for ECG signals as claimed in claim 1.

4. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is run by a computer, the real-time noise detection method for electrocardiogram signals as claimed in claim 1 is executed.