Disclosure of Invention
The invention aims to provide a method, a system, a control end and a lamp holder end for adjusting the light brightness, which are used for realizing accurate remote control of the light brightness.
In order to solve the technical problems, the invention provides the following scheme:
a method for adjusting the brightness of lamp light is applied to a system comprising a control end and a lamp head end, wherein the control end and the lamp head end are connected through a network and are time-synchronized, and the method comprises the following steps:
a, a control end sends a starting signal for adjusting the brightness of light to a lamp holder end;
b, the lamp holder end adjusts the brightness of the lighting equipment controlled by the lamp holder end according to the received starting signal;
c, the control end marks a first time stamp on the stop signal and then sends the stop signal to the lamp holder end;
d, stopping the brightness scheduling of the lighting equipment after the lamp holder end receives the stop signal;
and E, the lamp holder end determines the brightness of the lighting equipment at the moment corresponding to the first time stamp according to the first time stamp in the stop signal, and adjusts the brightness of the lighting equipment back according to the determined brightness.
The method of the present invention, wherein,
in the step D, the lamp holder end further records a second receiving moment when the stop signal is received;
in the step E, the lamp holder further determines the brightness of the lighting device at the time corresponding to the first timestamp according to the second receiving time, the brightness of the lighting device corresponding to the second receiving time, and the first adjusting mode.
The method of the present invention, wherein,
in the step A, the control end also stamps a second time stamp on the starting signal;
in the step B, the lamp holder end also records a second time stamp in the received starting signal;
in the step D, the lamp holder further determines whether the time corresponding to the second timestamp is before the second receiving time, if so, the process is ended, otherwise, step E is executed.
In the step E, the adjusting the brightness of the lighting device according to the determined brightness includes: and adjusting the brightness jump of the lighting equipment to the brightness of the lighting equipment at the moment corresponding to the first timestamp, or gradually adjusting the brightness of the lighting equipment to the brightness of the lighting equipment at the moment corresponding to the first timestamp according to a preset second adjusting mode.
The method of the invention also carries out time synchronization operation when the time of the control end and the time of the lamp holder end are not synchronous, and/or periodically carries out time synchronization operation on the control end and the lamp holder end.
The present invention also provides a lamp cap terminal, comprising:
a second synchronization unit for implementing time synchronization with an external device through a network;
the signal receiving unit is used for receiving a starting signal from the external equipment through a network, receiving a stopping signal from the external equipment and acquiring a first time stamp in the stopping signal;
the brightness adjusting unit is used for adjusting the brightness of the lighting equipment controlled by the brightness adjusting unit according to the starting signal received by the signal receiving unit; and stopping the brightness adjustment of the lighting equipment according to the stop signal received by the signal receiving unit;
and the brightness callback unit is used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first timestamp in the stop signal and carrying out callback on the brightness of the lighting equipment according to the determined brightness.
The lamp holder end of the invention is characterized in that,
the signal receiving unit is further configured to record a first receiving time when the start signal is received;
and the brightness callback unit is further used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first receiving moment, the brightness of the lighting equipment corresponding to the first receiving moment and a preset first adjusting mode.
The lamp holder end of the invention is characterized in that,
the signal receiving unit is further configured to record a second receiving time when the stop signal is received;
and the brightness callback unit is further used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the second receiving moment, the brightness of the lighting equipment corresponding to the second receiving moment and a preset first adjusting mode.
The lamp holder end of the invention also comprises a judging unit;
the signal receiving unit is further used for recording a second time stamp in the received starting signal;
and the judging unit is used for judging whether the corresponding moment of the second timestamp is before the second receiving moment, and if so, triggering the brightness callback unit.
Finally, the invention also provides a system for adjusting the light brightness, which comprises a control end and a lamp head end, wherein the control end and the lamp head end are connected through a network and are time-synchronized;
the control end is used for sending a starting signal for adjusting the brightness of the lamplight and a stopping signal with a first timestamp to the lamp holder end;
the lamp holder end is used for adjusting the brightness of the lighting equipment controlled by the lamp holder end according to the received starting signal; and after receiving the stop signal, stopping brightness scheduling of the lighting equipment, determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first timestamp in the stop signal, and adjusting the brightness of the lighting equipment according to the determined brightness.
From the above, according to the method, the system, the control end and the lamp head end for adjusting the light brightness provided by the invention, the stop signal with the timestamp is sent by the control end, and the lamp head end in time synchronization with the control end performs call back according to the brightness of the lighting equipment at the moment corresponding to the timestamp, so that relatively accurate remote control of the light brightness is realized. Meanwhile, the invention also compares the receiving time of the stop signal with the corresponding time of the starting signal timestamp at the lamp holder end, and does not adjust back the light brightness when the time synchronization error between the control end and the lamp holder end is larger, thereby further improving the accuracy of brightness control.
Detailed Description
The invention provides a method, a system, a control end and a lamp holder end for adjusting the brightness of light. The present invention will be described in detail below with reference to specific embodiments in conjunction with the accompanying drawings.
In the method for adjusting the brightness of the lamplight, the control end and the lamp holder end are connected through a network and are time-synchronized, and the method specifically comprises the following steps:
step 101, the control end sends a start signal to the lamp end through the network, where the start signal includes the adjustment type information, i.e. increasing or decreasing the brightness.
The control terminal may generate the start signal according to the operation of the user, or may generate the start signal according to other settings (e.g., timeout of a timer or other conditions).
And 102, receiving the starting signal and recording the receiving time a by the lamp holder. Here, the reception time a is a system time of the lamp terminal when the activation signal is received.
And 103, reading the adjustment type information carried in the starting signal by the lamp holder end, and correspondingly adjusting the brightness of the lighting equipment controlled by the lamp holder end according to a preset first adjustment mode. Here, the specific first adjustment manner may include linear adjustment or adjustment according to another preset function, and the like.
And 104, the control end stamps a time stamp on the stop signal and then sends the stop signal to the lamp end through the network, and the time corresponding to the time stamp is assumed to be the system time b of the control end.
Here, similar to the start signal, the stop signal may be generated by the control terminal according to the operation of the user, or may be generated according to another setting.
And 105, stopping the brightness adjustment of the lighting equipment after the lamp holder end receives the stop signal.
And 106, the lamp holder end acquires the timestamp information carried in the stop signal, and determines that the time corresponding to the timestamp is the system time b of the control end. .
And step 107, reading the system time a and the brightness p corresponding to the time a by the lamp holder end, and determining the brightness y corresponding to the system time b according to a preset first adjusting mode.
For example, when the preset first adjustment method is linear adjustment, the brightness y corresponding to the time b can be calculated by the formula (1):
y=k(b-a)+p (1)
where k is the adjustment rate of the linear adjustment.
In a specific implementation, the base end may not record the time a in step 102, but record the brightness q corresponding to the system time c and the time c when the base end receives the stop signal in step 105, in this case, if the adjustment manner of linear adjustment is still adopted, the brightness y corresponding to the time b may also be obtained by formula (2):
y=q-k(c-b) (2)
in a specific implementation, the brightness corresponding to the time b may also be determined by using other methods different from the formulas (1) and (2), for example, the lamp cap end may record the brightness of the lighting device at each time in the brightness adjustment process, and then search the brightness corresponding to the time b in the record.
And step 108, the lamp holder end performs proper adjustment on the brightness of the lighting equipment according to the brightness corresponding to the moment b.
Here, the adjustment back may be a jump type, that is, the brightness of the lighting device is directly adjusted to the brightness corresponding to the time b in a jump manner, or may be slowly adjusted back according to a preset second adjustment mode, and the brightness of the lighting device is gradually adjusted to the brightness corresponding to the time b. The second adjustment method may be the same as the first adjustment method in step 103, or may be another adjustment method different from the first adjustment method.
In a specific implementation, the lamp cap end and/or the control end can store the current specific adjustment amount, so that each adjustment can be performed from the last stored brightness; the lamp head end and the control end do not need to store the current specific adjustment amount, and each adjustment is started from the adjustment amount of 0, in this case, the adjustment type does not need to be included in the starting signal, and the lamp head end starts to increase the brightness of the lighting equipment after receiving the starting signal.
The above embodiment describes the brightness adjustment method of the present invention, and it can be seen that, according to the brightness of the lighting device at the time corresponding to the timestamp in the stop signal, the lamp head end in the present invention performs callback on the lamp head end that has undergone the adjustment, thereby accurately implementing remote control of the light brightness.
The invention is realized on the basis of time synchronization between the control end and the lamp holder end. The synchronization process of the control end and the lamp head end can be periodically time synchronization operation, and the time synchronization operation can also be triggered when the time offset between the control end and the lamp head end reaches a certain threshold. The specific method of time synchronization operation may employ a time synchronization technique of the related art.
Because the control end and the lamp holder end are used for timing based on the clocks of the control end and the lamp holder end, and the clocks of the control end and the lamp holder end are not consistent, a large time synchronization error may occur between the control end and the lamp holder end after a long time, and for the situation, another embodiment of the method for adjusting the brightness of the lamp light is processed according to the following steps:
step 201, the control end sends a starting signal to the lamp end through the network, the starting signal includes an adjustment type, the starting signal is stamped with a timestamp, and the time corresponding to the timestamp is assumed to be the system time m of the control end.
And 202, receiving the starting signal by the lamp head end, and recording the receiving time and the time stamp information in the receiving time.
And step 203, reading the adjustment type information carried in the starting signal by the lamp holder end, and correspondingly adjusting the brightness of the lighting equipment controlled by the lamp holder end according to a preset adjustment mode.
And step 204, the control end stamps a time stamp on the stop signal and sends the stop signal to the lamp head end through the network.
And step 205, after the lamp holder end receives the stop signal, recording the receiving time n, and stopping the brightness adjustment of the lighting device.
And step 206, the lamp holder end judges whether the time n of receiving the stop signal is after the time m corresponding to the time stamp of the received start signal, if so, step 207 is executed, otherwise, the process is ended.
Here, through step 206, it is avoided that the control error is too large due to too large time synchronization error between the control terminal and the lamp head terminal. For example, the control end sends the start signal to the lamp end at the time 6:12:14, sends the stop signal to the lamp end at the time 6:12:18, and the lamp end receives the stop signal at the time 6:12:12, so that the lamp end can determine that the receiving time 6:12:12 of the stop signal is before the time 6:12:14 corresponding to the time stamp of the start signal, and the lamp end and the control end are obviously not synchronized, and if the brightness of the lighting device is controlled according to 6:12:18, the error is quite huge, so in this case, no callback is performed after the brightness adjustment is stopped by receiving the stop signal, so as to avoid generating larger error.
Therefore, time synchronization between the control end and the lamp head end is very important, and in specific implementation, the time synchronization operation can be performed on the control end and the lamp head end periodically, or after the control end and the lamp head end are determined and known to be out of synchronization through step 206 each time.
And step 207, determining a corresponding adjustment quantity by the lamp holder end according to the time stamp carried in the stop signal, and appropriately adjusting the brightness of the lighting equipment.
Through the embodiment, under the condition that a large synchronization time error exists between the control end and the lamp holder end, the influence of the synchronization error on the brightness of the lamp light is avoided, and the accuracy of brightness control is further improved.
Based on the method for adjusting the light brightness in the embodiment, the invention further provides a system for adjusting the light brightness, as shown in fig. 2, which is a schematic structural diagram of the system for adjusting the light brightness in the embodiment of the invention, the system includes a control end and more than one lamp head end, and the control end and the lamp head end are connected through a network and are time-synchronized; wherein,
the control end is used for sending a starting signal for adjusting the brightness of the lamplight and a stopping signal with a first timestamp to the lamp holder end;
the lamp holder end is used for adjusting the brightness of the lighting equipment controlled by the lamp holder end according to the received starting signal; and after receiving the stop signal, stopping brightness scheduling of the lighting equipment, determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first timestamp in the stop signal, and adjusting the brightness of the lighting equipment according to the determined brightness. Here, the lamp head end can adjust the brightness of the lighting device controlled by the lamp head end according to a preset first adjusting mode, and adjust the brightness of the lighting device back according to a preset second adjusting mode. The first adjustment mode may be a linear adjustment mode or an adjustment according to another preset function, and the second adjustment mode may be the same as the first adjustment mode or another adjustment mode different from the first adjustment mode.
Here, as shown in fig. 2, the control end may specifically include:
a first synchronization unit for implementing time synchronization with an external device through a network;
and the signal sending unit is used for sending a starting signal for adjusting the brightness of the lamp light and a stopping signal with a first time stamp to the external equipment through a network. The signal sending unit is further used for stamping a second time stamp in the starting signal sent by the signal sending unit.
Here, the clock of the control terminal may be provided in the first synchronization unit, and the signal transmission unit may timestamp the signal transmitted by the first synchronization unit with time stamp information according to the time corresponding to the clock in the first synchronization unit when the signal is transmitted.
Here, as shown in fig. 2, the base end may specifically include:
a second synchronization unit for implementing time synchronization with an external device through a network;
the signal receiving unit is used for receiving a starting signal from the external equipment through a network, receiving a stopping signal from the external equipment and acquiring a first time stamp in the stopping signal;
the brightness adjusting unit is used for adjusting the brightness of the lighting equipment controlled by the brightness adjusting unit according to the starting signal received by the signal receiving unit; and stopping the brightness adjustment of the lighting equipment according to the stop signal received by the signal receiving unit; the brightness adjusting unit may be further configured to increase or decrease the brightness of the lighting device according to a preset first adjusting manner. The first adjustment may be a linear adjustment or an adjustment according to another predetermined function.
And the brightness callback unit is used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first timestamp in the stop signal and carrying out callback on the brightness of the lighting equipment according to the determined brightness. Here, the brightness adjusting unit may be a jump-type, that is, directly adjust the brightness jump of the lighting device to the brightness of the lighting device at the time corresponding to the first timestamp, or may slowly adjust the brightness jump according to a preset second adjusting manner. The second adjustment mode may be the same as the first adjustment mode, or may be another adjustment mode different from the first adjustment mode.
Specifically, the signal receiving unit may be further configured to record a first receiving time when the start signal is received; and the brightness callback unit is further used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the first receiving moment, the brightness of the lighting equipment corresponding to the first receiving moment and a preset adjusting mode.
Specifically, the signal receiving unit may be further configured to record a second receiving time when the stop signal is received; and the brightness callback unit is further used for determining the brightness of the lighting equipment at the moment corresponding to the first timestamp according to the second receiving moment, the brightness of the lighting equipment corresponding to the second receiving moment and a preset adjusting mode.
Here, a base-side clock may be provided in the second synchronization unit, and the signal reception unit records the timing of receiving the signal according to the clock in the second synchronization unit when receiving the signal.
Here, a determination unit may be further added to the lamp head end. The signal receiving unit is further used for recording a second time stamp in the received starting signal; and the judging unit is used for judging whether the time corresponding to the second timestamp is before the second receiving time, and if so, triggering the brightness callback unit. Therefore, when the time synchronization error between the lamp head end and the control end is large, the brightness of the current lighting equipment is not adjusted back, and the accuracy of brightness control is ensured.
In summary, according to the method, the system, the control end and the lamp head end for adjusting the light brightness in the embodiments of the present invention, the control end sends the stop signal with the timestamp, and the lamp head end time-synchronized with the control end performs the call back according to the brightness of the lighting device at the time corresponding to the timestamp, so that the relatively accurate remote control of the light brightness is realized.
The method, system, control terminal and burner terminal for dimming of lights according to the present invention are not limited to the applications listed in the description and the embodiments, are fully applicable to a variety of fields suitable for the present invention, and additional advantages and modifications will readily occur to those skilled in the art, such that the invention is not limited to the specific details, the representative devices and illustrative examples shown and described herein, without departing from the spirit and scope of the general concept as defined by the appended claims and their equivalents.