Respiratory signal processing method and system
By combining sliding window and peak detection with a deep learning model to extract respiratory signal features, the problem of low efficiency and high subjectivity in respiratory event identification under rapid respiratory rates in mice and rats is solved, achieving high-precision and efficient respiratory event classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies are inefficient and subjective in processing respiratory waveform features of mice and rats, making it difficult to efficiently and accurately identify key events such as apnea and sighing, especially under rapid basal respiratory rates and brief quiet periods, resulting in high classification error rates and high false negative rates.
A sliding window and moving average standard deviation are used to detect apnea events, and peak detection and dual threshold constraints are combined to identify sighing events. Temporal and spatial features are extracted through a one-dimensional convolutional neural network and a computer vision model, and multimodal feature fusion is performed. Finally, respiratory events are classified based on multidimensional feature representation.
It significantly improves the recognition accuracy of sleep apnea and sighing events, reduces the false negative rate, and improves processing efficiency. It reduces the processing time of respiratory signals of a single target object over 24 hours from several hours to minutes, eliminates the subjectivity of manual interpretation, and improves the consistency of behavior classification.
Smart Images

Figure CN121598174B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of biosignal processing and deep learning, and particularly relates to respiratory signal processing methods and systems. Background Technology
[0002] Rats and mice are commonly used animal models in biomedical research, and the dynamic changes in their respiratory patterns are a key window for decoding physiological states and neural regulatory mechanisms. It is worth noting that respiratory wave analysis of rats and mice faces more severe technical challenges with larger experimental animals: the basal respiratory rate of rats and mice is significantly faster (approximately 100-200 breaths / minute for rats and mice, compared to approximately 50 breaths / minute for rabbits and approximately 30 breaths / minute for dogs), and the duration of the resting period is shorter, resulting in more subtle waveform characteristics of key events such as apnea and sighing, which are easily masked by noise.
[0003] In related technologies, respiratory events are classified by manually interpreting respiratory waveform characteristics (such as the zero-flow duration of apnea and the deep inspiratory peak of a sigh). This method has two major limitations:
[0004] (1) Efficiency bottleneck: 24-hour data from a single rat or mouse requires 4 to 6 hours to analyze, which severely restricts the classification of respiratory events in large-scale cohorts;
[0005] (2) Subjectivity of interpretation: The error rate of apnea classification is >25% (the rate of missed detection of brief apnea during rapid eye movement sleep (REM) is 40%), and the consistency of behavioral classification is only 65-75%. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention proposes a respiratory signal processing method and system.
[0007] The first aspect of this invention discloses a respiratory signal processing method, the respiratory signal processing method comprising:
[0008] Acquire the first respiratory signal of the target object during the target time period;
[0009] The first respiratory signal is analyzed using a first sliding window, and the moving average standard deviation of the first respiratory signal within the first sliding window is calculated. When the moving average standard deviation is less than the preset maximum standard deviation of apnea, the count is incremented by 1; otherwise, the count is reset to zero. If the count reaches a preset count threshold, it is determined that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting period.
[0010] A second sliding window is used to detect the peak of the first respiratory signal. When the detected peak is greater than the minimum peak threshold of a sigh and the distance between adjacent peaks is greater than a first preset duration, a sigh event is determined to occur in the second sliding window where the detected peak is located. The distance between adjacent peaks is the distance between the two most recent detected peaks, and the length of the second sliding window is less than the length of the first sliding window.
[0011] The second respiratory signal is obtained by removing the respiratory signals corresponding to the apnea event and the sighing event from the first respiratory signal;
[0012] A one-dimensional convolutional neural network is used to extract the temporal features of the second respiratory signal, and a computer vision model is used to extract the spatial features of the second respiratory signal.
[0013] Multimodal feature fusion is performed on the temporal features and the spatial features to obtain a multidimensional feature representation;
[0014] Based on the multidimensional feature representation, the second respiratory signal is classified into respiratory events.
[0015] According to the respiratory signal processing method of the first aspect of the present invention, the step of extracting the spatial features of the second respiratory signal using a computer vision model includes:
[0016] Obtain the two-dimensional image corresponding to the second respiratory signal;
[0017] The two-dimensional image is divided into multiple sub-images according to a preset time window;
[0018] The multiple sub-images are input into a computer vision model based on the Transformer architecture to obtain the spatial features of each sub-image.
[0019] The process of fusing the temporal and spatial features to obtain a multi-dimensional feature representation includes:
[0020] For each of the plurality of sub-images, the spatial features of the sub-image are fused with the temporal features of the third respiratory signal to obtain a multi-dimensional feature representation of the third respiratory signal, wherein the third respiratory signal is the second respiratory signal within the corresponding time period of the sub-image.
[0021] According to the respiratory signal processing method of the first aspect of the present invention, the step of classifying the second respiratory signal into respiratory events based on the multidimensional feature representation includes:
[0022] For each of the multiple sub-images, the multidimensional feature representation of the third respiratory signal is input into a Transformer-based classification model to obtain the respiratory event classification result of the third respiratory signal, wherein the respiratory event classification result is one of rest, movement, sniffing, grooming, non-rapid eye movement sleep and rapid eye movement sleep.
[0023] According to the respiratory signal processing method of the first aspect of the present invention, acquiring the first respiratory signal of the target object during the target time period includes:
[0024] A signal sensor using complementary metal-oxide-semiconductor integrated circuit technology acquires the raw respiratory signal of the target object during the target time period;
[0025] The original respiratory signal is filtered, denoised, and normalized to obtain the first respiratory signal.
[0026] According to the respiratory signal processing method of the first aspect of the present invention, the respiratory signal processing method further includes:
[0027] The sleep apnea events are classified according to the time period in which the sighing events occur.
[0028] According to the respiratory signal processing method of the first aspect of the present invention, the step of classifying the apnea event based on the occurrence time of the sighing event includes:
[0029] If a peak value corresponding to the sighing event is detected within a second preset time period before the start of the continuous time period, the sleep apnea event occurring within the continuous time period is classified as Type I.
[0030] If a peak value corresponding to the sighing event is detected in the first time period before the start time of the continuous time period, the sleep apnea event occurring in the continuous time period is classified as type II, wherein the time interval between the end time of the first time period and the start time of the continuous time period is greater than the second preset duration.
[0031] If no peak value corresponding to the sighing event is detected within a third preset duration before the start time of the continuous period, the sleep apnea event occurring within the continuous period is classified as type 0, wherein the third preset duration is equal to the time interval between the start time of the first period and the start time of the continuous period.
[0032] According to the respiratory signal processing method of the first aspect of the present invention, the respiratory signal processing method further includes:
[0033] Calculate the standard deviation of the peak value of the first respiratory signal within a fourth preset time period before the peak value corresponding to the sighing event;
[0034] If the standard deviation is greater than a preset standard deviation threshold, then the sighing event is classified as a sober type.
[0035] If the standard deviation is less than or equal to the preset standard deviation threshold, then the sighing event is classified as non-rapid eye movement (NREM) type.
[0036] According to the respiratory signal processing method of the first aspect of the present invention, the respiratory signal processing method further includes:
[0037] Extract the first peak of the first respiratory signal within a fifth preset time period before the peak corresponding to the sighing event;
[0038] The time interval between two adjacent zero points across the first peak is determined as the exhalation duration of the sighing event, and the time interval between the two nearest adjacent zero points upstream of the first peak is determined as the inhalation duration of the sighing event.
[0039] The area formed between the curve between two adjacent zero points across the first peak and the horizontal axis is determined as the exhalation area of the sighing event, and the area formed between the curve between the two nearest adjacent zero points upstream of the first peak and the horizontal axis is determined as the inhalation area of the sighing event.
[0040] According to the respiratory signal processing method of the first aspect of the present invention, the respiratory signal processing method further includes:
[0041] A visualization chart is generated based on the timing of the apnea event, the timing of the sighing event, and the respiratory event classification results of the second respiratory signal;
[0042] The visualization chart is displayed.
[0043] A second aspect of the present invention discloses a respiratory signal processing system, the respiratory signal processing system comprising:
[0044] The first processing module is configured to acquire the first respiratory signal of the target object during the target time period;
[0045] The second processing module is configured to: analyze the first respiratory signal using a first sliding window, calculate the moving average standard deviation of the first respiratory signal within the first sliding window; increment the count by 1 when the moving average standard deviation is less than the preset maximum standard deviation of apnea, otherwise reset the count to zero; if the count reaches a preset counting threshold, determine that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting cycle.
[0046] The third processing module is configured to use a second sliding window to perform peak detection on the first respiratory signal. When the detected peak value is greater than the minimum peak threshold for a sigh and the distance between adjacent peaks is greater than a first preset duration, it determines that a sigh event has occurred in the second sliding window where the detected peak value is located. The distance between adjacent peaks is the distance between the two most recent detected peak values, and the length of the second sliding window is less than the length of the first sliding window.
[0047] The fourth processing module is configured to remove the respiratory signals corresponding to the apnea event and the sigh event from the first respiratory signal to obtain the second respiratory signal;
[0048] The fifth processing module is configured to extract the temporal features of the second respiratory signal using a one-dimensional convolutional neural network and to extract the spatial features of the second respiratory signal using a computer vision model.
[0049] The sixth processing module is configured to perform multimodal feature fusion on the temporal features and the spatial features to obtain a multidimensional feature representation;
[0050] The seventh processing module is configured to classify the second respiratory signal into respiratory events based on the multidimensional feature representation.
[0051] In summary, the solution proposed in this invention has the following technical effects:
[0052] To address the issue that the rapid basal respiratory rate and short resting period of the target subjects result in more subtle waveform features of critical events such as apnea and sighing, which are easily masked by noise, this paper proposes a method to detect apnea events based on a sliding window and moving average standard deviation, and to efficiently and accurately identify sighing events using peak detection and dual threshold constraints. This significantly improves the recognition accuracy of critical events such as apnea and sighing. Furthermore, after identifying apnea and sighing events in the first respiratory signal, the respiratory signals corresponding to the apnea and sighing events are removed from the first respiratory signal to obtain the second respiratory signal. Then, a one-dimensional convolutional neural network is used to extract the temporal features of the second respiratory signal, and a computer vision model is used to extract its spatial features. Multimodal feature fusion of the temporal and spatial features yields a multidimensional feature representation, enabling accurate detection and classification of respiratory events based on the second respiratory signal. In addition, the use of automated respiratory signal processing methods can significantly improve the efficiency of respiratory signal processing, reducing the processing time for a single target object's respiratory signals over 24 hours from several hours in traditional methods to minutes, eliminating the subjectivity of manual interpretation, reducing the false alarm rate of sleep apnea, and improving the consistency of behavioral classification (eliminating subjective errors). Attached Figure Description
[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 This is a flowchart of a respiratory signal processing method according to an embodiment of the present invention;
[0055] Figure 2 This is a structural diagram of a respiratory signal processing system according to an embodiment of the present invention;
[0056] Figure 3 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] The first aspect of this invention discloses a respiratory signal processing method. Figure 1 Here is a flowchart of a respiratory signal processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the respiratory signal processing method includes:
[0059] In step 101, the first respiratory signal of the target object during the target time period is acquired.
[0060] In some embodiments, acquiring the first respiratory signal of the target object during a target time period includes:
[0061] A signal sensor using complementary metal-oxide-semiconductor (CMOS) integrated circuit technology acquires the raw respiratory signal of the target object during the target time period; the raw respiratory signal is filtered, denoised and normalized to obtain the first respiratory signal.
[0062] Specifically, a processor can be built, and a high-performance, low-power software parsing platform, namely a respiratory signal processing system, can be deployed on this processor. This system supports mainstream deep learning frameworks and provides powerful computing power for AI applications. The signal sensor is a high-frequency respiratory signal acquisition sensor.
[0063] Raw respiratory signals from target subjects such as mice and rats are acquired in real time using a high-frequency respiratory signal acquisition sensor, ensuring signal continuity and stability. The raw respiratory signals are then transmitted to a preprocessing module for filtering, denoising, and normalization. An adaptive filtering algorithm removes environmental noise and baseline drift, and signal normalization ensures data consistency, providing high-quality input data for subsequent feature extraction and classification. Simultaneously, the system is connected to a respiratory signal processing system to ensure seamless integration between data acquisition and processing.
[0064] In step 102, the first respiratory signal is analyzed using a first sliding window, and the moving average standard deviation of the first respiratory signal within the first sliding window is calculated. When the moving average standard deviation is less than the preset maximum standard deviation of apnea, the count is incremented by 1; otherwise, the count is cleared. If the count reaches the preset counting threshold, it is determined that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting cycle.
[0065] For example, the length of the first sliding window is 0.5 seconds, and the preset counting threshold is 3. Specifically, the first respiratory signal is analyzed in real time using a 0.5-second first sliding window, and the moving average standard deviation of the first respiratory signal within the first sliding window is calculated. When the moving average standard deviation is less than the preset maximum standard deviation of apnea, the count is incremented by 1; if the consecutive counts exceed 3, it is determined to be an apnea event. This method effectively captures the zero-airflow state during apnea through quantitative analysis of local fluctuation characteristics, significantly improving detection accuracy.
[0066] In step 103, a second sliding window is used to detect the peak value of the first respiratory signal. When the detected peak value is greater than the minimum peak value threshold of a sigh and the distance between adjacent peak values is greater than the first preset duration, it is determined that a sigh event has occurred in the second sliding window where the detected peak value is located.
[0067] The spacing between adjacent peaks is the distance between the two most recent detected peaks, and the length of the second sliding window is less than the length of the first sliding window.
[0068] For example, the length of the second sliding window is 0.2 seconds, and the first preset duration is 10 seconds. Specifically, the 0.2-second second sliding window is used to detect the peak value of the first respiratory signal. When the detected peak value exceeds the minimum peak threshold for a sigh, and the interval between adjacent peak values is greater than 10 seconds (approximately the shortest time interval between two sighs), it is determined to be a sigh event. This method ensures accurate identification of sigh events through dual threshold constraints, while avoiding false detections and missed detections.
[0069] In step 104, the respiratory signals corresponding to the apnea and sighing events are removed from the first respiratory signal to obtain the second respiratory signal.
[0070] Specifically, the time periods of detected sighing and apnea events are extracted from the first respiratory signal to obtain high-quality one-dimensional time-series data, namely the second respiratory signal, which serves as input to a one-dimensional convolutional neural network (1D-CNN). Simultaneously, the second respiratory signal is converted into multiple images in 3-second windows, which are then used as input to a computer vision model for subsequent feature extraction and classification. This method effectively reduces noise interference through data cleaning, providing a reliable data foundation for the training and optimization of the deep learning model (i.e., the Swin-Transformer network model discussed later).
[0071] In step 105, a one-dimensional convolutional neural network is used to extract the temporal features of the second respiratory signal, and a computer vision model is used to extract the spatial features of the second respiratory signal.
[0072] In step 106, multimodal feature fusion is performed on the temporal and spatial features to obtain a multidimensional feature representation.
[0073] In step 107, the second respiratory signal is classified into respiratory events based on multidimensional feature representation.
[0074] In some embodiments, a computer vision model is used to extract the spatial features of the second respiratory signal, including:
[0075] Acquire a two-dimensional image corresponding to the second respiratory signal;
[0076] Divide the two-dimensional image into multiple sub-images according to a preset time window (e.g., 3 seconds);
[0077] Multiple sub-images are input into a computer vision model based on the Transformer architecture to obtain the spatial features of each sub-image.
[0078] Multimodal feature fusion of temporal and spatial features yields a multidimensional feature representation, including:
[0079] For each of the multiple sub-images, the spatial features of the sub-image are fused with the temporal features of the third respiratory signal to obtain a multi-dimensional feature representation of the third respiratory signal, where the third respiratory signal is the second respiratory signal within the corresponding time period of the sub-image.
[0080] Specifically, the computer vision model can be based on the Transformer architecture, such as the Swin-Transformer. By creating a Swin-Transformer network model and directly rendering the acquired second respiratory signal as a two-dimensional image, segmenting it into several small image patches using a 3-second window, these patches are divided into training and testing sets. The training set is then imported into the Swin-Transformer network model for training, resulting in a trained Swin-Transformer network model. Finally, the testing set is imported into the trained Swin-Transformer network model for testing, yielding the test results.
[0081] Temporal features are extracted from respiratory signals after removing sighs and apnea events using 1D-CNN, capturing local patterns and dynamic changes in the respiratory waveform, including key features such as peaks, troughs, and zero points. The respiratory signals after removing sighs and apnea events are converted into images in a 3-second window and used as input to a Swin-Transformer to extract spatial features, capturing the global structure and spatial distribution of the respiratory waveform, including waveform contours and amplitude variations. Subsequently, a lightweight Transformer network is used to fuse the temporal and spatial features, generating a multi-dimensional feature representation to support accurate classification of respiratory events.
[0082] In some embodiments, the second respiratory signal is classified into respiratory events based on multidimensional feature representation, including:
[0083] For each of the multiple sub-images, the multidimensional feature representation of the third respiratory signal is input into a Transformer-based classification model to obtain the respiratory event classification result of the third respiratory signal. The respiratory event classification result is one of the following: rest, movement, sniffing, grooming, non-rapid eye movement sleep, and rapid eye movement sleep.
[0084] Specifically, the Transformer-based classification model models features through a self-attention mechanism and encodes the global context using multi-layer self-attention modules. This allows the model to obtain the temporal features, waveform features, and global context information of the respiratory signal. Subsequently, through a fully connected layer and a Softmax function, the model outputs the classification probability of respiratory events in different windows and determines the final classification result through a threshold, thereby achieving accurate analysis of the high-frequency respiratory signal of the target object.
[0085] In some embodiments, the respiratory signal processing method further includes:
[0086] Sleep apnea events are classified according to the timing of the sighing event.
[0087] Based on the timing of the sighing event, apnea events are classified into the following types:
[0088] If a peak value corresponding to a sighing event is detected within the second preset time period before the start of the above continuous time period, the apnea event occurring within the continuous time period is classified as Type I.
[0089] If a peak value corresponding to a sighing event is detected in the first time period before the start time of the aforementioned continuous time period, the sleep apnea event occurring in the continuous time period is classified as type II, wherein the time interval between the end time of the first time period and the start time of the continuous time period is greater than the second preset duration.
[0090] If no peak value corresponding to the sighing event is detected within the third preset time period before the start time of the aforementioned continuous time period, the apnea event occurring within the continuous time period is classified as type 0, where the third preset time period is equal to the time interval between the start time of the first time period and the start time of the continuous time period.
[0091] For example, the second preset duration is 0.5 seconds, the third preset duration is 3 seconds, and the first time period is 2-3 seconds before the start of the aforementioned continuous time periods. Specifically, if a sigh is detected within 0.5 seconds before the apnea event, it is marked as Type I apnea; if a sigh is detected within 2-3 seconds before the apnea event, it is marked as Type II apnea; and if no sigh is detected within 3 seconds before the apnea event, it is marked as Type O apnea. By combining the standard deviation of respiratory wave data, sigh detection results, and the standard deviation of peak interval, apnea events are further subdivided into different types, providing a multi-dimensional analytical framework for the study of the pathological mechanisms of apnea.
[0092] In some embodiments, the respiratory signal processing method further includes:
[0093] Calculate the standard deviation of the peak value of the first respiratory signal within the fourth preset time period before the peak value corresponding to the sighing event;
[0094] If the standard deviation is greater than the preset standard deviation threshold, the sighing event is classified as the sober type.
[0095] If the standard deviation is less than or equal to the preset standard deviation threshold, the sighing event is classified as non-rapid eye movement type.
[0096] For example, the fourth preset duration is 10 seconds.
[0097] In some embodiments, the respiratory signal processing method further includes:
[0098] Extract the first peak of the first respiratory signal within the fifth preset time period preceding the peak corresponding to the sighing event;
[0099] The time interval between two adjacent zero points across the first peak is defined as the exhalation duration of the sighing event, and the time interval between the two nearest adjacent zero points upstream of the first peak is defined as the inhalation duration of the sighing event.
[0100] The area formed between the curve between two adjacent zero points across the first peak and the horizontal axis is defined as the exhalation area of the sighing event, and the area formed between the curve between the two nearest adjacent zero points upstream of the first peak and the horizontal axis is defined as the inhalation area of the sighing event.
[0101] For example, the fifth preset duration is 1 second. Specifically, a 1-second sliding window is set to the right of the detected peak of the sighing event. The peak within the window is extracted, and two zero points are found to the left of the peak (the product of the two points is negative, which is zero). The minimum value between the zero points is the trough. The inhalation time is the time difference between the two zero points to the left of the peak, the exhalation time is the time difference between the two zero points to the left and right of the peak, the inhalation area is the area under the curve between the two zero points to the left of the peak (that is, the area formed by the curve between the two nearest adjacent zero points upstream of the first peak and the horizontal axis), and the exhalation area is the area under the curve between the two zero points to the left and right of the peak (that is, the area formed by the curve between the two adjacent zero points across the first peak and the horizontal axis). Thus, the dynamic characteristics of the sighing wave can be comprehensively quantified. This method provides precise data support for the study of the physiological and pathological mechanisms of the sighing wave.
[0102] In some embodiments, the respiratory signal processing method further includes:
[0103] Based on the timing of apnea events, the timing of sighing events, and the respiratory event classification results of the second respiratory signal, a visualization chart is generated;
[0104] Display visual charts.
[0105] Specifically, the timing of apnea events, the timing of sighing events, and the respiratory event classification results of the second respiratory signal can be stored in a local database or cloud server for easy subsequent querying and analysis. At the same time, visualization tools can be used to draw the waveform of the first respiratory signal, event markers, and classification results into charts to intuitively show the changing trends of respiratory patterns and event distribution, which is convenient for researchers or medical professionals to conduct further analysis.
[0106] A second aspect of the present invention discloses a respiratory signal processing system. Figure 2This is a structural diagram of a respiratory signal processing system according to an embodiment of the present invention; as shown below. Figure 2 As shown, the respiratory signal processing system 400 includes:
[0107] The first processing module 401 is configured to acquire the first respiratory signal of the target object during the target time period;
[0108] The second processing module 402 is configured to: analyze the first respiratory signal using a first sliding window, calculate the moving average standard deviation of the first respiratory signal within the first sliding window; increment the count by 1 when the moving average standard deviation is less than the preset maximum standard deviation of apnea, otherwise reset the count to zero; and determine that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting cycle if the count reaches a preset counting threshold.
[0109] The third processing module 403 is configured to use a second sliding window to perform peak detection on the first respiratory signal. When the detected peak value is greater than the minimum peak threshold of a sigh and the distance between adjacent peaks is greater than a first preset duration, it determines that a sigh event has occurred in the second sliding window where the detected peak value is located. The distance between adjacent peaks is the distance between the two most recent detected peak values, and the length of the second sliding window is less than the length of the first sliding window.
[0110] The fourth processing module 404 is configured to remove the respiratory signals within the time periods corresponding to the apnea event and the sigh event from the first respiratory signal to obtain the second respiratory signal;
[0111] The fifth processing module 405 is configured to extract the temporal features of the second respiratory signal using a one-dimensional convolutional neural network and to extract the spatial features of the second respiratory signal using a computer vision model.
[0112] The sixth processing module 406 is configured to perform multimodal feature fusion on the temporal features and the spatial features to obtain a multidimensional feature representation;
[0113] The seventh processing module 407 is configured to classify the second respiratory signal into respiratory events based on the multidimensional feature representation.
[0114] According to a respiratory signal processing system of a second aspect of the present invention, the fifth processing module 405 includes:
[0115] The acquisition submodule is configured to acquire a two-dimensional image corresponding to the second respiratory signal;
[0116] The sub-module is configured to divide the two-dimensional image into multiple sub-images according to a preset time window;
[0117] The spatial feature extraction submodule is configured to input the multiple sub-images into a computer vision model based on the Transformer architecture to obtain the spatial features of each of the multiple sub-images.
[0118] The sixth processing module 406 is specifically configured to perform multimodal feature fusion of the spatial features of the sub-image and the temporal features of the third respiratory signal for each of the plurality of sub-images, to obtain a multidimensional feature representation of the third respiratory signal, wherein the third respiratory signal is the second respiratory signal within the corresponding time period of the sub-image.
[0119] According to the respiratory signal processing system of the second aspect of the present invention, the seventh processing module 407 is specifically configured to input the multidimensional feature representation of the third respiratory signal into a Transformer-based classification model for each of the plurality of sub-images to obtain a respiratory event classification result of the third respiratory signal, wherein the respiratory event classification result is one of rest, movement, sniffing, grooming, non-rapid eye movement sleep and rapid eye movement sleep.
[0120] According to a respiratory signal processing system of a second aspect of the present invention, the first processing module 401 includes:
[0121] The signal acquisition submodule is configured to acquire the raw respiratory signal of the target object during the target time period using a signal sensor employing complementary metal-oxide-semiconductor integrated circuit technology;
[0122] The preprocessing submodule is configured to filter, denoise, and normalize the original respiratory signal to obtain the first respiratory signal.
[0123] According to a second aspect of the respiratory signal processing system of the present invention, the respiratory signal processing system 400 further includes:
[0124] The sleep apnea event classification module is configured to classify the sleep apnea event according to the time period in which the sighing event occurs.
[0125] According to a respiratory signal processing system of a second aspect of the present invention, the apnea event classification module includes:
[0126] The first classification submodule is configured such that if a peak corresponding to the sighing event is detected within a second preset duration before the start time of the continuous time period, the sleep apnea event occurring within the continuous time period is classified as Type I.
[0127] The second classification submodule is configured such that if a peak corresponding to the sighing event is detected in the first time period before the start time of the continuous time period, the sleep apnea event occurring in the continuous time period is classified as type II, wherein the time interval between the end time of the first time period and the start time of the continuous time period is greater than the second preset duration.
[0128] The third sub-module is configured such that if no peak value corresponding to the sighing event is detected within a third preset duration before the start time of the continuous period, the sleep apnea event occurring within the continuous period is classified as type 0, wherein the third preset duration is equal to the time interval between the start time of the first period and the start time of the continuous period.
[0129] According to a second aspect of the respiratory signal processing system of the present invention, the respiratory signal processing system further includes:
[0130] The calculation submodule is configured to calculate the standard deviation of the peak value of the first respiratory signal within a fourth preset time period before the peak value corresponding to the sigh event;
[0131] The fourth sub-module is configured such that if the standard deviation is greater than a preset standard deviation threshold, the sighing event is classified as a sober type.
[0132] The fifth sub-module is configured such that if the standard deviation is less than or equal to the preset standard deviation threshold, the sighing event is classified as non-rapid eye movement (NREM) type.
[0133] According to a second aspect of the respiratory signal processing system of the present invention, the respiratory signal processing system further includes:
[0134] The peak extraction module is configured to extract the first peak of the first respiratory signal within a fifth preset time period before the peak corresponding to the sigh event;
[0135] The breathing duration determination module is configured to determine the time interval between two adjacent zero points across the first peak as the exhalation duration of the sigh event, and to determine the time interval between the two nearest adjacent zero points upstream of the first peak as the inhalation duration of the sigh event.
[0136] The breathing area determination module is configured to determine the area formed between the curve between two adjacent zero points across the first peak and the horizontal axis as the expiratory area of the sighing event, and to determine the area formed between the curve between the two nearest adjacent zero points upstream of the first peak and the horizontal axis as the inspiratory area of the sighing event.
[0137] According to a second aspect of the respiratory signal processing system of the present invention, the respiratory signal processing system further includes:
[0138] The chart generation module is configured to generate a visualization chart based on the occurrence time of the apnea event, the occurrence time of the sighing event, and the respiratory event classification result of the second respiratory signal;
[0139] The display module is configured to display the aforementioned visual charts.
[0140] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a respiratory signal processing method according to any one of the first aspects of this disclosure.
[0141] Figure 3 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 3 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0142] Those skilled in the art will understand that Figure 3 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0143] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a respiratory signal processing method according to any one of the first aspects of this disclosure.
[0144] In summary, the solution proposed in this invention has the following technical effects:
[0145] To address the issue that the rapid basal respiratory rate and short resting period of the target subjects result in more subtle waveform features of critical events such as apnea and sighing, which are easily masked by noise, this paper proposes a method to detect apnea events based on a sliding window and moving average standard deviation, and to efficiently and accurately identify sighing events using peak detection and dual threshold constraints. This significantly improves the recognition accuracy of critical events such as apnea and sighing. Furthermore, after identifying apnea and sighing events in the first respiratory signal, the respiratory signals corresponding to the apnea and sighing events are removed from the first respiratory signal to obtain the second respiratory signal. Then, a one-dimensional convolutional neural network is used to extract the temporal features of the second respiratory signal, and a computer vision model is used to extract its spatial features. Multimodal feature fusion of the temporal and spatial features yields a multidimensional feature representation, enabling accurate detection and classification of respiratory events based on the second respiratory signal. In addition, the use of automated respiratory signal processing methods can significantly improve the efficiency of respiratory signal processing, reducing the processing time for a single target object's respiratory signals over 24 hours from several hours in traditional methods to minutes, eliminating the subjectivity of manual interpretation, reducing the false alarm rate of sleep apnea, and improving the consistency of behavioral classification (eliminating subjective errors).
[0146] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A respiratory signal processing method, characterized in that, The respiratory signal processing method includes: Acquire the first respiratory signal of the target object during the target time period; The first respiratory signal is analyzed using a first sliding window, and the moving average standard deviation of the first respiratory signal within the first sliding window is calculated. When the moving average standard deviation is less than the preset maximum standard deviation of apnea, the count is incremented by 1; otherwise, the count is reset to zero. If the count reaches a preset count threshold, it is determined that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting period. A second sliding window is used to detect the peak of the first respiratory signal. When the detected peak is greater than the minimum peak threshold of a sigh and the distance between adjacent peaks is greater than a first preset duration, a sigh event is determined to occur in the second sliding window where the detected peak is located. The distance between adjacent peaks is the distance between the two most recent detected peaks, and the length of the second sliding window is less than the length of the first sliding window. The second respiratory signal is obtained by removing the respiratory signals corresponding to the apnea event and the sighing event from the first respiratory signal; A one-dimensional convolutional neural network is used to extract the temporal features of the second respiratory signal, and a computer vision model is used to extract the spatial features of the second respiratory signal. Multimodal feature fusion is performed on the temporal features and the spatial features to obtain a multidimensional feature representation; Based on the multidimensional feature representation, the second respiratory signal is classified into respiratory events.
2. The respiratory signal processing method according to claim 1, characterized in that, The step of extracting the spatial features of the second respiratory signal using a computer vision model includes: Obtain the two-dimensional image corresponding to the second respiratory signal; The two-dimensional image is divided into multiple sub-images according to a preset time window; The multiple sub-images are input into a computer vision model based on the Transformer architecture to obtain the spatial features of each sub-image. The process of fusing the temporal and spatial features to obtain a multi-dimensional feature representation includes: For each of the plurality of sub-images, the spatial features of the sub-image are fused with the temporal features of the third respiratory signal to obtain a multi-dimensional feature representation of the third respiratory signal, wherein the third respiratory signal is the second respiratory signal within the corresponding time period of the sub-image.
3. The respiratory signal processing method according to claim 2, characterized in that, The step of classifying respiratory events based on the multidimensional feature representation of the second respiratory signal includes: For each of the multiple sub-images, the multidimensional feature representation of the third respiratory signal is input into a Transformer-based classification model to obtain the respiratory event classification result of the third respiratory signal, wherein the respiratory event classification result is one of rest, movement, sniffing, grooming, non-rapid eye movement sleep and rapid eye movement sleep.
4. The respiratory signal processing method according to claim 1, characterized in that, The acquisition of the first respiratory signal of the target object during the target time period includes: A signal sensor using complementary metal-oxide-semiconductor integrated circuit technology acquires the raw respiratory signal of the target object during the target time period; The original respiratory signal is filtered, denoised, and normalized to obtain the first respiratory signal.
5. The respiratory signal processing method according to claim 1, characterized in that, The respiratory signal processing method further includes: The sleep apnea events are classified according to the time period in which the sighing events occur.
6. The respiratory signal processing method according to claim 5, characterized in that, The classification of the apnea event based on the timing of the sighing event includes: If a peak value corresponding to the sighing event is detected within a second preset time period before the start of the continuous time period, the sleep apnea event occurring within the continuous time period is classified as Type I. If a peak value corresponding to the sighing event is detected in the first time period before the start time of the continuous time period, the sleep apnea event occurring in the continuous time period is classified as type II, wherein the time interval between the end time of the first time period and the start time of the continuous time period is greater than the second preset duration. If no peak value corresponding to the sighing event is detected within a third preset duration before the start time of the continuous period, the sleep apnea event occurring within the continuous period is classified as type 0, wherein the third preset duration is equal to the time interval between the start time of the first period and the start time of the continuous period.
7. The respiratory signal processing method according to claim 1, characterized in that, The respiratory signal processing method further includes: Calculate the standard deviation of the peak value of the first respiratory signal within a fourth preset time period before the peak value corresponding to the sighing event; If the standard deviation is greater than a preset standard deviation threshold, then the sighing event is classified as a sober type. If the standard deviation is less than or equal to the preset standard deviation threshold, then the sighing event is classified as non-rapid eye movement (NREM) type.
8. The respiratory signal processing method according to claim 1, characterized in that, The respiratory signal processing method further includes: Extract the first peak of the first respiratory signal within a fifth preset time period before the peak corresponding to the sighing event; The time interval between two adjacent zero points across the first peak is determined as the exhalation duration of the sighing event, and the time interval between the two nearest adjacent zero points upstream of the first peak is determined as the inhalation duration of the sighing event. The area formed between the curve between two adjacent zero points across the first peak and the horizontal axis is determined as the exhalation area of the sighing event, and the area formed between the curve between the two nearest adjacent zero points upstream of the first peak and the horizontal axis is determined as the inhalation area of the sighing event.
9. The respiratory signal processing method according to claim 1, characterized in that, The respiratory signal processing method further includes: A visualization chart is generated based on the timing of the apnea event, the timing of the sighing event, and the respiratory event classification results of the second respiratory signal; The visualization chart is displayed.
10. A respiratory signal processing system, characterized in that, The respiratory signal processing system includes: The first processing module is configured to acquire the first respiratory signal of the target object during the target time period; The second processing module is configured to: analyze the first respiratory signal using a first sliding window, calculate the moving average standard deviation of the first respiratory signal within the first sliding window; increment the count by 1 when the moving average standard deviation is less than the preset maximum standard deviation of apnea, otherwise reset the count to zero; if the count reaches a preset counting threshold, determine that apnea events have occurred in all consecutive time periods corresponding to the first sliding window within the current counting cycle. The third processing module is configured to use a second sliding window to perform peak detection on the first respiratory signal. When the detected peak value is greater than the minimum peak threshold for a sigh and the distance between adjacent peaks is greater than a first preset duration, it determines that a sigh event has occurred in the second sliding window where the detected peak value is located. The distance between adjacent peaks is the distance between the two most recent detected peak values, and the length of the second sliding window is less than the length of the first sliding window. The fourth processing module is configured to remove the respiratory signals corresponding to the apnea event and the sigh event from the first respiratory signal to obtain the second respiratory signal; The fifth processing module is configured to extract the temporal features of the second respiratory signal using a one-dimensional convolutional neural network and to extract the spatial features of the second respiratory signal using a computer vision model. The sixth processing module is configured to perform multimodal feature fusion on the temporal features and the spatial features to obtain a multidimensional feature representation; The seventh processing module is configured to classify the second respiratory signal into respiratory events based on the multidimensional feature representation.
Citation Information
Patent Citations
Breathing mode classification method and system
CN115040109A
Breathing state monitoring device in sleep process
CN118806240A