Method, device, terminal equipment and medium for controlling real-time ambient illumination of lamps

By detecting real-time ambient illuminance and generating dimming signals, the problem of poor real-time ambient illuminance control of lamps is solved, achieving fast and accurate constant illuminance control and improving the user experience.

CN113329550BActive Publication Date: 2024-11-29ジャン州立達信光電子科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010129344.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2024-11-29
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

Existing real-time ambient illuminance control methods for lighting fixtures suffer from poor control performance, slow response, and low control efficiency, resulting in excessively long waiting times and a poor user experience.

Method used

By detecting the real-time ambient illuminance, when the difference between the ambient illuminance and the preset illuminance exceeds a threshold, the PWM duty cycle, real-time illuminance value, target illuminance value, and illuminance adjustment factor are obtained, a dimming signal is generated, and the brightness of the lamps is adjusted until the difference is less than or equal to the threshold.

Benefits of technology

It achieves fast, accurate, and stable constant illuminance control of lamp brightness, reduces illuminance adjustment time and the number of tests, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113329550B_ABST
    Figure CN113329550B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of automated intelligent control technology, and provides a method, device, terminal equipment and medium for controlling the real-time ambient illumination of lamps, the method comprising: detecting the real-time ambient illumination; if the difference between the real-time ambient illumination and the preset illumination is greater than a first threshold, obtaining the metering parameters used to calculate the dimming signal at the current moment; the metering parameters include a first pulse width modulation duty cycle, a real-time illumination value, a target illumination value and an illumination adjustment factor; generating a dimming signal based on the metering parameters; adjusting the brightness of the lamp according to the dimming signal, and returning to execute the step of detecting the real-time ambient illumination until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold. The present invention realizes the intelligent control of the constant illumination of the lamp, so that the constant illumination adjustment effect of the dimming signal can be more accurate and has higher stability; at the same time, the control efficiency of the real-time ambient illumination of the lamp is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automatic intelligent control, and in particular relates to a method, device, terminal equipment and computer-readable storage medium for controlling real-time ambient illumination of lamps. Background Art

[0002] Lamps are essential lighting tools in people's daily lives. Common lamps on the market generally require a fixed illumination to ensure that the brightness of the light emitted by the lamp can be relatively constant. Therefore, after the user activates the lamp each time, there is no need to adjust the illumination of the lamp, and the user can quickly use its inherent illumination to achieve the lighting effect required for daily life and meet the needs of life.

[0003] In order to control the illumination value of the lamp to be relatively constant, during the startup phase of the lamp, it is usually necessary to control the illumination of the lamp based on a gradual approximation adjustment method. However, this type of adjustment method consumes a long adjustment time, too many detection times, and is prone to jitter. Therefore, the existing control method for the real-time ambient illumination of the lamp has the problems of poor control effect, slow response and low control efficiency. The user waits too long and has a bad user experience. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method, device, terminal device and computer-readable storage medium for controlling the real-time ambient illumination of lamps, so as to solve the problem that the control method of the real-time ambient illumination of lamps in the prior art has poor control effect and low control efficiency.

[0005] A first aspect of an embodiment of the present invention provides a method for controlling real-time ambient illumination of a lamp, comprising:

[0006] Detect real-time ambient illumination;

[0007] If the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold, then obtaining a metering parameter used to calculate the dimming signal at the current moment; the metering parameter includes a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor;

[0008] generating a dimming signal based on the metering parameter;

[0009] According to the dimming signal, the brightness of the lamp is adjusted, and the step of detecting the real-time ambient illumination is returned to be executed until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold.

[0010] A second aspect of an embodiment of the present invention provides a device for controlling real-time ambient illumination of a lamp, comprising:

[0011] A detection unit, used for detecting real-time environmental illumination;

[0012] An acquisition unit, configured to acquire, if the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold, a metering parameter used to calculate the dimming signal at the current moment; the metering parameter includes a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor;

[0013] A generating unit, configured to generate a dimming signal based on the metering parameter;

[0014] A dimming unit is used to adjust the brightness of the lamp according to the dimming signal, and return to execute the step of detecting the real-time ambient illumination until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold.

