Method and device for removing respiratory waves in electrocardiosignals, electronic equipment and product

By detecting the R-wave peak points in the ECG signal and generating an envelope curve, the real-time and flexibility of breathing wave removal in the ECG signal is solved, and efficient and real-time signal denoising effect is achieved.

CN119523492APending Publication Date: 2025-02-28SHANGHAI CHIPSUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411590560.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art has poor real-time and poor use flexibility when removing respiratory waves in electrocardiogram signals, making it difficult to apply to portable devices and various environments.

Method used

By detecting the R wave peak point in the ECG signal, an R wave peak envelope curve is generated, and the breathing wave signal is estimated and removed using this curve.

Benefits of technology

It realizes the removal of respiratory waves in electrocardiograms with high real-time and flexibility, reduces the hardware resource requirements, is not affected by the environment and status of the subject, and is suitable for large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119523492A_ABST
    Figure CN119523492A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for removing respiratory waves in electrocardiosignals, electronic equipment and a product. The method comprises the following steps: detecting R-wave peak points in the ECG signals; then, an R-wave peak envelope curve is generated based on the R-wave peak point, and estimation of a respiratory wave signal is achieved according to the R-wave peak envelope curve; finally, the respiratory wave signals obtained through estimation are removed from the original ECG signals, and flat and standard electrocardiosignals can be obtained. On the basis, compared with the traditional technology, the brand-new respiratory wave removal method provided by the invention has the advantages that the operand is small, the real-time performance is high, hardware resources do not need to be increased, and the method is not influenced by the environment and the state of the testee, so that the use flexibility is greatly improved; therefore, the method is very suitable for large-scale application and popularization in the field of electrocardiosignal denoising.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of signal processing, and in particular relates to a method, device, electronic equipment and product for removing respiratory waves from electrocardiogram signals. Background Art

[0002] The existing ECG (Electrocardiogram) measurement basically adopts the three-lead measurement method, such as Figure 1 As shown, the acquisition electrodes are respectively connected to the left upper limb, right upper limb and right lower limb of the human body; wherein, the target signal is obtained through the voltage difference between the left and right upper limb electrodes, and then the acquisition end filters and amplifies it, so as to observe the waveform of the heart in the horizontal direction; and the right lower limb cascade, also known as the right leg driving circuit, is used to be reversely amplified by the acquisition end and transmitted to the left and right upper limb cascade acquisition signals to remove common-mode interference of noise signals such as pulse waves and electromyographic signals contained therein.

[0003] Although the above measurement method can remove most of the interference signals, the signals obtained in the actual acquisition process are generally mixed with respiratory wave signals generated by human breathing, such as Figure 2 As shown, since the frequency band of the ECG signal is generally in the range of 0.05 Hz to 40 Hz, and the frequency band of the respiratory wave signal is in the range of 0.1 Hz to 10 Hz, the respiratory wave cannot be filtered out from the ECG signal using a general frequency domain filter.

[0004] At present, there are three main respiratory wave filtering technologies: (1) extracting the instantaneous phase through Hilbert transform and using it to decompose the signal components to achieve respiratory wave filtering; (2) using the singular value decomposition method of the R wave interval to obtain respiratory information; (3) using multi-lead ECG signals to obtain respiratory information.

[0005] However, the above methods have the following shortcomings: the Hilbert transform method for extracting instantaneous phase has too much computational effort, and requires a long period of processing after the ECG signal is collected, which greatly affects the real-time performance of the system. In order to improve the real-time performance of the system, it is necessary to increase hardware processing resources, which increases the hardware cost; and the singular value decomposition method of the R wave interval has a smaller computational effort and better real-time performance than the former, but this method can only be performed when the subject is in a stable state, and is not suitable for portable devices (such as sports watches, bracelets, etc.); therefore, the flexibility of use is limited; at the same time, the multi-lead method can only be performed when the subject is in the acquisition room or the intensive care unit, and its flexibility of use is still limited; therefore, based on the above-mentioned shortcomings, how to provide a method for removing respiratory waves in ECG signals with high real-time performance and strong flexibility of use has become a problem to be solved urgently. Summary of the invention

[0006] The purpose of the present invention is to provide a method, device, electronic equipment and product for removing respiratory waves from electrocardiogram signals, so as to solve the problems of poor real-time performance and poor flexibility of use in the prior art.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions:

[0008] In a first aspect, a method for removing a respiratory wave in an electrocardiogram signal is provided, comprising:

[0009] Acquire a target ECG signal, and perform R wave peak detection processing on the target ECG signal, so as to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing;

