A Snoring Recognition Method and System Based on a Non-Contact Sensor

Vibration data is obtained through non-contact sensors, and snoring is recognized using feature extraction and multi-level classifier models, which solves the privacy leakage problem caused by the recording signal and realizes efficient snoring recognition and detection.

CN119226959BActive Publication Date: 2025-07-11ZHEJIANG QISHENG DATA SERVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411747931.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-07-11
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing snoring detection technology relies on recorded signals, poses a risk of data security and privacy leakage, and cannot guarantee the privacy of sleeping places.

Method used

Vibration data is obtained by non-contact sensors, time domain, frequency domain and time frequency characteristics are extracted through pre-processing, Fourier transform and short-time Fourier transform, and snoring recognition is used using weak classifiers and strong classifier models, and the results are corrected in combination with specificity and sensitivity detection.

Benefits of technology

It realizes efficient identification of snoring while ensuring the privacy and security of sleeping places, and provides effective snoring detection and intervention support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226959B_ABST
    Figure CN119226959B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a snoring recognition method and system based on a non-contact sensor. The method includes: obtaining vibration data collected by the non-contact sensor, and preprocessing the vibration data to obtain vibration signals of multiple time windows; calculating time-domain features, frequency-domain features, and time-frequency features of the vibration signals; training a weak classifier model, and using the prediction result of the weak classifier as input features to train a strong classifier; collecting real-time vibration signals, inputting the time-domain features, frequency-domain features, and time-frequency features of the real-time vibration signals into the weak classifier to obtain an output prediction probability value, and inputting the prediction probability value into the strong classifier to obtain an output snoring recognition result; detecting the snoring recognition result, and based on the detection result, combining the prediction probability value to correct the snoring recognition result and output a corrected final snoring result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of snoring signal recognition, and particularly to a snoring recognition method and system based on a non-contact sensor. Background Art

[0002] Snoring is a sign of a current physiological phenomenon. During sleep, factors such as relaxation of the laryngeal muscles cause the respiratory tract to collapse, and in severe cases, even obstruction may occur. When the respiratory airflow passes through the narrow airway, its vibration frequency increases and snoring is formed. During sleep, snoring can cause interference to surrounding companions. When the degree of snoring intensifies, apnea occurs, which may even affect the life and health of the patient. Therefore, in some cases, it is necessary to detect the snoring of the patient.

[0003] However, the sleeping place belongs to a private place with a high degree of privacy. At present, many products on the market for identifying patients' snoring detect snoring through recording signals, which undoubtedly poses a challenge to the security of data. When data is leaked, the privacy of users cannot be guaranteed. Summary of the Invention

[0004] In view of the problems existing in the prior art, an embodiment of the present invention provides a snoring recognition method and system based on a non-contact sensor.

[0005] An embodiment of the present invention provides a snoring recognition method based on a non-contact sensor, the method comprising:

[0006] Obtaining historical vibration data collected by a non-contact sensor, and preprocessing the historical vibration data to obtain vibration signals of multiple time windows;

[0007] Calculating the time-domain features of the vibration signal, performing Fourier transform on the vibration signal to obtain the frequency-domain features of the vibration signal, and performing short-time Fourier transform on the vibration signal to obtain the time-frequency features of the vibration signal;

[0008] Based on the time-domain features, frequency-domain features, and time-frequency features, corresponding data sets are respectively established, and weak classifier models are trained according to the data sets, and the prediction results of the weak classifiers are used as input features to train a strong classifier;

[0009] Collecting real-time vibration signals of the non-contact sensor, obtaining the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features of the real-time vibration signals, inputting the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features into the weak classifier to obtain the output prediction probability value, and inputting the prediction probability value into the strong classifier to obtain the output snoring recognition result;

[0010] Detect the snoring recognition result, and based on the detection result, combine the predicted probability value to correct the snoring recognition result, and output the corrected final snoring result.

[0011] In one embodiment, the method further includes:

[0012] When the snoring recognition result is 1, perform a specificity detection on the snoring recognition result, and the specificity detection includes:

[0013] Obtain a specificity threshold, compare the predicted probability of the snoring recognition result with the specificity threshold, and when the predicted probability of the snoring recognition result is less than the specificity threshold, correct the snoring recognition result to 0;

[0014] When the snoring recognition result is 0, perform a sensitivity detection on the snoring recognition result, and the sensitivity detection includes:

[0015] Obtain a sensitivity threshold, compare the predicted probability of the snoring recognition result with the sensitivity threshold, and when the predicted probability of the snoring recognition result is greater than the sensitivity threshold, correct the snoring recognition result to 1.

[0016] In one embodiment, the method further includes:

[0017] Construct a two-level model based on three weak classifier models and a strong classifier model. Specifically, the three weak classifier models construct the first-level model, and the strong classification model constructs the second-level model;