[0015] A third aspect of an embodiment of the present invention provides a terminal device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method for controlling the real-time ambient illumination of the lamp are implemented as described above.

[0016] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the processor executes the computer program, the steps of the method for controlling the real-time ambient illumination of the lamp are implemented as described above.

[0017] In the embodiment of the present invention, by detecting the real-time ambient illumination, when the difference between the real-time ambient illumination and the preset illumination is greater than the threshold, the dimming signal required at the current moment is generated based on the PWM duty cycle, the real-time illumination value, the target illumination value and the illumination adjustment factor, and the dimming signal is used to adjust the brightness of the lamp, thereby realizing the intelligent control of the constant illumination of the lamp; since the judgment threshold and the illumination adjustment factor are added in the calculation process of the dimming signal, and the calculation method can automatically learn to perceive the changes in the environment and automatically calculate the required illumination adjustment factor, the jitter effect caused by environmental factors can be reduced, and the lamp can automatically and quickly adapt to different environments, so that the constant illumination adjustment effect of the dimming signal can be more accurate, faster and more stable; the constant illumination control method provided in the embodiment of the present invention can reduce the illumination adjustment time of the lamp and reduce the overall number of detections of the ambient brightness, thereby improving the control efficiency of the real-time ambient illumination of the lamp and greatly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 is a flow chart of a method for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention;

[0020] Figure 2 is a system structure diagram applicable to the method for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention;

[0021] Figure 3 is a specific implementation flow chart of the method S102 for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention;

[0022] Figure 4 is a flow chart of a method for controlling the real-time ambient illumination of a lamp provided by another embodiment of the present invention;

[0023] Figure 5 is a structural block diagram of a device for controlling real-time ambient illumination of a lamp provided by an embodiment of the present invention;

[0024] Figure 6 It is a schematic diagram of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0026] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.

[0027] Figure 1 The implementation process of the method for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention is shown, and is described in detail as follows:

[0028] S101: Detecting real-time ambient illumination.

[0029] The illuminance value refers to the luminous flux of visible light received per unit area, which is used to indicate the intensity of light and the degree of illumination of the surface area of ​​an object. When the lamp emits visible light, since the light intensity of the lamp is the same as the brightness of the surrounding environment, in the embodiment of the present invention, the real-time ambient illuminance at the current moment is detected by a preset photosensitive sensor; or, the real-time illuminance value detected is determined as the real-time ambient illuminance by a built-in illuminance detection sensor.

[0030] Figure 2 FIG. 1 shows a system structure diagram applicable to the method for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention. Figure 2 As shown, the illumination detection sensor, the microcontroller unit (MCU), the lamp driving power supply and the lamp are sequentially connected in communication. When the MCU detects a change in the ambient brightness through the illumination detection sensor, the real-time ambient illumination at that moment is read, and the real-time ambient illumination is compared with the preset illumination. If the comparison difference between the real-time ambient illumination and the preset illumination exceeds a preset first threshold, step S102 is executed.

[0031] Exemplarily, the first threshold may be, for example, 10 lux.

[0032] S102: If the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold, obtaining a metering parameter used to calculate a dimming signal at the current moment; the metering parameter includes a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor.

[0033] In an embodiment of the present invention, if the difference between the real-time ambient illumination and the preset illumination is greater than a first threshold value, the MCU unit obtains a dimming signal through a calculation method, and outputs the dimming signal to the lamp driving power supply, so that the lamp driving power supply adjusts the output power according to the dimming signal, thereby achieving adjustment of the real-time ambient illumination of the lamp.

[0034] Specifically, according to the preset metering parameter type, the MCU unit reads the metering parameters matching each metering parameter type from the register. Among them, each type of metering parameter is an operation factor in the dimming signal calculation process. The above-mentioned metering parameters include the first pulse width modulation (PWM) duty cycle of the dimming signal obtained most recently, the real-time illuminance value at the current moment, the target illuminance value, and the illuminance adjustment factor. The target illuminance value is the numerical value of the illuminance that the lamp needs to maintain constantly; the first PWM duty cycle refers to the proportion of the power-on time to the total time in a pulse cycle of the dimming signal; the illuminance adjustment factor is the difference between the illuminance value detected when the PWM has the maximum duty cycle and the illuminance value detected when the PWM has a zero duty cycle.

