[go: up one dir, main page]

CN115119365A - Dimming method, dimming device and computer storage medium - Google Patents

Dimming method, dimming device and computer storage medium Download PDF

Info

Publication number
CN115119365A
CN115119365A CN202210682151.4A CN202210682151A CN115119365A CN 115119365 A CN115119365 A CN 115119365A CN 202210682151 A CN202210682151 A CN 202210682151A CN 115119365 A CN115119365 A CN 115119365A
Authority
CN
China
Prior art keywords
value
dimming
brightness
adjustment
saved
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210682151.4A
Other languages
Chinese (zh)
Other versions
CN115119365B (en
Inventor
马晶
卢超
黄振培
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202210682151.4A priority Critical patent/CN115119365B/en
Publication of CN115119365A publication Critical patent/CN115119365A/en
Application granted granted Critical
Publication of CN115119365B publication Critical patent/CN115119365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/11Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/165Controlling the light source following a pre-assigned programmed sequence; Logic control [LC]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

本申请公开了一种调光方法、调光设备及计算机存储介质,该调光方法包括:在接收到触发指令时,获取并保存当前的环境亮度值;判断当前的环境亮度值与目标亮度值的亮度差值是否在预设范围内;若判断结果为否,则获取保存的调光值,并确定调光方向;向光照设备发送调光指令,调光指令携带有调光方向以及调光值;在发送调光指令的预设时间之后,获取当前的环境亮度值;计算当前的环境亮度值与保存的环境亮度值的亮度差值,并根据亮度差值更新保存的调光值;以当前的环境亮度值更新保存的环境亮度值;返回执行判断当前的环境亮度值与目标亮度值的亮度差值是否在预设范围内的步骤。本申请提供的调光方法能够缩短调光的时间,提高调光效果。

Figure 202210682151

The present application discloses a dimming method, a dimming device and a computer storage medium. The dimming method includes: when a trigger instruction is received, acquiring and saving a current ambient brightness value; judging the current ambient brightness value and the target brightness value Whether the brightness difference value is within the preset range; if the judgment result is no, obtain the saved dimming value and determine the dimming direction; send a dimming command to the lighting device, and the dimming command carries the dimming direction and dimming direction. After the preset time of sending the dimming command, obtain the current ambient brightness value; calculate the brightness difference between the current ambient brightness value and the saved ambient brightness value, and update the saved dimming value according to the brightness difference value; The current ambient brightness value updates the saved ambient brightness value; returns to the step of judging whether the brightness difference between the current ambient brightness value and the target brightness value is within a preset range. The dimming method provided by the present application can shorten the dimming time and improve the dimming effect.

Figure 202210682151

Description

调光方法、调光设备及计算机存储介质Dimming method, dimming device and computer storage medium

技术领域technical field

本申请涉及智能调光技术领域,特别是涉及一种调光方法、调光设备及计算机存储介质。The present application relates to the technical field of intelligent dimming, and in particular, to a dimming method, a dimming device and a computer storage medium.

背景技术Background technique

灯具是最常见的提供光照的设备,也是我们正常生活、学习和工作中必不可少的重要辅助用具之一。Lamps are the most common devices that provide light, and are also one of the important auxiliary appliances that are indispensable in our normal life, study and work.

在传统的灯光调节领域,通常使用旋钮、按键灯等本地操作控制灯的亮度、色彩等,而目前随着智能终端的普及与发展,自动调光的智能灯具已经成为必然的发展趋势。In the field of traditional lighting adjustment, local operations such as knobs and button lights are usually used to control the brightness and color of lights. At present, with the popularization and development of intelligent terminals, intelligent lamps with automatic dimming have become an inevitable development trend.

本申请的发明人在长期的研究中发现,目前智能灯具的调光效果有待提高。The inventors of the present application have found in long-term research that the current dimming effect of smart lamps needs to be improved.

发明内容SUMMARY OF THE INVENTION

本申请主要解决的技术问题是提供一种调光方法、调光设备及计算机存储介质,能够缩短调光的时间,提高调光效果。The technical problem mainly solved by the present application is to provide a dimming method, a dimming device and a computer storage medium, which can shorten the dimming time and improve the dimming effect.

为解决上述技术问题,本申请采用的一个技术方案是:提供一种调光方法,所述方法包括:调光设备在接收到触发指令时,获取并保存当前的环境亮度值;判断所述当前的环境亮度值与目标亮度值的亮度差值是否在预设范围内;若判断结果为否,则获取保存的调光值,并根据所述当前的环境亮度值以及所述目标亮度值确定调光方向;向建立通信连接的光照设备发送调光指令,所述调光指令携带有所述调光方向以及所述调光值;在发送所述调光指令的预设时间之后,获取当前的环境亮度值;计算所述当前的环境亮度值与所述保存的环境亮度值的亮度差值,并根据所述亮度差值更新所述保存的调光值;以所述当前的环境亮度值更新所述保存的环境亮度值;返回执行所述判断所述当前的环境亮度值与目标亮度值的亮度差值是否在预设范围内的步骤;其中,所述根据所述亮度差值更新所述保存的调光值的步骤,包括:若所述亮度差值的绝对值小于第一数值,则将所述保存的调光值与第一调整值叠加,并以叠加后的结果更新所述保存的调光值;若所述亮度差值的绝对值不小于所述第一数值但小于第二数值,则将所述保存的调光值与第二调整值叠加,并以叠加后的结果更新所述保存的调光值,其中,所述第一数值、所述第二数值均小于调节步进,且所述第一数值小于所述第二数值,所述第一调整值大于所述第二调整值,且所述第一调整值、所述第二调整值均大于零;若所述亮度差值的绝对值不小于所述第二数值但小于或等于所述调节步进,则保持所述保存的调光值不变;若所述亮度差值的绝对值大于所述调节步进,则减小所述保存的调光值;其中,所述调节步进表征所述光照设备根据所述调光指令每调一次亮度,所期待环境亮度的改变值。In order to solve the above technical problem, a technical solution adopted in the present application is to provide a dimming method, the method comprising: when a dimming device receives a trigger instruction, acquiring and saving the current ambient brightness value; Whether the brightness difference between the ambient brightness value and the target brightness value is within the preset range; if the judgment result is no, obtain the saved dimming value, and determine the dimming value according to the current ambient brightness value and the target brightness value. light direction; send a dimming instruction to the lighting device that establishes a communication connection, the dimming instruction carries the dimming direction and the dimming value; after the preset time for sending the dimming instruction, obtain the current ambient brightness value; calculate the brightness difference between the current ambient brightness value and the saved ambient brightness value, and update the saved dimming value according to the brightness difference value; update with the current ambient brightness value the saved ambient brightness value; return to executing the step of judging whether the brightness difference between the current ambient brightness value and the target brightness value is within a preset range; wherein the updating the said brightness according to the brightness difference The step of saving the dimming value includes: if the absolute value of the luminance difference value is less than a first value, superimposing the saved dimming value and the first adjustment value, and updating the saved dimming value with the superimposed result If the absolute value of the brightness difference is not less than the first value but less than the second value, the saved dimming value and the second adjustment value are superimposed, and updated with the superimposed result The stored dimming value, wherein the first value and the second value are both smaller than the adjustment step, and the first value is smaller than the second value, and the first adjustment value is greater than the first adjustment value. Two adjustment values, and both the first adjustment value and the second adjustment value are greater than zero; if the absolute value of the luminance difference is not less than the second value but less than or equal to the adjustment step, keep The stored dimming value remains unchanged; if the absolute value of the brightness difference value is greater than the adjustment step, the stored dimming value is reduced; wherein, the adjustment step represents the lighting device according to Each time the brightness of the dimming command is adjusted, the expected change value of the ambient brightness.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种调光设备,所述调光设备包括处理器、存储器以及通信电路,所述处理器分别耦接所述存储器、所述通信电路,所述存储器中存储有程序数据,所述处理器通过执行所述存储器内的所述程序数据以实现上述方法中的步骤。In order to solve the above technical problem, another technical solution adopted in the present application is to provide a dimming device, the dimming device includes a processor, a memory and a communication circuit, the processor is respectively coupled to the memory, the A communication circuit, wherein program data is stored in the memory, and the processor implements the steps in the above method by executing the program data in the memory.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序能够被处理器执行以实现上述方法中的步骤。In order to solve the above technical problem, another technical solution adopted in the present application is to provide a computer storage medium, where the computer storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps in the above method.

本申请的有益效果是:本申请中的调光方法在对光照设备进行调光后,会根据调光的结果更新调光值,从而对采集环境亮度值的传感器和光照设备之间的相对位置、所处环境没有任何要求,即本申请中的调光方法不仅能够缩短调光时间、提高调光效果,还能扩大应用范围。The beneficial effects of the present application are: after the dimming method in the present application modulates the lighting equipment, the dimming value will be updated according to the dimming result, so as to adjust the relative position between the sensor that collects the ambient brightness value and the lighting equipment . There is no requirement for the environment, that is, the dimming method in the present application can not only shorten the dimming time, improve the dimming effect, but also expand the scope of application.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort. in:

图1是本申请调光方法一实施方式的流程示意图;FIG. 1 is a schematic flowchart of an embodiment of the dimming method of the present application;

图2是现有技术中调光设备与光照设备交互的链路图;2 is a link diagram of the interaction between a dimming device and a lighting device in the prior art;

图3是本申请中调光设备与光照设备交互的链路图;3 is a link diagram of the interaction between the dimming device and the lighting device in the present application;

图4是本申请调光设备一实施方式的结构示意图;FIG. 4 is a schematic structural diagram of an embodiment of the dimming device of the present application;

图5是本申请计算机存储介质一实施方式的结构示意图。FIG. 5 is a schematic structural diagram of an embodiment of a computer storage medium of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性的劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

参阅图1,图1是本申请调光方法一实施方式的流程示意图,该调光方法包括:Referring to FIG. 1, FIG. 1 is a schematic flowchart of an embodiment of the dimming method of the present application, and the dimming method includes:

S110:调光设备在接收到触发指令时,获取并保存当前的环境亮度值。S110: When receiving the trigger instruction, the dimming device acquires and saves the current ambient brightness value.

具体地,调光设备可以是本身具有采集环境亮度值的功能,例如调光设备集成有采集环境亮度值的传感器,也可以是本身不具有采集环境亮度值的功能,而是与采集环境亮度值的传感器建立通信连接,从而获取当前的环境亮度值。其中,当调光设备本身具有采集环境亮度值的功能时,该调光设备与光照设备安装在同一空间内,当调光设备本身不具有采集环境亮度值的功能时,与调光设备建立通信连接的传感器和光照设备安装在同一空间内。其中为了便于说明,以下均以调光设备本身具有采集环境亮度值的功能进行说明。Specifically, the dimming device may have the function of collecting ambient brightness values. For example, the dimming device may be integrated with a sensor for collecting ambient brightness values, or it may not have the function of collecting ambient brightness values. The sensor establishes a communication connection to obtain the current ambient brightness value. Among them, when the dimming device itself has the function of collecting the ambient brightness value, the dimming device and the lighting device are installed in the same space, and when the dimming device itself does not have the function of collecting the ambient brightness value, establish communication with the dimming device Connected sensors and lighting are installed in the same space. Hereinafter, for the convenience of description, the dimming device itself has the function of collecting the ambient brightness value for description.

触发指令可以是用户发送的指令,例如当用户想要调节光照设备的亮度值时,用户向调光设备发送一调光指令,该调光指令即为触发指令,或者,触发指令是调光设备按照预设规则自动产生的,例如,用户设定每隔半小时进行一次调光,则调光设备每隔半小时产生触发指令。The trigger instruction can be an instruction sent by the user. For example, when the user wants to adjust the brightness value of the lighting device, the user sends a dimming instruction to the dimming device, and the dimming instruction is the trigger instruction, or the trigger instruction is the dimming device. It is automatically generated according to the preset rules. For example, if the user sets the dimming to be performed every half hour, the dimming device will generate a trigger instruction every half hour.

S120:判断当前的环境亮度值与目标亮度值的亮度差值是否在预设范围内。S120: Determine whether the brightness difference between the current ambient brightness value and the target brightness value is within a preset range.

其中,若判断结果为是,则结束流程,即进入步骤S180,若判断为否,则进入步骤S130。Wherein, if the determination result is yes, the process ends, that is, step S180 is entered, and if the determination result is no, then step S130 is entered.

具体地,目标亮度值可以是触发指令携带的,也可以是预先设定保存在调光设备中的,在此不做限制。Specifically, the target brightness value may be carried by the trigger instruction, or may be preset and stored in the dimming device, which is not limited herein.

同时,当前的环境亮度值与目标亮度值的亮度差值在预设范围内,则说明当前的环境亮度值满足要求,在目标亮度值附近,无需对光照设备进行调光,此时直接结束流程。At the same time, if the brightness difference between the current ambient brightness value and the target brightness value is within the preset range, it means that the current ambient brightness value meets the requirements, and when the target brightness value is near, there is no need to dim the lighting equipment, and the process ends directly at this point. .

S130:获取保存的调光值,并根据当前的环境亮度值以及目标亮度值确定调光方向。S130: Acquire the saved dimming value, and determine the dimming direction according to the current ambient brightness value and the target brightness value.

具体地,调光值为光照设备的亮度上升或下降的幅度值。Specifically, the dimming value is the magnitude of the rise or fall of the brightness of the lighting device.

同时若当前的环境亮度值大于目标亮度值,则调光方向为向下,即需要降低光照设备的亮度,若当前的环境亮度值小于目标亮度值,则调光方向为向上,即需要增加光照设备的亮度。At the same time, if the current ambient brightness value is greater than the target brightness value, the dimming direction is downward, that is, the brightness of the lighting device needs to be reduced. If the current ambient brightness value is less than the target brightness value, the dimming direction is upward, that is, the lighting needs to be increased. The brightness of the device.

S140:向建立通信连接的光照设备发送调光指令,调光指令携带有调光方向以及调光值。S140: Send a dimming instruction to the lighting device that has established a communication connection, where the dimming instruction carries a dimming direction and a dimming value.

具体地,光照设备在接收到调光指令后,根据调光指令进行调光。Specifically, after receiving the dimming instruction, the lighting device performs dimming according to the dimming instruction.

其中,环境亮度值和目标亮度值的单位为lux(勒克司),光照设备的亮度值为level值,level值范围为0-255,代表0-100%亮度。也就是说,环境亮度值的单位与光照设备亮度值的单位不同。可以理解的是,调光值的单位与光照设备亮度值的单位相同,与环境亮度值的单位不同。Among them, the unit of the ambient brightness value and the target brightness value is lux (lux), the brightness value of the lighting device is a level value, and the level value range is 0-255, representing 0-100% brightness. That is, the unit of the ambient brightness value is different from the unit of the lighting device brightness value. It can be understood that the unit of the dimming value is the same as the unit of the brightness value of the lighting device, and is different from the unit of the ambient brightness value.

在一应用场景中,为了减低整个调光的时间,调光设备向光照设备发送的调光指令携带有光照设备能够识别的通信标识。In an application scenario, in order to reduce the entire dimming time, the dimming instruction sent by the dimming device to the lighting device carries a communication identifier that can be recognized by the lighting device.

具体地,结合图2和图3,现有技术中传统的调光方法为,光照设备将当前的环境亮度值上报给网关,然后网关上报给云端,接着云端根据用户设定的值(即目标亮度值)进行比较,若发现两者差值的绝对值超过预设值,则下发调光指令至网关,网关再转发给光照设备,该过程链路长,不利于降低调光时间。Specifically, with reference to FIG. 2 and FIG. 3 , the traditional dimming method in the prior art is that the lighting device reports the current ambient brightness value to the gateway, and then the gateway reports it to the cloud, and then the cloud according to the value set by the user (that is, the target If the absolute value of the difference between the two is found to exceed the preset value, the dimming command will be sent to the gateway, and the gateway will then forward it to the lighting device. This process has a long link and is not conducive to reducing the dimming time.

而在本实施方式中,调光设备与光照设备之间采用Zigbee(紫峰协议,其允许设备之间通过群组的方式交互数据)群组通讯方式进行通讯,调光设备与光照设备预先建立一个群组,即调光设备与光照设备共享一通信标识,然后在调光的过程中,调光设备通过组播的方式向光照设备发送给调光指令,即调光设备发送的调光指令携带有共享的通信标识,而后光照设备在接收到调光指令后,进行鉴权,并在鉴权成功后对应调光指令进行亮度调节,从图2和图3可以看出,本实施方式中无需网关进行中继转发数据,其通信链路相比现有技术中的通信链路能够得到缩短,从而能够避免数据链路过长导致的调光延时,进而能够提高调光效率。In this embodiment, the dimming device and the lighting device use the Zigbee (Zifeng protocol, which allows devices to exchange data through groups) group communication mode for communication, and the dimming device and the lighting device pre-establish a Group, that is, the dimming device and the lighting device share a communication identifier, and then in the process of dimming, the dimming device sends a dimming command to the lighting device through multicast, that is, the dimming command sent by the dimming device carries There is a shared communication identifier, and then the lighting device performs authentication after receiving the dimming command, and adjusts the brightness corresponding to the dimming command after the authentication is successful. It can be seen from Figure 2 and Figure 3 that in this embodiment, no need When the gateway relays and forwards data, its communication link can be shortened compared to the communication link in the prior art, so that the dimming delay caused by the long data link can be avoided, and the dimming efficiency can be improved.

S150:在发送调光指令的预设时间之后,获取当前的环境亮度值。S150: After the preset time of sending the dimming command, obtain the current ambient brightness value.

具体地,调光设备发送调光指令的预设时间之后,判定光照设备已经根据调光指令进行了亮度调节,此时获取的当前的环境亮度值为光照设备进行亮度调节之后,当前环境的亮度值。Specifically, after the preset time for the dimming device to send the dimming instruction, it is determined that the lighting device has performed brightness adjustment according to the dimming instruction, and the current ambient brightness value obtained at this time is the brightness of the current environment after the lighting device performs the brightness adjustment. value.

S160:计算当前的环境亮度值与保存的环境亮度值的亮度差值,并根据亮度差值更新保存的调光值。S160: Calculate the brightness difference between the current ambient brightness value and the stored ambient brightness value, and update the stored dimming value according to the brightness difference value.

具体地,保存的环境亮度值为调光之前的环境亮度值,因此可以理解的是,当前的环境亮度值与保存的环境亮度值的亮度差值表征了光照设备在根据调光指令进行亮度调节之后,环境亮度的变化值,即,亮度差值是对调光指令所携带的调光值的反馈,反映了调光效果,而后根据亮度差值更新保存的调光值,使得下一次发送的调光指令所携带的调光值为更新后的调光值,即对下一次调光效果进行调节,从而可以缩短调光的时间,提高调光效果。Specifically, the saved ambient brightness value is the ambient brightness value before dimming, so it can be understood that the brightness difference between the current ambient brightness value and the saved ambient brightness value indicates that the lighting device is performing brightness adjustment according to the dimming instruction After that, the change value of the ambient brightness, that is, the brightness difference value is the feedback to the dimming value carried by the dimming command, reflecting the dimming effect, and then the saved dimming value is updated according to the brightness difference value, so that the next sent dimming value The dimming value carried by the dimming command is the updated dimming value, that is, the next dimming effect is adjusted, so that the dimming time can be shortened and the dimming effect can be improved.

需要说明的是,调光设备在接收到触发指令后,第一次向光照设备发送的调光指令所携带的调光值是预先设定并保存在调光设备中的。It should be noted that, after the dimming device receives the trigger instruction, the dimming value carried in the dimming command sent to the lighting device for the first time is preset and stored in the dimming device.

具体地,当前的环境亮度值与保存的环境亮度值的亮度差值和调光值之间的关系受传感器(用于采集环境亮度值)与光照设备之间的相对位置以及环境光等因素的影响,也就是说,随着传感器与光照设备之间的相对位置以及周围环境的变化,当前的环境亮度值与保存的环境亮度值的亮度差值(环境亮度值的变化结果)和调光值之间的关系是不固定的,因此预先设定第一次向光照设备发送的调光指令所携带的调光值。Specifically, the relationship between the current ambient brightness value and the brightness difference value of the saved ambient brightness value and the dimming value is affected by the relative position between the sensor (used to collect the ambient brightness value) and the lighting device, and the ambient light and other factors. Influence, that is, with the relative position between the sensor and the lighting device and the change of the surrounding environment, the brightness difference between the current ambient brightness value and the saved ambient brightness value (the result of the change of the ambient brightness value) and the dimming value The relationship between them is not fixed, so the dimming value carried by the dimming command sent to the lighting device for the first time is preset.

在一应用场景中,根据亮度差值更新保存的调光值的步骤,包括:若亮度差值的绝对值小于调节步进,则增大保存的调光值;若亮度差值的绝对值等于调节步进,则保持保存的调光值不变;若亮度差值的绝对值大于调节步进,则减小保存的调光值。In an application scenario, the step of updating the stored dimming value according to the brightness difference value includes: if the absolute value of the brightness difference value is smaller than the adjustment step, increasing the stored dimming value; if the absolute value of the brightness difference value is equal to Adjust the step, keep the saved dimming value unchanged; if the absolute value of the brightness difference is greater than the adjustment step, reduce the saved dimming value.

具体地,调节步进表征光照设备根据调光指令每调一次亮度,所期待环境亮度的改变值。其中,在增大或减小调光值时,可以增加或减小一固定值。Specifically, the adjustment step represents the change value of the expected ambient brightness each time the lighting device adjusts the brightness according to the dimming instruction. Wherein, when increasing or decreasing the dimming value, a fixed value can be increased or decreased.

其中,在接收到触发指令时,计算当前的环境亮度值与目标亮度值的亮度差值的绝对值;根据亮度差值的绝对值确定调节步进。Wherein, when the trigger instruction is received, the absolute value of the brightness difference between the current ambient brightness value and the target brightness value is calculated; the adjustment step is determined according to the absolute value of the brightness difference.

其中,根据亮度差值的绝对值确定调节步进的步骤,包括:计算亮度差值的绝对值与获取的调光时间的倒数的乘积;将乘积作为调节步进。The step of determining the adjustment step according to the absolute value of the brightness difference value includes: calculating the product of the absolute value of the brightness difference value and the acquired inverse of the dimming time; and using the product as the adjustment step.

具体地,调光时间由用户输入,调节步进Det=|(T_V-S_V)|/T,其中,T_V表示接收到触发指令时,获取的当前的环境亮度值,S_V表示目标亮度值,T表示调光时间。Specifically, the dimming time is input by the user, and the adjustment step is Det=|(T_V-S_V)|/T, where T_V represents the current ambient brightness value obtained when the trigger command is received, S_V represents the target brightness value, and T Indicates the dimming time.

在其他应用场景中,调节步进的计算公式还可以为:Det=|(T_V-S_V)|/N,其中,T_V表示接收到触发指令时,获取的当前的环境亮度值,S_V表示目标亮度值,N表示调光次数,同样地,调光次数N也可以由用户输入。In other application scenarios, the calculation formula for adjusting the step can also be: Det=|(T_V-S_V)|/N, where T_V represents the current ambient brightness value obtained when the trigger command is received, and S_V represents the target brightness value, N represents the number of dimming times, and similarly, the number of dimming times N can also be input by the user.

在另一应用场景中,根据亮度差值更新保存的调光值的步骤,包括:若亮度差值的绝对值小于第一数值,则将保存的调光值与第一调整值叠加,并以叠加后的结果更新保存的调光值;若亮度差值的绝对值不小于第一数值但小于第二数值,则将保存的调光值与第二调整值叠加,并以叠加后的结果更新保存的调光值,其中,第一数值、第二数值均小于调节步进,且第一数值小于第二数值,第一调整值大于第二调整值,且第一调整值、第二调整值均大于零;若亮度差值的绝对值不小于第二数值但小于或等于调节步进,则保持保存的调光值不变;若亮度差值的绝对值大于调节步进,则减小保存的调光值。In another application scenario, the step of updating the stored dimming value according to the brightness difference value includes: if the absolute value of the brightness difference value is smaller than the first value, superimposing the stored dimming value and the first adjustment value, and using The stored dimming value is updated with the superimposed result; if the absolute value of the luminance difference is not less than the first value but less than the second value, the saved dimming value and the second adjustment value are superimposed, and updated with the superimposed result The saved dimming value, where the first value and the second value are both smaller than the adjustment step, the first value is smaller than the second value, the first adjustment value is greater than the second adjustment value, and the first adjustment value and the second adjustment value are are greater than zero; if the absolute value of the brightness difference is not less than the second value but less than or equal to the adjustment step, keep the saved dimming value unchanged; if the absolute value of the brightness difference is greater than the adjustment step, reduce the saving dimming value.

其中,第一数值为调节步进的三分之一,第二数值为调节步进的三分之二,或者,第一数值为调节步进的四分之一,第二数值为调节步进的四分之三,只要第一数值、第二数值均小于调节步进,且第一数值小于第二数值即可,在此不做具体限制。其中为了便于说明,以下均以第一数值为调节步进的三分之一,第二数值为调节步进的三分之二进行说明。Wherein, the first value is one third of the adjustment step, the second value is two thirds of the adjustment step, or the first value is one quarter of the adjustment step, and the second value is the adjustment step 3/4 of , as long as the first value and the second value are both smaller than the adjustment step, and the first value is smaller than the second value, no specific limitation is made here. For the convenience of description, the first value is taken as one-third of the adjustment step, and the second value is taken as two-thirds of the adjustment step.

具体地,当亮度差值的绝对值小于三分之一的Det时,说明调光值的强度不够,设置调光值A1=A1+B1(A1为调光值,B1为第一调整值,即将保存的调光值与第一调整值叠加,并以叠加后的结果更新调光值),当亮度差值的绝对值大于或等于三分之一的Det但小于三分之二的Det时,说明调光虽然有效果,但是未能达到预期效果,设置调光值A1=A1+B2(B2为第二调整值,即将保存的调光值与第二调整值叠加,并以叠加后的结果更新调光值),当亮度差值的绝对值大于或等于三分之二的Det但小于或等于Det时,说明调光效果较好,设置A1=A1(即保持调光值不变),当亮度差值的绝对值大于调节步进时,说明调光效果过猛,设置A1=A1-B3(B3为第三调整值,第三调整值大于零,即减小保存的调光值)。Specifically, when the absolute value of the luminance difference value is less than one third of Det, it means that the intensity of the dimming value is insufficient, and the dimming value is set to A1=A1+B1 (A1 is the dimming value, B1 is the first adjustment value, The dimming value to be saved is superimposed with the first adjustment value, and the dimming value is updated with the superimposed result), when the absolute value of the brightness difference value is greater than or equal to one-third of Det but less than two-thirds of Det , indicating that although the dimming has an effect, it fails to achieve the expected effect. Set the dimming value A1=A1+B2 (B2 is the second adjustment value, and the saved dimming value and the second adjustment value are superimposed, and the superimposed value is used. The result updates the dimming value), when the absolute value of the brightness difference value is greater than or equal to two-thirds of Det but less than or equal to Det, it means that the dimming effect is better, set A1=A1 (that is, keep the dimming value unchanged) , when the absolute value of the brightness difference is greater than the adjustment step, it means that the dimming effect is too strong, set A1=A1-B3 (B3 is the third adjustment value, the third adjustment value is greater than zero, that is, reduce the saved dimming value ).

在一应用场景中,在将保存的调光值与第一调整值叠加,并以叠加后的结果更新保存的调光值之后,还包括:判断保存的调光值与第一调整值叠加后的结果是否小于调光阈值;若判断结果为是,则以叠加后的结果更新保存的调光值;若判断结果为否,则发出提示信息。In an application scenario, after superimposing the saved dimming value and the first adjustment value, and updating the saved dimming value with the superimposed result, the method further includes: judging that the saved dimming value is superimposed with the first adjustment value. Whether the result of dimming is less than the dimming threshold; if the judgment result is yes, the saved dimming value is updated with the superimposed result; if the judgment result is no, a prompt message is issued.

具体地,若保存的调光值与第一调整值叠加后的结果大于或等于调光阈值,则说明叠加后的结果已经到达调光上限,此时可能存在光照设备或传感器的位置安装不正确,或者存在异常光源干扰等情况,则提醒用户。Specifically, if the result of the superposition of the saved dimming value and the first adjustment value is greater than or equal to the dimming threshold, it means that the superimposed result has reached the upper limit of dimming, and the lighting equipment or sensor may be installed incorrectly at this time. , or there is abnormal light source interference, etc., the user will be reminded.

以上对如何更新保存的调光值进行了详细说明,下面再次参阅图1,对步骤S160之后的步骤进行详细说明。The above has described in detail how to update the saved dimming value. Next, referring to FIG. 1 again, the steps after step S160 will be described in detail.

S170:以当前的环境亮度值更新保存的环境亮度值。S170: Update the saved ambient brightness value with the current ambient brightness value.

具体地,将当前的环境亮度值进行保存,以便下一次进行调光值的更新。Specifically, the current ambient brightness value is saved so that the dimming value can be updated next time.

然后在执行完步骤S170之后,返回执行步骤S120。Then, after performing step S170, return to performing step S120.

S180:结束流程。S180: End the process.

从上述内容可以看出,本实施方式中的调光方法在对光照设备进行调光后,会根据调光的结果更新调光值,即根据反馈结果更新调光值,调光值并不是一成不变的,同时调光值也无需根据环境亮度值的变化结果设置,从而对采集环境亮度值的传感器和光照设备之间的相对位置、所处环境没有任何要求,即本申请中的调光方法不仅能够缩短调光时间、提高调光效果,还能适用于任何应用场景。It can be seen from the above that the dimming method in this embodiment will update the dimming value according to the dimming result after dimming the lighting device, that is, update the dimming value according to the feedback result, and the dimming value is not static At the same time, the dimming value does not need to be set according to the change result of the ambient brightness value, so there is no requirement for the relative position and environment between the sensor that collects the ambient brightness value and the lighting device, that is, the dimming method in this application not only It can shorten the dimming time, improve the dimming effect, and can be applied to any application scenarios.

同时本实施方式中的光照设备还能与诸如手机、电脑等远程终端进行通信,用户可以通过远程终端控制光照设备的开与关、亮度、色温等。At the same time, the lighting device in this embodiment can also communicate with a remote terminal such as a mobile phone and a computer, and the user can control the on and off, brightness, color temperature, etc. of the lighting device through the remote terminal.

参阅图4,图4是本申请调光设备一实施方式的结构示意图。该调光设备200包括处理器210、存储器220以及通信电路230,处理器210分别耦接存储器220、通信电路230,存储器220中存储有程序数据,处理器210通过执行存储器220内的程序数据以实现上述任一项实施方式调光方法中的步骤,其中详细的步骤可参见上述实施方式,在此不再赘述。Referring to FIG. 4 , FIG. 4 is a schematic structural diagram of an embodiment of the dimming device of the present application. The dimming device 200 includes a processor 210 , a memory 220 and a communication circuit 230 . The processor 210 is respectively coupled to the memory 220 and the communication circuit 230 . The memory 220 stores program data. The processor 210 executes the program data in the memory 220 to The steps in the dimming method in any one of the above embodiments are implemented, and the detailed steps can be found in the above embodiments, which will not be repeated here.

参阅图5,图5是本申请计算机存储介质一实施方式的结构示意图。该计算机存储介质300存储有计算机程序310,计算机程序310能够被处理器执行以实现上述任一项方法中的步骤。Referring to FIG. 5, FIG. 5 is a schematic structural diagram of an embodiment of the computer storage medium of the present application. The computer storage medium 300 stores a computer program 310, and the computer program 310 can be executed by a processor to implement the steps in any one of the above methods.

其中,计算机存储介质300具体可以为U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等可以存储计算机程序310的装置,或者也可以为存储有该计算机程序310的服务器,该服务器可将存储的计算机程序310发送给其他设备运行,或者也可以自运行该存储的计算机程序310。The computer storage medium 300 may specifically be a device that can store the computer program 310, such as a USB flash drive, a removable hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disk. , or can also be a server that stores the computer program 310 , the server can send the stored computer program 310 to other devices to run, or can also run the stored computer program 310 by itself.

以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above description is only an embodiment of the present application, and is not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied to other related technologies Fields are similarly included within the scope of patent protection of this application.

Claims (8)

1. A method of dimming, the method comprising:
when the dimming equipment receives a trigger instruction, acquiring and storing a current environment brightness value;
judging whether the brightness difference value between the current environment brightness value and the target brightness value is within a preset range;
if the judgment result is negative, obtaining the stored dimming value, and determining the dimming direction according to the current environment brightness value and the target brightness value;
sending a dimming instruction to illumination equipment which establishes communication connection, wherein the dimming instruction carries the dimming direction and the dimming value;
after the preset time for sending the dimming instruction, acquiring a current environment brightness value;
calculating the brightness difference value between the current environment brightness value and the stored environment brightness value, and updating the stored dimming value according to the brightness difference value;
updating the stored ambient brightness value with the current ambient brightness value;
returning to the step of judging whether the brightness difference value between the current environment brightness value and the target brightness value is within a preset range;
wherein the step of updating the stored dimming value according to the brightness difference value comprises: if the absolute value of the brightness difference value is smaller than a first numerical value, the saved dimming value is superposed with a first adjustment value, and the saved dimming value is updated according to the superposed result; if the absolute value of the brightness difference value is not less than the first numerical value but less than a second numerical value, superposing the saved dimming value and a second adjustment value, and updating the saved dimming value according to a superposed result, wherein the first numerical value and the second numerical value are both less than an adjustment step, the first numerical value is less than the second numerical value, the first adjustment value is greater than the second adjustment value, and the first adjustment value and the second adjustment value are both greater than zero; if the absolute value of the brightness difference value is not less than the second value but less than or equal to the adjustment step, keeping the saved dimming value unchanged; if the absolute value of the brightness difference is larger than the adjustment step, reducing the saved dimming value;
wherein the adjustment step represents a change value of the expected ambient brightness of the illumination device according to the dimming instruction every time the brightness is adjusted.
2. The method of claim 1, wherein the step of sending dimming instructions to the illumination device that establishes the communication connection comprises:
and sending the dimming instruction carrying the communication identifier which can be identified by the illumination equipment to the illumination equipment which establishes the communication connection.
3. The method of claim 1, wherein the step of superimposing the saved dimming value with the first adjustment value and updating the saved dimming value with the superimposed result further comprises:
judging whether the result of the stored dimming value and the first adjustment value after superposition is smaller than a dimming threshold value or not;
if the judgment result is yes, updating the stored dimming value according to the superposed result;
if the judgment result is negative, sending out prompt information.
4. The method of claim 1, wherein the first value is one-third of the adjustment step and the second value is two-thirds of the adjustment step.
5. The method of claim 1, further comprising:
when the trigger instruction is received, calculating the absolute value of the brightness difference value between the current environment brightness value and the target brightness value;
and determining the adjustment step according to the absolute value of the brightness difference.
6. The method of claim 5, wherein the step of determining the adjustment step based on the absolute value of the brightness difference comprises:
calculating the product of the absolute value of the brightness difference and the reciprocal of the obtained dimming time;
taking said product as said adjustment step.
7. Dimming device, characterized in that the dimming device comprises a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, the processor implements the steps of the method according to any one of claims 1-6 by executing the program data in the memory.
8. A computer storage medium, characterized in that the computer storage medium stores a computer program executable by a processor to implement the steps in the method according to any of claims 1-6.
CN202210682151.4A 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium Active CN115119365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210682151.4A CN115119365B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210682151.4A CN115119365B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium
CN202110172180.1A CN112888116B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110172180.1A Division CN112888116B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium

Publications (2)

Publication Number Publication Date
CN115119365A true CN115119365A (en) 2022-09-27
CN115119365B CN115119365B (en) 2025-01-07

Family

ID=76056142

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210682151.4A Active CN115119365B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium
CN202110172180.1A Active CN112888116B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202110172180.1A Active CN112888116B (en) 2021-02-08 2021-02-08 Dimming method, dimming device and computer storage medium

Country Status (1)

Country Link
CN (2) CN115119365B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113597065B (en) * 2021-07-23 2023-05-26 北京字节跳动网络技术有限公司 Desk lamp adjusting method and device and electronic equipment
CN114327141B (en) * 2021-12-29 2023-06-30 深圳市华星光电半导体显示技术有限公司 Data processing method, device, display panel and storage medium
CN114531397B (en) * 2022-01-12 2024-12-03 深圳绿米联创科技有限公司 Environmental data detection and processing method, device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102548113A (en) * 2010-12-20 2012-07-04 财团法人工业技术研究院 Dimming scale adjustment device and dimming method for driving light emitting unit
US20150116192A1 (en) * 2012-05-11 2015-04-30 Nippon Seiki Co., Ltd. Display device and control method for same
CN104915166A (en) * 2015-03-20 2015-09-16 联想(北京)有限公司 Information processing method and electronic equipment
CN110996468A (en) * 2019-12-27 2020-04-10 科大讯飞股份有限公司 Dimming method and device, dimming system and storage medium
CN111243532A (en) * 2020-01-16 2020-06-05 聚好看科技股份有限公司 A backlight control method and display device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI455646B (en) * 2008-02-05 2014-10-01 Richtek Technology Corp Current regulator and its control method
US10210816B2 (en) * 2014-09-22 2019-02-19 Nec Display Solutions, Ltd. Image display apparatus and method for dimming light source
WO2018126546A1 (en) * 2017-01-03 2018-07-12 华为技术有限公司 Method for controlling temperature, and terminal device and apparatus
CN107124790A (en) * 2017-05-11 2017-09-01 河海大学 A kind of tunnel illumination Energy-saving Fuzzy Control System based on neutral net
CN108449856A (en) * 2018-05-29 2018-08-24 陕西大航联科电子技术有限公司 Intelligent lamp and intelligent lamp control system
CN109890113A (en) * 2019-04-03 2019-06-14 深圳迈睿智能科技有限公司 Sensitive control device and without stroboscopic sensitive illuminance lamps and lanterns and photosensitive method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102548113A (en) * 2010-12-20 2012-07-04 财团法人工业技术研究院 Dimming scale adjustment device and dimming method for driving light emitting unit
US20150116192A1 (en) * 2012-05-11 2015-04-30 Nippon Seiki Co., Ltd. Display device and control method for same
CN104915166A (en) * 2015-03-20 2015-09-16 联想(北京)有限公司 Information processing method and electronic equipment
CN110996468A (en) * 2019-12-27 2020-04-10 科大讯飞股份有限公司 Dimming method and device, dimming system and storage medium
CN111243532A (en) * 2020-01-16 2020-06-05 聚好看科技股份有限公司 A backlight control method and display device

Also Published As

Publication number Publication date
CN115119365B (en) 2025-01-07
CN112888116A (en) 2021-06-01
CN112888116B (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN112888116B (en) Dimming method, dimming device and computer storage medium
CN103327148B (en) Based on implementation method and the mobile terminal of the brightness of mobile terminal adjustment screen backlight
CN107134273B (en) Brightness compensation method and device and terminal
CN107340952A (en) A kind of method and device that lamp is controlled by mobile terminal synchronization
CN105376905A (en) Smart lighting equipment control method and device
CN114364106B (en) Light control method and device, storage medium and terminal equipment
CN105825833B (en) A kind of luminance regulating method and terminal
CN110913538A (en) Desk lamp control method, system and device, desk lamp and desk lamp controller
CN110794773A (en) Click-type scene creating method and device
CN114449704A (en) Light control method, system, electronic equipment and computer readable storage device
CN111885796A (en) Light source brightness self-adaptive control method and system
CN104619082B (en) Brightness adjusting method, LED light device and illuminator
CN111867215A (en) Lighting control data scheduling method, system, communication control panel and storage medium
CN114513888B (en) Bus-based microwave sensor group control method, computer device and computer-readable storage medium
CN113271705B (en) Automatic setting method and device of lamp control strategy, server and storage medium
CN212367598U (en) Light source brightness self-adaptive control system
WO2022111302A1 (en) Intelligent lamp, lighting method therefor, and method for transferring, loading and applying lamp state model
CN107068025B (en) Mobile terminal and display screen positive and negative voltage output control method based on mobile terminal
CN207039973U (en) An intelligent light tube
WO2024060254A1 (en) System and method for controlling lamp device, lamp device, and storage medium
CN113597046B (en) Lamp control method, system, device, lamp controller and storage medium
CN114554662A (en) Dimming method of dimmer
CN114398057B (en) FPGA program upgrading method and device
CN106774783B (en) Energy-saving control method and server
CN114554667B (en) Grouping control method for lighting lamps

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant