Light control method for bathroom mirror cabinet, controller, bathroom mirror cabinet and medium

By updating the environmental change judgment threshold in real time, the lighting control method based on the bathroom mirror cabinet solves the problem of insufficient lighting control accuracy in different environments, achieving higher lighting control accuracy and universality.

CN119136381APending Publication Date: 2024-12-13YINGCHENG LEHUA KITCHEN&BATHROOM FURNITURE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411262569.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The lighting control method of bathroom mirror cabinets is insufficient in different environments and is greatly affected by the light intensity and material, resulting in a decrease in the accuracy of induction recognition.

Method used

By obtaining the environmental exposure value and the environmental non-exposure value, the environment transformation difference value is calculated, and the threshold is compared based on the target environment transformation judgment threshold, and the threshold is updated in real time to perform the light opening and closing switching operation, improving the accuracy and universality of light control.

Benefits of technology

Effective control of bathroom mirror cabinet lighting in different lighting environments improves the accuracy and universality of lighting control and reduces misidentification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119136381A_ABST
    Figure CN119136381A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a light control method for a bathroom mirror cabinet, a controller, the bathroom mirror cabinet and a medium, and belongs to the technical field of bathroom mirror cabinets. The method comprises the following steps: acquiring an environment exposure value and an environment non-exposure value; performing difference value calculation according to the environment exposure value and the environment non-exposure value to obtain an environment transformation difference value; comparing the environment transformation difference value at the first moment with a target environment transformation judgment threshold value to obtain a transformation difference value comparison result; wherein the transformation difference value comparison result comprises a first result, the first result is that the environment transformation difference value at the first moment is greater than a target environment transformation judgment threshold value, the target environment transformation judgment threshold value is obtained by updating a preset initial environment transformation judgment threshold value based on the environment transformation difference value at the second moment, and the first moment is later than the second moment; and executing light on-off switching operation according to the first result. According to the embodiment of the invention, the accuracy and universality of the light control method of the bathroom mirror cabinet can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of bathroom mirror cabinets, and in particular to a lighting control method, a controller, a bathroom mirror cabinet and a medium for a bathroom mirror cabinet. Background Art

[0002] Bathroom mirror cabinets usually have lighting components. At present, the lighting components can be turned on and off by induction recognition, for example, the user manually covers the photosensitive module of the bathroom mirror cabinet to turn the light on or off. However, different environments often affect the accuracy of induction recognition and may even cause erroneous recognition results. For example, the bathroom mirror cabinet is set above a wash basin made of different materials. The light intensity reflected by the wash basin surface is different, and the light intensity received by the photosensitive module is also different, which will cause interference to the photosensitive module.

[0003] Therefore, how to improve the accuracy and universality of the lighting control method of the bathroom mirror cabinet has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a lighting control method, a controller, a bathroom mirror cabinet and a medium for a bathroom mirror cabinet, aiming to improve the accuracy and universality of the lighting control method of the bathroom mirror cabinet.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a lighting control method for a bathroom mirror cabinet, the method comprising:

[0006] Get the ambient exposure value and the ambient non-exposure value;

[0007] Performing difference calculation based on the environmental exposure value and the environmental non-exposure value to obtain an environmental transformation difference;

[0008] Compare the environment change difference at the first moment with the target environment change judgment threshold to obtain a change difference comparison result; wherein the change difference comparison result includes a first result, the first result is that the environment change difference at the first moment is greater than the target environment change judgment threshold, the target environment change judgment threshold is obtained by updating a preset initial environment change judgment threshold based on the environment change difference at the second moment, and the first moment is later than the second moment;

[0009] According to the first result, a light on / off switching operation is performed.

[0010] In some embodiments, after comparing the environment change difference at the first moment with the target environment change judgment threshold to obtain the change difference comparison result, the method further includes:

[0011] Obtaining the number of the first results to obtain a first target number;

[0012] If the first target quantity is greater than a preset quantity threshold, a light brightness adjustment operation is performed.

[0013] In some embodiments, before comparing the environment change difference at the first moment with the target environment change judgment threshold to obtain the change difference comparison result, the method further includes:

[0014] Calculate the average value of the environmental change difference of at least two consecutive historical moments to obtain a historical average environmental difference; at least two of the historical moments include the second moment;

[0015] The initial environment change judgment threshold is updated according to the historical average environment difference to obtain the target environment change judgment threshold.

[0016] In some embodiments, the updating of the initial environment change judgment threshold according to the historical average environment difference to obtain the target environment change judgment threshold includes:

[0017] Performing weighted calculation based on the historical average environmental difference and the initial environmental change judgment threshold to obtain an environmental change judgment weighted value;

[0018] The environment change judgment weighted value is determined as the target environment change judgment threshold.

[0019] In some embodiments, before acquiring the environmental exposure value and the environmental non-exposure value, the method further includes:

[0020] Initializing the initial environment change judgment threshold specifically includes:

[0021] Initialize the polling interval;