[0010] Based on all R wave peak points in the target ECG signal, generate an R wave peak envelope curve;

[0011] Using the R wave peak envelope curve and the target electrocardiogram signal, a respiratory wave signal estimation process is performed to obtain a respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation process;

[0012] The respiratory wave signal is removed from the target ECG signal to obtain a target ECG signal with the respiratory wave removed.

[0013] Based on the above disclosed content, after acquiring the target ECG signal, the present invention first performs R wave peak detection processing on it, so as to obtain all R wave peak points in the target ECG signal; then, based on the detected R wave peak points, an R wave peak envelope curve is generated; then, the R wave peak envelope curve and the original target ECG signal are used to estimate the respiratory wave signal, so as to obtain the respiratory wave signal in the target ECG signal; finally, the respiratory wave signal obtained by the above estimation is removed from the target ECG signal, so as to complete the removal of the respiratory wave in the target ECG signal.

[0014] Through the above design, the present invention detects the R wave peak point in the ECG signal; then, generates the R wave peak envelope curve based on the R wave peak point, and thereby estimates the respiratory wave signal; finally, removes the estimated respiratory wave signal from the original ECG signal to obtain a smooth and standard ECG signal; based on this, the present invention provides a new respiratory wave removal method, which, compared with the traditional technology, has a small amount of calculation, high real-time performance, no need to increase hardware resource overhead, and is not affected by the environment and state of the subject, therefore, greatly improves the flexibility of use; therefore, the present invention is very suitable for large-scale application and promotion in the field of ECG signal denoising.

[0015] In a possible design, the target ECG signal is subjected to R wave peak detection processing to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing, including:

[0016] Performing bandpass filtering on the target ECG signal to obtain a filtered target ECG signal;

[0017] Performing a square operation on the filtered target ECG signal to obtain an ECG energy signal after the square operation;

[0018] Acquire an adaptive window, and slide the adaptive window with the beginning of the electrocardiogram energy signal as the starting point;

[0019] intercepting the signal of the electrocardiogram energy signal within the current adaptive window as a window signal sequence;

[0020] According to the signal wave peak point in the window signal sequence, determining whether there is an R wave peak point in the window signal sequence;

[0021] If yes, then record the R wave peak point in the window signal sequence;

[0022] The adaptive window is slid again, and the signal of the ECG energy signal in the current adaptive window is re-intercepted until the ECG energy signal is completely traversed, and all R wave peak points in the target ECG signal are obtained.

[0023] In a possible design, judging whether there is an R wave peak point in the window signal sequence according to the signal wave peak point in the window signal sequence includes:

[0024] Determining an energy threshold corresponding to the current adaptive window according to the window signal sequence;

[0025] Acquire a historical R wave peak point, wherein the historical R wave peak point is the most adjacent R wave peak point in the ECG energy signal and before the current adaptive window;

[0026] Determine whether the distance between the signal peak point and the historical R wave peak point is greater than a distance threshold;

[0027] If not, determining whether the signal amplitude corresponding to the signal peak point is greater than the energy threshold;

[0028] If so, the signal peak point is used as the R wave peak point in the window signal sequence.

[0029] In one possible design, if the distance between the signal peak point and the historical R wave peak point is greater than the distance threshold, the method further includes:

[0030] Selecting the maximum amplitude from the signal amplitudes corresponding to the signal peak point and the historical R-wave peak point;

[0031] Determine whether the maximum amplitude is greater than the energy threshold;

[0032] If so, the signal peak point is used as the R wave peak point in the window signal sequence.

[0033] In a possible design, based on all R wave peak points in the target ECG signal, an R wave peak envelope curve is generated, including:

[0034] Performing cubic spline interpolation processing on each R wave peak point to obtain a cubic spline function corresponding to each R wave peak point;

[0035] Based on the cubic spline function corresponding to each R wave peak point, a cubic spline curve corresponding to each R wave peak point is generated;

[0036] The R wave peak envelope curve is generated by using the cubic spline curve corresponding to each R wave peak point.

[0037] In a possible design, the R wave peak envelope curve and the target electrocardiogram signal are used to perform respiratory wave signal estimation processing, so as to obtain the respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation processing, including:

[0038] Performing baseline drift removal processing on the R wave peak envelope curve to obtain a processed R wave peak envelope curve;

[0039] According to the R wave peak envelope curve, the processed R wave peak envelope curve and the target electrocardiogram signal, and in accordance with the following formula (1), a respiratory wave signal estimation process is performed to obtain the respiratory wave signal;