[0035] Exemplarily, the method for obtaining the illumination adjustment factor includes: when a lamp start event is detected to be triggered, dimming signals with a maximum PWM duty cycle and a minimum PWM duty cycle are generated according to a preset control instruction. Two dimming signals with a maximum PWM duty cycle and a minimum PWM duty cycle are respectively transmitted to the lamp driver power supply, so that after the lamp driver power supply adjusts the output power according to the dimming signal, the lamp is controlled to adjust to obtain a maximum illumination value and a minimum illumination value. The maximum illumination value and the minimum illumination value are obtained, and the illumination adjustment factor is determined based on the difference between the two.

[0036] As an embodiment of the present invention, the method for obtaining the illumination adjustment factor may also include:

[0037] The illumination adjustment factor is calculated based on a preset formula; the preset formula includes:

[0038]

[0039] Among them, lux current is the real-time illuminance value obtained in the above step S102; lux start It is the initial illumination value of the lamp before the first illumination adjustment operation; DUTY max is the preset maximum value of PWM duty cycle; duty current is the first PWM duty cycle mentioned above; start It is the third PWM duty cycle corresponding to the dimming signal when the illumination starts to be adjusted for the first time.

[0040] The above-mentioned maximum PWM duty cycle value is the proportional value corresponding to the value "1". For example, the above-mentioned maximum PWM duty cycle value is 100% or 1000‰, etc. According to the sensitivity set by the user, the maximum PWM duty cycle value matching the sensitivity is determined. Among them, the higher the sensitivity, the greater the number of equal divisions of the maximum PWM duty cycle value.

[0041] In the embodiment of the present invention, for the sake of distinction, the PWM duty cycle of the dimming signal received most recently is referred to as the first PWM duty cycle; the PWM duty cycle corresponding to the dimming signal to be input to the lamp driving power supply at the next moment is referred to as the second duty cycle; the PWM duty cycle corresponding to the dimming signal when the lamp first starts to adjust the brightness is referred to as the third PWM duty cycle. It should be understood that although the terms "first", "second", etc. are used to describe different PWM duty cycles in the embodiments of the present invention, these PWM duty cycles should not be limited by these terms. For example, the first PWM duty cycle and the third PWM duty cycle can correspond to the same dimming signal, or they can correspond to different dimming signals.

[0042] Preferably, after the illumination adjustment factor is calculated, it is determined whether the illumination adjustment factor satisfies a preset condition. The preset condition is used to describe the logical rule satisfied by the illumination adjustment factor when the parameter is abnormal. If the illumination adjustment factor satisfies the preset condition, the illumination adjustment factor is deleted. At this time, the illumination adjustment factor recorded and used last time is loaded and obtained. The embodiment of the present invention can correct the influence of different ambient brightness to the greatest extent, and at the same time can reduce the calculation error caused by the abnormal illumination adjustment factor.

[0043] In the embodiment of the present invention, by inputting the real-time illuminance value, the initial illuminance value, the maximum value of the PWM duty cycle, the first PWM duty cycle and the third PWM duty cycle into a preset formula, the illuminance adjustment factor at the current moment is determined according to the calculation result, so that the silent measurement of the illuminance adjustment factor can be achieved without performing the maximum illuminance and the minimum illuminance adjustment operation on the lamp, thereby improving the user experience and enhancing the dimming effect of the lamp. At the same time, since the real-time illuminance value under different environmental scenes is different, the illuminance adjustment factor measured based on the above preset formula will also change, thereby ensuring that the illuminance adjustment factor can match the current application scene, reducing the dimming error caused by the ambient light, and thus improving the accuracy of the dimming signal generated based on the illuminance adjustment factor.

[0044] S103: Generate a dimming signal based on the metering parameter.

[0045] In the embodiment of the present invention, the dimming signal can be a PWM digital signal or a 0 to 10V analog signal. The first PWM duty cycle, the real-time illuminance value, the target illuminance value and the illuminance adjustment factor are input into a preset formula to obtain the PWM duty cycle corresponding to the dimming signal. aim At this time, the dimming signal corresponding to the calculated PWM duty cycle is the dimming signal to be input to the lamp driving power supply next time.