[0022] At each polling interval, obtaining an initial environment non-exposure value and an initial environment exposure value;

[0023] Calculate the average value of the initial environment non-exposure values ​​according to the second target number to obtain the initial environment non-exposure average value;

[0024] Calculate an average value of the initial environmental exposure values ​​according to the second target number to obtain an initial environmental exposure average value;

[0025] The initial environment change judgment threshold is obtained by performing a difference calculation based on the initial environment non-exposure average value and the initial environment exposure average value.

[0026] In some embodiments, after obtaining the environment exposure value and the environment non-exposure value, the method further includes:

[0027] Obtaining a light intensity comparison result by comparing the environmental non-exposure value with a preset light intensity threshold;

[0028] If the light intensity comparison result is that the ambient non-exposure value is less than the light intensity threshold, the preset light sensitivity is increased to obtain an updated light sensitivity; wherein, the light sensitivity is used to characterize the minimum detection light intensity of the light detection module, and the light detection module is used to detect the ambient exposure value and the ambient non-exposure value.

[0029] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes a controller, which includes a memory and a processor, the memory stores a computer program, and the processor implements the lighting control method for a bathroom mirror cabinet described in the first aspect when executing the computer program.

[0030] To achieve the above object, a third aspect of an embodiment of the present application provides a bathroom mirror cabinet, the bathroom mirror cabinet comprising: the controller, the light detection module, the lighting drive module and the lighting module described in the second aspect; wherein the lighting drive module comprises a first switch submodule; the lighting module has a light-on state and a light-off state;

[0031] The controller is electrically connected to the light detection module and the first switch submodule, and the first switch submodule is electrically connected to the lighting module;

[0032] The light detection module is used to collect environmental exposure values ​​and environmental non-exposure values;

[0033] The lighting driving module is used to control the first switch submodule to be turned on or off in response to the light on / off switching operation, so as to control the lighting module to be in the light-on state or the light-off state.

[0034] In some embodiments, the bathroom mirror cabinet further includes a demisting drive module and a demisting module;

[0035] Wherein, the demisting driving module includes a second switch submodule, and the second switch submodule connects the controller and the demisting module;

[0036] The controller is further used to control the second switch submodule to be turned on or off, so as to control the defog module to perform a defog action.

[0037] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0038] The lighting control method, controller, bathroom mirror cabinet and medium for bathroom mirror cabinet proposed in the present application, after obtaining the environment exposure value and the environment non-exposure value, the difference calculation is performed according to the environment exposure value and the environment non-exposure value to obtain the environment change difference; and the environment change difference at the first moment is compared with the target environment change judgment threshold to obtain the change difference comparison result; wherein the target environment change judgment threshold is obtained by updating the preset initial environment change judgment threshold based on the environment change difference at the second moment, and the first moment is later than the second moment; if the environment change difference at the first moment is greater than the target environment change judgment threshold, the light on / off switching operation is performed. It can be seen that the embodiment of the present application updates the target environment change judgment threshold by the environment change difference at the second moment, thereby updating the target environment change judgment threshold in real time based on the lighting conditions of the environment where the bathroom mirror cabinet is located; and the updated target environment change judgment threshold is used to judge whether the environment change difference at the first moment is greater than the target environment change judgment threshold, and if the environment change difference is greater than the target environment change judgment threshold, the light on / off switching operation is performed, and the light of the bathroom mirror cabinet can be controlled in different lighting environments, thereby improving the accuracy and universality of the lighting control method of the bathroom mirror cabinet. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flow chart of a lighting control method for a bathroom mirror cabinet provided in an embodiment of the present application;

[0040] Figure 2 is a flow chart of a lighting control method for a bathroom mirror cabinet provided by another embodiment of the present application;

[0041] Figure 3 is a flow chart of a lighting control method for a bathroom mirror cabinet provided by another embodiment of the present application;

[0042] Figure 4 yes Figure 3 Flowchart of step 302 in FIG.

[0043] Figure 5 is a flow chart of a lighting control method for a bathroom mirror cabinet provided by another embodiment of the present application;

[0044] Figure 6 is a schematic diagram of the hardware structure of the controller provided in the embodiment of the present application;

[0045] Figure 7 is a module block diagram of a bathroom mirror cabinet provided in an embodiment of the present application;

[0046] Figure 8 is a structural schematic diagram of a bathroom mirror cabinet of an application example provided in an embodiment of the present application;

[0047] Fig. 9is a module block diagram of a bathroom mirror cabinet provided in another embodiment of the present application;

[0048] Fig.10 is a circuit schematic diagram of a light detection module provided in an embodiment of the present application;

[0049] Fig.11 is a circuit schematic diagram of a lighting driving module provided in an embodiment of the present application;

[0050] Fig.12 is a circuit schematic diagram of an anti-fog driving module provided in one embodiment of the present application;

[0051] Figure numerals: 10, controller; 20, light detection module; 30, lighting drive module; 40, lighting module; 50, defogger drive module; 60, defogger module; 31, first switch submodule; 51, second switch submodule. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0055] First, some nouns involved in this application are analyzed:

