A method for smoothing electrocardiosignal based on open-close operation

Through the ECG signal smoothing method based on opening and closing operations, the problem of R peak amplitude attenuation in the traditional method is solved, and the original amplitude of the signal R peak is retained after smoothing, thereby improving the diagnostic accuracy of the ECG signal.

CN119606392BActive Publication Date: 2025-10-10HANGZHOU PROTON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411644316.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-10-10
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Traditional ECG signal smoothing methods cause the R peak amplitude of the ECG signal to attenuate when removing noise interference, affecting the diagnostic accuracy. It is difficult to retain the original amplitude of the signal R peak after smoothing.

Method used

An ECG signal smoothing method based on opening and closing operations is adopted. Through signal preprocessing, peak and valley region component acquisition, residual component filtering, combined with mean filtering method, the original amplitude of the signal R peak is retained.

Benefits of technology

On the basis of smoothing the ECG signal, the original amplitude of the signal R peak is effectively retained, thereby improving the accuracy of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119606392B_ABST
    Figure CN119606392B_ABST
Patent Text Reader

Abstract

The application discloses a kind of ECG signal smoothing methods based on open-close operation, comprising the following steps:1) signal pretreatment, remove baseline drift component in signal;2) using closed operation to obtain signal peak area component;3) using open operation to obtain signal valley area component;4) peak area component and valley area component are rejected, and the component remaining to be processed is obtained;5) the remaining component is filtered;6) then the component is superimposed, and the required smoothed signal is obtained.The ECG signal is decomposed into different components by open-close operation in the application, then specific component is filtered and reconstructed, which can effectively retain the original amplitude of ECG signal R peak on the basis of ECG signal smoothing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of electrocardiosignal processing, and particularly relates to a method for smoothing electrocardiosignal based on open-close operation. BACKGROUND

[0002] In the process of capturing electrocardiosignal by an electrocardiograph, interference from a complex surrounding environment is often encountered, so that multiple noise components are mixed in the recorded signal. Especially when a dry electrode is used to record electrocardiosignal, the obtained signal is often accompanied by a large amount of noise interference caused by muscle tremor of the human body, and such noise is difficult to be effectively removed by traditional frequency domain filtering means, thereby bringing inconvenience to observation and diagnosis analysis of medical personnel.

[0003] Traditional electrocardiosignal smoothing filtering methods mostly perform smoothing processing on the whole electrocardiosignal, which can make the electrocardiosignal smooth, but inevitably leads to different degrees of attenuation of the R-peak amplitude of the electrocardiosignal. A small part of research extracts the R-peak of the electrocardiosignal, and then performs smoothing processing on the signal other than the QRS complex, which will smooth the R-peak not extracted, so that the amplitude of the R-peak is significantly lower than that of the nearby R-peak, thereby causing misjudgment of medical personnel. Since the amplitude of the wave peak in the electrocardiosignal has crucial reference value for diagnosing some heart diseases, how to maintain the integrity of the R-peak amplitude of the electrocardiosignal after performing smoothing processing has become a technical problem to be solved in the field of electrocardiosignal processing algorithm. SUMMARY

[0004] In order to overcome the defects of the prior art, the application provides a method for smoothing electrocardiosignal based on open-close operation, which effectively retains the original amplitude of the R-peak of the electrocardiosignal on the basis of smoothing the electrocardiosignal.

[0005] The technical scheme adopted by the application to solve the technical problems is:

[0006] A method for smoothing electrocardiosignal based on open-close operation, comprising the following steps:

[0007] 1) Signal preprocessing, removing the baseline drift component in the signal;

[0008] 2) Signal peak region component acquisition, performing corrosion operation on the signal, and then performing inflation operation to obtain the signal after close operation, i.e. the signal peak region component;

[0009] 3) Signal valley region component acquisition, performing inflation operation on the signal, and then performing corrosion operation to obtain the signal after open operation, i.e. the signal valley region component;

