Bathroom intelligent light adjustment method, device and storage medium
By acquiring data in real time through a smart bathroom lighting control system and using a genetic algorithm to optimize the lighting status, the system solves the multi-objective balance problem of lighting control in nighttime shower scenarios, achieving synergistic optimization of visual clarity, melatonin protection, and energy efficiency.
Patent Information
- Application Number
- CN202510722154.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Existing bathroom lighting adjustment methods cannot find the optimal balance between several conflicting goals, especially in nighttime shower scenarios, where they cannot simultaneously meet the user's needs for visual clarity, melatonin secretion suppression, and energy efficiency.
The system employs a smart bathroom lighting control system based on local edge computing. It combines a pyroelectric array, a sound extraction device, and a temperature sensor to acquire bathroom status data in real time. The system optimizes the lighting status, including brightness, color temperature, and color, using a genetic algorithm. It determines the optimal parameter combination based on user information, time, and ambient humidity to achieve gradual dimming and brightening of the lighting.
It significantly reduced melatonin suppression, improved users' sleep quality and mental state the next day, and achieved efficient energy use and visual clarity.
Smart Images

Figure CN120390331B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of smart home technology, and more particularly to a method and device for adjusting bathroom lighting, and a computer-readable storage medium. Background Art
[0002] With the development of smart home technology, the demand for intelligent bathroom lighting systems is growing. Traditional bathroom lighting control methods are relatively simple, providing only simple on / off and brightness adjustment, which cannot meet the personalized needs of users in different scenarios. While existing intelligent lighting systems can adjust to a certain extent based on the environment and user behavior, they still lack the ability to achieve multi-objective collaborative optimization.
[0003] Specifically, how to adapt to different showering scenarios—for example, in a nighttime shower—while ensuring visual clarity, minimizing the effect of light on melatonin suppression, while also achieving efficient energy use, is a pressing issue. Existing lighting adjustment methods typically only consider a single or limited number of factors, making it difficult to find the optimal balance between multiple, conflicting objectives. Summary of the Invention
[0004] In view of the above problems, the embodiments of the present invention provide a bathroom intelligent lighting adjustment method, device and computer-readable storage medium to solve the problem in the prior art that the user cannot adapt to the current scene when taking a shower and is more adaptable to the needs of the human body.
[0005] According to one aspect of an embodiment of the present invention, a method for intelligent bathroom light adjustment is provided. The method is applied to an intelligent bathroom light adjustment system. The system is based on local edge computing and includes multiple types of lighting devices and multiple types of sensor devices disposed at multiple preset locations in the bathroom. The sensor devices include a pyroelectric array, a sound extraction device, and a temperature sensor device. The method includes:
[0006] Real-time acquisition of current bathroom status data; the current bathroom status data includes the current time, current ambient temperature, the user's current body condition and the current water flow sound state;
[0007] When it is determined that the user has entered the shower area according to the current human body state, and the shower is turned on according to the current water flow sound state, it is determined that the user has entered the shower state;
[0008] activating a target shower mode based on the user information, the current time, the current ambient temperature, and the current ambient humidity; the target shower mode includes the lighting status of the lighting device in the shower area, the ventilation mode, and room temperature adjustment information; the target shower mode is one of multiple shower modes, including a bedtime shower mode and a morning shower mode; the lighting status is determined according to a lighting adjustment decision algorithm;
[0009] When you finish showering, the light in the shower area will turn off in the fade-out mode, while the light in the dressing area will turn on in the fade-in mode.
[0010] When it is detected that the user leaves the bathroom, the bathroom lighting is turned off and the ventilation and dehumidification mode is turned on.
[0011] In an optional manner, the lighting device of the shower area includes a first lighting device arranged above the shower device and a lighting strip arranged on the floor and / or side walls of the shower area;
[0012] The starting of the target shower mode according to the current time and the current ambient temperature includes:
[0013] The user information of the user, the current time, the current ambient temperature, and the current ambient humidity are input into a lighting adjustment decision algorithm to determine a first lighting state of a first lighting device above the shower device; and a second lighting state of the lighting strip, thereby obtaining a lighting state of the shower area; the first lighting state includes a first light brightness, a first light color, and a first light color temperature; and the second lighting state includes a second light brightness, a second light color, and a second light color temperature.
[0014] In an optional manner, inputting the user information of the user, the current time, the current ambient temperature, and the current ambient humidity into the lighting adjustment decision algorithm to obtain the lighting state of the shower area includes:
[0015] Determine a time category according to the current time; the time category includes a morning period or a night period;
[0016] When the current time is night, determining to set a first light brightness, a first light color, and a first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining a second light brightness, a second light color, and a second light color temperature of the lighting strip according to the compensation mechanism;
[0017] When the current time is morning, it is determined that the first light state and the second light state are in vitality mode; in the vitality mode, the brightness of the first light is greater than the first brightness threshold, and the color of the first light is cool white; the lighting strip has a dynamic scanning effect and a blue or green light strip.
[0018] In an optional manner, when the current time is night, determining to set the first light brightness, the first light color, and the first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining the second light brightness, the second light color, and the second light color temperature of the lighting strip according to the compensation mechanism includes:
[0019] Determining a first light brightness range, a first light color range, and a first light color temperature range according to the user's melatonin suppression curve and user information;
[0020] According to the first light brightness range, the first light color range, and the first light color temperature range, a genetic algorithm is used to simulate a biological evolution process to search for an optimal parameter combination in a solution space;
[0021] The optimal parameter combination is converted into a recognizable control instruction for the first lighting device to obtain the first lighting state.
[0022] In an optional manner, the step of simulating a biological evolution process using a genetic algorithm to search for an optimal parameter combination in a solution space based on the first light brightness range, the first light color range, and the first light color temperature range includes:
[0023] Setting a population size, a maximum number of evolutionary generations, and an optimization objective function, wherein the optimization objective function includes melatonin protection, visual clarity, and energy efficiency; wherein each individual includes light brightness, light color, and light color temperature;
[0024] Randomly generate brightness value, color temperature value and color value for each individual;
[0025] Based on the objective function of each individual optimization goal, the melatonin protection fitness, visual clarity fitness, and energy efficiency fitness were calculated;
[0026] Through Pareto optimality, the boundary distance of each individual on each optimization objective function is calculated, and selection operations, adaptive crossover operations and mutation operations are performed to determine the elite individuals from the Pareto optimal to replace the worst performing individuals;
[0027] The above iterative process is performed to obtain the optimal parameter combination in the solution space.
[0028] In an optional manner, obtaining the difference between the current time and the user's preset sleep time;
[0029] Calculate the user's movement amplitude and frequency through pyroelectric array data to determine the user's current activity intensity;
[0030] Substitute the time factor into the basic brightness curve formula to obtain the basic brightness range;
[0031] The first light brightness range is determined according to the current activity intensity, the basic brightness, and the user brightness preference coefficient.
[0032] In an optional manner, determining the first light brightness range, the first light color range, and the first light color temperature range based on the user's melatonin suppression curve and user information includes:
[0033] Substitute the time factor into the basic color temperature curve formula to obtain the basic color temperature range;
[0034] Calculate temperature compensation according to ambient temperature to obtain color temperature compensation value;
[0035] A first light color temperature range is obtained according to the color temperature compensation value and the basic color temperature range.
[0036] In an optional manner, the real-time acquisition of current bathroom status data includes:
[0037] When the user enters the bathroom, the identity of the user entering the bathroom is determined based on the facial recognition device;
[0038] determining target user preferences based on the identity;
[0039] The starting of the target shower mode according to the user information of the user, the current time, the current ambient temperature and the current ambient humidity includes:
[0040] A target shower mode is activated according to the target user preference, the current time, the current ambient temperature, and the current ambient humidity.
[0041] According to another aspect of an embodiment of the present invention, there is provided a bathroom intelligent light adjustment device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0042] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the bathroom intelligent lighting adjustment method.
[0043] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the operations of the bathroom intelligent lighting adjustment method.
[0044] An embodiment of the present invention obtains current bathroom status data in real time; the current bathroom status data includes the current time, the current ambient temperature, the user's current body state, and the current water flow sound state; when it is determined that the user has entered the shower area based on the current body state, and the shower is determined to be turned on based on the current water flow sound state, the user is determined to have entered the shower state; based on the user information of the user, the current time, the current ambient temperature, and the current ambient humidity, a target shower mode is activated; when the shower is completed, the lights in the shower area are gradually turned off, and the lights in the dressing area are gradually turned on; when it is detected that the user has left the bathroom, the bathroom lighting is turned off, and the ventilation and dehumidification mode is activated. This embodiment can effectively combine the current time and environmental information to determine the lighting adjustment that best suits the user's showering method.
[0045] Furthermore, the embodiments of the present invention incorporate the current ambient humidity and melatonin suppression curve during light adjustment. Since the ambient humidity during showering affects the brightness, color temperature, and color of the light to a certain extent, the influence of the current ambient humidity must be considered when setting the light state. Furthermore, by collaboratively optimizing the brightness, color temperature, and color of the bathroom light, the multi-objective requirements of melatonin protection, visual clarity, and energy efficiency can be simultaneously met.
[0046] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the drawings. In the drawings:
[0048] Figure 1 A schematic diagram showing the flow of a bathroom intelligent lighting adjustment method provided by an embodiment of the present invention is shown;
[0049] Figure 2 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0051] Figure 1The flowchart of the bathroom intelligent light adjustment method provided by an embodiment of the present invention is shown, and the method is executed by a computer device. The computer device can be an intelligent adjustment device set in the bathroom, and is applied to the bathroom intelligent light adjustment system. The system is based on local edge computing and includes multiple types of lighting devices and multiple types of sensor devices set in multiple preset positions in the bathroom. The sensor devices include pyroelectric arrays, sound extraction devices, and temperature sensor devices. The present invention does not impose specific restrictions. Figure 1 As shown, the method includes the following steps:
[0052] Step 110: Obtain current bathroom status data in real time.
[0053] The current bathroom status data includes the current time, the current ambient temperature, the user's current body state, and the current water flow sound state.
[0054] After acquiring the current bathroom status data in real time, the system uses the user's current body state to determine the user's identity when they enter the bathroom. The system then uses the facial recognition device to determine the user's identity. The target user's preferences are determined based on their identity. The target user's preferences can be the preferences the user entered when registering with the system. When the user's face is recognized, the corresponding user preferences are retrieved from the database. These user preferences can include lighting, music, and more.
[0055] Step 120: When it is determined that the user has entered the shower area according to the current human body state, and the shower is turned on according to the current water flow sound state, it is determined that the user has entered the shower state.
[0056] In one embodiment of the present invention, the user is determined to be in the shower state when the following conditions are met simultaneously:
[0057] 1. The human presence sensor confirms that the user is in the shower area (for ≥5 seconds).
[0058] 2. The water flow sound classification model outputs “shower on”.
[0059] 3. The humidity sensor detects a humidity rise rate greater than 5% / minute.
[0060] This embodiment of the present invention also handles feedback delays and false positives. When the time from detecting the sound of running water to the final judgment is ≤ 2 seconds, this configuration can avoid user experience delays. If the sound of running water persists for less than 3 seconds and the humidity does not rise, the detection is a false positive. A false positive is incorrectly determined as a shower being on. The hardware verification of the water flow sensor is verified to determine whether it is a false negative, meaning a shower being on is missed.
[0061] Step 130: Activate a target shower mode according to the user information of the user, the current time, the current ambient temperature, and the current ambient humidity.
[0062] The target shower mode is activated based on the target user's preferences, the current time, the current ambient temperature, and the current ambient humidity. In this embodiment of the present invention, the target shower mode includes the lighting status of the lighting device in the shower area, the ventilation mode, and room temperature adjustment information; the target shower mode is one of multiple shower modes, including a bedtime shower mode and a morning shower mode; and the lighting status is determined according to a lighting adjustment decision algorithm.
[0063] The lighting device in the shower area includes a first lighting device disposed above the shower device and a lighting strip disposed on the floor and / or sidewalls of the shower area. In this embodiment of the present invention, the user information, the current time, the current ambient temperature, and the current ambient humidity are input into a lighting adjustment decision algorithm to determine a first lighting state of the first lighting device above the shower device and a second lighting state of the lighting strip, thereby obtaining the lighting state of the shower area. The first lighting state includes a first light brightness, a first light color, and a first light color temperature; the second lighting state includes a second light brightness, a second light color, and a second light color temperature.
[0064] The process of determining the first light brightness range is as follows:
[0065] Get the difference between the current time and the user's preset sleep time;
[0066] Calculate the user's movement amplitude and frequency through pyroelectric array data to determine the user's current activity intensity;
[0067] Substitute the time factor into the basic brightness curve formula to obtain the basic brightness range; the basic brightness curve formula is:
[0068] Basic brightness = 200-150×(time factor 0.7 );
[0069] The first light brightness range is determined based on the current activity intensity, the base brightness, and the user brightness preference coefficient. The current activity intensity is multiplied by 50, and the user brightness preference coefficient range is 0.8-1.2. The first light brightness range is between 50-250 lux.
[0070] The process of determining the color temperature range of the first light is as follows:
[0071] Substitute the time factor into the basic color temperature curve formula to obtain the basic color temperature range; the basic color temperature curve formula is: basic color temperature = 3000-800×(time factor 0.5)
[0072] Temperature compensation is calculated based on the ambient temperature to obtain a color temperature compensation value. When the ambient temperature is below 25°C, the color temperature increases by 10K for every 1°C decrease. The temperature compensation value is calculated as: max(0,25 - current temperature) × 10. Based on the color temperature compensation value and the basic color temperature range, a first light color temperature range is obtained. The first color temperature range is between 2000-3000K.
[0073] In the embodiment of the present invention, the process of determining the spectral parameters in the first light color range is as follows:
[0074] Calculate the blue light suppression coefficient according to the user's age, and calculate the blue light ratio limit according to the time factor; determine the spectral parameters of the first light color according to the blue light suppression coefficient and the blue light ratio limit. Specifically, adjust the blue light sensitivity according to the user's age: Adjust the blue light sensitivity according to the user's age: Blue light suppression coefficient = 0.8 + 0.2 × (user age / 70). Calculate the blue light ratio limit according to the time factor: Maximum blue light ratio = 0.15 × blue light suppression coefficient × (1-time factor 0.6) Spectral parameters are generated, where the red ratio is 0.5 + 0.3 × the time factor, and the green ratio is 0.35 - 0.1 × the time factor. The blue ratio is the smaller of the calculated maximum blue ratio and 0.15. The amber ratio is 0.15 + 0.1 × the time factor. Spectral regulation uses blue light suppression technology by controlling the mixing ratio of the LED lamp beads. Based on the calculated spectral ratio, the output power of the RGBW four-color LED lamp beads is controlled. PWM dimming technology is used to achieve precise spectral mixing, resulting in LED mixed light control.
[0075] The user information of the user, the current time, the current ambient temperature and the current ambient humidity are input into the lighting adjustment decision algorithm to obtain the lighting status of the shower area, including:
[0076] A time category is determined based on the current time; the time category includes morning or evening. The morning period can be set to within 2 hours after sunrise to promote wakefulness. The evening period can be shortened to 9:30 PM to midnight, so when showering, it is necessary to avoid showering and light that may suppress melatonin.
[0077] When the current time is night, the first light brightness, first light color, and first light color temperature of the first lighting device are determined based on the user's melatonin suppression curve, and the second light brightness, second light color, and second light color temperature of the lighting strip are determined based on the compensation mechanism. In other words, the first lighting device serves as the primary lighting, directly determined by the melatonin curve. The lighting strips on the floor and / or side walls of the shower area provide additional floor contour lighting for anti-slip purposes.
[0078] In an embodiment of the present invention, the first light brightness range, the first light color range, and the first light color temperature range are determined based on the user's melatonin suppression curve, user information, and current ambient humidity; wherein the melatonin suppression curve is:
[0079]
[0080] Where: I melatonin This represents the melatonin suppression rate, which can range from 0 to 1. B is the light intensity (lux); B0 is the reference brightness (100 lux); λmax is the spectral peak wavelength, and k represents the individual sensitivity coefficient. Using this model, the system calculates the impact of the current lighting scheme on melatonin secretion in real time and dynamically adjusts parameters to ensure the suppression rate remains within a safe range (<30%).
[0081] In this embodiment of the present invention, based on the first light brightness range, the first light color range, and the first light color temperature range, a genetic algorithm is used to simulate the biological evolution process to search for the optimal parameter combination in the solution space; the optimal parameter combination is converted into a recognizable control instruction for the first lighting device to obtain the first light state.
[0082] Specifically, performing iterative processing through a genetic algorithm to obtain the final first lighting state includes the following steps:
[0083] Setting the population size, maximum evolutionary generations, and optimization objective function, wherein the optimization objective function includes melatonin protection, visual clarity, and energy efficiency; wherein each individual includes light brightness, light color, and light color temperature;
[0084] Randomly generate brightness value, color temperature value and color value for each individual;
[0085] Based on the objective function of each individual optimization goal, the melatonin protection fitness, visual clarity fitness, and energy efficiency fitness were calculated;
[0086] Through Pareto optimality, the boundary distance of each individual on each optimization objective function is calculated, and selection operations, adaptive crossover operations and mutation operations are performed to determine the elite individuals from the Pareto optimal to replace the worst performing individuals;
[0087] The above iterative process is performed to obtain the optimal parameter combination searched in the solution space.
[0088] Through this algorithm, the system achieves refined control of brightness, color temperature, and spectrum, meeting users' nighttime visual needs while minimizing interference with melatonin secretion and scientifically protecting sleep quality. Compared to traditional lighting solutions, this intelligent adjustment mechanism can reduce melatonin suppression by 40%-60%, significantly improving sleep quality and next-day mental well-being.
[0089] Step 140: When the shower is finished, the light in the shower area is turned off in a gradually extinguishing manner, and the light in the dressing area is turned on in a gradually brightening manner.
[0090] When the water flow sensor detects that the shower water flow stops for ≥30 seconds, or the humidity sensor detects that the humidity rise trend stops and starts to fall, the shower is determined to be complete.
[0091] The shower area brightness gradient process is as follows: the initial brightness is the current shower area light brightness, 50 lux in night mode, 300 lux in morning mode. When the target brightness is 0 lux, it is completely turned off.
[0092] Among them, the lights in the dressing area are turned on gradually in the opposite way.
[0093] Step 150: When it is detected that the user leaves the bathroom, turn off the lighting device in the bathroom and turn on the ventilation and dehumidification mode.
[0094] An embodiment of the present invention obtains current bathroom status data in real time; the current bathroom status data includes the current time, the current ambient temperature, the user's current body state, and the current water flow sound state; when it is determined that the user has entered the shower area based on the current body state, and the shower is determined to be turned on based on the current water flow sound state, the user is determined to have entered the shower state; based on the user information of the user, the current time, the current ambient temperature, and the current ambient humidity, a target shower mode is activated; when the shower is completed, the lights in the shower area are gradually turned off, and the lights in the dressing area are gradually turned on; when it is detected that the user has left the bathroom, the bathroom lighting is turned off, and the ventilation and dehumidification mode is activated. This embodiment can effectively combine the current time and environmental information to determine the lighting adjustment that best suits the user's showering method.
[0095] Furthermore, the embodiments of the present invention incorporate the current ambient humidity and melatonin suppression curve during light adjustment. Since the ambient humidity during showering affects the brightness, color temperature, and color of the light to a certain extent, the influence of the current ambient humidity must be considered when setting the light state. Furthermore, by collaboratively optimizing the brightness, color temperature, and color of the bathroom light, the multi-objective requirements of melatonin protection, visual clarity, and energy efficiency can be simultaneously met.
[0096] In another embodiment of the present invention, assume that the user enters the bathroom at 22:00 in the evening to prepare for a shower. After the system is started:
[0097] The real-time collected ambient temperature is 26°C and the humidity is 65%, and the user's preset sleep time is 23:00 and age is 35 years old.
[0098] Start the multi-objective optimization procedure based on the genetic algorithm:
[0099] Initialize the population and generate 100 individuals with random lighting parameters.
[0100] Calculate the time factor. At this time, it is 1 hour away from the sleep time, and the time factor is about 0.83.
[0101] The fitness values of the three objective functions are calculated for each individual.
[0102] Perform non-dominated sorting and crowding distance calculation to determine the Pareto optimal front.
[0103] Parent individuals are selected through the tournament selection method, adaptive crossover and intelligent mutation operations are performed, and elite retention is performed.
[0104] The above fitness evaluation, selection, crossover, mutation and elite retention steps are repeated until the maximum number of evolution generations is reached or the convergence condition is met.
[0105] Finally, the optimal lighting control parameters were obtained, such as brightness of 120 lux, color temperature of 2800K, and spectrum ratio of red 0.4, green 0.3, blue 0.15, and amber 0.15.
[0106] Based on the above parameters, the lighting control module adopts a progressive adjustment strategy to adjust the bathroom lighting to the corresponding state, ensuring clear vision for the user while reducing the impact on melatonin secretion and achieving rational use of energy.
[0107] Figure 2 The schematic diagram of the structure of the computer device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0108] like Figure 2 As shown, the computer device may include: a processor 402 , a communications interface 404 , a memory 406 , and a communication bus 408 .
[0109] Processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other devices, such as clients or other server network elements. Processor 402 is used to execute program 410, which may specifically perform the steps described in the aforementioned embodiment of the intelligent bathroom lighting adjustment method.
[0110] Specifically, the program 410 may include program code including computer-executable instructions.
[0111] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a computer device may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.
[0112] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0113] The program 410 may be specifically called by the processor 402 to cause the computer device to perform the following operations:
[0114] Real-time acquisition of current bathroom status data; the current bathroom status data includes the current time, current ambient temperature, the user's current body condition and the current water flow sound state;
[0115] When it is determined that the user has entered the shower area according to the current human body state, and the shower is turned on according to the current water flow sound state, it is determined that the user has entered the shower state;
[0116] activating a target shower mode based on the user information, the current time, the current ambient temperature, and the current ambient humidity; the target shower mode includes the lighting status of the lighting device in the shower area, the ventilation mode, and room temperature adjustment information; the target shower mode is one of multiple shower modes, including a bedtime shower mode and a morning shower mode; the lighting status is determined according to a lighting adjustment decision algorithm;
[0117] When you finish showering, the light in the shower area will turn off in the fade-out mode, while the light in the dressing area will turn on in the fade-in mode.
[0118] When it is detected that the user leaves the bathroom, the bathroom lighting is turned off and the ventilation and dehumidification mode is turned on.
[0119] In an optional manner, the lighting device of the shower area includes a first lighting device arranged above the shower device and a lighting strip arranged on the floor and / or side walls of the shower area;
[0120] The starting of the target shower mode according to the current time and the current ambient temperature includes:
[0121] The user information of the user, the current time, the current ambient temperature, and the current ambient humidity are input into a lighting adjustment decision algorithm to determine a first lighting state of a first lighting device above the shower device; and a second lighting state of the lighting strip, thereby obtaining a lighting state of the shower area; the first lighting state includes a first light brightness, a first light color, and a first light color temperature; and the second lighting state includes a second light brightness, a second light color, and a second light color temperature.
[0122] In an optional manner, inputting the user information of the user, the current time, the current ambient temperature, and the current ambient humidity into the lighting adjustment decision algorithm to obtain the lighting state of the shower area includes:
[0123] Determine a time category according to the current time; the time category includes a morning period or a night period;
[0124] When the current time is night, determining to set a first light brightness, a first light color, and a first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining a second light brightness, a second light color, and a second light color temperature of the lighting strip according to the compensation mechanism;
[0125] When the current time is morning, it is determined that the first light state and the second light state are in vitality mode; in the vitality mode, the brightness of the first light is greater than the first brightness threshold, and the color of the first light is cool white; the lighting strip has a dynamic scanning effect and a blue or green light strip.
[0126] In an optional manner, when the current time is night, determining to set the first light brightness, the first light color, and the first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining the second light brightness, the second light color, and the second light color temperature of the lighting strip according to the compensation mechanism includes:
[0127] Determining a first light brightness range, a first light color range, and a first light color temperature range according to the user's melatonin suppression curve and user information;
[0128] According to the first light brightness range, the first light color range, and the first light color temperature range, a genetic algorithm is used to simulate a biological evolution process to search for an optimal parameter combination in a solution space;
[0129] The optimal parameter combination is converted into a recognizable control instruction for the first lighting device to obtain the first lighting state.
[0130] In an optional manner, the step of simulating a biological evolution process using a genetic algorithm to search for an optimal parameter combination in a solution space based on the first light brightness range, the first light color range, and the first light color temperature range includes:
[0131] Setting a population size, a maximum number of evolutionary generations, and an optimization objective function, wherein the optimization objective function includes melatonin protection, visual clarity, and energy efficiency; wherein each individual includes light brightness, light color, and light color temperature;
[0132] Randomly generate brightness value, color temperature value and color value for each individual;
[0133] Based on the objective function of each individual optimization goal, the melatonin protection fitness, visual clarity fitness, and energy efficiency fitness were calculated;
[0134] Through Pareto optimality, the boundary distance of each individual on each optimization objective function is calculated, and selection operations, adaptive crossover operations and mutation operations are performed to determine the elite individuals from the Pareto optimal to replace the worst performing individuals;
[0135] The above iterative process is performed to obtain the optimal parameter combination in the solution space.
[0136] In an optional manner, obtaining the difference between the current time and the user's preset sleep time;
[0137] Calculate the user's movement amplitude and frequency through pyroelectric array data to determine the user's current activity intensity;
[0138] Substitute the time factor into the basic brightness curve formula to obtain the basic brightness range;
[0139] The first light brightness range is determined according to the current activity intensity, the basic brightness, and the user brightness preference coefficient.
[0140] In an optional manner, determining the first light brightness range, the first light color range, and the first light color temperature range based on the user's melatonin suppression curve and user information includes:
[0141] Substitute the time factor into the basic color temperature curve formula to obtain the basic color temperature range;
[0142] Calculate temperature compensation according to ambient temperature to obtain color temperature compensation value;
[0143] A first light color temperature range is obtained according to the color temperature compensation value and the basic color temperature range.
[0144] In an optional manner, the real-time acquisition of current bathroom status data includes:
[0145] When the user enters the bathroom, the identity of the user entering the bathroom is determined based on the facial recognition device;
[0146] determining target user preferences based on the identity;
[0147] The starting of the target shower mode according to the user information of the user, the current time, the current ambient temperature and the current ambient humidity includes:
[0148] A target shower mode is activated according to the target user preference, the current time, the current ambient temperature, and the current ambient humidity.
[0149] An embodiment of the present invention obtains current bathroom status data in real time; the current bathroom status data includes the current time, the current ambient temperature, the user's current body state, and the current water flow sound state; when it is determined that the user has entered the shower area based on the current body state, and the shower is determined to be turned on based on the current water flow sound state, the user is determined to have entered the shower state; based on the user information of the user, the current time, the current ambient temperature, and the current ambient humidity, a target shower mode is activated; when the shower is completed, the lights in the shower area are gradually turned off, and the lights in the dressing area are gradually turned on; when it is detected that the user has left the bathroom, the bathroom lighting is turned off, and the ventilation and dehumidification mode is activated. This embodiment can effectively combine the current time and environmental information to determine the lighting adjustment that best suits the user's showering method.
[0150] Furthermore, the embodiments of the present invention incorporate the current ambient humidity and melatonin suppression curve during light adjustment. Since the ambient humidity during showering affects the brightness, color temperature, and color of the light to a certain extent, the influence of the current ambient humidity must be considered when setting the light state. Furthermore, by collaboratively optimizing the brightness, color temperature, and color of the bathroom light, the multi-objective requirements of melatonin protection, visual clarity, and energy efficiency can be simultaneously met.
[0151] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the bathroom intelligent lighting adjustment method in any of the above method embodiments.
[0152] The executable instructions can be used to cause the computer device to perform the following operations:
[0153] Real-time acquisition of current bathroom status data; the current bathroom status data includes the current time, current ambient temperature, the user's current body condition, and the current water flow sound condition;
[0154] When it is determined that the user has entered the shower area according to the current human body state, and the shower is turned on according to the current water flow sound state, it is determined that the user has entered the shower state;
[0155] activating a target shower mode based on the user information, the current time, the current ambient temperature, and the current ambient humidity; the target shower mode includes the lighting status of the lighting device in the shower area, the ventilation mode, and room temperature adjustment information; the target shower mode is one of multiple shower modes, including a bedtime shower mode and a morning shower mode; the lighting status is determined according to a lighting adjustment decision algorithm;
[0156] When you finish showering, the light in the shower area will turn off in the fade-out mode, while the light in the dressing area will turn on in the fade-in mode.
[0157] When it is detected that the user leaves the bathroom, the bathroom lighting is turned off and the ventilation and dehumidification mode is turned on.
[0158] In an optional manner, the lighting device of the shower area includes a first lighting device arranged above the shower device and a lighting strip arranged on the floor and / or side walls of the shower area;
[0159] The starting of the target shower mode according to the current time and the current ambient temperature includes:
[0160] The user information of the user, the current time, the current ambient temperature, and the current ambient humidity are input into a lighting adjustment decision algorithm to determine a first lighting state of a first lighting device above the shower device; and a second lighting state of the lighting strip, thereby obtaining a lighting state of the shower area; the first lighting state includes a first light brightness, a first light color, and a first light color temperature; and the second lighting state includes a second light brightness, a second light color, and a second light color temperature.
[0161] In an optional manner, inputting the user information of the user, the current time, the current ambient temperature, and the current ambient humidity into the lighting adjustment decision algorithm to obtain the lighting state of the shower area includes:
[0162] Determine a time category according to the current time; the time category includes a morning period or a night period;
[0163] When the current time is night, determining to set a first light brightness, a first light color, and a first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining a second light brightness, a second light color, and a second light color temperature of the lighting strip according to the compensation mechanism;
[0164] When the current time is morning, it is determined that the first light state and the second light state are in vitality mode; in the vitality mode, the brightness of the first light is greater than the first brightness threshold, and the color of the first light is cool white; the lighting strip has a dynamic scanning effect and a blue or green light strip.
[0165] In an optional manner, when the current time is night, determining to set the first light brightness, the first light color, and the first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining the second light brightness, the second light color, and the second light color temperature of the lighting strip according to the compensation mechanism includes:
[0166] Determining a first light brightness range, a first light color range, and a first light color temperature range according to the user's melatonin suppression curve and user information;
[0167] According to the first light brightness range, the first light color range, and the first light color temperature range, a genetic algorithm is used to simulate a biological evolution process to search for an optimal parameter combination in a solution space;
[0168] The optimal parameter combination is converted into a recognizable control instruction for the first lighting device to obtain the first lighting state.
[0169] In an optional manner, the step of simulating a biological evolution process using a genetic algorithm to search for an optimal parameter combination in a solution space based on the first light brightness range, the first light color range, and the first light color temperature range includes:
[0170] Setting a population size, a maximum number of evolutionary generations, and an optimization objective function, wherein the optimization objective function includes melatonin protection, visual clarity, and energy efficiency; wherein each individual includes light brightness, light color, and light color temperature;
[0171] Randomly generate brightness value, color temperature value and color value for each individual;
[0172] Based on the objective function of each individual optimization goal, the melatonin protection fitness, visual clarity fitness, and energy efficiency fitness were calculated;
[0173] Through Pareto optimality, the boundary distance of each individual on each optimization objective function is calculated, and selection operations, adaptive crossover operations and mutation operations are performed to determine the elite individuals from the Pareto optimal to replace the worst performing individuals;
[0174] The above iterative process is performed to obtain the optimal parameter combination searched in the solution space.
[0175] In an optional manner, obtaining the difference between the current time and the user's preset sleep time;
[0176] Calculate the user's movement amplitude and frequency through pyroelectric array data to determine the user's current activity intensity;
[0177] Substitute the time factor into the basic brightness curve formula to obtain the basic brightness range;
[0178] The first light brightness range is determined according to the current activity intensity, the basic brightness, and the user brightness preference coefficient.
[0179] In an optional manner, determining the first light brightness range, the first light color range, and the first light color temperature range based on the user's melatonin suppression curve and user information includes:
[0180] Substitute the time factor into the basic color temperature curve formula to obtain the basic color temperature range;
[0181] Calculate temperature compensation according to ambient temperature to obtain color temperature compensation value;
[0182] A first light color temperature range is obtained according to the color temperature compensation value and the basic color temperature range.
[0183] In an optional manner, the real-time acquisition of current bathroom status data includes:
[0184] When the user enters the bathroom, the identity of the user entering the bathroom is determined based on the facial recognition device;
[0185] determining target user preferences based on the identity;
[0186] The starting of the target shower mode according to the user information of the user, the current time, the current ambient temperature and the current ambient humidity includes:
[0187] A target shower mode is activated according to the target user preference, the current time, the current ambient temperature, and the current ambient humidity.
[0188] An embodiment of the present invention obtains current bathroom status data in real time; the current bathroom status data includes the current time, the current ambient temperature, the user's current body state, and the current water flow sound state; when it is determined that the user has entered the shower area based on the current body state, and the shower is determined to be turned on based on the current water flow sound state, the user is determined to have entered the shower state; based on the user information of the user, the current time, the current ambient temperature, and the current ambient humidity, a target shower mode is activated; when the shower is completed, the lights in the shower area are gradually turned off, and the lights in the dressing area are gradually turned on; when it is detected that the user has left the bathroom, the bathroom lighting is turned off, and the ventilation and dehumidification mode is activated. This embodiment can effectively combine the current time and environmental information to determine the lighting adjustment that best suits the user's showering method.
[0189] Furthermore, the embodiments of the present invention incorporate the current ambient humidity and melatonin suppression curve during light adjustment. Since the ambient humidity during showering affects the brightness, color temperature, and color of the light to a certain extent, the influence of the current ambient humidity must be considered when setting the light state. Furthermore, by collaboratively optimizing the brightness, color temperature, and color of the bathroom light, the multi-objective requirements of melatonin protection, visual clarity, and energy efficiency can be simultaneously met.
[0190] An embodiment of the present invention provides a bathroom intelligent light adjustment device, which is used to execute the above-mentioned bathroom intelligent light adjustment method.
[0191] An embodiment of the present invention provides a computer program that can be invoked by a processor to enable a computer device to execute the bathroom intelligent lighting adjustment method in any of the above method embodiments.
[0192] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed on a computer, the computer executes the bathroom intelligent lighting adjustment method in any of the above method embodiments.
[0193] The algorithm or demonstration provided herein are not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems may also be used together with the teachings based on this. According to the above description, it is apparent that the structure required for constructing this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.
[0194] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known systems, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0195] Similarly, it should be understood that in order to streamline the present invention and aid understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed system should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0196] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any system or device disclosed in this manner can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) can be replaced by alternative features that provide the same, equivalent or similar purpose.
[0197] It should be noted that the above embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by a person skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.
Claims
1. A bathroom intelligent lighting adjustment method, characterized in that: A smart bathroom light adjustment system based on local edge computing is applied. The system includes multiple types of lighting devices and multiple types of sensor devices, including pyroelectric arrays, sound extraction devices, and temperature sensors, disposed at multiple preset locations in the bathroom. The method includes: Real-time acquisition of current bathroom status data; the current bathroom status data includes the current time, current ambient temperature, the user's current body condition and the current water flow sound state; When it is determined that the user has entered the shower area according to the current human body state, and the shower is turned on according to the current water flow sound state, it is determined that the user has entered the shower state; activating a target shower mode based on the user information, the current time, the current ambient temperature, and the current ambient humidity; the target shower mode includes the lighting status of the lighting device in the shower area, the ventilation mode, and room temperature adjustment information; the target shower mode is one of multiple shower modes, including a bedtime shower mode and a morning shower mode; the lighting status is determined according to a lighting adjustment decision algorithm; When you finish showering, the light in the shower area will turn off in the fade-out mode, while the light in the dressing area will turn on in the fade-in mode. When it is detected that the user leaves the bathroom, the bathroom lighting is turned off and the ventilation and dehumidification mode is turned on.
2. The method according to claim 1, characterized in that The lighting device of the shower area includes a first lighting device arranged above the shower device and a lighting strip arranged on the floor and / or side wall of the shower area; The starting of the target shower mode according to the current time and the current ambient temperature includes: The user information of the user, the current time, the current ambient temperature, and the current ambient humidity are input into a lighting adjustment decision algorithm to determine a first lighting state of a first lighting device above the shower device; and a second lighting state of the lighting strip, thereby obtaining a lighting state of the shower area; the first lighting state includes a first light brightness, a first light color, and a first light color temperature; and the second lighting state includes a second light brightness, a second light color, and a second light color temperature.
3. The method according to claim 2, characterized in that The step of inputting the user information, the current time, the current ambient temperature, and the current ambient humidity into the light adjustment decision algorithm to obtain the light status of the shower area includes: Determine a time category according to the current time; the time category includes a morning period or a night period; When the current time is night, determining to set a first light brightness, a first light color, and a first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining a second light brightness, a second light color, and a second light color temperature of the lighting strip according to the compensation mechanism; When the current time is morning, it is determined that the first light state and the second light state are in vitality mode; in the vitality mode, the brightness of the first light is greater than the first brightness threshold, and the color of the first light is cool white; the lighting strip is dynamic scanning and a blue or green light strip.
4. The method according to claim 3, characterized in that When the current time is night, determining to set a first light brightness, a first light color, and a first light color temperature of the first lighting device according to the user's melatonin suppression curve, and determining a second light brightness, a second light color, and a second light color temperature of the lighting strip according to the compensation mechanism, includes: Determining a first light brightness range, a first light color range, and a first light color temperature range based on the user's melatonin suppression curve, user information, and current ambient humidity; According to the first light brightness range, the first light color range, and the first light color temperature range, a genetic algorithm is used to simulate a biological evolution process to search for an optimal parameter combination in a solution space; The optimal parameter combination is converted into a recognizable control instruction for the first lighting device to obtain the first lighting state.
5. The method according to claim 4, characterized in that The step of simulating a biological evolution process by using a genetic algorithm to search for an optimal parameter combination in a solution space based on the first light brightness range, the first light color range, and the first light color temperature range includes: Setting the population size, maximum evolutionary generations, and optimization objective function, wherein the optimization objective function includes melatonin protection, visual clarity, and energy efficiency; wherein each individual includes light brightness, light color, and light color temperature; Randomly generate brightness value, color temperature value and color value for each individual; Based on the objective function of each individual optimization goal, the melatonin protection fitness, visual clarity fitness, and energy efficiency fitness were calculated; Through Pareto optimality, the boundary distance of each individual on each optimization objective function is calculated, and selection operations, adaptive crossover operations and mutation operations are performed to determine the elite individuals from the Pareto optimal to replace the worst performing individuals; The above iterative process is performed to obtain the optimal parameter combination searched in the solution space.
6. The method according to claim 4, characterized in that The determining of the first light brightness range, the first light color range, and the first light color temperature range according to the user's melatonin suppression curve and the user information includes: Get the difference between the current time and the user's preset sleep time; Calculate the user's movement amplitude and frequency through pyroelectric array data to determine the user's current activity intensity; Substitute the time factor into the basic brightness curve formula to obtain the basic brightness range; The first light brightness range is determined according to the current activity intensity, the basic brightness, and the user brightness preference coefficient.
7. The method according to claim 4, characterized in that The determining of the first light brightness range, the first light color range, and the first light color temperature range according to the user's melatonin suppression curve and the user information includes: Substitute the time factor into the basic color temperature curve formula to obtain the basic color temperature range; Calculate temperature compensation according to ambient temperature to obtain color temperature compensation value; A first light color temperature range is obtained according to the color temperature compensation value and the basic color temperature range.
8. The method according to any one of claims 1 to 3, characterized in that The real-time acquisition of current bathroom status data includes: When the user enters the bathroom, the identity of the user entering the bathroom is determined based on the facial recognition device; determining target user preferences based on the identity; The starting of the target shower mode according to the user information of the user, the current time, the current ambient temperature and the current ambient humidity includes: A target shower mode is activated according to the target user preference, the current time, the current ambient temperature, and the current ambient humidity.
9. A bathroom intelligent lighting adjustment device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the bathroom intelligent lighting adjustment method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The storage medium stores at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the operation of the bathroom intelligent lighting adjustment method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Bathroom equipment control method and device, intelligent bathroom equipment and storage medium
CN114281134A
Smart home equipment joint control method, storage medium and electronic device
CN116088334A