[0018] The step of inputting the real-time time-domain feature, real-time frequency-domain feature, and real-time time-frequency feature into the weak classifier to obtain the output predicted probability value includes:

[0019] Input the time-domain feature into the first weak classifier to output the first probability;

[0020] Input the first probability and the frequency-domain feature into the second weak classifier to output the second probability;

[0021] Input the first probability, the second probability, and the time-frequency feature into the third weak classifier to output the third probability.

[0022] In one embodiment, the weak classifier includes:

[0023] Random forest, support vector machine or LightGBM.

[0024] In one embodiment, the preprocessing includes:

[0025] Data segmentation and slicing, missing value filling, denoising processing, normalization processing, and feature enhancement.

[0026] An embodiment of the present invention provides a snoring recognition system based on a non-contact sensor. The system includes:

[0027] A preprocessing module, configured to obtain historical vibration data collected by a non-contact sensor, and preprocess the historical vibration data to obtain vibration signals of multiple time windows;

[0028] A calculation module, configured to calculate the time-domain features of the vibration signal, perform Fourier transform on the vibration signal to obtain the frequency-domain features of the vibration signal, and perform short-time Fourier transform on the vibration signal to obtain the time-frequency features of the vibration signal;

[0029] A training module, configured to respectively establish corresponding data sets based on the time-domain features, frequency-domain features, and time-frequency features, train a weak classifier model according to the data sets, and use the prediction results of the weak classifier as input features to train a strong classifier;

[0030] An identification module, configured to collect real-time vibration signals of the non-contact sensor, obtain the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features of the real-time vibration signals, input the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features into the weak classifier to obtain the output prediction probability value, and input the prediction probability value into the strong classifier to obtain the output snoring recognition result;

[0031] A correction module, configured to detect the snoring recognition result, and based on the detection result, correct the snoring recognition result in combination with the prediction probability value to output the corrected final snoring result.

[0032] In one embodiment, the system further includes:

[0033] A specificity detection module, configured to perform specificity detection on the snoring recognition result when the snoring recognition result is 1. The specificity detection includes: obtaining a specificity threshold, comparing the prediction probability of the snoring recognition result with the specificity threshold, and when the prediction probability of the snoring recognition result is less than the specificity threshold, correcting the snoring recognition result to 0;

[0034] A sensitivity detection module, configured to perform sensitivity detection on the snoring recognition result when the snoring recognition result is 0. The sensitivity detection includes: obtaining a sensitivity threshold, comparing the prediction probability of the snoring recognition result with the sensitivity threshold, and when the prediction probability of the snoring recognition result is greater than the sensitivity threshold, correcting the snoring recognition result to 1.

[0035] In one embodiment, the system further includes:

[0036] A two - level model module for constructing a two - level model based on three weak classifier models and a strong classifier model, where the three weak classifier models construct the first - level model and the strong classifier model constructs the second - level model;

[0037] A weak classifier module for inputting time - domain features into a first weak classifier to output a first probability; inputting the first probability and frequency - domain features into a second weak classifier to output a second probability; and inputting the first probability, the second probability, and time - frequency features into a third weak classifier to output a third probability.

[0038] An embodiment of the present invention provides an electronic device, including a processor and a memory;

[0039] The processor is connected to the memory;

[0040] The memory is used to store executable program code;

[0041] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory to execute the method described in one or more embodiments.

[0042] An embodiment of the present invention provides a non - transient computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above - mentioned snore recognition method based on a non - contact sensor are implemented.

[0043] In view of the above, in one or more embodiments of this specification, vibration data collected by a non - contact sensor is obtained, and the vibration data is pre - processed to obtain vibration signals of multiple time windows; the time - domain features of the vibration signals are calculated, the vibration signals are Fourier - transformed to calculate frequency - domain features, and the vibration signals are short - time Fourier - transformed to extract time - frequency features; corresponding data sets are established based on the time - domain features, frequency - domain features, and time - frequency features respectively, and weak classifier models are trained according to the data sets, and the prediction results of the weak classifiers are used as input features to train a strong classifier; real - time vibration signals of the non - contact sensor are collected, real - time time - domain features, real - time frequency - domain features, and real - time time - frequency features of the real - time vibration signals are obtained, the real - time time - domain features, real - time frequency - domain features, and real - time time - frequency features are input into the weak classifier to obtain the output prediction probability values, and the prediction probability values are input into the strong classifier to obtain the output snore recognition result; the snore recognition result is detected, and based on the detection result, the snore recognition result is corrected in combination with the prediction probability values to output the corrected final snore result. This can effectively ensure the privacy and security of the sleep place, and at the same time achieve a high snore recognition rate, providing effective support for snore detection and snore intervention. Description of the Drawings

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0045] Figure 1 It is a flowchart of a snoring recognition method based on a non-contact sensor provided by an embodiment of this specification.