[0046] The above preset formulas include:

[0047]

[0048] Among them, duty current is the first PWM duty cycle mentioned above; lux current is the real-time illuminance value obtained in the above step S102; lux aim is the above target illumination value; DUTY max is the preset maximum PWM duty cycle; LUX dutymax is the illumination adjustment factor.

[0049] S104: adjusting the brightness of the lamp according to the dimming signal, and returning to the step of detecting the real-time ambient illumination until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold.

[0050] In the embodiment of the present invention, the MCU unit sends the calculated dimming signal corresponding to the second PWM duty cycle to the lamp driver, so that the lamp driver adjusts the output power of the lamp according to the dimming signal to adjust the brightness of the lamp, thereby controlling the real-time ambient illumination of the lamp. After each adjustment is completed, the above steps S101 to S104 are returned to the loop until it is detected that the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold, and then the illumination adjustment is stopped and the step S101 is stopped, thereby ensuring that the real-time ambient illumination of the lamp can be stabilized within a small error range with the target illumination.

[0051] In the embodiment of the present invention, even if the difference between the real-time environment illumination and the preset illumination is much greater than the first threshold, the The dimming method of the invention requires very few times of detecting the real-time ambient illumination, for example, only one or two detections are required.

[0052] In the embodiment of the present invention, by detecting the real-time ambient illumination, when the difference between the real-time ambient illumination and the preset illumination is greater than a threshold value, a dimming signal required at the current moment is generated based on the PWM duty cycle, the real-time illumination value, the target illumination value and the illumination adjustment factor, and the dimming signal is used to adjust the brightness of the lamp, thereby realizing intelligent control of the constant illumination of the real-time environment of the lamp; since the illumination adjustment factor is added in the calculation process of the dimming signal, the jitter effect caused by environmental factors can be reduced, so that the constant illumination adjustment effect of the dimming signal can be more accurate and have higher stability; the constant illumination control method provided in the embodiment of the present invention can reduce the illumination adjustment time of the lamp, reduce the overall number of detections of the ambient brightness, and thus improve the control efficiency of the real-time ambient illumination of the lamp.

[0053] As an embodiment of the present invention, Figure 3 The specific implementation process of the method S102 for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention is shown, and is described in detail as follows:

[0054] S1021: If the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold and less than a second threshold, a preset approximate dimming algorithm is obtained, and the brightness of the lamp is adjusted based on the approximate dimming algorithm.

[0055] S1022: If the difference between the real-time ambient illuminance and the preset illuminance is greater than or equal to the second threshold, obtain the metering parameters used to calculate the dimming signal at the current moment, calculate the dimming signal according to the first preset formula, and adjust the brightness of the lamp; wherein the first threshold is less than the second threshold.

[0056] In the embodiment of the present invention, when the difference between the real-time environment illumination and the preset illumination is greater than the first threshold, the illumination of the lamp at the current moment needs to be adjusted. At this time, it is determined whether the difference between the real-time environment illumination and the preset illumination is less than the second threshold.

[0057] If the difference between the real-time ambient illuminance and the preset illuminance is greater than the first threshold and less than the second threshold, a pre-stored approximate dimming algorithm is obtained, and the illuminance of the lamp is adjusted based on the approximate dimming algorithm. If the difference between the real-time ambient illuminance and the preset illuminance is greater than or equal to the second threshold, a metering parameter for calculating a dimming signal is obtained, and the above steps S103 and S104 are performed.

[0058] For example, the first threshold may be 20 lux, and the second threshold may be 50 lux. When the absolute value of the difference between the real-time ambient illuminance and the preset illuminance is within the range of 20 lux to 50 lux, the approximate dimming algorithm is used to adjust the brightness of the lamp.

