Electrocardiosignal adaptive filtering method and heart sound electrocardiosignal filtering method and device

By using real-time spectrum analysis and band-stop filter technology, the system dynamically adapts to noise changes in heart sound and electrocardiogram signals, solving the problem of insufficient adaptability of traditional filtering methods and achieving improved electrocardiogram signal quality and diagnostic accuracy.

CN120950833APending Publication Date: 2025-11-14CHONGQING XINYIN XINDIAN MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511043403.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Traditional filtering methods are difficult to adapt to the complexity of heart sound and electrocardiogram signals and the time-varying nature of noise, resulting in a decline in the quality of electrocardiogram signals and an increase in the risk of misdiagnosis and missed diagnosis.

Method used

Abnormal frequency points are identified through real-time spectrum analysis, and band-stop filters are constructed to filter the ECG signal, dynamically adapting to noise changes. IIR or FIR band-stop filters are used for multi-band noise suppression and adaptive spectral attenuation.

Benefits of technology

It effectively removes various types of noise, improves the signal-to-noise ratio, preserves the key features of ECG signals, provides high-quality signals for the diagnosis of heart diseases, and improves diagnostic accuracy by synchronously acquiring and filtering heart sounds and ECG signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950833A_ABST
    Figure CN120950833A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of biomedical signal processing, and provides an electrocardiosignal adaptive filtering method and a heart sound electrocardiosignal filtering method and device. The electrocardiosignal adaptive filtering method comprises the following steps: acquiring an original electrocardiosignal; performing spectral analysis on the original electrocardiosignal and identifying an abnormal frequency point, wherein the amplitude of the abnormal frequency point is greater than an amplitude threshold; if the abnormal frequency point is identified, constructing a band elimination filter according to the information of the abnormal frequency point, filtering the original electrocardiosignal by using the band elimination filter, and outputting the filtered original electrocardiosignal; and if the abnormal frequency point is not identified, outputting the original electrocardiosignal. The invention further discloses an electrocardiosignal self-adaptive filtering device, a heart sound electrocardiosignal filtering method, a heart sound electrocardiosignal filtering device, a computer program product and electronic equipment. The method automatically adapts to changes of electrocardiosignals and noise, various kinds of noise are effectively removed, the signal-to-noise ratio of the signals is increased, and key features of the electrocardiosignals are reserved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biomedical signal processing technology, and in particular to an adaptive filtering method for electrocardiogram (ECG) signals, a filtering method and apparatus for heart sound ECG signals. Background Technology

[0002] Heart sounds and electrocardiogram (ECG) signals contain rich physiological information about the heart and are of great significance for the diagnosis of heart diseases. However, in actual acquisition, ECG signals are highly susceptible to interference from various noises, such as power frequency interference, electromyographic interference, and baseline drift, and these interferences are time-varying. These noises degrade the quality of ECG signals, making it difficult for doctors to accurately assess the health of the heart and increasing the risk of misdiagnosis and missed diagnosis. Traditional filtering methods, such as fixed-parameter low-pass, high-pass, and band-pass filters, are ill-suited to the complexity and variability of heart sound and ECG signals, and cannot effectively remove noise while preserving signal characteristics.

[0003] Related technologies employ adaptive filtering algorithms (such as Least Mean Square (LMS) and Recursive Least Squares (RLS) algorithms) to filter out noise in heart sound and electrocardiogram (ECG) signals. This method first acquires the heart sound and ECG signals, then performs preprocessing, and finally selects a suitable adaptive filtering algorithm and initializes its parameters. The input signal and reference signal are processed to calculate the error signal, and the filter parameters are adjusted based on the error. This process continues until convergence is achieved, and finally, the filtered heart sound and ECG signals are output. While this method can adaptively select the filtering algorithm, it relies on fixed parameters such as the center frequency and stopband attenuation of the filtering algorithm, making it unable to handle the time-varying nature of noise. Furthermore, it suffers from slow iterative convergence, which can lead to signal distortion.

[0004] Therefore, a more effective filtering method is needed to improve the quality of electrocardiogram signals. Summary of the Invention

[0005] This application aims to at least solve the technical problems existing in the prior art and provide an adaptive filtering method for electrocardiogram signals, a filtering method and apparatus for heart sound electrocardiogram signals.