[0046] Figure 2 It is a structural diagram of a two-stage model provided by an embodiment of this specification.

[0047] Figure 3 It is a waveform diagram of a vibration signal provided by an embodiment of this specification.

[0048] Figure 4 It is another waveform diagram of a vibration signal provided by an embodiment of this specification.

[0049] Figure 5 It is a schematic structural diagram of a snoring recognition system based on a non-contact sensor provided by an embodiment of this specification.

[0050] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of this specification. Detailed implementation manners

[0051] Now, the subject matter described herein will be discussed with reference to example embodiments. It should be understood that discussing these embodiments is only to enable those skilled in the art to better understand and thus implement the subject matter described herein, and is not a limitation on the scope of protection, applicability, or examples set forth in the claims. The functions and arrangements of the elements discussed can be changed without departing from the scope of protection of the content of this specification. Each example can omit, substitute, or add various processes or components as needed. For example, the described method can be executed in a different order from the described order, and each step can be added, omitted, or combined. Additionally, the features described relative to some examples can also be combined in other examples.

[0052] As used herein, the term "comprising" and its variations denote open-ended terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other definitions may be included below, whether explicit or implicit. Unless explicitly specified in the context, the definition of a term is consistent throughout the specification.

[0053] As Figure 1 shown, an embodiment of the present invention provides a snoring recognition method based on a non-contact sensor, including:

[0054] Step S101, obtaining historical vibration data collected by a non-contact sensor, and preprocessing the historical vibration data to obtain vibration signals of multiple time windows.

[0055] Specifically, obtain the vibration data collected by the non-contact sensor, where the vibration data is the historical vibration data collected by the non-contact sensor, including the vibration data in the case of snoring and the vibration data in the case of non-snoring. The non-contact sensor may include a piezoelectric sensor, an optical fiber sensor, a capacitive sensor, etc. The sensor may be placed in the mattress, and the activities on the bed can be transmitted to the data acquisition device in the form of vibration signals through the mattress. The acquisition system of the sensor may be a DSP (Digital Signal Processing) device, configure the software of the data acquisition system, and set appropriate sampling rates and triggering conditions. Generally, the sampling rate should be not less than 100 Hz to capture high-frequency vibration signals. After obtaining the vibration data, preprocess the vibration data. The preprocessing steps may include data segmentation and slicing, missing value filling, denoising, normalization, feature enhancement, etc. Among them, data segmentation and slicing can divide the continuous vibration data into time windows of a fixed length. For example, every 30 seconds or 1 minute can be selected as a time window. In addition, in order to capture finer changes, overlapping windows can be used. For example, each new window can move forward 10 seconds from the end of the previous window, slice the data within each time window to form independent data segments, which is convenient for subsequent feature extraction and analysis. For missing value filling, first detect whether there are missing values in the vibration signal by methods such as the mean method and interpolation method. When it is detected that there are missing values, the missing values can be filled by methods such as mean filling, linear interpolation, and spline interpolation. Denoising can use digital filters to remove environmental noise and other interference signals. Normalization processes the data to a unified standard. Feature enhancement includes smoothing processing, trend removal, etc. Then obtain the vibration signals of multiple time windows after preprocessing.

[0056] Step S102: Calculate the time-domain features of the vibration signal, perform Fourier transform on the vibration signal to obtain the frequency-domain features of the vibration signal, and perform short-time Fourier transform on the vibration signal to obtain the time-frequency features of the vibration signal.

[0057] Specifically, extracting the features of the vibration signal includes time-domain features, frequency-domain features, and time-frequency features. Among them, the time-domain features are the statistics directly extracted from the original vibration signal, which can reflect the basic characteristics of the signal, including mean, variance, standard deviation, maximum value, minimum value, peak value, etc. Calculate the above time-domain features for the vibration signal in each time window, and save the calculation results as feature vectors. The frequency-domain features convert the time-domain signal into a frequency-domain signal through Fourier transform (FFT), which can reflect the frequency components of the signal, including spectrum, main frequency, power spectral density, band energy, spectral entropy, etc. The time-frequency features convert the time-domain signal into a time-frequency domain signal through time-frequency analysis methods (such as short-time Fourier transform STFT, wavelet transform WT), which can reflect the time-frequency characteristics of the signal. For example, for short-time Fourier transform, calculate the STFT of the signal in each time window to obtain a time-frequency diagram, and then extract the key features in the time-frequency diagram, such as maximum value, mean value, variance, etc.; for example, for wavelet transform, select appropriate wavelet basis functions (such as Morlet, Mexican Hat), calculate the wavelet transform of the signal in each time window, extract the modulus maxima of the wavelet coefficients to represent the mutation points of the signal, and calculate the wavelet energy distribution. Then draw a time-frequency diagram to visually display the changes of the signal in the time-frequency domain, and extract the local features in the time-frequency diagram, such as peaks, valleys, edges, etc.