[0040]

[0041] In the above formula (1), H(j) represents the respiratory wave signal, X(j) represents the target ECG signal, I(j) represents the R wave peak envelope curve, and R(j) represents the processed R wave peak envelope curve;

[0042] Correspondingly, removing the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed includes:

[0043] The target ECG signal and the respiratory wave signal are subjected to signal differential processing, so as to obtain the target ECG signal with the respiratory wave removed after the signal differential processing.

[0044] In one possible design, before performing R wave peak detection processing on the target ECG signal, the method further includes:

[0045] The target ECG signal is subjected to high-pass filtering using a high-pass zero-phase filter to obtain a processed target ECG signal, so as to perform R-wave peak detection on the processed target ECG signal to obtain all R-wave peak points in the target ECG signal.

[0046] In a second aspect, a device for removing respiratory waves from an electrocardiogram signal is provided, comprising:

[0047] An R wave detection unit, used for acquiring a target ECG signal, and performing R wave peak detection processing on the target ECG signal, so as to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing;

[0048] An envelope curve generating unit, for generating an R wave peak envelope curve based on all R wave peak points in the target ECG signal;

[0049] a respiratory wave estimation unit, configured to perform respiratory wave signal estimation processing using the R wave peak envelope curve and the target electrocardiogram signal, so as to obtain the respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation processing;

[0050] The denoising unit is used to remove the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed.

[0051] In a third aspect, another device for removing respiratory waves from electrocardiogram signals is provided. Taking the device as an electronic device as an example, the device includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for removing respiratory waves from electrocardiogram signals as in the first aspect or any possible design of the first aspect.

[0052] In a fourth aspect, a storage medium is provided, on which instructions are stored. When the instructions are executed on a computer, the method for removing respiratory waves from an electrocardiogram signal as in the first aspect or any possible design in the first aspect is executed.

[0053] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, causes the computer to execute the method for removing respiratory waves from an electrocardiogram signal as described in the first aspect or any possible design of the first aspect.

[0054] Beneficial effects:

[0055] (1) The present invention detects the R wave peak point in the ECG signal; then, generates the R wave peak envelope curve based on the R wave peak point, and thereby estimates the respiratory wave signal; finally, removes the estimated respiratory wave signal from the original ECG signal to obtain a smooth and standard ECG signal; based on this, the present invention provides a new respiratory wave removal method, which, compared with the traditional technology, has a small amount of calculation, high real-time performance, no need to increase hardware resources, and is not affected by the environment and state of the subject, thereby greatly improving the flexibility of use; therefore, the present invention is very suitable for large-scale application and promotion in the field of ECG signal denoising. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A connection diagram of a three-lead ECG measurement method provided by an embodiment of the present invention;

[0057] Figure 2 The ECG signal mixed with the respiratory wave and the respiratory wave signal provided in the embodiment of the present invention;

[0058] Figure 3 A schematic flow chart of the steps of a method for removing respiratory waves from an electrocardiogram signal provided by an embodiment of the present invention;

[0059] Figure 4 A schematic diagram of a flow chart of an R wave peak detection step provided by an embodiment of the present invention;

[0060] Figure 5 A schematic diagram of an R wave peak point in a target ECG signal provided by an embodiment of the present invention;

[0061] Figure 6 A schematic diagram showing a comparison between a target ECG signal provided by an embodiment of the present invention and a target ECG signal with respiratory waves removed;

[0062] Figure 7 A schematic diagram of the structure of a device for removing respiratory waves from an electrocardiogram signal provided by an embodiment of the present invention;

[0063] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0065] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.

[0066] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0067] Example:

[0068] See also Figure 3 As shown, the method for removing respiratory waves from ECG signals provided in this embodiment obtains respiratory waves by estimating the R wave peak envelope curve of the ECG signal, thereby realizing the estimation of the respiratory waveform; then, after differential operation with the original signal, a smooth and standard ECG signal can be obtained; thus, compared with the traditional technology, the method has a small amount of calculation, high real-time performance, no need to increase hardware resources, and is not affected by the environment and state of the subject, thus greatly improving the flexibility of use; thus, the method is very suitable for large-scale application and promotion in the field of ECG signal denoising; among them, for example, the method can be but not limited to running on the ECG signal acquisition end side, optionally, the ECG signal acquisition end can be but not limited to a personal computer (PC), it can be understood that the aforementioned execution subject does not constitute a limitation on the embodiments of the present application, and accordingly, the operation steps of the method can be but not limited to the following steps S1 to S4.

