Sleep control method and system, electronic device and storage medium
By obtaining users' allergic information and plant odor preferences, and controlling the operation of fresh fans and windows in real time, the problem of single control factors in the existing technology is solved, and a more comfortable sleep environment and improved sleep quality is achieved.
Patent Information
- Application Number
- CN202411686921.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art controls the opening and closing of fresh fans and windows, and the control factors are single, and it is impossible to effectively provide a more comfortable sleeping environment.
Control the operation of the fresh fan and the opening and closing of windows by obtaining the user's associated data related to outdoor plants, including allergies and preference information. The specific method includes determining whether to close the window and turn on the new fan based on allergy information, and comprehensively considering outdoor PM2.5 concentration data, weather information and plant flowering data based on preference information to control the operation of the new fan and window.
It realizes real-time adjustment of the status of the fresh air fan and windows according to the user's allergic conditions and plant odor preferences, thereby providing a more comfortable and more suitable sleep environment for users' sleep needs, and improving sleep quality.
Smart Images

Figure CN119532878A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of sleep control, and in particular to a sleep control method and system, an electronic device, and a storage medium. Background Art
[0002] In a related technology, the opening and closing of the fresh air fan is controlled only according to the indoor and outdoor air quality. However, this control method has a single control factor and may not provide users with a more comfortable sleeping environment.
[0003] In another related technology, the smart home can automatically open or close windows and automatically turn on or off the fresh air fan according to user instructions or weather forecasts. However, the control factors of this control method are single and may not provide users with a more comfortable sleeping environment.
[0004] Therefore, how to provide users with a more comfortable sleeping environment is one of the problems that need to be solved urgently. Summary of the invention
[0005] In view of this, the present disclosure proposes a sleep control method and system, an electronic device and a storage medium, so as to provide a user with a more comfortable sleeping environment that is easier to improve sleep quality.
[0006] According to a first aspect of the present disclosure, a sleep control method is provided, comprising: an acquisition step for acquiring user's associated data related to outdoor plants, wherein the associated data includes allergy information that can characterize whether the user is allergic to pollen, and preference information that can characterize the user's preference for outdoor plants; and a control step for controlling the operation of a fresh air fan and the opening and closing of windows in the room where the user sleeps according to the allergy information and the preference information.
[0007] In one possible implementation, the control step includes: determining whether the user is allergic to pollen based on the allergy information; if it is determined that the user is allergic to pollen, closing the window and turning on the fresh air fan regardless of the outdoor PM2.5 concentration data and current weather conditions.
[0008] In one possible implementation, the control step includes: determining whether the user is allergic to pollen based on the allergy information; if it is determined that the user is not allergic to pollen, obtaining outdoor PM2.5 concentration data and weather information that can characterize current weather conditions, and controlling the operation of the fresh air fan and the opening and closing of the windows based on the outdoor PM2.5 concentration data, the weather information and the preference information.
[0009] In one possible implementation, the operation of the fresh air fan and the opening and closing of the window are controlled according to the outdoor PM2.5 concentration data, the weather information and the preference information, including: determining whether the outdoor PM2.5 concentration data is lower than a first threshold; if it is determined that the outdoor PM2.5 concentration data is lower than the first threshold, further determining whether it is suitable to open the window according to the weather information; if it is determined that it is suitable to open the window, controlling the operation of the fresh air fan and the opening and closing of the window according to the preference information.
[0010] In a possible implementation, the operation of the fresh air fan and the opening and closing of the window are controlled according to the preference information, including: if the preference information indicates that the plant that the user dislikes is in flowering, closing the window and turning on the fresh air fan; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is in flowering, opening the window and turning off the fresh air fan; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is not in flowering, closing the window and turning on the fresh air fan.
[0011] In a possible implementation, if it is determined that it is not appropriate to open the window, the window is closed and the fresh air fan is turned on.
[0012] In a possible implementation, if it is determined that the outdoor PM2.5 concentration data is not lower than the first threshold, the operation of the fresh air fan and the opening and closing of the window are controlled according to the indoor PM2.5 concentration data and the indoor CO2 concentration data.
[0013] In a possible implementation, controlling the operation of the fresh air fan and the opening and closing of the window according to the indoor PM2.5 concentration data and the indoor CO2 concentration data includes: judging whether the indoor PM2.5 concentration data is lower than a second threshold and whether the indoor CO2 concentration data is lower than a third threshold; if it is judged that the indoor PM2.5 concentration data is lower than the second threshold and the indoor CO2 concentration data is lower than the third threshold, closing the window and turning off the fresh air fan; if it is judged that the indoor PM2.5 concentration data is not lower than the second threshold and / or the indoor CO2 concentration data is not lower than the third threshold, closing the window and turning on the fresh air fan.
[0014] In a possible implementation, the method further includes: pre-collecting allergy information indicating whether the user is allergic to pollen, and storing allergy information indicating that the user is allergic to pollen; if the user is not allergic to pollen, pre-collecting the user's preference data for outdoor plants, obtaining flowering period data related to the flowering period of the outdoor plants, and associating the preference data with the flowering period data and storing them as the preference information. Accordingly, the acquisition step includes: obtaining the allergy information or obtaining the preference information.
[0015] In one possible implementation, the method further includes: displaying a collection screen for collecting the associated data, wherein the collection screen includes a first area for inputting the allergy information and a second area for inputting the preference information, and in response to information indicating that the user is allergic to pollen being input into the first area, hiding the second area so that the state of the second area is changed from an editable state to a non-editable state.
[0016] In one possible implementation, the collection screen also includes a third area for inputting the user's location; when the second area is in an editable state, in response to the geographical information input into the third area, a first set representing a set of plants that the user likes and a second set representing a set of plants that the user hates are displayed in the second area, wherein the first set and the second set each include a plurality of outdoor plants that match the geographical information; the user's favorite outdoor plants are stored in response to a selection operation on the first set, and the user's hate outdoor plants are stored in response to a selection operation on the second set.
[0017] According to a second aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0018] According to a third aspect of the present disclosure, a sleep control system is provided, comprising: the electronic device, the fresh air module and the oxygen production module. In a possible implementation, the sleep control system comprises the air conditioner, and the oxygen production module can be integrated in the air conditioner, or the oxygen production module is separately arranged relative to the air conditioner.
[0019] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0021] Through the sleep control method and system, electronic device and storage medium disclosed in the present invention, the user's related data related to outdoor plants, such as allergy information and preference information, are obtained in real time, and the operation of the fresh air fan and the opening and closing of the windows of the room where the user sleeps are controlled according to the allergy information and the preference information. As a result, the user can be provided with a sleeping environment that is adapted to whether the user is allergic to pollen and the user's preference for outdoor plants, thereby improving the sleep quality. Therefore, the user can be provided with a sleeping environment that is more comfortable and easier to improve the sleep quality.
[0022] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0024] Figure 1 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0025] Figure 2 A schematic diagram of an application scenario of a sleep control method according to an embodiment of the present disclosure is shown.
[0026] Figure 3 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0027] Figure 4 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0028] Figure 5 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0029] Figure 6 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0030] Figure 7 A schematic flowchart of a sleep control method according to an embodiment of the present disclosure is shown.
[0031] Figure 8 A schematic diagram of collecting associated data according to an embodiment of the present disclosure is shown.
[0032] Fig. 9 A block diagram of a sleep control device according to an embodiment of the present disclosure is shown.
[0033] Fig.10 A block diagram of a sleep control device 800 according to an embodiment of the present disclosure is shown.
[0034] Fig.11 A block diagram of a sleep control device 1900 according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0036] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0037] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0038] Figure 1 A flowchart of a sleep control method according to an embodiment of the present disclosure is shown. The sleep control method can be applied to a smart home system. In a possible implementation, the smart home system may include a fresh air blower and a device for automatically controlling the opening and closing of windows (also called a window controller). Of course, the sleep control method can also be applied to an electronic device, which can control the aforementioned fresh air blower and window controller. In other words, the sleep control method can be executed by the electronic device. Figure 1 As shown, the sleep control method may include the following steps:
[0039] In step S110 (corresponding to the acquisition step), the user's associated data related to outdoor plants is acquired, wherein the associated data includes allergy information that can characterize whether the user is allergic to pollen, and preference information that can characterize the user's preference for outdoor plants.
[0040] In this embodiment, the allergy information may include positive information that can indicate that the user is allergic to pollen and negative information that can indicate that the user is not allergic to pollen. In a possible implementation, information that can indicate whether the user is allergic to pollen, such as diagnosis information related to pollen allergy and / or medication record information related to drugs for treating pollen allergy, may be obtained from an information source, and whether the user is allergic to pollen may be determined based on the obtained information, thereby obtaining the allergy information.
[0041] For example, if the information source obtains diagnostic information that the user's rhinitis is caused by pollen allergy, then the user can be determined to be allergic to pollen based on the diagnostic information, thereby obtaining positive information indicating that the user is allergic to pollen. If the information source obtains medication record information that the user has used a drug for treating rhinitis caused by pollen allergy, then the user can be determined to be allergic to pollen based on the medication record information, thereby obtaining positive information indicating that the user is allergic to pollen.
[0042] In another possible implementation, information about whether the user is allergic to pollen may be collected, and whether the user is allergic to pollen may be determined based on the collected information, thereby obtaining allergy information. For example, if the user inputs information about being allergic to pollen via the collection screen, it may be determined based on the collected information that the user is allergic to pollen, thereby obtaining positive information indicating that the user is allergic to pollen; if the user inputs information about not being allergic to pollen via the collection screen, it may be determined based on the collected information that the user is not allergic to pollen, thereby obtaining negative information indicating that the user is not allergic to pollen.
[0043] The preference information may include preference information that can characterize the user's preference for outdoor plants and dislike information that can characterize the user's dislike for outdoor plants. In a possible implementation, information that can characterize the user's preference for fragrance and information that characterize the user's dislike for fragrance can be obtained from an information source, and the user's preference for fragrance and dislike can be determined based on the obtained information, thereby obtaining the preference information. For example, if information is obtained from an information source that the user likes the smell of osmanthus, the user likes to eat food with added osmanthus, and the user uses aromatherapy with the smell of osmanthus, then the user can be determined based on the information that the user likes the smell of osmanthus, thereby obtaining the preference information indicating that the user likes outdoor osmanthus trees. If information is obtained from an information source that the user dislikes the smell of gardenias, and the user notes that he does not want the fragrance of gardenias when purchasing aromatherapy, then the user can be determined based on the information that the user dislikes gardenias, thereby obtaining the dislike information indicating that the user dislikes outdoor gardenia trees.
[0044] It should be understood that the present embodiment does not impose any specific restrictions on the method for obtaining allergy information and preference information, and those skilled in the art may adopt any appropriate method to obtain allergy information and preference information according to actual application needs. For example, information on whether a user often wears a mask during the pollen allergy season may be obtained, and allergy information may be obtained accordingly. Another example is information on the opening and closing history of windows during the user's stay at home during the pollen allergy season may be obtained, and allergy information may be obtained accordingly. For example, whether a user has planted the same or similar plants indoors as outdoor plants may be obtained, and preference information may be obtained accordingly.
[0045] After the allergy information and the preference information are acquired, step S130 may be performed.
[0046] In step S130 (corresponding to the control step), the operation of the fresh air fan is controlled and the opening and closing of the windows of the room where the user sleeps is controlled according to the allergy information and the preference information.
[0047] The present disclosure realizes that many plants are planted in the community for greening, such as Figure 2 As shown, some plants will bloom during their own flowering period, thereby releasing corresponding odors. The user may be allergic to pollen. In this case, if outdoor pollen is allowed to enter the room, it will affect the user's sleep, thereby reducing the user's sleep quality. The user may hate the smell released by some plants when they bloom. If the outdoor pollen carrying the smell released by the plants that the user hates is allowed to enter the room, it will affect the user's sleep, thereby reducing the user's sleep quality. The user may like the smell released by some plants when they bloom. If the outdoor pollen carrying the smell released by the plants that the user likes is allowed to enter the room, it will improve the user's sleep, thereby improving the user's sleep quality.
[0048] Therefore, allergy information and preference information are information that can affect the user's sleep quality, and the operation of the fresh air blower and the opening and closing of the windows can be controlled according to the allergy information and preference information to provide the user with a sleeping environment that matches the allergy information and preference information. For example, if allergy information indicating that the user is not allergic to pollen and preference information indicating that the user likes osmanthus trees are obtained, and the osmanthus trees are currently in bloom, the fresh air blower and windows can be controlled to allow outdoor air carrying the scent of osmanthus to enter the room.
[0049] It should be understood that the present embodiment does not impose any specific restrictions on the manner of controlling the fresh air fan and windows according to the allergy information and preference information, and those skilled in the art may adopt any suitable manner for control according to actual application needs. The overall control principle is to avoid, as far as possible, the effects of pollen and the fragrance released by outdoor plants in flowering period on the user's sleep, and to improve, as far as possible, the user's sleep through the fragrance released by outdoor plants in flowering period.
[0050] In addition, for a family, the allergy information and preference information of each family member can be obtained, and the operation of the fresh air blower and the opening and closing of the windows can be controlled according to the allergy information and preference information of each family member. For example, if the allergy information indicating that user A is not allergic to pollen and the preference information indicating that user A likes osmanthus trees are obtained, and the allergy information indicating that user B is not allergic to pollen and the preference information indicating that user B does not like osmanthus trees are obtained, and the osmanthus trees are currently in bloom, the fresh air blower and the windows can be controlled to allow the outdoor air with the scent of osmanthus to enter the room where user A sleeps, and prevent the outdoor air with the scent of osmanthus from entering the room where user B sleeps.
[0051] According to this embodiment, the user's associated data related to outdoor plants, such as allergy information and preference information, is acquired in real time, and the operation of the fresh air fan and the opening and closing of the windows of the user's sleeping room are controlled based on the allergy information and the preference information. As a result, the user can be provided with a sleeping environment that is adapted to whether the user is allergic to pollen and the user's preference for outdoor plants, thereby improving the sleep quality. Therefore, the user can be provided with a sleeping environment that is more comfortable and easier to improve the sleep quality.
[0052] Compared to the prior art that controls the operation of the fresh air fan only according to the indoor and outdoor air quality, and the prior art that controls the operation of the fresh air fan and the opening and closing of windows according to user instructions or weather forecasts, the present disclosure takes into account whether the user is allergic to pollen and the user's preference for outdoor plants when controlling the operation of the fresh air fan and the opening and closing of windows. Therefore, the present embodiment can provide the user with a sleeping environment that is compatible with whether the user is allergic to pollen and the user's preference for outdoor plants, thereby meeting the user's needs for allergies, odors and indoor air quality, giving full play to the function of plant fragrance to help improve sleep quality, and enabling users to smell the fragrance of their favorite plants under appropriate conditions to help them sleep. In addition, it is also possible to avoid running the fresh air fan or opening the window when it is not necessary, and to avoid users from smelling the fragrance of disgusting plants under appropriate conditions to reduce their sleep quality.
[0053] In one possible implementation, the control step includes: determining whether the user is allergic to pollen based on the allergy information; if it is determined that the user is allergic to pollen, closing the window and turning on the fresh air fan regardless of the outdoor PM2.5 concentration data and current weather conditions.
[0054] In one possible implementation, the control step includes: determining whether the user is allergic to pollen based on the allergy information; if it is determined that the user is not allergic to pollen, obtaining outdoor PM2.5 concentration data and weather information that can characterize current weather conditions, and controlling the operation of the fresh air fan and the opening and closing of the windows based on the outdoor PM2.5 concentration data, the weather information and the preference information.
[0055] In this embodiment, Figure 3 As shown, after the allergy information and preference information are obtained in step S301, steps S302 to S305 are executed to control the operation of the fresh air fan and the opening and closing of the windows. Specifically, in step S302, it is determined whether the user is allergic to pollen based on the allergy information. If it is determined to be "yes", step S303 is executed, otherwise, step S304 is executed. In step S303, the window is closed and the fresh air fan is turned on. In step S304, outdoor PM2.5 concentration data and current weather information are obtained. Then, step S305 is executed. In step S305, the operation of the fresh air fan and the opening and closing of the windows are controlled according to the outdoor PM2.5 concentration data, the current weather information and the preference information. In a possible implementation, the local real-time outdoor PM2.5 value published by the weather website can be obtained as the outdoor PM2.5 concentration data, and the weather conditions such as weather forecasts published by the weather website can be obtained as weather information.
[0056] Therefore, users who are allergic to pollen can close the windows and turn on the fresh air fan. This can avoid introducing outdoor pollen-carrying gases into the room, thereby avoiding opening windows for ventilation at unnecessary times, such as during the pollen allergy season. Compared with opening windows for ventilation at this time, the user's sleep quality can be improved.
[0057] For users who are not allergic to pollen, the operation of the fresh air fan and the opening and closing of the windows can be comprehensively controlled according to the outdoor air quality, weather conditions and preference information. Therefore, compared with the existing technology that does not consider weather conditions and preference information when controlling the operation of the fresh air fan and the opening and closing of the windows, this embodiment can automatically adjust the working settings of the fresh air fan and the opening and closing of the windows according to the user's preference for plant smells, air quality, and actual weather conditions. This not only avoids running the fresh air fan or opening windows for ventilation when unnecessary, but also allows users to smell the fragrance of their favorite plants under appropriate conditions.
[0058] In a possible implementation, the operation of the fresh air blower and the opening and closing of the window are controlled according to the outdoor PM2.5 concentration data, the weather information and the preference information, including: judging whether the outdoor PM2.5 concentration data is lower than a first threshold; if it is judged that the outdoor PM2.5 concentration data is lower than the first threshold, judging whether it is suitable to open the window according to the weather information; if it is judged that it is suitable to open the window, controlling the operation of the fresh air blower and the opening and closing of the window according to the preference information. The first threshold is Th1, for example, 75ug / m 3 In a possible implementation, if it is determined that the outdoor PM2.5 concentration data is not lower than the first threshold, the operation of the fresh air fan and the opening and closing of the window are controlled according to the indoor PM2.5 concentration data and the indoor CO2 concentration data.
[0059] In this embodiment, Figure 4 As shown, after obtaining the outdoor PM2.5 concentration data and weather information in step S304, steps S401 to S405 are executed to control the operation of the fresh air fan and the opening and closing of the window. Specifically, in step S401, it is determined whether the outdoor PM2.5 concentration data is lower than the threshold value Th1. If it is determined to be "yes", step S402 is executed, otherwise, step S405 is executed. In step 402, it is determined whether it is suitable to open the window according to the weather information. If it is determined to be "yes", step S403 is executed, otherwise, step S404 is executed. Exemplarily, if the outdoor summer temperature in the weather information is lower than the indoor set temperature (or the outdoor winter temperature is higher than the indoor set temperature), the humidity in the weather information is lower than a threshold value such as 70%, and the weather information indicates a breeze and the probability of rainfall is lower than a threshold value such as 10%, it is determined to be suitable for opening the window, otherwise, it is determined to be not suitable for opening the window.
[0060] In step S403, the operation of the fresh air blower and the opening and closing of the window are controlled according to the preference information. In step S404, the window is closed and the fresh air blower is turned on. In step S405, the operation of the fresh air blower and the opening and closing of the window are controlled according to the indoor PM2.5 concentration data and the indoor CO2 concentration data.
[0061] In a possible implementation, the operation of the fresh air fan and the opening and closing of the window are controlled according to the preference information, including: if the preference information indicates that the plant that the user dislikes is in flowering, closing the window and turning on the fresh air fan; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is in flowering, opening the window and turning off the fresh air fan; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is not in flowering, closing the window and turning on the fresh air fan.
[0062] In this embodiment, Figure 5 As shown, when it is judged that it is suitable to open the window, steps S501 to S505 are executed to control the operation of the fresh air fan and the opening and closing of the window. Specifically, in step S501, it is determined whether the plant that the user dislikes is in the flowering period. If it is judged as "yes", step S505 is executed, otherwise, step S502 is executed. In step S502, it is determined whether the plant that the user likes is in the flowering period. If it is judged as "yes", step S503 is executed, otherwise, step S504 is executed. In step S503, the window is opened and the fresh air fan is turned off. In step S504, the window is closed and the fresh air fan is turned on. In step S505, the window is closed and the fresh air fan is turned on.
[0063] Thus, when it is appropriate to open the window, the operation of the fresh air blower and the opening and closing of the window are controlled according to whether the plants that the user likes or dislikes are in bloom. In this way, the outdoor air carrying the fragrance of the plants that the user likes can be introduced into the room, and the outdoor air carrying the fragrance of the plants that the user dislikes can be prevented from being introduced into the room, thereby avoiding the operation of the fresh air blower or opening the window for ventilation when it is not necessary, and thus allowing the user to smell the fragrance of the plants he likes.
[0064] In a possible implementation, controlling the operation of the fresh air fan and the opening and closing of the window according to the indoor PM2.5 concentration data and the indoor CO2 concentration data includes: judging whether the indoor PM2.5 concentration data is lower than the second threshold and whether the indoor CO2 concentration data is lower than the third threshold; if it is judged that the indoor PM2.5 concentration data is lower than the second threshold and the indoor CO2 concentration data is lower than the third threshold, closing the window and turning off the fresh air fan; if it is judged that the indoor PM2.5 concentration data is not lower than the second threshold and / or the indoor CO2 concentration data is not lower than the third threshold, closing the window and turning on the fresh air fan. The second threshold is Th2, for example, 75ug / m 3 , the third threshold is Th3, for example, 1000 ppm.
[0065] In this embodiment, Figure 6As shown, if it is determined that the outdoor PM2.5 concentration data is not lower than the threshold value Th1, the indoor PM2.5 concentration data and the indoor CO2 concentration data are obtained from the sensor of the fresh air fan, and then steps S601 to S603 are executed to control the operation of the fresh air fan and the opening and closing of the window. Specifically, in step S601, it is determined whether the indoor PM2.5 concentration data is lower than the threshold value Th2 and whether the indoor CO2 concentration data is lower than the threshold value Th3. If it is determined to be "yes", step S602 is executed, otherwise, step S603 is executed. In step S602, the window is closed and the fresh air fan is turned off. In step S603, the window is closed and the fresh air fan is turned on.
[0066] Therefore, when the outdoor air quality is poor but the indoor air quality is high, the fresh air fan is turned off and the windows are closed. When the outdoor air quality is poor and the indoor air quality is also poor, the fresh air fan is turned on and the windows are closed. In this way, it is not only possible to avoid introducing poor quality outdoor air into the room, thereby reducing the indoor air quality and affecting the user's sleep, but also to enable the fresh air fan to operate at the appropriate time, thereby preventing the fresh air fan from operating when it is not necessary.
[0067] For ease of understanding, combined Figure 7 The sleep control method of this embodiment is described in detail. Figure 7 As shown, the sleep control method includes steps S701 to S712 performed after acquiring allergy information.
[0068] In step S701, it is determined whether the user is allergic to pollen. If the determination is "yes", step S702 is executed, otherwise, step S703 is executed.
[0069] In step S702, close the windows and turn on the fresh air fan.
[0070] In step S703, outdoor PM2.5 concentration data, indoor PM2.5 concentration data and indoor CO2 concentration data are acquired. Then, step S704 is executed.
[0071] In step S704, it is determined whether the outdoor PM2.5 concentration data is lower than the threshold value Th1. If the determination is "yes", step S707 is executed, otherwise, step S705 is executed.
[0072] In step S705, it is determined whether the indoor PM2.5 concentration data is lower than the threshold value Th2 and whether the indoor CO2 concentration data is lower than the threshold value Th3. If the determination is "yes", step S706 is executed, otherwise, step S702 is executed.
[0073] In step S706, close the windows and turn off the fresh air fan.
[0074] In step S707, it is determined whether it is suitable to open the window according to the weather information. If the determination is "yes", step S708 is executed, otherwise, step S702 is executed.
[0075] In step S708, the preference information is obtained, and then step S709 is executed.
[0076] In step S709, today's date and time are acquired.
[0077] In step S710, it is determined whether the plant that the user dislikes (hates) is in bloom during the current time period of the current date. If the determination is "yes", step S702 is executed, otherwise, step S711 is executed.
[0078] In step S711, it is determined whether the plant that the user likes is in bloom in the current time period of the current date. If the determination is "yes", step S712 is executed, otherwise, step S702 is executed.
[0079] In step S712, open the window and turn off the fresh air fan.
[0080] For the above steps S701 to S712, please refer to the above Figure 3-Figure 6 The description will not be repeated here.
[0081] According to this embodiment, a sleeping environment that is adapted to whether the user is allergic to pollen and the user's preference for outdoor plants can be provided to the user, thereby satisfying the user's needs for allergies, odors and indoor air quality, and giving full play to the function of plant aroma in helping to improve sleep quality, allowing the user to smell the fragrance of their favorite plants under appropriate conditions to aid sleep. In addition, it is also possible to avoid running the fresh air fan or opening windows when unnecessary, thereby preventing the user from smelling the fragrance of disgusting plants under appropriate conditions to reduce sleep quality.
[0082] In a possible implementation, the method may further include: pre-collecting allergy information indicating whether the user is allergic to pollen, and storing allergy information indicating that the user is allergic to pollen; if the user is not allergic to pollen, pre-collecting the user's preference data for outdoor plants, obtaining flowering period data related to the flowering period of the outdoor plants, and associating the preference data with the flowering period data and storing them as the preference information. Accordingly, the acquisition step includes: obtaining the allergy information or obtaining the preference information.
[0083] In this embodiment, the Figure 8 The user's preference for outdoor plants can be obtained by the method shown in FIG. Figure 8 The collection screen 80 shown is used to collect allergy information and preference information in advance.
[0084] In a possible implementation, the method may further include: displaying a collection screen for collecting the associated data, wherein the collection screen includes a first area for inputting the allergy information and a second area for inputting the preference information, and in response to information indicating that the user is allergic to pollen being input into the first area, hiding the second area so that the state of the second area is changed from an editable state to a non-editable state.
[0085] In this embodiment, it can be displayed Figure 8 The collection screen 80 shown. Figure 8 As shown, the collection screen 80 includes areas 802 and 803, where area 803 is used to collect whether the user is allergic to pollen, and area 802 is used to collect outdoor plants that the user likes and dislikes. When the user clicks the button "Yes" in area 803, area 802 will become uneditable, that is, the user will not be able to enter preference information via area 802. On the contrary, when the user clicks the button "No" in area 803, area 802 will still be editable, that is, the user can enter preference information via area 802. Among them, the user can select the plants he likes and dislikes by clicking the corresponding circular button below the plant picture displayed in area 802, or by taking pictures of the plants he likes and dislikes and uploading the pictures taken to enter preference information. Exemplarily, this information can be uploaded to the server as user personalized parameters for use in the smart home system.
[0086] In one possible implementation, the collection screen also includes a third area for inputting the user's location; when the second area is in an editable state, in response to the geographical information input into the third area, a first set representing a set of plants that the user likes and a second set representing a set of plants that the user hates are displayed in the second area, wherein the first set and the second set each include a plurality of outdoor plants that match the geographical information; the user's favorite outdoor plants are stored in response to a selection operation on the first set, and the user's hate outdoor plants are stored in response to a selection operation on the second set.
[0087] In this embodiment, Figure 8 As shown, the collection screen 80 may also include an area 801 for the user to collect the user's residence. Exemplarily, the residence may be a city name, or the residence may be a detailed address of the user. In response to the user selecting / entering the corresponding residence, the database is accessed to display the common flowering aromatic plants in the residence in area 802. The database pre-stores the appearance, flowering period and other information of the common flowering aromatic plants in the corresponding residence, and the plants include but are not limited to osmanthus trees, camphor trees, orange trees, locust trees, tuberose, jasmine, and gardenia.
[0088] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.
[0089] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0090] Fig. 9 A block diagram of a sleep control device according to an embodiment of the present disclosure is shown. Fig. 9 As shown, the sleep control device 900 includes an acquisition module 910 and a control module 930. The acquisition module 910 is used to acquire the user's associated data related to outdoor plants, wherein the associated data includes allergy information that can indicate whether the user is allergic to pollen, and preference information that can indicate the user's preference for outdoor plants. The control module 930 is connected to the acquisition module 910, and is used to control the operation of the fresh air fan (fresh air module) 950 and control the opening and closing of the window 970 of the room where the user sleeps according to the allergy information and the preference information.
[0091] In one possible implementation, the control module 930 is configured to: determine whether the user is allergic to pollen based on the allergy information; if it is determined that the user is allergic to pollen, close the window and turn on the fresh air fan regardless of the outdoor PM2.5 concentration data and current weather conditions.
[0092] In one possible implementation, the control module 930 is configured to: determine whether the user is allergic to pollen based on the allergy information; if it is determined that the user is not allergic to pollen, obtain outdoor PM2.5 concentration data and weather information that can characterize the current weather conditions, and control the operation of the fresh air fan and the opening and closing of the window based on the outdoor PM2.5 concentration data, the weather information and the preference information.
[0093] In one possible implementation, the control module 930 is configured to: determine whether the outdoor PM2.5 concentration data is lower than a first threshold; if it is determined that the outdoor PM2.5 concentration data is lower than the first threshold, further determine whether it is suitable to open the window based on the weather information; if it is determined that it is suitable to open the window, control the operation of the fresh air fan and the opening and closing of the window based on the preference information.
[0094] In one possible implementation, the control module 930 is configured as follows: if the preference information indicates that the plant that the user dislikes is in flowering, then the window is closed and the fresh air fan is turned on; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is in flowering, then the window is opened and the fresh air fan is turned off; if the preference information indicates that the plant that the user dislikes is not in flowering and the plant that the user likes is not in flowering, then the window is closed and the fresh air fan is turned on.
[0095] In a possible implementation, the control module 930 is configured to: if it is determined that it is not appropriate to open the window, close the window and turn on the fresh air fan.
[0096] In one possible implementation, the control module 930 is configured to: if it is determined that the outdoor PM2.5 concentration data is not lower than the first threshold, control the operation of the fresh air fan and the opening and closing of the window according to the indoor PM2.5 concentration data and the indoor CO2 concentration data.
[0097] In one possible implementation, the control module 930 is configured to: determine whether the indoor PM2.5 concentration data is lower than a second threshold and whether the indoor CO2 concentration data is lower than a third threshold; if it is determined that the indoor PM2.5 concentration data is lower than the second threshold and the indoor CO2 concentration data is lower than the third threshold, close the window and turn off the fresh air fan; if it is determined that the indoor PM2.5 concentration data is not lower than the second threshold and / or the indoor CO2 concentration data is not lower than the third threshold, close the window and turn on the fresh air fan.
[0098] In a possible implementation, the sleep control device 900 may further include: a collection module (not shown), used to pre-collect allergy information indicating whether the user is allergic to pollen, and store allergy information indicating that the user is allergic to pollen; if the user is not allergic to pollen, pre-collect the user's preference data for outdoor plants, obtain flowering period data related to the flowering period of the outdoor plants, and associate the preference data with the flowering period data and store them as the preference information. Accordingly, the acquisition module 910 is configured to: obtain the allergy information or obtain the preference information.
[0099] In a possible implementation, the sleep control device 900 may further include: a display module (not shown) for displaying a collection screen for collecting the associated data, wherein the collection screen includes a first area for inputting the allergy information and a second area for inputting the preference information, and in response to information indicating that the user is allergic to pollen being input into the first area, the second area is hidden to change the state of the second area from an editable state to a non-editable state.
[0100] In one possible implementation, the collection screen also includes a third area for inputting the user's location; when the second area is in an editable state, in response to the geographical information input into the third area, a first set representing a set of plants that the user likes and a second set representing a set of plants that the user hates are displayed in the second area, wherein the first set and the second set each include a plurality of outdoor plants that match the geographical information; the user's favorite outdoor plants are stored in response to a selection operation on the first set, and the user's hate outdoor plants are stored in response to a selection operation on the second set.
[0101] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0102] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0103] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0104] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0105] Fig.10 8 is a block diagram of a sleep control device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0106] Reference Fig.10 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 (I / O interface), a sensor component 814 , and a communication component 816 .
[0107] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0108] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0109] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0110] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0111] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0112] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0113] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0114] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0115] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0116] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the device 800 to perform the above method.
[0117] Fig.11 1 is a block diagram of a sleep control apparatus 1900 according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server or a terminal device. Fig.11 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0118] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSDTM or similar.
[0119] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.
[0120] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A sleep control method, characterized in that: include: an acquisition step for acquiring user-related data related to outdoor plants, wherein the associated data includes allergy information capable of indicating whether the user is allergic to pollen, and preference information capable of indicating the user's preference for outdoor plants; A control step is used to control the operation of the fresh air fan and the opening and closing of the windows of the room where the user sleeps according to the allergy information and the preference information.
2. The method according to claim 1, characterized in that The control step comprises: determining whether the user is allergic to pollen according to the allergy information; If it is determined that the user is allergic to pollen, the window is closed and the fresh air blower is turned on regardless of the outdoor PM2.5 concentration data and the current weather conditions.
3. The method according to claim 1, characterized in that The control step comprises: determining whether the user is allergic to pollen according to the allergy information; If it is determined that the user is not allergic to pollen, outdoor PM2.5 concentration data and weather information that can characterize the current weather conditions are obtained, and the operation of the fresh air fan and the opening and closing of the windows are controlled according to the outdoor PM2.5 concentration data, the weather information and the preference information.
4. The method according to claim 3, characterized in that Controlling the operation of the fresh air fan and the opening and closing of the window according to the outdoor PM2.5 concentration data, the weather information and the preference information includes: Determine whether the outdoor PM2.5 concentration data is lower than a first threshold; If it is determined that the outdoor PM2.5 concentration data is lower than the first threshold, further determining whether it is suitable to open the window based on the weather information; If it is determined that it is appropriate to open the window, the operation of the fresh air fan and the opening and closing of the window are controlled according to the preference information.
5. The method according to claim 4, characterized in that Controlling the operation of the fresh air fan and the opening and closing of the window according to the preference information includes: If the preference information indicates that the plant that the user dislikes is in bloom, closing the window and turning on the fresh air blower; If the preference information indicates that the plant that the user dislikes is not in bloom and the plant that the user likes is in bloom, then opening the window and turning off the fresh air blower; If the preference information indicates that the plants that the user dislikes are not in bloom and the plants that the user likes are not in bloom either, the window is closed and the fresh air blower is turned on.
6. The method according to claim 4, characterized in that If it is determined that it is not suitable to open the window, the window is closed and the fresh air fan is turned on.
7. The method according to claim 4, characterized in that If it is determined that the outdoor PM2.5 concentration data is not lower than the first threshold, the operation of the fresh air fan and the opening and closing of the window are controlled according to the indoor PM2.5 concentration data and the indoor CO2 concentration data.
8. The method according to claim 7, characterized in that Controlling the operation of the fresh air fan and the opening and closing of the window according to the indoor PM2.5 concentration data and the indoor CO2 concentration data includes: Determine whether the indoor PM2.5 concentration data is lower than a second threshold and whether the indoor CO2 concentration data is lower than a third threshold; If it is determined that the indoor PM2.5 concentration data is lower than the second threshold and the indoor CO2 concentration data is lower than the third threshold, close the window and turn off the fresh air fan; If it is determined that the indoor PM2.5 concentration data is not lower than the second threshold and / or the indoor CO2 concentration data is not lower than the third threshold, the window is closed and the fresh air fan is turned on.
9. The method according to any one of claims 1 to 8, characterized in that Also includes: pre-collecting allergy information indicating whether the user is allergic to pollen, and storing the allergy information indicating whether the user is allergic to pollen; In the case where the user is not allergic to pollen, the user's preference data for outdoor plants is collected in advance, the flowering period data related to the flowering period of the outdoor plants is obtained, and the preference data is associated with the flowering period data and stored as the preference information. Accordingly, the obtaining step includes: obtaining the allergy information or obtaining the preference information.
10. The method according to claim 9, characterized in that Also includes: displaying a collection screen for collecting the associated data, The collection screen includes a first area for inputting the allergy information and a second area for inputting the preference information. In response to information indicating that the user is allergic to pollen being input into the first area, the second area is hidden so that the state of the second area is changed from an editable state to a non-editable state.
11. The method according to claim 10, characterized in that The collection screen also includes a third area for inputting the user's location; In response to the regional information input to the third area, when the second area is in an editable state, displaying in the second area a first set representing a set of plants that the user likes and a second set representing a set of plants that the user dislikes, wherein the first set and the second set each include a plurality of outdoor plants that match the regional information; In response to a selection operation on the first set, outdoor plants that the user likes are stored, and in response to a selection operation on the second set, outdoor plants that the user dislikes are stored.
12. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 11 when executing the instructions stored in the memory.
13. A sleep control system, characterized in that: include: The electronic device and the fresh air blower according to claim 12.
14. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.