CN114047689B - Lighting equipment control method and device, lighting equipment and storage medium - Google Patents

Lighting equipment control method and device, lighting equipment and storage medium Download PDF

Info

Publication number
CN114047689B
CN114047689B CN202111359919.6A CN202111359919A CN114047689B CN 114047689 B CN114047689 B CN 114047689B CN 202111359919 A CN202111359919 A CN 202111359919A CN 114047689 B CN114047689 B CN 114047689B
Authority
CN
China
Prior art keywords
time
control instruction
instruction
lighting device
synchronization
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.)
Active
Application number
CN202111359919.6A
Other languages
Chinese (zh)
Other versions
CN114047689A (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.)
Earda Technologies Co ltd
Original Assignee
Earda Technologies 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 Earda Technologies Co ltd filed Critical Earda Technologies Co ltd
Priority to CN202111359919.6A priority Critical patent/CN114047689B/en
Publication of CN114047689A publication Critical patent/CN114047689A/en
Application granted granted Critical
Publication of CN114047689B publication Critical patent/CN114047689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/26Setting the time according to the time information carried or implied by the radio signal the radio signal being a near-field communication signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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
    • 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/16Controlling the light source by timing means
    • 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/175Controlling the light source by remote control
    • H05B47/19Controlling the light source by remote control via wireless transmission
    • 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

Abstract

The embodiment of the invention discloses a method and a device for controlling lighting equipment, the lighting equipment and a storage medium, which are used for controlling the lighting equipment in a Bluetooth Mesh network and comprise the following steps: the method comprises the steps that a first lighting device receives a control instruction containing time information, wherein the control instruction is an instruction sent by a gateway and/or a second lighting device which receives the control instruction; setting a time achievement condition for executing the control instruction according to the time information; executing the control instruction when the time achievement condition is achieved. According to the embodiment of the invention, the time information is carried in the control instruction, so that the lighting equipment in the Bluetooth Mesh network sets the time achievement condition for executing the control instruction through the time information, and the lighting equipment in the Bluetooth Mesh network synchronously executes the control instruction when the time achievement condition is achieved, thereby realizing synchronous control of the lighting equipment and synchronous change of the light of the lighting equipment.

Description