[0069] S1. Acquire a target ECG signal, and perform R-wave peak detection processing on the target ECG signal, so as to obtain all R-wave peak points in the target ECG signal after the R-wave peak detection processing; in specific implementation, the acquired target ECG signal is a signal after pre-filtering and amplification. At this time, there will be obvious baseline drift in the signal due to the influence of human pulse wave, body temperature, acquisition equipment temperature, etc. Therefore, before subsequent signal processing, it is necessary to use a high-pass zero-phase filter to perform high-pass filtering processing on the target ECG signal to remove the baseline drift and obtain the processed target ECG signal.

[0070] Among them, for example, but not limited to, using a high-pass zero-phase filter with a passband frequency of 0.5Hz and a stopband frequency of 0.1Hz to remove the baseline drift in the target ECG signal; and after completing the baseline drift removal, R-wave peak detection processing can be performed, that is, the processed target ECG signal is used as the detection object to obtain all R-wave peak points in the target ECG signal.

[0071] Optionally, the R wave peak detection process may be, but is not limited to, steps S11 to S17 as shown below.

[0072] S11. The target ECG signal is subjected to bandpass filtering to obtain a filtered target ECG signal; in the specific implementation, see Figure 4 As shown, for example, but not limited to, a 5-15 Hz bandpass filter can be used to perform bandpass filtering on the target ECG signal (i.e., the signal after high-pass filtering mentioned above) to remove unnecessary low-frequency and high-frequency signals and retain the required signal components; after completing the bandpass filtering, a square operation can be performed, as shown in the following step S12.

[0073] S12. Performing a square operation on the filtered target ECG signal to obtain an ECG energy signal after the square operation. In specific applications, it is equivalent to performing a square operation on the filtered target ECG signal to construct an energy sequence, thereby detecting the R wave peak point in the target ECG signal based on the energy sequence. In this embodiment, an adaptive window is set, and the R wave peak is detected by sliding the adaptive window and using the peak of the signal within the adaptive window. The process can be but is not limited to the following steps S13 to S17.