[0056] Infrared pair tube: It includes infrared transmitting tube and infrared receiving tube, where the infrared transmitting tube is used to transmit infrared rays and the infrared receiving tube is used to receive infrared rays. When the infrared pair tube detects an object, its output voltage will change. This voltage change can be detected by a microcontroller (also called a microcontroller unit, Microcontroller Unit, MCU) or other electronic devices, thereby realizing the detection of objects or the measurement of distance.

[0057] Bathroom mirror cabinet: a type of bathroom furniture that combines the functions of a mirror and a storage cabinet. Bathroom mirror cabinets can be equipped with lighting equipment, such as LED light strips.

[0058] The lighting control method for a bathroom mirror cabinet, the controller, the bathroom mirror cabinet, and the medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the lighting control method for a bathroom mirror cabinet in the embodiments of the present application is described.

[0059] Figure 1 is an optional flow chart of a lighting control method for a bathroom mirror cabinet provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps 101 to 104.

[0060] Step 101, obtaining an environmental exposure value and an environmental non-exposure value;

[0061] Step 102, performing difference calculation based on the environmental exposure value and the environmental non-exposure value to obtain an environmental transformation difference;

[0062] Step 103, comparing the environment change difference at the first moment with the target environment change judgment threshold to obtain a change difference comparison result; wherein the change difference comparison result includes a first result, the first result is that the environment change difference at the first moment is greater than the target environment change judgment threshold, the target environment change judgment threshold is obtained by updating the preset initial environment change judgment threshold based on the environment change difference at the second moment, and the first moment is later than the second moment;

[0063] Step 104: Perform a light on / off switching operation according to the first result.

[0064] The beneficial effects of the embodiments of the present application include but are not limited to: updating the target environment change judgment threshold by the environment change difference at the second moment, thereby updating the target environment change judgment threshold in real time based on the lighting conditions of the environment where the bathroom mirror cabinet is located; and using the updated target environment change judgment threshold to judge whether the environment change difference at the first moment is greater than the target environment change judgment threshold. If the environment change difference is greater than the target environment change judgment threshold, a light on / off switching operation is performed, so that the light of the bathroom mirror cabinet can be controlled in different lighting environments, thereby improving the accuracy and universality of the light control method of the bathroom mirror cabinet.

[0065] In step 101 of some embodiments, the ambient exposure value and the ambient non-exposure value can be obtained through the light detection module. Specifically, the light detection module is deployed in the bathroom mirror cabinet, and the light detection module can be an infrared pair tube, such as a digital infrared pair tube, wherein the digital infrared pair tube includes an infrared transmitting tube and an infrared receiving tube, wherein the infrared transmitting tube is used to transmit infrared rays, and the infrared receiving tube is used to receive infrared rays. Therefore, the ambient light can be detected by the digital infrared pair tube to obtain the ambient exposure value and the ambient non-exposure value. Among them, the ambient light refers to the lighting state around the bathroom mirror cabinet. The ambient exposure value and the ambient non-exposure value can also be obtained by other means, not limited to this.

[0066] It should be noted that exposure refers to the infrared emitting tube emitting infrared light, and non-exposure refers to the infrared emitting tube not emitting infrared light. The environmental exposure value refers to the energy value detected by the infrared receiving tube when the infrared emitting tube is exposed (emitting infrared light); the environmental non-exposure value refers to the energy value detected by the infrared receiving tube when the infrared emitting tube is not exposed (not emitting infrared light).

[0067] It should be noted that the environment in which the bathroom mirror cabinet is located will affect the ambient exposure value and the ambient non-exposure value. For example, in one application example, the bathroom mirror cabinet is set above a smooth ceramic wash basin, and ceramics can reflect light very well. Therefore, the light intensity detected by the light detection module on the bathroom mirror cabinet is relatively large, resulting in a relatively large ambient non-exposure value. In another application example, the bathroom mirror cabinet is set on a rough stone wash basin, and the light intensity refracted by the stone wash basin is relatively small, or the light around the bathroom mirror cabinet is relatively dark, resulting in a relatively small light intensity detected by the light detection module, which in turn results in a relatively small ambient non-exposure value.

[0068] In some embodiments, the environmental exposure value and the environmental non-exposure value can be periodically obtained according to a preset polling interval. The polling interval can be the interval time for the digital infrared tube to detect the illumination state, such as collecting the environmental exposure value and the environmental non-exposure value every 0.1s (seconds). The exposure time of the digital infrared tube can also be initialized. The exposure time refers to the time for the infrared transmitting tube of the digital infrared tube to emit infrared light. The longer the exposure time, the greater the light intensity received by the infrared receiving tube, and the greater the environmental exposure value. Therefore, when the environmental exposure value is too small (for example, less than a preset exposure intensity lower limit threshold), the exposure time can be increased, such as increasing the exposure time by a preset unit time length, and the unit time length can specifically be 0.5ms (milliseconds).