Lighting equipment control method and device, lighting equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of smart home, in particular to a lighting device control method and device, a lighting device and a storage medium.
Background
In commercial lighting, all lighting devices in an area often need to be controlled simultaneously, so that a bluetooth Mesh wireless networking scheme is adopted, specifically, all lighting devices in a specified area subscribe to the same group address, and then control instructions are sent to the group address, so that all lamps receive the same instruction, and further, simultaneous control is realized.
The bluetooth Mesh is an information transfer mechanism based on "flooding", when the lighting devices in an area are far apart, a control instruction cannot be sent to all the lighting devices at one time, and the control instruction needs to be forwarded by the middle lighting device for multiple times to cover all the lighting devices, however, a certain time interval Δ t (about 20ms is needed for one jump) is needed from sending to receiving of the control instruction, which inevitably causes a time difference between the lighting devices in the same area receiving the control instruction, and the more times the control instruction is transferred, the larger the time difference is, the lighting devices in one area execute the control instruction at different times, and finally, the phenomenon that the light change of each lighting device in one area is not synchronous is caused.
Disclosure of Invention
The embodiment of the invention provides a lighting device control method and device, a lighting device and a storage medium, which aim to solve the problem that lighting changes of the lighting device in a Bluetooth Mesh network are not synchronous.
In a first aspect, an embodiment of the present invention provides a lighting device control method, configured to control a lighting device in a bluetooth Mesh network, including:
the method comprises the steps that a first lighting device receives a control instruction containing time information, wherein the control instruction is an instruction sent by a gateway and/or a second lighting device which receives the control instruction;
setting a time achievement condition for executing the control instruction according to the time information;
executing the control instruction when the time achievement condition is achieved.
Optionally, before the first lighting device receives the control instruction containing the time information, the method further includes:
the first lighting device receives a synchronization instruction containing a synchronization time;
and modifying a clock according to the synchronous time in the synchronous instruction.
Optionally, the step of modifying the clock according to the synchronization time in the synchronization instruction includes:
taking the time after the preset time interval with the synchronous time as target time;
modifying the time of the clock to the target time;
when the forwarding times are greater than 1, modifying the synchronization time in the synchronization instruction to be the target time, and subtracting 1 from the forwarding times in the synchronization instruction;
the modified synchronization instruction is sent to a third lighting device.
Optionally, the time information is preset time for executing the control instruction, and the setting of the time achievement condition for executing the control instruction according to the time information includes:
setting the time achievement conditions for executing the control instruction as follows: the current time is the preset time;
the executing the control instruction when the time achievement condition is achieved comprises:
acquiring current time;
and executing the control instruction when the current time is the preset time.
Optionally, the control instruction further includes a number of times of forwarding the control instruction, and after the first lighting device receives the control instruction including the time information, the method further includes:
when the forwarding times are larger than 1, subtracting 1 from the forwarding times in the control instruction;
and sending the control instruction obtained by subtracting 1 from the forwarding number to a third lighting device.
Optionally, the time information is a delay duration, and the setting of the time achievement condition for executing the control instruction according to the time information includes:
calculating the difference value between the delay time length and a preset time length as a target delay time length;
the time achieving condition for executing the control instruction is set as follows: the total time length after the control instruction is received is equal to the target delay time length;
the executing the control instruction when the time achievement condition is achieved comprises:
counting the total time length after receiving the control instruction;
executing the control instruction when the total duration is equal to the target delay duration.
Optionally, the control instruction further includes a number of times of forwarding the control instruction, and after the time achievement condition for executing the control instruction is set according to the time information, the method further includes:
when the forwarding times are larger than 1, subtracting 1 from the forwarding times in the control instruction, and modifying the delay time length into the target delay time length;
sending the modified control instruction to a third lighting device.
In a second aspect, an embodiment of the present invention provides an illumination device control apparatus, configured to control an illumination device in a bluetooth Mesh network, including:
the control instruction receiving module is used for receiving a control instruction containing time information by the first lighting equipment, wherein the control instruction is an instruction sent by the gateway and/or the second lighting equipment which has received the control instruction;
the execution condition setting module is used for setting a time achievement condition for executing the control instruction according to the time information;
and the control instruction execution module is used for executing the control instruction when the time achievement condition is achieved.
Optionally, the method further comprises:
a synchronization instruction receiving module, configured to receive, by the first lighting device, a synchronization instruction including a synchronization time;
and the clock synchronization module is used for modifying a clock according to the synchronization time in the synchronization instruction.
Optionally, the clock synchronization module includes:
the target time determining submodule is used for taking the time after the preset time interval with the synchronous time as the target time;
the clock synchronization submodule is used for modifying the time of the clock into the target time;
a forwarding number modification submodule, configured to modify the synchronization time in the synchronization instruction to be the target time when the forwarding number is greater than 1, and subtract 1 from the forwarding number in the synchronization instruction;
and the synchronization instruction forwarding sub-module is used for sending the modified synchronization instruction to the third lighting equipment.
Optionally, the time information is preset time for executing the control instruction, and the execution condition setting module includes:
the first condition setting submodule is used for setting the time achievement conditions for executing the control command as follows: the current time is the preset time;
the control instruction execution module comprises:
the current time obtaining submodule is used for obtaining current time;
and the first control instruction execution submodule is used for executing the control instruction when the current time is the preset time.
Optionally, the control instruction further includes a number of forwarding times of the control instruction, and further includes:
a first forwarding number resetting module, configured to subtract 1 from the forwarding number in the control instruction when the forwarding number is greater than 1;
and the first control instruction forwarding module is used for sending the control instruction obtained by subtracting 1 from the forwarding times to the third lighting equipment.
Optionally, the time information is a delay duration, and the execution condition setting module includes:
the target delay time length calculation submodule is used for calculating the difference value between the delay time length and the preset time length as the target delay time length;
a second condition setting submodule, configured to set a time achievement condition for executing the control instruction to: the total time length after the control instruction is received is equal to the target delay time length;
the control instruction execution module comprises:
the total duration counting submodule is used for counting the total duration after the control instruction is received;
and the second control instruction execution submodule is used for executing the control instruction when the total time length is equal to the target delay time length.
Optionally, the control instruction further includes a number of forwarding times of the control instruction, and further includes:
a second forwarding number resetting module, configured to subtract 1 from the forwarding number in the control instruction and modify the delay duration to the target delay duration when the forwarding number is greater than 1;
and the second control instruction forwarding module is used for sending the modified control instruction to a third lighting device.
In a third aspect, an embodiment of the present invention provides an illumination apparatus, including:
one or more processors;
a storage device to store one or more computer programs,
when executed by the one or more processors, cause the one or more processors to implement the lighting device control method of the first aspect of the invention.
In a fourth aspect, the embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the lighting device control method according to the first aspect of the present invention.
The lighting equipment control method is used for controlling lighting equipment in a Bluetooth Mesh network, the first lighting equipment receives a control instruction containing time information, the control instruction is an instruction sent by a gateway and/or second lighting equipment which has received the control instruction, a time achievement condition for executing the control instruction is further set according to the time information, and the control instruction is executed when the time achievement condition is achieved.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for controlling a lighting device according to an embodiment of the present invention;
fig. 2A is a flowchart illustrating steps of a method for controlling a lighting device according to a second embodiment of the present invention;
fig. 2B is a schematic diagram of the communication of lighting devices in a bluetooth Mesh network according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of a method for controlling a lighting device according to a third embodiment of the present invention;
fig. 4 is a block diagram of a lighting device control apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an illumination device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of steps of a lighting device control method according to an embodiment of the present invention, where the method is applicable to a case of controlling a lighting device in a bluetooth Mesh network, and the method may be executed by a lighting device control apparatus according to an embodiment of the present invention, where the lighting device control apparatus may be implemented by hardware or software and integrated in the lighting device according to an embodiment of the present invention, and specifically, as shown in fig. 1, the lighting device control method according to an embodiment of the present invention may include the following steps:
s101, the first lighting device receives a control instruction containing time information, wherein the control instruction is an instruction sent by the gateway and/or the second lighting device which has received the control instruction.
In the embodiment of the present invention, the lighting device has a bluetooth communication function, and the plurality of lighting devices can be networked into a bluetooth Mesh network.
In practical application, a multicast technology may be adopted in the bluetooth Mesh network, that is, a group address is set for a plurality of lighting devices in a certain area, and when all lighting devices in the area need to be controlled, a control instruction may be sent to the group address, and the control instruction is received by the plurality of lighting devices of the group address to perform control, for example, the plurality of lighting devices of a certain floor may be set with the same group address, or the plurality of lighting devices of a certain conference room may be set with the same group address.
The control instruction may be an instruction for adjusting the brightness of the lighting device, such as adjusting the brightness up or down, or may be an instruction for adjusting the color of the lighting device, or may be an instruction for adjusting the display mode of the lighting device, such as adjusting the lighting device to blink or light up in a specified manner.
The control instruction may be broadcasted to the bluetooth Mesh network through a gateway, for example, the mobile APP connects to the gateway, after operating on the mobile APP, a control instruction is generated and sent to the gateway or a designated lighting device, and the control instruction is broadcasted to the bluetooth Mesh network through the gateway or the designated lighting device, the lighting device in the bluetooth Mesh network that receives the control instruction is a first lighting device, for the first lighting device, the received control instruction may also be broadcasted by other lighting devices, for example, after receiving the control instruction, the other lighting devices forward the control instruction, the control instruction may also be received by the first lighting device, and then the other lighting devices are second lighting devices.
In the embodiment of the present invention, the control instruction may carry time information, where the time information is used to instruct the lighting device that receives the control instruction to synchronously execute the control instruction according to the time information. In one example, the time information may be a specific certain time for instructing all the lighting devices in the bluetooth Mesh network to synchronously execute the control instruction at the time, in another example, the time information may also be a delay duration set after the gateway or the mobile phone APP sends the control instruction, and each lighting device may calculate, after receiving the control instruction, a target delay duration according to the delay duration in the control instruction, where the target delay duration is used to instruct the lighting device to execute the control instruction after receiving the control instruction and starting to delay the target delay duration.
S102, setting a time achievement condition for executing the control command according to the time information.
Specifically, after receiving the control instruction, the first lighting device may set a time achievement condition for executing the control instruction according to the time information in the control instruction, and in one example, when the time information is a preset time, the first lighting device may set the achievement condition as: the current time is a preset time. In another example, when the time information is the delay time, the first lighting device may set the achievement condition to: delaying the target delay duration after receiving the control command.
S103, executing the control command when the time achievement condition is met.
In one example, if the achievement condition is that the current time is a preset time, the first lighting device acquires the current time and determines whether the current time is the preset time, if so, the control instruction is executed, or if the achievement condition is that the delay duration is a target delay duration, the first lighting device starts a timer after receiving the control instruction, and the first lighting device executes the control instruction when the timing duration of the timer is equal to the target delay duration.
The lighting equipment control method is used for controlling lighting equipment in a Bluetooth Mesh network, the first lighting equipment receives a control instruction containing time information, the control instruction is an instruction sent by a gateway and/or second lighting equipment which has received the control instruction, a time achievement condition for executing the control instruction is further set according to the time information, and the control instruction is executed when the time achievement condition is achieved.
Example two
Fig. 2A is a flowchart illustrating steps of a lighting device control method according to a first embodiment of the present invention, where the first embodiment of the present invention is optimized, and specifically, as shown in fig. 2A, the lighting device control method according to the first embodiment of the present invention may include the following steps:
s201, the first lighting device receives a synchronization instruction including a synchronization time.
In the embodiment of the present invention, the whole bluetooth Mesh network synchronizes clocks of the lighting devices in the bluetooth Mesh network according to a preset period, where the synchronization duration is usually initiated by a gateway or a mobile phone APP, that is, a synchronization instruction is broadcast to the lighting devices in the bluetooth Mesh network through the gateway or the mobile phone APP, and the lighting devices in the bluetooth Mesh network also broadcast the synchronization instruction to other lighting devices after receiving the synchronization instruction to perform clock synchronization, where the lighting device receiving the synchronization instruction is the first lighting device, and the synchronization instruction includes synchronization time.
And S202, modifying the clock according to the synchronous time in the synchronous instruction.
In an alternative embodiment, the time after the preset time interval from the synchronization time may be taken as the target time, and the time of the clock may be modified to the target time. Specifically, the synchronization instruction received by the current lighting device includes the synchronization time of the last lighting device that sent the control instruction, the preset time duration is the time duration that the synchronization instruction has elapsed since the last lighting device sent the synchronization instruction to be received by the current device, and for the current lighting device, the clock of the current lighting device should be modified to the time that is after the synchronization time in the control instruction and is separated from the synchronization time by the preset time duration.
Illustratively, as shown in fig. 2B, the time when gateway a sends the synchronization instruction is 18 00.
In an optional embodiment, the synchronization instruction may carry forwarding times, where the forwarding times are used to calculate the times of forwarding the synchronization instruction by the lighting device, and after receiving the synchronization instruction, when the forwarding times are greater than 1, and after modifying the synchronization time in the synchronization instruction to be the target time, the lighting device simultaneously subtracts 1 from the forwarding times in the synchronization instruction, and sends the modified synchronization instruction to a third lighting device, where the third lighting device may be a lighting device that does not receive the synchronization instruction in the Mesh network. For example, in one example, the number of forwarding times TTL =1 when the lighting device B receives the synchronization instruction, and the lighting device B does not forward the synchronization instruction any more after the lighting device B modifies the time of the clock.
In practical applications, TTL may be set according to the number of lighting devices in the Mesh network, so that the lighting devices in the Mesh network all receive the synchronization instruction.
S203, the first lighting device receives a control command including time information, where the control command is a command sent by the gateway and/or the second lighting device that has received the control command, and the time information is a preset time for executing the control command.
The control instruction may be an instruction for adjusting the brightness of the lighting device, such as adjusting the brightness up or down, or may be an instruction for adjusting the color of the lighting device, or may be an instruction for adjusting the display mode of the lighting device, such as adjusting the lighting device to blink or light up in a specified manner.
The control instruction may be broadcast to the bluetooth Mesh network through the gateway, where the lighting device in the bluetooth Mesh network that receives the control instruction is the first lighting device, and for the first lighting device, the received control instruction may also be broadcast by other lighting devices, for example, after receiving the control instruction, the other lighting devices forward the control instruction, and the control instruction may also be received by the first lighting device, and then the other lighting devices are the second lighting devices. It should be noted that, after receiving the synchronization instruction sent by the second lighting device, the first lighting device stores the synchronization instruction, and when receiving the synchronization instruction sent by the second lighting device again, the first lighting device compares the synchronization instruction received later with the stored synchronization instruction, and if the synchronization instruction is the same, does not respond to the synchronization instruction received later.
The control command may carry time information, where the time information is used to instruct the lighting devices in the bluetooth Mesh network that receive the control command to synchronously execute the control command according to the time information. In one example, the time information may be a preset time to execute the control instruction.
In an optional embodiment, the control instruction further includes a number of forwarding times of the control instruction, and after the first lighting device receives the control instruction, when the number of forwarding times is greater than 1, the number of forwarding times in the control instruction is reduced by 1, and the control instruction with the number of forwarding times reduced by 1 is sent to the third lighting device, so that all the lighting devices receive the control instruction.
S204, setting the time achievement condition for executing the control command as follows: the current time is a preset time.
In the embodiment of the invention, when a gateway or a mobile phone APP in a Bluetooth Mesh network is in a Bluetooth Mesh network networking state, the total time length of a control instruction received by all lighting devices in the Bluetooth Mesh network can be obtained, namely, when the Bluetooth Mesh network is in a networking state, the total time length of the control instruction which is sent by the gateway or the mobile phone APP and then received by all the lighting devices can be obtained, the total time length can be stored in the gateway or the mobile phone APP, and when the gateway or the mobile phone APP needs to send the control instruction, the time for executing the control instruction, namely, the preset time can be obtained after the current time is delayed for the total time length. Exemplarily, taking the gateway as an example, the time of the gateway sending the control command is 18: the current time is a preset time.
And S205, acquiring the current time.
Since the clocks of all the lighting devices in the bluetooth Mesh network are synchronized after passing through S201 and S202, and each lighting device sets a time achievement condition for executing the control instruction after receiving the control instruction as follows: the current time is a preset time, and each lighting device can acquire the current time in real time, that is, the time of reading the clock is taken as the current time.
And S206, executing the control command when the current time is the preset time.
And if the current time is the preset time for executing the control instruction, each lighting device executes the control instruction, so that all the lighting devices in the Bluetooth Mesh network can synchronously execute the control instruction at the same preset time.
In the embodiment of the invention, the time information carried by the control instruction is the preset time for executing the control instruction, after each lighting device receives the control instruction, the time achievement condition for executing the control instruction is set to be that the current time is the preset time, and after the lighting device acquires the current time, if the current time is the preset time, the control instruction is executed, so that the preset time synchronous execution control instruction of all lighting devices in the Bluetooth Mesh network is realized, and the lighting devices can be synchronously controlled to synchronously change.
Furthermore, when the lighting equipment receives the synchronization instruction, the clock of the lighting equipment is updated according to the synchronization time and the preset duration in the synchronization instruction, so that the clocks of the lighting equipment in the Bluetooth Mesh network are synchronized, and the accuracy of synchronously controlling the lighting equipment is further improved.
EXAMPLE III
Fig. 3 is a flowchart illustrating steps of a lighting device control method according to a third embodiment of the present invention, where the first embodiment of the present invention is optimized, and specifically, the lighting device control method according to the third embodiment of the present invention may include the following steps:
s301, the first lighting device receives a control instruction including time information, where the control instruction is an instruction sent by the gateway and/or the second lighting device that has received the control instruction, and the time information is a delay time.
The control instruction may be an instruction for adjusting the brightness of the lighting device, such as adjusting the brightness up or down, or may be an instruction for adjusting the color of the lighting device, or may be an instruction for adjusting the display mode of the lighting device, such as adjusting the lighting device to blink or light up in a specified manner.
The control instruction may be broadcast to the bluetooth Mesh network through the gateway, where the lighting device in the bluetooth Mesh network that receives the control instruction is the first lighting device, and for the first lighting device, the received control instruction may also be broadcast by other lighting devices, for example, after receiving the control instruction, the other lighting devices forward the control instruction, and the control instruction may also be received by the first lighting device, and then the other lighting devices are the second lighting devices.
The control command may carry time information, where the time information is used to instruct the lighting devices in the bluetooth Mesh network that receive the control command to synchronously execute the control command according to the time information. In one example, the time information may be a delay time length for executing the control command, that is, the delay time length in the control command sent by the lighting device is after the lighting device receives the control command, and the control command is executed after the delay time length is delayed.
S302, calculating a difference value between the delay time length and a preset time length to be used as a target delay time length.
The preset time period is a time period required for the control command to be transmitted from the second lighting device to the first lighting device, and the time period can be preset and stored in each lighting device. When the first lighting device receives a control instruction sent by the second lighting device, the delay time length in the control instruction is the delay of the second lighting device for executing the control instruction after receiving the control instruction, and then for the first lighting device, the target delay time length for executing the control instruction is the difference value between the delay time length of the second lighting device and the preset time length.
For example, as shown in fig. 2B, after the gateway a receives the control instruction, the delay time is set to Δ T, that is, when the delay time Δ T is after the gateway a sends the control instruction, all the lighting devices B, C, D, E in the bluetooth Mesh network execute the control instruction at the same time, when the lighting devices B and C receive the control instruction sent by the gateway a, the control instruction carries the delay time Δ T, and since the control instruction is sent by the gateway a to the lighting devices B and C, the preset time Δ T is required, the lighting devices B and C should execute the control instruction after the delay time Δ T- Δ T, the lighting devices B and C generate the control instruction including the delay time Δ T- Δ T and send the control instruction to the lighting device D, when the lighting device D receives the control instruction from the lighting device B or C, since the control instruction is sent by the lighting devices B and C, the preset time Δ T is required, the lighting device D should execute the control instruction after the delay time Δ T-2 Δ T, and so on the basis of the delay time of the last lighting device, each lighting device calculates the target delay after receiving the control instruction.
In another optional embodiment, the control instruction further includes a forwarding number of the control instruction, and the target delay time for each lighting device is Δ T-n Δ T, where Δ T is a delay time set by the gateway or the mobile phone APP, Δ T is a time required for the control instruction to be sent from one lighting device to another lighting device, and n is a forwarding number of the control instruction.
S303, setting the time achievement conditions for executing the control command as follows: the total duration after receiving the control instruction is equal to the target delay duration.
In order to enable the lighting devices in the bluetooth Mesh network to synchronously execute the control command at the same time, after each lighting device calculates the target delay duration, the time achievement condition for executing the control command may be set as follows: the total duration after receiving the control command is equal to the target delay duration.
In an optional embodiment, the control instruction further includes a forwarding number of the control instruction, the forwarding number in the control instruction is decreased by 1 when the forwarding number is greater than 1, the delay duration is modified to the target delay duration, and the modified control instruction is sent to the third lighting device.
And S304, counting the total time length after the control instruction is received.
Specifically, each lighting device receives the control instruction and calculates the target delay time length, a timer may be started to time, and the total time length after the lighting device receives the control instruction may be counted by the timer.
And S305, executing a control instruction when the total time length is equal to the target delay time length.
If the total time length after the lighting equipment receives the control instruction is equal to the target delay time length, the timer is ended, and the lighting equipment is triggered to execute the control instruction, so that all the lighting equipment in the Bluetooth Mesh network can synchronously execute the control instruction at the same time.
In the embodiment of the invention, the time information carried by the control instruction is the delay time for executing the control instruction, each lighting device calculates the target delay time after receiving the control instruction, and sets the time achievement condition for executing the control instruction to be that the total time after receiving the control instruction is equal to the target delay time, counts the total time after receiving the control instruction, and executes the control instruction when the total time is equal to the target delay time, so that all lighting devices in the Bluetooth Mesh network synchronously execute the control instruction after the gateway or the mobile phone APP sends the control instruction and delays the specified time, and the lighting devices can be synchronously controlled and changed.
Furthermore, each lighting device is triggered by setting the delay time length to synchronously execute the control instruction, the clock of each lighting device does not need to be synchronized, the requirement on clock synchronization is low, and the control process is simpler.
Example four
Fig. 4 is a block diagram of a lighting device control apparatus according to a fourth embodiment of the present invention, and as shown in fig. 4, the lighting device control apparatus according to the fourth embodiment of the present invention is used for controlling a lighting device in a bluetooth Mesh network, and may specifically include the following modules:
a control instruction receiving module 401, configured to receive, by a first lighting device, a control instruction including time information, where the control instruction is an instruction sent by a gateway and/or a second lighting device that has received the control instruction;
an execution condition setting module 402, configured to set a time achievement condition for executing the control instruction according to the time information;
a control instruction execution module 403, configured to execute the control instruction when the time achievement condition is achieved.
Optionally, the method further comprises:
a synchronization instruction receiving module, configured to receive, by a first lighting device, a synchronization instruction including synchronization time;
and the clock synchronization module is used for modifying a clock according to the synchronization time in the synchronization instruction.
Optionally, the clock synchronization module includes:
the target time determining submodule is used for taking the time after the preset time interval with the synchronous time as the target time;
the clock synchronization submodule is used for modifying the time of the clock into the target time;
a forwarding number modification submodule, configured to modify the synchronization time in the synchronization instruction to be the target time when the forwarding number is greater than 1, and subtract 1 from the forwarding number in the synchronization instruction;
and the synchronization instruction forwarding sub-module is used for sending the modified synchronization instruction to the third lighting equipment.
Optionally, the time information is a preset time for executing the control instruction, and the execution condition setting module 402 includes:
the first condition setting submodule is used for setting the time achievement conditions for executing the control command as follows: the current time is the preset time;
the control instruction execution module 403 includes:
the current time obtaining submodule is used for obtaining current time;
and the first control instruction execution submodule is used for executing the control instruction when the current time is the preset time.
Optionally, the control instruction further includes a number of forwarding times of the control instruction, and further includes:
a first forwarding number resetting module, configured to subtract 1 from the forwarding number in the control instruction when the forwarding number is greater than 1;
and the first control instruction forwarding module is used for sending the control instruction obtained by subtracting 1 from the forwarding times to the third lighting equipment.
Optionally, the time information is a delay duration, and the executing condition setting module 402 includes:
the target delay time length calculation submodule is used for calculating the difference value between the delay time length and the preset time length as the target delay time length;
a second condition setting submodule, configured to set a time achievement condition for executing the control instruction to: the total time length after the control instruction is received is equal to the target delay time length;
the control instruction execution module 403 includes:
the total duration counting submodule is used for counting the total duration after the control instruction is received;
and the second control instruction execution submodule is used for executing the control instruction when the total time length is equal to the target delay time length.
Optionally, the control instruction further includes a number of forwarding times of the control instruction, and further includes:
a second forwarding number resetting module, configured to subtract 1 from the forwarding number in the control instruction and modify the delay duration to the target delay duration when the forwarding number is greater than 1;
and the second control instruction forwarding module is used for sending the modified control instruction to a third lighting device.
The lighting device control apparatus provided by the embodiment of the present invention is capable of executing the lighting device control method provided by any one of the first to third embodiments of the present invention, and has corresponding functions and advantageous effects of the execution method.
EXAMPLE five
Referring to fig. 5, a schematic structural diagram of a lighting device in one example of the invention is shown. As shown in fig. 5, the lighting device may specifically include: a processor 501, a memory 502 and a communication device 503, the number of the processors 501 in the lighting device may be one or more, and one processor 501 is taken as an example in fig. 5. The number of the memories 502 in the lighting device may be one or more, and one memory 502 is taken as an example in fig. 5. The processor 501, the memory 502 and the communication means 503 of the lighting device may be connected by a bus or other means, for example, in fig. 5.
The memory 502 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the lighting device control method according to any embodiment of the present invention (for example, the control instruction receiving module 401, the execution condition setting module 402, and the control instruction executing module 403 in the lighting device control apparatus described above), and the memory 502 can mainly include a storage program area and a storage data area, where the storage program area can store an application program required by the operating apparatus and at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 502 may further include memory located remotely from processor 501, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication device 503 is used to establish a communication connection with other devices, and may be a bluetooth communication device.
The processor 501 executes various functional applications and data processing of the lighting device by executing software programs, instructions and modules stored in the memory 502, that is, implements the lighting device control method described above.
Specifically, in the embodiment, when the processor 501 executes one or more programs stored in the memory 502, the lighting device control method provided by the embodiment of the present invention is specifically implemented.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the lighting device control method in any embodiment of the present invention.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the lighting device control method provided by any embodiments of the present invention.
It should be noted that, as for the embodiments of the apparatus, the lighting device and the storage medium, since they are basically similar to the embodiments of the method, the description is relatively simple, and in relevant places, reference may be made to the partial description of the embodiments of the method.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a lighting device to execute the lighting device control method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the lighting device control apparatus, the included units and modules are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A lighting device control method for controlling a lighting device in a bluetooth Mesh network, comprising:
the method comprises the steps that a first lighting device receives a control instruction containing time information, wherein the control instruction is an instruction sent by a gateway and/or a second lighting device which receives the control instruction;
setting a time achievement condition for executing the control instruction according to the time information;
executing the control instruction when the time achievement condition is achieved;
the time information comprises a preset time or a delay time for executing the control instruction;
before the first lighting device receives the control instruction containing the time information, the method further comprises the following steps:
the first lighting device receives a synchronization instruction containing a synchronization time; modifying a clock according to the synchronization time in the synchronization instruction;
the synchronization instruction comprises the forwarding times of the synchronization instruction, and the modifying the clock according to the synchronization time in the synchronization instruction comprises the following steps: taking the time after the preset time interval with the synchronous time as target time; modifying the time of the clock to the target time; when the forwarding times are greater than 1, modifying the synchronization time in the synchronization instruction to be the target time, and subtracting 1 from the forwarding times in the synchronization instruction; the modified synchronization instruction is sent to a third lighting device.
2. The method according to claim 1, wherein the time information is a preset time for executing the control command, and the setting of the time achievement condition for executing the control command according to the time information comprises:
setting the time achievement conditions for executing the control instruction as follows: the current time is the preset time;
the executing the control instruction when the time achievement condition is achieved comprises:
acquiring current time;
and executing the control instruction when the current time is the preset time.
3. The method according to any one of claims 1 to 2, wherein the control instruction further includes a number of times of forwarding the control instruction, and after the first lighting apparatus receives the control instruction including time information, the method further includes:
when the forwarding times are larger than 1, subtracting 1 from the forwarding times in the control instruction;
and sending the control instruction obtained by subtracting 1 from the forwarding number to a third lighting device.
4. The lighting device control method according to claim 1, wherein the time information is a delay time period, and the setting of the time achievement condition for executing the control instruction according to the time information includes:
calculating the difference value between the delay time length and a preset time length as a target delay time length;
setting the time achievement conditions for executing the control instruction as follows: the total time length after the control instruction is received is equal to the target delay time length;
the executing the control instruction when the time achievement condition is achieved comprises:
counting the total time length after the control instruction is received;
executing the control instruction when the total duration is equal to the target delay duration.
5. The lighting device control method according to claim 4, wherein the control instruction further includes a number of times of forwarding the control instruction, and after the setting of the time achievement condition for executing the control instruction according to the time information, further includes:
when the forwarding times are larger than 1, subtracting 1 from the forwarding times in the control instruction, and modifying the delay time length into the target delay time length;
sending the modified control instruction to a third lighting device.
6. A lighting device control apparatus for controlling a lighting device in a bluetooth Mesh network, comprising:
the control instruction receiving module is used for receiving a control instruction containing time information by the first lighting equipment, wherein the control instruction is an instruction sent by the gateway and/or the second lighting equipment which has received the control instruction;
the execution condition setting module is used for setting a time achievement condition for executing the control instruction according to the time information; the time information comprises a preset time or a delay time for executing the control instruction;
the control instruction execution module is used for executing the control instruction when the time achievement condition is achieved;
a synchronization instruction receiving module, configured to receive, by the first lighting device, a synchronization instruction including a synchronization time;
the clock synchronization module is used for modifying a clock according to the synchronization time in the synchronization instruction;
the clock synchronization module includes:
the target time determining submodule is used for taking the time after the preset time interval with the synchronous time as the target time;
the clock synchronization submodule is used for modifying the time of the clock into the target time;
a forwarding number modification submodule, configured to modify the synchronization time in the synchronization instruction to be the target time when the forwarding number is greater than 1, and subtract 1 from the forwarding number in the synchronization instruction;
and the synchronization instruction forwarding sub-module is used for sending the modified synchronization instruction to the third lighting equipment.
7. An illumination device, characterized in that the illumination device comprises:
one or more processors;
a storage device to store one or more computer programs,
the one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the lighting device control method of any of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the lighting device control method according to any one of claims 1-5.
CN202111359919.6A 2021-11-17 2021-11-17 Lighting equipment control method and device, lighting equipment and storage medium Active CN114047689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111359919.6A CN114047689B (en) 2021-11-17 2021-11-17 Lighting equipment control method and device, lighting equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111359919.6A CN114047689B (en) 2021-11-17 2021-11-17 Lighting equipment control method and device, lighting equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114047689A CN114047689A (en) 2022-02-15
CN114047689B true CN114047689B (en) 2023-03-24