[0006] In a first aspect, this application provides an adaptive filtering method for electrocardiogram (ECG) signals, comprising: acquiring a raw ECG signal; performing spectral analysis on the raw ECG signal and identifying abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than an amplitude threshold; if an abnormal frequency point is identified, constructing a band-stop filter based on the information of the abnormal frequency point, using the band-stop filter to filter the raw ECG signal, and outputting the filtered raw ECG signal; if no abnormal frequency point is identified, outputting the raw ECG signal.

[0007] Preferably, the band-stop filter is an IIR band-stop filter.

[0008] Preferably, when one or more abnormal frequency points are identified, a corresponding band-stop filter is constructed for each abnormal frequency point based on the information of each abnormal frequency point, and the original electrocardiogram signal is filtered using the band-stop filter corresponding to one or more abnormal frequency points.

[0009] Preferably, when two or more abnormal frequency points are identified, the two or more abnormal frequency points are clustered to obtain one or more clusters. The frequency width of each cluster is not greater than the maximum allowable bandwidth. A corresponding band-stop filter is constructed for each cluster, and the original electrocardiogram signal is filtered using the band-stop filter corresponding to one or more clusters.

[0010] Secondly, this application provides an adaptive filtering device for electrocardiogram (ECG) signals, used to implement the adaptive filtering method for ECG signals provided in the first aspect of this application, comprising: a first acquisition module for acquiring raw ECG signals; an abnormal frequency point identification module for performing spectral analysis on the raw ECG signals and identifying abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than an amplitude threshold; and a filtering module for constructing a band-stop filter based on the information of the abnormal frequency points if an abnormal frequency point is identified, filtering the raw ECG signals using the band-stop filter, and outputting the filtered raw ECG signals; and outputting the raw ECG signals if no abnormal frequency points are identified.

[0011] Thirdly, this application provides a method for filtering heart sound and electrocardiogram signals, including:

[0012] The system simultaneously acquires raw electrocardiogram (ECG) signals and raw heart sound signals; performs spectral analysis on the raw ECG signals and identifies abnormal frequency points, where the amplitude of the abnormal frequency points is greater than an amplitude threshold; if an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point, and the raw ECG signals are filtered using the band-stop filter, with the filtered raw ECG signals used as the first ECG signal; if no abnormal frequency point is identified, the raw ECG signals are used as the first ECG signal; a preset heart sound frequency band signal is extracted from the raw heart sound signals; and the first ECG signal and the preset heart sound frequency band signal are output simultaneously.

[0013] Preferably, when two or more abnormal frequency points are identified, the two or more abnormal frequency points are clustered to obtain one or more clusters. The frequency width of each cluster is less than the maximum allowable bandwidth. A corresponding band-stop filter is established for each cluster, and the original electrocardiogram signal is filtered using the band-stop filter corresponding to one or more clusters.

[0014] Fourthly, this application provides an adaptive filtering device for heart sound and electrocardiogram (ECG) signals, used to implement the heart sound and ECG signal filtering method described in the third aspect of this application, comprising: a synchronous acquisition module for synchronously acquiring raw ECG signals and raw heart sound signals; an ECG filtering module for performing spectral analysis on the raw ECG signals and identifying abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than an amplitude threshold; if an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point, and the raw ECG signals are filtered using the band-stop filter, and the filtered raw ECG signals are used as the first ECG signal; if no abnormal frequency point is identified, the raw ECG signals are used as the first ECG signal; a heart sound filtering module for extracting a preset heart sound frequency band signal from the raw heart sound signal; and a synchronous output module for synchronously outputting the first ECG signal and the preset heart sound frequency band signal.

[0015] Fifthly, this application provides a computer program product, including a computer program, characterized in that, when executed by a processor, the computer program implements the steps of the method provided in the first or third aspect of this application.

[0016] In a sixth aspect, this application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the adaptive filtering method for electrocardiogram signals provided in the first aspect of this application, or to execute the filtering method for heart sounds and electrocardiogram signals provided in the third aspect of this application.