[0069] Specifically, the environmental exposure value and the environmental non-exposure value may be standardized values ​​without units. The digital infrared tube may store the environmental exposure value and the environmental non-exposure value in an internal register, and the MCU reads the environmental exposure value and the environmental non-exposure value from the internal memory to calculate the difference between the environmental exposure value and the environmental non-exposure value.

[0070] In step 102 of some embodiments, the difference calculation is performed according to the environmental exposure value and the environmental non-exposure value, and the absolute value of the difference between the environmental exposure value and the environmental non-exposure value can be calculated. It should be noted that the environmental transformation difference is used to characterize the difference between the environmental exposure value and the environmental non-exposure value, and the size of the environmental transformation difference can be used to determine whether the user has made a light shielding action (such as a hand sweeping action, or using a hand to approach the detection area corresponding to the light detection module of the bathroom mirror cabinet). For example, when the infrared transmitting tube is exposed (emitting infrared light), if the infrared rays emitted by the infrared transmitting tube are blocked by an object, the light intensity received by the infrared receiving tube is weakened, resulting in a higher output voltage of the infrared receiving tube, which is usually expressed as a high level (for example, the voltage of the power supply connected to the digital infrared pair tube), resulting in a larger value of the environmental exposure value, and then the environmental transformation difference is larger. If there is no object blocking the infrared rays, the output voltage of the infrared receiving tube is low, which is usually expressed as a low level (such as 0V to 0.5V), resulting in a smaller value of the environmental exposure value, and then the environmental transformation difference is small. In addition, the environmental non-exposure value is mainly affected by the ambient light around the bathroom mirror cabinet. Since the intensity of ambient light is weaker than the intensity of infrared light emitted by the infrared emitting tube, when the infrared emitting tube is not exposed, if there is an object blocking the light, the ambient non-exposure value will increase, but the degree of increase in the ambient non-exposure value is much smaller than the ambient exposure value. It can be seen that when there is an object blocking the infrared light, the difference in ambient change is larger; when there is no object blocking the infrared light, the difference in ambient change is smaller.

[0071] In step 103 of some embodiments, the transformation difference comparison result indicates that the environment transformation difference is greater than the target environment transformation judgment threshold, or indicates that the environment transformation difference is less than or equal to the target environment transformation judgment threshold. It should be noted that the target environment transformation judgment threshold is obtained by updating the preset initial environment transformation judgment threshold based on the environment transformation difference at the second moment. The specific updating process includes: after obtaining the environment exposure value and the environment non-exposure value at the second moment and calculating the environment transformation difference, the initial environment transformation judgment threshold is updated with the environment transformation difference at the second moment to obtain the target environment transformation judgment threshold. Then, after a period of time (for example, after a polling interval), at the first moment, the environment exposure value and the environment non-exposure value are obtained and the environment transformation difference at the first moment is calculated, and the target environment transformation judgment threshold updated at the second moment is compared with the environment transformation difference at the first moment to obtain the transformation difference comparison result. Since the environment transformation difference at the second moment is the difference between the environment exposure value and the environment non-exposure value, it can reflect the lighting state of the environment. Therefore, by updating the target environment transformation judgment threshold by the environment transformation difference at the second moment, the target environment transformation judgment threshold can be updated in time when the environment changes. In this way, this embodiment is applicable to different lighting environments, thereby improving the accuracy and universality of the lighting control method for the bathroom mirror cabinet.

[0072] In step 104 of some embodiments, a light on / off switching operation is performed according to the first result. That is, if the environment change difference at the first moment is greater than the target environment change judgment threshold, the lighting module of the bathroom mirror cabinet is controlled to be in a light-on state or a light-off state. The lighting module may be a light strip or an LED (light emitting diode) lamp bead.

[0073] It should be noted that if the environment change difference is greater than the target environment change judgment threshold, it means that there is a shading action, so the light on / off switching operation is performed. Performing the light on / off switching operation means that if the lighting module of the bathroom mirror cabinet is in the light-on state, the lighting module is switched from the light-on state to the light-off state; if the lighting module of the bathroom mirror cabinet is in the light-off state, the lighting module is switched from the light-off state to the light-on state.

[0074] See also Figure 2 In some embodiments, after step 103, the lighting control method for a bathroom mirror cabinet may further include but is not limited to steps 201 to 202:

[0075] Step 201, obtaining the number of first results to obtain a first target number;

[0076] Step 202: If the first target quantity is greater than a preset quantity threshold, a light brightness adjustment operation is performed.

[0077] The advantage of this embodiment is that, when the obtained transformation difference comparison result continues to be the first result, the number of the first results is obtained to obtain the first target number, and the first target number is compared with a preset number threshold. If the first target number is greater than the preset number threshold, a light brightness adjustment operation is performed, thereby being able to control the light brightness of the bathroom mirror cabinet and improving the flexibility of the light control method.