[0059] Specifically, the above-mentioned approximate dimming algorithm includes: obtaining a preset PWM step value; performing an adjustment on the brightness of the lamp at the current moment according to the PWM step value; after each adjustment is completed, detecting whether the difference between the real-time ambient illuminance and the preset illuminance is less than a first threshold value; if the detection result is no, returning to execute the above-mentioned step of performing an adjustment on the brightness of the lamp at the current moment according to the PWM step value to continue to perform step dimming; if the detection result is yes, stopping the brightness adjustment operation.

[0060] In the embodiment of the present invention, when the difference between the real-time ambient illuminance and the preset illuminance is in different difference intervals, different algorithms are used to perform the adjustment operation of the luminaire brightness, ensuring that in different scene environments, a more adaptable algorithm can be used to quickly adjust the target illuminance value. When the difference between the real-time ambient illuminance and the preset illuminance is less than the second threshold, since the number of detections of the approximate dimming method is small and the calculation is relatively simple, the dimming time is shortened as a whole, thereby improving the constant illuminance adjustment efficiency.

[0061] As another embodiment of the present invention, Figure 4 As shown, before the above S102, it also includes:

[0062] S105: Determine the current working mode according to the selection instruction issued by the user object.

[0063] In the embodiment of the present invention, the lamp housing is provided with an interactive control button or control panel. When a pressing signal sent by a user object on the control button or control panel is detected, a working mode matching the pressing signal is determined according to a preset control logic.

[0064] For example, if the above-mentioned pressing signal is a pressing signal issued by the user object double-clicking the control button, the working mode matching the double-click event is the sleep mode; if the above-mentioned pressing signal is a pressing signal issued by the user object pressing the control button three times in a row, the working mode matching the control event is the reading mode. Each working mode corresponds to a preset target illumination.

[0065] Optionally, if the lamp has a built-in wireless communication module, the lamp receives a selection instruction of the portable working mode sent by the user object through the remote control terminal through wireless communication.

[0066] Optionally, if the lamp has a built-in wired communication module, the lamp receives a selection instruction of the portable working mode sent by the user object through the remote control terminal through wired communication.

[0067] Optionally, the real-time system time is obtained, and according to the time interval to which the real-time system time belongs, a working mode matching the time interval is determined, thereby realizing automatic identification of the working mode.

[0068] S106: Obtain a preset target illumination corresponding to the working mode.

[0069] In the embodiment of the present invention, a pre-stored correspondence table is loaded. The correspondence table is used to store the preset target illumination corresponding to each type of working mode. According to the working mode at the current moment, the preset target illumination corresponding to the working mode is searched from the above correspondence table to ensure that the dynamic adjustment operation of the lamp brightness can be performed based on the preset target illumination in the subsequent step S102.

[0070] In the embodiment of the present invention, since the lamp is suitable for different brightness under different working modes, therefore, by pre-storing the preset target illumination corresponding to each working mode, the working mode selected by the user object is pre-determined before detecting the difference between the real-time environment illumination and the preset illumination, so as to ensure that the illumination of the lamp can be accurately adjusted according to the preset target illumination corresponding to the current working mode, so that the illumination value finally stabilized by the real-time environment of the lamp can meet the application scenario of the current user, and achieve a more adaptable dimming effect.

[0071] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0072] Corresponding to the method for controlling the real-time ambient illumination of a lamp provided in an embodiment of the present invention, Figure 5 The structure block diagram of the device for controlling the real-time ambient illumination of a lamp provided by an embodiment of the present invention is shown. For the convenience of description, only the parts related to the present embodiment are shown.

[0073] Reference Figure 5 , the device comprises:

[0074] The detection unit 51 is used to detect the real-time environmental illumination.

[0075] The acquisition unit 52 is used to obtain the metering parameters used to calculate the dimming signal at the current moment if the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold; the metering parameters include a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor.

[0076] The generating unit 53 is configured to generate a dimming signal based on the metering parameter.

[0077] The dimming unit 54 is used to adjust the brightness of the lamp according to the dimming signal, and return to execute the step of detecting the real-time ambient illumination until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold.

[0078] Optionally, the dimming unit 54 includes:

[0079] An input subunit is used to input the metering parameter into a first preset formula to obtain a second PWM duty cycle corresponding to the dimming signal. aim The first preset formula includes:

[0080]