[0074] S13. Obtain an adaptive window and slide the adaptive window starting from the beginning of the ECG energy signal; in this embodiment, the adaptive window (ie Figure 4 The length of the fixed window in the adaptive window can be set according to actual use and is not limited here. At the same time, it is equivalent to sliding with the beginning of the ECG energy signal as the starting point. After sliding, the signal in the current adaptive window can be obtained, so as to judge whether there is an R wave peak point in the current window based on the signal in the current window; wherein, the signal interception process can be but is not limited to as shown in the following step S14.

[0075] S14. The signal of the ECG energy signal in the current adaptive window is intercepted as a window signal sequence; in a specific implementation, the signal in the first adaptive window is the signal between the beginning of the ECG energy signal and the Lth signal point, and L is the length of the adaptive window; then, R wave peak detection can be performed based on the signal peak point in the window signal sequence, and the process is shown in the following step S15.

[0076] S15. According to the signal peak point in the window signal sequence, determine whether there is an R wave peak point in the window signal sequence; in the specific implementation, refer to Figure 4 As shown, this embodiment calculates the energy threshold corresponding to the current adaptive window, and then combines the previous R peak (i.e., the historical R wave peak point described below) and the aforementioned signal peak point to detect whether there is an R wave peak point in the current adaptive window. The process can be but is not limited to the following steps S15a to S15e.

[0077] S15a. Determine the energy threshold corresponding to the current adaptive window according to the window signal sequence; in specific implementation, for example, but not limited to, obtain the maximum signal amplitude from the window signal sequence, and then divide the maximum signal amplitude by 3 to obtain the energy threshold corresponding to the current adaptive window.

[0078] After obtaining the energy threshold, the previous R peak of the current adaptive window can be obtained, so that the signal peak point in the current adaptive window can be judged based on the previous R peak, whether it is an R wave peak point; wherein, the acquisition process of the previous R peak of the current adaptive window can be but is not limited to as shown in the following step S15b.

[0079] S15b. Obtain a historical R-wave peak point, wherein the historical R-wave peak point is the most adjacent R-wave peak point in the ECG energy signal and located before the current adaptive window.

[0080] In this embodiment, after obtaining the historical R wave peak point (ie, the previous R peak of the current adaptive window), the R wave peak point detection can be performed, and the process can be but not limited to the following steps S15c to S15e.

[0081] S15c determines whether the distance between the signal peak point and the historical R wave peak point is greater than the distance threshold; in this embodiment, see Figure 4 As shown, the distance between the signal peak point and the historical R wave peak point is equivalent to the interval between the signal peak point and the historical R wave peak point, and the distance threshold is the interval threshold; wherein, the distance threshold is 1.66 times the average RR interval (such as Figure 4As shown), and the average RR interval is: the average of the intervals between all R wave peak points in the signal before the current adaptive window in the ECG energy signal; for example, if a total of 3 R wave peak points are detected in the signal before the current adaptive window in the ECG energy signal, then is the average of the intervals between the 3 R wave peak points.

[0082] In specific implementation, when the distance between the signal peak point and the historical R wave peak point is greater than the distance threshold, there may be a problem of R peak missed detection. Figure 4 As shown, it is necessary to detect again, that is, to select the maximum amplitude (that is, Figure 4 Find the maximum value between the previous R peak and the current peak); then, determine whether the maximum amplitude is greater than the energy threshold; if it is greater than the energy threshold, the signal peak point is used as the R wave peak point in the window signal sequence; otherwise, it is necessary to execute the following step S15d for re-detection.

[0083] At the same time, when the distance between the signal peak point and the historical R wave peak point is less than or equal to the distance threshold, further judgment is required, that is, using the signal peak point in the current adaptive window to perform further detection, and the process can be but is not limited to as shown in the following step S15d.

[0084] S15d. If not, it is determined whether the signal amplitude corresponding to the signal peak point is greater than the energy threshold; in this embodiment, see Figure 4 As shown, if the current peak (i.e., the amplitude corresponding to the signal peak point) is greater than the energy threshold, execute the following step S15e; otherwise, it is necessary to move the adaptive window, i.e., execute the following step S17, and re-detect the R wave peak point in the new window.

[0085] S15e. If yes, use the signal peak point as the R wave peak point in the window signal sequence.

[0086] In this way, through the aforementioned steps S15a to S15e, the detection of the R wave peak point in the current adaptive window can be completed, wherein, if an R wave peak point exists, it needs to be recorded, that is, execute the following step S16; otherwise, it is necessary to continue sliding the adaptive window and repeat the aforementioned detection steps; wherein, the recording process of the R wave peak point in the current adaptive window can be but is not limited to as shown in the following step S16.

[0087] S16. If yes, then record the R wave peak point in the window signal sequence; in specific implementation, the amplitude and index of the R wave peak point in the current adaptive window (ie, the window signal sequence) are recorded, that is, Figure 4The storage parameters in store the amplitude and index of the R wave peak point; then, the adaptive window continues to be moved to update the energy threshold and re-detect until the ECG energy signal is traversed; wherein, the cyclic detection process is shown in the following step S17.

[0088] S17. Slide the adaptive window again, and re-intercept the signal of the ECG energy signal that is within the current adaptive window, until the ECG energy signal is completely traversed, and all R wave peak points in the target ECG signal are obtained.

[0089] Thus, through the aforementioned steps S11 to S17, all R wave peak points in the target ECG signal can be detected; wherein, the schematic diagram of the detected R wave peak points can be seen in Figure 5 ( Figure 5 The input ECG signal in is the target ECG signal, and the R wave peak value is the R wave peak); after completing the detection of the R wave peak point, an R wave peak envelope curve can be generated based on the detected R wave peak point, so as to subsequently estimate the respiratory wave based on the R wave peak envelope curve; optionally, the generation process of the R wave peak envelope curve can be but is not limited to as shown in the following step S2.

[0090] S2. Generate an R wave peak envelope curve based on all R wave peak points in the target ECG signal; in specific implementation, for example, but not limited to, the following steps S21 to S23 may be used to generate the R wave peak envelope curve.

[0091] S21. Perform cubic spline interpolation processing on each R wave peak point to obtain the cubic spline function corresponding to each R wave peak point; in the specific implementation, all detected R wave peak values ​​(i.e., R wave peak points) can be regarded as points on the cubic function, and each R wave peak point is represented by an independent cubic function.

[0092] Assume that n peak points are detected, and the index corresponding to each peak point is x0, x1, ..., x n-1 , x n , and each point satisfies the following three conditions: ① In each segment interval [x i , x i+1 ], i∈n, S i (x) is a cubic equation; ② satisfies the interpolation condition, that is, S i (x) = Y i , where Y i is the desired equation; ③ The curve is smooth, that is, the first-order and second-order derivatives exist and are continuous, so the desired curve can be set to the following formula (2).

[0093] S i (x) = a i+b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3 (2)

[0094] In the above formula (2), a i , b i , c i , d i They are the constant term coefficient, the linear term coefficient, the quadratic term coefficient, and the cubic term degree.

[0095] Next, set the natural boundary conditions, that is, specify the interval [x0, x n ]The second derivative of the endpoint is 0, that is, Y i The following conditions are met:

[0096] S′(x0)=S″(x n )=0 (3)

[0097] In the above formula (3), S′(x0) represents the first-order derivative of the cubic function corresponding to x0, S″(x n ) means x n Corresponds to the second derivative of the cubic function.

[0098] By taking the first-order derivative and the second-order derivative of the above formula (2), we get the following formula:

[0099] S′ i (x) = b i +2c i (xx i )+3d i (xx i ) 2 (4)

[0100] S″ i (x) = 2c i +6d i (xx i ) (5)

[0101] At the same time, due to S i (x) is continuous, and both first-order and second-order derivatives exist, so we have:

[0102] S′ i (i+1)=S′ i+1 (i+1) (6)

[0103] S″ i (i+1)=S″i+1 (i+1) (7)

[0104] Therefore, let h i =x i+1 -x i , m i =2c i , and put them into the above formula, we can get:

[0105] a i =Y i (8)

[0106]

[0107] Next, by substituting the above formulas (8)-(11) into the above formula (5), we can obtain:

[0108]

[0109] Therefore, it can be seen from the above formula (12) that at h i With Y i Known cases constitute for m i Solve the equation, and use the natural boundary conditions of formula (3) and formula (5) to get m0 = m n =0, then h i 、m i With Y i The three are expressed in matrix form:

[0110]

[0111] For the solution of the matrix of formula (13), it is regarded as the form of AM = B. Since the matrix A is a diagonal matrix, it can be obtained that the matrix is ​​invertible. Therefore, the amplitude corresponding to the peak point of the R wave is substituted into h i With Y i Obtain the inverse of matrix A, and then the corresponding coefficient solution of matrix M can be obtained.

[0112] Finally, the coefficient value of the cubic spline function corresponding to each R wave peak point is substituted into the above formula (1) to obtain the cubic spline function corresponding to each R wave peak point; of course, using the cubic spline difference to obtain the cubic spline function is a common technology for signal interpolation, and its principle will not be repeated here.

[0113] After obtaining the cubic spline function corresponding to each R wave peak point, the R wave peak envelope curve can be generated based on the curves of each cubic spline function, and the process is shown in the following steps S22 and S23.

[0114] S22. Based on the cubic spline function corresponding to each R wave peak point, generate the cubic spline curve corresponding to each R wave peak point; in this embodiment, after generating three spline curves according to the cubic spline function, the R wave peak envelope curve can be generated based on this, and the process is shown in the following step S23.

[0115] S23. Generate the R-wave peak envelope curve using the cubic spline curves corresponding to each R-wave peak point; in this embodiment, all cubic spline curves are combined to obtain the aforementioned R-wave peak envelope curve, that is, each cubic spline curve is equivalent to a piecewise function, and all curves are combined to obtain a complete R-wave peak envelope curve.

[0116] After the R wave peak envelope curve is generated through the aforementioned steps S21 to S23, the respiratory wave in the original electrocardiogram signal can be estimated based on it. The process can be but not limited to the following step S3.

[0117] S3. Perform respiratory wave signal estimation processing using the R wave peak envelope curve and the target ECG signal to obtain the respiratory wave signal in the target ECG signal after the respiratory wave signal estimation processing; in specific implementation, for example, but not limited to, the following steps S31 and S32 may be used to estimate the respiratory wave signal in the aforementioned target ECG signal.

[0118] S31. Perform baseline drift removal processing on the R wave peak envelope curve to obtain a processed R wave peak envelope curve; in this embodiment, the R wave peak envelope curve can be regarded as a periodic signal with baseline drift, so a 0.05 Hz high-pass filter is required to remove the baseline drift of the signal, and then, the R wave peak envelope curve before processing and the target ECG signal can be combined to estimate the respiratory wave, and the process can be but not limited to the following step S32.

[0119] S32. According to the R wave peak envelope curve, the processed R wave peak envelope curve and the target electrocardiogram signal, and in accordance with the following formula (1), a respiratory wave signal estimation process is performed to obtain the respiratory wave signal.

[0120]

[0121] In the above formula (1), H(j) represents the respiratory wave signal, X(j) represents the target ECG signal, I(j) represents the R wave peak envelope curve, and R(j) represents the processed R wave peak envelope curve.

[0122] Thus, after obtaining the respiratory wave signal in the target ECG signal through the aforementioned step S3 and its sub-steps, the respiratory wave signal can be removed from the target ECG signal to obtain a standard and smooth ECG signal; wherein, the respiratory wave removal process can be but is not limited to as shown in the following step S4.

[0123] S4. Remove the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed. In this embodiment, the target ECG signal and the respiratory wave signal are subjected to signal differential processing, thereby obtaining a target ECG signal with the respiratory wave removed after the signal differential processing.

[0124] For further information, see Figure 6 As shown, Figure 6 Figure (a) is the target ECG signal, and Figure (b) is the target ECG signal after the respiratory wave is removed; it can be seen from the R wave peak envelope of the input signal (i.e., the target ECG signal) and the output signal (the target ECG signal after the respiratory wave is removed) that this embodiment eliminates the interference of the respiratory effect on the ECG R wave, and makes the R wave smooth without causing phase shift; therefore, the effect of removing the respiratory wave is achieved, and the signal-to-noise ratio of the target ECG signal is improved.

[0125] Thus, through the method for removing respiratory waves from ECG signals described in detail in the aforementioned steps S1 to S4, the present invention estimates the R wave peak envelope curve of the ECG signal to obtain the respiratory wave, thereby realizing the estimation of the respiratory waveform; then, after differential operation with the original signal, a smooth and standard ECG signal can be obtained; thus, compared with the traditional technology, the present invention has a small amount of calculation, high real-time performance, no need to increase hardware resources, and is not affected by the environment and state of the subject, thereby greatly improving the flexibility of use; therefore, the present invention is very suitable for large-scale application and promotion in the field of ECG signal denoising.

[0126] like Figure 7 As shown, the second aspect of this embodiment provides a hardware device for implementing the method for removing respiratory waves from an electrocardiogram signal described in the first aspect of the embodiment, including:

[0127] The R wave detection unit is used to acquire a target ECG signal and perform R wave peak detection processing on the target ECG signal, so as to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing.

[0128] The envelope curve generating unit is used to generate an R wave peak envelope curve based on all R wave peak points in the target electrocardiogram signal.

[0129] The respiratory wave estimation unit is used to perform respiratory wave signal estimation processing using the R wave peak envelope curve and the target electrocardiogram signal, so as to obtain the respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation processing.

[0130] The denoising unit is used to remove the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed.

[0131] The working process, working details and technical effects of the device provided in this embodiment can be found in the second aspect of the embodiment and will not be described in detail here.

[0132] like Figure 8 As shown, the third aspect of this embodiment provides another device for removing respiratory waves in electrocardiogram signals. Taking the device as an electronic device as an example, the device includes: a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for removing respiratory waves in electrocardiogram signals as described in the first aspect of the embodiment.

[0133] For example, the memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO), etc. Specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). At the same time, the processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.

