WO2024067030A1 - 信号的去噪方法及电子设备 - Google Patents

信号的去噪方法及电子设备 Download PDF

Info

Publication number
WO2024067030A1
WO2024067030A1 PCT/CN2023/117833 CN2023117833W WO2024067030A1 WO 2024067030 A1 WO2024067030 A1 WO 2024067030A1 CN 2023117833 W CN2023117833 W CN 2023117833W WO 2024067030 A1 WO2024067030 A1 WO 2024067030A1
Authority
WO
WIPO (PCT)
Prior art keywords
sampling point
target
signal
target sampling
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/117833
Other languages
English (en)
French (fr)
Inventor
尹海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to US18/730,060 priority Critical patent/US20250114042A1/en
Priority to CN202380067352.6A priority patent/CN119866193A/zh
Priority to EP23870269.0A priority patent/EP4442194B1/en
Publication of WO2024067030A1 publication Critical patent/WO2024067030A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/366Detecting abnormal QRS complex, e.g. widening
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7225Details of analogue processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
    • A61B5/024Measuring pulse rate or heart rate
    • A61B5/02438Measuring pulse rate or heart rate with portable devices, e.g. worn by the patient

Definitions

  • the present application relates to the technical field of life feature recognition and processing, and in particular to a signal denoising method and electronic equipment.
  • ECG signals are usually collected through electrodes attached to the surface of the skin. Since ECG signals on the skin are relatively weak and easily interfered by noise, there is a lot of noise in the collected ECG signals, which reduces the accuracy and reliability of ECG diagnosis. In particular, the ECG collected by wearable ECG devices when the user is in a non-stationary state contains a lot of noise.
  • ECG signals such as myoelectric noise and motion noise
  • noises in ECG signals exist in the entire frequency band of ECG signals. Although the impact of these noises is small, it is difficult to completely eliminate them. These noises are more obvious in the stable section of the signal.
  • traditional denoising methods denoise these noises in ECG signals, they are likely to interfere with the peaks of the P wave, T wave, and R wave in the ECG signals; and the P wave, T wave, and R wave are the key features of the ECG signals. When they are affected, the ECG signals lose their reference value.
  • the purpose of the present application is to provide a signal denoising method and electronic device.
  • the method uses the continuous mutation of the peak with reference significance in the ECG signal to identify whether the signal point is a point on the signal wave with reference significance during denoising, thereby determining whether to perform denoising on the signal point.
  • the ECG signal can be effectively denoised while ensuring the reference value of the ECG signal.
  • the present application provides a signal denoising method, comprising: determining a first feature sequence corresponding to a target sampling point, the first feature sequence corresponding to the target sampling point includes j elements, the j elements correspond one-to-one to the j sampling points in the signal to be denoised, the element corresponding to any one of the j sampling points represents the sum of the rising or falling amplitudes of each sampling point between the any one sampling point and the first sampling point, the falling or rising amplitude of any one of the j sampling points is the difference between the amplitude of the any one sampling point and the amplitude of the next sampling point of the any one sampling point, the first sampling point is a sampling point located before the any one sampling point, presenting an opposite change trend with the any one sampling point, and the closest to the any one sampling point; when the values in the first feature sequence corresponding to the target sampling point are all less than the cumulative variation threshold corresponding to the target sampling point, the amplitude of the target sampling point and the amplitudes of m
  • the target sampling point is a sampling point in the signal to be de-noised
  • the signal to be de-noised may be a signal directly collected by the electronic device, or a signal collected by other devices and sent to the electronic device.
  • the electronic device may also send the signal obtained after de-noising the de-noised signal back to the other device.
  • the signal to be denoised may be an electrocardiogram signal
  • the electrocardiogram signal may be a bioelectric signal of a biological body surface extracted by the electronic device through electrodes
  • the collected electrocardiogram signal is composed of a plurality of sampling points arranged according to the sampling time.
  • the value of the sampling point is the intensity or energy value of the bioelectric signal of the body surface during the acquisition.
  • the plurality of sampling points are arranged in the order of the sampling time to form an electrocardiogram with a certain degree of fluctuation.
  • the QRS wave in the electrocardiogram signal is often the largest, most obvious, and sharpest.
  • the amplitude difference between two adjacent sampling points on the QRS wave group in the electrocardiogram signal is very large, which also leads to the absolute value of the slope between two adjacent sampling points in the QRS wave group is also very large.
  • the “presenting an opposite trend of change” means that the amplitude of the sampling point before the first sampling point is greater than the amplitude of the first sampling point, but the amplitude of the sampling point after the first sampling point is smaller than the amplitude of the first sampling point; or it means that the amplitude of the sampling point before the first sampling point is smaller than the amplitude of the first sampling point, but the amplitude of the sampling point after the first sampling point is larger than the amplitude of the first sampling point.
  • the first sampling point may be a sampling point located on a peak or trough in the signal to be detected.
  • the “sum of the rising or falling amplitudes” means either the sum of the rising amplitudes or the sum of the falling amplitudes. That is, from only one change trend, it is determined whether there is a sufficient number of continuous sampling points with a sharp rising amplitude among the j sampling points, or whether there is a sufficient number of continuous sampling points with a sharp falling amplitude among the j sampling points.
  • the j may be any integer greater than 1.
  • a wave can be regarded as two parts according to the change trend, namely the rising part (the amplitude of the sampling point is getting larger and larger) and the falling part (the amplitude of the sampling point is getting larger and larger).
  • the peak of the wave rises first and then falls, and the trough of the wave falls first and then rises.
  • the amplitude of the sampling point in the QRS complex may change with a fixed change trend for a longer time. For example, in the QS segment of the QRS complex, the amplitude of the signal first rises persistently and then falls persistently.
  • a sub-signal is selected from the ECG signal with a time window of a fixed length (for example, a time window including 30 sampling points), if this sub-signal is a signal completely located in the QRS complex, then the amplitude of this sub-signal is likely to rise or fall sharply; and if this sub-signal is a signal located in the stable segment signal, then the change trend of the amplitude of this signal is likely to change many times, such as rising first and then falling, and then rising again and then falling... and so on. And the change amplitude of this sub-signal (reflected in the image as whether the wave is sharp enough) may be very small.
  • a time window of a fixed length for example, a time window including 30 sampling points
  • electronic devices can use a change trend as a reference dimension, by checking the persistence and mutation of a signal determined by a sampling point in a change trend, that is, whether there is a continuous sampling point in a signal.
  • the number of these sampling points is sufficient and the amplitude keeps rising or falling sharply to determine whether the signal is a signal on the QRS complex, thereby determining whether the sampling point is a point on the QRS complex or around the QRS complex.
  • the electronic device can construct a feature sequence that can reflect whether this point is a sampling point on the QRS complex based on the change trend and change amplitude of the amplitude of each sampling point and the sampling points around the sampling point.
  • This feature sequence can be called the first feature sequence corresponding to this point.
  • the electronic device in the process of the electronic device denoising the signal to be denoised, the electronic device first determines a sampling point in the signal to be denoised as a target sampling point, and then determines the first characteristic sequence corresponding to the target sampling point in the manner described above. After processing the amplitude of the target sampling point, the electronic device uses the next sampling point of the target sampling point as a new target sampling point, and obtains the first characteristic sequence corresponding to the new target sampling point in the same manner. It is not difficult to understand that when the target sampling point changes, the first time window corresponding to the target sampling point will also move backward accordingly (generally by the position of one sampling point). In other words, the electronic device has used each sampling point before the target sampling point as a target sampling point, and obtained the first characteristic sequence corresponding to these sampling points.
  • the electronic device after the electronic device determines the first feature sequence corresponding to the target sampling point, the electronic device will determine a threshold value according to the first feature sequence corresponding to the target sampling point and the first feature sequences corresponding to the v sampling points before the target sampling point, that is, the cumulative variation threshold value corresponding to the target sampling point.
  • This cumulative variation threshold value represents a distribution range of the values of most elements in the sequence obtained by splicing the first feature sequence corresponding to the target sampling point and the v first feature sequences corresponding to the v sampling points before the target sampling point.
  • the value of an element in the sequence is greater than or equal to the cumulative variation threshold value, it means that the value of the element is significantly greater than the values of other elements in the sequence, that is, the element is an element that has undergone a mutation, which coincides with the mutation of the QRS wave group in the electrocardiogram signal.
  • the electronic device can use the average filtering method to average the amplitude of the target sampling point and the amplitude of the m sampling points around the target sampling point to obtain the target value, and update the amplitude of the target sampling point to the target value, so as to achieve the denoising effect of the target sampling point.
  • the target sampling point is likely to be a sampling point located in the QRS complex in the signal to be de-noised, and in order to protect the characteristics of the QRS complex, the electronic device does not change the amplitude of the target sampling point.
  • This method uses the continuous mutation of the peak with reference significance in the ECG signal to identify whether the sampling point is a point on the signal wave with reference significance during denoising, thereby determining whether to perform denoising on the sampling point.
  • the ECG signal can be effectively denoised while ensuring the reference value of the ECG signal.
  • the method before averaging the amplitude of the target sampling point and the amplitudes of m sampling points around the target sampling point to obtain the target value, the method further includes: determining a first eigenvalue corresponding to the target sampling point, the first eigenvalue corresponding to the target sampling point representing the average of the absolute values of the amplitude differences between each two adjacent sampling points in a time window including the target sampling point and containing (k+1) sampling points; averaging the amplitude of the target sampling point and the amplitudes of m sampling points around the target sampling point to obtain the target value, including: the values in the first feature sequence corresponding to the target sampling point are all less than the target value.
  • the amplitude of the target sampling point and the amplitudes of the m sampling points around the target sampling point are averaged to obtain the target value;
  • the average variation threshold corresponding to the target sampling point is determined by the first eigenvalue corresponding to the target sampling point and the first eigenvalues corresponding to i sampling points; in the signal to be denoised, the i sampling points are the i sampling points before the target sampling point.
  • the direction of the R wave in the QRS complex in the signal may be reversed.
  • the R wave in the QRS complex in their ECG signal may be inverted due to myocardial ischemia.
  • the rising and falling trends of the sampling points in the R wave are reversed, and the changing trends between the peaks and troughs of the R wave and the PR and ST segments are also reversed.
  • the position of the target sampling point is analyzed only by constructing the first feature sequence corresponding to the target sampling point, it is likely that an erroneous conclusion will be drawn, and the amplitude of the target sampling point may be processed in an inappropriate manner during the denoising process.
  • the first eigenvalue corresponding to the target sampling point only focuses on the amplitude change of the sampling point, not the change trend of the sampling point amplitude.
  • This embodiment uses the first eigenvalue corresponding to the target sampling point and the first feature sequence corresponding to the target sampling point to judge the area where the target sampling point is located, which can greatly reduce the probability of judging the position of the sampling point on the abnormal ECG signal, determine whether the target signal point is a point located on the QRS wave group, and denoise the noise of the stable segment signal in the signal while retaining the characteristics of the Q wave and the S wave.
  • the first eigenvalue corresponding to the target sampling point is also conducive to electronic devices to more quickly and accurately identify whether it is a sampling point on the R wave.
  • the method further includes: when there is at least one value in the first feature sequence corresponding to the target sampling point that is greater than or equal to the cumulative variation threshold corresponding to the target sampling point, keeping the amplitude of the target sampling point unchanged; and/or when the first feature value corresponding to the target sampling point is greater than or equal to the average variation threshold, keeping the amplitude of the target sampling point unchanged.
  • the target sampling point when there is at least one value in the first characteristic sequence corresponding to the target sampling point that is greater than or equal to the cumulative variation threshold corresponding to the target sampling point, the target sampling point is likely to be a point on the QRS complex; in addition, if the first characteristic value corresponding to the target sampling point is greater than or equal to the average variation threshold, then the target sampling point is likely to be a point on the QRS complex and is most likely to be a point on the R wave. Therefore, in this embodiment, in order to protect the reference value of the key wave in the signal after signal denoising, when the electronic device determines that the target sampling point is a point on the QRS complex, the electronic device keeps the amplitude of the target sampling point unchanged.
  • the method before determining the first characteristic sequence corresponding to the target sampling point, the method further includes: performing high-pass filtering and low-pass filtering on the initial signal to obtain the signal to be denoised, wherein the initial signal is an electrical signal collected by the electronic device and representing the user's heart rhythm.
  • the electronic device also performs high-pass filtering and low-pass filtering on the initial signal to obtain the signal to be denoised, wherein the initial signal is an electrical signal representing the user's heart rhythm collected by the electronic device.
  • the high-pass filter and low-pass filter used by the electronic device can be multi-order filters, which can filter out higher and lower frequency bands in the initial signal collected by the electronic device, especially those that may contain artifacts. This facilitates subsequent analysis and retains the frequency range of the signal to be analyzed, thereby improving the processing efficiency of the subsequent processing process.
  • electronic equipment can use a low-pass filter with a cut-off frequency lower than the AC power frequency (50Hz or 60Hz) to avoid power frequency interference.
  • a high-pass filter is used to retain the highest frequencies of the signal of interest.
  • the target sampling point in the time window including the target sampling point and containing (k+1) sampling points, is the last sampling point in the time window including the (k+1) sampling points; or, in the time window including the target sampling point and containing (k+1) sampling points, there is at least one sampling point before and after the target sampling point.
  • the electronic device can obtain k sampling points before the sampling point, and calculate the average of the absolute values of the amplitude differences between each two adjacent sampling points among the (k+1) sampling points ending with the sampling point as the first eigenvalue corresponding to the sampling point. In this way, the electronic device can process the newly obtained sampling point with zero delay, and can complete the processing process of the target sampling point more efficiently.
  • the electronic device may not process the sampling point immediately, but continue to acquire signals of several sampling points after the sampling point, and then acquire at least one sampling point before the sampling point and at least one sampling point before the sampling point with the sampling point as the base point, a total of k sampling points, and determine them together with the sampling point as the (k+1) sampling points, and calculate the average of the absolute values of the amplitude differences between every two adjacent sampling points in the (k+1) sampling points as the first eigenvalue corresponding to the sampling point.
  • the target sampling point is taken as the sampling point in the middle position among the (k+1) sampling points, so that the calculated first eigenvalue corresponding to the target sampling point can more truly reflect the change trend of the target sampling point, and can more accurately judge whether the target sampling point is a point on the QRS complex.
  • determining the first feature sequence corresponding to the target sampling point includes: taking the target sampling point as a starting point, determining a first time window including (j+1) sampling points; sequentially calculating the amplitude difference between each sampling point and the next sampling point except the last sampling point in the first time window to obtain j differences; resetting the numbers less than 0 in the j differences to 0 to obtain the first sequence corresponding to the target sampling point; sequentially performing a forward accumulation reconstruction operation on the elements in the first sequence corresponding to the target sampling point to obtain the j elements, and using the j elements as the first feature sequence corresponding to the target sampling point; wherein the accumulation reconstruction operation includes: when the value of the element is 0, keeping the value of the element unchanged; when the value of the element is not zero, accumulating the value of the element with the value of the previous element until an element with a value of 0 is encountered, and using the value obtained by the forward accumulation as the reconstructed value of the element.
  • the electronic device may determine the first characteristic sequence corresponding to the target sampling point from the target sampling point in the following manner:
  • the position is If the position is 0, if it is not zero, the forward accumulation will stop when it encounters an element that is 0, and the value obtained by the forward accumulation is the reconstructed value of the position.
  • the cumulative change trend of the subsequent j sampling points around the target sampling point is quantified in the first feature sequence corresponding to the target sampling point by means of amplitude subtraction, negative value zeroing, and forward accumulation reconstruction, and the first feature sequences corresponding to two consecutive sampling points have multiple identical elements, which is conducive to the electronic device analyzing the data features of the target sampling point and determining the area where the target sampling point is located.
  • determining the first eigenvalue corresponding to the target sampling point includes: determining a second time window including (k+1) sampling points; in the second time window, there are n sampling points before the target sampling point, and there are (k-n) sampling points after the target sampling point; sequentially calculating the absolute value of the difference between each sampling point in the second time window and the previous sampling point to obtain k absolute values of the difference, and taking an average of the k absolute values of the difference as the first eigenvalue corresponding to the target sampling point.
  • the electronic device can determine a second time window including (k+1) sampling points based on the target sampling point; in the second time window, there are n sampling points before the target sampling point, and there are (k-n) sampling points after the target sampling point; then the electronic device can sequentially calculate the absolute value of the difference between each sampling point and the previous sampling point in the second time window, obtain k absolute values of the difference, and take the average value of the absolute values of the k differences as the first eigenvalue corresponding to the target sampling point.
  • the first characteristic value corresponding to the target sampling point is based on the absolute value of the amplitude difference between the two sampling points, no matter how the change trend of the (k+1) sampling points changes, the change amplitude between the two sampling points is a number greater than 0.
  • the first characteristic value corresponding to the target sampling point is the average value of the total slope between each adjacent two sampling points in the (k+1) sampling points.
  • the slope i.e., the degree of mutation
  • the electronic device can easily determine whether the target sampling point is a QRS wave, especially a point on the R wave, based on the first characteristic value corresponding to the target sampling point, so as to determine whether the target sampling point needs to be denoised.
  • the method further includes: splicing the first characteristic sequence corresponding to the target sampling point with the v first characteristic sequences corresponding to the v sampling points to obtain a second sequence, and determining the abnormal sequence corresponding to the second sequence by using the quartile method. value, and determining the outlier value corresponding to the second sequence as the cumulative variation threshold corresponding to the target sampling point.
  • the above-mentioned cumulative variation threshold can be determined by the quartile method. Since a certain indication of the center, spread and shape of the data distribution is given, it has certain robustness and scientificity. Therefore, by determining the cumulative variation threshold corresponding to the target sampling point by the quartile method, it can accurately reflect to a certain extent whether there is an element with a numerical mutation in the first characteristic sequence corresponding to the target sampling point, and further reflect whether the target sampling point is a point on the QRS complex.
  • the method further includes: constructing a third sequence using the first eigenvalue corresponding to the target sampling point and the i first eigenvalues corresponding to the i sampling points; determining an outlier corresponding to the third sequence using the quartile method, and determining the outlier corresponding to the third sequence as the average variation threshold corresponding to the target sampling point.
  • MB is the first feature sequence corresponding to the target sampling point
  • MB-1 is the first feature sequence corresponding to the sampling point before the target sampling point, and so on
  • the sequence obtained by expanding and splicing multiple sequences such as MBv , MB-v+1 , ..., MB, is the second sequence mentioned above.
  • the 75th percentile number (upper quartile) of the sequence express The number of 25 quantiles (lower quartiles) of the sequence.
  • the average variation threshold corresponding to the target sampling point is determined by the quartile method, which can accurately reflect to a certain extent whether the target sampling point is an element with a numerical mutation in the third sequence, and further reflect whether the target sampling point is a point on the QRS complex (especially the R wave).
  • the average variation threshold corresponding to the target sampling point can be expressed as
  • CA is the cumulative variation threshold mentioned above
  • M A is the first eigenvalue corresponding to the target sampling point
  • M A-1 is the first eigenvalue corresponding to the sampling point before the target sampling point, and so on
  • This is the third sequence mentioned above.
  • the cumulative variation threshold corresponding to the target sampling point is an extreme outlier value corresponding to the second sequence determined using the quartile method
  • the average variation threshold corresponding to the target sampling point is an extreme outlier value corresponding to the third sequence determined using the quartile method.
  • the electronic device can determine the cumulative variation threshold corresponding to the target sampling point as the extreme outlier corresponding to the second sequence, and/or determine the average variation threshold corresponding to the target sampling point as the extreme outlier corresponding to the third sequence.
  • an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute a method as in the first aspect or any possible implementation of the first aspect.
  • a chip system which is applied to an electronic device, and the chip system includes one or more processors, and the processors are used to call computer instructions so that the electronic device executes the method in the first aspect or any possible implementation of the first aspect.
  • a computer-readable storage medium comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method in the first aspect or any possible implementation of the first aspect.
  • FIG1 is a waveform diagram of an EGG signal provided in an embodiment of the present application.
  • FIG2 is a line graph showing the degree of change of data in a series provided by an embodiment of the present application.
  • FIG3 is a schematic diagram illustrating a noise reduction result of an electrocardiogram signal provided in an embodiment of the present application
  • FIG4 is a schematic diagram of the appearance of an electronic device provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG6 is a flow chart of a signal denoising method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a variation trend of amplitude of a sub-signal in a signal to be denoised provided by an embodiment of the present application;
  • FIG8 is a schematic diagram of a process of obtaining a first feature sequence corresponding to a target sampling point based on the target sampling point according to an embodiment of the present application
  • FIG9 is a schematic diagram showing a comparison between an initial signal image and a first characteristic sequence image provided by an embodiment of the present application.
  • FIG10 is a flow chart of a signal denoising method provided in an embodiment of the present application.
  • FIG11 is a schematic diagram showing a comparison between an initial signal image and a first eigenvalue image provided in an embodiment of the present application.
  • Electrocardiogram also known as ECG signal, records the bioelectric signals generated during the contraction and relaxation of the heart. Each time the heart completes a complete electrical activity, it corresponds to an ECG waveform as shown in Figure 1, including P wave, QRS complex (including Q wave, R wave and S wave) and T wave. Among them, the first waveform on the electrocardiogram that deviates positively from the baseline is the P wave, and the second band is the QRS complex.
  • the QRS complex consists of a series of 3 deviations, reflecting the current related to the depolarization of the left and right ventricles.
  • the first negative deviation in the QRS complex is called the Q wave
  • the first positive deviation in the QRS complex is called the R wave
  • the negative deviation after the R wave is called the S wave.
  • the waveform with a rounded top after the QRS complex is the T wave, which represents the state of ventricular repolarization.
  • a complete waveform including the above waves is called a beat.
  • the ECG signal between two complete waveforms (beats) also appears as a wave shape, but the fluctuation of these waves is much smaller than that of the waves in the QRS complex (including Q wave, R wave and S wave).
  • the ECG signal between these two complete waveforms (beats) is relatively stable. Therefore, in this application, we can call the ECG signal between every two complete waveforms (beats) in a segment of ECG signal, that is, the signal at the end of FIG1 that appears to have a relatively stable fluctuation, a "stable segment signal".
  • Myoelectric noise also known as electromyographic noise signal, is the noise caused by human activity and muscle tension, that is, the superposition of motor unit action potentials (MUAP) of muscle fibers in the human body in time and space.
  • MUAP motor unit action potentials
  • Muscle activity in the head and neck is the main source of EEG electromyographic interference, and muscle activity below the neck generally does not cause significant interference to EEG.
  • Such interference has a small amplitude but a high frequency, ranging from 5Hz to 2000Hz, and appears as an irregular and rapidly changing waveform.
  • Motion noise is caused by slight movements of the human body. Its main characteristic is mutation. The frequency range is generally between 3Hz and 14Hz, and the duration is also very short.
  • ECG signals are usually bioelectric signals on the body surface extracted by ECG equipment through electrodes.
  • the collected ECG signals are composed of multiple sampling points in time order.
  • the value of the sampling point is the intensity or energy value of the bioelectric signal on the body surface during the collection.
  • the multiple sampling points are arranged in the order of sampling time to form an ECG.
  • the sampling frequency refers to the number of points that the recorder collects the voltage of the ECG signal per second. The higher the sampling frequency, the less distortion the ECG waveform will have, and the collected data will more accurately describe the continuous ECG waveform.
  • the sampling frequency is too low, the amplitude of the Q wave, R wave, and S wave will decrease, the waveform will be step-shaped, and the ECG will lose some meaningful information. Therefore, it is necessary to apply an appropriate sampling frequency.
  • the ECG acquisition device is a device capable of collecting ECG signals, analyzing ECG signals, etc., and can be an ECG acquisition device, an ECG machine, etc., or a wearable device or terminal with an ECG sensor, etc.
  • a filter is a device that filters waves. It is a circuit that allows signals within a certain frequency band to pass through while blocking signals outside this frequency band from passing through.
  • low-pass filters There are two main types of filters: low-pass filters and high-pass filters.
  • the working principle is that inductors prevent high-frequency signals from passing through and allow low-frequency signals to pass through, while capacitors prevent high-frequency signals from passing through and allow low-frequency signals to pass through.
  • Low-pass filters use the principle that capacitors pass high frequencies and block low frequencies, and inductors pass low frequencies and block high frequencies. For high frequencies that need to be cut off, capacitors absorb and inductors block them from passing; for low frequencies that need to be released, capacitors have high resistance and inductors have low resistance to allow them to pass through.
  • high-pass filters prevent low-frequency signals from passing through and allow high-frequency signals to pass through.
  • Quartile also known as quartile point, refers to the values at three dividing points when all values are arranged from small to large and divided into four equal parts in statistics. It is mostly used in box plot drawing in statistics. It is the value at 25% and 75% after a set of data is sorted. Quartile is to divide all data into 4 parts by 3 points, each of which contains 25% of the data. Obviously, the middle quartile is the median (usually represented by Q2), so the quartiles usually refer to the values at the 25% position (called the lower quartile, usually represented by Q1) and the values at the 75% position (called the upper quartile, usually represented by Q3).
  • the outliers in the sequence can usually be calculated with the help of quartiles.
  • Q3+k(Q3-Q1) as a threshold, and the values in the sequence that are greater than this threshold are outliers, that is, values that are significantly larger than other values in the sequence.
  • K is 1.5
  • the above threshold is the moderate anomaly threshold
  • the values in the sequence that are greater than the moderate anomaly threshold are moderate outliers
  • K is 3
  • the above threshold is the extreme anomaly threshold
  • the values in the sequence that are greater than the extreme anomaly threshold are extreme outliers.
  • the noise of the stable segment signal in the ECG signal can be denoised without interfering with the peaks of the P wave, T wave, and R wave in the ECG signal. Please refer to the subsequent instructions for details, which will not be elaborated here.
  • Electrocardiogram (ECG)/ECG signal is a comprehensive manifestation of cardiac electrical activity on the human epidermis. It contains rich physiological and pathological information reflecting cardiac rhythm and its electrical conduction. To a certain extent, it can objectively reflect the physiological conditions of various parts of the heart. At present, it has become one of the important methods for non-invasive examination and diagnosis of cardiovascular diseases, and one of the important bases for evaluating whether the heart function is good.
  • FIG3 is a schematic diagram of a denoising result of an ECG signal provided in an embodiment of the present application.
  • FIG3 (A) shows an image of an original ECG signal before denoising
  • FIG3 (B) shows an image of an ECG signal obtained after denoising the original ECG signal using an existing denoising method
  • FIG3 (C) shows an image of an ECG signal obtained after denoising the original ECG signal using the denoising method provided in the present application.
  • the original ECG signal can be a wearable device with an ECG sensor, such as an ECG signal collected by a smart bracelet, a smart watch, etc., or a dynamic ECG device widely used in hospitals and other institutions, that is, a traditional twelve-lead ECG signal acquisition instrument.
  • the original ECG signal is an ECG signal directly collected by the device and has not yet been denoised, but may have undergone certain preprocessing. Combined with the above description, it can be seen that the ECG signal is a weak signal with strong nonlinearity, non-stationarity and randomness.
  • the directly collected ECG signal is accompanied by a lot of noise.
  • These noises can be manifested as frequent and short peaks in the ECG signal image, that is, the peaks caused by noise shown in (A) of FIG3 .
  • the influence of these noises is more obvious in the stable segment signal of the ECG signal.
  • the ECG signal There may also be some persistent and reference-meaningful peaks in the ECG signal that are not caused by noise, such as the P wave and R wave mentioned above.
  • (B) in FIG3 shows an image of an ECG signal obtained after denoising the original ECG signal using an existing denoising method.
  • (B) in FIG3 uses a solid line to represent the image of the ECG signal obtained after denoising, and uses a dotted line to represent the image of the ECG signal before denoising (i.e., the ECG signal shown in (A) in FIG3).
  • the noise condition of the ECG signal obtained is significantly improved, the frequent and short peaks caused by noise in the image are significantly reduced, and the change trend of the stable segment signal in the ECG signal becomes simpler and clearer.
  • waves with reference significance such as P waves and T waves can usually reflect the health status of a person's heart.
  • these waves are distorted, the diagnosis results obtained by medical staff based on the ECG signals where these waves are located may be inaccurate, and in severe cases may even endanger the life safety of the patient.
  • the present application provides a signal denoising method and electronic device, which can use the continuous mutation of the peak with reference significance in the ECG signal to identify whether the signal point is a point on the signal wave with reference significance during denoising, thereby determining whether to perform denoising on the signal point.
  • the ECG signal can be denoised without affecting the wave with reference significance in the ECG signal, that is, the ECG signal can be effectively denoised while ensuring the reference value of the ECG signal.
  • (C) in FIG3 shows an image of an ECG signal obtained after denoising the original ECG signal using the denoising method provided by the present application.
  • (C) in FIG3 uses a solid line to represent the image of the ECG signal obtained after denoising, and uses a dotted line to represent the image of the ECG signal before denoising (i.e., the ECG signal shown in (A) in FIG3).
  • the noise condition of the ECG signal obtained is also significantly improved, the frequent and short peaks caused by noise in the image are significantly reduced, and the change trend of the stable segment signal in the ECG signal becomes simpler and clearer.
  • the denoising method provided by the present application not only ensures the denoising effect on the stable segment signal, but also further ensures the reference value of the ECG signal - after the ECG signal is denoised, the overlap degree of the key peaks in the denoised signal and the original signal before denoising is extremely high.
  • the R wave, P wave, and T wave of the denoised ECG signal are basically overlapped with the R wave, P wave, and T wave of the ECG signal before denoising.
  • the electronic device may be a mobile phone, a tablet computer, a wearable device such as a smart bracelet and a smart watch, an in-vehicle device, an augmented reality (AR)/virtual reality (VR) device, a laptop computer, Ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA) or special camera (such as SLR camera, card camera), etc.
  • AR augmented reality
  • VR virtual reality
  • UMPC Ultra-mobile personal computer
  • PDA personal digital assistant
  • special camera such as SLR camera, card camera
  • the appearance of the electronic device can refer to Figure 4.
  • (A) in Figure 4 shows the specific style of the electronic device when worn on the wrist of the user
  • (B) in Figure 4 may show the specific style of the back side of the electronic device (i.e., the side that is in close contact with the user's skin when worn).
  • the above-mentioned electronic device may be provided with an ECG sensor to collect the user's ECG data.
  • the ECG sensor includes two electrodes for collecting ECG signals.
  • the two electrodes of the ECG sensor i.e., electrode 111 and electrode 112 are both arranged on the back of the electronic device.
  • the electronic device may include a data conversion module 113 inside, and the data conversion module 113 may perform analog-to-digital conversion on the analog ECG signal collected by electrodes 111 and 112 to obtain a discrete digitized ECG signal.
  • the processing module inside the electronic device may use the digitized ECG signal as the ECG signal to be denoised and apply the signal denoising method in the embodiment of the present application to denoise the signal to obtain a denoised ECG signal.
  • the user can press the dial 114 of the electronic device with a finger so that the electrodes 112 and 111 contact the user's arm.
  • the electronic device may also analyze the noise-reduced ECG signal to obtain an analysis result. Furthermore, the electronic device may also output the analysis result through an output device, such as a display, a loudspeaker, and the like.
  • an output device such as a display, a loudspeaker, and the like.
  • the above-mentioned electronic device can also send the ECG signal to be denoised to the terminal or server to which it is bound, and the terminal or server applies the ECG denoising method in the embodiment of the present application to perform denoising processing on the ECG signal to be denoised to obtain the ECG signal after denoising.
  • the terminal or server can send the ECG signal after denoising to the above-mentioned electronic device, or send the analysis result obtained by analyzing the ECG signal after denoising.
  • the above electronic device equipped with an ECG sensor can monitor the wearer's ECG data in real time or periodically to monitor the wearer's physical condition.
  • the electronic device in the embodiment of the present application is a smart terminal device, which, in addition to indicating time, also has one or more functions such as reminder, navigation, calibration, monitoring, and interaction; the display mode of the smart watch includes pointers, numbers, images, etc.
  • the schematic diagram of the appearance of the electronic device shown in FIG4 does not constitute a specific limitation on the electronic device.
  • the appearance of the electronic device 100 may be different from that shown in FIG4; for example, in some embodiments, the dial 114 of the electronic device may be circular; for another example, one electrode 111 of the electrocardiogram sensor of the electronic device may be disposed on the back of the electronic device, and the other electrode 112 may be disposed on the side of the electronic device.
  • the user may press the electrode 112 with a finger, and the electrode 111 contacts the user's arm.
  • FIG. 5 exemplarily shows the structure of the above electronic device.
  • the electronic device 100 is capable of executing the signal denoising method provided in the embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna, a wireless communication module 150, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a button 172, a display screen 171, a sensor module 180, etc.
  • USB universal serial bus
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an acceleration sensor 180C, a capacitive proximity sensor 180D, an electrocardiogram sensor 180C, and a pressure sensor 180A.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
  • different processing units may be independent devices or integrated in one or more processors.
  • the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. At the same time, the processor 110 may also store data received by the electronic device 100 from other electronic devices.
  • the processor 110 can control the electronic device 100 to send the ECG signal to be denoised to the terminal or server to which it is bound, and the terminal or server applies the ECG denoising method in the embodiment of the present application to perform denoising processing on the ECG signal to be denoised to obtain the ECG signal after denoising.
  • the electronic device 100 can receive the ECG signal after denoising sent by the terminal or server, or receive the analysis result obtained by the terminal or server analyzing the ECG signal after denoising.
  • the processor 110 controls the dial and base of the smart watch to obtain an initial ECG signal.
  • the processor 110 includes a filter device or a filter circuit, which can filter the initial ECG signal, filter out the higher and lower frequency bands of the initial ECG signal, and retain the signal to be analyzed.
  • the processor 110 will also apply the signal denoising method in the embodiment of the present application to the signal obtained by filtering to perform denoising processing to obtain a denoised ECG signal.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, a Micro USB interface, a USB Type C interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, audio, video and other files are saved in the external memory card.
  • the internal memory 121 may be used to store computer executable program codes, wherein the executable program codes include instructions.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application required for at least one function (such as voice broadcast, image playback function, etc.), etc.
  • the data storage area may store data created during the use of the electronic device 100 (such as audio data, phone book, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio. The interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the wireless communication function of the electronic device 100 can be implemented through an antenna, a wireless communication module 150, a modulation and demodulation processor, and a baseband processor.
  • the electronic device 100 can communicate wirelessly with other electronic devices through the wireless communication module 150.
  • the antenna is used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
  • the antenna can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the wireless communication module 150 may be one or more devices integrated with at least one communication processing module.
  • the wireless communication module 150 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 100.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 150 may be one or more devices integrated with at least one communication processing module.
  • the wireless communication module 150 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 150 may also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
  • the electronic device 100 can be communicatively connected with other electronic devices via the wireless communication module 150 .
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the speaker 170A also called a "speaker" is used to convert an audio electrical signal into a sound signal.
  • the electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
  • the receiver 170B also called a "handset" is used to convert the audio electrical signal into a sound signal.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C.
  • the electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
  • the key 172 includes a power key, a volume key, etc.
  • the key 172 may be a mechanical key or a touch key.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • the electronic device 100 implements the display function through a GPU, a display screen 171, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 171 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 171 is used to display images, videos, etc.
  • the display screen 71 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 171, where N is a positive integer greater than 1.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A can be set on the display screen 71.
  • the capacitive pressure sensor can be a parallel plate including at least two conductive materials.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A.
  • the electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes i.e., x, y, and z axes
  • the gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the acceleration sensor 180C can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
  • the capacitive proximity sensor 180D may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light outward through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the capacitive proximity sensor 180D to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the capacitive proximity sensor 180D can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
  • the ECG sensor 180E usually includes two electrodes for collecting ECG signals.
  • the sinoatrial node in the human heart rhythmically controls the contraction and relaxation of the heart to pump blood to the trunk.
  • This control signal is an electrical signal (human nerve signals are all manifested as electrical signals on the nerves), which will gradually spread to the body surface and can be measured through electrodes on the skin.
  • the ECG sensor 180E can detect bioelectricity when in contact with human skin and convert it into electrical signals. These electrical signals can be digitally processed by the processor 110 and converted into digital signals. The processor can further process these digitized signals in conjunction with the GPU to obtain an accurate and detailed electrocardiogram and display it on the display screen 171.
  • the ambient light sensor 180F is used to sense the ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 171 according to the perceived ambient light brightness.
  • the ambient light sensor 180F can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the capacitive proximity sensor 180D to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 171 and the wireless communication module 150.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the power management module 141 can also be set in the processor 110.
  • the power management module 141 and the charging management module 140 can also be set in the same device.
  • FIG6 is a flow chart of a signal denoising method provided in an embodiment of the present application.
  • the method uses the continuous mutation of the peaks with reference significance in the ECG signal to identify whether the signal point is a point on the signal wave with reference significance during denoising, thereby determining whether to perform denoising on the signal point.
  • the ECG signal can be denoised without affecting the waves with reference significance in the ECG signal, that is, the ECG signal can be effectively denoised while ensuring the reference value of the ECG signal.
  • the method provided in an embodiment of the present application may include but is not limited to the following steps:
  • S601 The electronic device determines a first characteristic sequence corresponding to a target sampling point.
  • the electronic device may be the electronic device shown in FIG. 4 , or may be the electronic device 100 in the foregoing description.
  • the target sampling point is a sampling point in the signal to be de-noised.
  • the signal to be de-noised may be a signal directly collected by the electronic device, or may be a signal collected by other devices and sent to the electronic device.
  • the signal to be denoised may be an electrocardiogram signal, which may be a bioelectric signal of a biological body surface extracted by the electronic device through electrodes.
  • the collected electrocardiogram signal is composed of multiple sampling points sorted according to sampling time.
  • the value of the sampling point is the intensity or energy value of the bioelectric signal of the body surface during collection.
  • the multiple sampling points are arranged in the order of sampling time to form an electrocardiogram with a certain degree of fluctuation.
  • the electronic device before executing step S601, the electronic device also performs high-pass filtering and low-pass filtering on the initial signal to obtain the above-mentioned signal to be denoised, and the initial signal is an electrical signal collected by the electronic device that represents the user's heart rhythm.
  • the high-pass filter and low-pass filter used by the electronic device can be multi-order filters, which can filter out higher and lower frequency bands in the initial signal collected by the electronic device, especially those that may contain artifacts. It is convenient for subsequent analysis and retains the frequency range of the signal to be analyzed, thereby improving the processing efficiency of the subsequent processing process.
  • the electronic device can use a low-pass filter with a cutoff frequency lower than the AC power frequency (50Hz or 60Hz) to avoid power frequency interference.
  • the low frequency band that is, the frequency band below 1Hz, since the electronic device can use a high-pass filter that retains the highest frequency band of the signal of interest.
  • ECG signals usually appear as peaks (or troughs) with different degrees of fluctuation. Combined with the above description, it can be seen that in the ECG signal, there are several peaks with particularly obvious fluctuations, namely the Q wave, R wave and S wave in the QRS complex.
  • the QRS complex has the highest peak R wave in the ECG.
  • These ECG signals are important reference features in the ECG signal. For example, when the Q wave is abnormal, it means that the patient may be at risk of old myocardial infarction. Therefore, retaining the authenticity of the QRS complex in the ECG signal when denoising the signal is of great significance for judging the overall rhythm and frequency.
  • the QRS wave in the ECG signal is often the largest, most obvious, and sharpest. Mathematically, this is called the “singularity" or “mutation” of the QRS wave, which is manifested as a sudden change in slope.
  • the amplitude difference between two adjacent sampling points on the QRS wave group in the ECG signal is very large, which also leads to a very large absolute value of the slope between two adjacent sampling points in the QRS wave group.
  • a wave can be regarded as two parts according to the change trend, namely the rising part (the amplitude of the sampling point is getting larger and larger) and the falling part (the amplitude of the sampling point is getting larger and larger).
  • the peak of the wave rises first and then falls, and the trough of the wave falls first and then rises.
  • the amplitude of the sampling point in the QRS complex may change with a fixed change trend for a longer time. For example, in the QS segment of the QRS complex, the amplitude of the signal first rises persistently and then falls persistently.
  • a sub-signal is selected from the ECG signal with a time window of a fixed length (for example, a time window including 30 sampling points), if this sub-signal is a signal completely located in the QRS complex, then the amplitude of this sub-signal is likely to rise or fall sharply; and if this sub-signal is a signal located in the stable segment signal, then the change trend of the amplitude of this signal is likely to change many times, such as rising first and then falling, and then rising and falling again... and so on. In addition, the change amplitude of this sub-signal (reflected in the image as whether the wave is sharp enough) may be very small.
  • a time window of a fixed length for example, a time window including 30 sampling points
  • the electronic device can use a change trend as a dimension for reference, and check the persistence and mutation of a signal determined by a sampling point in a change trend, that is, whether there is a continuous sampling point in a signal, the number of these sampling points is sufficient and the amplitude keeps rising or falling sharply, to determine whether the signal is a signal on the QRS wave group, thereby determining whether the sampling point is a point on the QRS wave group or around the QRS wave group.
  • the above-mentioned electronic device can construct a feature sequence that can reflect whether this point is a sampling point on the QRS wave group based on the change trend and change amplitude of the amplitude of each sampling point and the sampling points around the sampling point.
  • This feature sequence can be called the first feature sequence corresponding to this point.
  • the first characteristic sequence corresponding to the above-mentioned target sampling point includes j elements, and the j elements correspond one-to-one to the j sampling points in the above-mentioned signal to be denoised.
  • the element corresponding to any one of the above-mentioned j sampling points represents the sum of the rising or falling amplitudes of the sampling points between the above-mentioned any one sampling point and the first sampling point.
  • the falling or rising amplitude of any one of the above-mentioned j sampling points is the difference between the amplitude of the above-mentioned any one sampling point and the amplitude of the next sampling point of the above-mentioned any one sampling point.
  • the above-mentioned first sampling point is a sampling point located before the above-mentioned any one sampling point, presenting an opposite change trend with the above-mentioned any one sampling point, and being the closest to the above-mentioned any one sampling point.
  • the first sampling point can be a sampling point located on a peak or trough in the above-mentioned signal to be detected.
  • the above “sum of rising or falling amplitudes” means either the sum of rising amplitudes or the sum of falling amplitudes. That is, only one change trend is observed, and it is determined whether there is a sufficient number of continuous sampling points with a sharp rising amplitude among the above j sampling points, or whether there is a sufficient number of continuous sampling points with a sharp falling amplitude among the above j sampling points.
  • the j can be any integer greater than 1.
  • the curve in FIG7 is the image of a sub-signal in the above-mentioned signal to be denoised, and the sub-signal is composed of ten sampling points from sampling point 701 to sampling point 710.
  • the vertical axis represents the amplitude of the sampling point, and the amplitude of the sampling point located at the top is larger.
  • sampling point 701 is the above-mentioned target sampling point
  • this section of the ECG signal starting with sampling point 701 and ending with sampling point 710 can be divided into 6 sections according to the amplitude change trend, namely, the rising section corresponding to sampling point 701-sampling point 702, the falling section corresponding to sampling point 702-sampling point 705, the rising section corresponding to sampling point 705-sampling point 706, the falling section corresponding to sampling point 706-sampling point 708, the rising section corresponding to sampling point 708-sampling point 709, and the falling section corresponding to sampling point 709-sampling point 710.
  • the change trend of each sampling point depends on whether the sampling point is in the rising section or the falling section.
  • sampling point 701 is in the rising segment, the change trend of sampling point 701 is rising; if sampling point 704 is in the falling segment, the change trend of sampling point 704 is falling; sampling point 702, sampling point 705, sampling point 706, sampling point 708, and sampling point 709 are critical points where the change trend changes, and their change trends can be rising or falling, which should be determined according to the change trend of the signal segment in which they are located.
  • the sub-signal shown in FIG7 is analyzed with the descending trend as the reference dimension. With the descending trend as the reference dimension, there is no need to consider the degree of change and the speed of change of the rising segment image.
  • the change trends between all the sampling points in the rising segment corresponding to sampling point 701-sampling point 702, the rising segment corresponding to sampling point 705-sampling point 706, and the rising segment corresponding to sampling point 708-sampling point 709 can be defaulted to 0, that is, x 701 ⁇ x 702 (x t represents the amplitude corresponding to sampling point t, for example, x 701 represents the amplitude of sampling point 701, the same below), then the change amplitude from x 701 to x 702 is regarded as 0, and similarly, the change amplitude from x 705 to x 706 , and the change amplitude from x 708 to x 709 are all 0.
  • sampling point 703-sampling point 705 In the descending section corresponding to sampling point 702-sampling point 705, the change trend of sampling point 703-sampling point 705 is a descending trend.
  • sampling point 702 is located before them and is The nearest sampling point that shows the opposite trend, that is, sampling point 702 is the "first sampling point" of sampling points 703-705.
  • the sum of the decline amplitude of each sampling point in sampling points 703-sampling point 705 and sampling point 702 is x702 - x703 , x702 - x704 , x702 - x705 .
  • the sum of the decline amplitude of each sampling point in sampling points 703-sampling point 705 and sampling point 702 is x06 - x707 , x706 - x708 ; in the descending section corresponding to sampling points 709-sampling point 710, the sum of the decline amplitude of sampling point 710 and sampling point 709 is x709 - x710 .
  • the j (here j is equal to 9) elements contained in the first feature sequence corresponding to the sampling point 701 as the target sampling point are [0, x702 - x703 , x702 - x704 , x702 - x705 , 0, x706 - x707 , x706 - x708 , 0, x709 - x710 ]. It can be seen that the 9 sampling points corresponding to these 9 elements are sampling point 702 to sampling point 710, and these nine elements represent the degree of cumulative change of the corresponding sampling points in their respective corresponding signal segments.
  • the electronic device may determine the first characteristic sequence corresponding to the target sampling point from the target sampling point in the following manner:
  • the target sampling point determines the first time window containing (j+1) sampling points; calculate the amplitude difference between each sampling point and the next sampling point except the last sampling point in the first time window in sequence to obtain j differences; reset the numbers less than 0 in the j differences to 0 to obtain the first sequence corresponding to the target sampling point; perform a forward accumulation reconstruction operation on the elements in the first sequence corresponding to the target sampling point in sequence to obtain the j elements, and use the j elements as the first feature sequence corresponding to the target sampling point; wherein the accumulation reconstruction operation includes: when the value of the element is 0, keep the value of the element unchanged; when the value of the element is not zero, add the value of the element to the value of the previous element until an element with a value of 0 is encountered, and use the value obtained by the forward accumulation as the reconstructed value of the element.
  • sampling point 801 in Figure 8 is the target sampling point.
  • Sampling point 801-sampling point 810 are the (j+1) sampling points, and the time window corresponding to sampling point 801-sampling point 810 is the first time window.
  • the amplitudes of sampling points 801 to 810 are 5, 10, 9, 7, 4, 8, 3, 1, 8, 1 respectively (it should be understood that the amplitudes set here are only for the convenience of readers to understand, and do not represent the amplitudes of the signal to be denoised in the actual scene, the same below).
  • the amplitudes of sampling points 801 to 810 are arranged in sequence, that is, a sequence [5, 10, 9, 7, 4, 8, 3, 1, 8, 1] is obtained. 4, 8, 3, 1, 8, 1].
  • the amplitude difference between each sampling point and the next sampling point in the above sampling point 801-sampling point 810 is calculated in turn (the previous term minus the next term, if there is no sampling point after sampling point 810, the calculation is stopped), and 9 differences are obtained, which are -5, 1, 2, 3, -4, 5, 2, -7, 7; these 9 differences are the above j differences. These 9 differences are arranged in sequence to obtain a new sequence [-5, 1, 2, 3, -4, 5, 2, -7, 7].
  • the numbers less than 0 in the new sequence are reset to 0, and the first sequence corresponding to the above target sampling point (that is, sampling point 801) is obtained [0, 1, 2, 3, 0, 5, 2, 0, 7].
  • the cumulative variation threshold corresponding to the target sampling point is determined by the first feature sequence corresponding to the target sampling point and v first feature sequences corresponding to v sampling points before the target sampling point.
  • the specific role and determination method of the first feature sequence corresponding to any sampling point among the v sampling points can refer to the above description of the first feature sequence corresponding to the target sampling point, which will not be repeated here.
  • the electronic device first determines that a sampling point in the above-mentioned signal to be denoised is the target sampling point, and then determines the first feature sequence corresponding to the target sampling point in the manner described above. After processing the amplitude of the target sampling point, the electronic device will take the next sampling point of the above-mentioned target sampling point as the new target sampling point, and obtain the first feature sequence corresponding to the new target sampling point in the same way. It is not difficult to understand that when the target sampling point changes, the first time window corresponding to the target sampling point will also move backward accordingly (generally moving the position of one sampling point).
  • the sampling point 800 is the historical target sampling point, and the sequence composed of the amplitudes of the sampling points in the first time window corresponding to the sampling point 800 is [9, 5, 10, 9, 7, 4, 8, 3, 1, 8,].
  • the first characteristic sequence corresponding to the sampling point 800 is [4, 0, 1, 3, 6, 0, 5, 7, 0] (here it is assumed that the sampling point 800 is a point on a peak or a trough).
  • the electronic device has used each sampling point before the target sampling point as the target sampling point, and obtained the first characteristic sequence corresponding to these sampling points.
  • the remaining elements are all elements in the first characteristic sequence corresponding to the previous sampling point.
  • the electronic device after the electronic device determines the first feature sequence corresponding to the target sampling point, the electronic device will determine the first feature sequence corresponding to the target sampling point and the first feature sequence corresponding to the v sampling points before the target sampling point.
  • a characteristic sequence determines a threshold, that is, the cumulative variation threshold corresponding to the above target sampling point. This cumulative variation threshold represents a distribution range of the values of most elements in the sequence after the sequence obtained by splicing the first characteristic sequence corresponding to the above target sampling point and the v first characteristic sequences corresponding to the v sampling points before the above target sampling point.
  • the value of an element in the sequence is greater than or equal to the cumulative variation threshold, it means that the value of the element is significantly greater than the values of other elements in the sequence, that is, the element is an element that has undergone a mutation, which coincides with the mutation of the QRS wave group in the electrocardiogram signal.
  • the electronic device can use the average filtering method to average the amplitude of the target sampling point and the amplitude of the m sampling points around the target sampling point to obtain the target value, and update the amplitude of the target sampling point to the target value, so as to achieve the denoising effect of the target sampling point.
  • the target sampling point is likely to be a sampling point located in the QRS wave group in the above-mentioned signal to be denoised.
  • the above-mentioned electronic device does not change the amplitude of the above-mentioned target sampling point.
  • m may be equal to thirty percent of the sampling frequency of the signal to be denoised.
  • the electronic device may concatenate the first feature sequence corresponding to the target sampling point with the v first feature sequences corresponding to the v sampling points to obtain a second sequence.
  • the outlier corresponding to the second sequence is determined using the quartile method, and the outlier corresponding to the second sequence is determined as the cumulative variation threshold corresponding to the target sampling point.
  • the outlier corresponding to the second sequence is an extreme outlier corresponding to the second sequence.
  • MB is the first feature sequence corresponding to the target sampling point
  • MB-1 is the first feature sequence corresponding to the sampling point before the target sampling point, and so on
  • the sequence obtained by expanding and splicing multiple sequences such as MBv , MB-v+1 , ..., MB, is the second sequence mentioned above.
  • the 75th percentile number (upper quartile) of the sequence express The 25th percentile number (lower quartile) of the sequence.
  • the first characteristic sequence corresponding to the sampling point 800 and the first characteristic sequence corresponding to the sampling point 801 in the above description are used as examples for description.
  • the value of v is 1.
  • the first characteristic sequence corresponding to the sampling point 800 is [4, 0, 1, 3, 6, 0, 5, 7, 0]
  • the first characteristic sequence corresponding to the sampling point 801 is [0, 1, 3, 6, 0, 5, 7, 0, 7]
  • MB [0, 1, 3, 6, 0, 5, 7, 0, 7]
  • MB -1 [4, 0, 1, 3, 6, 0, 5, 7, 0].
  • the electronic device determines the target sampling point 801 as a sampling point on the stable segment, then the electronic device updates the amplitude of the target sampling point 801, and updates the amplitude of the target sampling point 801 to the average value of the sum of the amplitudes of the m sampling points around the sampling point 801.
  • the amplitude of the sampling points in the QRS complex has continuous mutation (or there is a sufficiently large number of continuous sampling points, the amplitude of these sampling points keeps rising or falling sharply)
  • the first feature sequence corresponding to these sampling points is likely to produce elements with larger values due to the cumulative variation of the sampling point amplitude, and the first feature sequence corresponding to these sampling points is likely to have elements with values greater than the cumulative variation threshold corresponding to these sampling points.
  • the first feature sequence corresponding to these sampling points is likely to be difficult to produce elements with larger values due to the non-accumulative nature of the sampling point amplitude and the small variation between the amplitudes, and the first feature sequence corresponding to these sampling points is basically unlikely to have elements with values greater than the cumulative variation threshold corresponding to these sampling points.
  • FIG9 shows an image of an initial signal without denoising and an image of a sequence obtained by splicing the first feature sequences corresponding to each sampling point in the initial signal.
  • FIG9 (B) shows an image of an initial signal without denoising, which can be the image of the initial signal in the above description
  • FIG9 (A) shows an image of the first feature sequence corresponding to each sampling point in the initial signal.
  • multiple first feature sequences corresponding to multiple sampling points can be spliced to obtain a sequence (the sampling point corresponding to each element in this sequence can be the sampling point corresponding to the first feature sequence ending with the element), and the image corresponding to this sequence is the image shown in FIG9 (A).
  • the image shown in (A) in Figure 9 also has obvious and sharp waves at these positions, which further verifies that the sampling points on the Q wave, R wave and S wave in the initial signal are likely to have elements with values greater than the cumulative variation threshold corresponding to these sampling points in the corresponding first feature sequence, and the electronic device can By more accurately identifying these sampling points without changing their amplitudes, and specifically denoising the noise of the sampling points in the stable segment signal, the original characteristics of the QRS complex in the ECG signal can be retained, and the ECG signal can be effectively denoised while ensuring its reference value.
  • the present application also provides another signal denoising method.
  • This method not only refers to the continuous mutation of the peaks of reference significance, but also refers to the average variation degree of the peaks of reference significance in the ECG signal.
  • denoising it identifies the sampling points on the waves of reference significance in the ECG signal, especially the sampling points on the R wave, so as to effectively avoid the suppression of the sampling points on these waves when denoising the signal.
  • the ECG signal can be effectively denoised while further ensuring the reference value of the ECG signal.
  • the ECG signal can be denoised without affecting the waves with reference significance in the ECG signal, that is, the ECG signal can be effectively denoised while ensuring the reference value of the ECG signal.
  • the method provided in the embodiment of the present application may include but is not limited to the following steps:
  • S1001 The electronic device determines a first feature sequence corresponding to a target sampling point.
  • the electronic device may be the electronic device shown in FIG. 4 , or may be the electronic device 100 in the foregoing description.
  • the target sampling point is a sampling point in the signal to be de-noised.
  • the signal to be de-noised may be a signal directly collected by the electronic device, or may be a signal collected by other devices and sent to the electronic device.
  • the signal to be denoised may be an electrocardiogram signal, which may be a bioelectric signal of a biological body surface extracted by the electronic device through electrodes.
  • the collected electrocardiogram signal is composed of multiple sampling points sorted according to sampling time.
  • the value of the sampling point is the intensity or energy value of the bioelectric signal of the body surface during collection.
  • the multiple sampling points are arranged in the order of sampling time to form an electrocardiogram with a certain degree of fluctuation.
  • step S1001 can refer to the above description of step S601 in Figure 6, which will not be repeated here.
  • the electronic device can execute step S1001 and step S1002 in any order, that is, the electronic device can first execute step S1001 and then execute step S1002; or the electronic device can first execute step S1002 and then execute step S1001; or in some scenarios, the electronic device can execute step S1002 and step S1001 at the same time, and the present application does not limit this.
  • S1002 The electronic device determines a first eigenvalue corresponding to the target sampling point.
  • the first eigenvalue corresponding to the target sampling point represents the average of the absolute values of the amplitude differences between every two adjacent sampling points in a time window including the target sampling point and containing (k+1) sampling points.
  • the QRS wave in the ECG signal is often the largest, most obvious, and sharpest. Mathematically, it is called the “singularity" or “mutation” of the QRS wave, which is manifested as a sudden change in slope. This mutation is more obvious in the R wave of the QRS complex.
  • the electronic device can use the above-mentioned target sampling point as a base point to determine a time window containing (k+1) sampling points, and average the absolute value of the amplitude difference between each two adjacent sampling points in this time window to obtain the first eigenvalue corresponding to the above-mentioned target sampling point.
  • the first characteristic value corresponding to the target sampling point is based on the absolute value of the amplitude difference between the two sampling points, no matter how the change trend of the (k+1) sampling points changes, the change amplitude between the two sampling points is is a number greater than 0. That is to say, no matter whether the amplitude of the sampling points in the time window containing the (k+1) sampling points is continuously rising, continuously falling, or alternatingly rising and falling, the first eigenvalue corresponding to the target sampling point is the average value of the total slope between each adjacent two sampling points in the (k+1) sampling points.
  • the slope i.e., the degree of mutation
  • the electronic device can easily determine whether the target sampling point is a QRS wave, especially a point on the R wave, based on the first eigenvalue corresponding to the target sampling point, so as to determine whether the target sampling point needs to be denoised.
  • the target sampling point in the time window including the target sampling point and containing (k+1) sampling points, may be the last sampling point in the time window including the (k+1) sampling points; or, in the time window including the target sampling point and containing (k+1) sampling points, there is at least one sampling point before and after the target sampling point.
  • the electronic device can obtain k sampling points before the sampling point, and calculate the average of the absolute values of the amplitude differences between each two adjacent sampling points among the (k+1) sampling points ending with the sampling point as the first eigenvalue corresponding to the sampling point. In this way, the electronic device can process the newly obtained sampling point with zero delay, and can complete the processing process of the target sampling point more efficiently.
  • the electronic device may not process the sampling point immediately, but continue to obtain signals of several sampling points after the sampling point, and then use the sampling point as a base point to obtain at least one sampling point before the sampling point and at least one sampling point before the sampling point, a total of k sampling points, which are determined together with the sampling point as the (k+1) sampling points, and the average of the absolute values of the amplitude differences between each two adjacent sampling points in the (k+1) sampling points is calculated as the first eigenvalue corresponding to the sampling point.
  • the target sampling point is used as the sampling point in the middle of the (k+1) sampling points, so that the calculated first eigenvalue corresponding to the target sampling point can more truly reflect the change trend of the target sampling point, and can accurately judge whether the target sampling point is a point on the QRS complex.
  • the electronic device may determine the first eigenvalue corresponding to the target sampling point from the target sampling point in the following manner:
  • the electronic device can determine a second time window including (k+1) sampling points; in the second time window, there are n sampling points before the target sampling point, and there are (kn) sampling points after the target sampling point; then the electronic device can sequentially calculate the absolute value of the difference between each sampling point and the previous sampling point in the second time window, obtain k absolute values of the difference, and use the average value of the absolute values of the k differences as the first sampling point corresponding to the target sampling point. Eigenvalues.
  • the cumulative variation threshold corresponding to the target sampling point is determined by the first feature sequence corresponding to the target sampling point and v first feature sequences corresponding to v sampling points before the target sampling point.
  • step S1003 the details of "the values in the first feature sequence corresponding to the above-mentioned target sampling point are all less than the cumulative variation threshold corresponding to the target sampling point" and "the electronic device averages the amplitude of the target sampling point and the amplitudes of m sampling points around the target sampling point to obtain the target value, and updates the amplitude of the target sampling point to the target value" in step S1003 can be referred to the aforementioned description of step S602 in Figure 6, which will not be repeated here.
  • the average variation threshold corresponding to the target sampling point is determined by the first eigenvalue corresponding to the target sampling point and i first feature sequences corresponding to i sampling points before the target sampling point.
  • the specific role and determination method of the first eigenvalue corresponding to any sampling point among the i sampling points can refer to the above description of the first eigenvalue corresponding to the target sampling point, which will not be repeated here.
  • the electronic device first determines a sampling point in the signal to be denoised as a target sampling point, and then determines the first eigenvalue corresponding to the target sampling point in the manner described above. After processing the amplitude of the target sampling point, the electronic device uses the next sampling point of the target sampling point as a new target sampling point, and obtains the first eigenvalue corresponding to the new target sampling point in the same manner. It is not difficult to understand that when the target sampling point changes, the second time window corresponding to the target sampling point will also move backward accordingly (generally by the position of one sampling point). Taking FIG.
  • the electronic device has used each sampling point before the target sampling point as the target sampling point, and obtained the first eigenvalues corresponding to these sampling points.
  • the electronic device will determine a threshold value according to the first eigenvalue corresponding to the target sampling point and the first eigenvalues corresponding to the i sampling points before the target sampling point, that is, the average variation threshold value corresponding to the target sampling point.
  • This cumulative variation threshold represents a distribution range of the values of most elements in the sequence after the sequence obtained by splicing the first eigenvalue corresponding to the target sampling point and the v first eigenvalues corresponding to the i sampling points before the target sampling point.
  • the value of an element in the sequence is greater than or equal to the average variation threshold, it means that the value of the element is significantly greater than the values of other elements in the sequence, that is, the element is an element that has undergone a mutation, which coincides with the mutation of the QRS wave group in the electrocardiogram signal, especially the mutation of the slope of the sampling point on the R wave. Therefore, in this method, if the first eigenvalue corresponding to the target sampling point is less than the average variation threshold corresponding to the target sampling point, it means that the target sampling point is likely to be a sampling point located in the stationary segment signal of the signal to be denoised.
  • the electronic device can use the average filtering method to average the amplitude of the target sampling point and the amplitudes of the m sampling points around the target sampling point to obtain a target value, and update the amplitude of the target sampling point to the target value. Value, so as to achieve the denoising effect of the target sampling point.
  • the first eigenvalue corresponding to the above target sampling point is greater than or equal to the average variation threshold corresponding to the target sampling point, it means that the target sampling point is likely to be a sampling point located in the QRS complex in the above signal to be denoised.
  • the above electronic device does not change the amplitude of the above target sampling point.
  • the electronic device may concatenate the first characteristic sequence value corresponding to the target sampling point with the i first characteristic values corresponding to the i sampling points to obtain a third sequence.
  • the quartile method is used to determine the abnormal value corresponding to the third sequence, and the abnormal value corresponding to the third sequence is determined as the cumulative variation threshold corresponding to the target sampling point.
  • the abnormal value corresponding to the third sequence is the extreme abnormal value corresponding to the second sequence.
  • CA is the cumulative variation threshold mentioned above
  • M A is the first eigenvalue corresponding to the target sampling point
  • M A-1 is the first eigenvalue corresponding to the sampling point before the target sampling point, and so on;
  • This is the third sequence mentioned above.
  • the first characteristic sequence corresponding to the sampling point 800 and the first characteristic sequence corresponding to the sampling point 801 in the above description are used as examples for description.
  • the value of v is 1, i is 7, and the sampling point 801 is the target sampling point.
  • the third sequence constructed based on the sampling point 801 is [6, 2.7, 4, 3.5, 5, 3.3, 3.6].
  • the first characteristic sequence corresponding to the sampling point 801 is [4, 0, 1, 3, 6, 0, 5, 7, 0]
  • the CB corresponding to the sampling point 801 is 28
  • the first characteristic sequence corresponding to the sampling point 801 is [4, 0, 1, 3, 6, 0, 5, 7, 0], and the values of the elements in the sequence are all less than 25. If the first characteristic value mA corresponding to the target sampling point 801 is less than CA , the electronic device will determine that the target sampling point 801 is a sampling point in the Q stationary segment signal, and the electronic device will update the amplitude of the target sampling point 801 to the average value of the sum of the amplitudes of the m sampling points around the sampling point 801.
  • the direction of the R wave in the QRS complex of the signal may be reversed.
  • the R wave in the QRS complex in their ECG signal may be inverted due to myocardial ischemia.
  • the rising and falling trends of the sampling points in the R wave are reversed, and the peak and trough of the R wave and the trend of change between the PR segment and the ST segment are also reversed.
  • the position of the target sampling point is analyzed only by constructing the first feature sequence corresponding to the target sampling point, it is likely to draw a wrong conclusion, and it is likely to use an inappropriate method to process the amplitude of the target sampling point during the denoising process.
  • the first eigenvalue corresponding to the target sampling point only focuses on the amplitude change of the sampling point, and does not focus on the change trend of the amplitude of the sampling point. If the first eigenvalue corresponding to the target sampling point and the first feature sequence corresponding to the target sampling point are used together to judge the area where the target sampling point is located, it is possible to greatly reduce the judgment of the sampling point position on the abnormal ECG signal, determine whether the target signal point is a point located on the QRS complex, and denoise the noise of the stable segment signal in the signal while retaining the characteristics of the Q wave and S wave. In addition, even for a normal ECG signal, the first characteristic value corresponding to the target sampling point is helpful for the electronic device to more quickly and accurately identify whether it is a sampling point on the R wave.
  • the first feature sequence and the first feature value corresponding to the target sampling point may correspond to two data features FB and FA of the target sampling point, respectively. If the first feature value mA corresponding to the target sampling point is greater than or equal to the average variation threshold CA corresponding to the target sampling point, the feature FA of the target sampling point is 1, otherwise FA is 0; if there is at least one element in the first feature sequence MB corresponding to the target sampling point that is greater than or equal to the cumulative variation threshold CA corresponding to the target sampling point, the data FB of the target sampling point is 1, otherwise FB is 0.
  • the amplitude of the sampling points in the QRS complex has continuous mutation, especially the sampling points on the R wave, the amplitude mutation is very obvious. It can be understood that for the sampling points on the QRS complex, the first characteristic sequence values corresponding to these sampling points are likely to be greater than the average variation threshold corresponding to these sampling points due to the drastic change in the amplitude of the sampling points. Correspondingly, for the sampling points in the stationary signal, the first eigenvalues corresponding to these sampling points are likely to be difficult to be large values due to the small variation between the amplitudes of the sampling points. Therefore, the first eigenvalues corresponding to these sampling points are basically unlikely to be greater than the average variation threshold corresponding to these sampling points.
  • FIG11 shows an image of an initial signal without denoising and an image of the first characteristic sequence value corresponding to each sampling point in the initial signal.
  • FIG11 (B) shows an image of an initial signal without denoising, which can be the image of the initial signal in the aforementioned description, and
  • FIG11 (A) shows an image of the first characteristic value corresponding to each sampling point in the initial signal.
  • the image shown in FIG11 (A) also has an obvious wave with a large amplitude at the corresponding position, which further verifies that the sampling point of the R wave in the initial signal, its corresponding first characteristic value is very likely to be greater than the average variation threshold corresponding to these sampling points, and the electronic device can more accurately identify these sampling points without changing their amplitude, and specifically denoise the noise of the sampling points in the stationary segment signal, which can retain the original characteristics of the R wave of the QRS complex in the electrocardiogram signal, and effectively denoise the electrocardiogram signal while ensuring the reference value of the electrocardiogram signal.
  • An embodiment of the present application also provides an electronic device, which includes: one or more processors and a memory; wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method shown in the aforementioned embodiment.
  • the term "when" may be interpreted to mean “if" or “after" or “in response to determining" or “in response to detecting", depending on the context.
  • the phrases “upon determining" or “if (the stated condition or event) is detected” may be interpreted to mean “if determining" or “in response to determining" or “upon detecting (the stated condition or event)” or “in response to detecting (the stated condition or event)", depending on the context.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media.
  • the available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
  • the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed, it can include the processes of the above-mentioned method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Public Health (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Signal Processing (AREA)
  • Cardiology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Psychiatry (AREA)
  • Physiology (AREA)
  • Power Engineering (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

一种信号的去噪方法及电子设备,该方法可以借助心电信号中具有参考意义的波峰的持续突变性,在去噪时识别出该信号点是否是具有参考意义的信号波上的点,从而确定是否对该信号点进行去噪处理。实施本方法,可以在保证心电信号的参考价值的前提下对心电信号有效去噪。

Description

信号的去噪方法及电子设备
本申请要求于2022年09月29日提交中国专利局、申请号为202211202646.9、申请名称为“信号的去噪方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及生命特征识别与处理技术领域,尤其涉及信号的去噪方法及电子设备。
背景技术
心电信号的采集通常是通过贴附在皮肤表面的电极得到的。由于皮肤上的心电信号比较弱,且容易受噪声干扰,导致采集到的心电信号中有很多噪声,降低了心电诊断的准确性和可靠性。尤其是,通过可穿戴心电设备采集到的用户处于非静止状态时的心电图包含大量的噪声。
而心电信号中的例如肌电噪声、运动噪声等噪声存在于心电信号的全频段之中。这些噪声的影响虽然较小但是却很难彻底消除。这些噪声在信号的平稳段影响更为明显。传统的去噪方法在对心电信号中的这些噪声进行去噪时,容易对心电信号中的P波、T波以及R波的波峰造成干扰;而P波、T波以及R波作为心电信号中的关键特征,当其被影响时心电信号也就失去了参考价值。
因此,如何在保证心电信号的参考价值的情况下对心电信号进行去噪是亟待解决的问题。
发明内容
本申请的目的在于提供一种信号的去噪方法及电子设备。该方法通过借助心电信号中具有参考意义的波峰的持续突变性,在去噪时识别出该信号点是否是具有参考意义的信号波上的点,从而确定是否对该信号点进行去噪处理。实施本方法,可以在保证心电信号的参考价值的前提下对心电信号有效去噪。
上述目标和其他目标将通过独立权利要求中的特征来达成。进一步的实现方式在从属权利要求、说明书和附图中体现。
第一方面,本申请提供了一种信号的去噪方法,包括:确定目标采样点对应的第一特征序列,所述目标采样点对应的第一特征序列包括j个元素,所述j个元素与待去噪信号中的j个采样点一一对应,所述j个采样点中任意一个采样点对应的元素表征所述任意一个采样点与第一采样点之间的各采样点的上升或下降幅度之和,所述j个采样点中任一采样点的下降或上升幅度为所述任一采样点的幅值与所述任一采样点的后一采样点的幅值的差值,所述第一采样点为位于所述任意一个采样点之前的与所述任意一个采样点呈现相反变化趋势、且与所述任意一个采样点距离最近的一个采样点;在所述目标采样点对应的第一特征序列中的数值均小于所述目标采样点对应的累积变异阈值的情况下,将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将所述 目标采样点的幅值更新为所述目标数值,所述目标采样点对应的累积变异阈值由所述目标采样点对应的第一特征序列以及在所述目标采样点之前的v个采样点对应的v个第一特征序列确定。
在本方法中,所述目标采样点为待降噪信号中的一个采样点,所述待降噪信号可以是所述电子设备直接采集到的信号,也可以是由其他设备采集并发送给所述电子设备的信号。之后,电子设备也可以对带降噪信号进行降噪后所得的信号发送回所述其他设备。
具体的,所述待去噪的信号可以是心电信号,所述心电信号可以是所述电子设备通过电极提取的生物体表的生物电信号,采集得到的心电信号就是由根据采样时间排序的多个采样点组成的。在心电信号中,采样点的值即为采集时体表生物电信号的强度或能量值。所述多个采样点按照采样时间的顺序排列形成具备一定起伏程度的心电图。通常来说,心电信号中QRS波往往是最大、最明显的、最尖锐的,在数学上,称为QRS波的“奇异性”或者“突变性”,表现为斜率的突变。也就是说,相比于心电信号中的平稳段信号,心电信号中QRS波群上的相邻的两个采样点之间的幅值差非常的大,这也就导致了QRS波群中的相邻的两个采样点之间的斜率的绝对值也非常的大。
所述“呈现相反变化趋势”表示所述第一采样点的前一个采样点的幅值大于所述第一采样点的幅值,但所述第一采样点的后一个采样点的幅值却小于所述第一采样点的幅值;或者表示所述第一采样点的前一个采样点的幅值小于所述第一采样点的幅值,但所述第一采样点的后一个采样点的幅值却大于所述第一采样点的幅值。具体的,在图像上,所述第一采样点可以是所述待检测信号中位于波峰波谷上的采样点。
此外,所述“上升或下降幅度之和”表示要么是上升的幅度之和,要么是下降的幅度之和。也就是只从一个变化趋势来观察,要么确定所述j个采样点中是否存在一段数量足够多且幅值保持急剧的上升的连续的采样点,要么确定所述j个采样点中是否存在一段数量足够多且幅值保持急剧的下降的连续的采样点。
所述j可以为任意大于1的整数。在一个可选的实施方式中,所述j可以根据所述待去噪信号的采样频率确定。具体的,所述j可以等于所述待去噪信号的采样频率的百分之三十。例如,当所述带降噪信号的采样频率为500是,则所述j可以为500×0.3=150。
需理解,一个波按照变化趋势可以视为两个部分,即上升的部分(采样点的幅值越来越大)和下降的部分(采样点的幅值越来越大),波峰是先上升再下降,波谷是先下降再上升。相比于平稳段信号,QRS波群中采样点的幅值可能会更长时间地以一个固定的变化趋势进行变化,例如,QRS波群中的QS段中,信号的幅值先持久性的上升,再持久性的下降。也就是说,在心电信号中,如果以一个固定长度的时间窗口(例如包括30个采样点的时间窗口)从心电信号中选择出一段子信号,如果这一段子信号是完全位于QRS波群中的信号,那么这一段子信号的幅值大概率是以急剧上升或者急剧下降的;而如果这一段子信号位于平稳段信号中的信号,那么这一段信号的幅值的变化趋势很可能发生多次改变,例如先上升再下降、而后再上升再下降……如此反复变化,并且,这一段子信号的变化幅度(在图像上体现为波是不是足够尖锐)可能很小。
因此,电子设备可以以一个变化趋势为维度进行参考,通过查看以一个采样点确定的一段信号在一个变化趋势上的持久性和突变性,即一段信号中是否存在一段连续的采样点, 这些采样点的数量足够多且幅值保持急剧的上升或者下降,来确定这个信号是否为QRS波群上的信号,从而确定这个采样点是否为QRS波群上或者QRS波群周围的点。基于此,在本方法中,所述电子设备可以基于每个采样点与所述采样点周围的采样点在幅值上的变化趋势和变化幅度,构造出能反映这个点是否是处于QRS波群上的采样点的特征序列,这个特征序列可以称为这个点对应的第一特征序列。
需要理解的是,在所述电子设备对所述待降噪信号去噪的过程中,所述电子设备都是先确定所述待降噪信号中的一个采样点为目标采样点后,再通过前述说明的方式确定所述目标采样点对应的第一特征序列。在对所述目标采样点的幅值进行处理之后,则所述电子设备即将所述目标采样点的下一个采样点作为新的目标采样点,以相同的方式获取这个新的目标采样点对应的第一特征序列。不难理解的,当目标采样点变化时,目标采样点对应的第一时间窗也会相应的往后移动(一般是移动一个采样点的位置)。也就是说,电子设备都曾将所述目标采样点之前的每个采样点都作为目标采样点,并求得了这些采样点对应的第一特征序列。
在本方法中,电子设备在确定所述目标采样点对应的第一特征序列之后,电子设备会根据所述目标采样点对应的第一特征序列以及所述目标采样点之前的v个采样点对应的第一特征序列确定一个阈值,即所述目标采样点对应的累积变异阈值。这个累积变异阈值表征将所述目标采样点对应的第一特征序列以及所述目标采样点之前的v个采样点对应v个第一特征序列进行拼接的得到的序列后,这个序列中的绝大部分元素的值所呈现出来的一个分布范围。当序列中有一个元素的值大于或等于这个累积变异阈值时,就表示该元素的值明显大于所述序列中其他元素的值,即所述元素是一个发生了突变的元素,这正好与心电信号中QRS波群的突变性相契合。因此,在本方法中,如果所述目标采样点对应的第一特征序列中元素的数值均小于所述目标采样点对应的累积变异阈值,就表示所述目标采样点很可能是所述待降噪信号中位于平稳段信号中的采样点,则电子设备可以利用平均滤波法,将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将所述目标采样点的幅值更新为所述目标数值,以此达到对所述目标采样点的去噪效果。相应的,如果所述目标采样点对应的第一特征序列中的数值中存在一个元素的值大于或等于所述目标采样点对应的累积变异阈值,就表示所述目标采样点很可能是所述待降噪信号中位于QRS波群的采样点,为了保护QRS波群的特征,则所述电子设备不改变所述目标采样点的幅值。
本方法通过借助心电信号中具有参考意义的波峰的持续突变性,在去噪时识别出采样点是否是具有参考意义的信号波上的点,从而确定是否对该采样点进行去噪处理。实施本方法,可以在保证心电信号的参考价值的前提下对心电信号有效去噪。
结合第一方面,在一个可能的实施方式中,在将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值之前,所述方法还包括:确定所述目标采样点对应的第一特征值,所述目标采样点对应的第一特征值表征包括所述目标采样点在内、包含(k+1)个采样点的时间窗中每相邻两个采样点之间幅值差的绝对值的均值;所述将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,包括:在所述目标采样点对应的第一特征序列中的数值均小于所述目 标采样点对应的累积变异阈值,且所述目标采样点对应的第一特征值小于平均变异阈值的情况下,将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到所述目标数值;所述目标采样点对应的平均变异阈值由所述目标采样点对应的第一特征值以及i个采样点对应的第一特征值确定;在待去噪信号中,所述i个采样点为在所述目标采样点之前的i个采样点。
需理解,对于一些非正常的心电信号,所述信号中QRS波群中R波的方向可能会发生逆转。例如,对于一些患有心脏疾病的人而言,其心电信号中QRS波群中的R波可能会由于患者心肌缺血而呈现为倒置状态。在这种情况下,R波中采样点的上升趋势和下降趋势也就发生了逆转,那么R波的波峰和波谷与PR段和ST段之间的变化趋势也会生翻转。在这种情况下,如果仅通过构造目标采样点对应的第一特征序列来分析所述目标采样点的位置的话,很可能就会得出错误的结论,并且在去噪过程中很可能采用不恰当的方式来对所述目标采样点的幅值进行处理。但是,目标采样点对应的第一特征值只关注采样点幅值变化幅度,不关注采样点幅值的变化趋势,本实施方式将目标采样点对应的第一特征值和目标采样点对应的第一特征序列一起对目标采样点所处的区域进行判断,可以极大概率降低对异常心电信号上采样点位置的判断,确定所述目标信号点是否是位于QRS波群上的点,并在保留Q波和S波特征的前提下对信号中平稳段信号的噪声去噪。此外,即使是对于正常的心电信号,目标采样点对应的第一特征值也有利于电子设备更快速且更准确的辨别其是否是R波上的采样点。
结合第一方面,在一个可能的实施方式中,所述方法还包括:在所述目标采样点对应的第一特征序列中存在至少一个数值大于或等于所述目标采样点对应的累积变异阈值的情况下,保持所述目标采样点的幅值不变;和/或,所述目标采样点对应的第一特征值大于或等于所述平均变异阈值的情况下,保持所述目标采样点的幅值不变。
需理解,当所述目标采样点对应的第一特征序列中存在至少一个数值大于或等于所述目标采样点对应的累积变异阈值的情况下,则所述目标采样点很可能是QRS波群上的点;此外,如果所述目标采样点对应的第一特征值大于或等于所述平均变异阈值,那么所述目标采样点很可能是QRS波群上且大概率是R波上的点。因此,在本实施方式中,为了保护信号去噪后信号中关键波的参考价值,当电子设备确定所述目标采样点为QRS波群上的点时,则电子设备将所述目标采样点的幅值不变。
结合第一方面,在一个可能的实施方式中,在确定目标采样点对应的第一特征序之前,所述方法还包括:对初始信号进行高通滤波和低通滤波,得到所述待去噪信号,所述初始信号为电子设备采集到的表征用户心律的电信号。
在本实施方式中,电子设备还会对初始信号进行高通滤波和低通滤波,得到所述待去噪信号,所述初始信号为电子设备采集到的表征用户心律的电信号。其中,电子设备所使用的高通滤波器和低通滤波器可以是多阶滤波器,这些滤波器可以对滤掉电子设备采集到的初始信号中较高和较低的频段,尤其是那些可能包含伪迹的频段。便于后续分析,且保留要分析的信号的频率范围,提高后续处理过程的处理效率。
具体的,在高频段,电子设备可以使用截止频率低于交流电工频频率(50Hz或60Hz)的低通滤波器,避免工频干扰。在低频段,即低于1Hz的频段,由于电子设备可以使用保 留感兴趣信号最高频段的高通滤波器。
结合第一方面,在一个可能的实施方式中,所述包括所述目标采样点在内、包含(k+1)个采样点的时间窗中,所述目标采样点为所述包含(k+1)个采样点的时间窗中的最后一个采样点;或,在包括所述目标采样点在内、包含(k+1)个采样点的时间窗中,所述目标采样点之前以及所述目标采样点之后均存在至少一个采样点。
在本实施方式中,在所述电子设备当前获取到最新的一个采样点信号后,电子设备可以获取该采样点之前的k个采样点,通过计算包括以所述采样点结束的(k+1)个采样点中每相邻两个采样点之间幅值差的绝对值的均值,作为所述采样点对应的第一特征值,这样,在电子设备就可以零延迟的对刚获取到的采样点进行处理,能以更高效地对完成对目标采样点处理过程。或者,在所述电子设备当前获取到所述最新的一个采样点的信号之后,电子设备可以不立即对该采样点进行处理,而是再继续获取所述采样点之后的若干个采样点的信号后,以所述采样点为基点获取所述采样点之前的至少一个采样点和所述采样点之前的至少一个采样点,总共k个采样点,与所述采样点一起确定为所述(k+1)个采样点,并计算所述(k+1)个采样点中每相邻两个采样点之间幅值差的绝对值的均值,作为所述采样点对应的第一特征值,这样,虽然电子设备不能即使对刚获取到的采样点进行处理,但是将所述目标采样点作为所述(k+1)个采样点中处于中间位置的采样点,能使得计算而来的所述目标采样点对应的第一特征值更真实地反映所述目标采样点的变化趋势,能更准确地对所述目标采样点是否为处于QRS波群上的点进行判断。
结合第一方面,在一个可能的实施方式中,所述确定目标采样点对应的第一特征序列,包括:以所述目标采样点为起点,确定包含(j+1)个采样点的第一时间窗;依次计算所述第一时间窗中除最后一个采样点外,每个采样点与后一个采样点之间的幅值差,得到j个差值;将所述j个差值中小于0的数重置为0,得到所述目标采样点对应的第一序列;将所述目标采样点对应的第一序列中的元素依次进行前向累加重构操作,得到所述j个元素,并将所述j个元素作为所述目标采样点对应的第一特征序列;其中,所述累加重构操作包括:在元素的值为0的情况下,保持元素的值不变;在元素的值不为零的情况下,将元素的值与之前的元素的值累加直至遇到值为0的元素为止,并将前向累加所得的值作为元素重构后的值。
具体的,在一个可选的实施方式中,上述电子设备可以通过以下方式由上述目标采样点确定该目标采样点对应的第一特征序列:
1)假设xt为目标采样点,取时间窗口为j+1,获取窗口内每个采样点的幅值,得到序列XB,则XB=[xt,xt+1……,xt+j];2)计算XB中相邻元素的后向差值,得到序列MB1,即MB1=[xt-xt+1,...,xt+j-1-xt+j];3)对序列MB1中小于零的数据置零,即MB1[MB1<0]=0,得到序列MB2;4)对序列MB2每一个原始进行前向累加重构操作,得到采样点xt对应的第一特征序列MB。具体的,对于序列MB2中的任一元素若该元素为0,则重构后该位置依 然为0,若该位置不为零则前向累加直达遇到为0的元素终止,前向累加所得的值即为该位置重构后的值。
本实施方式通过分别通过幅值相减、负值置零、前向累加重构的方法将目标采样点的周围后续j个采样点的累积变化趋势量化在所述目标采样点对应的第一特征序列中,且两个连续采样点对应的第一特征序列存多个相同的元素,有利于电子设备对目标采样点的数据特征进行分析,确定所述目标采样点所处的区域。
结合第一方面,在一个可能的实施方式中,所述确定所述目标采样点对应的第一特征值,包括:确定包含(k+1)个采样点的第二时间窗;在所述第二时间窗中,所述目标采样点之前存在n个采样点,所述目标采样点之后存在(k-n)个采样点;依次计算所述第二时间窗中每个采样点与前一个采样点之间的差值的绝对值,得到k个差值绝对值,将所述k个差值的绝对值的平均值作为所述目标采样点对应的第一特征值。
具体的,在本实施方式中,上述电子设备可以通过以下方式由上述目标采样点确定该目标采样点对应的第一特征值:1)假设xt为目标采样点,取时间窗口为k+1,获取窗口内每个采样点的幅值,得到序列XA,则XA=[xt-a,……,xt-1,xt,xt+1,……,xt+b],k=a+b;2)计算序列XA差值绝对值均值mA,mA即为目标采样点xt对应的第一特征值;
也就是说,电子设备可以基于上述目标采样点确定一个包含(k+1)个采样点的第二时间窗;在所述第二时间窗中,所述目标采样点之前存在n个采样点,所述目标采样点之后存在(k-n)个采样点;之后电子设备可以依次计算所述第二时间窗中每个采样点与前一个采样点之间的差值的绝对值,得到k个差值绝对值,将所述k个差值的绝对值的平均值作为所述目标采样点对应的第一特征值。
需要理解的是,在本实施方式中,不同于第一特征序列表征的采样点在单个变化趋势上的累积变异程度,由于所述目标采样点对应的第一特征值是基于两个采样点之间幅值差的绝对值而来的,因此,无论所述(k+1)个采样点的变化趋势如何变化,两个采样点之间的变化幅度都是大于0的数。也就是说,无论所述包含(k+1)个采样点的时间窗中的采样点的幅值是持续上升、持续下降还是交替性的上升和下降,所述目标采样点对应的第一特征值都是所述(k+1)个采样点中每相邻两个采样点之间总斜率的平均值。那么对于QRS波群上的采样点来说,尤其是R波上的采样点来说,这些采样点周围的点中每一个点与前一个采样点和后一个采样点之间的斜率(即突变程度)都非常大,这也就意味着电子设备可以很容易的基于所述目标采样点对应的第一特征值确定该目标采样点是否为QRS波,尤其是R波上的点,从而确定是否需要对目标采样点进行去噪处理。
结合第一方面,在一个可能的实施方式中,所述确定目标采样点对应的第一特征序列之后,所述方法还包括:将所述目标采样点对应的第一特征序列与所述v个采样点对应的v个第一特征序列进行拼接,得到第二序列,利用四分位法确定所述第二序列对应的异常 值,将所述第二序列对应的异常值确定为所述目标采样点对应的累积变异阈值。
在本实施方式中,上述累积变异阈值可以通过四分位法确定。由于给出了数据分布的中心、散布和形状的某种指示,具有一定的鲁棒性和科学性,因此通过四分位法确定所述目标采样点对应的累积变异阈值,一定程度上能够精确的反映所述目标采样点对应的第一特征序列是否存在数值突变的元素,进而反映所述目标采样点是否是QRS波群上的点。
结合第一方面,在一个可能的实施方式中,所述确定目标采样点对应的第一特征值之后,所述方法还包括:利用所述目标采样点对应的第一特征值与所述i个采样点对应的i个第一特征值构造第三序列;利用四分位法确定所述第三序列对应的异常值,将所述第三序列对应的异常值确定为所述目标采样点对应的平均变异阈值。
具体的,
其中,“*”表示乘积运算,CB即为上述累积变异阈值,MB为上述目标采样点对应的第一特征序列,MB-1为上述目标采样点前一个采样点对应的第一特征序列,以此类推;为对MB-v,MB-v+1,…,MB等多个序列进行展开拼接构造得到的序列,即上述第二序列。表示序列的75分位点数(上四分位点),表示序列的25分位点数(下四分位点)。k1、k2的取值为k1=4、k2=3,或者k1=2.5、k2=1.5。当k1=4、k2=3时,CB为该第二序列对应的极度异常值;当k1=2.5、k2=1.5时,CB为该第二序列对应的中度异常值。不难看出,随着目标采样点的更换,电子设备自适应的更新上述累积变异阈值。
同理,在本实施方式中,通过四分位法确定所述目标采样点对应的平均变异阈值,一定程度上能够精确的反映所述目标采样点是否对是所述第三序列中存在数值突变的元素,进而反映所述目标采样点是否是QRS波群(尤其是R波)上的点。
具体的,所述目标采样点对应的平均变异阈值可以表示为
其中,“*”表示乘积运算,CA即为上述累积变异阈值,MA为上述目标采样点对应的第一特征值,MA-1为上述目标采样点前一个采样点对应的第一特征值,以此类推;即为上述第三序列。表示序列的75分位点数(上四分位点),表示序列的25分位点数(下四分位点)。k1、k2的取值为k1=4、k2=3,或者k1=2.5、k2=1.5。 当k1=4、k2=3时,CA为该第三序列对应的极度异常值;当k1=2.5、k2=1.5时,CA为该第三序列对应的中度异常值。不难看出,随着目标采样点的更换,电子设备也会自适应的更新上述平均变异阈值。
结合第一方面,在一个可能的实施方式中,所述目标采样点对应的累积变异阈值为利用四分位法确定的所述第二序列对应的极度异常值,和/或,所述目标采样点对应的平均变异阈值为利用四分位法确定的所述第三序列对应的极度异常值。
结合四分位法的特性,在本实施方式中,当所述待去噪的信号为诸如心电信号这样存在幅值突变程度非常大新信号段的信号时,则电子设备可以将所述目标采样点对应的累积变异阈值确定为所述第二序列对应的极度异常值,和/或,将所述目标采样点对应的平均变异阈值确定为所述第三序列对应的极度异常值。
第二方面,本申请实施例提供一种电子设备,所述电子设备包括:一个或多个处理器和存储器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如第一方面或如第一方面中任一可能的实现方式中的方法。
第三方面,提供一种芯片系统,所述芯片系统应用于电子设备,所述芯片系统包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如第一方面或如第一方面中任一可能的实现方式中的方法。
第四方面,提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面或如第一方面中任一可能的实现方式中的方法。
附图说明
图1为本申请实施例提供的一种EGG信号的波形图;
图2为本申请实施例提供的一种表示数列中数据变化程度的折线图;
图3为本申请实施例提供的一种心电信号的降噪结果的示意性说明图;
图4为本申请实施例提供的一种电子设备的外观示意图;
图5为本申请实施例提供的一种电子设备的结构示意图;
图6为本申请实施例提供的一种信号的去噪方法的流程图;
图7为本申请实施例提供的一种待去噪信号中段子信号幅值变化趋势的示意图;
图8为本申请实施例提供的一种基于目标采样点获取其对应第一特征序列的过程示意图;
图9为本申请实施例提供的一种初始信号图像和第一特征序列图像的对比示意图;
图10为本申请实施例提供的一种信号的去噪方法的流程图;
图11为本申请实施例提供的一种初始信号图像和第一特征值图像的对比示意图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为 对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
由于本申请实施例涉及神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语进行介绍。
(1)心电信号的波群和平稳段信号
心电图(electrocardiography,ECG或EKG),也称为心电信号,记录了心脏收缩和舒张过程中产生的生物电信号。每次心脏完成一个完整的电活动,都对应如图1所示的一个ECG波形,包含P波、QRS波群(包含Q波,R波和S波)和T波。其中,心电图上第一个正向偏离基线的波形即为P波,第二个波段为QRS波群。QRS波群由一系列的3个偏离组成,反映了与左右心室除极相关的电流。QRS波群中的第一个负向的偏离称为Q波,QRS波群中第一个正向的偏离称为R波,R波后负向的偏离称为S波。QRS波群之后出现的顶部圆钝的波形为T波,表征心室复极的状态。包括上述各个波的一个完整的波形,被称为一个节拍。在一段足够长的信号中,两个完整波形(节拍)之间的心电信号虽然也表现为波形状,但是这些波的起伏程度是远小于在QRS波群中的波(包括Q波,R波和S波)的。也就是说,在这两个完整波形(节拍)之间的心电信号是比较平稳的。因此,在本申请中,我们可以将一段心电信号中每两个完整波形(节拍)之间的心电信号,也就是图1中看起来起伏程度比较平稳的那端信号称为“平稳段信号”。
此外,需要进一步说明的是,肌电噪声、运动噪声等噪声对心电信号中的平稳段信号的干扰是最严重的。正常来说,一段噪声情况较好的心电信号中,平稳段信号的图像应该是比较的平缓的,不应该如图1所示存在这么频繁又短促的波峰。正是因为这些噪声干扰与心电信号混叠杂,引起心电信号畸变,使整个心电信号波形模糊不清,这会对心电各波段的识别造成影响,则医护人员基于该心电信号得到的诊断结果也会受到影响。因此,选择合适的消噪方法对心电的检查有着重要的意义。
在目前已有的去噪算法中,有些算法对平稳段信号的去噪效果可能微乎其微,而有些去噪算法可能对平稳段信号的去噪效果可能有一些效果,但是又会造成心电信号中QRS波群的造成更大的干扰。因此,如何在尽可能减小对QRS波群的干扰的情况下,有效的对平稳段信号进行去噪,是本申请着重解决的问题。
(2)肌电噪声(electromyography,EMG)
肌电噪声,也称肌电噪声信号,是由于人体活动、肌肉紧张引起的噪声,也就是肌肉纤维在人体中运动单元动作电位(MUAP)在时间和空间上的叠加。头颈部的肌肉活动是EEG肌电干扰的最主要来源,颈部以下的肌肉活动一般不会对EEG产生较大的干扰。这样的干扰幅值较小,但频率较高,其频率在5Hz~2000Hz,表现为不规则快速变化的波形。
(3)运动噪声
运动噪声是由于人体的轻微运动引起的,主要特点是突变性,频率范围一般在3Hz~14Hz的范围内,持续时间也很短。
(4)采样点和采样频率
心电信号通常是心电设备通过电极提取的体表生物电信号,采集得到的心电信号以时间排序的多个采样点组成。采样点的值即为采集时体表生物电信号的强度或能量值。该多个采样点按照采样时间的顺序排列形成心电图。
采样频率是指记录器每秒钟采集心电信号电压的点数。采样频率越高,心电图波形的失真就越小,所采集的数据就会更加精确地描述连续的心电图波形。当采样频率过低时,Q波、R波、S波的波幅都会减小,波形呈阶梯状,心电图将会丢失部分有意义的信息。因此应用适当的采样频率是必要的。
(5)心电采集设备
本申请实施例中,心电采集设备为具备采集心电信号、分析心电信号等于心电信号的采集、处理等相关的设备,可以是心电图采集设备、心电图机等,也可以是具备心电传感器的可穿戴设备或终端等。
(6)高通滤波器和低通滤波器
滤波器是对波进行过滤的器件,是一种让某一频带内信号通过,同时又阻止这一频带外信号通过的电路。
滤波器主要有低通滤波器、高通滤波器两种。其工作原理就是电感阻止高频信号通过而允许低频信号通过,而电容阻止高频信号通过而允许低频信号通过。低通滤波器就是利用电容通高频阻低频、电感通低频阻高频的原理,对于需要截止的高频,利用电容吸收、电感阻碍的方法不使它通过;对于需要放行的低频,利用电容高阻、电感低阻的特点让它通过。高通滤波器同理,低频信号阻止通过而高频信号则允许通过。
(7)四分位数和异常值
四分位数(Quartile)也称四分位点,是指在统计学中把所有数值由小到大排列并分成四等份,处于三个分割点位置的数值。多应用于统计学中的箱线图绘制。它是一组数据排序后处于25%和75%位置上的值。四分位数是通过3个点将全部数据等分为4部分,其中每部分包含25%的数据。很显然,中间的四分位数就是中位数(通常用Q2表示),因此通常所说的四分位数是指处在25%位置上的数值(称为下四分位数,通常用Q1表示)和处在75%位置上的数值(称为上四分位数,通常用Q3表示)。
在一段数列中,通常可以借助四分位计算出该数列中的异常值。一般而言,我们可以将Q3+k(Q3-Q1)作为一个阈值,数列中大于这个阈值的值即为异常值,也就是数列中明显比其他数值大的值。当K取1.5的时候,上述阈值即为中度异常阈值,数列中大于中度异常阈值的数值即为中度异常值;当K取3的时候,上述阈值即为极度异常阈值,数列中大于极度异常阈值的数值即为极度异常值。
例如,假设现在构造一个包括10个数值的数列[2,3,5,6,6,7,8,9,50,75],其中大部分数值(8个)都落在[0,10]这个区间中,但是有两个数值例外,即50和75。由四分位数值的计算方法可以算出,在这个数列中,下四分位数为Q1=3×0.25+5×0.75=4.5,中位数Q2=(7+8)/2=7.5,上四分位数Q3=9×0.75+50×0.25=19.25。则结合前述说明可知,在上述数列的中度异常阈值为Q3+1.5(Q3-Q1)=33.375。因此,在上述数列中,大于33.375的数值都是异常值,也就是数列中的50和75。
进一步的,现在将这些数值以点的形式描绘在二维直角坐标系中,就可以得到如图2 所示的折线图。如图2所示,除了点A、B、C、D之间的线段之外,其他线段构成的折线图的起伏程度都比较平缓(或者说相邻两个点之间的斜率的绝对值都比较小),但是线段AB、线段BC以及线段CD所构成的折线图的起伏程度明显更大(或者说A、B、C、D这些点中相邻两个点之间的斜率的绝对值都比较小)。可以理解的,心电信号的图像与图2所示的图像有相同的特征,即心电信号同样拥有平稳的信号段以及波形较为明显的信号段。在本申请中,在对心电信号的平稳段进行去噪时,对于单个的采样点,可以参考该采样点的幅值以及与该采样点距离较近的采样点的幅值,并结合四分位法来确定该采样点是否是需要进行去噪处理的采样点,就可以在不对心电信号中的P波、T波以及R波的波峰造成干扰的情况下,对心电信号中平稳段信号的噪声进行去噪。具体可以参考后续说明,此处先不赘述。
心电图(electrocardiogram,ECG)/心电信号是心脏电活动在人体表皮的一种综合表现,它里面蕴涵着丰富的反映心脏节律及其电传导的生理和病理信息,在一定程度上可以客观反映心脏各部位的生理状况,目前它已成为无创性检查诊断心血管疾病的重要方法之一,也是评价心脏功能是否良好的重要依据之一。
无论是医院里的专业人士还是没有经验的家庭用户,在采集心电信号的过程中,由于受各种因素的干扰,如翻身、运动、输电线等,使得采集到的心电信号中出现很多噪声,尤其是通过可穿戴心电设备采集到的用户处于非静止状态时的心电图中可能包含大量的噪声。这些噪声无疑会导致信号出现质量问题,也会对影响心电图的特征识别造成干扰,降低了心电诊断的准确性和可靠性。因此,对心电信号的质量去噪是非常有必要的。而心电信号中的例如肌电噪声、运动噪声等噪声存在于心电信号的全频段之中。这些噪声的影响虽然较小但是却很难彻底消除。这些噪声在信号的平稳段影响更为明显。传统的去噪方法在对心电信号中的这些噪声进行去噪时,容易对心电信号中的P波、T波以及R波的波峰造成干扰;而P波、T波以及R波作为心电信号中的关键特征,当其被影响时心电信号也就失去了参考价值。
图3为本申请实施例提供的一种心电信号的降噪结果的示意性说明图。图3中的(A)所示的为还未进行去噪的原始心电信号的图像,图3中的(B)所示的为利用现有的去噪方法对原始心电信号去噪后所得的心电信号的图像,图3中的(C)所示的为利用本申请提供的去噪方法对原始心电信号去噪后所得的心电信号的图像。
如图3中(A)所示,原始心电信号可以是具备心电传感器的可穿戴设备,例如智能手环、智能手表等设备所采集到的心电信号,也可以是医院等机构广泛使用的动态心电仪,也就是传统的十二导联心电信号采集仪器。需理解,该原始心电信号是设备直接采集到的、还未进行降噪,但是可能已经进行了某些预处理的心电信号。结合前述说明可知,心电信号是一种具有强烈的非线性、非平稳性和随机性的微弱信号,在对其采集的过程中,极易受来自体内和体外环境的影响,如人体四肢的运动、呼吸、周边环境中的电磁干扰等等,因此直接采集到的心电信号伴随着大量噪声,这些噪声在心电信号的图像中可以表现为频繁而短促的波峰,也就是图3中的(A)示出的噪声引起的波峰。从图3中的(A)可以看出,在心电信号的平稳段信号中,这些噪声的影响更为明显。除了这些波峰之外,心电信 号中还可以存在一些并非噪声引起的,持久且具有参考意义的波峰,例如之前提到的P波、R波等。因此,在理想的情况下,在对上述原始心电信号去噪时,应该在不干扰这些具有参考意义的波峰的情况下,抑制那些频繁而短促的波峰,也就是噪声引起的波峰。这样,才能在不影响时心电信号的参考价值的情况下,对心电信号中的噪声,尤其是平稳段信号中的噪声进行有效的去噪处理。
图3中的(B)示出了利用现有的去噪方法对原始心电信号去噪后所得的心电信号的图像。需要说明的是,为了方便与原始心电信号进行对比,图3中的(B)利用实线表示去噪后所得的心电信号的图像,并用虚线表示去噪前的心电信号(即图3中的(A)示出的心电信号)的图像。可以看出,利用现有的去噪方法对原始心电信号去噪,所得的心电信号的噪声情况明显得到改善,其图像中由于噪声所引起的频繁而短促的波峰明显减少,心电信号中平稳段信号的变化趋势变的更为简单和清晰。
但是,在图3中的(B)示出的图像中,如果将心电信号在去噪之前的图像和去噪之后的图像进行对比,不难看出,虽然现有的去噪方法能对原始心电信号具备一定的去噪效果,但是在对原始心电信号进行去噪后,所得到的新的心电信号中,原始心电信号中那些具备重要参考意义的波峰都发生了偏移(失真)。如图3中的(B)所示,在心电信号的第一个节拍中,去噪后的心电信号的R波的峰值、P波的峰值、T波的峰值都小于去噪前的心电信号的R波的峰值、P波的峰值、T波的峰值。而在医学上,例如P波、T波等具备参考意义的波通常可以反映一个人心脏般的健康状况,当这些波失真时候,医护人员基于这些波所在的心电信号得到的诊断结果就可能不准确,严重时甚至可能危害患者的生命安全。
因此针对上述问题,本申请提供了一种信号的去噪方法和电子设备,该方法可以借助心电信号中具有参考意义的波峰的持续突变性,在去噪时识别出该信号点是否是具有参考意义的信号波上的点,从而确定是否对该信号点进行去噪处理。实施本方法,可以在不影响心电信号中具备参考意义的波的情况下,对心电信号进行去噪,即在保证心电信号的参考价值的前提下对心电信号有效去噪。
图3中的(C)示出了利用本申请提供的去噪方法对原始心电信号去噪后所得的心电信号的图像。同样的,为了方便与原始心电信号进行对比,图3中的(C)利用实线表示去噪后所得的心电信号的图像,并用虚线表示去噪前的心电信号(即图3中的(A)示出的心电信号)的图像。可以看出,利用本申请提供的方法对原始心电信号去噪,所得的心电信号的噪声情况也明显得到改善,其图像中由于噪声所引起的频繁而短促的波峰明显减少,心电信号中平稳段信号的变化趋势变的更为简单和清晰。此外,本申请提供的去噪方法在保证对平稳段信号的去噪效果的基础上,进一步保证了心电信号的参考价值——在对心电信号去噪后,去噪后的信号与去噪钱的原始信号中关键波峰的重合度极高,如图3中的(C)所示的心电信号的第一个节拍中,去噪后的心电信号的R波、P波、T波都与去噪前的心电信号的R波、P波、T波基本重合。
首先,介绍本申请实施例提供的电子设备。
该电子设备可以是手机、平板电脑、例如智能手环和智能手表这样的可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、 超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personaldigital assistant,PDA)或专门的照相机(例如单反相机、卡片式相机)等,本申请对该电子设备的具体类型不作任何限制。
在上述电子设备为智能手环和智能手表等可穿戴设备的情况下,该电子设备的外观可以参考图4。其中,图4中的(A)示出的为该电子设备佩戴于用户手腕上时的具体样式,图4中的(B)示出的可以是该电子设备的背面(即佩戴时与用户皮肤贴紧的一面)的具体样式。
如图4所示,上述电子设备上可以设置有心电传感器,以采集用户的心电数据。通常心电传感器包括两个电极,用于采集心电信号。在图4中,心电传感器的两个电极(即电极111和电极112)均设置于电子设备的背面。电子设备内部可以包括数据转换模块113,数据转换模块113可以对通过电极111和112采集的模拟心电信号进行模数转换,得到离散的数字化的心电信号。之后,电子设备内部的处理模块(图4中未示出)可以将该数字化的心电信号作为待去噪心电信号应用本申请实施例中的信号的去噪方法进行去噪处理,得到去噪后的心电信号。
应理解,用户使用上述电子设备在采集心电信号时,可以将手指按压电子设备的表盘114,以使电极112,电极111则接触用户的手臂。
可选的,上述电子设备也可以对该降噪后的心电信号进行分析,得到分析结果。进一步地,上述电子设备还可以通过输出装置,比如显示器、扩音器等输出分析结果。
上述电子设备也可以将待降噪心电信号发送给其绑定的终端或者服务器,由终端或服务器应用本申请实施例中的心电降噪方法对待降噪心电信号进行降噪处理,得到降噪后的心电信号。终端或者服务器可以向上述电子设备发送该降噪后的心电信号,或者发送通过对该降噪后的心电信号进行分析得到的分析结果。
配置了心电传感器的上述电子设备可以实时或者周期性地监测佩戴者的心电数据,以监测佩戴者的身体状况。可以理解,本申请的实施例中的电子设备是一种智能终端设备,该电子设备除指示时间之外,还具有提醒、导航、校准、监测、交互等其中一种或者多种功能;智能手表的显示方式包括指针、数字、图像等。
需要说明的是,图4所示出的电子设备的外观示意图并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备100的外观可以与图4所示的不同;例如,在一些实施例中,上述电子设备的表盘114可以为圆形;再比如,上述电子设备中心电传感器的一个电极111可以设置于电子设备的背面,而另一个电极112可以设置于电子设备的侧面,当采集心电信号时,用户可以使用手指按压电极112,电极111则接触用户的手臂。
图5示例性示出了上述电子设备的结构。
如图5所示,该电子设备100能够执行本申请实施例提供的信号的去噪方法。具体地,如图5所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线,无线通信模块150,音频模块170,扬声器170A,受话器170B,麦克风170C,按键172,显示屏171,传感器模块180等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,加速度传感器180C,电容式接近传感器180D,心电传感 器180E,环境光传感器180F等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。同时,处理器110还可以存储电子设备100从其他电子设备接收到的数据。
例如,在本申请的一些实施例中,处理器110可以控制电子设备100将待降噪心电信号发送给其绑定的终端或者服务器,由终端或服务器应用本申请实施例中的心电降噪方法对待降噪心电信号进行降噪处理,得到降噪后的心电信号。电子设备100可以接收终端或者服务器发送的该降噪后的心电信号,或者接收终端或者服务器对该降噪后的心电信号进行分析得到的分析结果。
在电子设备100是智能手表的情况下,处理器110控制智能手表的表盘和底座得到初始心电信号。可选的,处理器110中包含有滤波器件或者滤波电路,滤波器件或者滤波电路可以对上述初始心电信号进行滤波,滤掉初始心电信号中较高和较低的频段的信号,保留要分析的信号。进一步的,处理器110还会对上述经滤波得到的信号应用本申请实施例中的信号的去噪方法进行去噪处理,得到去噪后的心电信号。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口、Micro USB接口,USB Type C接口等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音频,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。 内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如语音播报,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100的无线通信功能可以通过天线,无线通信模块150,调制解调处理器以及基带处理器等实现。电子设备100可以通过无线通信模块150与其他电子设备进行无线通信。天线用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
无线通信模块150可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块150可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块150可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块150经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块150还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。
在一些实施例中,电子设备100能够通过无线通信模块150与其他电子设备进行通信连接。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听 电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
按键172包括开机键,音量键等。按键172可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
电子设备100通过GPU,显示屏171,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏171和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏171用于显示图像,视频等。显示屏71包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏171,N为大于1的正整数。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏71。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏71,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
加速度传感器180C可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
电容式接近传感器180D可以包括例如发光二极管(LED)和光检测器,例如光电二极管。 发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用电容式接近传感器180D检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。电容式接近传感器180D也可用于皮套模式,口袋模式自动解锁与锁屏。
心电传感器180E通常包括两个电极,用于采集心电信号。人类心脏中的窦房结有节律地控制心脏收缩舒张从而向躯干泵血,这个控制信号是一个电信号(人体神经信号在神经上都表现为电信号),会逐渐扩散到体表,可以在皮肤通过电极测量。心电传感器180E就可以在接触人类皮肤的情况下检测到生物电,并将其转化为电信号,这些电信号可以被处理器110数字化处理,转化为数字化信号。处理器可以结合GPU对这些数字化信号进行进一步的处理,得到准确、详细的心电图,并将其显示在显示屏171中。
环境光传感器180F用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏171亮度。环境光传感器180F也可用于拍照时自动调节白平衡。环境光传感器180L还可以与电容式接近传感器180D配合,检测电子设备100是否在口袋里,以防误触。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏171和无线通信模块150等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
图6为本申请实施例提供的一种信号的去噪方法的流程图。该方法通过借助心电信号中具有参考意义的波峰的持续突变性,在去噪时识别出该信号点是否是具有参考意义的信号波上的点,从而确定是否对该信号点进行去噪处理。实施本方法,可以在不影响心电信号中具备参考意义的波的情况下,对心电信号进行去噪,即在保证心电信号的参考价值的前提下对心电信号有效去噪。如图6所示,本申请实施例提供的方法可以包括但不限于以下步骤:
S601:电子设备确定目标采样点对应的第一特征序列。
上述电子设备可以是图4中示出的电子设备,也可以是前述说明中的电子设备100。
上述目标采样点为待降噪信号中的一个采样点,该待降噪信号可以是上述电子设备直接采集到的信号,也可以是由其他设备采集并发送给上述电子设备的信号。
具体的,上述待去噪的信号可以是心电信号,该心电信号可以是上述电子设备通过电极提取的生物体表的生物电信号,采集得到的心电信号就是由根据采样时间排序的多个采样点组成的。在心电信号中,采样点的值即为采集时体表生物电信号的强度或能量值。该多个采样点按照采样时间的顺序排列形成具备一定起伏程度的心电图。
在一个可选的实施方式中,在执行步骤S601之前,电子设备还会对初始信号进行高通滤波和低通滤波,得到上述待去噪信号,该初始信号为电子设备采集到的表征用户心律的电信号。其中,电子设备所使用的高通滤波器和低通滤波器可以是多阶滤波器,这些滤波器可以对滤掉电子设备采集到的初始信号中较高和较低的频段,尤其是那些可能包含伪迹的频段。便于后续分析,且保留要分析的信号的频率范围,提高后续处理过程的处理效率。具体的,在高频段,电子设备可以使用截止频率低于交流电工频频率(50Hz或60Hz)的低通滤波器,避免工频干扰。在低频段,即低于1Hz的频段,由于电子设备可以使用保留感兴趣信号最高频段的高通滤波器。
需理解,正常的心电信号通常表现为起伏程度不一样的波峰(或波谷)。结合前述说明可知,在心电信号中,存在几个起伏程度尤其明显的波峰,即QRS波群中的Q波,R波以及S波,QRS波群中有心电图中的最高峰值R波。这几个心电信号是心电信号中的重要参考特征,例如,当Q波异常时,则表示患者可能有陈旧心肌梗死的风险。因此在对信号去噪时保留心电信号中QRS波群的真实性,对于判断整体的节律、频率有非常重要的意义。
而通常来说,心电信号中QRS波往往是最大、最明显的、最尖锐的,在数学上,称为QRS波的“奇异性”或者“突变性”,表现为斜率的突变。也就是说,相比于心电信号中的平稳段信号,心电信号中QRS波群上的相邻的两个采样点之间的幅值差非常的大,这也就导致了QRS波群中的相邻的两个采样点之间的斜率的绝对值也非常的大。
此外,一个波按照变化趋势可以视为两个部分,即上升的部分(采样点的幅值越来越大)和下降的部分(采样点的幅值越来越大),波峰是先上升再下降,波谷是先下降再上升。相比于平稳段信号,QRS波群中采样点的幅值可能会更长时间地以一个固定的变化趋势进行变化,例如,QRS波群中的QS段中,信号的幅值先持久性的上升,再持久性的下降。也就是说,在心电信号中,如果以一个固定长度的时间窗口(例如包括30个采样点的时间窗口)从心电信号中选择出一段子信号,如果这一段子信号是完全位于QRS波群中的信号,那么这一段子信号的幅值大概率是以急剧上升或者急剧下降的;而如果这一段子信号位于平稳段信号中的信号,那么这一段信号的幅值的变化趋势很可能发生多次改变,例如先上升再下降、而后再上升再下降……如此反复变化,并且,这一段子信号的变化幅度(在图像上体现为波是不是足够尖锐)可能很小。
因此,电子设备可以以一个变化趋势为维度进行参考,通过查看以一个采样点确定的一段信号在一个变化趋势上的持久性和突变性,即一段信号中是否存在一段连续的采样点,这些采样点的数量足够多且幅值保持急剧的上升或者下降,来确定这个信号是否为QRS波群上的信号,从而确定这个采样点是否为QRS波群上或者QRS波群周围的点。基于此,在本方法中,上述电子设备可以基于每个采样点与该采样点周围的采样点在幅值上的变化趋势和变化幅度,构造出能反映这个点是否是处于QRS波群上的采样点的特征序列,这个特征序列可以称为这个点对应的第一特征序列。
以上述目标采样点为例进行说明,上述目标采样点对应的第一特征序列包括j个元素,该j个元素与上述待去噪信号中的j个采样点一一对应,上述j个采样点中任意一个采样点对应的元素表征上述任意一个采样点与第一采样点之间的各采样点的上升或下降幅度之和,上述j个采样点中任一采样点的下降或上升幅度为上述任一采样点的幅值与上述任一采样点的后一采样点的幅值的差值,上述第一采样点为位于上述任意一个采样点之前的与上述任意一个采样点呈现相反变化趋势、且与上述任意一个采样点距离最近的一个采样点。
上述“呈现相反变化趋势”表示该第一采样点的前一个采样点的幅值大于该述第一采样点的幅值,但该第一采样点的后一个采样点的幅值却小于该述第一采样点的幅值;或者表示该第一采样点的前一个采样点的幅值小于该述第一采样点的幅值,但该第一采样点的后一个采样点的幅值却大于该述第一采样点的幅值。具体的,在图像上,该第一采样点可以是上述待检测信号中位于波峰波谷上的采样点。
此外,上述“上升或下降幅度之和”表示要么是上升的幅度之和,要么是下降的幅度之和。也就是只从一个变化趋势来观察,要么确定上述j个采样点中是否存在一段数量足够多且幅值保持急剧的上升的连续的采样点,要么确定上述j个采样点中是否存在一段数量足够多且幅值保持急剧的下降的连续的采样点。
上述j可以为任意大于1的整数。在一个可选的实施方式中,上述j可以根据上述待去噪信号的采样频率确定。具体的,上述j可以等于上述待去噪信号的采样频率的百分之三十。例如,当上述带降噪信号的采样频率为500是,则上述j可以为500×0.3=150。
具体可以参考图7中所示的折线图。这里假设图7中的曲线即为上述待去噪信号中的一段子信号的图像,该子信号由采样点701-采样点710这十个采样点组成。图7所示的坐标系中,纵轴表示采样点的幅值,位于越上方的采样点的幅值越大。假设采样点701即为上述目标采样点,由图7可以看出,以采样点701开始、以采样点710结束的这段心电信号可以根据幅值变化趋势被划分为6段,即采样点701-采样点702对应的上升段、采样点702-采样点705对应的下降段、采样点705-采样点706对应的上升段、采样点706-采样点708对应的下降段、采样点708-采样点709对应的上升段以及采样点709-采样点710对应的下降段。每个采样点的变化趋势取决于该采样点是处于上升段中还是下降段中。例如,采样点701处于上升段中,则采样点701的变化趋势即为上升,采样点704处于下降段中,则采样点704的变化趋势即为下降,采样点702、采样点705、采样点706、采样点708、采样点709是变化趋势发生改变的临界点,其变化趋势可以是上升或下降,具体应该根据其所处信号段的变化趋势决定。
这里以下降趋势为参考维度对图7所示的子信号进行分析。以下降趋势为参考维度,那么就无需考虑上升段图像的变化程度和变化速度。则对于图7中的采样点,采样点701-采样点702对应的上升段、采样点705-采样点706对应的上升段、采样点708-采样点709对应的上升段中所有采样点之间的变化趋势可以都默认为0,即x701<x702(xt表示采样点t对应的幅值,例如x701即表示采样点701的幅值,下同),则x701到x702的变化幅度视为0,同理x705到x706的变化幅度、以及x708到x709的变化幅度均为0。
而采样点702-采样点705对应的下降段中,采样点703-采样点705的变化趋势为下降趋势。则对于采样点703-采样点705中任一采样点,采样点702就是位于它们之前,与它 们呈现相反变化趋势的最近的采样点,即采样点702就是采样点703-705的“第一采样点”。那么采样点703-采样点705中每个采样点与采样点702的下降幅度之和即分别为x702-x703、x702-x704、x702-x705。同理,采样点706-采样点708对应的下降段中,采样点703-采样点705中每个采样点与采样点702的下降幅度之和即分别为x06-x707、x706-x708;采样点709-采样点710对应的下降段中,采样点710与采样点709的下降幅度之和即为x709-x710
那么作为目标采样点的采样点701对应的第一特征序列所包含的j(此时j等于9)个元素即为[0,x702-x703,x702-x704,x702-x705,0,x706-x707,x706-x708,0,x709-x710]。可以看出,与这9个元素对应的9个采样点即为采样点702-采样点710,这九个元素表示其对应的采样点在各自对应的信号段中累积变化的程度。
具体的,在一个可选的实施方式中,上述电子设备可以通过以下方式由上述目标采样点确定该目标采样点对应的第一特征序列:
1)假设xt为目标采样点,取时间窗口为j+1,获取窗口内每个采样点的幅值,得到序列XB,则XB=[xt,xt+1……,xt+j];
2)计算XB中相邻元素的后向差值,得到序列MB1,即MB1=[xt-xt+1,...,xt+j-1-xt+j];
3)对序列MB1中小于零的数据置零,即MB1[MB1<0]=0,得到序列MB2
4)对序列MB2每一个原始进行前向累加重构操作,得到采样点xt对应的第一特征序列MB。具体的,对于序列MB2中的任一元素若该元素为0,则重构后该位置依然为0,若该位置不为零则前向累加直达遇到为0的元素终止,前向累加所得的值即为该位置重构后的值。
也就是说,以上述目标采样点为起点,确定包含(j+1)个采样点的第一时间窗;依次计算上述第一时间窗中除最后一个采样点外,每个采样点与后一个采样点之间的幅值差,得到j个差值;将该j个差值中小于0的数重置为0,得到上述目标采样点对应的第一序列;将上述目标采样点对应的第一序列中的元素依次进行前向累加重构操作,得到上述j个元素,并将上述j个元素作为上述目标采样点对应的第一特征序列;其中,上述累加重构操作包括:在元素的值为0的情况下,保持元素的值不变;在元素的值不为零的情况下,将元素的值与之前的元素的值累加直至遇到值为0的元素为止,并将前向累加所得的值作为元素重构后的值。
以图8为例进行说明。如图8所示,在图8中采样点801即为上述目标采样点。这里取j=9,则采样点801之后的9个采样点,即图8中的采样点802-采样点809即为上述j个元素对应的j个采样点。采样点801-采样点810即为上述(j+1)个采样点,采样点801-采样点810对应的时间窗即为上述第一时间窗。
其中,采样点801-采样点810的幅值分别为5,10,9,7,4,8,3,1,8,1(需理解,此处设定的幅值大小仅为了便于读者理解,并不代表待降噪信号在实际场景中的幅值大小,下同)。将采样点801-采样点810的幅值依次排列,即得到一个序列[5,10,9,7, 4,8,3,1,8,1]。之后,依次计算上述采样点801-采样点810中每个采样点与后一个采样点之间的幅值差(前项减去后项,采样点810后没有采样点,则停止计算),得到9个差值,它们分别为-5,1,2,3,-4,5,2,-7,7;这9个差值即为上述j个差值。将这9个差值依次排列,即得到一个新的序列[-5,1,2,3,-4,5,2,-7,7]。为了将变化幅度单一化(即只考虑信号中是否存在一段稳定且急剧下降的采样点),将该新的序列中小于0的数重置为0,则得到上述目标采样点(即采样点801)对应的第一序列[0,1,2,3,0,5,2,0,7]。最后,将采样点801对应的第一序列中的元素依次进行前向累加重构操作,得到采样点801对应的第一特征序列;其中,第一序列中第一个元素为0所以重构后第一个元素依然为0;第二个元素为1,前向累加遇到0元素终止,所以重构后还是1;第三个元素为2,前向累加遇到0元素终止,所以重构后是2+1=3;第四个元素为3,前向累加遇到0元素终止,所以重构后是3+2+1=6;第五个元素为0所以重构后第五个元素依然为0;第六个元素重构后是5;第7个元素重构后是2+5;第八个元素重构后为0;第九个元素重构后是7;因此,最后所得到的第一特征序列即为[0,1,3,6,0,5,7,0,7]。
S602:在上述目标采样点对应的第一特征序列中的数值均小于该目标采样点对应的累积变异阈值的情况下,电子设备将该目标采样点的幅值和该目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将该目标采样点的幅值更新为所述目标数值。
上述目标采样点对应的累积变异阈值由上述目标采样点对应的第一特征序列以及在所述目标采样点之前的v个采样点对应的v个第一特征序列确定。具体的,该v个采样点中任一采样点对应的第一特征序列的具体作用和确定方式可以参考前述对上述目标采样点对应的第一特征序列的相关说明,此处不再赘述。
需要理解的是,在上述电子设备对上述待降噪信号去噪的过程中,该电子设备都是先确定上述待降噪信号中的一个采样点为目标采样点后,再通过前述说明的方式确定该目标采样点对应的第一特征序列。在对该目标采样点的幅值进行处理之后,则该电子设备即将上述目标采样点的下一个采样点作为新的目标采样点,以相同的方式获取这个新的目标采样点对应的第一特征序列。不难理解的,当目标采样点变化时,目标采样点对应的第一时间窗也会相应的往后移动(一般是移动一个采样点的位置)。以图8为例,若采样点801之前存在一个幅值为9的采样点800,那么在电子设备将采样点801作为目标采样点对齐进行去噪之前,采样点800即为历史目标采样点,则采样点800对应的第一时间窗中采样点的幅值所构成的序列即为[9,5,10,9,7,4,8,3,1,8,]。相应的,根据前述说明,采样点800对应的第一特征序列为[4,0,1,3,6,0,5,7,0](这里假设采样点800为波峰或者波谷上的点)。
也就是说,电子设备都曾将上述目标采样点之前的每个采样点都作为目标采样点,并求得了这些采样点对应的第一特征序列。此外,从采样点800和采样点811对应的第一特征序列可以看出,两个相邻采样点分别对应的两个第一特征序列中,后一个采样点对应的第一特征序列中除了最后一个元素之外,其余元素都是前一个采样点对应的第一特征序列中的元素。
在本方法中,电子设备在确定上述目标采样点对应的第一特征序列之后,电子设备会根据上述目标采样点对应的第一特征序列以及上述目标采样点之前的v个采样点对应的第 一特征序列确定一个阈值,即上述目标采样点对应的累积变异阈值。这个累积变异阈值表征将上述目标采样点对应的第一特征序列以及上述目标采样点之前的v个采样点对应v个第一特征序列进行拼接的得到的序列后,这个序列中的绝大部分元素的值所呈现出来的一个分布范围。当序列中有一个元素的值大于或等于这个累积变异阈值时,就表示该元素的值明显大于该序列中其他元素的值,即该元素是一个发生了突变的元素,这正好与心电信号中QRS波群的突变性相契合。因此,在本方法中,如果上述目标采样点对应的第一特征序列中元素的数值均小于该目标采样点对应的累积变异阈值,就表示该目标采样点很可能是上述待降噪信号中位于平稳段信号中的采样点,则电子设备可以利用平均滤波法,将该目标采样点的幅值和该目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将该目标采样点的幅值更新为所述目标数值,以此达到对该目标采样点的去噪效果。相应的,如果上述目标采样点对应的第一特征序列中的数值中存在一个元素的值大于或等于该目标采样点对应的累积变异阈值,就表示该目标采样点很可能是上述待降噪信号中位于QRS波群的采样点,为了保护QRS波群的特征,则上述电子设备不改变上述目标采样点的幅值。
上述电子设备对m个采样点的幅值进行平均处理的过程可以用公式概括为:
其中,为电子设备为目标采样点xt降噪处理后为目标采样点xt的设定的新的幅值,m可以等于上述待去噪信号的采样频率的百分之三十。
具体的,电子设备可以将上述目标采样点对应的第一特征序列与所述v个采样点对应的v个第一特征序列进行拼接,得到第二序列。并利用四分位法确定所述第二序列对应的异常值,将所述第二序列对应的异常值确定为所述目标采样点对应的累积变异阈值。可选的,该第二序列对应的异常值为该第二序列对应的极度异常值。上述利用四分位法确定所述第二序列对应的异常值的过程可以用公式概括为:
其中,“*”表示乘积运算,CB即为上述累积变异阈值,MB为上述目标采样点对应的第一特征序列,MB-1为上述目标采样点前一个采样点对应的第一特征序列,以此类推;为对MB-v,MB-v+1,…,MB等多个序列进行展开拼接构造得到的序列,即上述第二序列。表示序列的75分位点数(上四分位点),表示序列的25分位点数(下四分位点)。k1、k2的取值为k1=4、 k2=3,或者k1=2.5、k2=1.5。当k1=4、k2=3时,CB为该第二序列对应的极度异常值;当k1=2.5、k2=1.5时,CB为该第二序列对应的中度异常值。不难看出,随着目标采样点的更换,电子设备自适应的更新上述累积变异阈值。
同样以前述说明中的采样点800对应的第一特征序列和采样点801对应的第一特征序列为例进行说明。为了便于说明,这里假设上述v的值为1。结合前述说明可知采样点800对应的第一特征序列为[4,0,1,3,6,0,5,7,0],而采样点801对应的第一特征序列为[0,1,3,6,0,5,7,0,7],即MB=[0,1,3,6,0,5,7,0,7],MB-1=[4,0,1,3,6,0,5,7,0]。则取k1=4、k2=3,则则由于25大于中的任意一个元素的值,则电子设备将目标采样点801确定为平稳段上的采样点,则电子设备更新目标采样点801的幅值,将目标采样点801的幅值更新为采样点801周围m个采样点的幅值之和的平均值。
结合前述说明可知,由于QRS波群中采样点幅值具有连续的突变性(或者说存在一段足够多的连续的采样点,这些采样点的幅值保持急剧上升或者下降),那么可以理解的,对于QRS波群上的采样点来说,这些采样点对应的第一特征序列中就很可能由于采样点幅值的累积变异产生较大的数值的元素,那么这些采样点对应的第一特征序列中就很可能存在数值大于这些采样点对应的累积变异阈值的元素。相应的,对于平稳段信号中的采样点来说,这些采样点对应的第一特征序列中很可能由于采样点幅值的不可累积性以及幅值之间变异幅度过于小,而很难产生较大的数值的元素,那么这些采样点对应的第一特征序列中就基本不太可能存在数值大于这些采样点对应的累积变异阈值的元素。
图9示出了未进行去噪的初始信号的图像以及为初始信号中各采样点对应的第一特征序列拼接所得序列的图像。图9中的(B)所示的即为未进行去噪的初始信号的图像,其可以前述说明中初始信号的图像,图9中的(A)即为初始信号中各采样点对应的第一特征序列的图像,结合前述说明可知,两个相邻采样点分别对应的两个第一特征序列中,后一个采样点对应的第一特征序列中除了最后一个元素之外,其余元素都是前一个采样点对应的第一特征序列中的元素,因此多个采样点对应的多个第一特征序列可以进行拼接,得到一个序列(这个序列中每个元素对应的采样点可以是以该元素为末尾的第一特征序列对应的采样点),这个序列对应的图像即为图9中的(A)所示的图像。可以看出,对应于在初始信号中Q波、R波和S波出现位置,图9中的(A)所示的图像在这些位置也出现了明显而尖锐的波,这也进一步验证了在初始信号中Q波、R波和S波上的采样点,其对应的第一特征序列中极可能出现数值大于这些采样点对应的累积变异阈值的元素,电子设备可 以较为准确的识别出这些采样点,不改变其幅值,并针对性的对平稳段信号中采样点的噪声进行去噪,能保留心电信号中QRS波群的原始特征,在保证心电信号的参考价值的前提下对心电信号有效去噪。
在图6所示去噪方法的基础上,本申请还提供了另一种信号的去噪方法。该方法在参考意义的波峰的持续突变性的同时,还会同时参考心电信号中具有参考意义的波峰的平均变异程度,在去噪时识别出心电信号中具有参考意义的波上的采样点,尤其是位于R波上的采样点点,从而在信号去噪时有效避开对位这些波上采样点的抑制。实施本方法,可以在进一步保证心电信号的参考价值的前提下对心电信号有效去噪。
在去噪时识别出该信号点是否是具有参考意义的信号波上的点,从而确定是否对该信号点进行去噪处理。实施本方法,可以在不影响心电信号中具备参考意义的波的情况下,对心电信号进行去噪,即在保证心电信号的参考价值的前提下对心电信号有效去噪。如图10所示,本申请实施例提供的方法可以包括但不限于以下步骤:
S1001:电子设备确定目标采样点对应的第一特征序列。
上述电子设备可以是图4中示出的电子设备,也可以是前述说明中的电子设备100。
上述目标采样点为待降噪信号中的一个采样点,该待降噪信号可以是上述电子设备直接采集到的信号,也可以是由其他设备采集并发送给上述电子设备的信号。
具体的,上述待去噪的信号可以是心电信号,该心电信号可以是上述电子设备通过电极提取的生物体表的生物电信号,采集得到的心电信号就是由根据采样时间排序的多个采样点组成的。在心电信号中,采样点的值即为采集时体表生物电信号的强度或能量值。该多个采样点按照采样时间的顺序排列形成具备一定起伏程度的心电图。
步骤S1001的详细内容可以参考前述对图6中步骤S601的相关说明,此处不再赘述。需要说明的是,在本申请实施例中,电子设备执行步骤S1001和步骤S1002的先后顺序可以为任意顺序,即电子设备可以先执行步骤S1001,再执行步骤S1002;或者电子设备可以先执行步骤S1002,再执行步骤S1001;或者在一些场景下,电子设备可以同时执行步骤S1002,和执行步骤S1001,本申请对此不作限定。
S1002:电子设备确定上述目标采样点对应的第一特征值。
上述目标采样点对应的第一特征值表征包括所述目标采样点在内、包含(k+1)个采样点的时间窗中每相邻两个采样点之间幅值差的绝对值的均值。
结合前述说明可知,心电信号中QRS波往往是最大、最明显的、最尖锐的,在数学上,称为QRS波的“奇异性”或者“突变性”,表现为斜率的突变。这种突变在QRS波群的R波上体现的更为明显。因此,为了使电子设备能够更好地判断出上述目标采样点是否为上述QRS波群中的点,电子设备可以以上述目标采样点为基点,确定一个包含(k+1)个采样点的时间窗,并将这个时间窗中的每相邻两个采样点之间幅值差的绝对值平均处理,得到上述目标采样点对应的第一特征值。
需要理解的是,不同于上述第一特征序列表征的采样点在单个变化趋势上的累积变异程度,由于上述目标采样点对应的第一特征值是基于两个采样点之间幅值差的绝对值而来的,因此,无论上述(k+1)个采样点的变化趋势如何变化,两个采样点之间的变化幅度都 是大于0的数。也就是说,无论上述包含(k+1)个采样点的时间窗中的采样点的幅值是持续上升、持续下降还是交替性的上升和下降,上述目标采样点对应的第一特征值都是上述(k+1)个采样点中每相邻两个采样点之间总斜率的平均值。那么对于QRS波群上的采样点来说,尤其是R波上的采样点来说,这些采样点周围的点中每一个点与前一个采样点和后一个采样点之间的斜率(即突变程度)都非常大,这也就意味着电子设备可以很容易的基于上述目标采样点对应的第一特征值确定该目标采样点是否为QRS波,尤其是R波上的点,从而确定是否需要对目标采样点进行去噪处理。
可选的,上述包括上述目标采样点在内、包含(k+1)个采样点的时间窗中,上述目标采样点可以为上述包含(k+1)个采样点的时间窗中的最后一个采样点;或,在包括上述目标采样点在内、包含(k+1)个采样点的时间窗中,上述目标采样点之前以及所述目标采样点之后均存在至少一个采样点。
也就是说,在上述电子设备当前获取到最新的一个采样点信号后,电子设备可以获取该采样点之前的k个采样点,通过计算包括以该采样点结束的(k+1)个采样点中每相邻两个采样点之间幅值差的绝对值的均值,作为该采样点对应的第一特征值,这样,在电子设备就可以零延迟的对刚获取到的采样点进行处理,能以更高效地对完成对目标采样点处理过程。或者,在上述电子设备当前获取到上述最新的一个采样点的信号之后,电子设备可以不立即对该采样点进行处理,而是再继续获取该采样点之后的若干个采样点的信号后,以该采样点为基点获取该采样点之前的至少一个采样点和该采样点之前的至少一个采样点,总共k个采样点,与该采样点一起确定为上述(k+1)个采样点,并计算该(k+1)个采样点中每相邻两个采样点之间幅值差的绝对值的均值,作为该采样点对应的第一特征值,这样,虽然电子设备不能即使对刚获取到的采样点进行处理,但是将上述目标采样点作为上述(k+1)个采样点中处于中间位置的采样点,能使得计算而来的上述目标采样点对应的第一特征值更真实地反映上述目标采样点的变化趋势,能准确对上述目标采样点是否为处于QRS波群上的点进行判断。
具体的,在一个可选的实施方式中,上述电子设备可以通过以下方式由上述目标采样点确定该目标采样点对应的第一特征值:
1)假设xt为目标采样点,取时间窗口为k+1,获取窗口内每个采样点的幅值,得到序列XA,则XA=[xt-a,……,xt-1,xt,xt+1,……,xt+b],k=a+b;
2)计算序列XA差值绝对值均值mA,mA即为目标采样点xt对应的第一特征值;
也就是说,电子设备可以确定包含(k+1)个采样点的第二时间窗;在该第二时间窗中,上述目标采样点之前存在n个采样点,上述目标采样点之后存在(k-n)个采样点;之后电子设备可以依次计算所述第二时间窗中每个采样点与前一个采样点之间的差值的绝对值,得到k个差值绝对值,将所述k个差值的绝对值的平均值作为所述目标采样点对应的第一 特征值。
S1003:在上述目标采样点对应的第一特征序列中的数值均小于该目标采样点对应的累积变异阈值,且上述目标采样点对应的第一特征值小于平均变异阈值的情况下,电子设备将该目标采样点的幅值和该目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将该目标采样点的幅值更新为所述目标数值。
上述目标采样点对应的累积变异阈值由上述目标采样点对应的第一特征序列以及在所述目标采样点之前的v个采样点对应的v个第一特征序列确定。
具体的,步骤S1003中关于“上述目标采样点对应的第一特征序列中的数值均小于该目标采样点对应的累积变异阈值”以及“电子设备将该目标采样点的幅值和该目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将该目标采样点的幅值更新为所述目标数值”的详细内容可以参考前述对图6中步骤S602的相关描述,此处不再赘述。
上述目标采样点对应的平均变异阈值由上述目标采样点对应的第一特征值以及在所述目标采样点之前的i个采样点对应的i个第一特征序列确定。具体的,该i个采样点中任一采样点对应的第一特征值的具体作用和确定方式可以参考前述对上述目标采样点对应的第一特征值的相关说明,此处不再赘述。
同理,在上述电子设备对上述待降噪信号去噪的过程中,该电子设备都是先确定上述待降噪信号中的一个采样点为目标采样点,在通过前述说明中的方式确定该目标采样点对应的第一特征值。在对该目标采样点的幅值进行处理之后,则该电子设备即将上述目标采样点的下一个采样点作为新的目标采样点,以相同的方式获取这个新的目标采样点对应的第一特征值。不难理解的,当目标采样点变化时,目标采样点对应的第二时间窗也会相应的往后移动(一般是移动一个采样点的位置)。同样以前述图8为例,若采样点801之前存在一个幅值为100的采样点800,那么在电子设备将采样点801作为目标采样点对齐进行去噪之前,采样点800即为历史目标采样点,则采样点801对应的第一特征值即为(5+1+2+3+4+5+2+7+7)/10=3.6;而采样点800对应的第一特征值即为(4+5+1+2+3+4+5+2+7)/10=3.3。
也就是说,电子设备都曾将上述目标采样点之前的每个采样点都作为目标采样点,并求得了这些采样点对应的第一特征值。在本方法中,电子设备在确定上述目标采样点对应的第一特征值之后,电子设备会根据上述目标采样点对应的第一特征值以及上述目标采样点之前的i个采样点对应的第一特征值确定一个阈值,即上述目标采样点对应的平均变异阈值。这个累积变异阈值表征将上述目标采样点对应的第一特征值以及上述目标采样点之前的i个采样点对应v个第一特征值进行拼接的得到的序列后,这个序列中的绝大部分元素的值所呈现出来的一个分布范围。当序列中有一个元素的值大于或等于这个平均变异阈值时,就表示该元素的值明显大于该序列中其他元素的值,即该元素是一个发生了突变的元素,这正好与心电信号中QRS波群的突变性、尤其是R波上采样点的斜率的突变性相契合。因此,在本方法中,如果上述目标采样点对应的第一特征值小于该目标采样点对应的平均变异阈值,就表示该目标采样点很可能是上述待降噪信号中位于平稳段信号中的采样点,则电子设备可以利用平均滤波法,将该目标采样点的幅值和该目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将该目标采样点的幅值更新为所述目标数 值,以此达到对该目标采样点的去噪效果。相应的,如果上述目标采样点对应的第一特征值大于或等于该目标采样点对应的平均变异阈值,就表示该目标采样点很可能是上述待降噪信号中位于QRS波群的采样点,为了保护QRS波群的特征,则上述电子设备不改变上述目标采样点的幅值。
具体的,电子设备可以将上述目标采样点对应的第一特征序值与所i个采样点对应的i个第一特征值进行拼接,得到第三序列。并利用四分位法确定所述第三序列对应的异常值,将该第三序列对应的异常值确定为所述目标采样点对应的累积变异阈值。可选的,该第三序列对应的异常值为该第二序列对应的极度异常值。上述利用四分位法确定所述第三序列对应的异常值的过程可以用公式概括为:
其中,“*”表示乘积运算,CA即为上述累积变异阈值,MA为上述目标采样点对应的第一特征值,MA-1为上述目标采样点前一个采样点对应的第一特征值,以此类推;即为上述第三序列。表示序列的75分位点数(上四分位点),表示序列的25分位点数(下四分位点)。k1、k2的取值为k1=4、k2=3,或者k1=2.5、k2=1.5。当k1=4、k2=3时,CA为该第三序列对应的极度异常值;当k1=2.5、k2=1.5时,CA为该第三序列对应的中度异常值。不难看出,随着目标采样点的更换,电子设备也会自适应的更新上述平均变异阈值。
同样以前述说明中的采样点800对应的第一特征序列和采样点801对应的第一特征序列为例进行说明。为了便于说明,这里假设上述v的值为1,i为7,且采样点801为上述目标采样点,基于采样点801构造的第三序列为[6,2.7,4,3.5,5,3.3,3.6]。结合前述说明可知,采样点801对应的第一特征序列为[4,0,1,3,6,0,5,7,0],而采样点801对应的CB=28;采样点801对应的CA=4*5-3*3.3=10.1,mA=3.6;
则采样点801对应的第一特征序列为[4,0,1,3,6,0,5,7,0]中元素的值均小于25,且则电子设备将目标采样点801对应的第一特征值mA小于CA,则电子设备将确定目标采样点801为Q平稳段信号中的采样点,则电子设备将目标采样点801的幅值更新为采样点801周围m个采样点的幅值之和的平均值。
需理解,对于一些非正常的心电信号,该信号中QRS波群中R波的方向可能会发生逆 转。例如,对于一些患有心脏疾病的人而言,其心电信号中QRS波群中的R波可能会由于患者心肌缺血而呈现为倒置状态。在这种情况下,R波中采样点的上升趋势和下降趋势也就发生了逆转,那么R波的波峰和波谷与PR段和ST段之间的变化趋势也会生翻转。在这种情况下,如果仅通过构造目标采样点对应的第一特征序列来分析该目标采样点的位置的话,很可能就会得出错误的结论,并且在去噪过程中很可能采用不恰当的方式来对该目标采样点的幅值进行处理。但是,目标采样点对应的第一特征值只关注采样点幅值变化幅度,不关注采样点幅值的变化趋势,如果将目标采样点对应的第一特征值和目标采样点对应的第一特征序列一起对目标采样点所处的区域进行判断,就可以极大概率降低对异常心电信号上采样点位置的判断,确定该目标信号点是否是位于QRS波群上的点,并在保留Q波和S波特征的前提下对信号中平稳段信号的噪声去噪。此外,即使是对于正常的心电信号,目标采样点对应的第一特征值也有利于电子设备更快速且更准确的辨别其是否是R波上的采样点。
在一个可选的实施方式中,上述目标采样点对应的第一特征序列和第一特征值可以分别对应于目标采样点的两个数据特征FB和FA。其中,若目标采样点对应的第一特征值mA与大于或者等于目标采样点对应的平均变异阈值CA,则该目标采样点的特征FA=1,反之FA=0;上述目标采样点对应的第一特征序列MB中存在至少一个元素大于等于述目标采样点对应的累积变异阈值CB,则上述目标采样点的数据FB=1,反之FB=0。结合前述说明可知,对于目标采样点对应的幅值,若FA=0且FB=0,则表示目标采样点为平稳段信号中(抑制区域)的采样点,则将目标采样点的幅值更新为目标采样点周围m个采样点的幅值之和的平均值;若FA与FB中至少有一个数据特征的值为1,则表示目标采样点为QRS波群中(非抑制区域)的采样点,则保持目标采样点的幅值不变。具体如下列表1所示:
表1