[0017] The beneficial technical effects of this application are as follows: In the process of ECG signal filtering, real-time spectrum analysis is performed on the acquired raw ECG signal, abnormal frequency points are identified through amplitude thresholds, and a band-stop filter is constructed based on the information of abnormal frequency points to realize dynamic band-stop filtering based on real-time ECG signals. When there is more than one abnormal frequency point, multi-band noise synchronous suppression and adaptive spectrum attenuation are achieved, avoiding the signal distortion problem caused by slow iterative convergence of traditional adaptive filtering methods. This application can automatically adapt to changes in ECG signals and noise, effectively remove various types of noise, improve the signal-to-noise ratio of the signal, and retain the key features of the ECG signal, providing a high-quality ECG signal basis for subsequent diagnosis of heart diseases. In addition, the heart sound ECG signal filtering method, in addition to having the beneficial technical effects of the ECG signal adaptive filtering method, also has the ability to simultaneously acquire raw ECG signals and raw heart sound signals, filter them separately, and output them synchronously. By utilizing the temporal synchronization relationship between ECG signals and heart sound signals, accurate subsequent disease diagnosis can be performed. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the adaptive filtering method for the central electrical signal in Embodiment 1 of the present invention;

[0019] Figure 2 This is a system block diagram of the adaptive filtering device for the central electrical signal in Embodiment 2 of the present invention;

[0020] Figure 3 This is a flowchart illustrating the central tone electrocardiogram signal filtering method of Embodiment 3 of the present invention;

[0021] Figure 4 This is a system block diagram of the center tone electrocardiogram signal filtering device in Embodiment 4 of the present invention;

[0022] Figure 5 This is a schematic diagram of the electronic device in Embodiment 6 of the present invention. Detailed Implementation

[0023] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0024] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0025] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0026] The ECG signal adaptive filtering method or heart sound ECG signal filtering method provided by this invention can be executed by at least one of the following electronic devices: a server, a terminal, or other devices that can be configured to execute the method provided in the embodiments of this application. In other words, the ECG signal adaptive filtering method or heart sound ECG signal filtering method can be executed by software or hardware installed on a terminal device or a server device, where the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), big data, and artificial intelligence platforms.

[0027] Example 1

[0028] This embodiment provides an adaptive filtering method for electrocardiogram (ECG) signals. In a preferred embodiment, please refer to... Figure 1 The filtering method includes:

[0029] Step S101: Obtain the raw electrocardiogram signal.

[0030] In this embodiment, changes in body surface potential caused by cardiac electrical activity are detected by electrocardiogram (ECG) electrodes applied to the human body, and the analog signals output by the ECG electrodes are acquired using a data acquisition card (which can be an analog-to-digital converter module), thereby obtaining the raw digital ECG signal. The sampling frequency of the data acquisition card is not limited to 500Hz.

[0031] In this embodiment, preferably, a signal conditioning circuit is used to amplify and filter the analog signal output from the ECG electrodes. The signal conditioning circuit includes an operational amplifier circuit and a filter circuit. The operational amplifier circuit amplifies the weak analog signal output from the ECG electrodes to match its amplitude to the requirements of subsequent processing. The filter circuit includes, but is not limited to, power frequency notch filters and low-pass filters to reduce the impact of noise on subsequent processing. A data acquisition card is used to acquire the analog signal output from the signal conditioning circuit.

[0032] In this embodiment, preferably, the output signal of the acquisition card is preprocessed, and the preprocessed signal is used as the raw ECG signal. The preprocessing includes digital filtering, which includes power frequency notch filtering and low-pass digital filtering to reduce the impact of noise on the subsequent adaptive filtering process.

[0033] Step S102: Perform spectrum analysis on the original electrocardiogram signal and identify abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than the amplitude threshold.

[0034] In this embodiment, a Discrete Fourier Transform (DFT) is performed on the original electrocardiogram (ECG) signal to obtain the amplitude at different frequency points. The amplitude threshold can be set empirically or determined by a preset multiple of the maximum amplitude obtained after the DFT of a clean, noise-free, or low-noise ECG signal. In step S102, the amplitude of each frequency point is compared with the amplitude threshold, and frequency points with amplitudes greater than the amplitude threshold are identified as abnormal frequency points.

[0035] Step S103: If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point. The original ECG signal is filtered using the band-stop filter, and the filtered original ECG signal is output. If no abnormal frequency point is identified, the original ECG signal is output.

[0036] In this embodiment, the band-stop filter can be an IIR band-stop filter or an FIR band-stop filter. Preferably, the band-stop filter is an IIR band-stop filter, which has a low order, high computational efficiency, and is suitable for real-time processing.