[0058] Step S103: Establish corresponding data sets based on the time-domain features, frequency-domain features, and time-frequency features respectively, train weak classifier models according to the data sets, and use the prediction results of the weak classifiers as input features to train strong classifiers.

[0059] Specifically, the extracted time-domain features, frequency-domain features, and time-frequency features are respectively organized into three independent data sets, and each data set contains feature vectors and corresponding labels (snoring or non-snoring). Based on the data sets, weak classifier models are trained. Among them, the weak classification models can be Random Forest, Support Vector Machine (SVM), or LightGBM. The training of the weak classifier models can be, for example: training a Random Forest model using the time-domain feature data set, evaluating the performance of the model on the validation set, and recording metrics such as accuracy, recall, and F1 score; training an SVM model using the frequency-domain feature data set, evaluating the performance of the model on the validation set, and recording metrics such as accuracy, recall, and F1 score; training a LightGBM model using the time-frequency feature data set, evaluating the performance of the model on the validation set, and recording metrics such as accuracy, recall, and F1 score. After the weak classifier models are trained, the trained three weak classifier models are used to predict the test set to obtain the predicted probability or class label of each sample, and the prediction results of the three weak classifier models are used as new features to construct a new data set. For example, assuming that each model outputs a probability value, the feature dimension of the new data set is 3 (one feature for each model). A strong classifier model is determined, such as Logistic Regression, Neural Network, etc., and then the strong classifier model is trained through the new data set, the performance of the strong classifier is evaluated on the validation set, and metrics such as accuracy, recall, and F1 score are recorded. According to the evaluation results, the parameters of the strong classifier are adjusted to optimize the model performance of the strong classifier model.

[0060] Step S104, collect the real-time vibration signal of the non-contact sensor, obtain the real-time time-domain feature, real-time frequency-domain feature, and real-time time-frequency feature of the real-time vibration signal, input the real-time time-domain feature, real-time frequency-domain feature, and real-time time-frequency feature into the weak classifier to obtain the output predicted probability value, and input the predicted probability value into the strong classifier to obtain the output snoring recognition result.

[0061] Specifically, a non-contact pressure sensor is used to collect vibration signals on the mattress in real time. After preprocessing the real-time vibration signals, vibration feature extraction is carried out, including real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features. The vibration features are input into a trained weak classifier model. For example, the real-time time-domain features are input into a trained random forest model to obtain a prediction probability value; the real-time frequency-domain features are input into a trained support vector machine model to obtain a prediction probability value; the real-time time-frequency features are input into a trained LightGBM model to obtain a prediction probability value. After obtaining the prediction probability values output by the three weak classifiers, the prediction probability values are input into a strong classifier. Among them, before input, the prediction probability values of the three weak classifiers are combined into a new feature vector. For example, assuming that the prediction probability of the random forest is 0.8, the prediction probability of the support vector machine is 0.7, and the prediction probability of LightGBM is 0.9, then the new feature vector is [0.8, 0.7, 0.9]. The new feature vector is input into a trained strong classifier to predict the snoring result, and the preliminary snoring result output by the strong classifier is obtained, usually 0 (non-snoring) or 1 (snoring).

[0062] In addition, when training the real-time vibration signals through the trained weak classifier and strong classifier, the weak classifier and strong classifier can also be fused to form a new model architecture. Such as Figure 2As shown, the model architecture is divided into two levels. The first level consists of three weak classifiers, and the second level is a strong classifier. During the actual processing, the time window can be set to 20s. Every time 20s of real-time vibration signal data is collected, feature extraction will be performed to obtain time-domain features, frequency-domain features, and time-frequency features. These three types of features can respectively form independent one-dimensional sequences. First, in the first level of the model fusion architecture, the time-domain features are input into the first trained weak classifier, and a value is generated. This value represents the probability that the first weak classifier believes a snoring event occurs in the current 20s segment. The second trained weak classifier takes the value output by the first weak classifier and the frequency-domain features as input features, and the second weak classifier also generates a value. This value represents the probability that the second weak classifier believes a snoring event occurs in the current 20s segment. The third trained weak classifier can take the value output by the first weak classifier, the value output by the second weak classifier, and the time-frequency features as input features and output a value. This value represents the probability that the third weak classifier believes a snoring event occurs in the current 20s segment. In the second-level strong classifier, the trained strong classifier takes the values output by the three weak classifiers in the first level as input features and then outputs a value. This value represents the probability that the strong classifier believes a snoring event occurs in the current 20s segment. A threshold is set in advance (such as 0.5). When the value output by the strong classifier is greater than the threshold, the current 20s segment is marked as a snoring segment, and the label is recorded as 1. When the value output by the strong classifier is less than the threshold, the current 20s segment is marked as a non-snoring segment, and the label is recorded as 0.

[0063] Step S105: Detect the snoring recognition result. Based on the detection result, combine the predicted probability value to correct the snoring recognition result and output the corrected final snoring result.

[0064] Specifically, based on the preliminary snoring recognition results, the snoring recognition results are further corrected for accuracy, including specificity detection and sensitivity detection. Among them, specificity detection is to reduce false positives (FP), that is, the situation where the model incorrectly identifies non-snoring segments as snoring segments. Set the specificity threshold to 0.9. If the preliminary prediction result is 1 (snoring), but the prediction probability is lower than 0.9, it is corrected to 0 (non-snoring). Perform upper and lower time window analysis. If the prediction result of the current segment is 1, but the previous and subsequent segments are all 0, re-evaluate the result of the current segment. Sensitivity detection is to reduce false negatives (FN), that is, the situation where the model incorrectly identifies snoring segments as non-snoring segments. Set the sensitivity threshold to 0.2. If the preliminary prediction result is 0 (non-snoring), but the prediction probability is higher than the sensitivity threshold of 0.2, it is corrected to 1 (snoring). Perform upper and lower time window analysis. If the prediction result of the current segment is 0, but the previous and subsequent segments are all 1, re-evaluate the result of the current segment. After specificity detection and sensitivity correction, the final snoring result is obtained.

[0065] Further, based on the Figure 2 model architecture, the specific correction process for the snoring recognition result output by the model architecture specifically includes that when the preliminary snoring result is 1, at this time the model believes that a snoring event has occurred in this segment and specificity detection needs to be performed. As Figure 3 shown, Figure 3 in Figure (a) is the original vibration signal waveform diagram, Figure 3 in Figure (b) is the respiratory waveform diagram obtained by low-pass filtering, Figure 3 in Figure (c) is the time-frequency diagram obtained by short-time Fourier transform, Figure 3 in Figure (d) is the waveform diagram obtained by summing the amplitude values of all frequencies at the same time in Figure 3 Figure (c). When a snoring event occurs, Figure 3 the peak positions in Figure (b) and Figure 3 Figure (d) will be coupled. By calculating the correlation coefficient between the waveform in Figure 3 Figure (b) and the waveform in Figure 3 Figure (d), the correlation degree of these two waveforms can be obtained, such as the Pearson correlation coefficient. The calculation formula of the Pearson correlation coefficient:

[0066]

[0067] where r represents the Pearson correlation coefficient, y represents the values of each point in the waveform in Figure 3 Figure (c), x represents the values of each point in the waveform in Figure 3 Figure (b), represents the mean value of x, Denote the mean of y.

[0068] Then, compare the calculated Pearson coefficient with a pre-set threshold. When it is greater than the threshold, the preliminary classification result of the current segment is not corrected. When it is less than the threshold, the preliminary classification result of the current segment is corrected to 0, that is, it is finally considered that no snoring event occurs in the current segment.

[0069] When the preliminary snoring result is 0, the model considers that no snoring event occurs in this segment, and sensitivity detection is required. Some snoring events are not reflected in the frequency-domain features or time-frequency features, but can be distinguished in the original waveform. As Figure 4 shown, in the Figure 4 in Figure (a), abnormal protrusions can be seen. By playing the audio, it is confirmed that the abnormal protrusions are periodic snoring events. However, this snoring event is not reflected in the Figure 4 respiratory waveform in Figure (b), Figure 4 the time-frequency diagram in Figure (c) and Figure 4 the time-frequency waveform in Figure (d). By detecting such special waveforms in the original signal, the preliminary snoring recognition result is corrected.

[0070] First, find all the wave peaks in the original waveform and the wave valleys on their left and right sides. Then, calculate the absolute value of the slope between each wave peak and the wave valley on its left, and then calculate the absolute value of the slope between each wave peak and the wave valley on its right. Calculate the ratio of the above two absolute values of the slopes and determine whether it is within a pre-set range. Count the number of all wave peaks that meet the conditions in the current segment. When the number is greater than the threshold, the final result is corrected to 1, that is, it is finally considered that a snoring event occurs in the current segment. When the number is less than the threshold, the preliminary snoring prediction result is not corrected, that is, it is finally considered that no snoring event occurs in the current segment.