同理,由于QRS波群中采样点幅值具有连续的突变性,尤其是R波上的采样点,幅值突变性非常明显。那么可以理解的,对于QRS波群上的采样点来说,这些采样点对应的第一特征序值中就很可能由于采样点幅值剧烈变化而大于这些采样点对应的平均变异阈值。相应的,对于平稳段信号中的采样点来说,这些采样点对应的第一特征值中很可能由于采样点幅值之间变异幅度过于小,其对应的第一特征值很难是大数值,那么这些采样点对应的第一特征值就基本不太可能大于这些采样点对应的平均变异阈值。
图11示出了未进行去噪的初始信号的图像以及为初始信号中各采样点对应的第一特征序值的图像。图11中的(B)所示的即为未进行去噪的初始信号的图像,其可以前述说明中初始信号的图像,图11中的(A)即为初始信号中各采样点对应的第一特征值的图像。可以看出,对应于在初始信号中R波出现的位置,图11中的(A)所示的图像在对应位置也出现了明显且幅值较大的波,这也进一步验证了在初始信号中R波的采样点,其对应的第一特征值中极可能大于这些采样点对应的平均变异阈值,电子设备可以较为准确的识别出这些采样点,不改变其幅值,并针对性的对平稳段信号中采样点的噪声进行去噪,能保留心电信号中QRS波群的R波原始特征,在保证心电信号的参考价值的前提下对心电信号有效去噪。
本申请实施例还提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;其中,存储器与所述一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得所述电子设备执行前述实施例中所示的方法。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务 器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (13)

  1. 一种信号的去噪方法,其特征在于,包括:
    确定目标采样点对应的第一特征序列,所述目标采样点对应的第一特征序列包括j个元素,所述j个元素与待去噪信号中的j个采样点一一对应,所述j个采样点中任意一个采样点对应的元素表征所述任意一个采样点与第一采样点之间的各采样点的上升或下降幅度之和,所述j个采样点中任一采样点的下降或上升幅度为所述任一采样点的幅值与所述任一采样点的后一采样点的幅值的差值,所述第一采样点为位于所述任意一个采样点之前的与所述任意一个采样点呈现相反变化趋势、且与所述任意一个采样点距离最近的一个采样点;
    在所述目标采样点对应的第一特征序列中的数值均小于所述目标采样点对应的累积变异阈值的情况下,将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,并将所述目标采样点的幅值更新为所述目标数值,所述目标采样点对应的累积变异阈值由所述目标采样点对应的第一特征序列以及在所述目标采样点之前的v个采样点对应的v个第一特征序列确定。
  2. 根据权利要求1所述的方法,其特征在于,
    在将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值之前,所述方法还包括:
    确定所述目标采样点对应的第一特征值,所述目标采样点对应的第一特征值表征包括所述目标采样点在内、包含(k+1)个采样点的时间窗中每相邻两个采样点之间幅值差的绝对值的均值;
    所述将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到目标数值,包括:
    在所述目标采样点对应的第一特征序列中的数值均小于所述目标采样点对应的累积变异阈值,且所述目标采样点对应的第一特征值小于平均变异阈值的情况下,将所述目标采样点的幅值和所述目标采样点周围的m个采样点的幅值进行平均处理,得到所述目标数值;所述目标采样点对应的平均变异阈值由所述目标采样点对应的第一特征值以及i个采样点对应的第一特征值确定;在待去噪信号中,所述i个采样点为在所述目标采样点之前的i个采样点。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    在所述目标采样点对应的第一特征序列中存在至少一个数值大于或等于所述目标采样点对应的累积变异阈值的情况下,保持所述目标采样点的幅值不变;
    和/或,所述目标采样点对应的第一特征值大于或等于所述平均变异阈值的情况下,保持所述目标采样点的幅值不变。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在确定目标采样点对应的第一特 征序之前,所述方法还包括:
    对初始信号进行高通滤波和低通滤波,得到所述待去噪信号,所述初始信号为电子设备采集到的表征用户心律的电信号。
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述包括所述目标采样点在内、包含(k+1)个采样点的时间窗中,所述目标采样点为所述包含(k+1)个采样点的时间窗中的最后一个采样点;或,在包括所述目标采样点在内、包含(k+1)个采样点的时间窗中,所述目标采样点之前以及所述目标采样点之后均存在至少一个采样点。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述确定目标采样点对应的第一特征序列,包括:
    以所述目标采样点为起点,确定包含(j+1)个采样点的第一时间窗;
    依次计算所述第一时间窗中除最后一个采样点外,每个采样点与后一个采样点之间的幅值差,得到j个差值;
    将所述j个差值中小于0的数重置为0,得到所述目标采样点对应的第一序列;
    将所述目标采样点对应的第一序列中的元素依次进行前向累加重构操作,得到所述j个元素,并将所述j个元素作为所述目标采样点对应的第一特征序列;其中,所述累加重构操作包括:在元素的值为0的情况下,保持元素的值不变;在元素的值不为零的情况下,将元素的值与之前的元素的值累加直至遇到值为0的元素为止,并将前向累加所得的值作为元素重构后的值。
  7. 根据权利要求2-6任一项所述的方法,其特征在于,所述确定所述目标采样点对应的第一特征值,包括:
    确定包含(k+1)个采样点的第二时间窗;在所述第二时间窗中,所述目标采样点之前存在n个采样点,所述目标采样点之后存在(k-n)个采样点;
    依次计算所述第二时间窗中每个采样点与前一个采样点之间的差值的绝对值,得到k个差值绝对值,将所述k个差值的绝对值的平均值作为所述目标采样点对应的第一特征值。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述确定目标采样点对应的第一特征序列之后,所述方法还包括:
    将所述目标采样点对应的第一特征序列与所述v个采样点对应的v个第一特征序列进行拼接,得到第二序列,
    利用四分位法确定所述第二序列对应的异常值,将所述第二序列对应的异常值确定为所述目标采样点对应的累积变异阈值。
  9. 根据权利要求2-8任一项所述的方法,其特征在于,所述确定目标采样点对应的第一特征值之后,所述方法还包括:
    利用所述目标采样点对应的第一特征值与所述i个采样点对应的i个第一特征值构造第 三序列;
    利用四分位法确定所述第三序列对应的异常值,将所述第三序列对应的异常值确定为所述目标采样点对应的平均变异阈值。
  10. 根据权利要求8或9任一项所述的方法,其特征在于,所述目标采样点对应的累积变异阈值为利用四分位法确定的所述第二序列对应的极度异常值,和/或,所述目标采样点对应的平均变异阈值为利用四分位法确定的所述第三序列对应的极度异常值。
  11. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器、存储器和显示屏;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如权利要求1-10中任一项所述的方法。
  12. 一种芯片系统,其特征在于,所述芯片系统应用于电子设备,所述芯片系统包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如权利要求1-10中任一项所述的方法。
  13. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-10中任一项所述的方法。
