A Snoring Detection Method and System Based on an Intelligent Bed
By acquiring and preprocessing user sleep information, a personalized model is constructed to detect snoring, which solves the problem of piezoelectric sensor detection error, and achieves accurate snoring recognition and personalized intervention.
Patent Information
- Application Number
- CN202510363173.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The existing snoring detection technology based on piezoelectric sensors is susceptible to interference with the bed movement, resulting in misdetection and the inability to accurately identify all types of snoring signals, especially for cases where individuals vary greatly.
By obtaining the user's sleep information, collecting and preprocessing sleep sounds and vibration signals, building training samples, selecting preset algorithms for model training, adjusting algorithms and combinations, generating personalized exclusive models to detect snoring, and triggering personalized intervention actions when snoring is detected.
More precise snoring detection is achieved, and exclusive models can be created based on individual characteristics, ensuring that each user obtains the most suitable snoring solution, reduces the rate of error detection and responds to snoring events in a timely manner.
Smart Images

Figure CN119867667B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of snoring signal recognition, and particularly to a snoring detection method and system based on an intelligent bed. Background Art
[0002] Snoring is a common sleep disorder that not only disrupts the rest of others and affects social relationships but may also be a sign of more serious health problems. To solve this problem without invading bedroom privacy, intelligent beds are equipped with piezoelectric sensors that can unobtrusively monitor the vibrations caused by snoring without disturbing the user. When the sensor detects snoring, the intelligent bed automatically and smoothly adjusts the headboard angle to help improve breathing, effectively reducing or eliminating snoring and thus improving sleep quality.
[0003] However, although the snoring detection technology based on piezoelectric sensors has advantages in non-contact monitoring, there are also some limitations. First, it may be interfered by the movements of the bed body, resulting in false detection of snoring. In addition, due to technical limitations, it is unable to accurately identify all types of snoring signals. Especially for some special individuals, the signal characteristics generated when they snore may have obvious individual differences, resulting in undetectable snoring signals of this type. Summary of the Invention
[0004] In view of the problems existing in the prior art, an embodiment of the present invention provides a snoring detection method and system based on an intelligent bed.
[0005] An embodiment of the present invention provides a snoring detection method based on an intelligent bed, the method including:
[0006] Obtaining the sleep information of a user, collecting the sleep sound of the user based on the sleep information, and performing snoring marking on the sleep sound, where the sleep information includes snoring level and sleep time;
[0007] Collecting the sleep vibration signal of the user, preprocessing the sleep vibration signal to obtain a plurality of signal segments, and extracting the signal characteristics of the signal segments, where the signal characteristics include: time domain characteristics, frequency domain characteristics, and time-frequency characteristics;
[0008] Constructing a training sample through the sleep sound after snoring marking and the signal characteristics, randomly combining the signal characteristics in the training sample, selecting a preset algorithm to train the training sample under different random combinations, and during the training process, adjusting the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations;
[0009] Select the exclusive training model with a test accuracy greater than the preset threshold in the model training results, bind it to the user, and detect the user's sleep vibration signal based on the exclusive training model to determine whether there is snoring.
[0010] In one embodiment, the method further includes:
[0011] When the number of detected users is greater than 1, divide the corresponding model of the preset algorithm into different levels of sensitivity models;
[0012] Based on the snoring level selected by the user, select the sensitivity model of the corresponding level to detect the user's sleep vibration signal. When snoring is detected, trigger a preset intervention action.
[0013] In one embodiment, the method further includes:
[0014] Collect the user's vibration signal segments every 20 seconds, and detect whether there is the snoring mark in the vibration signal segments;
[0015] When the occurrence frequency of the snoring mark is greater than the preset frequency threshold, trigger a preset intervention action.
[0016] In one embodiment, the method further includes:
[0017] Divide the training samples into a training set and a test set;
[0018] The selection of the preset algorithm to train the training samples under different random combinations includes:
[0019] Select the preset algorithm to train the training set under different random combinations, and evaluate the model performance through the test set to obtain the test accuracy.
[0020] In one embodiment, the preprocessing includes:
[0021] Filtering, denoising, normalization processing, and feature enhancement.
[0022] An embodiment of the present invention provides a snoring detection system based on an intelligent bed. The system includes:
[0023] An acquisition module, configured to acquire the user's sleep information, collect the user's sleep sound based on the sleep information, and perform snoring marking on the sleep sound. The sleep information includes snoring level and sleep time;
[0024] A collection module, configured to collect the user's sleep vibration signal, perform preprocessing on the sleep vibration signal to obtain a plurality of signal segments, and extract the signal features of the signal segments. The signal features include: time domain features, frequency domain features, and time-frequency features;
[0025] A training module, configured to construct training samples through the sleep sounds marked with snoring sounds and signal features, randomly combine the signal features in the training samples, select a preset algorithm to train the training samples under different random combinations, and during the training process, adjust the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations;
[0026] A detection module, configured to select an exclusive training model with a test accuracy greater than a preset threshold in the model training results to bind to the user, and detect the sleep vibration signal of the user based on the exclusive training model to determine whether there is a snoring sound.
[0027] In one embodiment, the system further includes:
[0028] A partitioning module, configured to divide the models corresponding to the preset algorithms into different levels of sensitivity models when the number of detected users is greater than 1;
[0029] A selection module, configured to select a sensitivity model of the corresponding level based on the snoring level selected by the user to detect the sleep vibration signal of the user, and trigger a preset intervention action when a snoring sound is detected.
[0030] In one embodiment, the system further includes:
[0031] A collection module, configured to collect a fragment of the user's vibration signal every 20 seconds and detect whether the snoring sound mark exists in the fragment of the vibration signal;
[0032] A triggering module, configured to trigger a preset intervention action when the occurrence frequency of the snoring sound mark is greater than a preset frequency threshold.
[0033] An embodiment of the present invention provides an electronic device, including a processor and a memory;
[0034] The processor is connected to the memory;
[0035] The memory is used to store executable program codes;
[0036] 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.
[0037] An embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned snoring detection method based on an intelligent bed are implemented.
[0038] In view of the above, in one or more embodiments of this specification, the sleep information of a user is obtained, the sleep sound of the user is collected based on the sleep information, and a snoring mark is made on the sleep sound; the sleep vibration signal of the user is collected, preprocessed to obtain a plurality of signal segments, and the signal features of the signal segments are extracted; a training sample is constructed through the sleep sound after snoring marking and the signal features, the signal features in the training sample are randomly combined, and a preset algorithm is selected to train the training sample under different random combinations. During the training process, the preset algorithm and the random combination are adjusted to obtain the corresponding model training results under different preset algorithms and random combinations; a dedicated training model with a test accuracy greater than a preset threshold in the model training results is selected and bound to the user, and based on the dedicated training model, the sleep vibration signal of the user is detected to determine whether there is snoring. In this way, the specific characteristics of an individual can be utilized to create a dedicated individual model through separate training to achieve more accurate snoring detection and configure personalized intervention measures to ensure that each user can obtain the most suitable snoring solution for themselves. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 is a flowchart of a snoring detection method based on an intelligent bed provided by an embodiment of this specification.
[0041] Figure 2 is a schematic diagram of model training provided by an embodiment of this specification.
[0042] Figure 3 is a flowchart of a snoring detection and intervention process provided by an embodiment of this specification.
[0043] Figure 4 is a flowchart of another snoring detection method based on an intelligent bed provided by an embodiment of this specification.
[0044] Figure 5 is a schematic structural diagram of a snoring detection system based on an intelligent bed provided by an embodiment of this specification.
[0045] Figure 6 is a schematic structural diagram of an electronic device provided by an embodiment of this specification. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] Reference will now be made to example embodiments to discuss the subject matter described herein. It should be understood that the discussion of these embodiments is only for enabling 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. Changes can be made to the functions and arrangements of the elements discussed 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 methods described can be performed in an order different 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.
[0047] As used herein, the term "comprising" and its variants denote open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The term "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. can refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly specified in the context, the definition of a term is consistent throughout the specification.
[0048] As Figure 1 shown, an embodiment of the present invention provides a snoring detection method based on a smart bed, including:
[0049] Step S102, obtaining the sleep information of the user, collecting the sleep sound of the user based on the sleep information, and performing snoring marking on the sleep sound, where the sleep information includes snoring level and sleep time.
[0050] Specifically, in order to intelligently detect or intervene in the snoring information of the user, the sleep information of the user can be obtained to provide a data basis for subsequent steps. Among them, the acquisition method of sleep information can include active acquisition or passive input. Active acquisition can be to obtain the sleep audio of the user through the recording function of the bound terminal after connecting to the user's bound terminal. Passive input can be that the user directly inputs their own snoring situation (such as none, mild, moderate or severe), as well as sleep time, etc. through the bound terminal. Obtaining sleep information can further determine the intervention time of the smart bed for the user's snoring behavior.
[0051] Further, after determining the user's sleep information, the user's sleep sounds can be collected according to the sleep information. For example, the entire sleep process of the user can be recorded, or the recording can be segmented into segments of 20 seconds each, which helps to reduce the amount of data for a single processing unit. Then, each segment is analyzed by an audio classification model. Among them, the audio model can be a model that has been trained according to snoring samples and can directly judge whether the user snores based on the sound in the audio segment. After the snoring judgment, the sleep sound is marked with snoring, for example, marking "1" indicates snoring, and "0" indicates no snoring.
[0052] In addition, when marking the sleep sound with snoring, the start time of each audio segment should also be recorded. Recording the start time is beneficial to determining the time when the user snores and can help understand the user's snoring pattern, such as whether snoring is more frequent in a specific sleep stage.
[0053] Step S104: Collect the user's sleep vibration signal, preprocess the sleep vibration signal to obtain multiple signal segments, and extract the signal features of the signal segments. The signal features include: time domain features, frequency domain features, and time-frequency features.
[0054] Specifically, the vibration signal generated by the user during sleep can be collected through non-contact pressure sensors on the smart bed. The sensor can sense the minute changes on the mattress, such as the user's breathing pattern, turning over movement, etc. In addition, to ensure the time alignment of the vibration signal and the audio segment, the timestamps of the two need to be precisely synchronized. Comparing the audio segment, the vibration signal can also be sliced into segments of 20 seconds each, and the start time of these segments is ensured to be the same as the start time of the previously uploaded recorded marked segment to achieve synchronous analysis of the two.
[0055] Further, the preprocessing of the sleep vibration signal includes filtering, denoising, normalization, and feature enhancement. Among them, filtering can remove noise of specific frequencies through a digital filter (such as a band-stop filter) to improve the signal quality, and denoising can use a digital filter to remove environmental noise and other interference signals. Normalization processes the data to a unified standard. Feature enhancement includes smoothing processing, trend removal, etc.
[0056] Furthermore, signal features are extracted from the multiple preprocessed signal segments. The signal features include time-domain features, where statistical characteristics such as mean, standard deviation, maximum value, minimum value, peak-to-peak value, zero-crossing rate, etc. are extracted from the original vibration signal. Time-domain features can identify the regularity and anomalies in the signal, such as the periodic vibrations caused by snoring. Frequency-domain features are obtained by converting the time-domain signal to the frequency domain through Fourier transform (FFT) or other spectral analysis methods, and then calculating features such as power spectral density (PSD), dominant frequency, bandwidth, etc. Frequency-domain features play a significant role in distinguishing different types of vibration sources (such as snoring and other activities). Time-frequency features combine the information of the time domain and the frequency domain, and use techniques such as short-time Fourier transform (STFT) and wavelet transform to generate time-frequency representations. The time-frequency feature extraction method is suitable for capturing the frequency components of the signal that change over time, and helps to more accurately identify snoring events and their development processes.
[0057] Step S106: Construct training samples using the sleep sounds marked with snoring and the signal features, randomly combine the signal features in the training samples, select a preset algorithm to train the training samples under different random combinations. During the training process, adjust the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations.
[0058] Specifically, training samples are constructed based on the sleep sounds marked with snoring and the signal features, including collecting all segment labels marked as snoring (1) or non-snoring (0). These segment labels can be used for training and evaluating machine learning models during the model training process. Then, all time-domain, frequency-domain, and time-frequency features extracted from the intelligent bed vibration signal are included. These features include, but are not limited to, time-domain features such as mean, standard deviation, maximum value, minimum value, zero-crossing rate, etc.; frequency-domain features such as power spectral density, dominant frequency, bandwidth, etc.; and time-frequency features obtained through short-time Fourier transform or wavelet transform. These features are combined with the audio segment labels at the corresponding time to form new training samples.
[0059] In addition, the training samples can be divided into a training set and a test set. The training set is used to train the model, while the test set is used to evaluate the model performance.
[0060] Furthermore, randomly combine the signal features in the training samples. For example, according to the data domain division, combination one: mean, maximum value, minimum value, zero-crossing rate (time-domain features); combination two: power spectral density, main frequency, bandwidth, frequency center (frequency-domain features); combination three: the first five coefficients in the short-time Fourier transform result (time-frequency features); combination four: combination one + combination two (time-domain + frequency-domain). After determining the random combination, train the training samples under different random combinations according to a preset algorithm. The preset algorithm can be an algorithm library. For example, the algorithm library includes algorithms in multiple directions, such as XGBoost, linear regression, SVM (support vector machine), logistic regression, decision tree, random forest, naive Bayes, etc. Each algorithm has its own characteristics and applicable scenarios. For example, random forest is suitable for processing high-dimensional data and is not easily overfitted; SVM has good results for small sample size data; XGBoost is good at processing large-scale data sets. The process of adjusting the preset algorithm and random combination for random model training can, for example, take random forest as an example, combine the features of combination one, train the training set, and evaluate the model performance with the test set to obtain the initial test accuracy Acc1. Then adjust the preset algorithm and random combination, traverse all possible combinations, and pair other algorithms with other features, such as pairing the remaining three groups of features with other algorithms. After each iteration, a new test accuracy value will be obtained and recorded to form a test accuracy sequence Acc1, Acc2,..., Accmxn, where m is the number of algorithms and n is the number of feature combinations, as Figure 2 shown.
[0061] Step S108, select the exclusive training model with a test accuracy greater than the preset threshold in the model training results and bind it to the user, and detect the user's sleep vibration signal based on the exclusive training model to determine whether there is snoring.
[0062] Specifically, after determining the test accuracy values of all model training results, an exclusive training model with a test accuracy greater than the preset threshold can be selected and bound to the user. For example, the most accurate batch of training models or a training model is determined as the user's exclusive model, which becomes the basis for the user's personalized snoring detection. The smart bed can provide specific snoring detection for the user through this model, including detecting the user's sleep vibration signal. Specifically, it can detect the user's sleep vibration signal. When the corresponding label of the user's sleep vibration signal is 1 (snoring), it means the user has snoring, and then trigger corresponding intervention actions. For example, the smart bed will automatically perform the head-of-bed raising action to help improve breathing and reduce or stop snoring. It can also be set by the user, such as generating a slight vibration or emitting a small sound, etc., which will not be limited here.
[0063] Furthermore, the process of detecting and intervening in whether the user has snoring can be asFigure 3 As shown, based on the user-specific training model, a vibration signal segment can be analyzed every 20 seconds. If snoring is detected, a snoring mark is output. If the occurrence frequency of the snoring mark is greater than a preset frequency threshold, for example, 3 snoring marks appear within 1 minute, it indicates that the user has a snoring condition. Then, corresponding personalized intervention actions are triggered, such as raising the head of the bed. This high-frequency detection can ensure timely response to snoring events while maintaining a low false alarm rate.
[0064] In addition, when the number of detected users is greater than 1, a general detection model is trained according to the characteristics of the group snoring signal. According to different parameters, the model can be divided into a low-sensitivity model, a medium-sensitivity model, and a high-sensitivity model. When the model is trained, the positive and negative samples are balanced. For the low-sensitivity model, the precision of snoring detection is given priority during model training, and the recall rate is given secondary consideration; for the medium-sensitivity model, it is a balance between the precision and the recall rate; for the high-sensitivity model, the recall rate is given priority during model training, and the precision is given secondary consideration. The three models with different sensitivities can be the same algorithm model but with different model parameters. For example, they are all decision tree models, but parameters such as the depth of the tree and the number of leaf nodes are different; or they can be three different algorithm models, such as using a support vector machine model, a decision tree model, and a Bayesian model respectively. The selection of the model is finally determined based on the user's understanding of their own situation. If the user selects mild snoring on the APP, the model is automatically selected as the low-sensitivity model, which can effectively reduce the probability of false snoring detection; if the user selects moderate snoring, the model is automatically selected as the medium-sensitivity model, which can balance the results of snoring detection; if the user selects severe snoring, the model is automatically selected as the high-sensitivity model to ensure that the user can be effectively intervened when snoring. When snoring is detected, preset intervention actions can be triggered. For example, the smart bed will automatically perform the action of raising the head of the bed to help improve breathing and reduce or stop snoring. Thus, personalized snoring detection and intervention for multiple people are achieved.
[0065] Specifically, in this embodiment, the snoring detection method based on the smart bed can be as Figure 4As shown, it consists of 7 units, including the user basic information acquisition unit and the recording marking unit in step S102, which acquire the user's sleep information, collect the user's sleep sounds based on the sleep information, and mark snoring sounds through the sleep sounds. And the intelligent bed signal acquisition unit and the data processing unit in step S104, which collect the user's sleep vibration signals, preprocess the sleep vibration signals to obtain multiple signal segments, and extract the signal features of the signal segments. And the snoring model training unit, which constructs training samples through the sleep sounds and signal features, randomly combines the signal features in the training samples, selects a preset algorithm to train the training samples under different random combinations, and adjusts the preset algorithm and random combination during the training process to obtain the corresponding model training results under different preset algorithms and random combinations. Finally, it includes an individual snoring detection unit and a snoring intervention unit, which select the exclusive training model with a test accuracy greater than the preset threshold in the model training results and bind it to the user, and detect the user's sleep vibration signal based on the exclusive training model. When snoring is detected, a preset intervention action is triggered.
[0066] A snoring detection method based on an intelligent bed provided by an embodiment of the present invention acquires the user's sleep information, collects the user's sleep sounds based on the sleep information, and marks snoring sounds through the sleep sounds; collects the user's sleep vibration signals, preprocesses the sleep vibration signals to obtain multiple signal segments, and extracts the signal features of the signal segments; constructs training samples through the sleep sounds and signal features, randomly combines the signal features in the training samples, selects a preset algorithm to train the training samples under different random combinations, and adjusts the preset algorithm and random combination during the training process to obtain the corresponding model training results under different preset algorithms and random combinations; selects the exclusive training model with a test accuracy greater than the preset threshold in the model training results and binds it to the user, and detects the user's sleep vibration signal based on the exclusive training model. When snoring is detected, a preset intervention action is triggered. In this way, the specific characteristics of an individual can be utilized to create an exclusive individual model through separate training to achieve more accurate snoring detection, and personalized intervention measures can be configured to ensure that each user can obtain the most suitable snoring solution for themselves.
[0067] Please refer to Figure 5 , Figure 5 is a schematic structural diagram of a snoring detection system based on an intelligent bed provided by an embodiment of the present application. As Figure 5 shown, the system includes:
[0068] An acquisition module S502, configured to acquire the user's sleep information, collect the user's sleep sounds based on the sleep information, and mark snoring sounds for the sleep sounds, where the sleep information includes a snoring level and a sleep time;
[0069] The acquisition module S504 is used to acquire the user's sleep vibration signal, preprocess the sleep vibration signal to obtain multiple signal segments, and extract the signal features of the signal segments. The signal features include time domain features, frequency domain features, and time-frequency features.
[0070] The training module S506 is used to construct training samples through the sleep sounds marked with snoring sounds and signal features, randomly combine the signal features in the training samples, select a preset algorithm to train the training samples under different random combinations. During the training process, adjust the preset algorithm and random combination to obtain the corresponding model training results under different preset algorithms and random combinations.
[0071] The detection module S508 is used to select the exclusive training model with a test accuracy greater than the preset threshold in the model training results and bind it to the user, and detect the user's sleep vibration signal based on the exclusive training model to determine whether there is a snoring sound.
[0072] In another embodiment, a snoring detection system based on an intelligent bed further includes:
[0073] The partitioning module is used to divide the models corresponding to the preset algorithms into different levels of sensitivity models when the number of detected users is greater than 1.
[0074] The selection module is used to select the sensitivity model of the corresponding level to detect the user's sleep vibration signal based on the snoring level selected by the user, and trigger a preset intervention action when it is detected that there is a snoring sound.
[0075] In another embodiment, a snoring detection system based on an intelligent bed further includes:
[0076] The collection module is used to collect the user's vibration signal segments every 20 seconds and detect whether there is the snoring sound mark in the vibration signal segments.
[0077] The triggering module is used to trigger a preset intervention action when the occurrence frequency of the snoring sound mark is greater than the preset frequency threshold.
[0078] 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.
[0079] Each processing unit and / or module in the embodiments of the present application can be implemented by an analog circuit that implements 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.
[0080] See Figure 6 , which shows a schematic structural diagram of an electronic device involved in the embodiments of the present application. This electronic device can be used to implement Figure 1 the method in the illustrated embodiments. 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.
[0081] Among them, the communication bus 602 is used to realize the connection and communication between these components.
[0082] 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.
[0083] Among them, the network interface 604 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0084] Among them, the processor 601 may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts within the entire electronic device 600. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by calling data stored in the memory 605, it 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 a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. in a combination of one or several. Among them, the CPU mainly processes the operating system, user interface, and application programs, etc.; the GPU is responsible for rendering and drawing 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.
[0085] 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.
[0086] 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 based on image generation stored in the memory 605, and specifically perform the following operations: obtain the sleep information of the user, collect the sleep sound of the user based on the sleep information, and perform snoring marking through the sleep sound; collect the sleep vibration signal of the user, preprocess the sleep vibration signal to obtain a plurality of signal segments, and extract the signal features of the signal segments; construct a training sample through the sleep sound and the signal features, randomly combine the signal features in the training sample, select a preset algorithm to train the training sample under different random combinations, and during the training process, adjust the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations; select a dedicated training model whose test accuracy is greater than a preset threshold in the model training results and bind it to the user, and detect the sleep vibration signal of the user based on the dedicated training model. When snoring is detected, trigger a preset intervention action.
[0087] The present application also provides a computer-readable storage medium, on which a computer program is stored. 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.
[0088] 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 performed 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.
[0089] 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.
[0090] 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 coupling or direct coupling or communication connection between each other can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0091] 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 they 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.
[0092] In addition, in each embodiment of the present application, the various functional units can be integrated in a 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.
[0093] 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 this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this 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 such as USB flash drives, read-only memories (ROM), random access memories (RAM), external hard drives, magnetic disks, or optical discs that can store program codes.
[0094] 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.
[0095] 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 from that in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or consecutive order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A snoring detection method based on an intelligent bed, the method comprising: Obtaining the sleep information of a user, collecting the sleep sound of the user based on the sleep information, and performing snoring marking on the sleep sound, where the sleep information includes snoring level and sleep time; Collecting the sleep vibration signal of the user, preprocessing the sleep vibration signal to obtain a plurality of signal segments, and extracting the signal features of the signal segments, where the signal features include: time domain features, frequency domain features, and time-frequency features; Constructing a training sample through the sleep sound marked with snoring and the signal features, randomly combining the signal features in the training sample, selecting a preset algorithm to train the training sample under different random combinations, and during the training process, adjusting the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations; Selecting an exclusive training model with a test accuracy greater than a preset threshold in the model training results to be bound to the user, and detecting the sleep vibration signal of the user based on the exclusive training model to determine whether there is snoring; When the number of detected users is greater than 1, classifying the models corresponding to the preset algorithm into different levels of sensitivity models; Based on the snoring level selected by the user, selecting a sensitivity model of the corresponding level to detect the sleep vibration signal of the user, and when snoring is detected, triggering a preset intervention action.
2. The method according to claim 1, wherein The method further comprises: Collecting a vibration signal segment of the user every 20 seconds, and detecting whether the snoring marking exists in the vibration signal segment; When the occurrence frequency of the snoring marking is greater than a preset frequency threshold, triggering a preset intervention action.
3. The method according to claim 1, characterized in that, The method further comprises: Dividing the training sample into a training set and a test set; The step of selecting a preset algorithm to train the training sample under different random combinations includes: Selecting a preset algorithm to train the training set under different random combinations, and evaluating the model performance through the test set to obtain the test accuracy.
4. The method according to claim 1, wherein The preprocessing includes: Filtering, denoising processing, normalization processing, and feature enhancement.
5. A snoring detection system based on an intelligent bed, characterized in that, The system includes; An acquisition module, configured to obtain the sleep information of a user, collect the sleep sound of the user based on the sleep information, and perform snoring marking on the sleep sound, where the sleep information includes snoring level and sleep time; A collection module, configured to collect the sleep vibration signal of the user, preprocess the sleep vibration signal to obtain a plurality of signal segments, and extract the signal features of the signal segments, where the signal features include: time domain features, frequency domain features, and time-frequency features; A training module, configured to construct a training sample through the sleep sound marked with snoring and the signal features, randomly combine the signal features in the training sample, select a preset algorithm to train the training sample under different random combinations, and during the training process, adjust the preset algorithm and the random combination to obtain the corresponding model training results under different preset algorithms and random combinations; A detection module, configured to select an exclusive training model with a test accuracy greater than a preset threshold in the model training results to be bound to the user, and detect the sleep vibration signal of the user based on the exclusive training model to determine whether there is snoring; A partitioning module, configured to partition the corresponding model of the preset algorithm into different levels of sensitivity models when it is detected that the number of users is greater than 1; A selection module, configured to select a sensitivity model of the corresponding level based on the snoring level selected by the user to detect the user's sleep vibration signal, and trigger a preset intervention action when snoring is detected.
6. The system according to claim 5, wherein The system further includes: A collection module, configured to collect a user's vibration signal segment every 20 seconds and detect whether the snoring mark exists in the vibration signal segment; A trigger module, configured to trigger a preset intervention action when the occurrence frequency of the snoring mark is greater than a preset frequency threshold.
7. An electronic device, including a processor and a memory; The processor is connected to the memory; The memory is configured to store executable program code; The processor runs a 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-4.
8. A computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any one of claims 1-4.
Citation Information
Patent Citations
Method and device for monitoring apnea during sleep
CN111938650A
Electromyogram gait recognition and evaluation method and system based on machine learning
CN118902480A
Snore recognition method and system based on non-contact sensor
CN119226959A