[0010] 4) Residual component acquisition, according to the peak region component signal acquired in step 2) and the valley region component signal acquired in step 3), the peak region component and the valley region component in the original signal are removed, and the residual component signal containing muscle tremor in the baseline region is left;

[0011] 5) Residual component filtering processing, the residual component in 4) is filtered by using the mean filtering method, the mean filtering operation is executed K times in a loop, and the processed residual component RCSigPred is obtained;

[0012] 6) Smooth signal acquisition: component superposition, the three signal components with different characteristics obtained in steps 2), 3) and 5) are combined with each other in the same time domain by addition operation, and the final required smooth signal is obtained.

[0013] Further, in step 1), the baseline drift component in the signal is removed by using the high-pass filtering method of fixed frequency band range, wavelet transform or median filtering method.

[0014] Further, the process of step 2) is as follows: a signal segment is denoted as ecgSeg, the signal length is ecgL, a structure element is defined as Se, the length of Se is SeL, and the minimum value of the difference between the corresponding values of the structure element is found in the range of SeL / 2 before and after a certain point in the signal as the center. Each signal point is traversed in a loop to obtain the signal PE after erosion operation. A certain point in PE is taken as the center, and the maximum value of the sum of the corresponding values of the structure element is found in the range of SeL / 2 before and after the center in a loop. Each signal point is traversed in a loop to obtain the signal PED after closing operation, which is:

[0015] PE n = m i n {P n-SeL / 2+m -Se m ,P n},m=1,2,3,...,SeL

[0016] PE={PE1,PE2,...,PE n},n=1,2,...,ecgL

[0017] PED n =max{PE n-SeL / 2+m +Se m ,PE n},m=1,2,3,...,SeL

[0018] PED={PED1,PED2,...,PED n},n=1,2,...,ecgL

[0019] In the formula, min{} and max{} are functions for finding the minimum and maximum values ​​respectively. n is a point in the signal.

[0020] The process of step 3) is as follows: with a certain point in the signal segment ecgSeg as the center, cyclically search for the maximum sum of the values ​​corresponding to the structure element within the range of SeL / 2 before and after, cyclically traverse each signal point to obtain the signal PD after the expansion operation, and then with a point in the signal PD as the center, cyclically search for the minimum value of the difference with the value corresponding to the structure element within the range of SeL / 2 before and after, cyclically traverse each signal point to obtain the signal PDE after the opening operation, which is:

[0021] PD n =mi n {P n-SeL / 2+m +Se m ,P n},m=1,2,3,...,SeL

[0022] PD={PD1,PD2,...,PD n},n=1,2,...,ecgL

[0023] PDEE n =max{PD n-SeL / 2+m -Se m ,PD n},m=1,2,3...SeL

[0024] PDE={PDE1,PDE2,...,PDE n},m=1,2,...,ecgL。

[0025] The process of step 4) is as follows: based on the peak region component signal PDE obtained in step 2) and the valley region component signal PED obtained in step 3), the peak region component and the valley region component in the signal are removed from the original signal, leaving the residual component signal RCSig containing muscle tremor in the baseline region, which is:

[0026] RCSig n =P n -PED n -PED n ,

[0027] RCSig={RCSig1, RCSig2,...,RCSig n},n=1,2,...,ecgL。

[0028] In step 5), the mean filtering method adopts a five-point three-line smoothing method, which is:

[0029] n=1,2,...,ecgL,k=1,2,...,K

[0030] RCSigPred=f K

[0031] Where a, b, c are filter coefficients, and RCSigPred is the residual component;

[0032] The K value is determined based on the frequency range of the signal after mean filtering. When the frequency domain cumulative energy change in the filtering range of MHz is less than a certain threshold, the filtering process is terminated.

[0033] In the present invention, the five-point three-line smoothing method is only one embodiment, and other mean filtering methods are also within the scope of protection of the invention.