[0037] For example, the band-stop filter is an IIR band-stop filter, whose construction parameters include the stopband center frequency, stopband bandwidth, sampling frequency, and stopband attenuation. The stopband bandwidth and sampling frequency can be fixed, while the stopband center frequency and stopband attenuation are determined using information from abnormal frequencies. This information includes the frequency and amplitude of the abnormal frequency. The stopband center frequency is determined by the frequency of the abnormal frequency. The stopband attenuation is determined by the amplitude of the abnormal frequency and an amplitude threshold. After processing by the band-stop filter, the amplitude of the abnormal frequency decreases to the amplitude threshold, thereby reducing noise.

[0038] In a preferred embodiment, to filter noise more accurately, when more than one abnormal frequency point is identified, a corresponding band-stop filter is constructed for each abnormal frequency point based on its information. The original ECG signal is then filtered using the band-stop filters corresponding to the more than one abnormal frequency point. Each abnormal frequency point corresponds to one band-stop filter, and the band-stop filters corresponding to more than one abnormal frequency point are cascaded to form a band-stop filter bank. After the original ECG signal is input into the band-stop filter bank, the filtered original ECG signal is obtained.

[0039] For example, f is identified n1 f n2 f n3 Three abnormal frequency points. n1 50 / 60Hz represents power frequency interference; f n2 <0.5Hz indicates low-frequency drift; f n3 The frequency is 300Hz, which falls within the electromyographic noise range of 20–500Hz. According to f n1 The first band-stop filter is set with its amplitude, specifically f. n1 The stopband center frequency of the first band-stop filter is fn1 The amplitude and amplitude threshold determine the stopband attenuation of the first band-stop filter, and so on, according to f. n2 The second band-stop filter is set according to its amplitude, based on f n3 A third band-stop filter is set along with its amplitude. The first, second, and third band-stop filters are cascaded to form a filter bank, through which the raw ECG signal is filtered.

[0040] In a preferred embodiment, when there are many abnormal frequency points, setting a band-stop filter for each abnormal frequency point would reduce processing efficiency. Therefore, when two or more abnormal frequency points are identified, they are clustered to obtain one or more clusters, with the frequency bandwidth of each cluster not exceeding the maximum allowable bandwidth Δf. max A corresponding band-stop filter is constructed for each cluster, and the original ECG signal is filtered using the band-stop filters corresponding to more than one cluster. The frequency width of each cluster is the frequency difference between the maximum and minimum abnormal frequency points within the cluster. If there is only one abnormal frequency point in a cluster, its frequency width is 0.

[0041] In this embodiment, the maximum permissible bandwidth can be the stopband bandwidth of the band-stop filter. Clustering two or more anomalous frequency points to obtain one or more clusters includes:

[0042] Step A: Set a label variable for each anomalous frequency point, including unclustered and clustered labels; initialize the label variables of all anomalous frequency points to unclustered.

[0043] Step B: Iterate through the abnormal frequency points whose label variables are not clustered in ascending order of frequency, and execute:

[0044] The frequency of the currently traversed label variable that is an unclustered anomaly frequency point is taken as the starting frequency f. s Determine the frequency range (f) s ,f s +Δf max If there are any abnormal frequencies within the range, and if no abnormal frequencies exist, then the abnormal frequencies whose label variable is currently unclustered are treated as a separate cluster, and the label variable of the abnormal frequencies whose label variable is currently unclustered is updated to be clustered. If abnormal frequencies exist, then the abnormal frequencies whose label variable is currently unclustered and their frequency range (f) are treated as clustered. s ,f s +Δf max The abnormal frequency points within the range are grouped together into a cluster, and the currently traversed label variable is set to the unclustered abnormal frequency points and the frequency range (f). s ,f s +Δf maxThe label variables of all abnormal frequency points within the range are updated to be clustered. If the label variables of all abnormal frequency points are clustered, the clustering process is complete. If there are still abnormal frequency points whose label variables are not clustered, return to step B for the next traversal.

[0045] The above clustering method incorporates the maximum allowable bandwidth Δf max This refers to the stopband bandwidth of the band-stop filter, which allows for the simultaneous filtering of more than one abnormal frequency point, and the frequency width of the filter matches the operating frequency band of the band-stop filter, thus improving filtering efficiency while ensuring filtering quality.