Family

ID=80209617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111359919.6A Active CN114047689B (en) 2021-11-17 2021-11-17 Lighting equipment control method and device, lighting equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114047689B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348659B (en) * 2022-10-14 2023-01-03 中科物栖(北京)科技有限责任公司 Clock synchronization method and device of wireless Mesh network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204477A (en) * 2015-10-19 2015-12-30 泰凌微电子(上海)有限公司 Synchronization control method in wireless network, wireless network and intelligent household devices
GB201520503D0 (en) * 2015-11-20 2016-01-06 Native Design Ltd Lighting and sound system
CN108347807A (en) * 2017-12-07 2018-07-31 中山市新邦照明电器有限公司 Illumination control method and lamps and lanterns
WO2020114059A1 (en) * 2018-12-06 2020-06-11 杭州海康威视系统技术有限公司 Alarm information sending method, device and electronic equipment
CN111405723A (en) * 2020-02-21 2020-07-10 赛尔富电子有限公司 Synchronous lighting system, time service device, lighting device and synchronous lighting control method
CN113490315A (en) * 2021-01-20 2021-10-08 深圳市智岩科技有限公司 Lighting device control method, lighting device control device, control device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002202389A (en) * 2000-10-31 2002-07-19 Sony Corp Clock information distribution processing system, information distribution device, information distribution system, portable terminal device, information recording medium and information processing method
DE102010041674A1 (en) * 2010-09-29 2012-03-29 Siemens Aktiengesellschaft Time synchronization of network participants
CN111511080A (en) * 2020-04-30 2020-08-07 杭州涂鸦信息技术有限公司 Bluetooth mesh-based illumination control method and related system
CN112616229A (en) * 2020-12-18 2021-04-06 广东智源信达工程有限公司 Intelligent lighting control method, system, device and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204477A (en) * 2015-10-19 2015-12-30 泰凌微电子(上海)有限公司 Synchronization control method in wireless network, wireless network and intelligent household devices
GB201520503D0 (en) * 2015-11-20 2016-01-06 Native Design Ltd Lighting and sound system
CN108347807A (en) * 2017-12-07 2018-07-31 中山市新邦照明电器有限公司 Illumination control method and lamps and lanterns
WO2020114059A1 (en) * 2018-12-06 2020-06-11 杭州海康威视系统技术有限公司 Alarm information sending method, device and electronic equipment
CN111405723A (en) * 2020-02-21 2020-07-10 赛尔富电子有限公司 Synchronous lighting system, time service device, lighting device and synchronous lighting control method
CN113490315A (en) * 2021-01-20 2021-10-08 深圳市智岩科技有限公司 Lighting device control method, lighting device control device, control device and storage medium