[0071] A snoring recognition method based on a non-contact sensor provided by an embodiment of the present invention obtains vibration data collected by the non-contact sensor, preprocesses the vibration data to obtain vibration signals of multiple time windows; calculates time-domain features of the vibration signals, performs Fourier transform on the vibration signals to calculate frequency-domain features, and performs short-time Fourier transform on the vibration signals to extract time-frequency features; respectively establishes corresponding data sets based on the time-domain features, frequency-domain features, and time-frequency features, trains a weak classifier model according to the data sets, and uses the prediction results of the weak classifier as input features to train a strong classifier; collects real-time vibration signals of the non-contact sensor, obtains real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features of the real-time vibration signals, inputs the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features into the weak classifier to obtain an output prediction probability value, and inputs the prediction probability value into the strong classifier to obtain an output snoring recognition result; detects the snoring recognition result, and based on the detection result, combines the prediction probability value to correct the snoring recognition result and outputs the corrected final snoring result. This can effectively ensure the privacy and security of the sleeping place, and at the same time achieve a high snoring recognition rate, providing effective support for snoring detection and snoring intervention.

[0072] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a snoring recognition system based on a non-contact sensor provided by an embodiment of the present application. As Figure 5 shown, the system includes:

[0073] A preprocessing module S501, configured to obtain vibration data collected by the non-contact sensor and preprocess the vibration data to obtain vibration signals of multiple time windows;

[0074] A calculation module S502, configured to calculate time-domain features of the vibration signals, perform Fourier transform on the vibration signals to calculate frequency-domain features, and perform short-time Fourier transform on the vibration signals to extract time-frequency features;

[0075] A training module S503, configured to respectively establish corresponding data sets based on the time-domain features, frequency-domain features, and time-frequency features, train a weak classifier model according to the data sets, and use the prediction results of the weak classifier as input features to train a strong classifier;

[0076] An identification module S504, configured to collect real-time vibration signals of the non-contact sensor, obtain real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features of the real-time vibration signals, input the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features into the weak classifier to obtain an output prediction probability value, and input the prediction probability value into the strong classifier to obtain an output snoring recognition result;

[0077] Correction module S505 is used to detect the snoring recognition result. Based on the detection result, the snoring recognition result is corrected in combination with the predicted probability value, and the corrected final snoring result is output.

[0078] In another embodiment, a snoring recognition system based on a non-contact sensor further includes:

[0079] Specificity detection module is used to perform specificity detection on the snoring recognition result when the snoring recognition result is 1. The specificity detection includes: obtaining a specificity threshold, comparing the predicted probability of the snoring recognition result with the specificity threshold, and when the predicted probability of the snoring recognition result is less than the specificity threshold, correcting the snoring recognition result to 0;

[0080] Sensitivity detection module is used to perform sensitivity detection on the snoring recognition result when the snoring recognition result is 0. The sensitivity detection includes: obtaining a sensitivity threshold, comparing the predicted probability of the snoring recognition result with the sensitivity threshold, and when the predicted probability of the snoring recognition result is greater than the sensitivity threshold, correcting the snoring recognition result to 1.

[0081] In another embodiment, a snoring recognition system based on a non-contact sensor further includes:

[0082] Two-stage model module is used to construct a two-stage model based on three weak classifier models and a strong classifier model. The three weak classifier models construct the first-stage model, and the strong classifier model constructs the second-stage model;

[0083] Weak classifier module is used to input time-domain features into the first weak classifier and output the first probability; input the first probability and frequency-domain features into the second weak classifier and output the second probability; input the first probability, the second probability and time-frequency features into the third weak classifier and output the third probability.

[0084] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented by means of software and / or hardware. The "units" and "modules" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.

[0085] Each processing unit and / or module of the embodiments of the present application can be implemented by an analog circuit that realizes the functions described in the embodiments of the present application, or can be implemented by software that executes the functions described in the embodiments of the present application.

[0086] See Figure 6, which shows a schematic structural diagram of an electronic device involved in an embodiment of the present application. This electronic device can be used to implement Figure 1 the method in the embodiment shown. As Figure 6 shown, the electronic device 600 may include: at least one processor 601, at least one network interface 604, a user interface 603, a memory 605, and at least one communication bus 602.

[0087] Among them, the communication bus 602 is used to realize the connection and communication between these components.

[0088] Among them, the user interface 603 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 603 may further include a standard wired interface and a wireless interface.

[0089] Among them, the network interface 604 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0090] Among them, the processor 601 may include one or more processing cores. The processor 601 connects various parts within the entire electronic device 600 through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by calling the data stored in the memory 605, the processor 601 executes various functions of the electronic device 600 and processes data. Optionally, the processor 601 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 601 may integrate one or several combinations of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, the user interface, and application programs, etc.; the GPU is responsible for the rendering and drawing of the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 601 and may be implemented separately by a single chip.