PCT/CN2023/117833 2022-09-29 2023-09-08 信号的去噪方法及电子设备 Ceased WO2024067030A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US18/730,060 US20250114042A1 (en) 2022-09-29 2023-09-08 Method for removing noise from signal, and electronic device
CN202380067352.6A CN119866193A (zh) 2022-09-29 2023-09-08 信号的去噪方法及电子设备
EP23870269.0A EP4442194B1 (en) 2022-09-29 2023-09-08 Signal denoising method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211202646.9A CN117770758B (zh) 2022-09-29 2022-09-29 心电信号的去噪方法及电子设备
CN202211202646.9 2022-09-29

Publications (1)

Publication Number Publication Date
WO2024067030A1 true WO2024067030A1 (zh) 2024-04-04

Family

ID=90398663

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117833 Ceased WO2024067030A1 (zh) 2022-09-29 2023-09-08 信号的去噪方法及电子设备

Country Status (4)

Country Link
US (1) US20250114042A1 (zh)
EP (1) EP4442194B1 (zh)
CN (3) CN117770758B (zh)
WO (1) WO2024067030A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119026998A (zh) * 2024-10-29 2024-11-26 青岛华芯晶电科技有限公司 一种晶棒质量的智能预警方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121567143A (zh) * 2026-01-22 2026-02-24 上海凌耘微电子有限公司 基于滑动窗口统计判定的信号干扰滤除方法、系统、设备、介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260151A1 (en) * 2006-05-03 2007-11-08 Clifford Gari D Method and device for filtering, segmenting, compressing and classifying oscillatory signals
CN106889984A (zh) * 2017-01-22 2017-06-27 河北大学 一种心电信号自动降噪方法
CN114521899A (zh) * 2020-11-23 2022-05-24 武汉心络科技有限公司 心电信号滤波方法、装置、计算机设备及存储介质
CN114938951A (zh) * 2022-05-31 2022-08-26 南京佗道医疗科技有限公司 一种呼吸数据处理方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6599242B1 (en) * 2000-07-19 2003-07-29 Medtronic, Inc. Method and apparatus for data compression of heart signals
CN108478215A (zh) * 2018-01-25 2018-09-04 深圳市德力凯医疗设备股份有限公司 基于小波分析的脑电信号去噪方法、存储介质以及装置
CN111358450B (zh) * 2020-03-17 2023-04-07 乐普(北京)医疗器械股份有限公司 一种血压分类方法和装置
CN114611542B (zh) * 2020-11-25 2025-08-26 华为技术有限公司 信号降噪处理方法及通信装置
CN113040784B (zh) * 2021-04-21 2022-07-05 福州大学 一种心电信号的肌电噪声滤波方法
CN114145757B (zh) * 2022-02-08 2022-05-10 广东工业大学 一种基于非对称合成滤波器组的脑电信号重构方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070260151A1 (en) * 2006-05-03 2007-11-08 Clifford Gari D Method and device for filtering, segmenting, compressing and classifying oscillatory signals
CN106889984A (zh) * 2017-01-22 2017-06-27 河北大学 一种心电信号自动降噪方法
CN114521899A (zh) * 2020-11-23 2022-05-24 武汉心络科技有限公司 心电信号滤波方法、装置、计算机设备及存储介质
CN114938951A (zh) * 2022-05-31 2022-08-26 南京佗道医疗科技有限公司 一种呼吸数据处理方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4442194A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119026998A (zh) * 2024-10-29 2024-11-26 青岛华芯晶电科技有限公司 一种晶棒质量的智能预警方法及系统