[0034] Preferably, in step 5), the method for determining the K value is as follows: Fourier transform is used to obtain the signal y after the k-th mean filtering k The frequency domain representation f k , the frequency sequence is X k Then we get f k The energy accumulation and S k , calculate S k The point-by-point change diffS k When the cumulative energy change in M ​​Hz is less than Thr, the cycle is terminated. The K value at this time is the required number of cycles, which is:

[0035]

[0036] X(n)=(n*Fs) / ecgL,

[0037]

[0038] diffS(m)=S(m+1)-S(m),m=1,2,...,N-1

[0039] Where e is the base of natural logarithms and i is the imaginary unit;

[0040] When X(n)=M Hz, diffS(n) <Thr时,终止循环。

[0041] In step 6), the three signal components with different characteristics obtained in steps 2), 3) and 5) are combined with each other through addition operation in the same time domain to obtain:

[0042] ecgSegFilt n =PED n +PDEn +RCSigPred n n=1,2,...,ecgL.

[0043] The beneficial effects of the present application mainly manifest in that the method retains the amplitude of the original peak value of the ECG signal on the basis of the smooth ECG signal. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 is a flow chart of the ECG signal smoothing method based on the open-close operation of the present application;

[0045] Figure 2 is a schematic diagram of the extraction of a segment of the original ECG signal and the peak value area component in step 2) provided by the present application;

[0046] Figure 3 is a schematic diagram of the extraction of a segment of the original ECG signal and the valley value area component in step 3) provided by the present application;

[0047] Figure 4 is a schematic diagram of the remaining component in step 4) provided by the present application;

[0048] Figure 5 is a schematic diagram of the remaining component after the mean filtering in step 5) provided by the present application.

[0049] Figure 6 is a schematic diagram of the frequency domain representation of the filtered signal of the remaining component in step 5) provided by the present application

[0050] Figure 7 is a schematic diagram of the energy accumulation of the frequency domain signal in step 5) provided by the present application

[0051] Figure 8 is a schematic diagram of the comparison between the smoothed signal and the original signal obtained by the ECG signal smoothing method based on the open-close operation provided by the present application. DETAILED DESCRIPTION

[0052] The present application will be further described below with reference to the accompanying drawings.

[0053] Referring to Figures 1-8 The ECG signal smoothing method based on the open-close operation provided by the present application comprises the following steps:

[0054] As shown in Figure 1 The ECG signal smoothing method based on the open-close operation provided by the present application comprises the following steps:

[0055] 1) Signal preprocessing: First, the baseline drift component in the signal is removed. A high-pass filtering method with a fixed frequency band can be used, or wavelet transform, median filtering and other methods can be used to remove the baseline drift component in the signal. The present invention adopts the median filtering method.

[0056] 2) Acquisition of signal peak area components, such as Figure 2 As shown, let the original signal be ecgSeg, the signal length be ecgL, and the nth point in the signal be P n, (n=1,2,...,ecgL). Define a structure element Se, the length of Se is SeL, and the mth point in the structure element is Se m (m=1,2,...,SeL), SeL is 0.2 times the sampling rate (sampR), that is, SeL=0.2*sampR. n As the center, the minimum value of the difference between the corresponding structural element is cyclically searched within the range of SeL / 2 before and after, and is used as P n Signal point PE after point corrosion operation n , loop through each signal point and get the signal PE after corrosion operation. Then use PE n As the center, the maximum value of the sum of the structural elements is cyclically searched within the range of SeL / 2 before and after as the signal PED after the final closed operation n , loop through each signal point, as follows:

[0057] PE n =mi n {P n-SeL / 2+m -Se m ,P n},m=1,2,3,...,SeL

[0058] PE={PE1,PE2,...,PE n},n=1,2,...,ecgL

[0059] PED n =max{PE n-SeL / 2+m +Se m ,PE n},m=1,2,3,...,SeL

[0060] PED={PED1,PED2,...,PED n},n=1,2,...,ecgL

[0061] Where PED is the extracted peak area component signal ( Figure 2 signal shown by the dotted line).