[0091] Among them, the memory 605 may include a Random Access Memory (RAM), or may also include a Read-Only Memory. Optionally, the memory 605 includes a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 605 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store the data involved in the above-mentioned method embodiments. Optionally, the memory 605 may also be at least one storage device located far from the aforementioned processor 601. As Figure 6 shown, the memory 605 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0092] In Figure 6 the electronic device 600 shown, the user interface 603 is mainly used to provide an input interface for the user to obtain the data input by the user; while the processor 601 can be used to call the interactive application program generated based on images stored in the memory 605 and specifically perform the following operations: obtain the vibration data collected by the non-contact sensor, and preprocess the vibration data to obtain vibration signals of multiple time windows; calculate the time-domain characteristics of the vibration signals, perform Fourier transform on the vibration signals to calculate the frequency-domain characteristics, and perform short-time Fourier transform on the vibration signals to extract the time-frequency characteristics; respectively establish corresponding data sets based on the time-domain characteristics, frequency-domain characteristics, and time-frequency characteristics, and train a weak classifier model according to the data sets, and use the prediction results of the weak classifier as input features to train a strong classifier; collect the real-time vibration signals of the non-contact sensor, obtain the real-time time-domain characteristics, real-time frequency-domain characteristics, and real-time time-frequency characteristics of the real-time vibration signals, input the real-time time-domain characteristics, real-time frequency-domain characteristics, and real-time time-frequency characteristics into the weak classifier to obtain the output prediction probability value, and input the prediction probability value into the strong classifier to obtain the output snoring recognition result; detect the snoring recognition result, and based on the detection result, combine the prediction probability value to correct the snoring recognition result, and output the corrected final snoring result.

[0093] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0094] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be carried out in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0095] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0096] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some service interfaces. The indirect couplings or communication connections of the devices or units can be in electrical or other forms.

[0097] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0098] In addition, in each embodiment of the present application, the various functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs.

[0100] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs, etc.

[0101] The specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A snoring recognition method based on a non-contact sensor, the method comprising: Obtaining historical vibration data collected by a non-contact sensor, and preprocessing the historical vibration data to obtain vibration signals of multiple time windows; Calculating the time-domain features of the vibration signals, performing Fourier transform on the vibration signals to obtain the frequency-domain features of the vibration signals, and performing short-time Fourier transform on the vibration signals to obtain the time-frequency features of the vibration signals; Based on the time-domain features, frequency-domain features, and time-frequency features, establishing corresponding data sets respectively, training a weak classifier model according to the data sets, and using the prediction results of the weak classifier as input features to train a strong classifier; Collecting real-time vibration signals of the non-contact sensor, obtaining the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features of the real-time vibration signals, inputting the real-time time-domain features, real-time frequency-domain features, and real-time time-frequency features into the weak classifier to obtain the output prediction probability value, and inputting the prediction probability value into the strong classifier to obtain the output snoring recognition result; Detecting the snoring recognition result, and based on the detection result, combining the prediction probability value to correct the snoring recognition result, and outputting the corrected final snoring result; The correcting the snoring recognition result based on the detection result and combining the prediction probability value includes: When the snoring recognition result is 1, performing a specificity detection on the snoring recognition result, and the specificity detection includes: Obtaining a specificity threshold, comparing the prediction probability of the snoring recognition result with the specificity threshold, and when the prediction probability of the snoring recognition result is less than the specificity threshold, correcting the snoring recognition result to 0; When the snoring recognition result is 0, performing a sensitivity detection on the snoring recognition result, and the sensitivity detection includes: Obtaining a sensitivity threshold, comparing the prediction probability of the snoring recognition result with the sensitivity threshold, and when the prediction probability of the snoring recognition result is greater than the sensitivity threshold, correcting the snoring recognition result to 1; Obtaining the original waveform diagram, respiratory waveform diagram, time-frequency diagram of the real-time vibration information, and the time-frequency waveform diagram obtained by summing all the frequency amplitudes in the time-frequency diagram; The specificity detection includes: Calculating the correlation coefficient between the respiratory waveform diagram and the time-frequency waveform diagram, and the calculation formula of the correlation coefficient includes: where r is the correlation coefficient, y is the value of each point in the time-frequency diagram, and x is the value of each point in the respiratory waveform diagram, represents the mean value of x, represents the mean value of y; Comparing the correlation coefficient with the specificity threshold, and when the correlation coefficient is greater than the specificity threshold, not correcting the snoring recognition, otherwise, correcting the snoring recognition result to 0; The sensitivity detection includes: Obtaining the wave peaks in the original waveform diagram and the wave valleys on both sides of the wave peaks, respectively calculating the absolute values of the slopes of each wave peak and the wave valleys on both sides, calculating the ratio of the two absolute values of the slopes on both sides of the wave peak, and determining whether the ratio is within a preset sensitivity interval; Counting the number of all wave peaks whose ratios are within the sensitivity interval, and when the number is greater than the sensitivity threshold, correcting the snoring recognition result to 1, otherwise, not correcting the snoring recognition; Construct a two - level model based on three weak classifier models and a strong classifier model. Specifically, the three weak classifier models construct the first - level model, and the strong classifier model constructs the second - level model; Inputting the real - time time - domain features, real - time frequency - domain features, and real - time time - frequency features into the weak classifier to obtain the output predicted probability values, including: Input the time - domain features into the first weak classifier to output the first probability; Input the first probability and the frequency - domain features into the second weak classifier to output the second probability; Input the first probability, the second probability, and the time - frequency features into the third weak classifier to output the third probability.