[0046] In this embodiment, the step of constructing a corresponding band-stop filter for each cluster mainly involves determining the stopband center frequency and stopband attenuation of the band-stop filter based on the cluster information. For a cluster containing only one anomalous frequency, the band-stop filter for that cluster is configured as follows: the frequency of the anomalous frequency within the cluster is used as the stopband center frequency of the corresponding band-stop filter, and the stopband attenuation of the corresponding band-stop filter is determined based on the amplitude and amplitude threshold of the anomalous frequency within the cluster. For a cluster containing two or more anomalous frequencies, the anomalous frequency with the largest amplitude is selected as the stopband center frequency of the corresponding band-stop filter, and the stopband attenuation of the corresponding band-stop filter is determined based on the amplitude of the anomalous frequency with the largest amplitude and the amplitude threshold.

[0047] Example 2

[0048] This embodiment provides an adaptive ECG signal filtering device for the adaptive ECG signal filtering method of Embodiment 1. In a preferred embodiment of this embodiment, please see... Figure 2 The device includes: a first acquisition module for acquiring raw electrocardiogram (ECG) signals; an abnormal frequency point identification module for performing spectral analysis on the raw ECG signals and identifying abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than an amplitude threshold; and a filtering module for constructing a band-stop filter based on the information of the abnormal frequency points if abnormal frequency points are identified, filtering the raw ECG signals using the band-stop filter, and outputting the filtered raw ECG signals; and outputting the raw ECG signals if no abnormal frequency points are identified.

[0049] In this embodiment, the first acquisition module, the abnormal frequency point identification module, and the filtering module correspond one-to-one with steps S101, S102, and S103 in Embodiment 1, and will not be described again here.

[0050] Example 3

[0051] This embodiment provides a method for filtering heart sound and electrocardiogram signals. In a preferred embodiment, please see... Figure 3 The method includes:

[0052] Step S201: Simultaneously acquire the raw electrocardiogram signal and the raw heart sound signal.

[0053] In this embodiment, changes in body surface potential caused by cardiac electrical activity are detected by electrocardiogram (ECG) electrodes applied to the human body. Sound signals during cardiac contraction are acquired by a sound sensor applied to the human body. A data acquisition card (which can be an analog-to-digital converter) acquires the analog signals output from the ECG electrodes and the analog signals output from the sound sensor, thereby obtaining the raw digital ECG signal and raw heart sound signal. The sampling frequency of the data acquisition card is not limited to 500Hz.

[0054] In this embodiment, preferably, a signal conditioning circuit is used to amplify and filter the analog signal output from the ECG electrodes. The signal conditioning circuit includes an operational amplifier circuit and a filter circuit. The operational amplifier circuit amplifies the weak analog signal output from the ECG electrodes to match its amplitude to the requirements of subsequent processing. The filter circuit includes, but is not limited to, power frequency notch filters and low-pass filters to reduce the impact of noise on subsequent processing. A data acquisition card is used to acquire the analog signal output from the signal conditioning circuit. Similarly, a heart sound signal conditioning circuit is used to amplify and filter the analog signal output from the sound sensor, which will not be described in detail here.

[0055] In this embodiment, preferably, the output signal of the acquisition card is preprocessed, and the preprocessed signal is used as the original ECG signal / original heart sound signal. The preprocessing includes digital filtering, which includes power frequency notch filtering and / or low-pass digital filtering to reduce the impact of noise on the subsequent adaptive filtering process.

[0056] Step S202: Extract the preset heart sound segment signal from the original heart sound signal.

[0057] In this embodiment, the preset heart sound frequency band is not limited to the first heart sound (concentrated at 50-100Hz), the second heart sound (concentrated at 50-200Hz), the third heart sound (concentrated at 20-50Hz), the fourth heart sound (concentrated at 20-50Hz), low-frequency heart murmurs (concentrated at 100-200Hz), high-frequency heart murmurs (concentrated at 200-600Hz), or any other required frequency band or combination of frequency bands. A corresponding bandpass filter is set according to the preset heart sound frequency band. The original heart sound signal is processed by the bandpass filter and then output as a signal in the preset heart sound frequency band.

[0058] Step S203: Perform spectrum analysis on the original electrocardiogram signal and identify abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than the amplitude threshold.

[0059] In this embodiment, a Discrete Fourier Transform (DFT) is performed on the original electrocardiogram (ECG) signal to obtain the amplitude at different frequency points. The amplitude threshold can be set empirically or determined by a preset multiple of the maximum amplitude obtained after the DFT of a clean, noise-free, or low-noise ECG signal. In step S203, the amplitude at each frequency point is compared with the amplitude threshold, and frequency points with amplitudes greater than the amplitude threshold are identified as abnormal frequency points.

