Sleep monitoring method, breathing parameter control method and breathing equipment
By analyzing the airflow rate signal collected by the respiratory device, extracting the characteristics of breathing depth and rate, and using machine learning models to determine the sleep state, solving the problem of insufficient sleep monitoring complexity and accuracy in the prior art, and achieving a more efficient sleep quality assessment.
Patent Information
- Application Number
- CN202411964859.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
AI Technical Summary
Existing sleep monitoring methods require the connection of multiple electrodes and sensors in a sleep lab, which are complex in operation and may affect the accuracy of sleep monitoring.
By obtaining the user's airflow rate signal, the breathing depth and rate of the breathing cycle are determined, and these features are processed, time domain, frequency domain and nonlinear features are extracted, and the sleep state is determined using a trained machine learning model.
Without adding additional hardware and changing the sleep environment, improving the accuracy of sleep monitoring will help medical staff to more accurately evaluate users' sleep quality.
Smart Images

Figure CN119791598A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sleep assessment, and in particular to a sleep monitoring method, a respiratory parameter control method and a respiratory device. Background Art
[0002] Some users (such as patients with obstructive sleep apnea (OSA)) will frequently wake up due to apnea or hypoventilation during sleep, which makes sleep fragmented and seriously affects sleep quality. Using a ventilator can improve the user's breathing condition and improve the user's sleep quality, and the breathing parameters of the ventilator are set based on the user's sleep condition obtained through monitoring.
[0003] At present, sleep status is mainly monitored through polysomnography (PSG). Specifically, PSG uses multiple electrodes and sensors to record various physiological signals of the user during sleep, such as electroencephalogram (EEG), electro-oculogram (EOG), electromyogram (EMG), electrocardiogram (ECG), oral and nasal airflow, chest and abdominal breathing movements, and blood oxygen saturation (SaO), etc.; then, through comprehensive analysis of these signals, the user's sleep status is judged.
[0004] However, the above monitoring method requires connecting multiple electrodes and sensors in a sleep laboratory to complete sleep assessment. Not only is the operation process complicated, but various lines are connected to the user, which may also cause discomfort to the user and affect the accuracy of sleep monitoring. Summary of the invention
[0005] In view of this, the present invention provides a sleep monitoring method, a respiratory parameter control method and a respiratory device to improve the accuracy of sleep monitoring.
[0006] In a first aspect, the present invention provides a sleep monitoring method, the method comprising: obtaining an airflow rate signal of a user in a first time period; determining the breathing depth and breathing rate of each breathing cycle based on the airflow rate signal in the first time period; processing the breathing depth and breathing rate of each breathing cycle to determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the first time period includes multiple second time periods; based on a trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, determining the sleep state of the user in each second time period, wherein the sleep state includes wakefulness, light sleep, deep sleep and rapid eye movement stages.
[0007] The sleep monitoring method provided in this embodiment, after obtaining the airflow rate signal of the user in the first time period, determines the breathing depth and breathing rate of each respiratory cycle according to the airflow rate signal of the first time period, and processes the breathing depth and breathing rate of each respiratory cycle to determine the time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods, and then inputs the extracted features of each second time period into a trained machine learning model, and determines the sleep state of each second time period based on the output of the trained machine learning model. In this embodiment, the sleep state is determined by the collected airflow rate signal, and the user's sleep state can be determined without adding additional hardware and changing the sleep environment, thereby assisting medical staff to more accurately evaluate the user's sleep quality.
[0008] In an optional embodiment, the breathing depth and breathing rate of each breathing cycle are determined according to the airflow rate signal of the first time period, including: based on the airflow rate signal of the first time period, determining the initial breathing depth and initial breathing rate of each breathing cycle by a multi-scale extreme value detection method; and converting the initial breathing depth and initial breathing rate of each exhalation cycle into the breathing depth and breathing rate of each breathing cycle by a nearest neighbor interpolation method.
[0009] In an optional embodiment, the time domain features include the mean, variance, ratio of the mean to the variance, median and upper and lower quartile ratio of the breathing depth in the second time period, and the time domain features also include the mean, variance, ratio of the mean to the variance, median and upper and lower quartile ratio of the breathing rate in the second time period; the nonlinear features include the approximate entropy value of the breathing depth and the approximate entropy value of the breathing rate; the frequency domain features include the first frequency band energy sum, the second frequency band energy sum, the third frequency band energy sum, and the fourth frequency band energy sum of the breathing depth in the second time period The frequency domain features also include the energy sum of the first frequency band, the energy sum of the second frequency band, the energy sum of the third frequency band, the energy sum of the fourth frequency band, and the ratio of the energy sum of the third frequency band to the energy sum of the second frequency band of the respiratory rate in the second time period, wherein the first frequency band is 10mHZ to 40mHZ, the second frequency band is 40mHZ to 150mHZ, the third frequency band is 150mHZ to 250mHZ, and the fourth frequency band is 10mHZ to 250mHZ.
[0010] In an optional embodiment, the breathing depth and breathing rate of each breathing cycle are processed to determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, including: performing discrete time Fourier transform on the breathing depth and breathing rate of each breathing cycle to obtain spectrum data of the breathing depth and spectrum data of the breathing rate; determining the target frequency based on the spectrum data of the breathing depth and the spectrum data of the breathing rate, wherein the target frequency is the frequency of the noise signal; filtering the breathing depth and breathing rate of each breathing cycle to filter out the noise signal of the target frequency; filtering each breathing cycle after filtering. The breathing depth and breathing rate of each breathing cycle are normalized; based on the normalized breathing depth and breathing rate of each breathing cycle, feature extraction is performed in the time domain, frequency domain and nonlinear directions to obtain multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features; the multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features are normalized; and the multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features after normalization are converted into time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods through the nearest neighbor interpolation method.
[0011] In this embodiment, after determining the respiratory depth and respiratory rate of each respiratory cycle, the respiratory depth and respiratory rate of the respiratory cycle are subjected to discrete-time Fourier transform, filtering and normalization, and then feature extraction is performed. The extracted features are normalized and subjected to nearest neighbor interpolation processing to obtain time domain features, frequency domain features and nonlinear features corresponding to the respiratory depth and respiratory rate in multiple second time periods, which can improve the accuracy of the determined multiple features, thereby further improving the accuracy of the predicted sleep state.
[0012] In an optional embodiment, the method also includes: determining a wakefulness feature based on a respiratory pressure signal, wherein the wakefulness feature is used to characterize whether the user is in a wakefulness stage; determining the user's sleep state in each second time period based on a trained machine learning model and time domain features, frequency domain features, and nonlinear features corresponding to the respiratory depth and respiratory rate in multiple second time periods, including: determining the user's sleep state in each second time period based on a trained machine learning model, wakefulness features, and time domain features, frequency domain features, and nonlinear features corresponding to the respiratory depth and respiratory rate in multiple second time periods.
[0013] In an optional implementation, the trained machine learning model is a random forest algorithm model.
[0014] The sleep monitoring method provided in this embodiment predicts the sleep state of each second time period based on the random forest algorithm model after determining the wakefulness characteristics, time domain characteristics, frequency domain characteristics and nonlinear characteristics. Since the random forest algorithm model integrates the results of multiple decision trees, it can reduce the overfitting problem that may occur in a single decision tree and improve the accuracy of the prediction. Moreover, the random forest algorithm model has good tolerance to noise and outliers in the data and is highly robust.
[0015] In an optional embodiment, the method further includes: determining the user's sleep score based on evaluation parameters, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio and sleep efficiency.
[0016] In this embodiment, after determining the sleep state of each second time period, the user's sleep score is determined based on the evaluation parameters, which can provide a reference for evaluating sleep quality and assist users or medical staff to understand the sleep quality of the monitored user more objectively.
[0017] In a second aspect, the present invention provides a breathing parameter control method, the method comprising: obtaining an airflow rate signal of a user in a first time period; determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal in the first time period; processing the breathing depth and breathing rate of each breathing cycle to determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the first time period includes multiple second time periods; determining the sleep state of the user in each second time period based on a trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the sleep state includes wakefulness, light sleep, deep sleep and rapid eye movement stages; determining the sleep score of the user based on evaluation parameters, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio and sleep efficiency; adjusting the breathing parameters of the respiratory equipment within a safe range according to the sleep score, wherein the breathing parameters include delayed boost time and pressure.
[0018] In an optional embodiment, determining the user's sleep score based on the evaluation parameters includes: determining a score corresponding to at least one evaluation parameter based on a reference score table and the user's sleep state in each second time period to obtain at least one score; determining the user's sleep score based on the at least one score.
[0019] In an optional embodiment, the respiratory parameters of the respiratory device are adjusted within a safe range according to the sleep score, including: when the sleep score is less than a preset score, the first delayed boost time is adjusted to a second delayed boost time and / or the first pressure is adjusted to a second pressure, wherein the second delayed boost time and the second pressure are within a safe range, the first delayed boost time is the delayed boost time of the respiratory device when it is currently used, the second delayed boost time is the delayed boost time required for the respiratory device when it is used next time, the second delayed boost time is greater than the first delayed boost time, the first pressure is the pressure of the respiratory device when it is currently used, the second pressure is the pressure required for the respiratory device when it is used next time, and the second pressure is greater than the first pressure.
[0020] In a third aspect, the present invention provides a breathing device, which includes a gas delivery component and a control device connected to the gas delivery component, the gas delivery component being used to deliver gas to a user; the control device being used to obtain an airflow rate signal of the user in a first time period; the control device being also used to determine the breathing depth and breathing rate of each breathing cycle based on the airflow rate signal of the first time period; the control device being also used to process the breathing depth and breathing rate of each breathing cycle, and determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the first time period includes multiple second time periods; the control device being also used to determine the user's sleep state in each second time period based on a trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the sleep state includes wakefulness, light sleep, deep sleep and rapid eye movement stages.
[0021] In an optional embodiment, the control device is also used to determine the user's sleep score based on the evaluation parameters, and to adjust the breathing parameters of the gas delivery component within a safe range according to the sleep score, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, breathing disorder index, deep sleep ratio and sleep efficiency, and the breathing parameters include delayed pressor time and pressure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 is a flowchart of a sleep monitoring method according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of another sleep monitoring method according to an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of the inspiratory peak value, the expiratory peak value and the corresponding time points of the airflow rate of each respiratory cycle recorded according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of the breathing depth of each breathing cycle according to an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of the respiratory rate of each respiratory cycle according to an embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of a wakefulness feature RRV trend according to an embodiment of the present invention;
[0029] Figure 7 is a schematic diagram of a confusion matrix according to an embodiment of the present invention;
[0030] Figure 8 is a schematic diagram of sleep stages according to an embodiment of the present invention;
[0031] Fig. 9 is a schematic diagram of evaluation parameters according to an embodiment of the present invention;
[0032] Fig.10 is a flow chart of another sleep monitoring method according to an embodiment of the present invention;
[0033] Fig.11 is a schematic diagram of a trend of spectrum data of breathing depth according to an embodiment of the present invention;
[0034] Fig.12 is a schematic diagram of a trend of spectrum data of a respiratory rate according to an embodiment of the present invention;
[0035] Fig.13 is a schematic diagram of characteristics of a filter in the time domain according to an embodiment of the present invention;
[0036] Fig.14 is a schematic diagram of the characteristics of a filter in the frequency domain according to an embodiment of the present invention;
[0037] Fig.15 is a schematic diagram of trends of multiple initial time-domain features corresponding to breathing depth according to an embodiment of the present invention;
[0038] Fig.16 is a schematic diagram of trends of multiple initial time-domain features corresponding to a respiratory rate according to an embodiment of the present invention;
[0039] Fig.17is a schematic diagram of trends of multiple initial frequency domain features corresponding to breathing depth according to an embodiment of the present invention;
[0040] Fig.18 is a schematic diagram of trends of multiple initial frequency domain features corresponding to a respiratory rate according to an embodiment of the present invention;
[0041] Fig.19 is a schematic diagram of the trend of the initial nonlinear characteristic corresponding to the breathing depth according to an embodiment of the present invention;
[0042] Fig. 20 is a schematic diagram of a trend of an initial nonlinear characteristic corresponding to a respiratory rate according to an embodiment of the present invention;
[0043] Fig.21 is a flow chart of a breathing parameter control method according to an embodiment of the present invention;
[0044] Fig. 22 Schematic diagram of the structure of a breathing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. According to the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0046] The sleep monitoring method provided by the present invention determines the user's sleep state in each time period by analyzing the airflow rate signal collected by the respiratory device. It can evaluate the sleep quality without adding too much additional hardware and changing the sleeping environment. It is not only simple to operate, but also can improve the compliance of equipment use, thereby more accurately evaluating the user's sleep quality.
[0047] The sleep monitoring method provided by the present invention can be applicable to users who sleep with the help of respiratory equipment, such as OSA patients, etc. The respiratory equipment can be a high-flow humidification therapy device, a home ventilator, etc.
[0048] According to an embodiment of the present invention, a sleep monitoring method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in the control device of the respiratory equipment, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0049] In this embodiment, a sleep monitoring method is provided, which can be used in a control device of a respiratory device, such as a processor, Figure 1 is a flowchart of a sleep monitoring method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0050] Step S101, obtaining an airflow rate signal of a user in a first time period.
[0051] Specifically, the first time period represents the sleep time period of the user to be detected, and the first time period may be one of the total sleep time periods of the user, or the total sleep time period of the user. For example, if the total sleep time period of the user is from 22:00 to 6:00, the first time period may be from 22:00 to 6:00, or from 22:00 to 23:00, 1:00 to 2:00, or 2:00 to 3:30, etc. The length of the first time period may be determined by the designer based on demand.
[0052] The airflow rate signal may be an electrical signal representing the speed of gas flow per unit time, and the airflow rate signal is used to reflect the speed of air entering and exiting the respiratory tract during the user's breathing process. For example, the airflow rate signal may be detected by a sensor, and the control device may obtain the airflow rate signal of the first time period from the sensor on the respiratory device.
[0053] Step S102, determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period.
[0054] The breathing cycle refers to the duration of a complete breathing process, including the inhalation phase and the exhalation phase. The breathing depth reflects the difference in the amount of gas in and out during a breathing process, which can be the difference between the maximum and minimum airflow rates in the breathing cycle. That is, the breathing depth can be determined by the following formula (1):
[0055] D i =x max,i -x min,i (1)
[0056] In formula (1), D i represents the breathing depth of the i-th breathing cycle, x max,i represents the maximum airflow rate of the i-th respiratory cycle, x min,i represents the minimum airflow rate of the ith respiratory cycle.
[0057] The respiratory rate is used to reflect the duration of a respiratory cycle. The respiratory rate can be determined by multiplying the inverse of the difference between the time points of the adjacent maximum values (inspiratory peaks) by 60. That is, the respiratory rate can be determined by the following formula (2):
[0058]
[0059] In formula (2), BPM i represents the respiratory rate of the i-th respiratory cycle, t max,i+1 represents the time corresponding to the maximum airflow rate of the i+1th respiratory cycle, t max,i represents the time corresponding to the maximum airflow rate of the i-th respiratory cycle.
[0060] Specifically, after obtaining the airflow rate signal of the first time period, the inhalation peak value, the time point corresponding to the inhalation peak value, the expiratory peak value and the time point of the expiratory peak value of the airflow rate in each respiratory cycle can be recorded, and then the exhalation depth can be determined by the above formula (1), and the respiratory rate can be determined by formula (2).
[0061] Step S103, processing the breathing depth and breathing rate of each breathing cycle, and determining the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0062] Among them, the first time period includes multiple second time periods, the second time period is used to characterize the minimum sleep state judgment time unit, the sleep state remains unchanged during the second time period, and the second time period is a preset duration, which can be set by the designer based on factors such as the calculation duration of time domain characteristics, frequency domain characteristics and non-linear characteristics, the actual change duration of the sleep state and the time accuracy of the sleep state division. For example, the second time period can be 30s, 1min or 2min, etc.
[0063] Specifically, time domain features may refer to features obtained by analyzing the respiratory depth and respiratory rate signals in the time dimension. For example, the time domain features may be mean, variance and / or median, etc.; frequency domain features may refer to features obtained by analyzing the respiratory depth and respiratory rate signals after converting them from the time domain to the frequency domain through methods such as Fourier transform. For example, the frequency domain features may be power spectral density, low-frequency power and / or high-frequency power, etc.
[0064] Considering that the human body is a complex nonlinear chaotic system, it is difficult for time domain features and frequency domain features to fully reflect the key information of the essential characteristics of breathing depth and breathing rate. Further nonlinear features are extracted. Nonlinear features are used to describe the nonlinear dynamic characteristics in breathing depth and breathing rate signals, and capture some complex behaviors in the signals that cannot be described by linear methods. For example, nonlinear features can be approximate entropy (ApEn) and / or sample entropy (SampEn).
[0065] Specifically, after determining the breathing depth and breathing rate of each breathing cycle, the breathing depth and breathing rate of each breathing cycle can be filtered and normalized, and then feature extraction can be performed in the time domain, frequency domain and nonlinear directions to obtain the time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods.
[0066] Step S104, determining the sleep state of the user in each second time period based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0067] Among them, sleep states include wakefulness, light sleep, deep sleep and rapid eye movement stages.
[0068] Sleep is a cyclical process, usually from the awake state to light sleep, then to deep sleep, and then to the rapid eye movement stage. The brain is active in the awake state and can perceive the surrounding environment and respond. Light sleep is a light sleep, which is a transitional stage from the awake state to sleep. It includes the N1 stage of non-rapid eye movement sleep (NREM), which is easier to wake up. Deep sleep corresponds to the N3 stage of non-rapid eye movement sleep (NREM), which is the deepest stage of sleep, and deep sleep is difficult to wake up. In the rapid eye movement stage (Rapid Eye Movement Sleep, REM), brain neurons are active frequently, brain waves are faster and have lower amplitudes, similar to the low voltage and fast waves in the awake state. The eyeballs will move quickly left and right or up and down. The rapid eye movement stage is the main period for producing vivid and complex dreams.
[0069] Exemplarily, the trained machine learning model may be a trained neural network model, a trained deep learning model or a random forest algorithm model, which is not specifically limited in the present invention.
[0070] Specifically, after determining the time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods, the time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in the second time period can be input into a trained machine learning model, and then the sleep state corresponding to each second time period is determined based on the output of the trained machine learning model.
[0071] The sleep monitoring method provided in this embodiment, after obtaining the airflow rate signal of the user in the first time period, determines the breathing depth and breathing rate of each respiratory cycle according to the airflow rate signal of the first time period, and processes the breathing depth and breathing rate of each respiratory cycle to determine the time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods, and then inputs the extracted features of each second time period into a trained machine learning model, and determines the sleep state of each second time period based on the output of the trained machine learning model. In this embodiment, the sleep state is determined by the collected airflow rate signal, and the user's sleep state can be determined without adding additional hardware and changing the sleep environment, thereby assisting medical staff to more accurately evaluate the user's sleep quality.
[0072] In this embodiment, a sleep monitoring method is provided, which can be used in a control device of a respiratory device, such as a processor, Figure 2 FIG. 1 is a flow chart of another sleep monitoring method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0073] Step S201, obtaining an airflow rate signal of a user in a first time period.
[0074] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0075] Step S202, determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period.
[0076] Specifically, the above step S202 includes:
[0077] Step S2021, based on the airflow rate signal in the first time period, determine the initial breathing depth and initial breathing rate of each breathing cycle by a multi-scale extreme value detection method.
[0078] Among them, the multi-scale extreme value detection method is a method for signal analysis at multiple time scales (time windows). Specifically, the signal (i.e., the airflow rate signal) is complex and changeable, and may present different extreme value characteristics at different time scales. Combining the analysis of multiple different time windows can more comprehensively and accurately extract the key features (such as extreme value points) in the airflow rate signal, avoiding information omissions or misjudgments that may be caused by a single window length.
[0079] Exemplarily, the acquired airflow rate signal with a sampling rate of 25 Hz can be processed through 5 time windows of 120 ms, 280 ms, 680 ms, 1 s and 5 s, and the common poles of the 5 time windows are detected as poles, so as to record the inspiratory peak value of the airflow rate in each respiratory cycle, the time point corresponding to the inspiratory peak value, the expiratory peak value and the time point of the expiratory peak value, and the obtained inspiratory peak value of the airflow rate in the respiratory cycle, the time point corresponding to the inspiratory peak value, the expiratory peak value and the time point of the expiratory peak value can be as follows: Figure 3 As shown, Figure 3 The horizontal axis represents time in seconds, and the vertical axis represents airflow rate in L / min.
[0080] After determining the inspiratory peak value, the time point corresponding to the inspiratory peak value, the expiratory peak value, and the time point of the expiratory peak value of the airflow rate in the respiratory cycle, the initial exhalation depth can be determined by the above formula (1), and the initial respiratory rate can be determined by formula (2). Among them, the initial exhalation depth and the initial respiratory rate are non-uniformly sampled data.
[0081] The duration of multiple time windows in the multi-scale extreme value detection method can be set by the designer based on the duration of the breathing cycle. Factors such as the user's age and physical health status may cause the duration of the breathing cycle to change. The above-mentioned time windows of 120ms, 280ms, 680ms, 1s and 5s are only examples and are not limited to this.
[0082] Step S2022: Convert the initial breathing depth and initial breathing rate of each exhalation cycle into the breathing depth and breathing rate of each breathing cycle by the nearest neighbor interpolation method.
[0083] Specifically, after determining the initial breathing depth and initial breathing rate of the breathing cycle, the calculated non-uniformly sampled breathing depth (i.e., initial breathing depth) and non-uniformly sampled breathing rate (i.e., initial breathing rate) can be interpolated into the breathing depth and breathing rate uniformly sampled at a sampling rate of 0.5 Hz by the nearest neighbor interpolation method. The converted breathing depth of each breathing cycle can be as follows: Figure 4 As shown, the breathing rate of each breathing cycle can be expressed as Figure 5 shown.
[0084] The nearest neighbor interpolation method is a data interpolation method. The principle is to find the value of the data point closest to the position to be interpolated, and use this value as the interpolation result. That is, when interpolating at a specific uniform sampling time point, find the data point closest to the uniform sampling time point in the original non-uniform sampling data points, and then assign the value of this closest data point to the uniform sampling time point. The nearest neighbor interpolation method can be expressed by the following formula (3):
[0085]
[0086] In formula (3), y(x) represents the breathing depth or breathing rate corresponding to x, represents the breathing depth or breathing rate of the i*th breathing cycle, x i represents the initial breathing depth or initial breathing rate of the i-th breathing cycle, i * It represents the initial breathing depth (or initial breathing rate) which is closest to the breathing depth (or breathing rate) x to be determined by interpolation among multiple initial breathing depths (or initial breathing rates).
[0087] Step S203, processing the breathing depth and breathing rate of each breathing cycle, and determining the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0088] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0089] Step S204, determining the wakefulness characteristics of multiple second time periods according to the respiratory pressure signal.
[0090] Among them, the awake feature is used to characterize whether the user is in the awake stage.
[0091] Exemplarily, the awake feature may be respiratory rate variability (RRV), and the amplitude percentage of the first harmonic peak to the zero frequency peak (H1 / DC) in the respiratory pressure signal may be determined as RRV. The zero frequency peak (DC) represents the average value of the respiratory pressure signal, the first harmonic peak (H1) represents an important characteristic amplitude related to the fundamental frequency in the respiratory pressure signal, and the harmonic refers to a sinusoidal component whose frequency is an integer multiple of the fundamental frequency, and the frequency of the first harmonic is 1 times the fundamental frequency.
[0092] Specifically, studies have shown that the RRV is greater during the wakefulness stage than during any sleep stage (including the REM stage). The spectral analysis of the respiratory pressure signal with a 90-second window length is performed to extract the harmonic peaks and zero-frequency peaks, and the ratio and percentage calculations are performed to finally obtain the wakefulness feature RRV. The trend of the wakefulness feature RRV can be shown as follows: Figure 6 As shown, Figure 6 The horizontal axis represents time, the unit is 90s, and the vertical axis represents RRV.
[0093] Optionally, the respiratory pressure signal may be detected by a pressure sensor.
[0094] Step S205, determining the user's sleep state in each second time period based on the trained machine learning model, the wakefulness features, and the time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods.
[0095] Optionally, the trained machine learning model may be a random forest algorithm model.
[0096] Compared with other machine learning models, the random forest algorithm model has a higher degree of consistency and less computational complexity, and can more accurately and efficiently predict the user's sleep status in each second time period based on features.
[0097] Specifically, the random forest algorithm is an integrated learning algorithm based on decision trees. In simple terms, the random forest algorithm is a "forest" composed of multiple decision trees. A decision tree is a tree-structured classification or regression model that makes decisions by making a series of conditional judgments on data features.
[0098] Each decision tree is trained on a random subset of the training data (including a random subset of samples and a random subset of features). In the prediction phase, for a new data point, each decision tree in the random forest will give a prediction result, and then the final prediction is obtained by voting (classification problems) or averaging (regression problems). For example, in a random forest containing 100 decision trees, for a classification problem, 51 trees predict category A and 49 trees predict category B, then the final prediction result is category A.
[0099] The random forest algorithm model combines the prediction results of multiple decision trees to improve the accuracy and stability of the overall model. Each tree is constructed independently of other trees. Because different features have different abilities and focuses on sleep stages, the final prediction result is obtained through weighted voting.
[0100] Exemplarily, the maximum depth of each decision tree is 25, the minimum number of samples for a leaf node is 2, out-of-bag scoring is enabled, bootstrap sampling is used to sample data, and the remaining parameters and options are default. The number of decision trees in the random forest is adjusted from 100. Although more trees can improve the stability and accuracy of the model, it will also increase the computational overhead.
[0101] In the random forest algorithm model, the confusion matrix is used as an evaluation indicator. The current model is a four-class classification model, namely wakefulness (W), light sleep (L), deep sleep (D), and rapid eye movement (R). The confusion matrix is a 4×4 matrix, in which each row represents the actual category and each column represents the predicted category. The confusion matrix can be expressed as follows: Figure 7As shown in the figure, the elements on the main diagonal represent the number of samples that are correctly classified. For example, the value at position (1, 1) in the confusion matrix represents the number of samples that are actually awake and predicted to be awake; the value at position (2, 2) represents the number of samples that are actually lightly asleep and predicted to be lightly asleep, and so on. The elements on the non-main diagonal represent the number of samples that are incorrectly classified. For example, the value at position (1, 2) represents the number of samples that are actually awake but predicted to be lightly asleep, which means that the awake state is incorrectly classified as the lightly asleep state.
[0102] Through the confusion matrix method, the accuracy of each classification can be calculated in detail. 70% of the feature matrix and the corresponding labels are randomly selected as the training data set, and the rest are the test data set. Different random forest parameter combinations are traversed to find the best performing parameters until the accuracy of each classification reaches more than 85%.
[0103] Through the above training, a trained random forest algorithm model can be obtained. After that, the matrix composed of the above wakefulness features, time domain features, frequency domain features and nonlinear features is input into the trained random forest algorithm model to classify the usage data, so as to obtain the sleep state of each second time period, and then obtain the sleep stage. The sleep stage can be as follows: Figure 8 shown.
[0104] Step S206: determining the user's sleep score based on the evaluation parameters.
[0105] The evaluation parameters include at least one of sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio and sleep efficiency.
[0106] Specifically, the sleep duration can be the total time the respiratory device is used that night minus the time of the wakefulness stage; the time it takes to fall asleep can be the time required from the start of using the respiratory device to the first entry into a non-awake sleep state; the respiratory disorder index can be the sum of the average number of micro-arousals, hypoventilation and pause events per hour that night; the deep sleep ratio can be the proportion of the deep sleep (D) stage to the sleep duration; and the sleep efficiency can be the ratio of the sleep duration that night to the total time the respiratory device is used that night.
[0107] From a neurophysiological perspective, micro-arousal represents a brief awakening of the brain from sleep. Hypopnea refers to a decrease of more than 50% in the intensity (amplitude) of respiratory airflow during sleep compared to the basal level, reflecting an incomplete blockage or hypoventilation state of breathing. Apnea refers to a cessation of respiratory airflow for 10 seconds or more during sleep. During sleep, respiratory equipment can be used to determine the time when micro-arousal, hypoventilation, and apnea events occur.
[0108] For example, Fig. 9As shown, after determining the user's sleep status in each second time period, the user's sleep score can be determined through five evaluation parameters, including sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio and sleep efficiency, and a reference score table. The sleep score can provide a reference for medical staff, so that medical staff can more accurately evaluate the user's sleep quality.
[0109] The control score table is used to characterize the corresponding relationship between different evaluation parameters and sleep scores. For example, the control score table may be as shown in Table 1.
[0110] Table 1 Comparison score table
[0111]
[0112] Specifically, the closer the sleep score is to 100, the better the user's sleep quality is; and the closer the sleep score is to 0, the worse the user's sleep quality is.
[0113] The sleep monitoring method provided in this embodiment predicts the sleep state of each second time period based on the random forest algorithm model after determining the wakefulness characteristics, time domain characteristics, frequency domain characteristics and nonlinear characteristics. Since the random forest algorithm model integrates the results of multiple decision trees, it can reduce the overfitting problem that may occur in a single decision tree and improve the accuracy of the prediction. Moreover, the random forest algorithm model has good tolerance to noise and outliers in the data and is highly robust. After determining the sleep state of each second time period, the user's sleep score is determined based on the evaluation parameters, which can provide a reference for evaluating sleep quality and assist users or medical staff to more objectively understand the sleep quality of the monitored user.
[0114] In this embodiment, a sleep monitoring method is provided, which can be used in a control device of a respiratory device, such as a processor, Fig.10 FIG. 1 is a flow chart of another sleep monitoring method according to an embodiment of the present invention. Fig.10 As shown, the method comprises the following steps:
[0115] Step S1001, obtaining an airflow rate signal of a user in a first time period.
[0116] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0117] Step S1002, determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period.
[0118] For details, please see Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0119] Step S1003, processing the breathing depth and breathing rate of each breathing cycle, and determining the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0120] Specifically, the above step S1003 includes:
[0121] Step S10031, performing discrete-time Fourier transform on the respiratory depth and respiratory rate of each respiratory cycle to obtain spectrum data of the respiratory depth and spectrum data of the respiratory rate.
[0122] Specifically, the spectrum data of the breathing depth and the spectrum data of the breathing rate are obtained by performing discrete time Fourier transform on the breathing depth and the breathing rate with a window length of 128 points and a half overlap method. K , the spectrum data of breathing depth can be obtained as Fig.11 As shown, the spectral data of the respiratory rate can be Fig.12 shown.
[0123] Among them, 128 points as the window length means that 128 data points are selected from the time series data of respiratory depth and respiratory rate as a time window each time, and the half overlap method means that when a window of 128 points is selected, half of the data points of two adjacent windows overlap. For example, the first time window contains data points 1-128, and the second time window contains data points 65-192.
[0124] By overlapping windows, the information loss caused by window division can be reduced, the spectral characteristics of the signal can be analyzed more comprehensively, and the spectral data can more accurately reflect the frequency characteristics of the breathing depth and breathing rate.
[0125] Exemplarily, the discrete-time Fourier transform can be expressed by the following formula (4):
[0126]
[0127] In formula (4), X k represents the discrete-time Fourier transform result, x n represents the original discrete-time signal sequence, N represents the window length of the discrete-time Fourier transform, and P k Spectral data representing the depth of breathing or spectral data representing the breathing rate.
[0128] Step S10032, determining the target frequency based on the spectrum data of the breathing depth and the spectrum data of the breathing rate.
[0129] The target frequency is the frequency of the noise signal.
[0130] Specifically, after determining the spectrum data of the breathing depth and the spectrum data of the breathing rate, the target frequency is determined based on the spectrum data of the breathing depth and the spectrum data of the breathing rate, for example, Fig.11 and Fig.12 As shown, it can be seen that the noise is generally large at frequencies from 0 to 150 MHz. At this time, the target frequency can be 150 MHz.
[0131] Step S10033, filtering the breathing depth and breathing rate of each breathing cycle to filter out noise signals of the target frequency.
[0132] Specifically, after the target frequency is determined, the noise signal of the target frequency (such as 150 mHz) can be filtered out by a filter to obtain the filtered breathing depth and breathing rate.
[0133] Exemplarily, the filter may be a high-pass finite impulse response (FIR) filter of order 6 with a linear phase and a cutoff frequency of 0.5 designed using a Hamming window. The characteristics of the filter in the time domain may be as follows: Fig.13 As shown, the characteristics in the frequency domain can be expressed as Fig.14 shown.
[0134] The main function of a high-pass filter is to allow high-frequency signals to pass through while attenuating low-frequency signals. The filter characteristics mainly include amplitude characteristics and phase characteristics. The amplitude characteristics describe the degree of attenuation or amplification of the filter for signals of different frequencies, while the phase characteristics describe the phase shift produced by the filter for signals of different frequencies. Fig.13 is the amplitude response diagram, Fig.14 This is the phase response diagram.
[0135] Step S10034, normalizing the respiratory depth and respiratory rate of each respiratory cycle after filtering.
[0136] Step S10035, based on the normalized breathing depth and breathing rate of each breathing cycle, feature extraction is performed in the time domain, frequency domain and nonlinear directions to obtain multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features.
[0137] Specifically, after obtaining the filtered breathing depth and breathing rate, the filtered breathing depth and breathing rate are normalized within the range of -1 to 1, and then based on the normalized results, feature extraction is performed in the time domain, frequency domain and nonlinear directions to obtain multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features. The time scales of the initial time domain features, initial frequency domain features and initial non-phenomenal features are inconsistent.
[0138] Exemplarily, the duration of the time window for extracting time domain features and the time window for extracting frequency domain features are set by the designer. For example, the duration of the time window for extracting time domain features may be 30 seconds, and the duration of the time window for extracting frequency domain features may be 5 minutes.
[0139] Among them, the time domain features may include mean, variance (std), ratio of mean to variance (Rms), median to upper and lower quartile difference ratio (R), the median to upper and lower quartile difference ratio may be determined by the following formula (5), and the upper and lower quartile difference may be determined by the following formula (6).
[0140]
[0141] IQR=Q 3 -Q 1 (6)
[0142] Among them, R represents the ratio of the median to the upper and lower quartiles, Q 2 represents the median, IQR represents the upper and lower quartile range, Q 3 represents the upper quartile, Q 1 Indicates the lower quartile.
[0143] Exemplarily, the trends of multiple initial time domain features corresponding to the breathing depth can be as follows: Fig.15 As shown in Figure 2, the trends of multiple initial time domain features corresponding to the respiratory rate can be shown as Fig.16 As shown, Fig.15 and Fig.16 The horizontal axis represents time, with the unit of 30s, and the vertical axis represents the characteristic quantities, from top to bottom, namely the mean, variance, the ratio of the mean to the variance, and the ratio of the median to the upper and lower quartiles.
[0144] The frequency domain features may include the first frequency band energy and E 1 , the second band energy and E 2 , the third band energy and E 3 , the fourth band energy and E 4 And the ratio R of the energy sum of the third frequency band to the energy sum of the second frequency band E3E2 , wherein the first frequency band is 10mHZ to 40mHZ, the second frequency band is 40mHZ to 150mHZ, the third frequency band is 150mHZ to 250mHZ, and the fourth frequency band is 10mHZ to 250mHZ.
[0145] That is, the first frequency band can be [10mHZ, 40mHZ], and the first frequency band includes 10mHZ and 40mHZ; the second frequency band can be [40mHZ, 150mHZ], and the second frequency band includes 40mHZ and 150mHZ; the third frequency band can be [150mHZ, 250mHZ], and the third frequency band includes 150mHZ and 250mHZ; the fourth frequency band can be [10mHZ, 250mHZ], and the fourth frequency band includes 10mHZ and 250mHZ.
[0146] Exemplarily, the band energy sum can be determined by the following formula (7).
[0147]
[0148] In formula (7), E represents the frequency band energy, X(f) represents the frequency spectrum of the signal, f1 represents the lower frequency limit, and f2 represents the upper frequency limit.
[0149] Exemplarily, the trends of the multiple initial frequency domain features corresponding to the breathing depth can be as follows: Fig.17 As shown in Figure 2, the trends of multiple initial frequency domain features corresponding to the respiratory rate can be shown as Fig.18 As shown, Fig.17 and Fig.18 The horizontal axis represents time, the unit is 5 minutes, and the vertical axis represents each characteristic quantity, from top to bottom are the energy sum of the first frequency band, the energy sum of the second frequency band, the energy sum of the third frequency band, the energy sum of the fourth band, and the ratio of the energy sum of the third band to the energy sum of the second band.
[0150] The nonlinear feature can be an approximate entropy value, which can quantify the regularity and unpredictability of the time series. The higher the entropy value, the more complex the signal and the more irregular the change. For example, the time window can be 5 minutes, the embedding dimension can be 3, and the similarity tolerance can be 0.1. The approximate entropy value corresponding to the breathing depth and the approximate entropy value ApEn corresponding to the breathing rate can be determined by the following formula (8).
[0151]
[0152] In formula (8), m represents the embedding dimension, r represents the similarity tolerance, and N represents the length of the time series. represents the intermediate variable, represents the number of data points similar to the i-th data point under a given embedding dimension m and similarity tolerance r.
[0153] For example, the trend of the initial nonlinear characteristic corresponding to the breathing depth can be as follows: Fig.19 As shown, the trend of the initial nonlinear characteristics corresponding to the respiratory rate can be expressed as Fig. 20 As shown, Fig.19 and Fig. 20The horizontal axis represents time, the unit is 5 minutes, and the vertical axis represents the approximate entropy value.
[0154] Step S10036, normalizing the multiple initial time domain features, the multiple initial frequency domain features, and the multiple initial nonlinear features.
[0155] Optionally, the features to be input into the trained machine learning model also include Figure 2 The wakefulness features in the illustrated embodiment, at this time, the number of features to be input into the trained machine learning model is 21, including 8 time domain features of breathing depth and breathing rate, 10 frequency domain features, 2 nonlinear features and 1 wakefulness feature.
[0156] Step S10037, converting the normalized multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features into time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods through the nearest neighbor interpolation method.
[0157] Specifically, after determining a plurality of initial time domain features, a plurality of initial frequency domain features, and a plurality of initial nonlinear features, the plurality of initial time domain features, the plurality of initial frequency domain features, and the plurality of initial nonlinear features are normalized within a range of -1 to 1. At the same time, since the time windows of the initial time domain features, the initial frequency domain features, the initial nonlinear features, and the awake features are different, and the training feature matrices need to be of equal length, it is necessary to unify the time windows of the initial time domain features, the initial frequency domain features, the initial nonlinear features, and the awake features.
[0158] Exemplarily, after normalization, the 21 normalized features are interpolated into a feature matrix with the second time period (such as 1 minute) as the unit through the nearest neighbor interpolation method, that is, the time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods and the wakefulness features of multiple second time periods are obtained.
[0159] For example, 8 hours of sleep data can be divided into a feature matrix with 480 rows and 21 columns of feature quantities. It should be noted that the segmentation unit (i.e., the second time period) needs to comprehensively consider the calculation time of each feature, the actual change time of the sleep state, the time accuracy of the sleep state division, etc. When 1 minute is used as the training matrix time unit, the minimum sleep state judgment time unit of the training result is also 1 minute, which can be changed to 30 seconds or other time lengths according to other application situations.
[0160] Specifically, the time domain features include the mean, variance, ratio of the mean to the variance, median and upper and lower quartile ratio of the breathing depth in the second time period, and the time domain features also include the mean, variance, ratio of the mean to the variance, median and upper and lower quartile ratio of the respiratory rate in the second time period; the nonlinear features include the approximate entropy value of the breathing depth and the approximate entropy value of the breathing rate; the frequency domain features include the first-band energy sum, the second-band energy sum, the third-band energy sum, the fourth-band energy sum and the ratio of the third-band energy sum to the second-band energy sum of the breathing depth in the second time period, and the frequency domain features also include the first-band energy sum, the second-band energy sum, the third-band energy sum, the fourth-band energy sum and the ratio of the third-band energy sum to the second-band energy sum of the respiratory rate in the second time period.
[0161] Step S1004, determining the user's sleep state in each second time period based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0162] Specifically, the four sleep states can be represented by numbers 0 to 3, where wakefulness can be 0, light sleep can be 1, deep sleep can be 2, and rapid eye movement stage can be 3.
[0163] After inputting the 21 features into the trained machine learning model, the sleep state can be determined based on the output of the trained machine learning model. For example, if the output of the trained machine learning model is the number 1, it means that the user's state in the current second time period is light sleep; if the output of the trained machine learning model is the number 3, it means that the user's state in the current second time period is the rapid eye movement stage.
[0164] In this embodiment, after determining the respiratory depth and respiratory rate of each respiratory cycle, the respiratory depth and respiratory rate of the respiratory cycle are subjected to discrete-time Fourier transform, filtering and normalization, and then feature extraction is performed. The extracted features are normalized and subjected to nearest neighbor interpolation processing to obtain time domain features, frequency domain features and nonlinear features corresponding to the respiratory depth and respiratory rate in multiple second time periods, which can improve the accuracy of the determined multiple features, thereby further improving the accuracy of the predicted sleep state.
[0165] This embodiment also provides a breathing parameter control method, which can be used in a control device of a breathing device, such as a processor, Fig.21 is a flow chart of a breathing parameter control method according to an embodiment of the present invention. Fig.21 As shown, the method comprises the following steps:
[0166] Step S2101, obtaining the airflow rate signal of the user in the first time period.
[0167] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0168] Step S2102, determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period.
[0169] For details, please see Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0170] Step S2103, processing the breathing depth and breathing rate of each breathing cycle, and determining the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0171] For details, please see Fig.10 Step S1003 of the illustrated embodiment will not be described in detail here.
[0172] Step S2104, determining the user's sleep state in each second time period based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods.
[0173] For details, please see Figure 1 Step S104 of the embodiment shown, Figure 2 Step S205 of the embodiment shown or Fig.10 Step S1004 of the illustrated embodiment will not be described in detail here.
[0174] Step S2105: determining the user's sleep score based on the evaluation parameters.
[0175] Exemplarily, the above step S2105 includes step a1 and step a2:
[0176] Step a1: determining a score corresponding to at least one evaluation parameter based on a comparison score table and the sleep state of each second time period to obtain at least one score.
[0177] Among them, at least one score corresponds to at least one evaluation parameter, and the evaluation parameter can be sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio or sleep efficiency. The comparison score table is used to characterize the correspondence between different evaluation parameters and sleep scores. The comparison score table can be shown in Table 1 above.
[0178] Specifically, through the above Table 1 and the sleep status of each second time period, the score corresponding to each evaluation parameter can be determined. For example, the score corresponding to the evaluation parameter of sleep parameter can be 20 points, the score corresponding to the evaluation parameter of sleep duration can be 10 points, the score corresponding to the evaluation parameter of breathing disorder index can be 10 points, and so on.
[0179] Step a2: determining a sleep score of the user based on at least one score.
[0180] Exemplarily, when the number of scores is one, the score can be directly used as the user's sleep score, or the product of the score and a preset weight coefficient can be used as the user's sleep score; when the number of scores is multiple, the set of multiple scores can be used as the user's sleep score, or the set of products of each score and the corresponding preset weight coefficient can be used as the user's sleep score.
[0181] For example, the number of scores is 2, namely C and D, the preset weight coefficient corresponding to C is 0.7, and the preset weight coefficient corresponding to D is 0.3. At this time, the sleep score = {0.7C, 0.3D}.
[0182] Specifically, the preset weight coefficient corresponding to each evaluation parameter can be determined by the designer based on the importance of the evaluation parameter to sleep quality. The value of the preset weight coefficient can be between 0 and 1. The sum of the preset weight coefficients corresponding to each evaluation parameter is 1. The more evaluation parameters there are, the more objectively and accurately the sleep score can represent the user's sleep quality.
[0183] Step S2106, adjusting the respiratory parameters of the respiratory device within a safe range according to the sleep score.
[0184] Among them, the breathing parameters include delayed boost time and pressure, and the safety range is the allowable range of breathing parameters set by medical staff based on the user's sleep conditions.
[0185] Specifically, after determining the sleep score, the control device of the respiratory device can automatically and specifically adjust the respiratory parameters within a safe range based on the sleep score.
[0186] Exemplarily, the above step S2106 may specifically be: when the sleep score is less than a preset score, adjusting the first delayed pressure rise time to the second delayed pressure rise time and / or adjusting the first pressure to the second pressure.
[0187] The second delayed pressure rise time and the second pressure are within a safe range, the first delayed pressure rise time is the delayed pressure rise time of the respiratory device when it is currently used, the second delayed pressure rise time is the delayed pressure rise time required for the respiratory device when it is used next time, the second delayed pressure rise time is greater than the first delayed pressure rise time, the first pressure is the pressure of the respiratory device when it is currently used, the second pressure is the pressure required for the respiratory device when it is used next time, and the second pressure is greater than the first pressure. The preset score can be determined by medical staff based on experience and configured in advance in the control device of the respiratory device.
[0188] For example, when the sleep time (WT) score is lower than 10 points, if the delayed boost is not turned on, the delayed boost will be turned on; if the delayed boost is turned on, the delayed boost time can be extended to 30 minutes. When the user's sleep time improves in the future, the delayed boost time will be gradually adjusted to the average of the sleep time in the last three days.
[0189] If the respiratory disturbance index (RDI) score is lower than 10 points, that is, the user has more pauses and hypopnea events, the airflow limitation boost threshold can be lowered to half of the original value. Moreover, if the pressure is close to the maximum treatment pressure, the minimum treatment pressure and the maximum treatment pressure can be increased by 2 cmH2O at the same time within the safety range. This idea is continued until the index is no less than 10 points or the parameter adjustment limit is reached.
[0190] Optionally, after determining the sleep state of each second time period, the control device of the respiratory equipment can also determine the Rapid Eye Movement-Apnea-Hypopnea Index (REM-AHI) during sleep, that is, the ratio of the sum of apnea and hypopnea events occurring in the rapid eye movement stage (R) to the duration of the rapid eye movement stage (R).
[0191] Specifically, the REM-AHI index can be used as a key indicator to evaluate apnea events during REM sleep. It is of great significance in assisting medical staff to identify REM breathing disorders, predict cardiovascular and mental health risks, and provide personalized treatment. When clinically diagnosing and managing OSA patients, REM-AHI can provide medical staff with a more detailed basis for the evaluation of breathing disorders.
[0192] In this embodiment, not only can the sleep effect be evaluated without adding too much additional hardware or changing the sleeping environment, but the relationship between breathing patterns and different sleep states can also be revealed. Automatic breathing parameters can be further adjusted based on daily sleep state feedback, which helps to improve the user's sleep and ultimately improve the user's overall health level.
[0193] In this embodiment, a breathing device is also provided, such as Fig. 22As shown, the breathing apparatus includes a gas delivery assembly 2210 and a control device 2220 connected to the gas delivery assembly, and the gas delivery assembly 2210 is used to deliver gas to the user.
[0194] The control device 2220 is used to obtain the airflow rate signal of the user in the first time period, and is also used to determine the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period; the control device is also used to process the breathing depth and breathing rate of each breathing cycle, and determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the first time period includes multiple second time periods; the control device is also used to determine the user's sleep state in each second time period based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the sleep state includes awake, light sleep, deep sleep and rapid eye movement stage. That is, the control device of the respiratory device is used to execute the method provided by any of the above embodiments.
[0195] The gas delivery component may be the same as the gas delivery component in conventional breathing devices in the art.
[0196] Specifically, the gas delivery component includes an air pump, a user interface module (such as a mask or a nasal pillow, etc.) and a gas output pipe. One end of the gas output pipe is connected to the air pump, and the other end is connected to the user interface module. The air pump is used to generate and deliver gas, and can pressurize and deliver gases such as air or oxygen to the user's respiratory tract according to set parameters such as pressure, flow and frequency.
[0197] Exemplarily, the respiratory device further includes sensors, including but not limited to pressure sensors and flow sensors.
[0198] In some optional embodiments, the control device is also used to determine the user's sleep score based on evaluation parameters, and to adjust the breathing parameters of the gas delivery component within a safe range according to the sleep score, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, breathing disorder index, deep sleep ratio and sleep efficiency, and the breathing parameters include delayed pressurization time and pressure.
[0199] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0200] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0201] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0202] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the present invention.
Claims
1. A sleep monitoring method, characterized in that: The method comprises: Acquire an airflow rate signal of the user in a first time period; Determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period; Processing the breathing depth and breathing rate of each of the breathing cycles to determine time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in a plurality of second time periods, wherein the first time period includes the plurality of second time periods; Based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in the multiple second time periods, the sleep state of the user in each of the second time periods is determined, wherein the sleep state includes wakefulness, light sleep, deep sleep and rapid eye movement stages.
2. The method according to claim 1, characterized in that Determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal in the first time period includes: Based on the airflow rate signal in the first time period, determining the initial breathing depth and initial breathing rate of each breathing cycle by a multi-scale extreme value detection method; The initial breathing depth and initial breathing rate of each exhalation cycle are converted into the breathing depth and breathing rate of each respiratory cycle by the nearest neighbor interpolation method.
3. The method according to claim 1, characterized in that The time domain features include the mean, variance, ratio of the mean to the variance, median, and upper and lower quartile ratio of the breathing depth in the second time period, and the time domain features also include the mean, variance, ratio of the mean to the variance, median, and upper and lower quartile ratio of the breathing rate in the second time period; The nonlinear characteristics include an approximate entropy value of the breathing depth and an approximate entropy value of the breathing rate; The frequency domain features include the first frequency band energy sum, the second frequency band energy sum, the third frequency band energy sum, the fourth frequency band energy sum and the ratio of the third frequency band energy sum to the second frequency band energy sum of the breathing depth in the second time period, and the frequency domain features also include the first frequency band energy sum, the second frequency band energy sum, the third frequency band energy sum, the fourth frequency band energy sum and the ratio of the third frequency band energy sum to the second frequency band energy sum of the breathing rate in the second time period, wherein the first frequency band is 10mHZ to 40mHZ, the second frequency band is 40mHZ to 150mHZ, the third frequency band is 150mHZ to 250mHZ, and the fourth frequency band is 10mHZ to 250mHZ.
4. The method according to claim 3, characterized in that The step of processing the breathing depth and breathing rate of each breathing cycle to determine the time domain features, frequency domain features and nonlinear features corresponding to the breathing depth and breathing rate in multiple second time periods includes: Performing discrete-time Fourier transform on the breathing depth and breathing rate of each breathing cycle to obtain spectrum data of the breathing depth and spectrum data of the breathing rate; Determine a target frequency based on the spectrum data of the breathing depth and the spectrum data of the breathing rate, wherein the target frequency is the frequency of the noise signal; Performing filtering processing on the breathing depth and breathing rate of each breathing cycle to filter out the noise signal of the target frequency; Normalizing the breathing depth and breathing rate of each respiratory cycle after filtering; Based on the normalized breathing depth and breathing rate of each breathing cycle, feature extraction is performed in the time domain, frequency domain and nonlinear directions to obtain a plurality of initial time domain features, a plurality of initial frequency domain features and a plurality of initial nonlinear features; Normalizing the multiple initial time domain features, the multiple initial frequency domain features, and the multiple initial nonlinear features; The normalized multiple initial time domain features, multiple initial frequency domain features and multiple initial nonlinear features are converted into time domain features, frequency domain features and nonlinear features corresponding to the respiratory depth and respiratory rate in multiple second time periods through the nearest neighbor interpolation method.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Determine a wakefulness feature according to the respiratory pressure signal, wherein the wakefulness feature is used to indicate whether the user is in a wakefulness stage; The determining the sleep state of the user in each of the second time periods based on the trained machine learning model and the time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and the breathing rate in the plurality of second time periods includes: Based on the trained machine learning model, the wakefulness characteristics, and the time domain characteristics, frequency domain characteristics, and nonlinear characteristics corresponding to the breathing depth and breathing rate in the multiple second time periods, the sleep state of the user in each of the second time periods is determined.
6. The method according to any one of claims 1 to 4, characterized in that The trained machine learning model is a random forest algorithm model.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Based on the evaluation parameters, a sleep score of the user is determined, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio and sleep efficiency.
8. A breathing parameter control method, characterized in that: The method comprises: Acquire an airflow rate signal of the user in a first time period; Determining the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal of the first time period; Processing the breathing depth and breathing rate of each of the breathing cycles to determine time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in a plurality of second time periods, wherein the first time period includes the plurality of second time periods; Determine the sleep state of the user in each of the second time periods based on the trained machine learning model and the time domain features, frequency domain features, and nonlinear features corresponding to the breathing depth and breathing rate in the plurality of second time periods, wherein the sleep state includes wakefulness, light sleep, deep sleep, and rapid eye movement stages; Determining a sleep score of the user based on evaluation parameters, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, respiratory disorder index, deep sleep ratio, and sleep efficiency; According to the sleep score, the respiratory parameters of the respiratory device are adjusted within a safe range, wherein the respiratory parameters include delayed boost time and pressure.
9. The method according to claim 8, characterized in that The step of determining the sleep score of the user based on the evaluation parameters includes: Determine a score corresponding to at least one evaluation parameter based on the reference score table and the user's sleep state in each of the second time periods to obtain at least one score; Based on the at least one score, a sleep score of the user is determined.
10. The method according to claim 8, characterized in that The step of adjusting the respiratory parameters of the respiratory device within a safe range according to the sleep score includes: When the sleep score is less than a preset score, the first delayed rise time is adjusted to a second delayed rise time and / or the first pressure is adjusted to a second pressure, wherein the second delayed rise time and the second pressure are within the safety range, the first delayed rise time is the delayed rise time of the respiratory device when it is currently used, the second delayed rise time is the delayed rise time required for the respiratory device when it is used next time, the second delayed rise time is greater than the first delayed rise time, the first pressure is the pressure of the respiratory device when it is currently used, the second pressure is the pressure required for the respiratory device when it is used next time, and the second pressure is greater than the first pressure.
11. A breathing apparatus, characterized in that The breathing apparatus comprises a gas delivery assembly and a control device connected to the gas delivery assembly, wherein the gas delivery assembly is used to deliver gas to a user; The control device is used to obtain the airflow rate signal of the user in the first time period; The control device is further used to determine the breathing depth and breathing rate of each breathing cycle according to the airflow rate signal in the first time period; The control device is further used to process the breathing depth and breathing rate of each of the breathing cycles to determine the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in multiple second time periods, wherein the first time period includes the multiple second time periods; The control device is also used to determine the sleep state of the user in each of the second time periods based on the trained machine learning model and the time domain characteristics, frequency domain characteristics and nonlinear characteristics corresponding to the breathing depth and breathing rate in the multiple second time periods, wherein the sleep state includes wakefulness, light sleep, deep sleep and rapid eye movement stages.
12. The breathing apparatus according to claim 11, characterized in that The control device is also used to determine the user's sleep score based on evaluation parameters, and to adjust the breathing parameters of the gas delivery component within a safe range according to the sleep score, wherein the evaluation parameters include at least one of sleep duration, sleep onset duration, breathing disorder index, deep sleep ratio and sleep efficiency, and the breathing parameters include delayed boost time and pressure.
Citation Information
Cited By
Method and device for constructing lung function characteristics during sleep
CN120345883A
Method and device for constructing lung function characteristics during sleep
CN120345883B