[0134] In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. For example, the processor may not be limited to a microprocessor of the STM32F105 series, a reduced instruction set computer (RISC) microprocessor, an X86 architecture processor, or a processor with an integrated embedded neural network processing unit (NPU); the transceiver may be, but is not limited to, a wireless fidelity (WIFI) wireless transceiver, a Bluetooth wireless transceiver, a general packet radio service technology (General Packet Radio Service, GPRS) wireless transceiver, a ZigBee protocol (a low-power local area network protocol based on the IEEE802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc. In addition, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.

[0135] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0136] The fourth aspect of this embodiment provides a storage medium storing instructions for the method for removing respiratory waves in electrocardiogram signals as described in the first aspect of the embodiment, that is, the storage medium stores instructions, and when the instructions are run on a computer, the method for removing respiratory waves in electrocardiogram signals as described in the first aspect of the embodiment is executed.

[0137] The storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, a CD, a hard disk, a flash memory, a USB flash drive and / or a memory stick, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0138] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment and will not be described in detail here.

[0139] A fifth aspect of this embodiment provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the method for removing respiratory waves from an electrocardiogram signal as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0140] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for removing respiratory waves from an electrocardiogram signal, characterized in that: include: Acquire a target ECG signal, and perform R wave peak detection processing on the target ECG signal, so as to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing; Based on all R wave peak points in the target ECG signal, generate an R wave peak envelope curve; Using the R wave peak envelope curve and the target electrocardiogram signal, a respiratory wave signal estimation process is performed to obtain a respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation process; The respiratory wave signal is removed from the target ECG signal to obtain a target ECG signal with the respiratory wave removed.