[0060] Step S204: If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point. The original ECG signal is filtered using the band-stop filter, and the filtered original ECG signal is used as the first ECG signal. If no abnormal frequency point is identified, the original ECG signal is used as the first ECG signal.

[0061] In this embodiment, the band-stop filter can be an IIR band-stop filter or an FIR band-stop filter. Preferably, the band-stop filter is an IIR band-stop filter, which has a low order, high computational efficiency, and is suitable for real-time processing.

[0062] For example, the band-stop filter is an IIR band-stop filter, whose construction parameters include the stopband center frequency, stopband bandwidth, sampling frequency, and stopband attenuation. The stopband bandwidth and sampling frequency can be fixed, while the stopband center frequency and stopband attenuation are determined using information from abnormal frequencies. This information includes the frequency and amplitude of the abnormal frequency. The stopband center frequency is determined by the frequency of the abnormal frequency. The stopband attenuation is determined by the amplitude of the abnormal frequency and an amplitude threshold. After processing by the band-stop filter, the amplitude of the abnormal frequency decreases to the amplitude threshold, thereby reducing noise.

[0063] Step S205: Simultaneously output the first electrocardiogram signal and the preset cardiac frequency band signal.

[0064] By using the synchronously output first electrocardiogram signal and preset heart sound frequency band signals to draw an electrocardiogram and heart sound frequency chart, heart sounds and electrocardiograms can be observed simultaneously, which can detect more types of problems and is more accurate than traditional electrocardiograms in diagnosing existing heart problems.

[0065] In this embodiment, steps S202, S203, and S204 can be executed in parallel or sequentially.

[0066] In a preferred embodiment, to filter noise more accurately, when more than one abnormal frequency point is identified, a corresponding band-stop filter is constructed for each abnormal frequency point based on its information. The original ECG signal is then filtered using the band-stop filters corresponding to the more than one abnormal frequency point. Each abnormal frequency point corresponds to one band-stop filter, and the band-stop filters corresponding to more than one abnormal frequency point are cascaded to form a band-stop filter bank. After the original ECG signal is input into the band-stop filter bank, the filtered original ECG signal is obtained.

[0067] For example, f is identified n1 f n2 f n3 Three abnormal frequency points. n1 50 / 60Hz represents power frequency interference; f n2 <0.5Hz indicates low-frequency drift; f n3 The frequency is 300Hz, which falls within the electromyographic noise range of 20–500Hz. According to f n1 The first band-stop filter is set with its amplitude, specifically f. n1 The stopband center frequency of the first band-stop filter is f n1 The amplitude and amplitude threshold determine the stopband attenuation of the first band-stop filter, and so on, according to f. n2 The second band-stop filter is set according to its amplitude, based on f n3 A third band-stop filter is set along with its amplitude. The first, second, and third band-stop filters are cascaded to form a filter bank, through which the raw ECG signal is filtered.

[0068] In a preferred embodiment, when there are many abnormal frequency points, setting a band-stop filter for each abnormal frequency point would reduce processing efficiency. Therefore, when two or more abnormal frequency points are identified, they are clustered to obtain one or more clusters, with the frequency bandwidth of each cluster not exceeding the maximum allowable bandwidth Δf. max A corresponding band-stop filter is constructed for each cluster, and the original ECG signal is filtered using the band-stop filters corresponding to more than one cluster. The frequency width of each cluster is the frequency difference between the maximum and minimum abnormal frequency points within the cluster. If there is only one abnormal frequency point in a cluster, its frequency width is 0.

[0069] In this embodiment, the maximum permissible bandwidth can be the stopband bandwidth of the band-stop filter. Clustering two or more anomalous frequency points to obtain one or more clusters includes:

[0070] Step A: Set a label variable for each anomalous frequency point, including unclustered and clustered labels; initialize the label variables of all anomalous frequency points to unclustered.

[0071] Step B: Iterate through the abnormal frequency points whose label variables are not clustered in ascending order of frequency, and execute:

[0072] The frequency of the currently traversed label variable that is an unclustered anomaly frequency point is taken as the starting frequency f. s Determine the frequency range (f) s ,f s +Δf maxIf there are any abnormal frequencies within the range, and if no abnormal frequencies exist, then the abnormal frequencies whose label variable is currently unclustered are treated as a separate cluster, and the label variable of the abnormal frequencies whose label variable is currently unclustered is updated to be clustered. If abnormal frequencies exist, then the abnormal frequencies whose label variable is currently unclustered and their frequency range (f) are treated as clustered. s ,f s +Δf max The abnormal frequency points within the range are grouped together into a cluster, and the currently traversed label variable is set to the unclustered abnormal frequency points and the frequency range (f). s ,f s +Δf max The label variables of all abnormal frequency points within the range are updated to be clustered. If the label variables of all abnormal frequency points are clustered, the clustering process is complete. If there are still abnormal frequency points whose label variables are not clustered, return to step B for the next traversal.

[0073] The above clustering method incorporates the maximum allowable bandwidth Δf max This refers to the stopband bandwidth of the band-stop filter, which allows for the simultaneous filtering of more than one abnormal frequency point, and the frequency width of the filter matches the operating frequency band of the band-stop filter, thus improving filtering efficiency while ensuring filtering quality.

[0074] In this embodiment, the step of constructing a corresponding band-stop filter for each cluster mainly involves determining the stopband center frequency and stopband attenuation of the band-stop filter based on the cluster information. For a cluster containing only one anomalous frequency, the band-stop filter for that cluster is configured as follows: the frequency of the anomalous frequency within the cluster is used as the stopband center frequency of the corresponding band-stop filter, and the stopband attenuation of the corresponding band-stop filter is determined based on the amplitude and amplitude threshold of the anomalous frequency within the cluster. For a cluster containing two or more anomalous frequencies, the anomalous frequency with the largest amplitude is selected as the stopband center frequency of the corresponding band-stop filter, and the stopband attenuation of the corresponding band-stop filter is determined based on the amplitude of the anomalous frequency with the largest amplitude and the amplitude threshold.

[0075] Example 4

[0076] This embodiment provides an adaptive filtering device for heart sound and electrocardiogram (ECG) signals, used to implement the heart sound and ECG signal filtering method provided in Embodiment 3. In a preferred embodiment, please see... Figure 4 The device includes:

[0077] The synchronous acquisition module is used to synchronously acquire raw electrocardiogram signals and raw heart sound signals;

[0078] The ECG filtering module performs spectral analysis on the raw ECG signal and identifies abnormal frequency points, where the amplitude of the abnormal frequency point is greater than an amplitude threshold. If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point, and the raw ECG signal is filtered using the band-stop filter. The filtered raw ECG signal is then used as the first ECG signal. If no abnormal frequency point is identified, the raw ECG signal is used as the first ECG signal.

[0079] The heart sound filtering module extracts preset heart sound frequency band signals from the original heart sound signals;

[0080] The synchronous output module synchronously outputs the first electrocardiogram signal and the preset heart rate band signal.

[0081] In this embodiment, the synchronous acquisition module corresponds to step S201 of embodiment 3, the electrocardiogram filtering module corresponds to steps S203 and S204 of embodiment 3, the heart sound filtering module corresponds to step S202 of embodiment 3, and the synchronous output module corresponds to step S205 of embodiment 3. These will not be described again here.

[0082] Example 5

[0083] This embodiment discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the ECG signal adaptive filtering method provided in Embodiment 1 or the heart sound ECG signal filtering method provided in Embodiment 3. The computer program product should be understood as a software product that mainly implements its solution through a computer program, such as a program product integrated in the cloud or a software library.

[0084] Example 6

[0085] This embodiment discloses an electronic device. In one embodiment, the electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein,

[0086] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the ECG signal adaptive filtering method or the heart sound ECG signal filtering method provided by the present invention.

[0087] like Figure 5 The diagram shown is a structural schematic of an electronic device for an adaptive ECG signal filtering method or a heart sound ECG signal filtering method according to an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program, such as an adaptive ECG signal filtering method or a heart sound ECG signal filtering method program, stored in the memory 11 and executable on the processor 10.

[0088] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing adaptive ECG signal filtering methods or heart sound ECG signal filtering methods), and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0089] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, FlashCard, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code for an adaptive filtering method for electrocardiogram signals or a heart sound electrocardiogram signal filtering method, but also to temporarily store data that has been output or will be output.