[0078] In step 201 of some embodiments, the number of first results obtained refers to the number of first results obtained when the transformation difference comparison results in the continuous time period are all the first results. For example, the transformation difference comparison result obtained at time t1 is the first result, and after a polling interval, the transformation difference comparison result obtained at time t2 is also the first result. In this way, if the measurement is performed continuously for 5 times and the transformation difference comparison result obtained each time is also the first result, the number of first results is 5.

[0079] In step 202 of some embodiments, if the first target quantity is greater than a preset quantity threshold, it can be determined that a continuous shading action is detected. For example, the quantity threshold is 9, and if a transformation difference comparison result is obtained every 0.1 seconds, 10 transformation difference comparison results are obtained in succession. If each transformation difference comparison result is the first result, it means that the manual shading action lasted for 1 second, and the first target quantity is 10. Since the first target quantity is 10 and is greater than the quantity threshold of 9, a light brightness adjustment operation can be performed. It should be noted that the light brightness adjustment operation can be performed by adjusting between preset light brightness gears, such as adjusting the state of the lighting module of the bathroom mirror cabinet from the first light gear to the second light gear. The light intensity corresponding to the second light gear is greater than the light intensity corresponding to the first light gear.

[0080] In some embodiments, when performing the light brightness adjustment operation, the lighting module is in a light-on state.

[0081] See also Figure 3 In some embodiments, before step 103, the lighting control method for a bathroom mirror cabinet may also include but is not limited to steps 301 to 302:

[0082] Step 301, calculating the average value of the environmental change difference of at least two consecutive historical moments to obtain the historical average environmental difference value; the at least two historical moments include the second moment;

[0083] Step 302: Update the initial environment change judgment threshold according to the historical average environment difference to obtain the target environment change judgment threshold.

[0084] The advantage of this embodiment is that the initial environment change judgment threshold is updated by the average value of the environment change difference at multiple consecutive moments, thereby eliminating the deviation of the single calculated environment change difference as much as possible, obtaining a more reliable historical average environment difference, and using the historical average environment difference to update the initial environment change judgment threshold, thereby improving the reliability of the target environment change judgment threshold obtained after the update.

[0085] In step 301 of some embodiments, at least two consecutive historical moments, wherein consecutive means that there is only a polling interval between the two historical moments. For example, the polling interval is 0.5 seconds, and polling is performed every 0.5 seconds. First, the environmental exposure value and the environmental non-exposure value are obtained at time t1 and the environmental change difference Q1 is calculated, and at time t2 after 0.5 seconds, the environmental change difference Q2 is calculated again, and so on, the environmental change difference is calculated every 0.5 seconds until time t128, and the environmental change difference Q128 is calculated, and the environmental change difference of 128 consecutive historical moments can be obtained. Then, the average value of the 128 environmental change differences is calculated to obtain the historical average environmental difference Qp=(Q1+Q2+…+Q128) / 128. Finally, the initial environmental change judgment threshold is updated according to the historical average environmental difference Qp.

[0086] In step 302 of some embodiments, the initial environment change judgment threshold is updated according to the historical average environment difference value. Specifically, the historical average environment difference value may be determined as the initial environment change judgment threshold value, or the historical average environment difference value and the initial environment change judgment threshold value may be weightedly calculated to obtain the updated target environment change judgment threshold value. The target environment change judgment threshold value may also be calculated in other ways, without limitation thereto.

[0087] See also Figure 4 In some embodiments, step 302 may include but is not limited to steps 401 to 402:

[0088] Step 401, performing weighted calculation based on the historical average environment difference and the initial environment change judgment threshold to obtain an environment change judgment weighted value;

[0089] Step 402: determine the environment change judgment weighted value as the target environment change judgment threshold.

[0090] The advantage of this embodiment is that the target environment change judgment threshold is calculated by a weighted sum method, which can improve the accuracy of the target environment change judgment threshold, thereby improving the accuracy of the lighting control method of the bathroom mirror cabinet.

[0091] In step 401 of some embodiments, the weighted calculation may specifically be a weighted average calculation.

[0092] In step 402 of some embodiments, the target environment change judgment threshold is an environment change judgment threshold used for comparison with the environment change difference at the next moment (a moment after a polling interval time).

[0093] In some embodiments, before step 101, the light control method for a bathroom mirror cabinet may further include:

[0094] Initialize the initial environment change judgment threshold;

[0095] Wherein, initializing the initial environment change judgment threshold may specifically include:

[0096] Initialize the polling interval;

[0097] At each polling interval, the initial environment non-exposure value and the initial environment exposure value are obtained;

[0098] Calculate the average value of the initial environment non-exposure values ​​of the second target number to obtain the initial environment non-exposure average value;

[0099] Calculate the average value of the initial environmental exposure values ​​of the second target number to obtain an average value of the initial environmental exposure;

[0100] The initial environment change judgment threshold is obtained by performing a difference calculation based on the initial environment non-exposure average value and the initial environment exposure average value.