[0062] 3) Obtaining the signal valley area component; such as Figure 3As shown, the nth point P of the original signal segment ecgSeg n As the center, the maximum value is found within the range of SeL / 2 before and after the expansion operation as the signal PD n , loop through each signal point to get the signal PD after expansion operation, and then use the nth point PD of signal PD n As the center, the minimum value is found within the range of SeL / 2 before and after the loop as the signal PDE after the opening operation n , loop through each signal point. Specifically:

[0063] PD n =mi n {P n-SeL / 2+m +Se m ,P n},m=1,2,3,...,SeL

[0064] PD={PD1,PD2,...,PD n},n=1,2,...,ecgL

[0065] PDE n =max{PD n-SeL / 2+m -Se m ,PD n},m=1,2,3,...,SeL

[0066] PDE={PDE1,PDE2,...,PDE n},n=1,2,...,ecgL

[0067] The PDE in the formula is the extracted valley region component signal (such as Figure 3 Signal shown by dotted line)

[0068] 4) Obtain the remaining components, such as Figure 4 As shown, the peak area of ​​the signal in step 2) and the valley area in step 3) are removed from the original signal, leaving the residual component signal RCSig in the baseline area, specifically:

[0069] RCSig n =P n -PED n -PDE n ,

[0070] RCSig={RCSig1, RCSig2,...,RCSig n},n=1,2,...,ecgL

[0071] 5) Residual component filtering, such as Figure 5As shown, the residual component in 4) is filtered by the mean filtering method, and the operation is iterated K times to obtain the processed residual component RCSigPred. The mean filtering method adopts the five-point three-line smoothing method, specifically:

[0072] n=1,2...ecgL,k=1,2,...,K

[0073] RCSigPred=y K

[0074] y in the formula k is the signal after the kth mean filter, and K is the total number of loop executions. a, b, c are filter coefficients, where a = -3, b = 12, and c = 17. The K value is determined as follows: Use Fourier transform to obtain the signal y after the kth mean filter. k The frequency domain representation f k , the frequency sequence is X k ,like Figure 6 As shown. Then we get f k The energy accumulation and S k ,like Figure 7 As shown, calculate S k The point-by-point change diffS k When the cumulative energy change in M ​​Hz is less than Thr, the cycle is terminated and the K value at this time is the required number of cycles.

[0075] Specifically:

[0076]

[0077] Where e is the base of natural logarithms and i is the imaginary unit.

[0078] X(n)=(n*Fs) / ecgL,

[0079]

[0080] diffS(m)=S(m+1)-S(m),m=1,2,...,N-1

[0081] When C(n)=M Hz, diffS(n) <Thr时,终止循环。这里的数值仅为一种实施例,其他数值也在权利保护范围内,另外请注意,五点三线平滑方法也只是一种实施例,其他的均值滤波方法也在该发明权利保护范围。

[0082] 6) Obtaining smoothed signal: superimpose the signal components obtained in step 2), step 3) and step 5) to obtain the final required smoothed signal, such asFigure 8 As shown by the dotted line, the following applies:

[0083] ecgSegFilt n = PDE n + PDE n + RCSigPred n , n = 1, 2,..., ecgL.

[0084] The above-described embodiments have described the technical solutions of the present application in detail, and the present application can effectively retain the original amplitude of the R peak of the electrocardiosignal on the basis of smoothing the electrocardiosignal.

[0085] The embodiments described in the specification are only enumerations of the implementation forms of the inventive concept, and are only used for the purpose of description. The protection scope of the present application should not be regarded as being limited to the specific forms presented in the embodiments, and the protection scope of the present application also covers equivalent technical means that can be thought of by those skilled in the art according to the inventive concept.

Claims