Also Published As

Publication number Publication date
US20250114042A1 (en) 2025-04-10
EP4442194A1 (en) 2024-10-09
CN119423780A (zh) 2025-02-14
CN117770758B (zh) 2024-11-01
EP4442194B1 (en) 2025-12-10
EP4442194A4 (en) 2025-01-22
CN119866193A (zh) 2025-04-22
CN117770758A (zh) 2024-03-29

Similar Documents

Publication Publication Date Title
US20240122540A1 (en) Systems and Methods of Spatial Filtering for Measuring Electrical Signals
CN104363824B (zh) 心电图中实时qrs持续时间的测量
EP2547252B1 (en) Electrocardiographic monitoring system
WO2024067030A1 (zh) 信号的去噪方法及电子设备
González-Mendoza et al. Validation of an EMG sensor for Internet of Things and Robotics
US10448896B2 (en) Method and apparatus for processing bio-signals using recursive estimation
CN105125202A (zh) 一种基于低噪声放大器的心电监护系统
Zhang et al. A wearable 12-lead ECG acquisition system with fabric electrodes
CN107595277A (zh) 一种具有运动识别和定位功能的心电监测系统及监测方法
Mahmud et al. A real time and non-contact multiparameter wearable device for health monitoring
RU2661756C2 (ru) Устройство мозг-машинного интерфейса для дистанционного управления экзоскелетными конструкциями
TWI855485B (zh) 穿戴式聽診器
CN105249956A (zh) 一种基于放大电路的心电监护系统
Shin et al. WHAM: A novel, wearable heart activity monitor based on Laplacian potential mapping
US20210128001A1 (en) Ekg monitoring device for use with smart watch
Gawali et al. A Wearable ECG Sensor for Intelligent Cardiovascular Health Informatics
US20250082217A1 (en) Apparatus and method of processing biosignal
US20250090075A1 (en) Ecg signal reconstruction from eeg signal
CN210472139U (zh) 一种远程心电监护系统
Ge et al. ECG Circuit: Analyzation and Application
CN118078300A (zh) 一种便携式可穿戴医学数据检测系统及方法
JP2024083227A (ja) ウェアラブル聴診器
KR20250039253A (ko) 생체 신호 처리 장치 및 생체 신호 처리 방법
Plesnik et al. Mobile users ECG signal processing
Yadav et al. Real Time Acquisition and Analysis of ECG signals using MATLAB

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23870269

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023870269

Country of ref document: EP

Effective date: 20240704

WWE Wipo information: entry into national phase

Ref document number: 18730060

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 202380067352.6

Country of ref document: CN

WWP Wipo information: published in national office

Ref document number: 18730060

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 202380067352.6

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWG Wipo information: grant in national office

Ref document number: 2023870269

Country of ref document: EP