[0101] The advantage of this embodiment is that, at each polling interval, the initial environment non-exposure value and the initial environment exposure value are obtained; the initial environment non-exposure average value is obtained according to the average value of the initial environment non-exposure values ​​of the second target number; and the initial environment exposure average value is obtained according to the average value of the initial environment exposure values ​​of the second target number, so that the initial environment change judgment threshold can be calculated according to the difference between the initial environment non-exposure average value and the initial environment exposure average value, and the initial environment change judgment threshold is initialized. In the embodiment of the present application, the initial environment change judgment threshold is initialized according to the surrounding environment of the bathroom mirror cabinet, thereby improving the accuracy of the initial environment change judgment threshold, thereby improving the accuracy of the target environment change judgment threshold obtained by subsequent updates.

[0102] It should be noted that the second target number may be any positive integer, such as 32. The polling interval may range from 0.05 to 1 second.

[0103] See also Figure 5 In some embodiments, after step 101, the lighting control method for a bathroom mirror cabinet may include but is not limited to steps 501 to 502:

[0104] Step 501, comparing the ambient non-exposure value with a preset light intensity threshold to obtain a light intensity comparison result;

[0105] Step 502, if the light intensity comparison result is that the ambient non-exposure value is less than the light intensity threshold, increase the preset light sensitivity to obtain an updated light sensitivity; wherein the light sensitivity is used to characterize the minimum detection light intensity of the light detection module, and the light detection module is used to detect the ambient exposure value and the ambient non-exposure value.

[0106] The advantage of this embodiment is that a light intensity comparison result is obtained by comparing the ambient non-exposure value with a preset light intensity threshold, and the light sensitivity is updated according to the light intensity comparison result, so as to adapt to the numerical values ​​of the ambient exposure value and the ambient non-exposure value detected by the light detection module, thereby improving the universality of the lighting control method and being applicable to different lighting environments.

[0107] It should be noted that the minimum detection light intensity refers to the minimum light intensity that the light detection module can detect. The greater the light sensitivity, the smaller the minimum detection light intensity. If the light intensity comparison result is that the ambient non-exposure value is less than the light intensity threshold, it means that the light in the environment where the bathroom mirror cabinet is located is weak. Therefore, increasing the light sensitivity can more accurately obtain the ambient non-exposure value, so that the light sensitivity can be adjusted according to the environment.

[0108] In step 501 of some embodiments, the light intensity comparison result may indicate that the ambient non-exposure value is less than the light intensity threshold, or that the ambient non-exposure value is greater than or equal to the light intensity threshold.

[0109] In step 502 of some embodiments, increasing the preset light sensitivity may be increasing the light sensitivity by a preset sensitivity unit value. The sensitivity unit value may be any positive real number, which is not limited in the embodiments of the present application. Specifically, the light sensitivity may be expressed in mW / sr, where mW / sr represents the power per unit area within a unit solid angle (sr for short), i.e., the power per square meter per solid angle is how many milliwatts (mW for short).

[0110] The embodiment of the present application further provides a controller, the controller includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned light control method for bathroom mirror cabinet when executing the computer program. Specifically, the controller can be an MCU. The controller can also include any intelligent terminal such as a tablet computer, a car computer, etc.

[0111] See also Figure 6 , Figure 6 The hardware structure of a controller of another embodiment is illustrated, and the controller includes:

[0112] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0113] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the lighting control method for a bathroom mirror cabinet in the embodiment of this application;

[0114] Input / output interface 603, used to implement information input and output;

[0115] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0116] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );

[0117] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0118] See also Figure 7 The embodiment of the present application further provides a bathroom mirror cabinet, which includes: the above-mentioned controller 10, a light detection module 20, a lighting drive module 30 and a lighting module 40; wherein the lighting drive module 30 includes a first switch submodule 31; the lighting module 40 has a light-on state and a light-off state;

[0119] The controller 10 is electrically connected to the light detection module 20 and the first switch submodule 31, and the first switch submodule 31 is electrically connected to the lighting module 40; the light detection module 20 is used to collect environmental exposure values ​​and environmental non-exposure values; the lighting driving module 30 is used to respond to the light on and off switching operation, control the first switch submodule 31 to be turned on or off, so as to control the lighting module 40 to be in the light-on state or the light-off state.

[0120] The beneficial effects of the embodiments of the present application include but are not limited to: the controller 10 executes the above-mentioned lighting control method to determine whether to perform a lighting on / off switching operation, and the lighting driving module 30 is used to control the first switch submodule 31 to be turned on or off in response to the lighting on / off switching operation, so as to control the lighting module 40 to be in a lighting on state or a lighting off state, thereby being able to control the lighting of the bathroom mirror cabinet in different lighting environments, thereby improving the accuracy and universality of the lighting control method of the bathroom mirror cabinet.

[0121] It should be noted that the lighting module 40 may be a light strip, and the light strip may be arranged around the mirror surface of the bathroom mirror cabinet.