[0090] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0091] Communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0092] Figure 5 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 5 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0093] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to at least one processor 10 via a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0094] It should be understood that the embodiments are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0095] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, a computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0096] In the description of this specification, the references to terms such as "an embodiment," "some embodiments," "example," "specific example," "a implementation," "a preferred implementation," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0097] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. An adaptive filtering method for electrocardiogram (ECG) signals, characterized in that, include: Obtain the raw electrocardiogram signal; Spectral analysis is performed on the raw electrocardiogram signal to identify abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than the amplitude threshold; If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point. The original ECG signal is filtered using the band-stop filter, and the filtered original ECG signal is output. If no abnormal frequency is detected, the original ECG signal is output.

2. The adaptive filtering method for electrocardiogram signals as described in claim 1, characterized in that, The band-stop filter is an I IR band-stop filter.

3. The adaptive filtering method for electrocardiogram signals as described in claim 1, characterized in that, When more than one abnormal frequency point is identified, a corresponding band-stop filter is constructed for each abnormal frequency point based on the information of each abnormal frequency point, and the original electrocardiogram signal is filtered by the band-stop filter corresponding to more than one abnormal frequency point.

4. The adaptive filtering method for electrocardiogram signals as described in claim 1, characterized in that, When two or more abnormal frequency points are identified, the two or more abnormal frequency points are clustered to obtain one or more clusters. The frequency width of each cluster is not greater than the maximum allowable bandwidth. A corresponding band-stop filter is constructed for each cluster, and the original electrocardiogram signal is filtered using the band-stop filter corresponding to one or more clusters.

5. An adaptive filtering device for electrocardiogram signals, characterized in that, The method for implementing the adaptive filtering of electrocardiogram signals according to any one of claims 1-4 includes: The first acquisition module is used to acquire raw electrocardiogram signals; An abnormal frequency point identification module performs spectral analysis on the original electrocardiogram signal and identifies abnormal frequency points, wherein the amplitude of the abnormal frequency point is greater than the amplitude threshold. The filtering module, if it detects an abnormal frequency point, constructs a band-stop filter based on the information of the abnormal frequency point, uses the band-stop filter to filter the original ECG signal, and outputs the filtered original ECG signal; if it does not detect an abnormal frequency point, it outputs the original ECG signal.

6. A method for filtering heart sound and electrocardiogram signals, characterized in that, include: Simultaneously acquire raw electrocardiogram signals and raw heart sound signals; Spectral analysis is performed on the raw electrocardiogram signal to identify abnormal frequency points, wherein the amplitude of the abnormal frequency points is greater than the amplitude threshold; If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point. The original ECG signal is then filtered using the band-stop filter, and the filtered original ECG signal is used as the first ECG signal. If no abnormal frequency points are identified, the original ECG signal will be used as the first ECG signal. Extract the preset heart sound segment signal from the original heart sound signal; The first electrocardiogram signal and the preset heart rate band signal are output synchronously.

7. The method for filtering heart sound and electrocardiogram signals as described in claim 6, characterized in that, When two or more abnormal frequency points are identified, the two or more abnormal frequency points are clustered to obtain one or more clusters. The frequency width of each cluster is less than the maximum allowable bandwidth. A corresponding band-stop filter is established for each cluster. The original electrocardiogram signal is filtered using the band-stop filter corresponding to one or more clusters.

8. An adaptive filtering device for heart sound and electrocardiogram signals, characterized in that, The method for implementing the heart sound and electrocardiogram signal filtering method according to claim 6 or 7 includes: The synchronous acquisition module is used to synchronously acquire raw electrocardiogram signals and raw heart sound signals; The ECG filtering module performs spectral analysis on the raw ECG signal and identifies abnormal frequency points, where the amplitude of the abnormal frequency point is greater than an amplitude threshold. If an abnormal frequency point is identified, a band-stop filter is constructed based on the information of the abnormal frequency point, and the raw ECG signal is filtered using the band-stop filter. The filtered raw ECG signal is then used as the first ECG signal. If no abnormal frequency point is identified, the raw ECG signal is used as the first ECG signal. The heart sound filtering module extracts preset heart sound frequency band signals from the original heart sound signals; The synchronous output module synchronously outputs the first electrocardiogram signal and the preset heart rate band signal.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in claim 1, 2, 3, 4, 6, or 7.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the ECG signal adaptive filtering method as described in any one of claims 1 to 4, or to perform the heart sound ECG signal filtering method as described in claim 6 or 7.