Method for regulating light source of storage compartment, regulating circuit, storage medium and storage cabinet
Patent Information
- Application Number
- CN202510293895.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]本发明的目的在于提供一种储物间室光源调节方法、调节电路、存储介质及储物柜,以解决当前储物间室光源无法适配用户实时状态,使用舒适度较低的问题
[0017]采用本申请实施例提供的方案,所带来的有益效果至少包括:
Smart Images

Figure CN122803119A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home appliance technology, and in particular to a method for adjusting the light source of a storage room, an adjustment circuit, a storage medium, and a storage cabinet. Background Technology
[0002] Nowadays, storage rooms are usually equipped with surface light sources to provide light when users open the storage room. The light environment has many effects on the human body in addition to visual factors. For example, light can affect people's mood, sleep and other physiological factors. Therefore, it is necessary to adjust the surface light source according to environmental factors to provide a better experience.
[0003] In related technologies, a method is employed to address the issue of nighttime lighting in refrigerator storage compartments by reducing the brightness of the surface light source during nighttime mode based on system time. Specifically, the brightness of the surface light source is adjusted by using pulse width modulation (PWM) duty cycle, allowing for a gradual brightening effect when the surface light source is turned on. For example, if the brightness in nighttime mode is 50% of that in daytime mode, the duty cycle gradually increases from 0% to the target value after the surface light source is turned on.
[0004] However, the solutions offered by these technologies offer a rather monotonous display mode with only one color temperature, which cannot be adjusted. Furthermore, users' perception of light sources varies depending on their state of mind, and these technologies only adjust the brightness of the light source based on time, failing to adapt to the user's real-time state, resulting in low comfort during use. Summary of the Invention
[0005] The purpose of this invention is to provide a method, circuit, storage medium, and locker for adjusting the light source in a storage room, in order to solve the problem that the current light source in storage rooms cannot adapt to the user's real-time status and has low user comfort.
[0006] To achieve the above objectives, this application provides a method for adjusting the light source in a storage room, the method comprising:
[0007] If a lighting requirement is detected, the current temperature of the storage room is obtained, and the user's fatigue level is detected.
[0008] Based on the fatigue state and the current temperature, the light source of the storage room is adjusted. The brightness of the adjusted light source is negatively correlated with the fatigue state, and the color temperature of the adjusted light source is positively correlated with the current temperature.
[0009] On the other hand, this application provides a light source adjustment circuit, including at least one first light-emitting element, at least one second light-emitting element, a first pulse signal control circuit, a second pulse signal control circuit, and a third pulse signal control circuit;
[0010] The first light-emitting element is connected with its anode to the output terminal of the first pulse signal control circuit and with its cathode to the input terminal of the second pulse signal control circuit.
[0011] The second light-emitting element is connected with its anode to the output terminal of the first pulse signal control circuit and with its cathode to the input terminal of the third pulse signal control circuit.
[0012] The output terminals of the second pulse signal control circuit and the third pulse signal control circuit are grounded;
[0013] When the circuit is turned on, the first pulse signal control circuit synchronously controls the brightness of the first light-emitting element and the second light-emitting element, the second pulse signal controls the brightness of the first light-emitting element, and the third pulse signal is used to control the brightness of the second light-emitting element.
[0014] As a further improvement to this application, the pulse signal control circuit includes a field-effect transistor.
[0015] On the other hand, this application provides a storage medium having a computer program stored thereon, which, when executed by a processor, performs the storage room light source adjustment method as described in any of the above aspects.
[0016] On the other hand, this application provides a locker, characterized in that it includes at least one storage compartment, a temperature sensor, a camera assembly, and a processor, the processor being used to execute a computer program to implement the storage compartment light source adjustment method as described in any of the above aspects.
[0017] The beneficial effects of adopting the solution provided in the embodiments of this application include at least the following:
[0018] In this embodiment, the current temperature of the storage room is first acquired, and the user's fatigue state is detected. The surface light source is then adjusted based on these two factors. Specifically, during the light source adjustment process, the color temperature of the light source is adjusted according to the current temperature of the storage room. This allows the user to intuitively perceive the current temperature of the storage room when opening it. Furthermore, the adjusted light source brightness is negatively correlated with fatigue state; that is, the stronger the fatigue, the weaker the light source brightness. This makes the light source brightness more closely match the user's real-time state, reducing user fatigue and enhancing the overall intelligence of the system. Attached Figure Description
[0019] Figure 1 A schematic diagram of an implementation environment provided by an illustrative embodiment of this application is shown;
[0020] Figure 2A flowchart illustrating a storage room light source adjustment method according to an illustrative embodiment of this application is shown.
[0021] Figure 3 A flowchart illustrating the process of adjusting a light source according to an illustrative embodiment of this application is shown;
[0022] Figure 4 A flowchart illustrating a process for detecting user fatigue state according to an illustrative embodiment of this application is shown;
[0023] Figure 5 A flowchart illustrating a schematic embodiment of this application for determining fatigue state based on eye closure degree is shown.
[0024] Figure 6 A flowchart illustrating a schematic embodiment of this application for detecting user fatigue state is shown;
[0025] Figure 7 A schematic diagram of a light source adjustment circuit provided in an illustrative embodiment of this application is shown;
[0026] Figure 8 A schematic diagram of the respective control pulse signals provided in an illustrative embodiment of this application is shown;
[0027] Figure 9 A schematic diagram of a locker structure provided in an illustrative embodiment of this application is shown. Detailed Implementation
[0028] The present invention will now be described in detail with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.
[0029] It should be noted that the term "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0030] Please refer to Figure 1 The diagram illustrates an implementation environment provided by an illustrative embodiment of this application, including a locker 110 and a server 120.
[0031] The locker 110 includes a camera assembly 111, a processor 112, and at least one storage compartment (not shown in the figure), which is equipped with a temperature sensor and a surface light source. The camera assembly 111 may be located on the locker door to capture a user's facial image when the locker door is closed, or it may be located in the storage compartment to capture a user's facial image even after the locker door is opened. After capturing the user's facial image, the image is sent to the processor 112. The processor 112 determines the user's fatigue level and then determines the brightness of the light source that needs to be adjusted.
[0032] The temperature sensor in the locker is used to detect the real-time temperature of the storage room and send the detected current temperature to the processor 112, so that the processor 112 can determine the light source color temperature that needs to be adjusted based on the current temperature.
[0033] After determining the light source brightness and color temperature that need to be adjusted, the processor 112 performs light source adjustment.
[0034] This is illustrative; please refer to it. Figure 1 A communication connection is established between the processor 112 and the server 120. This communication connection can be wireless, such as Bluetooth or WiFi (Wireless Fidelity), or wired, such as USB (Universal Serial Bus) or I / O (Input / Output Bus). Optionally, the processor 112 uploads the received user facial image and current temperature to the server 120. The server 120 detects the user's fatigue state based on the facial image, determines the required adjustment of the light source temperature and color temperature based on the fatigue state, and returns this information to the processor 112, thereby enabling the processor 112 to adjust the light source.
[0035] In the embodiments provided in this application, the process of identifying user fatigue status can also be implemented locally by the processor 112, and a suitable implementation method can be selected based on processor performance and communication quality.
[0036] Please refer to Figure 2 The diagram illustrates a flowchart of a storage room light source adjustment method according to an illustrative embodiment of this application. The method is executed by a processor located in the storage cabinet and includes the following steps:
[0037] Step 201: If a lighting requirement is detected, obtain the current temperature of the storage room and detect the user's fatigue level.
[0038] Optionally, in order to save resources, if a user has a need to use the storage room and it is determined that there is a need for lighting, then in order to quantitatively detect whether a user has a need for use, the need for lighting can be determined based on whether the door of the storage room is open.
[0039] In some embodiments, the outside light of the storage room may be strong, so there is no need to light the storage room itself, and the user can still see the items stored in the storage room. After the door of the storage room is detected to be open, the light intensity of the storage room can be further detected by a photosensitive sensor to determine whether there is a need for lighting.
[0040] Optionally, the current temperature of the storage room can be obtained by installing a temperature sensor inside the storage room. For example, the temperature sensor can be a thermistor, a digital temperature sensor, etc.
[0041] Optionally, after obtaining the current temperature, it can be transmitted to the processor through the sensor interface. The sensor interface can be I2C (Inter-Integrated Circuit) or SPI (Serial Peripheral Interface), etc.
[0042] Step 202: Adjust the light source in the storage room based on the fatigue state and the current temperature.
[0043] Among them, the adjusted light source brightness is negatively correlated with the fatigue state, and the adjusted light source color temperature is positively correlated with the current temperature.
[0044] Since higher brightness increases visual stimulation, and this stimulation intensifies when the user is highly fatigued, the brightness of the light source is reduced when the user is severely fatigued to alleviate fatigue. Furthermore, lowering the color temperature of the light source when the storage room temperature is high and raising it when the temperature is low allows the user to intuitively perceive the temperature inside the storage room.
[0045] Optionally, PWM (Pulse Width Modulation) signals can be used to control the brightness of the light source. For example, a PWM signal can be generated by a microcontroller (such as Arduino or STM32) to adjust the brightness of the LED beads.
[0046] In summary, this embodiment first acquires the current temperature of the storage room and detects the user's fatigue state, then adjusts the surface light source based on these factors. Specifically, during the light source adjustment process, the color temperature of the light source is adjusted according to the current temperature of the storage room, allowing the user to intuitively perceive the current temperature of the storage room when opening it. Furthermore, the adjusted light source brightness is negatively correlated with fatigue state; that is, the stronger the fatigue, the weaker the light source brightness. This makes the light source brightness more closely match the user's real-time state, reducing user fatigue and demonstrating a higher level of intelligence.
[0047] Surface light sources are often installed in storage rooms. In this embodiment, in order to adjust the color temperature of the surface light source, the surface light source includes a first light-emitting component and a second light-emitting component that are staggered. The first light-emitting component and the second light-emitting component are different colors. Therefore, the overall color temperature of the surface light source can be adjusted by adjusting the brightness of the first light-emitting component and the second light-emitting component.
[0048] For example, if the first light-emitting component emits warm yellow light and the second light-emitting component emits cool white light, then by adjusting the brightness of the light-emitting components, if the brightness of the first light-emitting component is higher than that of the second light-emitting component, the overall color of the surface light source will be more inclined to warm yellow, that is, the overall color temperature of the surface light source will be lower; conversely, if the brightness of the second light-emitting component is higher, the overall color of the surface light source will be more inclined to cool white, that is, the overall color temperature of the surface light source will be higher.
[0049] The process of adjusting the light source based on fatigue state and current temperature will be described below through an illustrative embodiment.
[0050] Please refer to Figure 3 The illustration shows a flowchart of an illustrative embodiment of the process for adjusting a light source, which includes the following steps:
[0051] Step 301: Determine the duty cycle of the first pulse signal based on the fatigue state.
[0052] The duty cycle of a pulse signal refers to the proportion of time a pulse signal is at a high level within one period. For example, in a pulse signal with a period of T, if the high level is maintained for a duration of t, then the duty cycle D = t / T.
[0053] When a pulse signal is applied to a light source (such as an LED bead), the light source is turned on and emits light during the high-level period, and turned off and does not emit light during the low-level period. By adjusting the duty cycle of the pulse signal, the duration of light emission per unit time can be changed, thereby achieving brightness adjustment. When the pulse signal is all low, the light source is turned off and does not emit light, and the brightness is 0. When the pulse signal duty cycle is adjusted to 50%, the high-level time and the low-level time are the same, the light emission time of the light source increases, the total amount of light emitted per unit time increases, and the brightness increases. When the pulse signal is all high, the light source is always turned on and emits light at maximum brightness.
[0054] Furthermore, due to the persistence of vision in the human eye, if the pulse signal frequency is high enough, the human eye will not perceive the flicker of the light source, but will perceive the continuous change of the light source. Therefore, the brightness of the light source can be adjusted by adjusting the duty cycle of the pulse signal.
[0055] The first pulse signal is used to synchronously adjust the brightness of the first and second light-emitting components. That is, after adjusting the duty cycle of the first pulse signal, the brightness of both the first and second light-emitting components will change. For example, if the duty cycle of the first pulse signal decreases, the brightness of both the first and second light-emitting components will decrease synchronously.
[0056] Since the brightness of the light source is negatively correlated with the user's fatigue state, when adjusting the brightness of the light source based on the user's fatigue state, if the user's fatigue state indicates that the user is relatively tired, the duty cycle of the first pulse signal should be reduced to reduce the overall brightness of the surface light source, thereby avoiding the light source being too bright and exacerbating the user's discomfort.
[0057] Conversely, if the user's fatigue level is low, the duty cycle of the first pulse signal should be appropriately increased to improve the overall brightness of the surface light source and thus provide a better lighting environment.
[0058] In one possible implementation, a preset form records the duty cycle of the first pulse signal corresponding to different fatigue states. The processor determines the duty cycle of the first pulse signal corresponding to the fatigue state by querying the first preset form, which is used to characterize the correspondence between different fatigue states and different pulse signal duty cycles.
[0059] Please refer to Table 1, which shows an example of a first preset form provided in an illustrative embodiment of this application.
[0060] Duty cycle of the first pulse signal 100% 75% 50% 25%
[0061] Table 1
[0062] As shown in the table above, when the user is in an alert state, the duty cycle of the first pulse signal is 100%, meaning that both the first and second light-emitting components maintain maximum brightness. As the degree of fatigue gradually increases, the duty cycle of the first pulse signal gradually decreases. When the user is severely fatigued, the duty cycle of the first pulse signal is only 25%, and the brightness of the first and second light-emitting components is low.
[0063] Optionally, the correspondence between the fatigue state recorded in the preset form and the duty cycle of different pulse signals may be determined by those skilled in the art based on conventional knowledge, or by experimental methods to determine the optimal brightness that different fatigue states can adapt to, thereby determining the corresponding pulse signal duty cycle.
[0064] Optionally, the correspondence between fatigue state and pulse signal duty cycle recorded in the preset form can be updated based on user settings or user history of adjustments. For example, if a user manually adjusts the light source brightness in the historical operation record, the processor detects the user's fatigue state during the manual adjustment and the adjusted light source brightness, thereby updating the preset form.
[0065] Step 302: Based on the current temperature, determine the duty cycle of the second pulse signal and the duty cycle of the third pulse signal.
[0066] The second pulse signal and the third pulse signal are used to adjust the brightness of the first light-emitting component and the second light-emitting component, respectively. Optionally, the second pulse signal is used to adjust the brightness of the first light-emitting component, and the third pulse signal is used to adjust the brightness of the second light-emitting component.
[0067] The processor adjusts the brightness of the first light-emitting component by adjusting the duty cycle of the second pulse signal, and adjusts the brightness of the second light-emitting component by adjusting the duty cycle of the third pulse signal.
[0068] Optionally, during the process of determining the duty cycle of the pulse signal based on the current temperature, the processor queries the second preset form to determine the target color temperature, the duty cycle of the second pulse signal, and the duty cycle of the third pulse signal corresponding to the current temperature.
[0069] The second preset form is used to characterize the correspondence between different storage room temperatures, different second pulse signal duty cycles, and different third pulse signal duty cycles.
[0070] Please refer to Table 2, which shows an example of a second preset form provided in an illustrative embodiment of this application.
[0071]
[0072]
[0073] Table 2
[0074] As shown in the table above, with a fixed duty cycle for the first pulse signal, the higher the current temperature, the lower the corresponding color temperature value, resulting in softer light; conversely, the lower the temperature, the higher the corresponding color temperature value, resulting in cooler white light. This allows users to intuitively perceive the temperature inside the storage room based on the real-time lighting environment.
[0075] Optionally, the second preset form may also include the second and third pulse signal duty cycles corresponding to other values of the first pulse signal duty cycle. Since the color temperature value and the pulse signal duty cycle are not strictly linearly related, in order to simultaneously meet the requirements of matching the light source brightness with the user's fatigue state and matching the light source color temperature with the current temperature, the second preset form includes the second and third pulse signal duty cycles required to achieve different color temperature values under different temperatures and different pulse signal duty cycles.
[0076] In one possible implementation, when the surface light source is turned on, the second pulse signal and the third pulse signal are first controlled to reach the determined duty cycle of the first pulse signal and the duty cycle of the second pulse signal, and then the duty cycle of the first pulse signal is gradually increased until the appropriate brightness is reached, so that the surface light source presents a gradually brightening effect when it is turned on.
[0077] In this embodiment, the brightness of the light source is adjusted based on the user's fatigue state, and the adjusted brightness is negatively correlated with the fatigue state. Therefore, when the user is severely fatigued, the brightness of the light source will be appropriately reduced to decrease eye strain. Adaptive brightness adjustment is achieved by adjusting the duty cycle of the first pulse signal, and adaptive color temperature adjustment is achieved by adjusting the duty cycles of the second and third pulse signals respectively. Furthermore, by simultaneously adjusting the brightness of the two light-emitting components using the duty cycle of the first pulse signal, and by adjusting the brightness of the two light-emitting components using the duty cycles of the second and third pulse signals determined based on the current temperature, a precise adjustment method can be achieved, allowing for flexible adjustments according to different actual needs. In addition, by using the first and second preset forms to determine the correspondence between the pulse signal duty cycle and parameters such as fatigue state and temperature, the control process becomes simpler and more direct, reducing complex calculations and real-time control logic, and facilitating subsequent maintenance and updates.
[0078] Before adjusting the light source brightness, the current temperature of the storage room needs to be detected, and the duty cycles of the first and second pulse signals need to be determined based on the temperature. Furthermore, the user's fatigue level needs to be detected before determining the appropriate light source brightness. The process of determining the user's fatigue level will be explained below through an illustrative embodiment.
[0079] Please refer to Figure 4The illustration shows a flowchart of a process for detecting user fatigue state according to an illustrative embodiment of this application, which includes the following steps:
[0080] Step 401: Determine the opening angle between the storage room door and the main body of the storage room.
[0081] In one possible implementation, the area of the door needs to be identified first, and a feature point detection algorithm is used to determine the opening angle between the storage room door and the main body of the storage room, thereby determining the usage status of the storage room and avoiding unnecessary light source adjustments. For example, SIFT (Scale-Invariant Feature Transform) algorithm, ORB (Oriented Fast and Rotated BRIEF) algorithm, etc., can be used.
[0082] Based on the feature points on the edge of the storage room door, determine whether the door is partially open or completely closed. The angle between the door and the main body of the storage room can then be determined using the following formula: -
[0083]
[0084] Among them, (x1, y1) and (x2, y2) are two feature points on the edge of the storage room door.
[0085] Step 402: If the included angle is greater than the angle threshold, it is determined that there is a lighting requirement.
[0086] If the opening angle is greater than a threshold angle, it can be determined that the storage compartment is open and the user has a need to use the storage compartment, i.e., a need for lighting. For example, this threshold angle can be set to 75%.
[0087] Step 403: Continuously acquire user facial images within a preset time window.
[0088] A camera module is installed inside the storage room or on the door of the storage room to capture facial images of the user. When it is determined that there is a need for lighting, the camera module is activated to continuously capture facial images of the user within a preset time window.
[0089] The preset time window can be set to 5 seconds, 10 seconds, etc. Assuming the camera component captures 10 frames per second, 50 frames can be captured within a 5-second time window to detect the user's fatigue state.
[0090] Optionally, a user's behavior in front of the locker may involve frequent head and even eye movements, such as looking around or retrieving items, which could interfere with the fatigue detection results. Therefore, user behavior detection can be performed when the user is detected in front of the locker. Furthermore, based on the user behavior detection results, if the user behavior is determined to be stable, facial images of the user within a preset time window are continuously acquired and used for fatigue detection.
[0091] Step 404: Determine the fatigue state based on the degree of eye closure in the continuously acquired user facial images.
[0092] In one possible implementation, since lockers are usually placed indoors, indoor lighting and natural light have a significant impact on the quality of the captured user facial images. Therefore, image processing techniques can be used to process the user facial images to improve image quality.
[0093] For example, in low-light environments, images may contain significant noise (such as Gaussian noise). Non-local means denoising can be used to effectively eliminate this noise and improve image quality. Conversely, in environments with uneven lighting, images may be too bright or too dark. Histogram equalization can enhance image contrast and make details clearer.
[0094] Optionally, once the user's facial state is obtained, the user's fatigue state can be determined in various ways, such as by the degree of eye closure, blinking frequency, pupil size, facial expression, eye opening, head posture, etc.
[0095] Some features are difficult to quantify. This application determines the fatigue state based on the calculation of the degree of eye closure. The process will be explained below.
[0096] Please refer to Figure 5 The illustration shows a flowchart of a schematic embodiment of this application for determining fatigue state based on the degree of eye closure, the process including the following steps:
[0097] Step 404A: Perform eye detection on the user's facial image to determine the eye region in the user's facial image.
[0098] Optionally, based on object detection algorithms and human eye features, the eye region can be detected from the user's facial image.
[0099] For example, models such as YOLO (You Only Look Once) and SSD (Single Shot MultiBox Detector) can be used to detect the eye region in a user's facial image.
[0100] Step 404B: Determine the degree of closure based on key point features of the eye region.
[0101] The key points in the eye area include at least the upper eyelid, lower eyelid, inner corner of the eye, and outer corner of the eye.
[0102] After identifying key points within the eye region, the EAR (Eye Aspect Ratio) metric is obtained based on the geometric relationships between these key points, such as vertical and horizontal distances.
[0103] Optionally, after obtaining the EAR (Eye Length Expansion), if the EAR is lower than a certain set EAR threshold, the eyes can be considered to be in a closed state. That is, the ratio of the vertical eye opening distance to the horizontal eye opening distance is small, indicating that the user's eye opening degree is low and can be considered closed. Therefore, based on the proportion of images with closed eyes in multiple user facial images captured within a preset time window, the user's fatigue state can be determined. If the proportion of images with closed eyes is large, it indicates that the user's eyes are closed more often and the degree of fatigue is higher.
[0104] Step 404C: Based on the timestamps corresponding to each user's facial images, determine the weighted weights corresponding to each user's facial images. The weighted weights are positively correlated with the timestamp order.
[0105] Step 404D: The degree of closure corresponding to different facial images is calculated by weighting the weights to obtain the closure ratio.
[0106] In one possible implementation, since a fixed EAR threshold may lead to misjudgment, in order to increase the accuracy of fatigue level judgment, the degree of closure corresponding to each facial image can be weighted in a weighted manner to obtain the weighted degree of eye closure within a preset time window.
[0107] In one possible implementation, the most recently captured image data can be given greater influence. That is, based on the timestamps corresponding to different user facial images, more weight can be given to user facial images captured more recently, thereby reducing the influence of earlier frames and making the fatigue state detection results more accurate.
[0108] Optionally, the processor calculates PERCLOS (Percentage of Eyelid Closure over the Pupil over Time) based on exponentially weighted moving average, and the calculation formula is as follows:
[0109]
[0110] Wherein, PERCLOS represents the weighted closure ratio (eye closure ratio), ω i represents the weight corresponding to the user's facial image of the i-th frame, EAR i represents the EAR corresponding to the user's facial image of the i-th frame, and n is the number of frames considered, that is, the total number of user facial images collected within a preset time window.
[0111] Assuming that three frames of images are collected within a preset time window, the closure degrees are c1, c2, c3 respectively, and the weighted weights corresponding to the three frames in sequence are w1, w2, w3, then the determined weighted closure ratio PERCLOS=(w1×c1+w2×c2+w 3×c3) / (w 1+w 2+w 3).
[0112] Step 404E, determining the fatigue state corresponding to the user based on the numerical relationship between the closure ratio and at least one ratio threshold.
[0113] Compare the calculated closure ratio with a preset ratio threshold to determine what degree of fatigue state the user is in. Optionally, one or more ratio thresholds are set, for example, thresholds T1 and T2 are set, where T1<T2. When the closure ratio P is less than T1, it is determined that the user is in an awake state; when P is between T1 and T2, it is determined that the user is in a mild fatigue state; when P is greater than T2, it is determined that the user is in a severe fatigue state. Optionally, the setting of thresholds can be adjusted and optimized according to a large amount of experimental data and actual application scenarios.
[0114] For example, the first ratio threshold is set to 15%, the second ratio threshold is set to 30%, and the third ratio threshold is set to 50%. A closure ratio below 15% indicates an alert state, a closure ratio between 15% and 30% indicates mild fatigue, a closure ratio between 30% and 50% indicates moderate fatigue, and a closure ratio above 50% indicates severe fatigue.
[0115] Please refer to Figure 6The illustration shows a flowchart of a user fatigue detection process according to an illustrative embodiment of this application. First, a user's facial image is acquired using a camera component. Then, the facial image undergoes post-processing, potentially including image denoising and contrast enhancement, to improve image quality. Next, face detection and feature point (key point) localization are performed, and the eye region is extracted based on the located feature points. Finally, a pre-trained fatigue state judgment model is used to classify the user's state and determine fatigue levels, thereby identifying the user's current fatigue state.
[0116] In this embodiment, fatigue state is detected by acquiring a user's facial image and identifying the user's eye region. During the determination of fatigue state, a weighted calculation is performed on the EAR (Eye Area Ratio) to obtain a more accurate fatigue state.
[0117] Please refer to Figure 7 The illustration shows a schematic diagram of a light source adjustment circuit provided in an illustrative embodiment of the present application, which includes at least one first light-emitting element 701, at least one second light-emitting element 702, a first pulse signal control circuit 703, a second pulse signal control circuit 704, and a third pulse signal control circuit 705.
[0118] The first light-emitting element 701 is connected to the output terminal of the first pulse signal control circuit 703 with its anode and to the input terminal of the second pulse signal control circuit 704 with its cathode.
[0119] The second light-emitting element 702 is connected with its anode to the output terminal of the first pulse signal control circuit 703 and its cathode to the input terminal of the third pulse signal control circuit 705.
[0120] The output terminals of the second pulse signal control circuit 704 and the third pulse signal control circuit 705 are grounded.
[0121] When the circuit is turned on, the first pulse signal control circuit 703 synchronously controls the brightness of the first light-emitting element 701 and the second light-emitting element 702, the second pulse signal control circuit 704 controls the brightness of the first light-emitting element 701, and the third pulse signal control circuit 705 controls the brightness of the second light-emitting element 702.
[0122] The first light-emitting element 701 and the second light-emitting element 702 are connected in parallel. The second pulse signal control circuit 704 is connected in series with the first light-emitting element 701, and the third pulse signal control circuit 705 is connected in series with the second light-emitting element 702. Thus, the second pulse signal control circuit 704 adjusts the brightness of the first light-emitting element 701 by controlling the duty cycle of the second pulse signal, and the third pulse signal control circuit 705 adjusts the brightness of the second light-emitting element 702 by controlling the duty cycle of the third pulse signal. Since the first light-emitting element 701 and the second light-emitting element 702 have different colors, the second pulse signal control circuit 704 and the third pulse signal control circuit 705 control the first and second light-emitting elements respectively, thereby adjusting the overall color temperature of the surface light source.
[0123] Optionally, the duty cycle of the first pulse signal, the duty cycle of the second pulse signal, and the duty cycle of the third pulse signal can be controlled based on timers, microcontrollers, or dedicated PWM chips.
[0124] Optionally, the pulse signal control circuit includes a field-effect transistor (FET), which controls the duty cycle of the pulse signal. When the gate voltage exceeds the threshold voltage, the FET is turned on; when the first threshold voltage is reached, the FET is turned off. By adjusting the proportion of time the gate voltage is at a high level in one cycle, the duty cycle of the pulse signal can be adjusted.
[0125] In this embodiment of the application, a light source adjustment circuit is provided. The first pulse signal control circuit 703 realizes the synchronous control of the brightness of the first light-emitting element 701 and the second light-emitting element 702. The second pulse signal control circuit 704 and the third pulse signal control circuit 705 respectively control the first light-emitting element 701 and the second light-emitting element 702 with different colors, so as to realize the control of the color temperature of the surface light source. It can simultaneously realize the brightness control and color temperature control of the light source.
[0126] In one possible implementation, the signal paths corresponding to adjusting the brightness and color temperature of the light source are connected to different serial ports of the processor, and are controlled by different pulse signals, thereby making the control more stable.
[0127] Please refer to Figure 8The illustration shows a schematic diagram of a control pulse signal provided in an illustrative embodiment. The temperature of the storage room is collected by a temperature sensor and sent to a processor via a first path. The processor then controls the duty cycle of a second pulse signal (PWM2) and a third pulse signal (PWM3) via the first path to control the color temperature of the surface light source. A user's facial image is collected by a camera component and sent to the processor via a second path. The processor then controls the duty cycle of a first pulse signal (PWM1) via the second path to control the brightness of the surface light source.
[0128] In another embodiment of this application, a locker is provided, the structure of which is described below.
[0129] Please refer to Figure 9 The diagram illustrates a structural design according to an illustrative embodiment of this application, including: at least one storage compartment 910, a temperature sensor 920, a camera assembly 930, a surface light source 940, and a processor (not shown). The surface light source comprises alternately distributed first and second light-emitting components (not shown).
[0130] The camera component 930 can be installed at the door to capture images of the user's face, and the camera component 930 can also be installed inside the storage room 910 to acquire images of the user's face after the user opens the locker door.
[0131] Temperature sensor 920 is installed inside the storage room to detect the temperature of the storage room.
[0132] The processor is used to determine the user's fatigue state and, based on the fatigue state and the current temperature, adjusts the surface light source 940 of the storage compartment 910 to achieve intelligent storage compartment light source adjustment and improve light source comfort.
[0133] Optionally, the locker can be a smart refrigerator or other smart devices for storing items. It should be noted that the locker provided in this solution must inform the user via text, images, and voice before acquiring the user's facial image, and requires the user's authorization to implement the solution provided in this embodiment. Furthermore, the user's facial image captured in the solution provided in this application embodiment is only used for detecting the user's fatigue state and is not used for other purposes.
[0134] This application also provides a non-transitory computer-readable storage medium storing computer instructions. This storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the storage room light source adjustment method as described in any of the above embodiments. In implementing the storage medium of this invention, non-volatile storage devices or removable storage media (such as flash memory, memory cards, optical discs, or hard disks) can be used to store the computer program instructions. When the computer program is executed by the processor, the above-described storage room light source adjustment method will be executed sequentially.
[0135] It should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
[0136] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for adjusting the light source in a storage room, characterized in that, The method includes: If a lighting requirement is detected, the current temperature of the storage room is obtained, and the user's fatigue level is detected. Based on the fatigue state and the current temperature, the light source of the storage room is adjusted. The brightness of the adjusted light source is negatively correlated with the fatigue state, and the color temperature of the adjusted light source is positively correlated with the current temperature.
2. The method according to claim 1, characterized in that, The storage room is equipped with a surface light source, which includes a first light-emitting component and a second light-emitting component arranged in an alternating manner. Adjusting the light source of the storage compartment based on the fatigue state and the current temperature includes: The duty cycle of the first pulse signal is determined based on the fatigue state, and the first pulse signal is used to synchronously adjust the brightness of the first light-emitting component and the second light-emitting component; Based on the current temperature, the duty cycle of the second pulse signal and the duty cycle of the third pulse signal are determined. The second pulse signal and the third pulse signal are used to adjust the brightness of the first light-emitting component and the second light-emitting component, respectively.
3. The method according to claim 2, characterized in that, Determining the duty cycle of the first pulse signal based on the fatigue state includes: The first preset form is used to query the first pulse signal duty cycle corresponding to the fatigue state to determine the first pulse signal duty cycle. The first preset form is used to characterize the correspondence between different fatigue states and different pulse signal duty cycles. The step of determining the duty cycle of the second pulse signal and the duty cycle of the third pulse signal based on the current temperature includes: The second preset form is used to query the target color temperature corresponding to the current temperature, the duty cycle of the second pulse signal, and the duty cycle of the third pulse signal. The second preset form is used to characterize the correspondence between different storage room temperatures, different duty cycles of the second pulse signal, and different duty cycles of the third pulse signal.
4. The method according to claim 1, characterized in that, The detection of the user's fatigue state includes: Continuously acquire user facial images within a preset time window; The fatigue state is determined based on the degree of eye closure in the continuously acquired facial images of the user.
5. The method according to claim 4, characterized in that, Determining the fatigue state based on the degree of eye closure in continuously acquired user facial images includes: Based on the timestamps corresponding to each user's facial images, a weighted weight is determined for each user's facial images, and the weighted weight is positively correlated with the order of the timestamps. Based on the weighted weights, the degree of closure corresponding to different facial images is weighted and calculated to obtain the closure ratio; Based on the numerical relationship between the closing ratio and at least one ratio threshold, the user's fatigue state is determined.
6. The method according to claim 5, characterized in that, The method further includes: Perform eye detection on the user's facial image to determine the eye region in the user's facial image; The degree of closure is determined based on the key point features of the eye region, wherein the key points of the eye region include at least the upper eyelid, lower eyelid, inner corner of the eye, and outer corner of the eye.
7. The method according to claim 1, characterized in that, Before detecting the user's fatigue state, the method further includes: Determine the opening angle between the storage room door and the main body of the storage room; If the opening angle is greater than the angle threshold, it is determined that there is a lighting requirement.
8. A light source adjustment circuit, characterized in that, The light source adjustment circuit includes at least one first light-emitting element, at least one second light-emitting element, a first pulse signal control circuit, a second pulse signal control circuit, and a third pulse signal control circuit; The first light-emitting element is connected with its anode to the output terminal of the first pulse signal control circuit and with its cathode to the input terminal of the second pulse signal control circuit. The second light-emitting element is connected with its anode to the output terminal of the first pulse signal control circuit and with its cathode to the input terminal of the third pulse signal control circuit. The output terminals of the second pulse signal control circuit and the third pulse signal control circuit are grounded; When the circuit is turned on, the first pulse signal control circuit synchronously controls the brightness of the first light-emitting element and the second light-emitting element, the second pulse signal controls the brightness of the first light-emitting element, and the third pulse signal is used to control the brightness of the second light-emitting element.
9. The circuit according to claim 8, characterized in that, The pulse signal control circuit includes a field-effect transistor.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the storage room light source adjustment method as described in any one of claims 1 to 7.
11. A storage cabinet, characterized in that, It includes at least one storage compartment, a temperature sensor, a camera assembly, and a processor, the processor being configured to execute a computer program to implement the storage compartment light source adjustment method for a locker as described in any one of claims 1 to 7.