Speaker sleep aid method, device, speaker and computer-readable storage medium
Obtain historical environment information through speakers, analyze the noise band and proportion, and adaptively select white noise music, which solves the problem of poor sleep aid effect in existing music and achieves faster and better sleep aid effect.
Patent Information
- Application Number
- CN202210606723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-05-31
AI Technical Summary
The existing music sleep aid method cannot select appropriate white noise music based on the user's environmental noise band, resulting in poor sleep aid.
The speaker obtains historical environmental information in sleep mode, analyzes the noise band and noise proportion, adaptively selects white noise music to match the ambient noise band, distracts the brain, and is supplemented with respiratory rate monitoring and lighting adjustment to improve sleep aid.
It achieves better sleep aid effects, reduces the time users use their brains, quickly enters sleep, saves electricity and avoids white noise and music interference from users who have fallen asleep.
Smart Images

Figure CN115083438B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of speaker technology, and in particular relates to a speaker sleep aid method, device, speaker, and computer-readable storage medium. Background Art
[0002] According to data, 27% of people worldwide have sleep problems, and among adults, 57% of the population has sleep problems. In today's society, not only many middle-aged and elderly people suffer from insomnia, but some young people are also troubled by insomnia. The incidence and severity of insomnia are also increasing year by year. Everyone has some signs of insomnia. The more serious ones are unable to sleep all night, and some people occasionally have trouble sleeping, which seriously affects people's health.
[0003] Currently, many methods have been proposed to help people quickly fall asleep, such as using scents, exercising, drinking hot drinks, isolating oneself from external distractions, using different sleeping positions, hugging pillows, and using music. Music-assisted sleep currently involves users downloading music to their phones to help them fall asleep. When they need music to help them fall asleep, they can simply control their phones to play the music they want.
[0004] Therefore, in the current music-aided sleep method, users search and select music to help them sleep according to their preferences, but the music they choose often fails to help them sleep and cannot achieve a good sleep-aiding effect. Summary of the Invention
[0005] The embodiments of the present application provide a method and device for aiding sleep with a speaker, a speaker, and a computer-readable storage medium, which can solve the problem of not being able to achieve a good sleep-aiding effect.
[0006] In a first aspect, an embodiment of the present application provides a method for aiding sleep with a speaker, comprising:
[0007] When the sleep mode is triggered, obtaining historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode;
[0008] Analyze the noise in the historical environmental information according to a preset noise frequency band and a corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environmental information belongs;
[0009] Analyze the noise frequency band of each sampling point to determine the noise proportion of each noise frequency band;
[0010] According to the noise proportion of each noise frequency band, select the corresponding white noise music to play to help you sleep.
[0011] In a second aspect, an embodiment of the present application provides a speaker sleep aid device, comprising:
[0012] An information acquisition module, configured to, when a sleep mode is triggered, acquire historical environmental information corresponding to a sleep time period according to the sleep time period carried in the sleep mode;
[0013] A noise analysis module, configured to analyze the noise in the historical environment information according to a preset noise frequency band and a corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs;
[0014] The noise ratio analysis module is used to analyze the noise frequency band to which the noise at each sampling point belongs and determine the noise ratio of each noise frequency band;
[0015] The music playing module is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0016] In a third aspect, an embodiment of the present application provides a speaker, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the speaker sleep-aiding method described in the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the speaker sleep-aiding method described in the first aspect above is implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a speaker, the speaker executes the speaker sleep-aiding method described in the first aspect above.
[0019] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0020] Compared with the prior art, the embodiments of the present application have the following beneficial effects: when the sleep mode is triggered, the historical environment information corresponding to the sleep time period can be obtained according to the sleep time period carried in the sleep mode; the noise in the historical environment information is analyzed according to the preset noise frequency band and the corresponding frequency interval, and the noise frequency band to which the noise at each sampling point in the historical environment information belongs is determined; the noise frequency band to which the noise at each sampling time point belongs is analyzed, and the noise proportion of each noise frequency band is determined; according to the noise proportion of each noise frequency band, the corresponding white noise music is adaptively selected to play for sleep aid, so that the played white noise music is close to the noise frequency band in the environment, so as to distract the brain's attention and achieve a better sleep aid effect, and can also reduce the time the user uses the brain and fall asleep faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 This is a flowchart of a method for aiding sleep using a speaker provided in Example 1 of the present application;
[0023] Figure 2 This is a flow chart of a method for aiding sleep using a speaker provided in Example 2 of the present application;
[0024] Figure 3 This is a flowchart of a method for aiding sleep using a speaker provided in Example 3 of the present application;
[0025] Figure 4 This is a flowchart of a method for aiding sleep using a speaker provided in the fourth embodiment of the present application;
[0026] Figure 5 This is a structural diagram of a speaker sleep aid device provided in Example 5 of the present application;
[0027] Figure 6 This is a structural diagram of a speaker sleep aid device provided in Example 6 of the present application;
[0028] Figure 7 This is a structural diagram of a speaker sleep aid device provided in Example 7 of the present application;
[0029] Figure 8 This is a structural diagram of a speaker sleep aid device provided in Example 8 of the present application;
[0030] Figure 9 This is a structural diagram of a speaker provided in Example 9 of the present application. DETAILED DESCRIPTION
[0031] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0033] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0034] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0035] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0036] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0037] It should be understood that the size of the serial numbers of each step in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.
[0038] In the existing technology, users mainly download music that can help them sleep on their mobile phones. When they need music to help them fall asleep, they can control their mobile phones to play the music they want to listen to. Therefore, the current music-assisted sleep method is that users search and select music according to their own preferences to help them sleep, but the selected music often does not have a good sleep-inducing effect and cannot achieve a good sleep-inducing effect.
[0039] The present application provides a method for aiding sleep with a speaker. When a sleep mode is triggered, historical environmental information corresponding to a sleep time period is obtained according to the sleep time period carried in the sleep mode; the noise in the historical environmental information is analyzed according to a preset noise frequency band and a corresponding frequency interval, and the noise frequency band to which the noise at each sampling point in the historical environmental information belongs is determined; the noise frequency band to which the noise at each sampling time point belongs is analyzed, and the noise proportion of each noise frequency band is determined; and according to the noise proportion of each noise frequency band, corresponding white noise music is adaptively selected for sleep aid playback to solve the above-mentioned problem, so that the played white noise music is close to the noise frequency band in the environment, so as to distract the brain's attention and achieve a better sleep-aiding effect. It can also reduce the time the user uses the brain and fall asleep faster.
[0040] In order to illustrate the technical solution of the present application, specific embodiments are provided below.
[0041] Reference Figure 1 , shows a flow chart of a method for aiding sleep with a speaker provided in Example 1 of the present application. Figure 1 As shown, the sound box sleep aid method may include the following steps:
[0042] Step 101 : When a sleep mode is triggered, historical environment information corresponding to the sleep time period is obtained according to the sleep time period carried in the sleep mode.
[0043] Among them, the sleep mode is the working state of the speaker to help the user sleep. The sleep mode can be triggered manually by the user, such as: the user triggers the sleep mode of the speaker through a remote control, touch screen or button, etc., or it can be triggered by a timing mechanism. The sleep time period can be set by the user independently, or it can be determined based on the user's previous sleep time. The historical environment information includes sound information, and the speaker collects the sound frequency emitted in the environment where the speaker is located at each sampling point. The historical environment information corresponding to the sleep time period can be the historical environment information corresponding to the sleep time period of a certain time period. The time period can be set according to actual conditions, such as: one week, one month, two months, etc., such as: the historical environment information of the sleep time period every day in the past week. It can also be the historical environment information of the sleep time period every day from the start of recording the user's environment information to the current time.
[0044] Historical environmental information is the environmental information collected by the speaker in the current environment according to each sampling point when the speaker is turned on, and the environmental information and the collection time are associated and stored.
[0045] In one possible implementation, historical time data for triggering a sleep mode is obtained; the time point and sleep time period for triggering the sleep mode on that day are predicted based on the historical time data, the sleep mode is triggered at that time point, and based on the sleep time period, historical environmental information corresponding to the sleep time period is obtained.
[0046] Among them, by using the historical time data of the sleep mode being triggered; predicting the time point and sleep time period for triggering the sleep mode on that day based on the historical time data, triggering the sleep mode at that time point, and obtaining the historical environmental information corresponding to the sleep time period based on the sleep time period, it is possible to avoid the user manually triggering the sleep mode before going to bed, which affects the state of preparing to sleep.
[0047] Step 102 : Analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs.
[0048] The preset noise frequency band can be set based on actual conditions, for example, the preset noise frequency band includes a low frequency band, a mid-frequency band, and a high frequency band. The frequency range can be set based on actual conditions, for example, the low frequency band is [20Hz, 150Hz]; the mid-frequency band is (150Hz, 5kHz]; and the high frequency band is (5kHz-20kHz). The noise in the historical environment information is the sound that disturbs the user's sleep.
[0049] For example, the preset noise frequency band includes a low frequency band, a mid-frequency band, and a high frequency band, and the frequency range of the low frequency band is [20 Hz, 150 Hz]; the frequency range of the mid-frequency band is (150 Hz, 5 kHz]; and the frequency range of the high frequency band is (5 kHz-20 kHz). For example, when the noise frequency at sampling point A is 154 Hz, the noise at sampling point A belongs to the mid-frequency band.
[0050] Step 103 : Analyze the noise frequency band to which the noise at each sampling point belongs, and determine the noise proportion of each noise frequency band.
[0051] The noise percentage is the ratio of the amount of noise in a particular noise frequency band to the total amount of noise. The noise at each sampling point is counted based on the noise frequency band to which it belongs. The noise percentage for each noise frequency band is then calculated based on the noise amount in each noise frequency band and the total amount of noise.
[0052] For example, taking the preset noise frequency bands including low frequency band, medium frequency band and high frequency band as an example, the historical environmental information records the noise frequencies of 100 sampling points, 50 of which belong to the low frequency band, 40 belong to the medium frequency band, and 10 belong to the high frequency band. The noise in the low frequency band accounts for 50%, the noise in the medium frequency band accounts for 40%, and the noise in the high frequency band accounts for 10%.
[0053] Step 104 : Select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0054] Among them, white noise music is a noise audio file whose power spectral density is constant in the entire frequency domain, such as: wind, flowing water, waves, wind chimes and bird calls.
[0055] The noise proportion of each noise frequency band can be used to predict the sound frequency that may disturb the user's sleep during the current sleep period, so as to select the corresponding white noise music to help sleep. The white noise music is close to the sound frequency that disturbs the user's sleep, distracting the brain's attention and achieving a sleep-aiding effect.
[0056] In a possible implementation, the preset noise frequency bands include: a low frequency band, a mid-frequency band, and a high frequency band;
[0057] The step of adaptively selecting corresponding white noise music to play for sleep-aiding according to the noise proportion of each noise frequency band includes: determining whether the noise proportion of the high-frequency band exceeds a threshold according to the noise proportion of each noise frequency band; when the noise proportion of the high-frequency band exceeds the threshold, obtaining white noise music associated with the proportion exceeding the threshold, and playing the white noise music for sleep-aiding; when the noise proportion of the high-frequency band does not exceed the threshold, obtaining white noise music associated with the proportion not exceeding the threshold, and playing the white noise music for sleep-aiding.
[0058] The threshold can be set according to actual conditions, such as 5%, 10%, 20% or 30%. Each piece of white noise music can be pre-associated with whether the proportion of high-frequency noise exceeds the threshold. The user can also add or delete white noise music associated with whether the proportion of high-frequency noise exceeds the threshold at any time. The speaker can also adjust the white noise music associated with whether the proportion of high-frequency noise exceeds the threshold based on the user's preference data.
[0059] When the proportion of high-frequency noise does not exceed the threshold, the white noise music played is any one or more combinations of wind, flowing water and waves; when the proportion of high-frequency noise exceeds the threshold, the white noise music played is any one or more combinations of wind chimes and birdsong.
[0060] See also Figure 2 , shows a flow chart of a sound box sleep aid method provided in the second embodiment of the present application. Figure 2 As shown, the sound box sleep aid method may include the following steps:
[0061] Step 201 : When a sleep mode is triggered, historical environment information corresponding to the sleep time period is obtained according to the sleep time period carried in the sleep mode.
[0062] Step 202 : Analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs.
[0063] Step 203 : Analyze the noise frequency band to which the noise at each sampling point belongs, and determine the noise proportion of each noise frequency band.
[0064] Step 204 : Select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0065] Steps 201 to 204 of this embodiment are the same as steps 101 to 104 of the aforementioned embodiment, and can refer to each other, and will not be described in detail in this embodiment.
[0066] Step 205: Acquire the user's breathing rate information.
[0067] Among them, the breathing rate information can be collected by the user through a speaker, or obtained from other collection devices, such as mobile phones, smart watches, etc.
[0068] Step 206 : Input the breathing frequency information into the sleep detection model to perform sleep state analysis to determine the user's current sleep state.
[0069] The sleep detection model is a model that uses semi-supervised and / or unsupervised training of a deep learning algorithm based on respiratory rate information samples. It is used to detect whether the user has entered sleep. Sleep status includes sleeping or not sleeping.
[0070] Step 207: When the user's current sleep state is asleep, the white noise music is turned off after a transition period of time.
[0071] Among them, the transition time period can be set according to the sleep stage. For example, the time required for users to go from falling asleep to rapid eye movement stage is generally 20 minutes. The transition time period can be set to 20 minutes, or longer than 20 minutes, such as 30 minutes. After the user has fallen asleep, the white noise music can be turned off to save electricity. It can also prevent the sleeping user from waking up due to the white noise music, thereby improving the sleep-aiding effect.
[0072] Compared with the first embodiment, the second embodiment of the present application can analyze the sleep state through the sleep detection model to determine the time when the user has fallen asleep. When the user has fallen asleep, the white noise music is turned off after a transition period, which can save electricity and avoid waking up the sleeping user due to the white noise music, thereby improving the sleep-aiding effect.
[0073] See also Figure 3, shows a flow chart of a sound box sleep aid method provided in Example 3 of the present application. Figure 3 As shown, the sound box sleep aid method may include the following steps:
[0074] Step 301 : When the sleep mode is triggered, historical environment information corresponding to the sleep time period is obtained according to the sleep time period carried in the sleep mode.
[0075] Step 302 : Analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs.
[0076] Step 303 : Analyze the noise frequency band to which the noise at each sampling point belongs, and determine the noise proportion of each noise frequency band.
[0077] Step 304 : Select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0078] Steps 301 to 304 of this embodiment are the same as steps 101 to 104 of the aforementioned embodiment, and can refer to each other, and will not be described in detail in this embodiment.
[0079] Step 305: Monitor the playing time of the white noise music.
[0080] Step 306: When the playing time reaches the volume adjustment time point, the volume of the white noise music is reduced according to the preset volume reduction value based on the current volume of the white noise music, until the volume drops to 0, and the white noise music is turned off.
[0081] The volume adjustment time points can be set at intervals, and the time intervals between each volume adjustment time point can be the same or different. For example, if the time interval between each volume adjustment time point is set to 10 minutes, the volume of the white noise music will be reduced every 10 minutes of playback time. The preset volume reduction value is set according to actual conditions.
[0082] Compared with the first embodiment, the third embodiment of the present application can monitor the playing time. When the playing time reaches the volume adjustment time point, the volume of the white noise music is reduced according to the preset volume reduction value until the volume drops to 0, and the white noise music is turned off. This can save electricity and prevent the user from waking up due to the white noise music, thereby improving the sleep-aiding effect.
[0083] See also Figure 4 , shows a flow chart of a method for aiding sleep with a speaker provided in the fourth embodiment of the present application. Figure 4 As shown, the sound box sleep aid method may include the following steps:
[0084] Step 401 : When the sleep mode is triggered, historical environment information corresponding to the sleep time period is obtained according to the sleep time period carried in the sleep mode.
[0085] Step 402 : Analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs.
[0086] Step 403 : Analyze the noise frequency band to which the noise at each sampling point belongs, and determine the noise proportion of each noise frequency band.
[0087] Step 404 : Select corresponding white noise music to play for sleep aid based on the noise proportion of each noise frequency band.
[0088] Steps 401 to 404 of this embodiment are the same as steps 101 to 104 of the aforementioned embodiment, and can refer to each other, and will not be described in detail in this embodiment.
[0089] Step 405: When the sleep mode is triggered, turn on the light corresponding to the sleep mode.
[0090] Among them, the speaker is also provided with a light-emitting module, which may include an atmosphere light for lighting or helping sleep, and / or a display screen for displaying a user operation interface. When the sleep mode is triggered, the light corresponding to the sleep mode is turned on to help sleep, and the light can be a warm-colored light.
[0091] Compared with the first embodiment, the fourth embodiment of the present application can create a sleep-aiding atmosphere and improve the sleep-aiding effect by turning on the light corresponding to the sleep mode when the sleep mode is triggered.
[0092] Corresponding to the above embodiment of the speaker sleep aid method, see Figure 5 , shows a structural schematic diagram of a speaker sleep-aiding device provided in Example 5 of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0093] The speaker sleep aid device may specifically include the following modules:
[0094] The information acquisition module 501 is used to acquire historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode when the sleep mode is triggered;
[0095] The noise analysis module 502 is used to analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise of each sampling point in the historical environment information belongs;
[0096] The noise proportion analysis module 503 is used to analyze the noise of each sampling point according to the noise frequency band to which it belongs, and determine the noise proportion of each noise frequency band;
[0097] The music playing module 504 is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0098] In this embodiment of the present application, the music playing module 504 may specifically include the following submodules:
[0099] The threshold comparison submodule is used to determine whether the noise ratio of the high frequency band exceeds the threshold according to the noise ratio of each noise frequency band.
[0100] The first playing submodule is used to obtain white noise music associated with the proportion exceeding the threshold when the proportion of high-frequency noise exceeds the threshold, and play the white noise music to help sleep.
[0101] The second playing submodule is used to obtain white noise music associated with the high-frequency noise ratio not exceeding the threshold when the high-frequency noise ratio does not exceed the threshold, and play the white noise music to help sleep.
[0102] In an embodiment of the present application, the first playback submodule can be specifically configured to: when the proportion of high-frequency noise exceeds a threshold, play white noise music such as any one or more combinations of wind chimes and bird calls.
[0103] In an embodiment of the present application, the second playback submodule can be specifically used to: when the proportion of high-frequency noise does not exceed a threshold, the white noise music played is any one or more combinations of wind, flowing water, and waves.
[0104] The speaker sleep-aiding device provided in the embodiment of the present application can be applied to the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0105] Corresponding to the above embodiment of the speaker sleep aid method, see Figure 6 , shows a structural schematic diagram of a speaker sleep-aiding device provided in Example 6 of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0106] The speaker sleep aid device may specifically include the following modules:
[0107] The information acquisition module 601 is used to acquire historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode when the sleep mode is triggered;
[0108] The noise analysis module 602 is used to analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise of each sampling point in the historical environment information belongs;
[0109] The noise proportion analysis module 603 is used to analyze the noise of each sampling point according to the noise frequency band to which it belongs, and determine the noise proportion of each noise frequency band;
[0110] The music playing module 604 is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0111] The frequency acquisition module 605 is used to obtain the user's respiratory frequency information.
[0112] Sleep analysis module 606, for inputting respiratory frequency information into a sleep detection model to perform sleep state analysis and determine the user's current sleep state;
[0113] The music turning off module 607 is used to turn off the white noise music after a transition period when the user's current sleep state is asleep.
[0114] The speaker sleep-aiding device provided in the embodiment of the present application can be applied to the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0115] Corresponding to the above embodiment of the speaker sleep aid method, see Figure 7 , shows a structural schematic diagram of a speaker sleep-aiding device provided in Example 7 of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0116] The speaker sleep aid device may specifically include the following modules:
[0117] The information acquisition module 701 is used to acquire historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode when the sleep mode is triggered;
[0118] Noise analysis module 702, configured to analyze the noise in the historical environment information according to a preset noise frequency band and a corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs;
[0119] The noise proportion analysis module 703 is used to analyze the noise of each sampling point according to the noise frequency band to which it belongs, and determine the noise proportion of each noise frequency band;
[0120] The music playing module 704 is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0121] Monitoring module 705, for monitoring the playing time of white noise music;
[0122] The volume adjustment module 706 is used to reduce the volume of the white noise music according to a preset volume reduction value based on the current volume of the white noise music when the playback duration reaches the volume adjustment time point, until the volume drops to 0, thereby turning off the white noise music.
[0123] The speaker sleep-aiding device provided in the embodiment of the present application can be applied to the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0124] Corresponding to the above embodiment of the speaker sleep aid method, see Figure 8 , shows a structural schematic diagram of a speaker sleep-aiding device provided in Example 8 of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0125] The speaker sleep aid device may specifically include the following modules:
[0126] The information acquisition module 801 is used to acquire historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode when the sleep mode is triggered;
[0127] The noise analysis module 802 is used to analyze the noise in the historical environment information according to the preset noise frequency band and the corresponding frequency interval, and determine the noise frequency band to which the noise of each sampling point in the historical environment information belongs;
[0128] The noise proportion analysis module 803 is used to analyze the noise of each sampling point according to the noise frequency band to which it belongs, and determine the noise proportion of each noise frequency band;
[0129] The music playing module 804 is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band.
[0130] The light adjustment module 805 is used to turn on the light corresponding to the sleep mode when the sleep mode is triggered.
[0131] The speaker sleep-aiding device provided in the embodiment of the present application can be applied to the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0132] Figure 9 This is a schematic diagram of the structure of the speaker provided in Example 9 of this application. Figure 9 As shown, the speaker 900 of this embodiment includes: at least one processor 910 ( Figure 9 Only one is shown in the figure) a processor, a memory 920, and a computer program 921 stored in the memory 920 and executable on the at least one processor 910. When the processor 910 executes the computer program 921, the steps in the above-mentioned embodiment of the speaker-aided sleep method are implemented.
[0133] The speaker 900 may include, but is not limited to, a processor 910 and a memory 920. Those skilled in the art will appreciate that Figure 9 This is merely an example of the speaker 900 and does not constitute a limitation on the speaker 900 . The speaker 900 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0134] The processor 910 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0135] In some embodiments, the memory 920 may be an internal storage unit of the speaker 900, such as a hard disk or memory of the speaker 900. In other embodiments, the memory 920 may also be an external storage device of the speaker 900, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the speaker 900. Furthermore, the memory 920 may also include both an internal storage unit of the speaker 900 and an external storage device. The memory 920 is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program. The memory 920 may also be used to temporarily store data that has been output or is about to be output.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0137] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0138] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0139] In the embodiments provided in this application, it should be understood that the disclosed devices / speakers and methods can be implemented in other ways. For example, the device / speaker embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0140] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0141] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0142] If the integrated module / 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 storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0143] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product runs on a speaker, the speaker can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0144] The above embodiments are intended only to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the above embodiments or replace some of the technical features therein with equivalents; and such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application and should be included within the scope of protection of the present application.
Claims
1. A method for aiding sleep with a speaker, characterized in that: include: When the sleep mode is triggered, obtaining historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode; Analyze the noise in the historical environmental information according to a preset noise frequency band and a corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environmental information belongs; Analyze the noise frequency band of each sampling point to determine the noise proportion of each noise frequency band; According to the noise proportion of each noise frequency band, select the corresponding white noise music to play to help you sleep; The preset noise frequency bands include: low frequency band, medium frequency band and high frequency band; The step of adaptively selecting corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band includes: Determining whether the noise ratio in the high frequency band exceeds a threshold according to the noise ratio in each of the noise frequency bands; When the proportion of the noise in the high frequency band exceeds a threshold, obtaining white noise music associated with the proportion exceeding the threshold, and playing the white noise music to help sleep; When the proportion of the noise in the high frequency band does not exceed the threshold, white noise music associated with the proportion not exceeding the threshold is obtained, and the white noise music is played to help sleep.
2. The sound box sleep aid method according to claim 1, characterized in that: When the proportion of the high-frequency noise does not exceed the threshold, the white noise music played is any one or more combinations of wind, water and waves; When the noise proportion in the high frequency band exceeds a threshold, the white noise music played is any one or more combinations of wind chimes and bird calls.
3. The sound box sleep aid method according to claim 1, characterized in that: After the step of adaptively selecting corresponding white noise music to play for sleep aid according to the proportion of each noise frequency band, the method further includes: Get the user's breathing rate information; Inputting the breathing frequency information into a sleep detection model to perform sleep state analysis to determine the current sleep state of the user; When the current sleeping state of the user is asleep, the white noise music is turned off after a transition period of time.
4. The sound box sleep aid method according to claim 1, characterized in that: After the step of adaptively selecting corresponding white noise music to play for sleep aid according to the proportion of each noise frequency band, the method further includes: Monitor the playing time of white noise music; When the playing time reaches the volume adjustment time point, the volume of the white noise music is reduced according to the preset volume reduction value based on the current volume of the white noise music, until the volume drops to 0, and the white noise music is turned off.
5. The sound box sleep aid method according to claim 1, characterized in that: The step of obtaining historical environment information corresponding to the sleep time period according to the sleep time period carried in the sleep mode when the sleep mode is triggered includes: Obtain historical time data for triggering the sleep mode; predict the time point and sleep time period for triggering the sleep mode on the day based on the historical time data; The sleep mode is triggered at the time point, and historical environment information corresponding to the sleep time period is acquired according to the sleep time period.
6. The sound box sleep aid method according to any one of claims 1 to 5, characterized in that: Also includes: When the sleep mode is triggered, turn on the light corresponding to the sleep mode.
7. A sound box sleep aid device, characterized in that: include: An information acquisition module, configured to, when a sleep mode is triggered, acquire historical environmental information corresponding to a sleep time period according to the sleep time period carried in the sleep mode; A noise analysis module, configured to analyze the noise in the historical environment information according to a preset noise frequency band and a corresponding frequency interval, and determine the noise frequency band to which the noise at each sampling point in the historical environment information belongs; The noise ratio analysis module is used to analyze the noise frequency band to which the noise at each sampling point belongs and determine the noise ratio of each noise frequency band; A music playing module is used to select corresponding white noise music to play for sleep aid according to the noise proportion of each noise frequency band; The music playback module includes: The threshold comparison submodule is used to determine whether the noise ratio of the high frequency band exceeds the threshold according to the noise ratio of each noise frequency band; The first playing submodule is configured to obtain white noise music associated with the noise ratio exceeding the threshold when the noise ratio in the high frequency band exceeds the threshold, and play the white noise music to help sleep; The second playing submodule is used to obtain white noise music associated with the high-frequency noise ratio not exceeding the threshold when the high-frequency noise ratio does not exceed the threshold, and play the white noise music to help sleep.
8. A speaker comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for reducing environmental interference noise by sound box and sound box
CN105430568A