Snoring prediction method based on pulse wave physiological indexes in a wake state
By collecting and processing pulse wave signals using a pulse wave signal measurement sensor while the user is awake, and building a classifier, a simple, low-cost, and privacy-preserving snoring prediction method is achieved. This solves the problems of expensive equipment and sleep state detection, and has a high accuracy rate.
Patent Information
- Application Number
- CN202510426567.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-04-07
AI Technical Summary
Existing snoring detection methods require expensive, large-scale equipment and professional guidance, and are difficult to conduct in non-laboratory environments. Furthermore, detection during sleep infringes on privacy and is difficult for the public to accept.
Using physiological indicators of pulse waves based on the awake state, pulse wave signals are collected by a pulse wave signal measurement sensor, and then denoised, feature extracted, and classifier trained to predict whether snoring will occur at night.
This method provides a simple, low-cost snoring prediction method that does not require nighttime detection, has a high prediction accuracy, protects user privacy, and is easily accepted by the general public.
Smart Images

Figure CN120130993B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information processing technology, specifically relating to a method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state. Background Technology
[0002] Snoring is a common sleep problem, a symptom of obstructed breathing during sleep. Current snoring detection methods primarily involve two approaches: direct observation through recording audio during nighttime sleep, and polysomnography (PSG) analysis during sleep. Audio recording requires sophisticated equipment and placement; it also requires the person to be still and facing the microphone, making it difficult to achieve outside of a laboratory setting. Furthermore, various noises can interfere with snoring detection, leading to misinterpretations. PSG-based snoring detection requires expensive, large-scale equipment and must be conducted under the guidance of a professional physician. Both methods require sleep, which is considered a private matter and therefore difficult for the general public to accept. Summary of the Invention
[0003] The main objective of this invention is to overcome the shortcomings and deficiencies of existing snoring detection technologies and provide a method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state. This method features simple and inexpensive detection equipment, an intuitive data sampling process, and eliminates the need for nighttime testing. It also boasts high prediction accuracy and is an objective, simple method that effectively protects user privacy, eliminates the need for nighttime testing, and is more readily accepted by the public.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state is proposed to improve upon the problems of traditional snoring measurement methods, which involve expensive and complex equipment and require detection during sleep, making them unacceptable. The method includes the following steps:
[0006] S1. Construct a test scenario. The test equipment consists of a pulse wave signal measurement sensor and a supporting host system. Data collection is conducted on non-single-living subjects. Subjects press their index fingers on the sensor. The entire test process includes five steps: sitting quietly, natural breathing, mouth breathing, left nasal breathing, and right nasal breathing; pulse wave signals are recorded during these steps. Simultaneously, subjects are required to have their roommates listen in during their sleep that night to determine if they snored, and to inquire the following day whether they snored. The samples used as training set labels for supervised learning are then collected.
[0007] S2. For each pulse wave signal acquired from S1, noise is removed. A smooth pulse wave signal is obtained by using a low-pass filter to remove high-frequency noise. Then, the baseline-removed pulse wave signal is obtained by using a cubic spline difference baseline removal method. Finally, the period validity is evaluated to remove the signal period with poor signal quality and obtain a high-quality pulse wave signal.
[0008] S3. For high-quality pulse wave signals, extract pulse wave periodic feature points, including the steepest rise point, starting point, and peak point. Based on these periodic feature points, extract physiological characteristic data from the subjects in this experiment, including heart rate (HR), heart rate variability (HRV), blood oxygen saturation (SpO2), and pulse wave morphological index (MI). Based on the smoothed pulse wave signal, perform frequency domain analysis to obtain the respiratory rate (RR). Using the pulse wave characteristics under natural breathing as the standard value, subtract the values for mouth breathing and nasal breathing respectively to obtain the physiological characteristic sequence.
[0009] S4. Using the physiological characteristic sequence of the subject when awake as input features and whether or not the subject snores during sleep at night as sample labels, construct a training set.
[0010] S5. Train the classifier using the training set obtained in step S4.
[0011] S6. For new users who do not know whether they snore, repeat steps S1 to S3 to obtain user data while they are awake. Unlike the subjects, users are no longer required to know whether they snore at night. Input the user data into the classifier to predict whether they snore during sleep.
[0012] Furthermore, step S1 is performed as follows:
[0013] S101. Construct a test scenario. Under suitable temperature and ventilation conditions, find non-single-living subjects to collect data. Subjects press their fingers on the pulse wave signal sensor and sit with their backs against the chair. The requirements for temperature and ventilation in this step are to ensure that the temperature and air environment will not interfere with the subject's experiment. The non-single-living condition ensures that when the subject is sleeping at night, there is someone living with them to observe whether they snore.
[0014] S102. Have the subject sit still for a duration of T1 to allow the subject to calm down and become familiar with the testing environment, thus avoiding interference with physiological signals due to the testing environment. This step ensures that physiological signals will not be interfered with due to the subject's unfamiliarity with the environment.
[0015] S103, the interval T2 allows the fingers to fully relax. Since the subject's fingers need to be pressed against the pulse wave sensor during data acquisition, this pressure can affect blood flow and cause discomfort. Therefore, a relaxation time T2 is designed to ensure the subject's fingers are fully relaxed before proceeding with the subsequent experimental procedures. After the fingers are fully relaxed, the subject breathes naturally, and pulse wave data is collected using the pulse wave sensor as the baseline signal s. raw (0), lasting T1.
[0016] After the fingers were fully relaxed at interval T2 (S104), the subject breathed only through the mouth, and pulse wave data was collected to obtain the pulse wave signal s. raw (1) Used to assess oral ventilation, sustained for T1, pulse wave signal s obtained in this step raw (1) Physiological indicators of pulse waves will be used to obtain assessment indicators of oral breathing ability.
[0017] After S105 and an interval T2 to allow the fingers to fully relax, the subject breathed only through the left nasal cavity, and pulse wave data was collected to obtain the pulse wave signal s. raw (2) This step is used to assess the ventilation of a single nasal cavity for a duration of T1. The pulse wave signal s obtained in this step is... raw (2) Physiological indicators of pulse waves will be used to obtain an assessment of the ability of the left nasal cavity to breathe.
[0018] S106. After the fingers were fully relaxed at the interval T2, the subject breathed only through the right nasal cavity, and pulse wave data was collected to obtain the pulse wave signal s. raw (3) This step is used to assess the ventilation of a single nasal cavity for a duration of T1. The pulse wave signal s obtained in this step is... raw (3) The physiological indicators used to extract pulse waves will be used to obtain the assessment indicators of the ability to breathe through the right nasal cavity.
[0019] The pulse wave signals obtained from the four processes are denoted as s raw (n), n=0,1,2,3, corresponding to the four states of natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively.
[0020] S107. The subject is required to have their roommate listen to them while they are sleeping that night and ask them the next day if they are snoring. The result is obtained by the roommate through actual observation while the subject is sleeping and is used as the training set sample label Label for the classifier, where Label∈{0,1}.
[0021] Furthermore, step S2 is as follows:
[0022] S201. Based on the effective frequency range of the pulse wave, perform low-pass filtering on each segment of the pulse wave signal. The effective range of the pulse wave signal is 0 to 10 Hz, therefore, use a 10 Hz low-pass filter to remove high-frequency noise and obtain a smooth pulse wave signal s. smooth (n), n=0,1,2,3, This step performs low-pass filtering to reduce noise in the pulse wave signal, providing a smooth pulse wave signal for the subsequent extraction of the period start point of the pulse wave signal.
[0023] S202. Extract the starting point of each cycle of the signal. Use the local maximum extraction method to extract the starting point of each cycle. Based on the starting point, truncate the beginning and end of each signal segment to avoid incomplete cycles that occurred during sampling.
[0024] The starting point is obtained by calculating the local maximum point of the smoothed pulse wave signal. For the starting point O of the i-th cycle... i , there is s smooth [O i ]>s smooth [O i -d], Where M represents the number of sampling points within 1 second. Due to the characteristics of signal sampling, multiple points may have equal values at local maxima. Therefore, in the calculation of the starting point, if there are multiple adjacent local maxima points, the local maxima point in the middle will be temporarily incremented by one to ensure that there are no multiple local maxima points with equal values during the calculation. The calculated local maxima point is the starting point O of each cycle. i The first and last cycles of the pulse wave signal are removed, as these cycles are often incomplete. After this process, the number of remaining cycles is K. In this step, the local maxima in the middle are temporarily incremented by one to avoid interference from multiple equal local maxima in the extraction of the starting point. The resulting cycle starting point will be used for cubic spline interpolation fitting calculations to remove the baseline of the pulse wave signal.
[0025] S203. Further, using the starting point of each cycle of the smoothed pulse wave as the base point, cubic spline interpolation is used to fit the signal, and the difference between the signals is calculated to obtain the baseline-free pulse wave signal. For a pulse wave signal with K cycles, cubic spline interpolation function fitting is performed.
[0026] The theory of cubic spline interpolation is as follows: For a general signal y[n], given the base points (n0, y0), (n1, y1), ..., (n... N ,y N The length of its segmented interval is:
[0027] h p =xp+1 -x p p = 0, 1, ..., N-1
[0028] The fitting function for each segment is:
[0029]
[0030] For p = 1, 2, ..., N-1, there are restrictions:
[0031]
[0032] And there are natural boundary conditions: c0=0, c N =0
[0033] After obtaining c, the coefficients are calculated.
[0034] a p =y p
[0035]
[0036] Based on the above algorithm, the starting point (O) of each cycle is... i ,s smooth [O i ]), and the end of the last cycle (O K ,s smooth [O K Using the base points of the cubic spline interpolation as the basis for fitting calculations, the cubic interpolation fitting function can be obtained. Based on this, signal baseline removal is performed, resulting in:
[0037]
[0038] In actual calculations, cubic spline interpolation is also applied to the end point of the last cycle to remove the baseline of the last cycle. This step removes the baseline of the pulse wave signal, ensuring that subsequent evaluation of the pulse wave signal cycle validity and feature extraction are not interfered with by the baseline data.
[0039] S204. Evaluate the period validity of each signal period after baseline removal, including skewness calculation and Pearson coefficient calculation. Discard signal periods that do not meet the requirements for Pearson coefficient and skewness to obtain a high-quality pulse wave signal s. qualified .
[0040] Specifically, based on the starting point O of the i-th cycle of the pulse wave signal i For signal s, i = 0, 1, ..., K-1, i = 0, 1, ..., K-1 smoothThe pulse wave signal is divided into K segments by period to obtain a single-cycle pulse wave signal, where the i-th cycle pulse wave signal is denoted as S. i ,i=0,1,...,K-1.
[0041] For periodic segment S i Perform skewness calculation, specifically, for S i Normalizing the periodic sum yields Y i At this time, Y i It is a sequence with a period and a sum of 1. We treat it as a probability distribution and calculate its skewness:
[0042]
[0043] Where μ and σ are respectively Y i The expected value and variance are set, and the skewness threshold is set to θ. s , where θ s The average skewness of all pulse waves is used; the pulse wave signal can be considered a right-skewed signal. The setting is... At that time, the periodic segment S i It has been reserved.
[0044] For each single-cycle pulse wave signal segment after skewness filtering, the effective signal ratio is relatively high, but some invalid signals still exist. Therefore, it is necessary to calculate the Pearson correlation coefficient between adjacent cycles. However, because the length of each pulse wave cycle varies, the number of sampling points in each segmented cycle is inconsistent, making it impossible to directly calculate the Pearson correlation coefficient between adjacent cycles. Therefore, cubic spline interpolation is required for the segmented adjacent cycles to obtain a signal X with the same number of sampling points. i and X i+1 The number of points is M, and then the Pearson coefficient is calculated:
[0045]
[0046] Set the threshold for the Pearson coefficient to θ. p When P i >θ p At that time, the periodic segment S i It has been reserved.
[0047] This step is used to extract high-quality pulse wave signal cycles from the baseline-removed pulse wave signal, providing high-quality pulse wave signals for subsequent pulse wave feature points and feature extraction, and ensuring the effectiveness of the extracted feature points and features.
[0048] Furthermore, step S3 is as follows:
[0049] S301. For high-quality pulse wave signals after removing periods with poor signal quality, pulse wave period feature points are extracted. These feature points include the steepest rise point, the starting point, and the peak point. The steepest rise point is obtained by calculating the maximum value of the differential signal within each period, and the peak point is obtained by finding the first differential zero point backward from the steepest rise point. The pulse wave period feature points calculated in this step will be used for subsequent calculations of pulse wave morphology features, heart rate variability, and heart rate.
[0050] S302. Based on pulse wave periodic feature points, calculate heart rate, heart rate variability, and pulse wave morphological features; based on smoothed pulse wave signals, use frequency domain analysis to select the frequency value where the frequency domain peak point is located as the respiratory rate; heart rate, heart rate variability, pulse wave morphological features, and respiratory rate together constitute the pulse wave feature sequence. Finally, ppg_feature(n) = {HR(n), HRV(n), SpO2(n), MI(n), RR(n)}, n = 0, 1, 2, 3, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nasal cavity, and breathing only through the right nasal cavity. The pulse wave feature sequences calculated in this step for the four states will be used as the standard value to construct the left nasal cavity feature difference sequence, right nasal cavity feature difference sequence, and oral cavity feature difference sequence, respectively.
[0051] S303. For the obtained pulse wave feature sequences ppg_feature(n) of the four stages, n=0,1,2,3, using the pulse wave feature sequence ppg_feature(0) under natural breathing as the standard value, the difference between the left nasal cavity pulse wave feature sequence and the natural breathing pulse wave feature sequence is used to obtain the left nasal cavity feature difference sequence Bias. L The right nasal cavity feature difference sequence Bias is obtained by subtracting the right nasal cavity pulse wave feature sequence from the pulse wave feature sequence of natural breathing. R ;
[0052] Bias L =ppg_feature(2)-ppg_feature(0)
[0053] Bias R =ppg_feature(3)-ppg_feature(0)
[0054] Bias of left nasal cavity feature difference sequence L Bias of right nasal cavity feature difference sequence R The feature difference sequence Bias is formed by taking the largest absolute value of each feature difference. NThis construction method can obtain the maximum difference between nasal breathing and natural breathing through this feature sequence when the degree of obstruction in the left and right nasal cavities is different. Specifically, the sequence bias N The e-th element is:
[0055]
[0056] Using the pulse wave feature sequence under oral breathing, the difference between the natural breathing pulse wave feature sequence and the oral feature difference sequence is used to obtain the Bias sequence. M .
[0057] Bias M =ppg_feature(1)-ppg_feature(0)
[0058] In this step, the left nasal cavity feature difference sequence Bias L Bias of right nasal cavity feature difference sequence R Oral feature difference sequence Bias M All results were obtained by subtracting the corresponding feature sequence from the natural breathing pulse wave feature sequence. The aim was to remove individual differences in pulse wave characteristics caused by other physiological factors unrelated to snoring. The single-nose feature difference sequence was then compared. N Oral feature difference sequence Bias M The input features of the samples are concatenated to form the training set, and whether the known subjects snore is used as the sample label to construct the dataset.
[0059] Furthermore, step S4 is as follows:
[0060] S401. For subjects who snore, the sample composition is as follows: Input feature Feature = {Bias} N Bias M}, Sample label Label = {1}, The input features obtained in this step, together with the sample label, constitute the snoring subject sample, which will be used for subsequent construction and training of the classifier.
[0061] S402. For subjects who do not snore, the sample composition is as follows: Input feature Feature = {Bias} N Bias M The sample label is {0}. The input features obtained in this step, together with the sample label, constitute the non-snoring subject sample, which will be used for subsequent construction and training of the classifier.
[0062] Furthermore, step S5 is as follows:
[0063] Using the training set data obtained in step S4, the classification results are validated through K-fold cross-validation to construct a snoring prediction classifier. The purpose of this step is to reduce the risk of model overfitting.
[0064] S501. For the dataset obtained in step S4, feature selection is performed during the actual training process. By selecting features based on the importance of random forest, features with low correlation are eliminated to form the optimal feature data subset.
[0065] S502. Split the optimal feature data subset into a training set and a test set. Use the training set to train the classifier and the test set to test the classifier's performance. This step trains the classifier to obtain a classifier that can be used to predict snoring, and at the same time performs a single performance evaluation of the classifier.
[0066] S503. Repeat step S502 using K-fold cross-validation to obtain the average performance evaluation result of the classifier. In this step, K-fold cross-validation is a commonly used method for verifying classification performance in classification problems. By repeatedly dividing the dataset and retraining and validating, the classifier's performance is comprehensively evaluated, avoiding overestimation or underestimation of the classification effect due to unreasonable dataset partitioning. The classifier that has been evaluated as effective by average performance evaluation can then be applied to users in real-world scenarios.
[0067] Furthermore, step S6 is as follows:
[0068] S601. For new users who are unaware of whether they snore at night, repeat steps S1 to S4. However, unlike the subjects in the dataset collection, the purpose of data collection in this step is to predict whether or not a user snores. Therefore, users are no longer required to know whether or not they snore at night. The user's input feature is obtained as Feature = {Bias}. N Bias M The data collected in this step will serve as input to the already trained classifier, enabling the classifier to predict whether the user snores at night.
[0069] S602. Input the new user's input features into the classifier trained in step S5 to obtain the prediction result of whether the user snores. This step predicts whether the user snores at night based on the user's input features when awake, so that the user can know whether he or she may snore at night while awake.
[0070] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0071] (1) This invention provides a method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state. This method uses a pulse wave sensor to detect pulse wave signal characteristics during four breathing processes: natural breathing during the day, mouth breathing, left nasal breathing, and right nasal breathing, to predict whether snoring will occur at night. The method of detecting snoring through the fingertip using a pulse wave sensor has the advantages of simple and inexpensive equipment and an intuitive data sampling process. The detection process based on the waking state during the day eliminates the need for nighttime detection, while also possessing high prediction accuracy. It is an objective, simple method that effectively protects user privacy, eliminates the need for nighttime detection, and is more easily accepted by the public.
[0072] (2) This invention proposes a skewness-adjacent Pearson coefficient cascade screening method for evaluating the periodic quality of pulse wave signals. Using skewness, a necessary but not sufficient condition for high-quality signals, as a pre-screening step for high-quality signal periods, the proportion of invalid periods in the pulse wave signal to be detected is reduced in advance. This pre-screening effectively reduces the false alarm rate of subsequent period screening based on adjacent period Pearson coefficients. After completing the skewness pre-screening, the signal is further periodically screened using the adjacent period Pearson coefficients, effectively reducing the problem of excessively high false alarm rates associated with skewness screening. By combining the signal period skewness and the adjacent period Pearson coefficients, this method, compared to a single detection method, has the advantages of both lower false alarm and false alarm rates.
[0073] (3) This invention proposes a method for extracting physiological features of different breathing modes to eliminate individual differences. Independent experiments were designed for subjects to breathe naturally, breathe through the left nasal cavity, breathe through the right nasal cavity, and breathe through the mouth. Pulse wave data were collected, and pulse wave feature sequences ppg_feature(n), n=0,1,2,3, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nasal cavity, and breathing only through the right nasal cavity, respectively. Based on this, the pulse wave feature sequence of the subjects' natural breathing was used as a benchmark for subtraction to remove individual differences. In processing the feature difference between the left and right nasal cavities, the data from the left and right nasal cavities were selected based on the "maximum absolute value" to avoid the symmetry of the left and right nasal cavity data features affecting the classifier's performance in predicting snoring. The final single-nasal feature difference sequence Bias was obtained. N Oral feature difference sequence Bias M The concatenation yields the sample input features, Feature = {Bias}, which serve as the training set. N Bias M The input feature is caused only by different breathing patterns, effectively avoiding interference from other physiological reasons of the subject that could affect the classifier's prediction of snoring.
[0074] (4) This invention combines pulse wave features, including heart rate (HR), heart rate variability (HRV), blood oxygen saturation (SpO2), and pulse wave morphology indicators (MI) and respiratory rate (RR), to comprehensively assess whether the subject snores at night. In the actual classifier construction process, for the sample input feature Feature={Bias N Bias M By selecting features with strong correlation to snoring based on the importance of random forest, the optimal feature data subset is formed for classifier training and input into the snoring prediction classifier to predict snoring. Compared with single-indicator detection schemes, this effectively avoids the one-sidedness of single-indicator detection results. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a flowchart of a method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as disclosed in this invention.
[0077] Figure 2 This is a flowchart of the preprocessing of pulse wave signals in Embodiment 1 of the present invention;
[0078] Figure 3 This is a flowchart of obtaining high-quality pulse waves through periodic screening in Embodiment 1 of the present invention;
[0079] Figure 4 This is a flowchart of the sample input feature extraction process in Embodiment 1 of the present invention;
[0080] Figure 5 This is a schematic diagram illustrating the importance of the original dataset to the random forest model in Embodiment 1 of the present invention;
[0081] Figure 6 This is a schematic diagram illustrating the importance of sample features in the optimal feature data subset to the random forest model in Embodiment 1 of the present invention;
[0082] Figure 7 This is a schematic diagram of the pulse wave signal before periodic screening in Embodiment 2 of the present invention;
[0083] Figure 8 This is a schematic diagram of the pulse wave signal after periodic screening in Embodiment 2 of the present invention. Detailed Implementation
[0084] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0085] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0086] Example 1
[0087] This embodiment discloses a method for predicting snoring during sleep using pulse wave physiological indicators in a waking state, such as... Figure 1 As shown, the specific steps are as follows:
[0088] S1. Construct a test scenario. The test equipment consists of a pulse wave signal measurement sensor and a supporting host system. Collect experimental data from non-single-living subjects. Subjects press their index fingers on the sensor. The entire test procedure includes five steps: sitting quietly, natural breathing, mouth breathing, left nasal breathing, and right nasal breathing. Record the pulse wave signals during each of these steps, with each step lasting T1 and followed by a rest interval T2. Simultaneously, subjects are required to have their roommates listen to their sleep that night and inform them whether they snored. The next day, the roommates should also inquire whether the subject snored during the night.
[0089] The pulse wave acquisition sensor specifically uses the MAX30102 sensor, with an onboard HC-05 wireless Bluetooth module, allowing connection to a computer via Bluetooth for data upload. The subject relaxes their left hand, with their index finger hanging naturally and resting against the photoelectric sensor portion of the sensor for data acquisition.
[0090] The minimum sampling time requirement for pulse waves is 120 seconds. Therefore, the recommended pulse wave detection duration T1 for each step in the experimental procedure is 120 seconds, which has been verified to be effective in actual experiments. In this embodiment, the duration T1 for sitting still, natural breathing, mouth breathing, left nasal breathing, and right nasal breathing is 120 seconds, and T2 is 10 seconds. The pulse wave signals obtained for the four steps are denoted as s. raw(n), n=0,1,2,3, corresponding to the four states of natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively.
[0091] S2, for the pulse wave signal s acquired from S1 raw (n), where n = 0, 1, 2, 3, are denoised separately. A low-pass filter to remove high-frequency noise is used to obtain the corresponding smooth pulse wave signal, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nasal cavity, and breathing only through the right nasal cavity. Then, a cubic spline difference baseline removal method is used to obtain the baseline-removed pulse wave signal. Finally, a periodicity evaluation is performed to remove signal periods with poor quality, resulting in a high-quality pulse wave signal. The specific preprocessing steps for the pulse wave signal are as follows: Figure 2 As shown:
[0092] S201. Based on the effective frequency range of the pulse wave, perform low-pass filtering on each segment of the pulse wave signal. The effective range of the pulse wave signal is 0 to 10 Hz, therefore, use a 10 Hz low-pass filter to remove high-frequency noise and obtain a smooth pulse wave signal s. smooth (n), n=0,1,2,3, corresponding to the four states of natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively.
[0093] S202. Extract the starting point of each cycle of the signal. Use the local maximum extraction method to extract the starting point of each cycle. Based on the starting point, truncate the beginning and end of each signal segment to avoid incomplete cycles that occurred during sampling.
[0094] The starting point is obtained as follows: for the starting point O of its i-th cycle... i ,have Where M represents the number of sampling points within 1 second. Due to the characteristics of signal sampling, multiple points may have equal values at local maxima. Therefore, in the starting point calculation process, the intermediate points of multiple equal local maxima are temporarily incremented by one to ensure that there are no multiple equal local maxima during calculation. The calculated local maxima points are the starting points of each cycle. The first and last cycles of the pulse wave signal are removed, as these cycles are often incomplete. After this removal, the number of remaining cycles is K.
[0095] In this embodiment, the sensor's sampling rate is 100Hz, therefore the number of samples per second is 100. Rounding down, the peak value is s. smooth [O i ]>s smooth [O i-d],d∈[-33,33。
[0096] Since the sampling time T1 in this embodiment is 120s, the number of cycles K is calculated according to the general pulse rate in biology, which is K∈[120,200].
[0097] S203. Further, using the starting point of each cycle as the base point, cubic spline interpolation is used to fit the signal, and the difference between the signals is used to obtain the baseline-free pulse wave signal. For a pulse wave signal with K starting points, cubic spline interpolation is performed for fitting. The starting point (O) of each cycle is then used as the base point. i ,s smooth [O i ]), and the end of the last cycle (O K ,s smooth Using [K] as the base point for cubic spline interpolation for fitting calculations yields the cubic spline fitting function. Based on this, signal baseline removal is performed, resulting in:
[0098]
[0099] In this embodiment, cubic spline interpolation fitting is also added to the end point of the last cycle to remove the baseline of the last cycle.
[0100] S204. Evaluate the period validity of each signal period after baseline removal, including Pearson coefficient calculation and skewness calculation. Discard signal periods that do not meet the requirements for Pearson coefficient and skewness to obtain the corresponding high-quality pulse wave signal s. qualified (n), n=0,1,2,3, the specific processing procedure is as follows Figure 3 As shown.
[0101] Specifically, based on the starting point O of the pulse wave signal i For signal s, i = 0, 1, ..., K-1, i = 0, 1, ..., K-1 smooth The pulse wave signal is divided into K segments by period, where the i-th pulse wave signal is denoted as S. i ,i=0,1,...,K-1.
[0102] For the periodic segment S i Perform skewness calculation and set the skewness threshold to θ. s , where θ s The average skewness of all periodic pulse waves is used. The pulse wave signal can be considered as a right-skewed signal. In this embodiment, the following is selected: At that time, the periodic segment S i It was retained and performed well.
[0103] For each single-cycle pulse wave signal that passes the skewness screening, to avoid missed alarms, invalid signals that meet the skewness requirements need to be removed. Therefore, the Pearson correlation coefficient between adjacent cycles needs to be calculated. Since the length of each cycle of the pulse wave signal varies, the number of sampling points in each cycle after segmentation is inconsistent, making it impossible to directly calculate the Pearson correlation coefficient between adjacent cycles. Therefore, cubic spline interpolation needs to be performed on the segmented adjacent cycles to obtain signals X with the same number of sampling points. i and X i+1 Then, the Pearson coefficient is calculated, and the threshold for the Pearson coefficient is set to θ. p When P i >θ p At that time, the periodic segment S i This is retained; in this embodiment, the Pearson coefficient threshold θ is set. p =0.9.
[0104] S3. For high-quality pulse wave signals, extract pulse wave periodic feature points, including the steepest rise point, starting point, and peak point. Based on these periodic feature points, extract the physiological characteristic data of the subjects in this experiment. These physiological characteristic data include heart rate (HR), heart rate variability (HRV), oxygen saturation (SpO2), and pulse wave morphology index (MI). Based on the smoothed pulse wave signal, perform frequency domain analysis to obtain the respiratory rate (RR). Using the pulse wave characteristics under natural breathing as the standard value, subtract the values for mouth breathing and nasal breathing respectively to obtain the physiological characteristic sequence. The specific process is as follows... Figure 4 As shown, the steps are as follows:
[0105] S301. For high-quality pulse wave signals after removing periods with poor signal quality, pulse wave period feature points are extracted. The feature points include the steepest rise point, the starting point, and the peak point. These feature points are used for the extraction of physiological features.
[0106] S302. Based on pulse wave periodic feature points, calculate heart rate, heart rate variability, and pulse wave morphological features; based on smoothed pulse wave signals, use frequency domain analysis to select the frequency value where the frequency domain peak point is located as the respiratory rate; heart rate, heart rate variability, pulse wave morphological features, and respiratory rate together constitute the pulse wave feature sequence. Finally, ppg_feature(n) = {HR(n), HRV(n), SpO2(n), MI(n), RR(n)}, n = 0, 1, 2, 3, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nasal cavity, and breathing only through the right nasal cavity.
[0107] In this embodiment, the HRV index specifically includes the high-frequency / low-frequency energy ratio (LF / HF), the root mean square of successive differences (RMSSD) between adjacent normal cardiac cycles, and the standard deviation of normal-to-normal intervals (SDNN). HRV is approximated by PRV.
[0108] In this embodiment, the pulse wave morphology index MI specifically includes the mean rising time, the mean falling time, the ratio of rising to falling time, the ratio of rising to falling area, and the volumetric pulse wave characteristic quantity.
[0109] S303. For the obtained pulse wave feature sequences ppg_featrue(n) of the four states, n=0,1,2,3, using the pulse wave feature sequence under natural breathing as the standard value ppg_featrue(0), the difference between the left nasal cavity pulse wave feature sequence and the natural breathing pulse wave feature sequence is used to obtain the left nasal cavity feature difference sequence Bias. L The right nasal cavity pulse wave feature sequence was obtained by comparing it with the pulse wave feature sequence of natural breathing. R Bias of left nasal cavity feature difference sequence L Bias of right nasal cavity feature difference sequence R The feature difference sequence Bias is formed by taking the largest absolute value of each feature difference. N The difference between the pulse wave feature sequences under oral breathing and the pulse wave feature sequences under natural breathing is used to obtain the oral feature difference sequence, Bias. M .
[0110] S4. Using the physiological characteristic sequence of the subject when awake as input features and whether or not the subject snores during sleep at night as sample labels, construct a training set.
[0111] S5. The classifier is trained using a training set. The inputs to the classifier include heart rate (HR), heart rate variability (HRV), oxygen saturation (SpO2), pulse wave morphology index (MI), and respiratory rate (RR). The classifier maps the output data to a binary classification result using a combination of linear and nonlinear methods. This result is a prediction of whether the sample snores, and it is also the output of the classifier.
[0112] The specific steps are as follows:
[0113] S501. For the dataset obtained in step S4, feature selection is performed during the actual training process to eliminate features with low correlation and form the optimal feature data subset.
[0114] In this embodiment, the original dataset is first used to train a random forest model. Based on the ability of features to reduce classification information entropy, the importance of each feature to the random forest model is statistically analyzed and ranked. The importance of the original dataset to the random forest model is as follows: Figure 5 As shown, there are a total of 22 features, and the top 11 features are retained to form the optimal feature data subset.
[0115] S502. Split the optimal feature data subset into a training set and a test set. Use the training set to train the classifier and the test set to test the classifier's performance.
[0116] In this embodiment, a random forest is used as the classifier, with the number of decision trees set to 500, and the training criterion is the principle of minimizing information entropy.
[0117] The importance of sample features in the optimal feature subset to the random forest model is as follows: Figure 6 As shown in the figure, the sample features in the optimal feature subset are of high importance for random forest classification, indicating that feature selection based on random forest importance can effectively select the features that are important in classification.
[0118] S503. In this embodiment, step S502 is repeated using 5-fold cross-validation to obtain the average performance evaluation result of the model.
[0119] In this embodiment, the accuracy of the snoring prediction and recognition model was statistically analyzed, and its average performance evaluation is shown in Table 1 below:
[0120] Table 1. Accuracy of snoring prediction and recognition in Example 1
[0121]
[0122] S6. Input the new user's input features into the classifier trained in S5 to obtain a prediction result of whether the new user snores.
[0123] S601. For a new user, repeat steps S1 to S4 to obtain the user's input features: Feature = {Bias} N Bias M Unlike the subjects when the dataset was collected, users are no longer required to know whether they snore at night.
[0124] S602. The user's input characteristics are obtained through steps S2 to S4;
[0125] S603. Input the user's input features into the snoring prediction classifier to predict whether the user has a snoring problem at night.
[0126] In summary, using the physiological characteristic sequence of the subjects when they are awake as input features and whether or not they snore as sample labels, a snoring prediction classifier was constructed. The snoring prediction classifier has a high accuracy rate and can be used for subsequent practical applications in predicting nighttime snoring of new users.
[0127] Example 2
[0128] This embodiment discloses a method for predicting snoring during sleep using pulse wave physiological indicators in a waking state, including the following steps.
[0129] S1. Referring to the corresponding steps in Example 1, which will not be repeated here, for the new user who does not snore, the user is no longer required to know whether he or she snores at night, unlike the subject when the dataset was collected.
[0130] S2. Referring to the corresponding steps in Example 1, they will not be repeated here. The effect of periodic screening is as follows: Figure 7 , Figure 8 As shown, Figure 7 This is a signal before periodic screening. Figure 8 The signal after periodic filtering is the low-quality signal pulse wave period present in the signal before periodic filtering, such as... Figure 7 As shown, after being filtered by skewness-adjacent Pearson coefficient concatenation, they were eliminated, while all valid signal periods were retained, such as... Figure 8 As shown, the periodic screening method based on the skewness-adjacent Pearson coefficient series has a good screening effect.
[0131] S3. Refer to the corresponding steps in Example 1, which will not be repeated here.
[0132] S4. Refer to the corresponding steps in Example 1, which will not be repeated here, but at this time no longer a dataset is constructed. The user's input features are only used as input to the already trained snoring prediction model.
[0133] S6. Input the new user's input features into the snoring prediction model to obtain the prediction result of whether the user snores.
[0134] In summary, by inputting the physiological feature sequence of a new user when awake, based on the snoring prediction classifier, the snoring prediction result is obtained, thus completing the practical application of snoring prediction based on the physiological indicators of pulse wave in the awake state of a new user.
[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0136] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, characterized in that, The sleep snoring prediction method includes the following steps: S1. Construct a test scenario. The test equipment consists of a pulse wave signal measurement sensor and a supporting host system. Find non-single-living subjects to collect experimental data. Place the subject's index finger on the sensor. The entire test process is as follows: sit quietly, breathe naturally, breathe through the mouth, breathe through the left nasal cavity, and breathe through the right nasal cavity. Record the pulse wave signal during the natural breathing, mouth breathing, left nasal cavity breathing, and right nasal cavity breathing process. At the same time, ask the subject's roommate to listen in during sleep that night and tell the subject whether there was snoring that night. Ask the subject whether they snored the next day. S2. For each pulse wave signal acquired in step S1, noise is removed. A smooth pulse wave signal is obtained by using a low-pass filter to remove high-frequency noise. Then, a baseline-removed pulse wave signal is obtained by using a cubic spline interpolation baseline removal method. Finally, a period validity evaluation is performed to remove the signal period with poor signal quality and obtain a high-quality pulse wave signal. S3. Extract pulse wave periodic feature points from high-quality pulse wave signals. Feature points include the steepest rise point, starting point, peak point, and physiological feature data of the subjects in this experiment based on periodic feature points. Physiological feature data include heart rate (HR), heart rate variability (HRV), blood oxygen saturation (SpO2), and pulse wave morphology index (MI). Frequency domain analysis is performed on the smoothed pulse wave signal to obtain respiratory rate (RR). Using the pulse wave features under natural breathing as the standard value, the difference is calculated for mouth breathing and nasal breathing to obtain the physiological feature sequence. S4. Using the physiological characteristic sequence of the subject when awake as input features and whether or not the subject snores during sleep at night as sample labels, construct a training set. S5. The classifier is trained using a training set. The inputs to the classifier include heart rate (HR), heart rate variability (HRV), oxygen saturation (SpO2), pulse wave morphology index (MI), and respiratory rate (RR). The classifier maps the output data to a binary classification result using a combination of linear and nonlinear methods. This result is a prediction of whether the sample snores, and it is also the output of the classifier. S6. For new users who are unaware of whether they snore, repeat steps S1 to S4 while they are awake to obtain test data and input it into the classifier to predict whether the new user snores during sleep.
2. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 1, is characterized in that... The process of step S1 is as follows: S101. Construct a test scenario. Under suitable temperature and ventilation conditions, find non-isolated subjects to collect experimental data. Subjects press their fingers on the pulse wave signal sensor and sit with their backs against the chair. S102. Have the subject sit still for a duration of T1 to allow the subject to calm down and become familiar with the testing environment, thus avoiding interference with physiological signals caused by the testing environment. S103, after the fingers are fully relaxed at interval T2, the subject's natural breathing duration T1 is used to collect pulse wave data via a pulse wave signal sensor as a reference signal s. raw (0); S104. After the fingers are fully relaxed at interval T2, the subject breathes only through the mouth for a duration of T1, during which pulse wave data is collected to obtain the pulse wave signal s. raw (1) Used to assess oral ventilation; After the fingers were fully relaxed at interval T2 (S105), the subject breathed only through the left nasal cavity for a duration of T1, during which pulse wave data was collected to obtain the pulse wave signal s. raw (2) is used to assess the ventilation of a single nasal cavity; S106. After the fingers are fully relaxed at interval T2, the subject breathes only through the right nasal cavity for a duration of T1, during which pulse wave data is collected to obtain the pulse wave signal s. raw (3) is used to assess the ventilation of a single nasal cavity; The above pulse wave signal is denoted as s raw (n), n=0,1,2,3, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively; S107. Subjects are required to have their roommates listen to them while they sleep that night to find out if they snore. The next day, the subjects are asked if they snore, and the results are used as training set samples for supervised learning, where Label∈{0,1}.
3. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 1, is characterized in that... The process of step S2 is as follows: S201. According to the effective frequency range of the pulse wave, the pulse wave signal is denoted as s. raw (n), n=0,1,2,3 are respectively subjected to low-pass filtering to remove high-frequency noise, and the corresponding smooth pulse wave signal s is obtained. smooth (n), n=0,1,2,3, corresponding to four states: natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively; S202. Extract the starting point of each period of the signal. Use the local maximum point extraction method to extract the starting point of each period. Based on the starting point, truncate the beginning and end of each signal segment to remove the starting period and the last period of the signal, so as to avoid interference from incomplete periods that occur during sampling. S203. Using the starting point of each cycle of the smoothed pulse wave as the base point, fit the signal using cubic spline interpolation, and calculate the difference between the signals to obtain the baseline-free pulse wave signal s. detrend ; S204. Evaluate the period validity of each signal period after baseline removal, including skewness calculation and Pearson coefficient calculation. Discard signal periods that do not meet the requirements for Pearson coefficient and skewness to obtain the corresponding high-quality pulse wave signal s. qualified (n), n=0,1,2,3, corresponding to the four states of natural breathing, breathing only through the mouth, breathing only through the left nostril, and breathing only through the right nostril, respectively.
4. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 3, is characterized in that... The process of step S3 is as follows: S301. For high-quality pulse wave signals after removing periods with poor signal quality, pulse wave period feature points are extracted. The feature points include the steepest rise point, the starting point, and the peak point. These feature points are used for the extraction of physiological features. S302. Based on the pulse wave periodic feature points, calculate the heart rate, heart rate variability, and pulse wave morphological features; based on the smoothed pulse wave signal, use frequency domain analysis to select the frequency value where the frequency domain peak point is located as the respiratory rate; heart rate, heart rate variability, pulse wave morphological features, and respiratory rate together constitute the pulse wave feature sequence, and finally obtain the pulse wave feature sequence ppg_feature(n)={HR(n),HRV(n),SpO2(n),MI(n),RR(n)},n=0,1,2,3, which correspond to four states: natural breathing, breathing only through the mouth, breathing only through the left nasal cavity, and breathing only through the right nasal cavity, respectively; S303. For the obtained pulse wave feature sequences ppg_featrue(n) of the four states, n=0,1,2,3, using the pulse wave feature sequence ppg_featrue(0) under natural breathing as the standard value, the difference between the left nasal cavity pulse wave feature sequence and the natural breathing pulse wave feature sequence is used to obtain the left nasal cavity feature difference sequence Bias. L The right nasal cavity feature difference sequence Bias is obtained by subtracting the right nasal cavity pulse wave feature sequence from the pulse wave feature sequence of natural breathing. R Bias of left nasal cavity feature difference sequence L Bias of right nasal cavity feature difference sequence R The feature difference with the largest absolute value is used to form the single-nose feature difference sequence Bias. N The difference between the pulse wave feature sequences under oral breathing and the pulse wave feature sequences under natural breathing is used to obtain the oral feature difference sequence, Bias. M .
5. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 1, is characterized in that... In step S4, the single nasal feature difference sequence and the oral cavity feature difference sequence are concatenated to obtain the sample input features for the training set. The known whether the subject snores is used as the sample label to construct the dataset. The process is as follows: S401. For subjects who snore, the sample composition is as follows: Input feature Feature = {Bias} N Bias M }, Sample label Label = {1}; S402. For subjects who do not snore, the sample composition is as follows: Input feature Feature = {Bias} N Bias M }, Sample label Label = {0}.
6. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 1, is characterized in that... The process of step S5 is as follows: S501. For the dataset obtained in step S4, feature selection is performed during the actual training process to eliminate features with low correlation and form the optimal feature data subset. S502. Split the optimal feature data subset into a training set and a test set. Use the training set to train the classifier and the test set to test the classifier's performance. S503. Repeat step S502 using K-fold cross-validation to obtain the average performance evaluation result of the classifier.
7. The method for predicting snoring during sleep based on physiological indicators of pulse waves in a waking state, as described in claim 1, is characterized in that... The process of step S6 is as follows: S601. For new users who are unaware of whether they snore, repeat step S1 to collect the user's pulse wave physiological data. Unlike the subjects, the user is no longer required to know whether they snore at night. S602. The user's input characteristics are obtained through steps S2 to S4; S603. Input the user's input features into the snoring prediction classifier to predict whether the user has a snoring problem at night.
Citation Information
Patent Citations
Evaluation of sleep data
CN116963661A
Respiratory event detection method and equipment based on photoelectric pulse volume wave
CN118697324A