A sleep quality optimization method and system based on user's sleep pattern
By monitoring and analyzing the sound during the user's sleep process in real time, establishing the correspondence between sound characteristics and the sleep stage, solving the convenience and accuracy of the existing sleep monitoring technology, and achieving personalized sound stimulation and sleep quality optimization.
Patent Information
- Application Number
- CN202410691132.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing sleep monitoring technology has problems such as complex operation, inconvenience, comfort and wear stability, and the accuracy and data reliability are greatly affected by environmental interference.
The sound acquisition device monitors and records the user's sound during sleep in real time, performs preprocessing and analysis, establishes the correspondence between sound characteristics and the sleep stage, evaluates the sleep quality status, and controls the sound output device to play sound stimulation based on the evaluation results to optimize sleep quality.
It improves the accuracy and user experience of sleep monitoring, provides personalized sound stimulation, optimizes sleep quality, and improves user sleep experience and satisfaction.
Smart Images

Figure CN118675547B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech or sound processing technology, and in particular to a method and system for optimizing sleep quality based on a user's sleep pattern. Background Art
[0002] With the improvement of living standards and people's increasing attention to health, sleep quality has gradually become one of the focuses of people's attention. In the past few decades, the field of sleep science has made great progress, and sleep monitoring and optimization technology has also received great attention and development. Sleep monitoring technology has undergone many technological innovations and advances, from the initial use of polysomnography (EEG) and oculography (EOG) for sleep research to the later sleep monitoring technology based on wearable devices and smartphones.
[0003] The development of these technologies enables people to understand their sleep status more conveniently and accurately, so as to manage and optimize sleep in a targeted manner.
[0004] However, existing sleep monitoring technology still has some shortcomings. For example, traditional sleep monitoring technology usually requires users to wear multiple sensors or devices, which is complicated and inconvenient to operate; sleep monitoring based on wearable devices has problems with comfort and wearing stability; and the sleep monitoring accuracy and data reliability of devices such as smartphones are greatly affected by environmental interference.
[0005] Therefore, it is necessary to seek a more convenient and accurate sleep monitoring and optimization method to meet people's needs for sleep health management. Summary of the invention
[0006] In view of the above problems existing in the existing sleep monitoring technology, the present invention is proposed.
[0007] Therefore, the problem to be solved by the present invention is how to provide a method and system for optimizing sleep quality based on the sleep pattern of the user.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] In the first aspect, an embodiment of the present invention provides a method for optimizing sleep quality based on a user's sleep pattern, which includes: monitoring and recording the sound of the user during sleep in real time through a sound collection device, and performing preprocessing; analyzing the collected sound features; establishing a correspondence between the sound features and the sleep stages; evaluating the current sound features and mapping them to the correspondence to determine the user's current sleep quality status; controlling the sound output device to play sound stimulation according to the evaluated sleep quality status to optimize the user's sleep quality; continuously monitoring the sound of the user during sleep, analyzing changes in sleep quality, and adjusting the sound output in real time to form a closed-loop control.
[0010] As a preferred solution of the sleep quality optimization method based on the user's sleep pattern of the present invention, the sound collection device is arranged within an appropriate range from the user's sleeping position to obtain clear sound without disturbing the user's sleep. The specific arrangement distance is as follows: In order to ensure that the user's sleep is not disturbed, it is necessary to consider that the propagation time of the sound cannot exceed the user's maximum acceptable delay time, that is, t 0 ≤L; Determine the maximum distance for sound collection equipment:
[0011]
[0012] Among them, L 0 is the layout distance of the sound collection equipment; c is the sound propagation speed; t 0 is the time for sound propagation; L is the maximum acceptable delay time for sound.
[0013] As a preferred solution of the sleep quality optimization method based on the user's sleep pattern of the present invention, the process of establishing the correspondence between the sound features and the sleep stages is as follows: using data mining methods to discover potential patterns and laws from a large amount of data; building a mapping model between sound features and sleep stages:
[0014] θ=f(S,R,A,D,M)
[0015]
[0016] Among them, S is the sound feature; R is the breathing frequency; A is the breathing amplitude; D is the snoring frequency; M is the rapid eye movement sleep sign; θ is the sleep stage; the established mapping model is evaluated using the reserved test data set, and the classification accuracy index is calculated.
[0017] As a preferred solution of the sleep quality optimization method based on the user's sleep pattern of the present invention, the calculation process of the classification accuracy index is as follows:
[0018]
[0019] Among them, Acc is the classification accuracy index; TP is the number of true positives; TN is the number of true negatives; FP is the number of false positives; FN is the number of false negatives; N is the number of samples in the data set; 0≤Acc≤1, where Acc=1 indicates the highest classification accuracy; Acc=0 indicates a completely wrong classification; when Acc>the set accuracy threshold, the classification accuracy is considered to meet the standard.
[0020] As a preferred solution of the sleep quality optimization method based on the user's sleep pattern described in the present invention, wherein: controlling the sound output device to play sound stimulation according to the evaluated sleep quality state includes the following steps: designing a sound stimulation scheme, and selecting appropriate sound stimulation according to different sleep quality states; connecting the sound output device to the control system to realize the automatic playback function; collecting feedback on the sound stimulation effect, and continuously optimizing the sound stimulation scheme according to the user's subjective feelings and objective sleep quality data.
[0021] As a preferred solution of the sleep quality optimization method based on the user's sleep pattern of the present invention, the analysis of sleep quality changes and real-time adjustment of sound output include the following steps: after the sound stimulation starts to be played, an evaluation time window is set; within the evaluation time window, the system will continuously monitor the user's sound data; determine whether the breathing pattern within the evaluation time window has entered a relaxed and regular breathing state, and determine whether the sleep quality has improved. The specific formula is as follows:
[0022]
[0023] Among them, S is the breathing sound feature; D is the snoring sound feature; θ is the sleep stage; SQ is the evaluation index of sleep quality; RS 1 and DS 1 Represents breathing sound and snoring sound data, RS 2 and DS 2 represents normalized breathing sound and snoring sound data; t 1 ,t 2 represents the time window of monitoring; N represents the number of samples in the data set; when SQ = 0, it means that the sleep quality has not improved; when SQ is continuously at (0, threshold S0] within the time window, it proves that the sleep quality is still low; if SQ is at (threshold S 0, +∞), it means that the sleep quality has improved significantly; if it is judged that the sleep quality has not improved, try to adjust the sound type, volume or playback mode parameters; if the time T K If the internal score is still low, the sound output will be paused and the user will be prompted to intervene manually.
[0024] In the second aspect, in order to further solve the problems existing in the existing sleep monitoring technology, the embodiment of the present invention provides a sleep quality optimization system based on the user's sleep pattern, which includes:
[0025] The acquisition module is used to monitor and record the sound of the user during sleep in real time and perform preprocessing; the analysis module is used to analyze the collected sound features; the mapping module is used to establish the correspondence between the sound features and the sleep stages; the evaluation module is used to evaluate the current sound features and map them to the correspondence to determine the user's current sleep quality status; the control module controls the sound output device to play sound stimulation according to the evaluated sleep quality status to optimize the user's sleep quality; the monitoring module continuously monitors the sound of the user during sleep, analyzes changes in sleep quality, and adjusts the sound output in real time to form a closed-loop control.
[0026] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for optimizing sleep quality based on the user's sleep pattern as described in the first aspect of the present invention is implemented.
[0027] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the method for optimizing sleep quality based on the user's sleep pattern as described in the first aspect of the present invention is implemented.
[0028] The beneficial effects of the present invention are as follows: the present invention arranges the sound collection device within an appropriate distance to obtain clear sound without disturbing the user's sleep. In the process of determining the arrangement distance, the factor that the sound propagation time does not exceed the user's maximum acceptable delay time is considered to ensure that the collected sound data is representative and does not affect the user's sleep quality, thereby improving the accuracy of sleep monitoring and user experience; a mapping model is constructed and evaluated, and the relationship between sound characteristics and sleep status is deeply analyzed; the mapping model between sound characteristics and sleep status is evaluated and verified, thereby verifying the effectiveness and accuracy of the model, and providing a basis for subsequent sleep quality evaluation and adjustment; the sound output is adjusted according to the sleep status monitored in real time, and personalized sound stimulation is provided to the user, thereby optimizing sleep quality and improving the user's sleep experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0030] Figure 1 This is a flow chart of the sleep quality optimization method based on the user's sleep pattern in Example 1.
[0031] Figure 2 This is a structural diagram of the sleep quality optimization system based on the user's sleep pattern in Example 1. DETAILED DESCRIPTION
[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0034] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0035] Example 1
[0036] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a method for optimizing sleep quality based on a user's sleep pattern, comprising the following steps:
[0037] S1: Use a microphone or other sound collection device to monitor and record the user's breathing sounds, snoring sounds, etc. during sleep in real time and perform pre-processing.
[0038] Specifically, one or more microphones or other sound collection devices are arranged in the user's sleeping environment. These devices should be arranged within an appropriate range from the user's sleeping position to obtain clear sound. The devices are connected to a computer system or embedded system to collect sound data in real time.
[0039] The equipment layout follows the following principles: the distance should not be too close to avoid affecting the user's sleep, and the distance should not be too far to avoid unclear sound. The specific layout is as follows:
[0040] The distance that sound travels can be calculated by multiplying the speed of sound by the time it takes to travel:
[0041] L=ct
[0042] In order to ensure that the user's sleep is not disturbed, it is also necessary to consider that the propagation time of the sound cannot exceed the user's maximum acceptable delay time, that is, t≤L;
[0043] The maximum distance for sound collection equipment can be determined:
[0044]
[0045] Among them, L is the layout distance of the sound collection equipment (unit: meter); c is the sound propagation speed (unit: meter / second); t is the sound propagation time (unit: second); L is the maximum acceptable delay time of the sound (unit: second).
[0046] Preprocessing includes preprocessing the collected sound data, such as denoising, segmentation, etc., to extract useful sound features.
[0047] Specifically, the collected original sound data is denoised to eliminate interference such as background noise and current noise; the effective speech segments in the sound signal are detected using methods such as energy criteria, and the breathing sounds and snoring sounds are separated. After segmentation, pure breathing sound segments and snoring sound segments are obtained.
[0048] S2: Analyze the characteristics of breathing sounds and snoring sounds, including parameters such as amplitude, frequency, and duration.
[0049] Specifically, digital signal processing technology is used to analyze the preprocessed sound data and extract key characteristic parameters. For example, the amplitude can be obtained by calculating the peak value or effective value of the sound waveform; the frequency can be obtained through spectrum analysis methods such as Fourier transform. The main frequency of breathing sounds is usually in the range of 200-600 Hz, while the main frequency of snoring sounds is lower, in the range of 30-300 Hz; the duration can be calculated by detecting the starting and ending points of the sound signal.
[0050] S3: Establish the correspondence between sound features and sleep stages.
[0051] Specifically, through a large number of experiments and data collection, we study the breathing patterns and snoring patterns during different sleep stages (such as light sleep, deep sleep, rapid eye movement sleep, etc.), analyze the changing patterns of sound characteristics such as breathing frequency, breathing depth (amplitude), snoring frequency, and duration in each sleep stage, and establish a correspondence between sound characteristics and sleep stages for subsequent automatic judgment.
[0052] Specifically, the process of establishing the correspondence between sound features and sleep stages is as follows:
[0053] Use data mining methods to discover potential patterns and regularities from large amounts of data, such as higher breathing rate and amplitude and less regular breathing during light sleep, lower breathing rate and amplitude and regular breathing during deep sleep, more frequent snoring, and dramatic changes in breathing rate and amplitude during rapid eye movement sleep.
[0054] Build a mapping model between sound features and sleep stages:
[0055] θ=f(S,R,A,D,M)
[0056]
[0057] Among them, S is the sound feature; R is the breathing frequency; A is the breathing amplitude; D is the snoring frequency; M is the rapid eye movement sleep sign; θ is the sleep stage (the values are light sleep, deep sleep, and rapid eye movement sleep); f() represents a complex information filtering function, which is used to process the noise and uncertainty of the data; the combination forms a complex mapping model, which can reflect the relationship between the sound features and the sleep stages to a certain extent, and can be mapped to different sleep stages according to the specific data and parameter values.
[0058] Use the reserved test data set to evaluate the established mapping model and calculate the classification accuracy index:
[0059]
[0060] Among them, Acc is the classification accuracy index; TP is the number of true positives; TN is the number of true negatives; FP is the number of false positives; FN is the number of false negatives; N represents the number of samples in the data set.
[0061] 0≤Ac c≤1, where Acc=1 indicates the highest classification accuracy, and Acc=0 indicates a completely wrong classification; when Acc>the set accuracy threshold, the classification accuracy is considered to meet the standard.
[0062] The mapping model that reaches the classification accuracy standard is used as the final mapping model.
[0063] Analyze error cases and identify weak links in the model, such as high recognition error rates for certain special sleep patterns.
[0064] It should be noted that different individuals may have differences in breathing patterns, snoring conditions, etc., which will affect the distribution of sound features. For a specific individual, the parameters of the mapping model can be fine-tuned based on their small amount of sleep data to obtain a personalized classification model.
[0065] In the absence of individual data, techniques such as cluster analysis can also be used to divide individuals into different categories and train an adaptive model for each category.
[0066] S 4: Evaluate the current sound features and map them into corresponding relationships to determine the user's current sleep quality status.
[0067] Preferably, the algorithm is integrated into a dedicated sound monitoring device or application to detect and extract the user's breathing sound and snoring sound features in real time, input the extracted features into the recognition algorithm, continuously judge the current sleep state, and determine the user's entire sleep process and sleep cycle pattern based on changes in the sleep state.
[0068] S 5: According to the assessed sleep quality status, control the sound output device to play appropriate sound stimulation, such as white noise, natural sounds, etc., to optimize the user's sleep quality.
[0069] S5.1: Design a sound stimulation program and select appropriate sound stimulation according to different sleep quality states.
[0070] When the sleep stage is light sleep, that is, the user is in a state of light sleep or poor sleep quality, soothing sounds such as white noise, waves, rain, etc. can be played to help fall asleep or maintain sleep.
[0071] If sleep is interrupted by an overly noisy environment, play sounds such as masking noise to isolate external interference.
[0072] When the sleep stage is deep sleep, that is, the user is in an abnormal state such as deep sleep or sleep apnea, natural sounds of moderate intensity (such as birdsong) can be played as a mild wake-up stimulus.
[0073] S5.2: Connect the sound output device (such as speakers, headphones, etc.) to the control system to realize the automatic playback function.
[0074] Monitor the user's sleep quality status in real time, and automatically control the sound output device to play the corresponding sound according to the preset sound stimulation plan.
[0075] Set multiple working modes, such as fully automatic mode, manual mode, etc. to meet different needs.
[0076] S5.3: Collect feedback on the sound stimulation effects, and continuously optimize the sound stimulation program based on the user's subjective feelings and objective sleep quality data to improve personalization and accuracy.
[0077] S 6: Continuously monitor the user's voice, analyze changes in sleep quality, and adjust the sound output in real time to form a closed-loop control.
[0078] Preferably, after the sound stimulation starts playing, an evaluation time window is set, such as 30 minutes or 1 hour. During this time window, the system will continue to monitor the user's breathing sounds, snoring sounds and other data.
[0079] Evaluate the breathing pattern within the window to determine whether you have entered a more relaxed and regular breathing state, evaluate snoring, and determine whether your sleep quality has improved based on changes in snoring frequency and sound intensity. The specific formula is as follows:
[0080]
[0081] Where S is the breathing sound feature; D is the snoring sound feature; θ is the sleep stage; SQ is the evaluation index of sleep quality; RS and DS represent the breathing sound and snoring sound data, RS and DS represent the normalized breathing sound and snoring sound data; t and t represent the monitoring time window; N represents the number of samples in the data set.
[0082] When SQ=0, it means that the sleep quality has not improved. When SQ is continuously at (0, threshold S0] within the time window, it proves that the sleep quality is still low. If SQ is at (threshold S0, +∞), it means that the sleep quality has improved significantly.
[0083] If you judge that the sleep quality has not improved, you can try to adjust parameters such as sound type, volume, and playback mode. If the score remains low for a long time, you can pause the sound output and prompt the user to intervene manually.
[0084] The present embodiment also provides a sleep quality optimization system based on the user's sleep pattern, including: an acquisition module, which is used to monitor and record the sound of the user during sleep in real time and perform preprocessing; an analysis module, which is used to analyze the acquired sound features; a mapping module, which is used to establish a correspondence between the sound features and the sleep stages; an evaluation module, which is used to evaluate the current sound features and map them to the correspondence to determine the user's current sleep quality status; a control module, which controls the sound output device to play sound stimulation according to the evaluated sleep quality status to optimize the user's sleep quality; a monitoring module, which continuously monitors the sound of the user during sleep, analyzes changes in sleep quality, and adjusts the sound output in real time to form a closed-loop control.
[0085] This embodiment also provides a computer device, which is suitable for the case of a sleep quality optimization method based on a user's sleep pattern, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to implement the sleep quality optimization method based on the user's sleep pattern as proposed in the above embodiment.
[0086] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0087] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the sleep quality optimization method based on the user's sleep pattern as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0088] In summary, the present invention arranges the sound collection equipment within an appropriate distance to obtain clear sound without disturbing the user's sleep. In the process of determining the arrangement distance, the factor that the sound propagation time does not exceed the user's maximum acceptable delay time is considered to ensure that the collected sound data is representative and does not affect the user's sleep quality, thereby improving the accuracy of sleep monitoring and user experience; a mapping model is constructed and evaluated, and the relationship between sound characteristics and sleep status is deeply analyzed; the mapping model between sound characteristics and sleep status is evaluated and verified, thereby verifying the effectiveness and accuracy of the model, and providing a basis for subsequent sleep quality evaluation and adjustment; the sound output is adjusted according to the sleep status monitored in real time, and personalized sound stimulation is provided to the user, thereby optimizing sleep quality and improving the user's sleep experience and satisfaction.
[0089] Example 2
[0090] Reference Figure 1-2 , which is the second embodiment of the present invention, in order to further verify the advancement of the present invention, experimental simulation data of a sleep quality optimization method based on a user's sleep pattern are provided.
[0091] In an experiment, two microphone devices were arranged, placed on the left and right sides 2 meters away from the user's sleeping position to ensure that the user's sleeping sounds are fully collected.
[0092] The microphone device is connected to a computer system, which collects sound data in real time and separates out the breathing sounds and snoring sound fragments.
[0093] Through digital signal processing technology, the amplitude, frequency, duration and other parameters of breathing sounds and snoring sounds are extracted; the present invention discovers the sound characteristic patterns in different sleep stages through data mining methods, evaluates the sound characteristics collected in real time based on the established mapping model, and judges the user's current sleep quality status based on the model.
[0094] Based on the evaluation results, an appropriate sound stimulation scheme was selected and output to the speaker device to achieve the automatic playback function.
[0095] In the experiment, it was found that adjusting the sound stimulation according to the sleep state has a significant optimization effect on the user's sleep quality, as follows:
[0096] Table 1 Sleep monitoring data of different subjects
[0097]
[0098] From the data in the above table, we can see that there are differences in breathing rate, breathing amplitude and snoring frequency among different test subjects during sleep.
[0099] The sleep quality scores of test subjects 1 and 3 were higher, while the sleep quality scores of test subjects 2 and 4 were lower. This shows that our invention can make personalized adjustments according to the sleep status of different users during implementation, thereby optimizing the sleep quality of users.
[0100] The method of the present invention achieves remarkable results by analyzing the characteristics of breathing sounds and snoring sounds, judging the user's current sleep state according to the established mapping model, and then adjusting the sound stimulation according to the evaluation results.
[0101] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for optimizing sleep quality based on a user's sleep pattern, characterized in that: include: The sound collection device monitors and records the user's sound during sleep in real time and pre-processes the sound; Analyze the collected sound characteristics; Establishing a correspondence between sound characteristics and sleep stages; Evaluate the current sound characteristics and map them into corresponding relationships to determine the user's current sleep quality status; According to the assessed sleep quality status, the sound output device is controlled to play sound stimulation to optimize the user's sleep quality; Continuously monitor the sound of the user during sleep, analyze changes in sleep quality, and adjust the sound output in real time to form a closed-loop control; The sound collection device is arranged within an appropriate range from the user's sleeping position to obtain clear sound without disturbing the user's sleep. The specific arrangement distance is as follows: To ensure that the user's sleep is not disturbed, it is necessary to consider that the propagation time of the sound cannot exceed the user's maximum acceptable delay time, that is, t0≤L; Determine the maximum distance for sound collection equipment: Among them, L0 is the layout distance of the sound collection equipment; c is the speed of sound propagation; t0 is the time of sound propagation; L is the maximum acceptable delay time of the sound; The process of establishing the correspondence between the sound features and the sleep stages is as follows: Use data mining methods to discover potential patterns and regularities from large amounts of data; Build a mapping model between sound features and sleep stages: θ=f(S,R,A,D,M) Among them, S is the sound feature; R is the breathing frequency; A is the breathing amplitude; D is the snoring frequency; M is the rapid eye movement sleep sign; θ is the sleep stage, which can be light sleep, deep sleep, and rapid eye movement sleep; The established mapping model is evaluated using the reserved test dataset and the classification accuracy index is calculated; The calculation process of the classification accuracy index is as follows: Among them, Acc is the classification accuracy index; TP is the number of true positives; TN is the number of true negatives; FP is the number of false positives; FN is the number of false negatives; N represents the number of samples in the data set; 0≤Acc≤1, where Acc=1 indicates the highest classification accuracy; Acc=0 indicates a completely wrong classification; When Acc> the set accuracy threshold, the classification accuracy is considered to meet the standard; The method of analyzing the change in sleep quality and adjusting the sound output in real time includes the following steps: After the sound stimulus starts playing, an evaluation time window is set; During the evaluation time window, the system will continuously monitor the user's voice data; The specific formula for judging whether the breathing pattern within the evaluation time window has entered a relaxed and regular breathing state and whether the sleep quality has improved is as follows: Among them, S is the breathing sound feature; D is the snoring sound feature; SQ is the evaluation index of sleep quality; RS1 and DS1 represent the breathing sound and snoring sound data, RS2 and DS2 represent the normalized breathing sound and snoring sound data; t1 and t2 represent the monitoring time window; N represents the number of samples in the data set; When SQ = 0, it means that the sleep quality has not improved; when SQ is continuously at (0, threshold S0] within the time window, it proves that the sleep quality is still low; if SQ is at (threshold S0, +∞), it means that the sleep quality has improved significantly; If you judge that your sleep quality has not improved, try adjusting the sound type, volume or playback mode parameters; If time T K If the internal score remains low, the sound output will be paused and the user will be prompted to intervene manually.
2. The method for optimizing sleep quality based on the user's sleep pattern according to claim 1, characterized in that: The step of controlling the sound output device to play sound stimulation according to the evaluated sleep quality state comprises the following steps: Design a sound stimulation program and select appropriate sound stimulation according to different sleep quality states; Connect the sound output device to the control system to realize the automatic playback function; Collect feedback on the sound stimulation effects, and continuously optimize the sound stimulation plan based on the user's subjective feelings and objective sleep quality data.
3. A sleep quality optimization system based on a user's sleep pattern, based on the sleep quality optimization method based on a user's sleep pattern according to any one of claims 1 to 2, characterized in that: include: The acquisition module is used to monitor and record the user's sound during sleep in real time and perform pre-processing; An analysis module, used to analyze the collected sound characteristics; A mapping module for establishing a correspondence between sound features and sleep stages; An evaluation module is used to evaluate the current sound characteristics and map them into corresponding relationships to determine the user's current sleep quality status; A control module controls the sound output device to play sound stimulation according to the assessed sleep quality status to optimize the user's sleep quality; The monitoring module continuously monitors the sound of the user during sleep, analyzes changes in sleep quality, and adjusts the sound output in real time to form a closed-loop control; The sound collection device is arranged within an appropriate range from the user's sleeping position to obtain clear sound without disturbing the user's sleep. The specific arrangement distance is as follows: To ensure that the user's sleep is not disturbed, it is necessary to consider that the propagation time of the sound cannot exceed the user's maximum acceptable delay time, that is, t0≤L; Determine the maximum distance for sound collection equipment: Among them, L0 is the layout distance of the sound collection equipment; c is the speed of sound propagation; t0 is the time of sound propagation; L is the maximum acceptable delay time of the sound; Use data mining methods to discover potential patterns and regularities from large amounts of data; Build a mapping model between sound features and sleep stages: θ=f(S,R,A,D,M) Among them, S is the sound feature; R is the breathing frequency; A is the breathing amplitude; D is the snoring frequency; M is the rapid eye movement sleep sign; θ is the sleep stage, which can be light sleep, deep sleep, and rapid eye movement sleep; The established mapping model is evaluated using the reserved test dataset and the classification accuracy index is calculated; The calculation process of the classification accuracy index is as follows: Among them, Acc is the classification accuracy index; TP is the number of true positives; TN is the number of true negatives; FP is the number of false positives; FN is the number of false negatives; N represents the number of samples in the data set; 0≤Acc≤1, where Acc=1 indicates the highest classification accuracy; Acc=0 indicates a completely wrong classification; When Acc> the set accuracy threshold, the classification accuracy is considered to meet the standard; The method of analyzing the change in sleep quality and adjusting the sound output in real time includes the following steps: After the sound stimulus starts playing, an evaluation time window is set; During the evaluation time window, the system will continuously monitor the user's voice data; The specific formula for judging whether the breathing pattern within the evaluation time window has entered a relaxed and regular breathing state and whether the sleep quality has improved is as follows: Among them, S is the breathing sound feature; D is the snoring sound feature; SQ is the evaluation index of sleep quality; RS1 and DS1 represent the breathing sound and snoring sound data, RS2 and DS2 represent the normalized breathing sound and snoring sound data; t1 and t2 represent the monitoring time window; N represents the number of samples in the data set; When SQ = 0, it means that the sleep quality has not improved; when SQ is continuously at (0, threshold S0] within the time window, it proves that the sleep quality is still low; if SQ is at (threshold S0, +∞), it means that the sleep quality has improved significantly; If you judge that your sleep quality has not improved, try adjusting the sound type, volume or playback mode parameters; If time T K If the internal score remains low, the sound output will be paused and the user will be prompted to intervene manually.
Citation Information
Patent Citations
Method for Detecting Sleep Quality through Sound Acquisition
CN110710954A
Deep sound stimulation system and method for sleep regulation
CN110841169A
Cited By
Sleep state evaluation system and method based on time series data analysis
CN122642836A