Also Published As

Publication number Publication date
CN114047689A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
EP3160199B1 (en) Synchronization control method within wireless network, wireless network and smart home device
US9955505B2 (en) Peer-to-peer communications on restricted channels
US9906935B2 (en) Bluetooth low energy beacon device and advertising method
CN111865736B (en) Equipment control method and device
CN109842508A (en) The method that multiple terminals cooperates, terminal device and multiple terminals cooperative system
CN111147943B (en) Multimedia light linkage playing method and device, computer equipment and storage medium
CN114047689B (en) Lighting equipment control method and device, lighting equipment and storage medium
JP2022524403A (en) Transmission instruction method and equipment
US20210360695A1 (en) Methods, devices, base stations and terminals for transmitting information
US9743421B2 (en) Simultaneous operation of multiple communications protocols
CN107479426B (en) A kind of synchronous performance control system of robot and method
CN111541926A (en) Multimedia file playing method and device, storage medium and electronic device
CN102857315B (en) Master clock service is from the method and system of clock
CN110753313A (en) Data synchronization method and system
US11956877B2 (en) Lighting unit for executing multiple lighting control commands and a method thereof
CN113747473A (en) Ad-hoc network method and ad-hoc network system
CN103796277B (en) Method, system and device for indicating beacon frame sending and sending beacon frame
US20190104467A1 (en) Slotted channel access in communications network
US10742260B2 (en) Synchronizing unicast traffic
CN111511013B (en) Method, electronic device, and computer storage medium for synchronizing control signals
CN109669366B (en) Control method and device
CN113827953A (en) Game control system
CN113541842A (en) Multi-shooting range system time synchronization method and device
CN111856952B (en) Smart home combination control method, device, equipment and medium
CN106982112B (en) Call link switching control method and system based on mobile terminal

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