2. The method according to claim 1, wherein The weak classifier includes: Random forest, support vector machine, or LightGBM.

3. The method according to claim 1, wherein The pre - processing includes: Data segmentation and slicing, missing value filling, denoising processing, normalization processing, and feature enhancement.

4. A snoring recognition system based on a non-contact sensor, characterized in that, The system includes; A pre - processing module, which is used to obtain the historical vibration data collected by the non - contact sensor and pre - process the historical vibration data to obtain the vibration signals of multiple time windows; A calculation module, which is used to calculate the time - domain features of the vibration signal, perform Fourier transform on the vibration signal to obtain the frequency - domain features of the vibration signal, and perform short - time Fourier transform on the vibration signal to obtain the time - frequency features of the vibration signal; A training module, which is used to establish corresponding data sets based on the time - domain features, frequency - domain features, and time - frequency features respectively, train the weak classifier model according to the data sets, and use the prediction results of the weak classifier as input features to train the strong classifier; An identification module, which is used to collect the real - time vibration signal of the non - contact sensor, obtain the real - time time - domain features, real - time frequency - domain features, and real - time time - frequency features of the real - time vibration signal, input the real - time time - domain features, real - time frequency - domain features, and real - time time - frequency features into the weak classifier to obtain the output predicted probability values, and input the predicted probability values into the strong classifier to obtain the output snoring identification result; A correction module, which is used to detect the snoring identification result, and based on the detection result, combine the predicted probability value to correct the snoring identification result and output the corrected final snoring result; A specificity detection module, which is used to perform specificity detection on the snoring identification result when the snoring identification result is 1. The specificity detection includes: obtaining a specificity threshold, comparing the predicted probability of the snoring identification result with the specificity threshold, and when the predicted probability of the snoring identification result is less than the specificity threshold, correcting the snoring identification result to 0; A sensitivity detection module, which is used to perform sensitivity detection on the snoring identification result when the snoring identification result is 0. The sensitivity detection includes: obtaining a sensitivity threshold, comparing the predicted probability of the snoring identification result with the sensitivity threshold, and when the predicted probability of the snoring identification result is greater than the sensitivity threshold, correcting the snoring identification result to 1; Obtain the original waveform diagram, respiratory waveform diagram, time - frequency diagram of the real - time vibration information, and the time - frequency waveform diagram obtained by summing all the frequency amplitudes in the time - frequency diagram; The specificity detection includes: Calculate the correlation coefficient between the respiratory waveform diagram and the time - frequency waveform diagram. The calculation formula of the correlation coefficient includes: Among them, r is the correlation coefficient, y is the value of each point in the time-frequency diagram, and x is the value of each point in the respiratory waveform diagram; Compare the correlation coefficient with the specificity threshold. When the correlation coefficient is greater than the specificity threshold, no correction is made to the snore recognition. Otherwise, the snore recognition result is corrected to 0; The sensitivity detection includes: Obtain the peaks in the original waveform diagram and the troughs on both sides of the peaks, calculate the absolute values of the slopes of each peak and the troughs on both sides respectively, calculate the ratio of the two absolute values of the slopes on both sides of the peak, and determine whether the ratio is within the preset sensitivity interval; Count the number of all peaks whose ratios are within the sensitivity interval. When the number is greater than the sensitivity threshold, correct the snore recognition result to 1. Otherwise, no correction is made to the snore recognition; The two-stage model module is used to construct a two-stage model based on three weak classifier models and a strong classifier model. The three weak classifier models construct the first-stage model, and the strong classifier model constructs the second-stage model; The weak classifier module is used to input the time-domain features into the first weak classifier to output the first probability; input the first probability and the frequency-domain features into the second weak classifier to output the second probability; input the first probability, the second probability, and the time-frequency features into the third weak classifier to output the third probability.

5. An electronic device, comprising a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1-3.

6. A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of claims 1-3 is implemented.

Citation Information

Patent Citations

  • Short-time and long-time feature modeling fusion-based environmental sound recognition method and device

    CN105654944A