2. The method according to claim 1, characterized in that Performing R wave peak detection processing on the target ECG signal to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing, including: Performing bandpass filtering on the target ECG signal to obtain a filtered target ECG signal; Performing a square operation on the filtered target ECG signal to obtain an ECG energy signal after the square operation; Acquire an adaptive window, and slide the adaptive window with the beginning of the electrocardiogram energy signal as the starting point; intercepting the signal of the electrocardiogram energy signal within the current adaptive window as a window signal sequence; According to the signal wave peak point in the window signal sequence, determining whether there is an R wave peak point in the window signal sequence; If yes, then record the R wave peak point in the window signal sequence; The adaptive window is slid again, and the signal of the ECG energy signal in the current adaptive window is re-intercepted until the ECG energy signal is completely traversed, and all R wave peak points in the target ECG signal are obtained.

3. The method according to claim 2, characterized in that Judging whether there is an R wave peak point in the window signal sequence according to the signal wave peak point in the window signal sequence includes: Determining an energy threshold corresponding to the current adaptive window according to the window signal sequence; Acquire a historical R wave peak point, wherein the historical R wave peak point is the most adjacent R wave peak point in the ECG energy signal and before the current adaptive window; Determine whether the distance between the signal peak point and the historical R wave peak point is greater than a distance threshold; If not, determining whether the signal amplitude corresponding to the signal peak point is greater than the energy threshold; If so, the signal peak point is used as the R wave peak point in the window signal sequence.