[0081] Among them, duty current is the first PWM duty cycle; lux current is the real-time illuminance value; lux aim is the target illumination value; DUTY max is the preset maximum PWM duty cycle; LUX dutymax is the illumination adjustment factor.

[0082] Optionally, the acquiring unit 52 includes:

[0083] The calculation subunit is used to calculate the illumination adjustment factor based on a second preset formula and determine the reliability of the illumination adjustment factor; the second preset formula includes:

[0084]

[0085] Among them, DUTY max is the real-time illuminance value; lux start The initial illumination value of the lamp before the illumination adjustment; DUTY max is the preset maximum value of PWM duty cycle; duty currentis the first PWM duty cycle; start It is the third PWM duty cycle corresponding to the dimming signal when the illumination starts to be adjusted.

[0086] Optionally, the acquiring unit 52 includes:

[0087] The first acquisition subunit is used to acquire a preset approximate dimming algorithm if the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold and less than a second threshold, and calculate a dimming signal based on the approximate dimming algorithm to adjust the brightness of the lamp.

[0088] The second acquisition subunit is used to obtain the metering parameters used to calculate the dimming signal at the current moment if the difference between the real-time ambient illuminance and the preset illuminance is greater than or equal to the second threshold, and calculate the dimming signal according to the first preset formula to adjust the brightness of the lamp.

[0089] The first threshold is smaller than the second threshold.

[0090] Optionally, the device for controlling the real-time ambient illumination of the lamp further includes:

[0091] A determination unit, used to determine the current working mode according to the selection instruction issued by the user object;

[0092] The preset illumination acquisition unit is used to acquire the preset target illumination corresponding to the working mode.

[0093] In the embodiment of the present invention, by detecting the real-time ambient illumination, when the difference between the real-time ambient illumination and the preset illumination is greater than the threshold, the dimming signal required at the current moment is generated based on the PWM duty cycle, the real-time illumination value, the target illumination value and the illumination adjustment factor, and the dimming signal is used to adjust the brightness of the lamp, thereby realizing the intelligent control of the constant illumination of the lamp; since the judgment threshold and the illumination adjustment factor are added in the calculation process of the dimming signal, and the calculation method can automatically learn to perceive the changes in the environment and automatically calculate the required illumination adjustment factor, the jitter effect caused by environmental factors can be reduced, and the lamp can automatically and quickly adapt to different environments, so that the constant illumination adjustment effect of the dimming signal can be more accurate, faster and more stable; the constant illumination control method provided in the embodiment of the present invention can reduce the illumination adjustment time of the lamp and reduce the overall number of detections of the ambient brightness, thereby improving the control efficiency of the real-time ambient illumination of the lamp and greatly improving the user experience.

[0094] Figure 6 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 6As shown, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a control program for the real-time ambient illumination of the lamp. When the processor 60 executes the computer program 62, the steps of the above-mentioned various embodiments of the method for controlling the real-time ambient illumination of the lamp are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 6 The functions of the units 51 to 54 are shown.

[0095] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 62 in the terminal device 6.

[0096] The terminal device 6 can be a computing device such as a micro single chip system, a microcomputer, a desktop computer, a notebook, a palm computer, a cloud server, etc. The terminal device can include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand that Figure 6 It is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0097] The processor 60 may be a microprocessor, a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0098] The memory 61 may be an internal storage unit of the terminal device 6, such as a flash memory, a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a flash memory chip, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used to store the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.

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

[0100] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a micro-chip microcomputer device, a microprocessor device, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: flash memory, U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0101] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for controlling the real-time ambient illumination of a lamp, characterized in that: include: Detect real-time ambient illumination; If the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold, then obtaining a metering parameter used to calculate the dimming signal at the current moment; the metering parameter includes a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor; generating a dimming signal based on the metering parameter; According to the dimming signal, the brightness of the lamp is adjusted, and the step of detecting the real-time ambient illumination is returned to be executed until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold value; The generating a dimming signal based on the metering parameter comprises: The measurement parameter is input into the first preset formula to obtain a second PWM duty cycle corresponding to the dimming signal. aim ; The first preset formula includes: The PWM duty cycle of the dimming signal received most recently is referred to as the first PWM duty cycle. current is the first PWM duty cycle; lux current is the real-time illuminance value; lux aim is the target illumination value; DUTY max is the preset maximum PWM duty cycle; LUX dutymax is the illumination adjustment factor.