[0122] See also Figure 7 and Figure 8 In one application example, the structure of the bathroom mirror cabinet is as follows Figure 8 Specifically, the rear side of the bathroom mirror cabinet can be mounted on the wall, and the light detection module 20 ( Figure 8 Alternatively, the light detection module 20 may be disposed at other positions of the bathroom mirror cabinet that can be blocked by human hands, which is not limited in the present embodiment of the present application.

[0123] See also Fig. 9 , in one embodiment, the bathroom mirror cabinet further includes a demisting driving module 50 and a demisting module 60;

[0124] The demisting driving module 50 includes a second switch submodule 51, and the second switch submodule 51 is connected to the controller 10 and the demisting module 60;

[0125] The controller 10 is further used to control the second switch submodule 51 to be turned on or off, so as to control the defog module 60 to perform a defog action.

[0126] The advantage of this embodiment is that the second switch submodule 51 of the defogger driving module 50 is turned on or off to control the defogger module 60 to perform the defogger action, thereby achieving defogger of the bathroom mirror cabinet and improving the functional diversity of the bathroom mirror cabinet.

[0127] Specifically, the demisting module 60 may be a demisting film, and the demisting film may be heated to perform a demisting action on the mirror surface of the bathroom mirror cabinet.

[0128] See also Fig.10In some embodiments, the light detection module 20 includes: a proximity sensing control chip U1 and a first capacitor C1, and the lighting module 40 includes: a light emitting diode LED1 and a first resistor R1. The first resistor R1 is electrically connected to the positive electrode of the light emitting diode LED1, the negative electrode of the light emitting diode LED1 is electrically connected to the proximity sensing control chip U1, the proximity sensing control chip U1 is electrically connected to one end of the first capacitor C1, and the other end of the first capacitor C1 is grounded.

[0129] Specifically, the light emitting diode LED1 is an infrared emitting tube in a digital infrared pair tube. The controller 10 includes a control chip (not shown in the figure).

[0130] It should be noted that VB represents a voltage-stabilized power supply terminal, which can provide a stable voltage of 5V for powering the proximity sensing control chip U1. P1 represents a control interface, which is connected to the control chip of the controller 10 and receives a pulse signal from the control chip, which can be a PWM (Pulse Width Modulation) signal.

[0131] In some embodiments, the light emitting diode LED1 emits 940nF (nanofarad) of infrared light in response to the pulse signal, and the proximity sensing control chip U1 detects the infrared light, thereby collecting the environmental exposure value and the environmental non-exposure value, and after analog-to-digital conversion, the environmental exposure value and the environmental non-exposure value are stored in the memory of the proximity sensing chip U1. The proximity sensing control chip U1 transmits the environmental exposure value and the environmental non-exposure value to the controller 10 through the control interface P1. The controller 10 executes the above-mentioned light control method. If the light needs to be turned on, the controller 10 outputs a high level to control the light to be turned on. Conversely, if the light needs to be turned off, the controller 10 outputs a low level to control the light to be turned off. In another embodiment, when the lighting module 40 is in the light-on state, the controller 10 also controls the defogger module 60 to be in the light-off state; when the lighting module 40 is in the light-off state, the controller 10 also controls the defogger module 60 to be in the light-off state.

[0132] See also Fig.11 In some embodiments, the lighting driving module 30 includes: a second capacitor C2, a third capacitor C3, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a sixth resistor R6 and a seventh resistor R7: the first switch submodule 31 includes a first MOS tube Q1 and a second MOS tube Q2.

[0133] The gate of the first MOS tube Q1 is electrically connected to one end of the second resistor R2 and the third resistor R3, the drain of the first MOS tube Q1 is electrically connected to one end of the second capacitor C2, the source of the first MOS tube Q1 is grounded, the other end of the second capacitor C2 is electrically connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is grounded, and the other end of the third resistor R3 is grounded; the gate of the second MOS tube Q2 is electrically connected to one end of the fifth resistor R5 and the sixth resistor R6, the drain of the second MOS tube Q2 is electrically connected to one end of the third capacitor C3, the source of the second MOS tube Q2 is grounded, the other end of the third capacitor C3 is electrically connected to one end of the seventh resistor R7, the other end of the seventh resistor R7 is grounded, and the other end of the sixth resistor R6 is grounded.

[0134] It should be noted that VCC represents a driving voltage terminal, which is used to provide a driving voltage, such as 10V. The anti-fog module 60 includes a first anti-fog film CN1. Fig.11 In the embodiment, the drain of the first MOS transistor Q1 and the drain of the second MOS transistor Q2 are both electrically connected to the first anti-fogging film CN1.

[0135] See also Fig.12 In some embodiments, the anti-fog driving module 50 includes: a fourth capacitor C4, an eighth resistor R8, a ninth resistor R9 and a tenth resistor R10; the second switch submodule 51 includes a third MOS tube Q3; and the anti-fog module 60 also includes a second anti-fog film CN2.

[0136] The gate of the third MOS tube Q3 is electrically connected to one end of the eighth resistor R8 and the ninth resistor R9, the drain of the third MOS tube Q3 is electrically connected to one end of the fourth capacitor C4, the source of the third MOS tube Q3 is grounded, the other end of the fourth capacitor C4 is electrically connected to one end of the tenth resistor R10, the other end of the tenth resistor R10 is grounded, and the other end of the ninth resistor R9 is grounded.

[0137] The specific implementation of the bathroom mirror cabinet is substantially the same as the specific embodiment of the lighting control method for the bathroom mirror cabinet described above, and will not be described in detail herein.

[0138] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned lighting control method for a bathroom mirror cabinet is implemented.

[0139] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0140] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0141] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0142] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0144] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0145] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0150] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A lighting control method for a bathroom mirror cabinet, characterized in that: The method comprises: Get the ambient exposure value and the ambient non-exposure value; Performing difference calculation based on the environmental exposure value and the environmental non-exposure value to obtain an environmental transformation difference; Compare the environment change difference at the first moment with the target environment change judgment threshold to obtain a change difference comparison result; wherein the change difference comparison result includes a first result, the first result is that the environment change difference at the first moment is greater than the target environment change judgment threshold, the target environment change judgment threshold is obtained by updating a preset initial environment change judgment threshold based on the environment change difference at the second moment, and the first moment is later than the second moment; According to the first result, a light on / off switching operation is performed.