1. A method for smoothing an ECG signal based on opening and closing operations, characterized in that: The method comprises the following steps: 1) Signal preprocessing to remove the baseline drift component in the signal; 2) Obtaining the signal peak area component: The signal is subjected to an erosion operation and then an expansion operation to obtain the signal after the closing operation, that is, the signal peak area component; 3) Obtaining the components in the valley region of the signal: the signal is dilated and then corroded to obtain the signal after the opening operation, i.e., the components in the valley region of the signal; 4) Residual component acquisition: Based on the peak region component signal obtained in step 2) and the valley region component signal obtained in step 3), the peak region component and the valley region component in the signal are removed from the original signal, leaving the residual component signal containing muscle tremor in the baseline region; 5) Residual component filtering: the residual component in 4) is filtered by using the mean filtering method, and the mean filtering operation is performed K times in a loop to obtain the processed residual component; 6) Obtaining a smooth signal: Component superposition: The three signal components with different characteristics obtained in steps 2), 3), and 5) are combined with each other through addition operations in the same time domain to obtain the final required smooth signal.

2. The ECG signal smoothing method based on opening and closing operations according to claim 1, characterized in that: In the step 1), a high-pass filtering method with a fixed frequency band, a wavelet transform or a median filtering method is used to remove the baseline drift component in the signal.

3. The ECG signal smoothing method based on opening and closing operations according to claim 1 or 2, characterized in that: The process of step 2) is as follows: a segment of signal is ecgSeg, and the signal length is , define the structural element as Se, the length of Se is SeL, take a point in the signal as the center, and / 2 range to find the minimum value of the difference with the corresponding value of the structural element, loop through each signal point, and get the signal after the corrosion operation ;by A point in the center, front and back / 2 range to find the maximum value of the sum of the corresponding values ​​of the structural elements, and loop through each signal point to obtain the signal after the closed operation ,for: , , , , In the formula, min{} and max{} are functions for finding the minimum and maximum values ​​respectively. The first structural element m Points, is a point in the signal.

4. The ECG signal smoothing method based on opening and closing operations according to claim 3, characterized in that: The process of step 3) is as follows: take a certain point of the signal segment ecgSeg as the center, / 2 range to find the maximum value of the sum of the corresponding values ​​of the structural element, and loop through each signal point to obtain the signal after the expansion operation , then with the signal The point in the middle is the center, and the front and back / 2 range to find the minimum value of the difference with the corresponding value of the structural element. Loop through each signal point to obtain the signal after the opening operation. ,for: , , , 。 5. The ECG signal smoothing method based on opening and closing operations according to claim 4, characterized in that: The process of step 4) is as follows: according to the peak area component signal obtained in step 2) and the valley region component signal obtained in step 3) , remove the peak area component and valley area component from the original signal, leaving the remaining component signal containing muscle tremor in the baseline area ,for: , 。 6. The ECG signal smoothing method based on opening and closing operations according to claim 5, characterized in that: In step 5), the mean filtering method adopts a five-point three-line smoothing method, which is: , , , Where a, b, c are filter coefficients. is the remaining amount; The K value is determined based on the frequency range of the signal after mean filtering. When the frequency domain cumulative energy change when the filtering range is M Hz is less than a certain threshold, the filtering process is terminated.

7. The ECG signal smoothing method based on opening and closing operations according to claim 6, characterized in that: In step 5), the method for determining the K value is as follows: Fourier transform is used to obtain the signal after the k-th mean filtering. Frequency domain representation of , the frequency sequence is , and then obtain The energy accumulation and ,calculate The point-by-point change of When the cumulative energy change in M ​​Hz is less than Thr, the cycle is terminated. The K value at this time is the required number of cycles, which is: , , , , Where e is the base of natural logarithms and i is the imaginary unit; when = When M Hz, , terminates the loop.

8. The ECG signal smoothing method based on opening and closing operations according to claim 6, characterized in that: In step 6), the three signal components with different characteristics obtained in steps 2), 3) and 5) are combined with each other through addition operation in the same time domain to obtain: 。

Citation Information

Patent Citations

  • Photoelectric volume wave-based breathing rate monitoring method

    CN101732050A

  • Apparatus and method for recording a vital parameter

    CN102238898A