Respiratory signal adaptive removal method and device, computer device and storage medium
By combining wavelet transform and deep learning models, threshold parameters and function types are dynamically generated, solving the problem of adaptive denoising of respiratory signals under motion artifacts, and achieving efficient signal denoising and accuracy improvement.
Patent Information
- Application Number
- CN202611276060.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-20
AI Technical Summary
Existing respiratory signal denoising methods are difficult to adapt to the noise characteristics of different users and different exercise intensities in real motion scenarios, resulting in a decrease in signal-to-noise ratio and loss of effective signal components, which cannot meet the requirements of real-time processing.
Wavelet transform is used to decompose the respiratory signal into decomposition coefficients of multiple frequency bands, and a pre-trained deep learning model is used to output artifact probabilities to dynamically generate appropriate threshold parameters and threshold function types, which are then processed by inverse wavelet transform.
While effectively suppressing motion artifacts, it retains the weak effective components in the original respiratory signal to the greatest extent, significantly improving the signal-to-noise ratio and detection accuracy, and has good real-time performance and deployment compatibility.
Smart Images

Figure CN123126771A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and particularly relates to an adaptive removal method, apparatus, computer equipment, and storage medium for motion artifact breathing signals that integrates deep learning and wavelet exchange. Background Technology
[0002] Respiratory gas signals are a crucial data foundation for exercise metabolic analysis and cardiopulmonary function assessment, and their acquisition accuracy directly affects the measurement accuracy of metabolic masks. In real-world exercise scenarios, objective factors such as user limb movement, mask displacement, and disrupted breathing rhythms can produce severe motion artifacts, leading to nonlinear distortion of respiratory signals, a significant decrease in the signal-to-noise ratio, and consequently affecting the reliability of subsequent metabolic parameter calculations.
[0003] Existing noise reduction methods for respiratory signals mainly include wavelet transform, digital filtering, and empirical mode decomposition (EMD). While wavelet transform offers multi-resolution analysis capabilities, its threshold setting is highly dependent on the experience of professionals, making it unable to adapt to dynamically changing noise characteristics under different users and motion intensities, resulting in poor generalization ability. Digital filtering struggles to achieve accurate separation when motion artifacts severely overlap with the effective respiratory signal frequency band, easily leading to the loss of effective signal components. Although EMD does not require pre-defined basis functions, it suffers from mode aliasing and has high computational complexity, making it difficult to meet the real-time processing requirements of embedded devices. Summary of the Invention
[0004] The purpose of this invention is to provide an adaptive method, apparatus, computer device, and storage medium for removing motion artifacts from respiratory signals by integrating deep learning and wavelet exchange. This aims to solve the problems of existing respiratory signal denoising methods, such as the need for manual intervention in threshold setting, difficulty in accurately separating signals, and difficulties in end-side deployment.
[0005] This invention is implemented as follows: It provides an adaptive method for removing motion artifacts from breathing signals by integrating deep learning and wavelet exchange, comprising the following steps: The collected raw respiratory signals are preprocessed to obtain the respiratory signals to be processed; The respiratory signal to be processed is decomposed into multiple decomposition coefficients of different frequency bands using wavelet transform; The decomposition coefficients are input into a pre-trained deep learning model, and the artifact probability of each frequency band is output. Based on the artifact probabilities described, dynamically generate appropriate threshold parameters and threshold function types; Based on the threshold parameter and the threshold function type, each of the decomposition coefficients is processed; and The decomposition coefficients are reconstructed using inverse wavelet transform to output a denoised breathing signal.
[0006] In some implementations, the step of decomposing the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform includes the following steps: The respiratory signal to be processed is decomposed into multiple scales using a preset wavelet basis function to generate approximate coefficients representing low-frequency trends and multiple detail coefficients representing high-frequency details. Among them, multiple detail coefficients correspond to multiple sub-bands with different frequency ranges to distinguish between breathing harmonic components and motion artifact components.
[0007] In some implementations, the deep learning model is a convolutional neural network model; The convolutional neural network model is configured with depthwise separable convolutional layers to build a lightweight network architecture; The convolutional neural network model is configured to receive the decomposition coefficients and output the artifact probability of each frequency band by extracting time-domain and frequency-domain features.
[0008] In some implementations, dynamically generating the appropriate threshold parameters and threshold function type based on each artifact probability includes the following steps: Based on the magnitude of the artifact probability, a threshold parameter corresponding to the frequency band is calculated and generated according to a preset mapping relationship. The threshold parameter is configured to change positively with the increase of the artifact probability. Based on the numerical range of the artifact probability, the corresponding threshold function type is automatically matched and called. The threshold function types include hard threshold function, soft threshold function and semi-soft threshold function.
[0009] In some implementations, the automatic matching and invocation of the corresponding threshold function type includes the following steps: When the artifact probability is greater than the first preset threshold, the corresponding frequency band is determined to be a strong artifact frequency band, and the hard threshold function is called; When the artifact probability is between the first preset threshold and the second preset threshold, the corresponding frequency band is determined to be a weak artifact frequency band, and the soft threshold function is called. When the artifact probability is less than the second preset threshold, the corresponding frequency band is determined to be an effective signal frequency band, and the decomposition coefficient remains unchanged.
[0010] In some implementations, the first preset threshold is in the range of 0.6 to 0.9, and the second preset threshold is in the range of 0.2 to 0.5; The formula for calculating the threshold parameter is: T i =T0×(1+α×P i ), Among them, T iLet T0 be the threshold parameter for the i-th frequency band, T0 be the preset base threshold parameter, α be the adjustment coefficient, and P be the threshold parameter for the i-th frequency band. i Let be the artifact probability corresponding to the i-th frequency band.
[0011] In some implementations, the preprocessing of the acquired raw respiratory signal to obtain the respiratory signal to be processed includes the following steps: Collect raw respiratory signals; The DC offset component in the original respiratory signal is filtered out to obtain the first respiratory signal; The first respiratory signal is subjected to baseline drift correction to obtain the second respiratory signal; The second respiratory signal is normalized and mapped to a standard numerical range to obtain the respiratory signal to be processed.
[0012] Another embodiment of the present invention provides an adaptive removal device for motion artifact breathing signals that integrates deep learning and wavelet exchange, comprising: The signal preprocessing unit is used to preprocess the acquired raw respiratory signals to obtain the respiratory signals to be processed. The coefficient decomposition unit is used to decompose the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform. The probability output unit is used to input each of the decomposition coefficients into a pre-trained deep learning model and output the artifact probability of each frequency band. The threshold adaptation unit is used to dynamically generate the adapted threshold parameters and threshold function type based on the artifact probabilities of each artifact. A coefficient processing unit is configured to process each of the decomposed coefficients according to the threshold parameter and the threshold function type; and The signal output unit is used to reconstruct the processed decomposition coefficients using inverse wavelet transform and output the denoised breathing signal.
[0013] Another embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the motion artifact respiratory signal adaptive removal method as described in any of the above embodiments.
[0014] Another embodiment of the present invention provides a storage medium storing a computer program that can be executed to implement the steps of the motion artifact respiratory signal adaptive removal method as described in any of the above embodiments.
[0015] The present invention provides an adaptive method, apparatus, computer device, and storage medium for removing motion artifacts from respiratory signals by integrating deep learning and wavelet transform. This method combines the multi-resolution decomposition capability of wavelet transform with the adaptive feature learning capability of deep learning. Wavelet transform is used to decompose the respiratory signal to be processed into decomposition coefficients in multiple frequency bands. A deep learning model is then used to differentiate the decomposition coefficients and output artifact probabilities. Based on these artifact probabilities, appropriate threshold parameters and threshold function types are dynamically generated. Finally, the denoised respiratory signal is output after processing based on the threshold parameters and threshold function types. This effectively suppresses motion artifacts while preserving the weak effective components in the original respiratory signal to the greatest extent possible. It significantly improves the signal-to-noise ratio and detection accuracy of respiratory signals under different motion intensities, and the overall processing flow has good real-time performance and deployment compatibility. Attached Figure Description
[0016] Figure 1 This is a flowchart of the motion artifact respiratory signal adaptive removal method provided in the embodiments of the present invention; Figure 2 This is a structural block diagram of the motion artifact respiratory signal adaptive removal device provided in the embodiments of the present invention; Figure 3 This is a comparison diagram of the original respiratory signal and the denoised respiratory signal under different exercise intensities provided by the embodiments of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the invention, and should not be construed as limiting the invention. Furthermore, it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0018] In the description of this invention, it should be understood that the terms "length", "width", "upper", "lower", "left", "right", "horizontal", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0019] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows for communication; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0021] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0022] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.
[0023] This invention provides an adaptive method for removing motion artifacts from breathing signals by integrating deep learning and wavelet exchange, with reference to... Figure 1 This includes the following steps: S100. Preprocess the collected raw respiratory signals to obtain the respiratory signals to be processed; S200. The respiratory signal to be processed is decomposed into multiple decomposition coefficients of different frequency bands using wavelet transform; S300. Input each of the decomposition coefficients into a pre-trained deep learning model and output the artifact probability of each frequency band. S400. Based on the artifact probabilities described above, dynamically generate appropriate threshold parameters and threshold function types; S500. Process each of the decomposition coefficients according to the threshold parameter and the threshold function type; and S600. The decomposition coefficients after processing are reconstructed using inverse wavelet transform, and the denoised breathing signal is output.
[0024] First, the user's raw respiratory signal is collected using a gas sensor built into a respiratory monitoring device (such as a sports metabolic mask). This raw respiratory signal is a time-series signal that includes motion artifacts and effective respiratory components. Then, the collected raw respiratory signal is preprocessed to eliminate signal distortion, resulting in the respiratory signal to be processed.
[0025] Secondly, wavelet transform is used to perform multi-scale decomposition on the preprocessed respiratory signal to obtain decomposition coefficients for multiple different frequency bands. Wavelet transform has good time-frequency localization characteristics, which can separate the non-stationary respiratory signal to be processed into multiple independent frequency band components according to frequency, that is, to obtain decomposition coefficients for multiple different frequency bands. In this embodiment, among the decomposition coefficients obtained after decomposition, the high-frequency part mainly corresponds to motion artifact components, and the low-frequency part mainly corresponds to the effective respiratory fundamental wave component.
[0026] Next, the decomposition coefficients of each frequency band are input into a pre-trained deep learning model. This deep learning model, trained on a large amount of labeled data, has learned to identify motion artifact features hidden in the decomposition coefficients of different frequency bands. The deep learning model outputs a corresponding artifact probability for each frequency band independently. This artifact probability quantifies the severity of motion artifacts in the current frequency band; a higher artifact probability indicates a higher probability of motion artifacts in the current frequency band, and a lower artifact probability indicates a lower probability of motion artifacts in the current frequency band. This provides a basis for subsequent adaptive thresholding.
[0027] Then, based on the artifact probability of each frequency band, threshold parameters and threshold function types that match the noise characteristics of that frequency band are dynamically generated. Specifically, a higher artifact probability indicates that the frequency band is more severely contaminated by motion artifacts, requiring a stronger denoising strategy; a lower artifact probability indicates that the frequency band is dominated by effective signals, requiring a gentler processing method or even no processing. This adaptive mechanism allows the entire denoising process to adapt to noise changes under different motion intensities without manual intervention.
[0028] Subsequently, based on the generated threshold parameters and threshold function type, the decomposition coefficients of each frequency band are thresholded one by one. This step achieves the separation of noise and signal by suppressing or eliminating decomposition coefficients determined to be dominated by artifacts, while retaining decomposition coefficients determined to be dominated by valid signals.
[0029] Finally, an inverse wavelet transform is performed on the decomposed coefficients of each frequency band after thresholding, and the components of each frequency band are recombined into a time-domain signal to reconstruct the denoised respiratory signal. The denoised respiratory signal is then output. This respiratory signal can be used as input to the subsequent metabolic analysis module to calculate key metabolic parameters such as oxygen uptake and carbon dioxide excretion, thereby providing a high-quality data foundation for metabolic analysis and agent decision-making.
[0030] In some embodiments, the present invention is not limited to the above-mentioned exercise metabolism mask, but is also applicable to other respiratory signal acquisition devices such as sleep breathing monitoring, cardiopulmonary rehabilitation monitoring, and medical ventilators.
[0031] In the embodiments provided by this invention, the multi-resolution decomposition capability of wavelet transform is integrated with the adaptive feature learning capability of deep learning. The respiratory signal to be processed is decomposed into decomposition coefficients of multiple frequency bands using wavelet exchange. Then, the decomposition coefficients are differentiated using a deep learning model and artifact probabilities are output. Based on the artifact probabilities, appropriate threshold parameters and threshold function types are dynamically generated. Finally, the denoised respiratory signal is output after processing based on the threshold parameters and threshold function types. This effectively suppresses motion artifacts while preserving the weak effective components in the original respiratory signal to the greatest extent, significantly improving the signal-to-noise ratio and detection accuracy of respiratory signals under different motion intensities. Moreover, the overall processing flow has good real-time performance and deployment compatibility.
[0032] In some specific embodiments of this application, the step of decomposing the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform includes the following steps: The respiratory signal to be processed is decomposed into multiple scales using a preset wavelet basis function to generate approximate coefficients representing low-frequency trends and multiple detail coefficients representing high-frequency details. Among them, multiple detail coefficients correspond to multiple sub-bands with different frequency ranges to distinguish between breathing harmonic components and motion artifact components.
[0033] In this embodiment, a preset wavelet basis function is first selected to perform multi-scale decomposition of the respiratory signal to be processed. The selection of the wavelet basis function directly affects the accuracy of frequency band separation and the effect of subsequent artifact recognition. Through extensive experimental verification, the db4 wavelet basis function performs excellently in the time-frequency localization representation of respiratory signals and can better match the morphological features of respiratory signals.
[0034] Through multi-scale decomposition, this embodiment generates two types of decomposition coefficients: one type is the approximation coefficient representing the low-frequency trend, corresponding to the main contour of the respiratory signal to be processed; the other type is multiple detail coefficients representing high-frequency details, corresponding to multiple sub-bands in different frequency ranges of the respiratory signal to be processed. Among them, the lower-level detail coefficients, such as the first-level detail coefficients and the second-level detail coefficients, mainly correspond to high-frequency motion artifact components, which are usually artifacts caused by sensor noise or rapid shaking; the intermediate-level detail coefficients, such as the third-level detail coefficients and the fourth-level detail coefficients, may contain both respiratory harmonic components and mid-frequency motion artifact components; the higher-level detail coefficients and approximation coefficients mainly contain respiratory harmonic components.
[0035] Through this multi-scale decomposition, the breathing harmonic components and motion artifact components are separated into different sub-bands, laying the foundation for subsequent differentiated processing strategies for different frequency bands. For example, in a 5-level wavelet decomposition, the frequency range of the approximation coefficient A5 is 0-0.0625Hz, which concentrates the breathing harmonic components; the frequency range of the detail coefficient D1 is 0.5-1Hz, which concentrates the high-frequency motion artifact components; and the frequency range of the intermediate-level detail coefficients D2, D3, and D4 is 0.0625-0.5Hz, which simultaneously contain both the breathing harmonic components and the mid-frequency motion artifact components.
[0036] In some specific embodiments of this application, the deep learning model is a convolutional neural network (CNN) model. The convolutional neural network model is configured with depthwise separable convolutional layers to build a lightweight network architecture; The convolutional neural network model is configured to receive the decomposition coefficients and output the artifact probability of each frequency band by extracting time-domain and frequency-domain features.
[0037] The deep learning model used in this embodiment is a convolutional neural network (CNN). CNNs have a natural advantage in extracting local features and structural patterns of time-series signals, and can effectively capture the time-domain waveform features and frequency-domain energy distribution features of motion artifacts hidden in the decomposition coefficients.
[0038] The convolutional neural network model in this embodiment is configured with depthwise separable convolutional layers to construct a lightweight network architecture, thereby meeting the real-time processing requirements of metabolic analysis modules, such as embedded processors for exercise metabolism masks. The depthwise separable convolutional layers decompose standard convolution into two independent steps: channel-wise convolution and pointwise convolution. While maintaining feature extraction capabilities, this significantly reduces the amount of multiplication and addition operations and the number of parameters in the model. Through optimized design, the total number of parameters in the convolutional neural network model in this embodiment is controlled to within 100K, and the single inference latency on the embedded processor is less than 10 milliseconds, fully meeting the requirements for real-time acquisition and processing of respiratory signals.
[0039] During the model execution phase, the convolutional neural network model receives the decomposition coefficients of each frequency band as input. It then extracts temporal features from these coefficients layer by layer through multiple convolutional and pooling layers. These features include abrupt amplitude changes in pulse-like artifacts and periodic characteristics of oscillating artifacts. Additionally, it extracts frequency domain features, such as the energy concentration characteristics of artifact components in specific frequency bands. After feature extraction and mapping, the convolutional neural network model independently outputs an artifact probability between 0 and 1 for each frequency band. 0 indicates that the frequency band contains no motion artifacts, while 1 indicates that the frequency band is completely dominated by motion artifacts.
[0040] In some specific embodiments of this application, the step of dynamically generating suitable threshold parameters and threshold function types based on the respective artifact probabilities includes the following steps: Based on the magnitude of the artifact probability, a threshold parameter corresponding to the frequency band is calculated and generated according to a preset mapping relationship. The threshold parameter is configured to change positively with the increase of the artifact probability. Based on the numerical range of the artifact probability, the corresponding threshold function type is automatically matched and called. The threshold function types include hard threshold function, soft threshold function and semi-soft threshold function.
[0041] Based on the magnitude of the artifact probability, threshold parameters for the corresponding frequency band are calculated according to a preset mapping relationship. This mapping relationship is configured such that the threshold parameter changes positively correlated with the artifact probability; that is, the higher the artifact probability, the larger the generated threshold parameter, thus applying stronger denoising power to that frequency band; conversely, the lower the artifact probability, the smaller the generated threshold parameter, preserving more effective signal details. This mapping relationship can be implemented using linear or nonlinear mapping. For example, a functional relationship can be constructed based on a base threshold and adjustment coefficients, allowing the threshold parameter to adaptively fluctuate according to the artifact probability.
[0042] Based on the numerical range of the artifact probability, the system automatically matches and calls the corresponding threshold function type. Specifically, multiple probability threshold ranges are preset. When the artifact probability falls into the high probability range, the hard threshold function is automatically called. If the absolute value of the decomposition coefficient is less than the threshold parameter corresponding to the current frequency band, the decomposition coefficient is directly set to zero; if the absolute value of the decomposition coefficient is greater than or equal to the threshold parameter corresponding to the current frequency band, the decomposition coefficient remains unchanged. In other words, the threshold parameter acts as a truncation threshold. Decomposition coefficients with an absolute value lower than the truncation threshold are judged as noise-dominant components and are removed, while decomposition coefficients with an absolute value reaching or exceeding the truncation threshold are judged as valid signal-dominant components and are retained. When the artifact probability falls into the medium probability range, the soft threshold function is automatically called. If the absolute value of the decomposition coefficient is less than the threshold parameter corresponding to the current frequency band, the decomposition coefficient is directly set to zero; if the absolute value of the decomposition coefficient is greater than or equal to the threshold parameter corresponding to the current frequency band, the absolute value of the decomposition coefficient is reduced towards zero by the amount of the threshold parameter, while retaining the original positive or negative sign of the decomposition coefficient. Compared to hard thresholding, soft thresholding avoids abrupt changes in the decomposition coefficients at the threshold parameter, resulting in a smoother coefficient sequence. When the artifact probability falls into the low probability range, a semi-soft thresholding function is automatically invoked to maintain the decomposition coefficients unchanged, ensuring the integrity of the effective respiratory signal.
[0043] By employing a dual adaptive mechanism of threshold parameters and threshold function type driven by artifact probability, a dynamic balance between denoising intensity and signal fidelity is achieved.
[0044] In some specific embodiments of this application, the automatic matching and invocation of the corresponding threshold function type includes the following steps: When the artifact probability is greater than the first preset threshold, the corresponding frequency band is determined to be a strong artifact frequency band, and the hard threshold function is called; When the artifact probability is between the first preset threshold and the second preset threshold, the corresponding frequency band is determined to be a weak artifact frequency band, and the soft threshold function is called. When the artifact probability is less than the second preset threshold, the corresponding frequency band is determined to be an effective signal frequency band, and the decomposition coefficient remains unchanged.
[0045] A first preset threshold and a second preset threshold are preset, with the first preset threshold being greater than the second preset threshold. The artifact probability of each frequency band is compared with the first preset threshold and the second preset threshold, respectively.
[0046] When the artifact probability exceeds a first preset threshold, the corresponding frequency band is determined to be a strong artifact band. In this band, motion artifacts dominate, and effective breathing signal components are minimal. At this point, a hard thresholding function is called to process the decomposition coefficients of this band. Using the threshold parameter corresponding to this frequency band as the truncation threshold, decomposition coefficients with absolute values less than this threshold parameter are set to zero, while those with absolute values greater than or equal to this threshold parameter remain unchanged, thus completely eliminating artifact-dominated components. For example, in fast running motion, the artifact probability of the detail coefficient D1 is as high as 0.98, exceeding the first preset threshold. Therefore, it is determined to be a strong artifact band, and the hard thresholding function is called, effectively eliminating high-frequency swaying artifacts.
[0047] When the artifact probability falls between a first preset threshold and a second preset threshold, the corresponding frequency band is determined to be a weak artifact band. This band contains both effective respiratory components and motion artifact components, and their frequency bands overlap. At this point, a soft thresholding function is called to process the decomposition coefficients of this band. Using the threshold parameter corresponding to this band as the contraction benchmark, decomposition coefficients with absolute values less than the threshold parameter are set to zero, while decomposition coefficients with absolute values greater than or equal to the threshold parameter are contracted towards zero by the amount of the threshold parameter. This processing method avoids discontinuities in the decomposition coefficients at the threshold parameter, making the reconstructed respiratory signal smoother and more natural.
[0048] When the artifact probability is less than a second preset threshold, the corresponding frequency band is determined to be a valid signal band. This band mainly contains the effective respiratory fundamental frequency or harmonic components, with minimal motion artifact interference. In this case, the decomposition coefficients remain unchanged, and no threshold processing is performed to avoid incorrect processing of valid respiratory features. For example, during slow walking, the artifact probability of the approximation coefficient A5 is only 0.05, which is less than the second preset threshold. Therefore, it is determined to be a valid signal band, and the decomposition coefficients remain unchanged, thus ensuring the integrity of weak respiratory features during low-intensity exercise.
[0049] In some specific embodiments of this application, the first preset threshold is in the range of 0.6 to 0.9, for example, it can be set to 0.8; the second preset threshold is in the range of 0.2 to 0.5, for example, it can be set to 0.3. The above ranges have been verified by a large number of experiments and can achieve a reasonable division of strong artifact frequency bands, weak artifact frequency bands and effective signal frequency bands in typical motion scenarios.
[0050] The formula for calculating the threshold parameter is: T i =T0×(1+α×P i ), Among them, T iis the threshold parameter for the i-th frequency band; T0 is the preset basic threshold parameter, which can be preset according to the signal amplitude reference and noise level, for example, a value of 0.1; α is the adjustment coefficient, used to control the sensitivity of the threshold to changes in artifact probability, and its value ranges from 0.5 to 2.0; P i Let be the artifact probability corresponding to the i-th frequency band.
[0051] Using the above calculation formula, the threshold parameters for each frequency band can be dynamically adjusted based on the artifact probability output by the deep learning model: when the artifact probability P... i When it approaches 1, the threshold parameter T i Approaching T0×(1+α), the maximum denoising intensity is reached; when the artifact probability P i When it approaches 0, the threshold parameter T i Approaching T0, maintaining a basic level of noise reduction. The value of the adjustment coefficient α can be fine-tuned according to the actual application scenario. When the motion scene is complex and the artifact intensity varies greatly, a larger α value can be selected to enhance the adaptive amplitude; when the motion scene is stable and the artifact distribution is uniform, a smaller α value can be selected to maintain processing stability.
[0052] In some specific embodiments of this application, the preprocessing of the acquired raw respiratory signal to obtain the respiratory signal to be processed includes the following steps: Collect raw respiratory signals; The DC offset component in the original respiratory signal is filtered out to obtain the first respiratory signal; The first respiratory signal is subjected to baseline drift correction to obtain the second respiratory signal; The second respiratory signal is normalized and mapped to a standard numerical range to obtain the respiratory signal to be processed.
[0053] First, raw breathing signals are acquired. The user's raw breathing signals are continuously acquired using a gas sensor within the exercise mask at a set sampling frequency, for example, 1Hz to 5Hz. This raw breathing signal contains the user's actual breathing waveform, but also includes the electrical noise from the gas sensor itself, environmental interference, and motion-induced artifacts.
[0054] Secondly, the DC offset component in the original respiratory signal is filtered out to obtain the first respiratory signal. During long-term operation, the zero-point reference value of the gas sensor may drift slowly, resulting in a non-zero DC component in the output signal. This DC component is not a physiological component of the respiratory signal, and retaining it will affect subsequent processing. In this embodiment, high-pass filtering or mean subtraction is used to filter out the DC offset component in the original respiratory signal.
[0055] Next, baseline drift correction is performed on the first respiratory signal to obtain the second respiratory signal. During exercise, the user's breathing rhythm and mask fit change, causing irregular fluctuations in the baseline of the respiratory signal (i.e., the line connecting the valleys of the signal between respiratory cycles). If this baseline drift is not corrected, the decomposition coefficients after wavelet decomposition will contain low-frequency non-breathing disturbance components, interfering with the artifact discrimination results. This embodiment uses wavelet transform for baseline drift correction: low-level wavelet decomposition is performed on the first respiratory signal to extract the extremely low-frequency coefficients representing baseline fluctuations, which are then removed before reconstruction to obtain a second respiratory signal with a stable baseline.
[0056] Finally, the second respiratory signal is normalized and mapped to a standard numerical range to obtain the respiratory signal to be processed. The amplitude of respiratory signals varies significantly among different users and under different exercise intensities. Without normalization, the deep learning model will struggle to converge or generalize. This embodiment linearly maps the amplitude range of the second respiratory signal to the standard numerical range of [-1, 1], ensuring that the dynamic range of all input signals remains consistent, thereby improving the discrimination stability and cross-scene generalization ability of the deep learning model.
[0057] Here is a specific implementation method: Scenario: Noise reduction processing of respiratory signals collected by a sports metabolism mask under different exercise intensities.
[0058] Experimental subject: A healthy 28-year-old male, weighing 70kg and 175cm tall.
[0059] Experimental equipment: a sports metabolism mask integrating the algorithm of this invention, with a gas sensor integrated inside the sports metabolism mask sampling frequency of 2Hz.
[0060] Experimental procedure: Users successively performed three exercise intensities: slow walking (4km / h), jogging (8km / h), and fast running (12km / h), each lasting for 5 minutes. Raw respiratory signals were collected simultaneously and then processed for noise reduction.
[0061] Step 1: Acquisition and preprocessing of raw respiratory signals Raw respiratory signal during slow walking: SNR=8.2dB, with slight baseline drift and high-frequency noise; Raw breathing signal during jogging: SNR=3.5dB, with obvious limb sway artifacts; The original breathing signal during fast running: SNR=-1.2dB, with severe mask displacement artifacts, and the effective breathing signal was almost drowned out; The SNR mentioned above refers to the signal-to-noise ratio.
[0062] After preprocessing, the DC component and baseline drift were removed, and the respiratory signal to be processed was normalized to the [-1,1] interval.
[0063] Step 2: Wavelet Decomposition The preprocessed respiratory signal was decomposed into five levels using the db4 wavelet basis function, yielding the following approximation coefficients and detail coefficients: Approximation coefficient A5: frequency range of 0-0.0625Hz, mainly containing breathing harmonic components; Detail factor D1: Frequency range is 0.5-1Hz, mainly containing high-frequency motion artifact components; Detail coefficients D2-D4: Frequency range 0.0625-0.5Hz, including some breathing harmonic components and mid-frequency motion artifact components.
[0064] Step 3: CNN Artifact Detection Each decomposition coefficient is input into a pre-trained lightweight CNN model, and the output artifact probabilities are shown in Table 1.
[0065] Table 1 Output Artifact Probability Table
[0066] Step 4: Threshold Parameter Generation and Processing Set the base threshold T0=0.1, adjust the coefficient α=1.5, generate threshold parameters for each frequency band based on the artifact probability, and select the corresponding threshold function type: When running fast, the D1 coefficient has an artifact probability of 0.98 > 0.8. A hard thresholding function is used, with the threshold parameter T = 0.1 × (1 + 1.5 × 0.98) = 0.247. When running fast, the D2 coefficient has an artifact probability of 0.85 > 0.8. A hard thresholding function is used, with the threshold parameter T = 0.1 × (1 + 1.5 × 0.85) = 0.2275. When running fast, the D3 coefficient has an artifact probability of 0.65 ∈ [0.3, 0.8]. A soft thresholding function is used, with a threshold parameter of T = 0.1 × (1 + 1.5 × 0.65) = 0.1975. Other coefficients: Artifact probability < 0.3, no processing is performed.
[0067] Step 5: Wavelet Reconstruction and Performance Evaluation The decomposed coefficients were subjected to inverse wavelet transform to obtain the denoised respiratory signal. The comparison of the results is shown in Table 2.
[0068] Table 2 Comparison of Respiratory Signal Effects
[0069] refer to Figure 3The diagram shows the original breathing signal waveform during slow walking, the denoised breathing signal waveform during slow walking, the original breathing signal waveform during jogging, the denoised breathing signal waveform during jogging, the original breathing signal waveform during fast running, and the denoised breathing signal waveform during fast running.
[0070] Experimental results show that the method of the present invention can effectively remove motion artifacts under three motion intensities, with an artifact removal rate of over 94%, a signal-to-noise ratio improvement of over 12dB, and a respiratory rate detection error controlled within ±1.5 breaths / minute, which is significantly better than the traditional wavelet transform method (artifact removal rate of approximately 75%, detection error of ±5 breaths / minute).
[0071] This invention provides an adaptive removal device for motion artifact breathing signals that integrates deep learning and wavelet exchange, with reference to... Figure 2 ,include: The signal preprocessing unit 100 is used to preprocess the acquired raw respiratory signal to obtain the respiratory signal to be processed; The coefficient decomposition unit 200 is used to decompose the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform. The probability output unit 300 is used to input each of the decomposition coefficients into a pre-trained deep learning model and output the artifact probability of each frequency band. The threshold adaptation unit 400 is used to dynamically generate the adapted threshold parameters and threshold function type based on the artifact probabilities of each artifact. The coefficient processing unit 500 is configured to process each of the decomposition coefficients according to the threshold parameter and the threshold function type; and The signal output unit 600 is used to reconstruct the processed decomposition coefficients using inverse wavelet transform and output the denoised breathing signal.
[0072] In some specific embodiments of this application, the coefficient decomposition unit 200 includes: The coefficient decomposition module is used to select a preset wavelet basis function to perform multi-scale decomposition on the respiratory signal to be processed, and generate approximate coefficients that characterize low-frequency trends and multiple detail coefficients that characterize high-frequency details. Among them, multiple detail coefficients correspond to multiple sub-bands with different frequency ranges to distinguish between breathing harmonic components and motion artifact components.
[0073] In some specific embodiments of this application, the deep learning model is a convolutional neural network model; The convolutional neural network model is configured with depthwise separable convolutional layers to build a lightweight network architecture; The convolutional neural network model is configured to receive the decomposition coefficients and output the artifact probability of each frequency band by extracting time-domain and frequency-domain features.
[0074] In some specific embodiments of this application, the threshold adaptation unit 400 includes: The threshold parameter generation module is used to calculate and generate a threshold parameter corresponding to the frequency band according to the numerical value of the artifact probability and a preset mapping relationship. The threshold parameter is configured to change positively with the increase of the artifact probability. The threshold function type calling module is used to automatically match and call the corresponding threshold function type based on the numerical range in which the artifact probability is located. The threshold function type includes hard threshold function, soft threshold function and semi-soft threshold function.
[0075] In some specific embodiments of this application, the threshold function type calling module includes: The first calling submodule is used to determine that the corresponding frequency band is a strong artifact frequency band when the artifact probability is greater than a first preset threshold, and to call the hard threshold function. The second calling submodule is used to determine that the corresponding frequency band is a weak artifact frequency band and call the soft threshold function when the artifact probability is between the first preset threshold and the second preset threshold. The third calling submodule is used to determine that the corresponding frequency band is an effective signal frequency band when the artifact probability is less than the second preset threshold, and to keep the decomposition coefficients unchanged.
[0076] In some specific embodiments of this application, the first preset threshold is in the range of 0.6 to 0.9, and the second preset threshold is in the range of 0.2 to 0.5; The formula for calculating the threshold parameter is: T i =T0×(1+α×P i ), Among them, T i Let T0 be the threshold parameter for the i-th frequency band, T0 be the preset base threshold parameter, α be the adjustment coefficient, and P be the threshold parameter for the i-th frequency band. i Let be the artifact probability corresponding to the i-th frequency band.
[0077] In some specific embodiments of this application, the signal preprocessing unit 100 includes: The signal acquisition module is used to acquire raw respiratory signals; A signal filtering module is used to filter out the DC offset component in the original respiratory signal to obtain a first respiratory signal; A signal correction module is used to perform baseline drift correction processing on the first respiratory signal to obtain a second respiratory signal; The signal mapping module is used to normalize and map the second respiratory signal to a standard numerical range to obtain the respiratory signal to be processed.
[0078] The implementation of the above-mentioned motion artifact respiratory signal adaptive removal device can refer to the implementation of the above-mentioned motion artifact respiratory signal adaptive removal method, and will not be repeated here.
[0079] This invention provides a computer device including a processor, which executes a computer program stored in a memory to implement the steps of the motion artifact respiratory signal adaptive removal method described above.
[0080] The present invention also provides a storage medium storing a computer program (instructions) thereon, which, when executed by a processor, implements the steps of the motion artifact respiratory signal adaptive removal method as described above.
[0081] For example, a computer program can be divided into one or more modules, one or more of which are stored in memory and executed by a processor to perform the present invention. One or more modules can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device. For example, the computer program can be divided into the steps of the motion artifact respiratory signal adaptive removal method provided in the above-described method embodiments.
[0082] Those skilled in the art will understand that the above description of the computer device is merely an example and does not constitute a limitation on the computer device. It may include more or fewer components than described above, or a combination of certain components, or different components, such as input / output devices, network access devices, buses, etc.
[0083] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.
[0084] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as interface display function, interface interaction function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as map interface, selection interface, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0085] If the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, an electrical signal, and a software distribution medium, etc.
[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An adaptive respiratory signal removal method, characterized in that, Includes the following steps: The collected raw respiratory signals are preprocessed to obtain the respiratory signals to be processed; The respiratory signal to be processed is decomposed into multiple decomposition coefficients of different frequency bands using wavelet transform; The decomposition coefficients are input into a pre-trained deep learning model, and the artifact probability of each frequency band is output. Based on the artifact probabilities, dynamically generating suitable threshold parameters and threshold function types includes the following steps: calculating and generating threshold parameters corresponding to the frequency band according to the numerical value of the artifact probabilities and a preset mapping relationship, wherein the threshold parameters are configured to change positively correlated with the increase of the artifact probabilities; automatically matching and calling the corresponding threshold function type according to the numerical range of the artifact probabilities, wherein the threshold function type includes hard threshold function, soft threshold function, and semi-soft threshold function; the automatic matching and calling of the corresponding threshold function type includes the following steps: when the artifact probability is greater than a first preset threshold, determining that the corresponding frequency band is a strong artifact frequency band and calling the hard threshold function; when the artifact probability is between the first preset threshold and a second preset threshold, determining that the corresponding frequency band is a weak artifact frequency band and calling the soft threshold function; when the artifact probability is less than the second preset threshold, determining that the corresponding frequency band is an effective signal frequency band and keeping the decomposition coefficients unchanged; Based on the threshold parameter and the threshold function type, each of the decomposition coefficients is processed; and The decomposition coefficients are reconstructed using inverse wavelet transform to output a denoised breathing signal.
2. The adaptive respiratory signal removal method according to claim 1, characterized in that, The process of decomposing the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform includes the following steps: The respiratory signal to be processed is decomposed into multiple scales using a preset wavelet basis function to generate approximate coefficients representing low-frequency trends and multiple detail coefficients representing high-frequency details. Among them, multiple detail coefficients correspond to multiple sub-bands with different frequency ranges to distinguish between breathing harmonic components and motion artifact components.
3. The adaptive respiratory signal removal method according to claim 1, characterized in that, The deep learning model is a convolutional neural network model; The convolutional neural network model is configured with depthwise separable convolutional layers to build a lightweight network architecture; The convolutional neural network model is configured to receive the decomposition coefficients and output the artifact probability of each frequency band by extracting time-domain and frequency-domain features.
4. The adaptive respiratory signal removal method according to claim 1, characterized in that, The first preset threshold is in the range of 0.6 to 0.9, and the second preset threshold is in the range of 0.2 to 0.5; The formula for calculating the threshold parameter is: T i = T0×(1+α×P i ), Among them, T i Let T0 be the threshold parameter for the i-th frequency band, T0 be the preset base threshold parameter, α be the adjustment coefficient, and P be the threshold parameter for the i-th frequency band. i Let be the artifact probability corresponding to the i-th frequency band.
5. The adaptive respiratory signal removal method according to claim 1, characterized in that, The preprocessing of the acquired raw respiratory signals to obtain the respiratory signals to be processed includes the following steps: Collect raw respiratory signals; The DC offset component in the original respiratory signal is filtered out to obtain the first respiratory signal; The first respiratory signal is subjected to baseline drift correction to obtain the second respiratory signal; The second respiratory signal is normalized and mapped to a standard numerical range to obtain the respiratory signal to be processed.
6. A respiratory signal adaptive removal device, used to implement the steps of the respiratory signal adaptive removal method as described in any one of claims 1 to 5, characterized in that, include: The signal preprocessing unit is used to preprocess the acquired raw respiratory signals to obtain the respiratory signals to be processed. The coefficient decomposition unit is used to decompose the respiratory signal to be processed into multiple decomposition coefficients of different frequency bands using wavelet transform. The probability output unit is used to input each of the decomposition coefficients into a pre-trained deep learning model and output the artifact probability of each frequency band. The threshold adaptation unit is used to dynamically generate the adapted threshold parameters and threshold function type based on the artifact probabilities of each artifact. The coefficient processing unit is used to process each of the decomposition coefficients according to the threshold parameter and the threshold function type; as well as The signal output unit is used to reconstruct the processed decomposition coefficients using inverse wavelet transform and output the denoised breathing signal.
7. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the adaptive respiratory signal removal method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a computer program that can be executed to implement the steps of the adaptive respiratory signal removal method as described in any one of claims 1 to 5.