4. The method according to claim 3, characterized in that If the distance between the signal peak point and the historical R wave peak point is greater than the distance threshold, the method further includes: Selecting the maximum amplitude from the signal amplitudes corresponding to the signal peak point and the historical R-wave peak point; Determine whether the maximum amplitude is greater than the energy threshold; If so, the signal peak point is used as the R wave peak point in the window signal sequence.

5. The method according to claim 1, characterized in that Based on all R wave peak points in the target ECG signal, an R wave peak envelope curve is generated, including: Performing cubic spline interpolation processing on each R wave peak point to obtain a cubic spline function corresponding to each R wave peak point; Based on the cubic spline function corresponding to each R wave peak point, a cubic spline curve corresponding to each R wave peak point is generated; The R wave peak envelope curve is generated by using the cubic spline curve corresponding to each R wave peak point.

6. The method according to claim 1, characterized in that Using the R wave peak envelope curve and the target electrocardiogram signal, performing respiratory wave signal estimation processing to obtain the respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation processing, including: Performing baseline drift removal processing on the R wave peak envelope curve to obtain a processed R wave peak envelope curve; According to the R wave peak envelope curve, the processed R wave peak envelope curve and the target electrocardiogram signal, and in accordance with the following formula (1), a respiratory wave signal estimation process is performed to obtain the respiratory wave signal; In the above formula (1), H(j) represents the respiratory wave signal, X(j) represents the target ECG signal, I(j) represents the R wave peak envelope curve, and R(j) represents the processed R wave peak envelope curve; Correspondingly, removing the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed includes: The target ECG signal and the respiratory wave signal are subjected to signal differential processing, so as to obtain the target ECG signal with the respiratory wave removed after the signal differential processing.

7. The method according to claim 1, characterized in that Before performing R wave peak detection processing on the target electrocardiogram signal, the method further includes: The target ECG signal is subjected to high-pass filtering using a high-pass zero-phase filter to obtain a processed target ECG signal, so as to perform R-wave peak detection on the processed target ECG signal to obtain all R-wave peak points in the target ECG signal.

8. A device for removing respiratory waves from electrocardiogram signals, characterized in that: include: An R wave detection unit, used for acquiring a target ECG signal, and performing R wave peak detection processing on the target ECG signal, so as to obtain all R wave peak points in the target ECG signal after the R wave peak detection processing; An envelope curve generating unit, for generating an R wave peak envelope curve based on all R wave peak points in the target ECG signal; a respiratory wave estimation unit, configured to perform respiratory wave signal estimation processing using the R wave peak envelope curve and the target electrocardiogram signal, so as to obtain the respiratory wave signal in the target electrocardiogram signal after the respiratory wave signal estimation processing; The denoising unit is used to remove the respiratory wave signal from the target ECG signal to obtain a target ECG signal with the respiratory wave removed.

9. An electronic device, characterized in that: include: A memory, a processor and a transceiver which are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for removing respiratory waves in an electrocardiogram signal as described in any one of claims 1 to 7.

10. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to execute the method for removing respiratory waves from an electrocardiogram signal as claimed in any one of claims 1 to 7.