2. The method for controlling the real-time ambient illumination of a lamp as claimed in claim 1, characterized in that: If the difference between the real-time environment illumination and the preset illumination is greater than a first threshold, obtaining a metering parameter used to calculate a dimming signal at the current moment includes: The illumination adjustment factor is calculated based on a second preset formula, and the reliability of the illumination adjustment factor is determined; the second preset formula includes: Among them, LUX dutymax is the illumination adjustment factor; lux current is the real-time illuminance value; lux start The initial illumination value of the lamp before the illumination adjustment; DUTY max is the preset maximum value of PWM duty cycle; duty current is the first PWM duty cycle; start It is the third PWM duty cycle corresponding to the dimming signal when the illumination starts to be adjusted.

3. The method for controlling the real-time ambient illumination of a lamp as claimed in claim 1, characterized in that: If the difference between the real-time environment illumination and the preset illumination is greater than a first threshold, obtaining a metering parameter used to calculate a dimming signal at the current moment includes: If the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold value and less than a second threshold value, a preset approximate dimming algorithm is obtained, and a dimming signal is calculated based on the approximate dimming algorithm to adjust the brightness of the lamp; If the difference between the real-time ambient illuminance and the preset illuminance is greater than or equal to the second threshold, obtaining the metering parameter used to calculate the dimming signal at the current moment, and calculating the dimming signal according to the first preset formula to adjust the brightness of the lamp; The first threshold is smaller than the second threshold.

4. The method for controlling the real-time ambient illumination of a lamp as claimed in claim 1, characterized in that: Before obtaining the metering parameter for calculating the dimming signal at the current moment if the difference between the real-time environment illumination and the preset illumination is greater than the first threshold, the method further includes: Determine the current working mode according to the selection instruction issued by the user object; Obtain a preset target illumination corresponding to the working mode.

5. A device for controlling the real-time ambient illumination of a lamp, characterized in that: include: A detection unit, used for detecting real-time environmental illumination; an acquisition unit, configured to acquire, if the difference between the real-time ambient illuminance and the preset illuminance is greater than a first threshold, a metering parameter used to calculate the dimming signal at the current moment; the metering parameter includes a first pulse width modulation (PWM) duty cycle, a real-time illuminance value, a target illuminance value, and an illuminance adjustment factor; A generating unit, configured to generate a dimming signal based on the metering parameter; a dimming unit, configured to adjust the brightness of the lamp according to the dimming signal, and return to the step of detecting the real-time ambient illumination until the difference between the real-time ambient illumination and the preset illumination is less than or equal to the first threshold; The dimming unit comprises: An input subunit is used to input the metering parameter into a first preset formula to obtain a second PWM duty cycle corresponding to the dimming signal. aim ; The first preset formula includes: The PWM duty cycle of the dimming signal received most recently is referred to as the first PWM duty cycle. current is the first PWM duty cycle; lux current is the real-time illuminance value; lux aim is the target illumination value; DUTY max is the preset maximum PWM duty cycle; LUX dutymax is the illumination adjustment factor.

6. The device for controlling the real-time ambient illumination of a lamp as claimed in claim 5, characterized in that: The acquisition unit comprises: The calculation subunit is used to calculate the illumination adjustment factor based on a second preset formula and determine the reliability of the illumination adjustment factor; the second preset formula includes: Among them, LUX dutymax is the illumination adjustment factor; lux current is the real-time illuminance value; lux start The initial illumination value of the lamp before the illumination adjustment; DUTY max is the preset maximum value of PWM duty cycle; duty current is the first PWM duty cycle; start It is the third PWM duty cycle corresponding to the dimming signal when the illumination starts to be adjusted.

7. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method for controlling the real-time ambient illumination of the lamp are implemented as claimed in any one of claims 1 to 4.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for controlling the real-time ambient illumination of a lamp as claimed in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Lighting method and lighting device

    CN106231756A

  • Backlight adjusting method and backlight adjusting system

    CN107564479A