2. The lighting control method for a bathroom mirror cabinet according to claim 1, characterized in that: After comparing the environment change difference at the first moment with the target environment change judgment threshold to obtain a change difference comparison result, the method further includes: Obtaining the number of the first results to obtain a first target number; If the first target quantity is greater than a preset quantity threshold, a light brightness adjustment operation is performed.

3. The lighting control method for a bathroom mirror cabinet according to claim 1, characterized in that: Before comparing the environment change difference at the first moment with the target environment change judgment threshold to obtain the change difference comparison result, the method further includes: Calculate the average value of the environmental change difference of at least two consecutive historical moments to obtain a historical average environmental difference; at least two of the historical moments include the second moment; The initial environment change judgment threshold is updated according to the historical average environment difference to obtain the target environment change judgment threshold.

4. The lighting control method for a bathroom mirror cabinet according to claim 3, characterized in that: The updating of the initial environment change judgment threshold according to the historical average environment difference to obtain the target environment change judgment threshold includes: Performing weighted calculation based on the historical average environmental difference and the initial environmental change judgment threshold to obtain an environmental change judgment weighted value; The environment change judgment weighted value is determined as the target environment change judgment threshold.

5. The lighting control method for a bathroom mirror cabinet according to any one of claims 1 to 4, characterized in that: Before obtaining the environmental exposure value and the environmental non-exposure value, the method further includes: Initializing the initial environment change judgment threshold specifically includes: Initialize the polling interval; At each polling interval, obtaining an initial environment non-exposure value and an initial environment exposure value; Calculate the average value of the initial environment non-exposure values ​​according to the second target number to obtain the initial environment non-exposure average value; Calculate an average value of the initial environmental exposure values ​​according to the second target number to obtain an initial environmental exposure average value; The initial environment change judgment threshold is obtained by performing a difference calculation based on the initial environment non-exposure average value and the initial environment exposure average value.

6. The lighting control method for a bathroom mirror cabinet according to any one of claims 1 to 4, characterized in that: After obtaining the environmental exposure value and the environmental non-exposure value, the method further includes: Comparing the ambient non-exposure value with a preset light intensity threshold, obtaining a light intensity comparison result; If the light intensity comparison result is that the ambient non-exposure value is less than the light intensity threshold, the preset light sensitivity is increased to obtain an updated light sensitivity; wherein, the light sensitivity is used to characterize the minimum detection light intensity of the light detection module, and the light detection module is used to detect the ambient exposure value and the ambient non-exposure value.

7. A controller, characterized in that: The controller includes a memory and a processor, the memory stores a computer program, and the processor implements the lighting control method for a bathroom mirror cabinet according to any one of claims 1 to 6 when executing the computer program.

8. A bathroom mirror cabinet, characterized in that: The bathroom mirror cabinet comprises: the controller according to claim 7, a light detection module, a lighting drive module and a lighting module; wherein the lighting drive module comprises a first switch submodule; the lighting module has a light-on state and a light-off state; The controller is electrically connected to the light detection module and the first switch submodule, and the first switch submodule is electrically connected to the lighting module; The light detection module is used to collect environmental exposure values ​​and environmental non-exposure values; The lighting driving module is used to control the first switch submodule to be turned on or off in response to the light on / off switching operation, so as to control the lighting module to be in the light-on state or the light-off state.

9. The bathroom mirror cabinet according to claim 8, characterized in that: The bathroom mirror cabinet also includes a demisting drive module and a demisting module; Wherein, the demisting driving module includes a second switch submodule, and the second switch submodule connects the controller and the demisting module; The controller is further used to control the second switch submodule to be turned on or off, so as to control the defog module to perform a defog action.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the lighting control method for a bathroom mirror cabinet according to any one of claims 1 to 6 is implemented.