Illumination control methods, devices, computer equipment and storage media
By collecting the photosensitivity of security cameras and calculating the actual illuminance using a mapping table, a lighting system control signal is generated, solving the problem of mismatch between traditional lighting systems and scene requirements, and enabling timely adjustment of the lighting system and energy saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-06
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional lighting systems adjust the lighting according to preset times, which leads to a mismatch with the actual lighting needs of the scene, poor timeliness, and high energy consumption.
By collecting the target light sensitivity of the security camera, the actual illuminance of the target scene is calculated using a pre-stored light sensitivity to illuminance mapping table, and a lighting system control signal is generated based on the actual illuminance to adjust the on/off state of the lighting system in real time.
It enables timely adjustment of the lighting system's status based on the actual lighting needs of the target scene, saving energy and improving the timeliness and energy efficiency of the lighting system.
Smart Images

Figure CN114399618B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lighting technology, and in particular to an illuminance control method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Lighting systems are essential equipment in modern life and production, widely used in various building interiors. Traditional lighting systems adjust the lighting at preset times. Specifically, users can pre-set the start time of the lighting system. In this way, the lighting system will activate at the preset start time to provide illumination to the indoor environment. This timed adjustment leads to a mismatch between the lighting system and the actual lighting needs of the scene, resulting in poor timeliness. Summary of the Invention
[0003] Therefore, it is necessary to provide an energy-saving illumination control method, device, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.
[0004] Firstly, this application provides an illuminance control method. The method includes:
[0005] Collect the target light sensitivity of security cameras in the target scene;
[0006] Based on a pre-stored mapping table between photosensitivity and illuminance, the target illuminance corresponding to the target photosensitivity is determined, and the actual illuminance of the target scene is determined based on the target illuminance.
[0007] Determine whether the preset lighting system control conditions are met based on the actual illuminance;
[0008] If the actual illuminance meets the preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on the lighting system control signal.
[0009] In one embodiment, the acquisition of the target light sensitivity of the security camera in the target scene includes:
[0010] According to a preset time interval, the light sensitivity of multiple targets in the target scene of the security camera is periodically collected;
[0011] The step of determining the target illuminance corresponding to the target sensitivity based on a pre-stored mapping table of photosensitivity and illuminance, and determining the actual illuminance of the target scene based on the target illuminance, includes:
[0012] Based on the pre-stored mapping table of photosensitivity and illuminance, determine the target illuminance corresponding to each target photosensitivity;
[0013] The average value of the first number of target illuminance values is calculated to determine the actual illuminance of the target scene.
[0014] In one embodiment, generating a lighting system control signal when the actual illuminance meets preset lighting system control conditions includes:
[0015] If the actual illuminance corresponding to the collected photosensitivity is continuously less than the preset lighting illuminance threshold by a number of consecutive times, and is greater than or equal to the preset number threshold, and the lighting system is in the off state, then it is determined that the actual illuminance meets the preset lighting system start-up conditions, and a lighting system start-up signal is generated.
[0016] In one embodiment, generating a lighting system control signal when the actual illuminance meets preset lighting system control conditions includes:
[0017] If the actual illuminance corresponding to the collected photosensitivity is greater than or equal to the preset illuminance threshold for turning off the lights by a number of consecutive times, and the lighting system is in the on state, then it is determined that the actual illuminance meets the preset lighting system off conditions, and a lighting system off signal is generated.
[0018] In one embodiment, the pre-stored mapping table of photosensitivity and illuminance includes multiple discrete points, each discrete point including photosensitivity and the corresponding illuminance, and the discrete points in the mapping table are arranged in ascending order of photosensitivity.
[0019] The step of determining the target illuminance corresponding to the target photosensitivity based on a pre-set mapping relationship between photosensitivity and illuminance includes:
[0020] Among all discrete points where the photosensitivity is less than the target photosensitivity, determine the i-th photosensitivity corresponding to the discrete point that is closest to the target photosensitivity;
[0021] Calculate the sensitivity comparison value based on the i-th sensitivity and the (i+1)-th sensitivity;
[0022] If the target photosensitivity is greater than the i-th photosensitivity and the target photosensitivity is less than the photosensitivity comparison value, then the first illuminance weight is calculated based on the target photosensitivity and the i-th photosensitivity.
[0023] The target illuminance is calculated based on the i-th illuminance corresponding to the i-th photosensitivity and the first illuminance weight.
[0024] In one embodiment, determining the target illuminance corresponding to the target photosensitivity based on a pre-set mapping relationship between photosensitivity and illuminance further includes:
[0025] If the target sensitivity is greater than the sensitivity comparison value and the target sensitivity is less than the (i+1)th sensitivity, then the second illuminance weight is calculated based on the target sensitivity and the (i+1)th sensitivity.
[0026] The target illuminance is calculated based on the (i+1)th illuminance corresponding to the (i+1)th photosensitivity and the second illuminance weight.
[0027] In one embodiment, calculating the photosensitivity comparison value based on the i-th photosensitivity and the (i+1)-th photosensitivity includes:
[0028] The target value is calculated based on the preset sensitivity weight and the difference between the (i+1)th sensitivity and the ith sensitivity.
[0029] The target value and the i-th photosensitivity are summed to obtain a photosensitivity comparison value.
[0030] Secondly, this application also provides an illuminance control device. The device includes:
[0031] The acquisition module is used to acquire the target light sensitivity of the security camera in the target scene;
[0032] The first determining module is used to determine the target illuminance corresponding to the target photosensitivity according to a pre-stored mapping table of photosensitivity and illuminance, and to determine the actual illuminance of the target scene based on the target illuminance;
[0033] The second determining module is used to determine whether the preset lighting system control conditions are met based on the actual illuminance.
[0034] The control module is used to generate a lighting system control signal when it is determined that the actual illuminance meets the preset lighting system control conditions, and to control the lighting system based on the lighting system control signal.
[0035] In one embodiment, the second determining module is specifically used for:
[0036] If the actual illuminance is less than the preset illuminance threshold for turning on the lights, and the lighting system is in the off state, then the preset lighting system start-up condition is determined to be met; if the actual illuminance is greater than the preset illuminance threshold for turning off the lights, and the lighting system is in the on state, then the preset lighting system turn-off condition is determined to be met, and the preset illuminance threshold for turning on the lights is less than the preset illuminance threshold for turning off the lights.
[0037] In one embodiment, the acquisition module is specifically used for:
[0038] According to a preset time interval, the light sensitivity of multiple targets in the target scene of the security camera is periodically collected;
[0039] The first determining module is specifically used to: determine each target illuminance corresponding to each target sensitivity according to a pre-stored mapping table of photosensitivity and illuminance; and perform averaging on a first number of target illuminances to calculate the actual illuminance of the target scene.
[0040] The control module is specifically used for:
[0041] If the actual illuminance corresponding to the collected photosensitivity is continuously less than the preset lighting illuminance threshold by a number of consecutive times, and is greater than or equal to the preset number threshold, and the lighting system is in the off state, then it is determined that the actual illuminance meets the preset lighting system start-up conditions, and a lighting system start-up signal is generated.
[0042] The control module is specifically used for:
[0043] If the actual illuminance corresponding to the collected photosensitivity is greater than or equal to the preset illuminance threshold for turning off the lights by a number of consecutive times, and the lighting system is in the on state, then it is determined that the actual illuminance meets the preset lighting system off conditions, and a lighting system off signal is generated.
[0044] In one embodiment, the pre-stored mapping table of photosensitivity and illuminance includes multiple discrete points, each discrete point including photosensitivity and the corresponding illuminance, and the discrete points in the mapping table are arranged in ascending order of photosensitivity.
[0045] The first determining module is specifically used for:
[0046] Among all discrete points where the photosensitivity is less than the target photosensitivity, determine the i-th photosensitivity corresponding to the discrete point that is closest to the target photosensitivity;
[0047] Calculate the sensitivity comparison value based on the i-th sensitivity and the (i+1)-th sensitivity;
[0048] If the target photosensitivity is greater than the i-th photosensitivity and the target photosensitivity is less than the photosensitivity comparison value, then the first illuminance weight is calculated based on the target photosensitivity and the i-th photosensitivity.
[0049] The target illuminance is calculated based on the i-th illuminance corresponding to the i-th photosensitivity and the first illuminance weight.
[0050] In one embodiment, the first determining module is further specifically used for:
[0051] If the target sensitivity is greater than the sensitivity comparison value and the target sensitivity is less than the (i+1)th sensitivity, then the second illuminance weight is calculated based on the target sensitivity and the (i+1)th sensitivity.
[0052] The target illuminance is calculated based on the (i+1)th illuminance corresponding to the (i+1)th photosensitivity and the second illuminance weight.
[0053] In one embodiment, the first determining module is further configured to: calculate a target value based on a preset photosensitivity weight and the difference between the (i+1)th photosensitivity and the ith photosensitivity; and sum the target value and the ith photosensitivity to obtain a photosensitivity comparison value.
[0054] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0055] Collect the target light sensitivity of security cameras in the target scene;
[0056] Based on a pre-stored mapping table between photosensitivity and illuminance, the target illuminance corresponding to the target photosensitivity is determined, and the actual illuminance of the target scene is determined based on the target illuminance.
[0057] Determine whether the preset lighting system control conditions are met based on the actual illuminance;
[0058] If the actual illuminance meets the preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on the lighting system control signal to provide lighting for the target scene.
[0059] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0060] Collect the target light sensitivity of security cameras in the target scene;
[0061] Based on a pre-stored mapping table between photosensitivity and illuminance, the target illuminance corresponding to the target photosensitivity is determined, and the actual illuminance of the target scene is determined based on the target illuminance.
[0062] Determine whether the preset lighting system control conditions are met based on the actual illuminance;
[0063] If the actual illuminance meets the preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on the lighting system control signal to provide lighting for the target scene.
[0064] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0065] Collect the target light sensitivity of security cameras in the target scene;
[0066] Based on a pre-stored mapping table between photosensitivity and illuminance, the target illuminance corresponding to the target photosensitivity is determined, and the actual illuminance of the target scene is determined based on the target illuminance.
[0067] Determine whether the preset lighting system control conditions are met based on the actual illuminance;
[0068] If the actual illuminance meets the preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on the lighting system control signal to provide lighting for the target scene.
[0069] The aforementioned illuminance control method, apparatus, computer equipment, storage medium, and computer program product determine the target illuminance corresponding to the target photosensitivity based on a pre-stored mapping table of photosensitivity and illuminance, and determine the actual illuminance of the target scene based on the target illuminance. When the actual illuminance meets preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on the lighting system control signal to provide illumination to the target scene or to stop providing illumination to the target scene. The method provided in this embodiment can calculate the actual illuminance in the target scene in real time based on photosensitivity, adjust the lighting system in the target scene according to the actual illuminance, meet the actual lighting needs of the target scene, and can adjust the state of the lighting system in a timely manner, saving energy. Attached Figure Description
[0070] Figure 1 This is a flowchart illustrating an illuminance control method in one embodiment;
[0071] Figure 2 This is a flowchart illustrating the steps for determining whether the lighting system startup conditions are met in one embodiment.
[0072] Figure 3 This is a flowchart illustrating the specific comparison steps in one embodiment;
[0073] Figure 4 This is a schematic diagram of the devices involved in the generation of the mapping table in one embodiment;
[0074] Figure 5 This is a flowchart illustrating the steps for calculating the target illuminance in one embodiment;
[0075] Figure 6This is a flowchart illustrating the steps for calculating the target illuminance in another embodiment;
[0076] Figure 7 This is a flowchart illustrating the steps for calculating the photosensitivity comparison value in one embodiment;
[0077] Figure 8 This is a structural block diagram of an illumination control device in one embodiment;
[0078] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0080] In one embodiment, such as Figure 1 As shown, an illumination control method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The aforementioned terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be a standalone server or a server cluster consisting of multiple servers.
[0081] In this embodiment, the illuminance control method includes the following steps:
[0082] Step 102: Collect the target light sensitivity of the security camera in the target scene.
[0083] Specifically, the target scene can be a location requiring illumination from a lighting system, such as an indoor building. Security cameras are cameras equipped with sensors for imaging and can be installed in the target scene; multiple security cameras can be installed within a single target scene. Sensitivity, or ISO (photosensibility), represents the film's sensitivity to light and can be determined by sensitivity measurement and several other measurements. A preset ISO acquisition program is installed on the terminal, allowing it to acquire the ISO values from each security camera in real time. The terminal can then collect the target sensitivity data from the security cameras installed within the target scene.
[0084] Optionally, after the security camera is installed in the target scene, it can be adjusted. For example, the camera's focal length, aperture, shutter speed, and average brightness can be adjusted to setting A and fixed at setting A. Then, the camera can be manually focused to ensure it is in sharp focus. Setting A is the setting for the security camera when the terminal obtains a pre-stored mapping table of sensitivity and illuminance.
[0085] Optionally, the security system corresponding to the target scene may include a security camera network, which contains multiple security cameras. The terminal can connect to this security camera network and, through an ISO acquisition program, obtain the ISO value of each security camera in real time, i.e., the target ISO sensitivity. j .
[0086] Step 104: Determine the target illuminance corresponding to the target sensitivity according to the pre-stored mapping table of sensitivity and illuminance, and determine the actual illuminance of the target scene based on the target illuminance.
[0087] Specifically, the pre-stored mapping table between sensitivity and illuminance can be a table showing the correspondence between multiple illuminances obtained by the terminal after testing and collecting data for the target scene, and the corresponding sensitivity for each illuminance. Based on this pre-stored mapping table, the terminal can query the table to calculate the target illuminance corresponding to the target sensitivity, and use the target illuminance as the real-time actual illuminance of the target scene.
[0088] Step 106: Determine whether the preset lighting system control conditions are met based on the actual illuminance.
[0089] Specifically, the terminal can determine whether the actual illuminance determined in step 104 meets the lighting system control conditions preset by the user / system in the terminal (such as the actual illuminance being less than the preset on-light illuminance threshold, or two consecutively collected actual illuminance values being less than the preset on-light illuminance threshold, the actual illuminance being greater than the preset off-light illuminance threshold, or two consecutively collected actual illuminance values being greater than the preset off-light illuminance threshold, etc.). When the terminal determines that the actual illuminance meets the preset lighting system control conditions, the terminal continues to execute step S108; otherwise, the terminal will consider that the currently collected actual illuminance does not meet the preset lighting system control conditions, and can end the process, that is, restart the collection of the photosensitivity of each security camera in the security camera network, and re-execute the steps described in the above embodiment.
[0090] Step 108: If the actual illuminance meets the preset lighting system control conditions, generate a lighting system control signal, and control the lighting system based on the lighting system control signal to provide lighting for the target scene or stop providing lighting for the target scene.
[0091] Specifically, if the terminal determines that the calculated actual illuminance meets the preset lighting system control conditions, the terminal can determine the location of the security camera corresponding to the target's photosensitivity and generate a lighting system control signal based on that location. In this way, the terminal can control the lighting system based on the lighting system control signal, providing illumination to the target scene or stopping the illumination of the target scene.
[0092] In the above-described illuminance control method, a target illuminance corresponding to a target sensitivity is determined based on a pre-stored mapping table of photosensitivity and illuminance. The actual illuminance of the target scene is then determined based on the target illuminance. If the actual illuminance meets preset lighting system control conditions, a lighting system control signal is generated, and the lighting system is controlled based on this signal to provide illumination to the target scene. The method provided in this embodiment can calculate the actual illuminance within the target scene in real time based on photosensitivity, and adjust the lighting system in the target scene according to the actual illuminance, thus meeting the actual lighting needs of the target scene. This allows for timely adjustment of the lighting system's state and saves energy.
[0093] In one embodiment, such as Figure 2 As shown, the specific processing steps of step 106, "determining whether the preset lighting system start-up conditions are met based on the actual illuminance," include:
[0094] Step 202: If the actual illuminance is less than the preset illuminance threshold and the lighting system is in the off state, then the preset lighting system start-up conditions are met.
[0095] Specifically, the terminal acquires the target sensitivity of the security camera at the current moment through an ISO acquisition program, calculates the target illuminance corresponding to the current target sensitivity using a pre-stored mapping table of sensitivity and illuminance, and determines the actual illuminance of the target scene at the current moment based on this target illuminance. If the terminal determines that the actual illuminance is less than a preset lighting illuminance threshold, and the terminal determines that the lighting system is currently off, then the terminal can determine that the actual illuminance meets the preset lighting system activation conditions. Thus, the terminal can generate a lighting system activation signal. The preset lighting illuminance threshold can be a value determined by the terminal based on the target scene's environmental illuminance requirements, which triggers the lighting system to restart and provide illumination to the target scene.
[0096] Step 204: If the actual illuminance is greater than the preset illuminance threshold for turning off the lights, and the lighting system is in the on state, then it is determined that the preset lighting system off condition is met, and the preset illuminance threshold for turning on the lights is less than the preset illuminance threshold for turning off the lights.
[0097] Specifically, the terminal acquires the target sensitivity of the security camera at the current moment through an ISO acquisition program, calculates the target illuminance corresponding to the target sensitivity at the current moment using a pre-stored sensitivity-illuminance mapping table, and determines the actual illuminance of the target scene at the current moment based on the target illuminance. Thus, if the terminal determines that the actual illuminance is greater than a preset lighting-off illuminance threshold, and the terminal determines that the lighting system is on at the current moment, it can determine that the actual illuminance does not meet the preset lighting system activation conditions. The terminal can then generate a lighting system shutdown signal. This lighting system shutdown signal can be an indication signal to turn off the power to the lighting system and stop providing illumination. The preset lighting-off illuminance threshold can be an illuminance value determined by the terminal based on the target scene's environmental illuminance requirements, which causes the lighting system to shut down and stop providing illumination to the target scene.
[0098] Optionally, if the terminal determines that the actual illuminance does not meet the preset lighting system shutdown conditions and does not meet the preset lighting system startup conditions, the terminal will not perform any processing on the lighting system in the target scene.
[0099] In this embodiment, by acquiring the actual illuminance of the target scene in real time and determining whether the preset lighting system start-up conditions are met based on the actual illuminance, the lighting system in the target scene can be adjusted to start and stop in a timely manner according to the actual illuminance of the target scene. Lighting can be provided in a timely manner when needed, and the lighting system can be turned off in a timely manner when the lighting is sufficient, thus saving energy and electricity.
[0100] In one embodiment, the specific processing procedure of step 102, "collecting the target sensitivity of the security camera in the target scene", includes: periodically collecting the sensitivity of multiple targets of the security camera in the target scene at preset time intervals.
[0101] Specifically, the preset time interval can be a data acquisition cycle determined by the user based on the lighting and energy consumption requirements of the target scene, for example, it can be any duration t between three and five seconds. Every t, the terminal acquires the ISO values (target sensitivity) of each security camera in the camera network through the ISO acquisition program. j .
[0102] Optionally, such as Figure 3 As shown, the specific execution process of step 104, "determining the target illuminance corresponding to the target sensitivity according to the pre-stored mapping table of photosensitivity and illuminance, and determining the actual illuminance of the target scene based on the target illuminance," includes:
[0103] Step 302: Determine the target illuminance corresponding to each target sensitivity according to the pre-stored mapping table of photosensitivity and illuminance.
[0104] Specifically, the terminal can determine the target illuminance corresponding to each target's sensitivity based on the periodically collected target sensitivity and a pre-stored mapping table of sensitivity and illuminance. For example, the terminal can collect the target sensitivity of the security camera every 3 seconds and determine the target illuminance corresponding to that target sensitivity based on the pre-stored mapping table of sensitivity and illuminance.
[0105] Step 304: Average the first number of target illuminance values to calculate the actual illuminance of the target scene.
[0106] Specifically, the first number can be a value determined based on the actual application scenario, such as five, six, etc. The terminal continuously collects the target photosensitivity every 3 seconds, obtaining the first number of target photosensitivity values, and then determines the first number of target illuminance values. In this way, the terminal can perform average processing on the first number of target illuminance values, and use the average value obtained after the average calculation as the actual illuminance L of the target scene at the current moment. m In this way, the terminal can determine the actual illuminance L corresponding to each of the first number of target photosensitivity values. m L m+1 etc.
[0107] Accordingly, the specific processing steps of step 106, "generating a lighting system start signal when the actual illuminance meets the preset lighting system start conditions," include:
[0108] If the actual illuminance corresponding to the collected photosensitivity is continuously less than the preset lighting illuminance threshold by a number of consecutive times, and is greater than or equal to the preset number threshold, and the lighting system is in the off state, then it is determined that the actual illuminance meets the preset lighting system start-up conditions, and a lighting system start-up signal is generated.
[0109] Specifically, the terminal initializes the first quantity (i.e., changes it to 0). This first quantity is the number of times the terminal determines that the actual illuminance continuously meets the preset lighting system activation conditions. Every preset time interval, the terminal acquires multiple photosensitivity values of the security camera through the ISO acquisition program, and determines the target illuminance corresponding to each of the multiple photosensitivity values through a pre-stored mapping table of photosensitivity and illuminance. The terminal then averages the first number of target illuminance values to obtain the actual illuminance. If the terminal determines that the actual illuminance is less than the preset lighting illuminance threshold, the terminal will change the first quantity from the initial (0) to 1, i.e., increment it by 1; if the terminal determines that the actual illuminance is greater than or equal to the preset lighting illuminance threshold, the terminal will maintain the initial state of the first quantity, i.e., it will remain at 0.
[0110] In this way, when the first quantity is not initialized (e.g., it has been adjusted to 1), the terminal continues to collect multiple photosensitivity values of the security camera at preset time intervals. Using a pre-stored mapping table of photosensitivity and illuminance, it determines the target illuminance corresponding to each of these multiple photosensitivity values and averages the first number of target illuminance values to obtain the actual illuminance. If the actual illuminance obtained at this time still meets the preset lighting system activation condition (i.e., the actual illuminance is still less than the preset lighting illuminance threshold), the terminal can increment the first quantity by 1 (e.g., from 1 to 2). In this way, the terminal can determine whether the first quantity is greater than or equal to the preset quantity threshold. If the first quantity is greater than or equal to the preset quantity threshold, and the lighting system is in a turned-off state, the terminal can generate a lighting system activation signal. For example, if the preset quantity threshold is 2, then the relationship between the first quantity (2) and the preset quantity threshold (2) is determined. In this case, the first quantity is equal to the preset quantity threshold, and if the lighting system is in a turned-off state, a lighting system activation signal can be generated.
[0111] The illuminance control method further includes: if the actual illuminance does not meet the preset lighting system start-up conditions, it can be determined whether the actual illuminance meets the preset lighting system shut-off conditions.
[0112] If the actual illuminance meets the preset lighting system shutdown conditions, a lighting system shutdown signal is generated;
[0113] If the actual illuminance does not meet the preset lighting system shutdown conditions, no action will be taken on the lighting system.
[0114] In one possible implementation, the specific processing of step 106, "generating a lighting system start signal when the actual illuminance meets the preset lighting system start conditions," further includes:
[0115] If the actual illuminance corresponding to the collected photosensitivity is greater than or equal to the preset illuminance threshold for turning off the lights by a number of consecutive times, and the lighting system is in the on state, then it is determined that the actual illuminance meets the preset lighting system off conditions, and a lighting system off signal is generated.
[0116] Specifically, if the actual illuminance corresponding to the collected photosensitivity is greater than or equal to the preset illuminance threshold for turning off the lights by a number of consecutive times, and the lighting system is in the on state, then it is determined that the preset lighting system shutdown condition is met, and a lighting system shutdown signal is generated.
[0117] Specifically, the terminal initializes the second quantity (i.e., changes it to 0). This second quantity is the number of times the terminal determines that the actual illuminance continuously meets the preset lighting system shutdown condition. At preset time intervals, the terminal acquires multiple photosensitivity values of the security camera through an ISO acquisition program. Using a pre-stored mapping table of photosensitivity and illuminance, it determines the target illuminance corresponding to each of these multiple photosensitivity values and averages the first number of target illuminance values to obtain the actual illuminance. If the terminal determines that the actual illuminance is greater than the preset lighting shutdown illuminance threshold, it changes the second quantity from its initial value (0) to 1, i.e., increments it by 1. If the terminal determines that the actual illuminance is less than or equal to the preset lighting shutdown illuminance threshold, it maintains the initial state of the first quantity, i.e., it remains 0.
[0118] In this way, when the second quantity is not initialized (e.g., it has been adjusted to 1), the terminal continues to collect multiple photosensitivity values from the security camera at preset time intervals. Using a pre-stored mapping table of photosensitivity and illuminance, it determines the target illuminance corresponding to each of these multiple photosensitivity values and averages the first number of target illuminance values to obtain the actual illuminance. If the actual illuminance obtained at this time is less than or equal to a preset light-off illuminance threshold, the terminal can re-initialize the second quantity (e.g., change it from 1 to 0). In this way, the terminal can maintain the current state of the lighting system without performing any processing on the lighting system.
[0119] Optionally, if the second quantity is not initialized (e.g., it has been adjusted to 1), the terminal continues to collect multiple photosensitivity values from the security camera at preset time intervals. Using a pre-stored mapping table of photosensitivity and illuminance, it determines the target illuminance corresponding to each of these multiple photosensitivity values and averages the first number of target illuminance values to obtain the actual illuminance. If the actual illuminance obtained at this time meets the preset lighting system shutdown condition (i.e., the calculated actual illuminance is greater than the preset lighting shutdown illuminance threshold), the terminal can re-initialize the second quantity (e.g., change it from 1 to 2). In this way, the terminal can determine whether the second quantity is greater than or equal to the preset quantity threshold. If the second quantity is greater than or equal to the preset quantity threshold, the terminal can generate a lighting system shutdown signal.
[0120] For example, the first number could be 5, the preset quantity threshold could be 2, the preset light-on threshold could be M, and the preset light-off threshold could be N. Thus, if the target light sensitivity of the security camera continuously collected by the terminal every t can be ISO... j ISO j+1 ISO j+9 Therefore, the target ISO sensitivity is calculated. j To ISO j+4 Corresponding actual illuminance Lm , target sensitivity ISO j+5 to ISO j+9 corresponding actual illuminance L m+1 . Thus, if L m < M and L m+1 < M, an illumination system start signal can be generated to provide illumination for the location where the security camera is located. When L m > N and L m+1 > N, an illumination system off signal can be generated to indicate that the illumination system does not provide illumination to save power.
[0121] In this embodiment, by obtaining the actual illuminance of the target scene in real time and accurately judging whether the preset illumination system start condition is met according to the actual illuminance, the effect of timely adjusting the start and stop of the illumination system in the target scene according to the actual illuminance of the target scene can be achieved. Illumination can be provided in time when needed, and the illumination system can be turned off in time when the illumination is sufficient, saving energy and power.
[0122] In one embodiment, the pre-stored mapping table of sensitivity and illuminance includes multiple discrete points. The discrete points include sensitivity and the illuminance corresponding to the sensitivity. The discrete points in the mapping table are arranged in ascending order of sensitivity.
[0123] In a possible implementation, this embodiment further includes the generation process of the pre-stored mapping table of sensitivity and illuminance. The devices used in this generation process include: an optical darkroom, a panel light source A with adjustable illuminance, a panel light source B, an illuminance test meter, a camera (security camera), a gray backplane, and a terminal installed with an ISO acquisition program. Specifically, the schematic diagrams of each device can be Figure 4 as shown. Adjust the positions of the panel light source A, the panel light source B, and the camera so that the gray backplane fills the field of view of the camera, and place the illuminance test meter at the center of the field of view. This generation process includes:
[0124] Specifically, the user can continuously adjust the output of the panel light source so that the illuminance test meter shows 0, L1, L2, L3,..., L i ,..., L max (L max is set as the maximum possible illuminance of the target scene, and the unit can be lux). Thus, the user records, through the terminal installed with the ISO acquisition program, the ISO values output by the camera when the illuminance test meter shows different illuminances, including: ISO corresponding to 0 u0 , ISO corresponding to L1 u1 , ISO corresponding to L2 u2 , ISO corresponding to L3 u3 ,..., Li Corresponding ISO ui ..., L max Corresponding ISO umax .
[0125] Specifically, users can continuously adjust the output of panel light source A and panel light source B, so that the illuminance tester displays L respectively. max (L max Set as the maximum possible illuminance for the target scene, the unit can be ldx, ..., L. i ..., L3, L2, L1, 0. Thus, the user, through a terminal equipped with an ISO acquisition program, records the ISO values output by the camera when the illuminance meter displays different illuminance levels, including: L... max Corresponding ISO dmax ..., L i Corresponding ISO di ISO corresponding to L3 d3 ISO corresponding to L2 d2 ISO corresponding to L1 d1 ISO corresponding to 0 d0 .
[0126] Thus, the terminal can calculate ISO using the following formula. i and illuminance L i The correspondence, i.e., the mapping table between photosensitivity and illuminance:
[0127] ISO i =(ISO) ui +ISO di )) / 2.
[0128] Therefore, the pre-stored mapping table of sensitivity and illuminance includes multiple discrete points, where the i-th discrete point contains ISO values. i and illuminance L i The pre-stored mapping table of photosensitivity and illuminance contains multiple discrete points arranged in ascending order of photosensitivity.
[0129] Accordingly, such as Figure 5 As shown, the specific processing steps of the step "determine the target illuminance corresponding to the target sensitivity based on the pre-set mapping relationship between sensitivity and illuminance" include:
[0130] Step 402: Among the discrete points where the sensitivity is less than the target sensitivity, determine the i-th sensitivity corresponding to the discrete point that is closest to the target sensitivity.
[0131] Specifically, the terminal acquires the target sensitivity (ISO value) of each security camera through the ISO acquisition program; this sensitivity can be in the form of ISO values.j The terminal can be set to ISO i ≤ISO j ≤ISO i+1 That is, the ISO sensitivity included in the mapping table is less than the target ISO sensitivity. j Among all discrete points, determine the ISO value corresponding to the i-th discrete point that is closest to the target ISO value. i .
[0132] Step 404: Calculate the sensitivity comparison value based on the i-th sensitivity and the (i+1)-th sensitivity.
[0133] Specifically, the sensitivity comparison value C can be calculated using the following formula:
[0134] C = ISO i +1 / 2*(ISO i+1 -ISO i ).
[0135] Step 406: If the target sensitivity is greater than the i-th sensitivity and the target sensitivity is less than the sensitivity comparison value, then calculate the first illuminance weight based on the target sensitivity and the i-th sensitivity.
[0136] Specifically, if the terminal determines the ISO i ≤ISO j ≤ISOi+1 / 2*(ISO i+1 -ISO i Then, the terminal can calculate the first illuminance weight Q1 based on the target sensitivity and the i-th sensitivity, for example, using the following formula:
[0137] Q1 = ISO j / ISO i .
[0138] Step 408: Calculate the target illuminance based on the i-th illuminance corresponding to the i-th photosensitivity and the first illuminance weight.
[0139] Specifically, the terminal can calculate the target illuminance L using the following formula. j :
[0140] L j =L i *Q1=L i *ISO j / ISO i .
[0141] In one embodiment, such as Figure 6 As shown, the step "determine the target illuminance corresponding to the target sensitivity based on the pre-set mapping relationship between sensitivity and illuminance" also includes:
[0142] Step 502: If the target sensitivity is greater than the sensitivity comparison value and the target sensitivity is less than the (i+1)th sensitivity, then calculate the second illuminance weight based on the target sensitivity and the (i+1)th sensitivity.
[0143] Specifically, if the terminal determines ISOi+1 / 2*(ISO i+1 -ISO i )≤ISO j ≤ISO i Then, the terminal can calculate the second illuminance weight Q2 based on the target sensitivity and the (i+1)th sensitivity, for example, using the following formula:
[0144] Q2 = ISO j / ISO i+1 .
[0145] Step 504: Calculate the target illuminance based on the (i+1)th illuminance corresponding to the (i+1)th photosensitivity and the second illuminance weight.
[0146] Specifically, the terminal can calculate the target illuminance L using the following formula. j :
[0147] L j =L i *Q2=L i *ISO j / ISO i+1 .
[0148] The method provided in this embodiment can calculate the accurate illuminance value in the target scene without the need for illuminance testing instruments, greatly reducing the cost of illuminance testing instruments; the method provided in this embodiment can automatically read the environmental illuminance information at any time through a program, saving manpower; the method provided in this embodiment can provide lighting according to the actual environmental illuminance, saving energy compared to adjusting the lighting system on a timed basis.
[0149] In one embodiment, such as Figure 7 As shown, the specific processing steps for the step "calculate the sensitivity comparison value based on the i-th sensitivity and the (i+1)-th sensitivity" include:
[0150] Step 602: Calculate the target value based on the preset sensitivity weight and the difference between the (i+1)th sensitivity and the ith sensitivity.
[0151] Specifically, the preset sensitivity weight can be determined by the terminal based on the actual application scenario, for example, it can be one-half. Then the terminal can calculate the target value D using the following formula:
[0152] D = 1 / 2 * (ISO) i+1-ISO i )
[0153] Step 604: Summate the target value and the i-th sensitivity value to obtain the sensitivity comparison value. Specifically, the terminal can calculate the sensitivity comparison value C using the following formula:
[0154] C = ISO i +1 / 2*(ISO i+1 -ISO i ).
[0155] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0156] Based on the same inventive concept, this application also provides an illuminance control device for implementing the illuminance control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more illuminance control device embodiments provided below can be found in the limitations of the illuminance control method described above, and will not be repeated here.
[0157] In one embodiment, such as Figure 8 As shown, an illuminance control device 700 is provided, including: a data acquisition module 701, a first determination module 702, a second determination module 703, and a control module 704, wherein:
[0158] The acquisition module 701 is used to acquire the target light sensitivity of the security camera in the target scene.
[0159] The first determining module 702 is used to determine the target illuminance corresponding to the target sensitivity according to a pre-stored mapping table of sensitivity and illuminance, and to determine the actual illuminance of the target scene based on the target illuminance.
[0160] The second determining module 703 is used to determine whether the preset lighting system control conditions are met based on the actual illuminance.
[0161] The control module 704 is used to generate a lighting system control signal when it is determined that the actual illuminance meets the preset lighting system control conditions, and to control the lighting system based on the lighting system control signal.
[0162] In one embodiment, the second determining module is specifically used for:
[0163] If the actual illuminance is less than the preset illuminance threshold for turning on the lights, and the lighting system is in the off state, then the preset lighting system start-up condition is determined to be met; if the actual illuminance is greater than the preset illuminance threshold for turning off the lights, and the lighting system is in the on state, then the preset lighting system turn-off condition is determined to be met, and the preset illuminance threshold for turning on the lights is less than the preset illuminance threshold for turning off the lights.
[0164] In one embodiment, the acquisition module is specifically used for:
[0165] According to a preset time interval, the light sensitivity of multiple targets in the target scene of the security camera is periodically collected;
[0166] The first determining module is specifically used to: determine each target illuminance corresponding to each target sensitivity according to a pre-stored mapping table of photosensitivity and illuminance; and perform averaging on a first number of target illuminances to calculate the actual illuminance of the target scene.
[0167] The control module is specifically used for:
[0168] If the actual illuminance corresponding to the collected photosensitivity is continuously less than the preset lighting illuminance threshold by a number of consecutive times, and is greater than or equal to the preset number threshold, and the lighting system is in the off state, then it is determined that the actual illuminance meets the preset lighting system start-up conditions, and a lighting system start-up signal is generated.
[0169] The control module is specifically used for:
[0170] If the actual illuminance corresponding to the collected photosensitivity is greater than or equal to the preset illuminance threshold for turning off the lights by a number of consecutive times, and the lighting system is in the on state, then it is determined that the actual illuminance meets the preset lighting system off conditions, and a lighting system off signal is generated.
[0171] In one embodiment, the pre-stored mapping table of photosensitivity and illuminance includes multiple discrete points, each discrete point including photosensitivity and the corresponding illuminance, and the discrete points in the mapping table are arranged in ascending order of photosensitivity.
[0172] The first determining module is specifically used for:
[0173] Among all discrete points where the photosensitivity is less than the target photosensitivity, determine the i-th photosensitivity corresponding to the discrete point that is closest to the target photosensitivity;
[0174] Calculate the sensitivity comparison value based on the i-th sensitivity and the (i+1)-th sensitivity;
[0175] If the target photosensitivity is greater than the i-th photosensitivity and the target photosensitivity is less than the photosensitivity comparison value, then the first illuminance weight is calculated based on the target photosensitivity and the i-th photosensitivity.
[0176] The target illuminance is calculated based on the i-th illuminance corresponding to the i-th photosensitivity and the first illuminance weight.
[0177] In one embodiment, the first determining module is further specifically used for:
[0178] If the target sensitivity is greater than the sensitivity comparison value and the target sensitivity is less than the (i+1)th sensitivity, then the second illuminance weight is calculated based on the target sensitivity and the (i+1)th sensitivity.
[0179] The target illuminance is calculated based on the (i+1)th illuminance corresponding to the (i+1)th photosensitivity and the second illuminance weight.
[0180] In one embodiment, the first determining module is further configured to: calculate a target value based on a preset photosensitivity weight and the difference between the (i+1)th photosensitivity and the ith photosensitivity; and sum the target value and the ith photosensitivity to obtain a photosensitivity comparison value.
[0181] Each module in the aforementioned illuminance control device 700 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0182] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores illuminance-related data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements an illuminance control method.
[0183] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0184] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0185] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0186] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0187] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0188] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0189] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0190] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An illuminance control method characterized by, The application is applied to a terminal, wherein the terminal is installed with a preset ISO acquisition program, and the method comprises the following steps: Periodically collecting a plurality of target sensitivities of security cameras in a target scene at preset time intervals through the preset ISO program; Determining a target illumination corresponding to the target sensitivity according to a pre-stored mapping table of sensitivities and illuminations, and determining an actual illumination of the target scene based on the target illumination; the pre-stored mapping table of sensitivities and illuminations comprises a plurality of discrete points; the discrete points comprise sensitivities and illuminations corresponding to the sensitivities; Determining whether a preset lighting system control condition is met according to the actual illumination; Generating a lighting system control signal and controlling a lighting system based on the lighting system control signal in a case where it is determined that the actual illumination meets the preset lighting system control condition; The method comprises the following steps: Determining an ith sensitivity corresponding to a discrete point closest to the target sensitivity among discrete points with sensitivities less than the target sensitivity; calculating a sensitivity comparison value according to the ith sensitivity and an (i+1)th sensitivity; if the target sensitivity is greater than the ith sensitivity and the target sensitivity is less than the sensitivity comparison value, calculating a first illumination weight according to the target sensitivity and the ith sensitivity; and calculating a target illumination according to an ith illumination corresponding to the ith sensitivity and the first illumination weight.
2. The method of claim 1, wherein, The method comprises the following steps: Respectively determining a plurality of target illuminations corresponding to the plurality of target sensitivities according to the pre-stored mapping table of sensitivities and illuminations; Performing mean value processing on a first number of continuous target illuminations to calculate the actual illumination of the target scene.
3. The method of claim 2, wherein, The method comprises the following steps: If a number of actual illuminations corresponding to collected sensitivities are less than a preset light-on illumination threshold continuously and the number is greater than or equal to a preset number threshold, and the lighting system is in a light-off state, it is determined that the actual illumination meets a preset lighting system start condition, and a lighting system start signal is generated.
4. The method of claim 2, wherein, The method comprises the following steps: If a number of actual illuminations corresponding to collected sensitivities are greater than a preset light-off illumination threshold continuously and the number is greater than or equal to a preset number threshold, and the lighting system is in a light-on state, it is determined that the actual illumination meets a preset lighting system shutdown condition, and a lighting system shutdown signal is generated.
5. The method of claim 1, wherein, The discrete points in the mapping table are arranged in ascending order of sensitivities.
6. The method of claim 5, wherein, The method further comprises the following steps: if the target ISO is greater than the ISO comparison value and the target ISO is less than the (i+1)th ISO, then a second ISO weight is calculated according to the target ISO and the (i+1)th ISO; a target ISO is calculated according to the (i+1)th ISO and the second ISO weight.
7. The method of claim 5, wherein, The calculation of the ISO comparison value according to the ith ISO and the (i+1)th ISO comprises: a target value is calculated according to a preset ISO weight and a difference between the (i+1)th ISO and the ith ISO; the target value and the ith ISO are summed to obtain the ISO comparison value.
8. An illuminance control device, characterized by comprising: The device is applied to a terminal, and the terminal is installed with a preset ISO acquisition program, and the device comprises: a collection module which periodically collects a plurality of target ISOs of a security camera in a target scene according to a preset time interval through the preset ISO program; a first determination module which determines a target ISO corresponding to the target ISO according to a preset mapping table of ISO and illumination, and determines an actual illumination of the target scene based on the target ISO; the preset mapping table of ISO and illumination comprises a plurality of discrete points; the discrete points comprise an ISO and an illumination corresponding to the ISO; a second determination module which determines whether a preset lighting system starting condition is met according to the actual illumination; a control module which generates a lighting system control signal and controls a lighting system based on the lighting system control signal when it is determined that the actual illumination meets a preset lighting system control condition; The first determination module is specifically configured to: determine an ith ISO corresponding to a discrete point closest to the target ISO among discrete points with an ISO less than the target ISO; calculate an ISO comparison value according to the ith ISO and a (i+1)th ISO; if the target ISO is greater than the ith ISO and the target ISO is less than the ISO comparison value, then a first ISO weight is calculated according to the target ISO and the ith ISO; and a target ISO is calculated according to an ith illumination corresponding to the ith ISO and the first ISO weight. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent lighting control system
CN111800585A
Security monitoring camera ambient light detection method and system
CN112995510A