WO2022027534A1 - Lamp synchronization method and terminal - Google Patents
Lamp synchronization method and terminal Download PDFInfo
- Publication number
- WO2022027534A1 WO2022027534A1 PCT/CN2020/107641 CN2020107641W WO2022027534A1 WO 2022027534 A1 WO2022027534 A1 WO 2022027534A1 CN 2020107641 W CN2020107641 W CN 2020107641W WO 2022027534 A1 WO2022027534 A1 WO 2022027534A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time data
- lamps
- synchronization
- communication range
- time
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
- H04W56/0015—Synchronization between nodes one node acting as a reference for the others
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/16—Controlling the light source by timing means
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Definitions
- the invention relates to the technical field of lamps, and in particular, to a synchronization method and a terminal for lamps.
- warning lights are widely used in road construction, municipal construction and other construction sites.
- the lights emitted by the warning lights remind vehicles and pedestrians to avoid the construction area and prevent safety accidents.
- the synchronous warning light means that multiple warning lights can be turned on and off at the same time, and the warning effect is better and more popular.
- synchronous warning lights such as synchronous flashing lights, synchronous arrow signs, etc.
- Most of the existing synchronization schemes realize synchronization by synchronizing time, and realize the synchronization in combination with wireless communication, such as 2.4G communication, broadcast signal radio clock.
- the broadcast signal radio clock cannot be used in places with weak broadcast signals such as tunnels, indoors, and bridges, so the following mainly focuses on the 2.4G synchronization scheme.
- To synchronize time there must be a time for reference. For example, the world time is based on Greenwich Mean Time.
- the synchronization of warning lights is also similar. The time of one warning light is used as the reference time.
- this warning light is the host, and the time of other warning lights is synchronized to the same time of the host.
- the selection of the existing host is generally determined by the machine number.
- the machine number is the machine number in the boot sequence or the machine number is built in the product, and the largest or the smallest machine number is used as the host.
- a system can only have one host.
- the technical problem to be solved by the present invention is to provide a synchronization method and terminal for lamps, so as to improve the efficiency of deployment and control, and to enhance the rapidity and stability of the entire synchronization system.
- a method for synchronizing lamps comprising the following steps:
- a lamp receives time data of other lamps within a preset communication range
- a lighting synchronization terminal comprising a memory, a processor, and a computer program stored on the memory and running on the processor, the processor implements the following steps when executing the computer program:
- a lamp receives time data of other lamps within a preset communication range
- the invention provides a synchronization method and terminal for lamps, wherein data transmission is no longer point-to-point, but point-to-multipoint transmission in the form of multicast, which increases the efficiency of signal transmission and also increases the stability of the entire system.
- the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host).
- the time data By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host to make the whole system out of synchronization in case of failure of the host.
- the machine number determines the host and its host is unique, and the time data is used to determine the host.
- the synchronization system After synchronization, all machines with the fastest time and the same time value can be the host. Therefore, within the preset communication range, the synchronization system allows two More than one host can work at the same time, and determining the host based on time can also improve the efficiency of synchronization and the stability of the system.
- FIG. 1 is a flow chart of the steps of a synchronization method for a lamp according to the present invention
- FIG. 2 is a flow chart of the specific steps of the synchronization method of the lamp according to the present invention.
- FIG. 3 is a schematic structural diagram of a synchronization terminal of a lamp of the present invention.
- FIG. 4 is a timing diagram of a transmission mode of the lamp of the present invention.
- FIG. 5 is a timing diagram of a receiving mode of the lamp of the present invention.
- FIG. 6 is a flow chart of the overall steps of the synchronization method of the lamp according to the present invention.
- FIG. 7 is a schematic diagram of signal communication between lamps according to the present invention.
- a method for synchronizing lamps includes the following steps:
- a lamp receives time data of other lamps within a preset communication range
- the beneficial effect of the present invention is that: in the method for synchronizing lamps provided by the present invention, data transmission is no longer point-to-point, but point-to-multipoint transmission is adopted in the form of multicast, which increases signal transmission.
- the efficiency also increases the overall system stability.
- the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host).
- the time data determines the host and his host is unique, and the time data is used to determine the host. After synchronization, the fastest (or slowest) time is the host. Determining the host by time can also improve the efficiency of synchronization and the stability of the system.
- step S1 it also includes:
- step S0 Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
- step S1 is also entered. set in.
- the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem.
- step S2 further includes: judging whether the time data of all lamps are equal, and if so, completing the synchronization operation.
- step S1 is specifically as follows: a lighting fixture receives time data of other lighting fixtures within a preset communication range and starts timing to obtain a synchronization duration;
- Step S2 is specifically: comparing the received time data with its own time data, taking the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronizing to the preset time data. Set all lamps within the communication range, and set all lamps whose time value is equal to the reference time data as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are lamps with unequal time data among all lamps, and a synchronization exception message will be sent.
- all lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, and the first cycle and the second cycle are determined by The continuous and alternating operation mode and the sleep mode are formed, and the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
- the present invention also provides a synchronization terminal for lamps, including a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer program When implementing the following steps:
- a lamp receives time data of other lamps within a preset communication range
- the beneficial effects of the present invention are: in the synchronous terminal for lamps provided by the present invention, data transmission is no longer point-to-point, but point-to-multipoint transmission is adopted in the form of multicast, which increases signal transmission. The efficiency also increases the overall system stability.
- the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host).
- the time data determines the host and his host is unique, and the time data is used to determine the host. After synchronization, the fastest time is the host. Determining the host with time can also improve the efficiency of synchronization and the stability of the system.
- processor also implements the following steps when executing the computer program:
- step S0 Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
- step S1 may be directly entered, or the configuration may not be completed after the preset time period is reached (generally, the time data distributed by the external system has not been received), and step S1 may also be entered.
- the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem.
- processor further implements the following steps when executing the computer program:
- processor further implements the following steps when executing the computer program:
- a lamp receives the time data of other lamps within the preset communication range and starts timing to obtain the synchronization duration
- processor further implements the following steps when executing the computer program:
- All lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, the first cycle and the second cycle are both continuous and mutual. Composed of alternate operation modes and sleep modes, the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
- the method for synchronizing a lamp of the present invention is mainly applied to a warning system, wherein the lamp is a warning lamp.
- the lights emitted by the warning lights remind vehicles and pedestrians to avoid the construction area and prevent safety accidents.
- the synchronization method of the lamp of the present invention includes the following steps:
- step S0 Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
- the lamps that are powered on only receive signals within a certain period of time, that is, the time data carried by the clock source set on the lamps is first obtained and configured as its own time data.
- the external system will also synchronize the time data to the lamps that have been powered on (completed power-on). If the configuration is completed, step S1 may be directly entered, or the configuration may not be completed after the preset time period is reached (generally, the time data distributed by the external system has not been received), and step S1 may also be entered.
- the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem.
- a lamp receives time data of other lamps within a preset communication range, and each lamp also sends its own time data to other lamps within its preset communication range;
- step S1 is specifically as follows: a lighting fixture receives time data of other lighting fixtures within the preset communication range and starts timing, obtains the synchronization duration, and sends its own time data; wherein, all lighting fixtures are preset to it in the first cycle Sending time data within the communication range and receiving time data within its preset communication range with a second cycle;
- each warning light not only needs to receive data but also send data, and in order to reduce the power consumption of the 2.4G wireless module, it is very important to reasonably arrange the transmission and reception cycles of the wireless module.
- the receiving or sending mode all the time, so it is set to sleep mode for some time, that is, the state of not running.
- Both the first period and the second period consist of continuous and alternate operation modes and sleep modes, and the duration of the corresponding operation mode in the first period is shorter than the duration of the corresponding operation mode in the second period.
- the high level represents the transmission mode, and the low level represents the sleep mode
- the high level represents the receive mode
- the low level represents the sleep mode
- step S2 is specifically: comparing the received time data with its own time data, and using the fastest time data (or the slowest time data) as the benchmark for all lamps within the preset communication range
- the time data is synchronized to all fixtures within the preset communication range, and all fixtures whose time value is equal to the reference time data are set as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are fixtures with unequal time data among all fixtures. , a synchronization exception message is issued.
- each luminaire receives the time data of other luminaires within its preset communication range, and achieves local synchronization first, and then continues to spread the synchronization through the following methods, and finally achieves synchronization of all luminaires.
- Multicast transmission A point-to-multipoint network connection is implemented between the sender and each receiver. If a sender transmits the same data to multiple receivers at the same time, only one copy of the same data packet is required. It improves the efficiency of data transfer and reduces the possibility of congestion in the backbone network.
- Multicast (English: multicast) refers to the simultaneous delivery of information to a group of destination addresses. It uses a strategy that is most efficient because messages only need to be delivered once on each network link, and messages are replicated only when the link forks. In contrast to multicast, conventional point-to-point delivery is called unicast. When a message is delivered to multiple recipients as unicast, a copy of the data must be sent to each recipient. The resulting redundant copies will result in inefficiencies on the sender side and lack of scalability.
- the unicast is the data of warning light 1, which is transmitted to warning light 2, warning light 2, warning light 3, warning light 3, warning light 4, warning light 4, warning light 5, ..., warning light N- 1 pass warning light N.
- the synchronization data is transmitted from the host to the last slave (that is, the warning light N), and it takes a lot of time for the signal to be transmitted N-1 times, resulting in a long time to complete the complete synchronization of the system. , the larger the number, the longer the synchronization time.
- the multi-host multicast communication mode the time from host 1 to host N is the same, slave 1, slave 2, slave 3, ..., slave N communicate with each other, and the host and slave communicate with each other . If they are all within the communication area, it is possible to achieve all synchronization with only one communication. Even if they are not all delivered in an area, the number of delivery is far less than that of unicast, so the synchronization efficiency is much faster than that of unicast.
- warning lights using the unicast method, if some warning lights fail, the data transmission will be interrupted for a short time, and the entire synchronization system will be out of synchronization for a period of time.
- the way of using multicast is that multiple warning lights send data, and multiple warning lights receive data. Even if any warning light is broken, only its individual data is lost, and the synchronization of other warning lights will not be affected.
- step S2 After the synchronization operation is completed, start timing, and judge in real time whether the reset time T2 is exceeded. If yes, clear the time, return to step S1, and perform the synchronization operation again. If not, continue to judge whether the reset time T2 is exceeded.
- the reset step is mainly that the time signal needs to be transmitted by the wireless communication module, and the smaller the transmission signal, the faster the transmission speed, so the general time data is not very large, and it needs to be reset and synchronized once for a period of time.
- the above reset time T2 is based on the actual use. It is an adjustable parameter set corresponding to the relevant indicators at the time.
- the second embodiment of the present invention is:
- the present invention also provides a synchronization terminal for lamps, comprising a memory 1, a processor 2, and a computer program stored on the memory 1 and running on the processor 2, and the processor 2 executes the computer
- the program implements the following steps:
- a lamp receives time data of other lamps within a preset communication range
- processor also implements the following steps when executing the computer program:
- step S0 Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
- processor further implements the following steps when executing the computer program:
- processor further implements the following steps when executing the computer program:
- a lamp receives the time data of other lamps within the preset communication range and starts timing to obtain the synchronization duration
- processor further implements the following steps when executing the computer program:
- All lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, the first cycle and the second cycle are both continuous and mutual. Composed of alternate operation modes and sleep modes, the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
- the present invention provides a method and terminal for synchronizing lamps, in which data transmission is no longer point-to-point, but point-to-multipoint transmission in the form of multicast, which increases the efficiency of signal transmission and also increases The whole system is stable.
- the selection of the host is no longer based on the machine number, but is determined by the time itself, whoever has the fastest time is the host or who has the slowest time is the host.
- the time data By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host, which will cause the whole system to be out of sync if the host fails.
- the machine number determines the host and its host is unique, and the time data is used to determine the host.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
- Audible And Visible Signals (AREA)
- Alarm Systems (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
本发明涉及灯具技术领域,尤其涉及一种灯具的同步方法及终端。The invention relates to the technical field of lamps, and in particular, to a synchronization method and a terminal for lamps.
警示灯作为灯具的一种,被广泛用于道路施工、市政施工等施工现场,作为警示类的安全用品,通过警示灯发出的灯光提醒车辆和行人避开施工区域,预防发生安全事故。而同步式警示灯,即实现多个警示灯的同亮同灭,警示效果更好而更受大家喜欢。As a kind of lamps, warning lights are widely used in road construction, municipal construction and other construction sites. As a warning safety product, the lights emitted by the warning lights remind vehicles and pedestrians to avoid the construction area and prevent safety accidents. The synchronous warning light means that multiple warning lights can be turned on and off at the same time, and the warning effect is better and more popular.
目前,同步式警示灯的应用已经很多了,如同步的闪眼灯、同步的箭头牌等。现有的同步方案大部分以同步时间来实现同步,并结合无线通讯的方式来实现,如2.4G的通信,广播信号电波钟。不过广播信号电波钟因隧道、室内、桥洞等广播信号弱的地方不能使用的缺点,所以以下主要讲的是2.4G类的同步方案。同步时间,必须要有一个时间做参考,比如世界时间是以格林威治时间做参考。警示灯的同步也类似,以一个警示灯的时间做参考时间,通常这个警示灯为主机,其他警示灯的时间都同步到主机一样的时间。现有的主机选取一般都用机号来决定,其中,机号是采用开机顺序为机号或者在产品内部内置本机机号,以最大的机号或者最小的机号做主机。At present, there are many applications of synchronous warning lights, such as synchronous flashing lights, synchronous arrow signs, etc. Most of the existing synchronization schemes realize synchronization by synchronizing time, and realize the synchronization in combination with wireless communication, such as 2.4G communication, broadcast signal radio clock. However, the broadcast signal radio clock cannot be used in places with weak broadcast signals such as tunnels, indoors, and bridges, so the following mainly focuses on the 2.4G synchronization scheme. To synchronize time, there must be a time for reference. For example, the world time is based on Greenwich Mean Time. The synchronization of warning lights is also similar. The time of one warning light is used as the reference time. Usually, this warning light is the host, and the time of other warning lights is synchronized to the same time of the host. The selection of the existing host is generally determined by the machine number. The machine number is the machine number in the boot sequence or the machine number is built in the product, and the largest or the smallest machine number is used as the host.
然而,以机号选主机有以下缺陷:However, selecting the host by machine number has the following drawbacks:
1、布控时工作量大,需要按机号顺序摆放;1. The workload is heavy during deployment and control, and it needs to be placed in the order of machine numbers;
2、需要很久才能同步,同步效率低;2. It takes a long time to synchronize, and the synchronization efficiency is low;
3、主机或者多台机子出故障时整套系统会出现一段时间的不同步,导致系统不稳定;3. When the host or multiple machines fail, the entire system will be out of sync for a period of time, resulting in system instability;
4、一个系统只能有一个主机。4. A system can only have one host.
本发明所要解决的技术问题是:提供一种灯具的同步方法及终端,以提高布控效率,增强整套同步系统的快速性和稳定性。The technical problem to be solved by the present invention is to provide a synchronization method and terminal for lamps, so as to improve the efficiency of deployment and control, and to enhance the rapidity and stability of the entire synchronization system.
为了解决上述技术问题,本发明采用的一技术方案为:In order to solve the above-mentioned technical problems, a technical scheme adopted in the present invention is:
一种灯具的同步方法,包括以下步骤:A method for synchronizing lamps, comprising the following steps:
S1、一灯具接收预设通信范围内其他灯具的时间数据;S1. A lamp receives time data of other lamps within a preset communication range;
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机。S2. Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronize to the preset communication range All fixtures in it, set all fixtures whose time value is equal to the reference time data as the host.
本发明采用的另一技术方案为:Another technical scheme adopted by the present invention is:
一种灯具的同步终端,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A lighting synchronization terminal, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, the processor implements the following steps when executing the computer program:
S1、一灯具接收预设通信范围内其他灯具的时间数据;S1. A lamp receives time data of other lamps within a preset communication range;
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机。S2. Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronize to the preset communication range All fixtures in it, set all fixtures whose time value is equal to the reference time data as the host.
本发明的有益效果在于:The beneficial effects of the present invention are:
本发明提供的一种灯具的同步方法及终端,其中数据传播不再以点对点传播,而是采用组播的形式以点对多的传播,增加了信号传播的效率同时也增加整套系统稳定性。再则,主机的选取不再以机号做参考,而是以时间自己本身来决定,谁的时间最快谁就是主机(或者谁的时间最慢谁就是主机)。通过时间数据作为主机的判断依据,不会出现使用机号做主机那种万一主机出故障而使整套系统不同步的现象。机号决定主机他的主机是唯一的,而采用时间数据决定主机,同步后所有时间最快且时间值相同的机器都可以是主机,所以,在预设通信范围内本同步系统允许存在有两台以上的主机同时工作,以时间决定主机也可以提高同步的效率和系统的稳定性。The invention provides a synchronization method and terminal for lamps, wherein data transmission is no longer point-to-point, but point-to-multipoint transmission in the form of multicast, which increases the efficiency of signal transmission and also increases the stability of the entire system. In addition, the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host). By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host to make the whole system out of synchronization in case of failure of the host. The machine number determines the host and its host is unique, and the time data is used to determine the host. After synchronization, all machines with the fastest time and the same time value can be the host. Therefore, within the preset communication range, the synchronization system allows two More than one host can work at the same time, and determining the host based on time can also improve the efficiency of synchronization and the stability of the system.
图1为本发明的灯具的同步方法的步骤流程图;FIG. 1 is a flow chart of the steps of a synchronization method for a lamp according to the present invention;
图2为本发明的灯具的同步方法的具体步骤流程图;FIG. 2 is a flow chart of the specific steps of the synchronization method of the lamp according to the present invention;
图3为本发明的灯具的同步终端的结构示意图;3 is a schematic structural diagram of a synchronization terminal of a lamp of the present invention;
图4为本发明的灯具的发送模式时序图;4 is a timing diagram of a transmission mode of the lamp of the present invention;
图5为本发明的灯具的接收模式时序图;FIG. 5 is a timing diagram of a receiving mode of the lamp of the present invention;
图6为本发明的灯具的同步方法的整体步骤流程框图;FIG. 6 is a flow chart of the overall steps of the synchronization method of the lamp according to the present invention;
图7为本发明的各灯具间信号通信示意图;FIG. 7 is a schematic diagram of signal communication between lamps according to the present invention;
标号说明:Label description:
1、存储器;2、处理器。1. Memory; 2. Processor.
为详细说明本发明的技术内容、所实现目的及效果,以下结合实施方式并配合附图予以说明。In order to describe the technical content, achieved objects and effects of the present invention in detail, the following descriptions are given with reference to the embodiments and the accompanying drawings.
请参照图1,本发明提供的一种灯具的同步方法,包括以下步骤:Referring to FIG. 1 , a method for synchronizing lamps provided by the present invention includes the following steps:
S1、一灯具接收预设通信范围内其他灯具的时间数据;S1. A lamp receives time data of other lamps within a preset communication range;
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机。其中最快(或最慢)且时间值相同的机器都可以是主机(即多主机)。S2. Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronize to the preset communication range All fixtures in it, set all fixtures whose time value is equal to the reference time data as the host. The fastest (or slowest) machine with the same time value can be the master (ie, multi-master).
从上述描述可知,本发明的有益效果在于:本发明提供的一种灯具的同步方法,其中数据传播不再以点对点传播,而是采用组播的形式以点对多的传播,增加了信号传播的效率同时也增加整套系统稳定性。再则,主机的选取不再以机号做参考,而是以时间自己本身来决定,谁的时间最快谁就是主机(或者谁的时间最慢谁就是主机)。通过时间数据作为主机的判断依据,不会出现使用机号做主机那种万一主机出故障而使整套系统不同步的现象。机号决定主机他的主机是唯一的,而采用时间数据决定主机,同步后所有时间最快(或最慢)的都是主机,以时间决定主机也可以提高同步的效率和系统的稳定性。As can be seen from the above description, the beneficial effect of the present invention is that: in the method for synchronizing lamps provided by the present invention, data transmission is no longer point-to-point, but point-to-multipoint transmission is adopted in the form of multicast, which increases signal transmission. The efficiency also increases the overall system stability. In addition, the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host). By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host to make the whole system out of synchronization in case of failure of the host. The machine number determines the host and his host is unique, and the time data is used to determine the host. After synchronization, the fastest (or slowest) time is the host. Determining the host by time can also improve the efficiency of synchronization and the stability of the system.
进一步的,步骤S1之前还包括:Further, before step S1, it also includes:
S0、灯具上电后的预设时长内获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据,配置完成或者达到预设时长,进入步骤S1。S0. Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
由上述描述可知,上电后的灯具在一定时间内只接收信号,即为先获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据。同时,外部系统也会将时间数据同步到已经开机(完成上电)的灯具上。其中若配置完成可以直接进入步骤S1,或者达到预设时长还未完成配置(一般是未接收到外部系统分发的时间数据)也进入步骤S1,此处的预设时长大小可以根据系统需要在程序中设定。传统方式经常出现发送数据的灯具在发送数据而接收数据的灯具并不在接收模式,从而导致丢失数据,进而导致开机一般都需要等一段时间才能完成同步,但使用上述步骤S0就能够很好的解决这些问题。It can be seen from the above description that the lamp after being powered on only receives signals within a certain period of time, that is, the time data carried by the clock source set on the lamp is first obtained and configured as its own time data. At the same time, the external system will also synchronize the time data to the lamps that have been powered on (completed power-on). If the configuration is completed, you can directly go to step S1, or if the preset time is reached and the configuration has not been completed (generally, the time data distributed by the external system has not been received), step S1 is also entered. set in. In the traditional way, the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem. these questions.
进一步的,步骤S2还包括:判断所有灯具的时间数据是否均相等,若是,则完成同步操作。Further, step S2 further includes: judging whether the time data of all lamps are equal, and if so, completing the synchronization operation.
由上述描述可知,只有当所有灯具的时间数据均相等,才算完成同步操作。It can be seen from the above description that the synchronization operation is completed only when the time data of all lamps are equal.
进一步的,步骤S1具体为:一灯具接收预设通信范围内其他灯具的时间数据并开始计时,得到同步时长;Further, step S1 is specifically as follows: a lighting fixture receives time data of other lighting fixtures within a preset communication range and starts timing to obtain a synchronization duration;
步骤S2具体为:将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机,若同步时长达到预设同步时长阈值时所有灯具中存在时间数据不相等的灯具,则发出同步异常信息。Step S2 is specifically: comparing the received time data with its own time data, taking the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronizing to the preset time data. Set all lamps within the communication range, and set all lamps whose time value is equal to the reference time data as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are lamps with unequal time data among all lamps, and a synchronization exception message will be sent.
由上述描述可知,若在预设同步时长阈值范围内还未完成同步,则发出同步异常信息,后续再通过重新上电,完成同步操作。As can be seen from the above description, if the synchronization has not been completed within the preset synchronization duration threshold range, a synchronization exception message is sent, and the synchronization operation is completed by powering on again later.
进一步的,步骤S1中的所有灯具以第一周期向其预设通信范围内发送时间数据和以第二周期在其预设通信范围内接收时间数据,所述第一周期和第二周期均由连续且相互交替的运行模式和休眠模式组成,所述第一周期中对应运行模式的时长小于所述第二周期中对应运行模式的时长。Further, all lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, and the first cycle and the second cycle are determined by The continuous and alternating operation mode and the sleep mode are formed, and the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
由上述描述可知,因为灯具的信号既有发送又有接收,且为了节约电量,不可能一直处在接收或者发送的模式,因而设置有些时间是休眠模式,即为不运行的状态。As can be seen from the above description, because the signal of the lamp is both sent and received, and in order to save power, it is impossible to be in the receiving or sending mode all the time, so it is set to sleep mode for some time, that is, it is not running.
参阅图3,本发明还提供的一种灯具的同步终端,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:Referring to FIG. 3, the present invention also provides a synchronization terminal for lamps, including a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer program When implementing the following steps:
S1、一灯具接收预设通信范围内其他灯具的时间数据;S1. A lamp receives time data of other lamps within a preset communication range;
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机。S2. Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronize to the preset communication range All fixtures in it, set all fixtures whose time value is equal to the reference time data as the host.
从上述描述可知,本发明的有益效果在于:本发明提供的一种灯具的同步终端,其中数据传播不再以点对点传播,而是采用组播的形式以点对多的传播,增加了信号传播的效率同时也增加整套系统稳定性。再则,主机的选取不再以机号做参考,而是以时间自己本身来决定,谁的时间最快谁就是主机(或者谁的时间最慢谁就是主机)。通过时间数据作为主机的判断依据,不会出现使用机号做主机那种万一主机出故障而使整套系统不同步的现象。机号决定主机他的主机是唯一的,而采用时间数据决定主机,同步后所有时间最快的都是主机,以时间决定主机也可以提高同步的效率和系统的稳定性。As can be seen from the above description, the beneficial effects of the present invention are: in the synchronous terminal for lamps provided by the present invention, data transmission is no longer point-to-point, but point-to-multipoint transmission is adopted in the form of multicast, which increases signal transmission. The efficiency also increases the overall system stability. In addition, the selection of the host is no longer based on the machine number, but is determined by the time itself. Whoever has the fastest time is the host (or who has the slowest time is the host). By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host to make the whole system out of synchronization in case of failure of the host. The machine number determines the host and his host is unique, and the time data is used to determine the host. After synchronization, the fastest time is the host. Determining the host with time can also improve the efficiency of synchronization and the stability of the system.
进一步的,所述处理器执行所述计算机程序时还实现以下步骤:Further, the processor also implements the following steps when executing the computer program:
S0、灯具上电后的预设时长内获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据,配置完成或者达到预设时长,进入步骤S1。S0. Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
由上述描述可知,上电后的灯具在一定时间内只接收信号,即为先获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据。同时,外部系统也会将时间数据同步到已经开机(完成上电)的灯具上。其中若配置完成可以直接进入步骤S1,或者达到预设时长还未完成配置(一般是未接收到外部系统分发的时间数据)也进入步骤S1。传统方式经常出现发送数据的灯具在发送数据而接收数据的灯具并不在接收模式,从而导致丢失数据,进而导致开机一般都需要等一段时间才能完成同步,但使用上述步骤S0就能够很好的解决这些问题。It can be seen from the above description that the lamp after being powered on only receives signals within a certain period of time, that is, the time data carried by the clock source set on the lamp is first obtained and configured as its own time data. At the same time, the external system will also synchronize the time data to the lamps that have been powered on (completed power-on). If the configuration is completed, step S1 may be directly entered, or the configuration may not be completed after the preset time period is reached (generally, the time data distributed by the external system has not been received), and step S1 may also be entered. In the traditional way, the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem. these questions.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
判断所有灯具的时间数据是否均相等,若是,则完成同步操作。Determine whether the time data of all lamps are equal, and if so, complete the synchronization operation.
由上述描述可知,只有当所有灯具的时间数据均相等,才算完成同步操作。It can be seen from the above description that the synchronization operation is completed only when the time data of all lamps are equal.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
一灯具接收预设通信范围内其他灯具的时间数据并开始计时,得到同步时长;A lamp receives the time data of other lamps within the preset communication range and starts timing to obtain the synchronization duration;
将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据(或者最慢的时间数据)作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机,若同步时长达到预设同步时长阈值时所有灯具中存在时间数据不相等的灯具,则发出同步异常信息。Compare the received time data with its own time data, take the fastest time data (or the slowest time data) as the reference time data for all lamps within the preset communication range and synchronize to the preset communication range For all the fixtures in the system, set all fixtures whose time value is equal to the reference time data as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are fixtures with unequal time data in all fixtures, and a synchronization exception message will be sent.
由上述描述可知,若在预设同步时长阈值范围内还未完成同步,则发出同步异常信息,后续再通过重新上电,完成同步操作。As can be seen from the above description, if the synchronization has not been completed within the preset synchronization duration threshold range, a synchronization exception message is sent, and the synchronization operation is completed by powering on again later.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
步骤S1中的所有灯具以第一周期向其预设通信范围内发送时间数据和以第二周期在其预设通信范围内接收时间数据,所述第一周期和第二周期均由连续且相互交替的运行模式和休眠模式组成,所述第一周期中对应运行模式的时长小于所述第二周期中对应运行模式的时长。All lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, the first cycle and the second cycle are both continuous and mutual. Composed of alternate operation modes and sleep modes, the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
请参照图1、图2、图4至图7,本发明的实施例一为:Please refer to Figure 1, Figure 2, Figure 4 to Figure 7, the first embodiment of the present invention is:
本发明的灯具的同步方法主要应用于警示系统,其中灯具为警示灯。通过警示灯发出的灯光提醒车辆和行人避开施工区域,预防发生安全事故。The method for synchronizing a lamp of the present invention is mainly applied to a warning system, wherein the lamp is a warning lamp. The lights emitted by the warning lights remind vehicles and pedestrians to avoid the construction area and prevent safety accidents.
本发明的灯具的同步方法,包括以下步骤:The synchronization method of the lamp of the present invention includes the following steps:
S0、灯具上电后的预设时长内获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据,配置完成或者达到预设时长,进入步骤S1。S0. Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
在本实例中,上电后的灯具在一定时间内只接收信号,即为先获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据。同时,外部系统也会将时间数据同步到已经开机(完成上电)的灯具上。其中若配置完成可以直接进入步骤S1,或者达到预设时长还未完成配置(一般是未接收到外部系统分发的时间数据)也进入步骤S1。传统方式经常出现发送数据的灯具在发送数据而接收数据的灯具并不在接收模式,从而导致丢失数据,进而导致开机一般都需要等一段时间才能完成同步,但使用上述步骤S0就能够很好的解决这些问题。In this example, the lamps that are powered on only receive signals within a certain period of time, that is, the time data carried by the clock source set on the lamps is first obtained and configured as its own time data. At the same time, the external system will also synchronize the time data to the lamps that have been powered on (completed power-on). If the configuration is completed, step S1 may be directly entered, or the configuration may not be completed after the preset time period is reached (generally, the time data distributed by the external system has not been received), and step S1 may also be entered. In the traditional way, the lamps that send data are often sending data and the lamps that receive data are not in the receiving mode, which leads to data loss, and then it generally takes a period of time to complete the synchronization when powering on, but the above step S0 can be used to solve the problem. these questions.
S1、一灯具接收预设通信范围内其他灯具的时间数据,同时每个灯具也会发送自己的时间数据给在其预设通信范围内其他灯具;S1. A lamp receives time data of other lamps within a preset communication range, and each lamp also sends its own time data to other lamps within its preset communication range;
在本实例中,步骤S1具体为:一灯具接收预设通信范围内其他灯具的时间数据并开始计时,得到同步时长,发送自己的时间数据;其中,所有灯具都以第一周期向其预设通信范围内发送时间数据和以第二周期在其预设通信范围内接收时间数据;In this example, step S1 is specifically as follows: a lighting fixture receives time data of other lighting fixtures within the preset communication range and starts timing, obtains the synchronization duration, and sends its own time data; wherein, all lighting fixtures are preset to it in the first cycle Sending time data within the communication range and receiving time data within its preset communication range with a second cycle;
因每个警示灯不仅需要接收数据还要发送数据,且为了减少2.4G无线模块的耗电,所以合理的安排无线模块的发送和接收周期至关重要。如图4和图5所示,为了节约电量,不可能一直处在接收或者发送的模式,因而设置有些时间是休眠模式,即为不运行的状态。所述第一周期和第二周期均由连续且相互交替的运行模式和休眠模式组成,所述第一周期中对应运行模式的时长小于所述第二周期中对应运行模式的时长。Because each warning light not only needs to receive data but also send data, and in order to reduce the power consumption of the 2.4G wireless module, it is very important to reasonably arrange the transmission and reception cycles of the wireless module. As shown in Figure 4 and Figure 5, in order to save power, it is impossible to be in the receiving or sending mode all the time, so it is set to sleep mode for some time, that is, the state of not running. Both the first period and the second period consist of continuous and alternate operation modes and sleep modes, and the duration of the corresponding operation mode in the first period is shorter than the duration of the corresponding operation mode in the second period.
需要说明的是:在图4中高电平代表发送模式,低电平代表休眠模式;在图5中高电平代表接收模式,低电平代表休眠模式。It should be noted that: in FIG. 4 , the high level represents the transmission mode, and the low level represents the sleep mode; in FIG. 5 , the high level represents the receive mode, and the low level represents the sleep mode.
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据(或者最慢的时间数据)作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机;S2. Compare the received time data with its own time data, take the fastest time data (or the slowest time data) as the reference time data of all lamps within the preset communication range and synchronize to the preset time data For all lamps within the communication range, set all lamps whose time value is equal to the reference time data as the host;
判断所有灯具的时间数据是否均相等,若是,则完成同步操作。Determine whether the time data of all lamps are equal, and if so, complete the synchronization operation.
在本实施例中,步骤S2具体为:将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据(或者最慢的时间数据)作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机,若同步时长达到预设同步时长阈值时所有灯具中存在时间数据不相等的灯具,则发出同步异常信息。In this embodiment, step S2 is specifically: comparing the received time data with its own time data, and using the fastest time data (or the slowest time data) as the benchmark for all lamps within the preset communication range The time data is synchronized to all fixtures within the preset communication range, and all fixtures whose time value is equal to the reference time data are set as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are fixtures with unequal time data among all fixtures. , a synchronization exception message is issued.
实际上,每个灯具分别接收其预设通信范围内其他灯具的时间数据,通过以下方式先实现局部同步,再不断扩散同步,最终实现全部灯具同步。In fact, each luminaire receives the time data of other luminaires within its preset communication range, and achieves local synchronization first, and then continues to spread the synchronization through the following methods, and finally achieves synchronization of all luminaires.
需要说明的是:两个以上的警示灯在同一频道以组播的形式实现时钟数据共享;这里使用组播传输,而非单播。组播(Multicast)传输:在发送者和每一接收者之间实现点对多点网络连接。如果一台发送者同时给多个的接收者传输相同的数据,也只需复制一份的相同数据包。它提高了数据传送效率,减少了骨干网络出现拥塞的可能性。多播(英文:multicast)是指把信息同时传递给一组目的地址。它使用策略是最高效的,因为在消息在每条网络链路上只需传递一次,而且只有在链路分叉的时,消息才会被复制。与多播相比,常规的点到单点的传递被称作单播。当以单播的形式把消息传递给多个接收方时,必须向每个接收者都发送一份数据副本。由此产生的多余副本将导致发送方效率低下,且缺乏可扩展性。It should be noted that: two or more warning lights on the same channel realize clock data sharing in the form of multicast; here, multicast transmission is used instead of unicast. Multicast transmission: A point-to-multipoint network connection is implemented between the sender and each receiver. If a sender transmits the same data to multiple receivers at the same time, only one copy of the same data packet is required. It improves the efficiency of data transfer and reduces the possibility of congestion in the backbone network. Multicast (English: multicast) refers to the simultaneous delivery of information to a group of destination addresses. It uses a strategy that is most efficient because messages only need to be delivered once on each network link, and messages are replicated only when the link forks. In contrast to multicast, conventional point-to-point delivery is called unicast. When a message is delivered to multiple recipients as unicast, a copy of the data must be sent to each recipient. The resulting redundant copies will result in inefficiencies on the sender side and lack of scalability.
使用单播(点对点)和组播(点对多)所得到的系统同步速度如下:The system synchronization speeds obtained using unicast (point-to-point) and multicast (point-to-multiple) are as follows:
假设有N台警示灯,单播是警示灯1的数据传警示灯2,警示灯2传警示灯3,警示灯3传警示灯4,警示灯4传警示灯5,…,警示灯N-1传警示灯N。如果用单播的方式,同步数据从主机开始传送到最后一个子机(即警示灯N),信号传递了N-1次需要占用大量的时间,导致系统完全同步要花费很长的时间才能完成,数量越多,同步时间越长。而如图7所示,多主机组播通讯方式:主机1到主机N时间相同,子机1、子机2、子机3、….、子机N相互通信,主机与子机间相互通信。如果都在通信区域内,可能只需1次通信就实现全部同步。即使不都在一个区域内传递的次数也远小于单播的传递次数,所以同步效率也比单播快很多。Assuming that there are N warning lights, the unicast is the data of warning light 1, which is transmitted to warning light 2, warning light 2, warning light 3, warning light 3, warning light 4, warning light 4, warning light 5, ..., warning light N- 1 pass warning light N. If the unicast method is used, the synchronization data is transmitted from the host to the last slave (that is, the warning light N), and it takes a lot of time for the signal to be transmitted N-1 times, resulting in a long time to complete the complete synchronization of the system. , the larger the number, the longer the synchronization time. As shown in Figure 7, the multi-host multicast communication mode: the time from host 1 to host N is the same, slave 1, slave 2, slave 3, ..., slave N communicate with each other, and the host and slave communicate with each other . If they are all within the communication area, it is possible to achieve all synchronization with only one communication. Even if they are not all delivered in an area, the number of delivery is far less than that of unicast, so the synchronization efficiency is much faster than that of unicast.
使用单播和组播所对应的系统稳定性如下:The system stability corresponding to using unicast and multicast is as follows:
假设有N台警示灯,使用单播的方式,某些警示灯出现故障,数据传输就会出现短暂的中断,整套同步系统会出现一段时间的不同步。而使用组播的方式是多台警示灯发送数据,多台警示灯接收数据,即使哪台警示灯坏了,也只是它个体的数据丢失,不会影响其他警示灯的同步。Suppose there are N warning lights, using the unicast method, if some warning lights fail, the data transmission will be interrupted for a short time, and the entire synchronization system will be out of synchronization for a period of time. The way of using multicast is that multiple warning lights send data, and multiple warning lights receive data. Even if any warning light is broken, only its individual data is lost, and the synchronization of other warning lights will not be affected.
步骤S2之后还包括:S3、同步操作完成后,开始计时,并实时判断是否超过复位时间T2,若是,时间清零,返回步骤S1,重新执行同步操作。若否,则继续判断是否超过复位时间T2。该复位步骤主要是时间信号需要无线通信模块传递,而传递信号越小,传递速度越快,所以一般时间数据不会很大,一段时间就需要复位同步一次,上述的复位时间T2是根据实际使用时的相关指标而对应设置的,其为可调参数。After step S2, it further includes: S3. After the synchronization operation is completed, start timing, and judge in real time whether the reset time T2 is exceeded. If yes, clear the time, return to step S1, and perform the synchronization operation again. If not, continue to judge whether the reset time T2 is exceeded. The reset step is mainly that the time signal needs to be transmitted by the wireless communication module, and the smaller the transmission signal, the faster the transmission speed, so the general time data is not very large, and it needs to be reset and synchronized once for a period of time. The above reset time T2 is based on the actual use. It is an adjustable parameter set corresponding to the relevant indicators at the time.
请参照图3,本发明的实施例二为:Please refer to Fig. 3, the second embodiment of the present invention is:
本发明还提供的一种灯具的同步终端,包括存储器1、处理器2以及存储在所述存储器1上并可在所述处理器2上运行的计算机程序,所述处理器2执行所述计算机程序时实现以下步骤:The present invention also provides a synchronization terminal for lamps, comprising a memory 1, a processor 2, and a computer program stored on the memory 1 and running on the processor 2, and the processor 2 executes the computer The program implements the following steps:
S1、一灯具接收预设通信范围内其他灯具的时间数据;S1. A lamp receives time data of other lamps within a preset communication range;
S2、将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机。S2. Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range and synchronize to the preset communication range All fixtures in it, set all fixtures whose time value is equal to the reference time data as the host.
进一步的,所述处理器执行所述计算机程序时还实现以下步骤:Further, the processor also implements the following steps when executing the computer program:
S0、灯具上电后的预设时长内获取设置在灯具上的时钟源带有的时间数据并配置为自身的时间数据,配置完成或者达到预设时长,进入步骤S1。S0. Acquire the time data carried by the clock source set on the lamp within a preset time period after the lamp is powered on and configure it as its own time data. After the configuration is completed or the preset time period is reached, go to step S1.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
判断所有灯具的时间数据是否均相等,若是,则完成同步操作。Determine whether the time data of all lamps are equal, and if so, complete the synchronization operation.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
一灯具接收预设通信范围内其他灯具的时间数据并开始计时,得到同步时长;A lamp receives the time data of other lamps within the preset communication range and starts timing to obtain the synchronization duration;
将接收到的时间数据分别与自身的时间数据作比较,将最快的时间数据或者最慢的时间数据作为预设通信范围内所有灯具的基准时间数据并同步至所述预设通信范围内所有灯具,将所有时间值等于基准时间数据的灯具均设置为主机,若同步时长达到预设同步时长阈值时所有灯具中存在时间数据不相等的灯具,则发出同步异常信息。Compare the received time data with its own time data, take the fastest time data or the slowest time data as the reference time data of all lamps within the preset communication range, and synchronize to all lamps within the preset communication range. For lamps, set all lamps whose time value is equal to the reference time data as the host. If the synchronization duration reaches the preset synchronization duration threshold, there are lamps with unequal time data among all lamps, and a synchronization exception message will be sent.
进一步的,所述处理器执行所述计算机程序时进一步实现以下步骤:Further, the processor further implements the following steps when executing the computer program:
步骤S1中的所有灯具以第一周期向其预设通信范围内发送时间数据和以第二周期在其预设通信范围内接收时间数据,所述第一周期和第二周期均由连续且相互交替的运行模式和休眠模式组成,所述第一周期中对应运行模式的时长小于所述第二周期中对应运行模式的时长。All lamps in step S1 send time data to their preset communication range with a first cycle and receive time data within their preset communication range with a second cycle, the first cycle and the second cycle are both continuous and mutual. Composed of alternate operation modes and sleep modes, the duration of the corresponding operation mode in the first cycle is shorter than the duration of the corresponding operation mode in the second cycle.
综上所述,本发明提供的一种灯具的同步方法及终端,其中数据传播不再以点对点传播,而是采用组播的形式以点对多的传播,增加了信号传播的效率同时也增加整套系统稳定性。再则,主机的选取不再以机号做参考,而是以时间自己本身来决定,谁的时间最快谁就是主机或者谁的时间最慢谁就是主机。通过时间数据作为主机的判断依据,不会出现使用机号做主机那种万一主机出故障而使整套系统不同步的现象。机号决定主机他的主机是唯一的,而采用时间数据决定主机,同步后所有时间最快且时间值相同的都是主机,基于这个原则,在预设通信范围内允许同时存在两台以上的主机同时工作,以时间决定主机也可以提高同步的效率和系统的稳定性。In summary, the present invention provides a method and terminal for synchronizing lamps, in which data transmission is no longer point-to-point, but point-to-multipoint transmission in the form of multicast, which increases the efficiency of signal transmission and also increases The whole system is stable. In addition, the selection of the host is no longer based on the machine number, but is determined by the time itself, whoever has the fastest time is the host or who has the slowest time is the host. By using the time data as the judgment basis of the host, there will be no phenomenon of using the machine number as the host, which will cause the whole system to be out of sync if the host fails. The machine number determines the host and its host is unique, and the time data is used to determine the host. After synchronization, all the fastest time and the same time value are the host. Based on this principle, more than two devices are allowed to exist at the same time within the preset communication range. The mainframes work at the same time, and determining the mainframe by time can also improve the efficiency of synchronization and the stability of the system.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等同变换,或直接或间接运用在相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only examples of the present invention, and are not intended to limit the scope of the present invention. Any equivalent transformations made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in related technical fields, are similarly included in the within the scope of patent protection of the present invention.
Claims (10)
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202080001577.8A CN112219412A (en) | 2020-08-07 | 2020-08-07 | Lamp synchronization method and terminal |
| PCT/CN2020/107641 WO2022027534A1 (en) | 2020-08-07 | 2020-08-07 | Lamp synchronization method and terminal |
| JP2020558620A JP7266221B2 (en) | 2020-08-07 | 2020-08-07 | Luminaire synchronization method and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/107641 WO2022027534A1 (en) | 2020-08-07 | 2020-08-07 | Lamp synchronization method and terminal |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022027534A1 true WO2022027534A1 (en) | 2022-02-10 |
Family
ID=74067958
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/107641 Ceased WO2022027534A1 (en) | 2020-08-07 | 2020-08-07 | Lamp synchronization method and terminal |
Country Status (3)
| Country | Link |
|---|---|
| JP (1) | JP7266221B2 (en) |
| CN (1) | CN112219412A (en) |
| WO (1) | WO2022027534A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1645766A (en) * | 2004-11-30 | 2005-07-27 | 西安电子科技大学 | Inter-synchronuos method for mobile wireless self-organized network |
| JP2013153400A (en) * | 2011-12-27 | 2013-08-08 | Mitsubishi Electric Corp | Radio communication system, radio communication device, and reference device |
| CN103327601A (en) * | 2012-03-23 | 2013-09-25 | 普天信息技术研究院有限公司 | Method and system achieving broadband colony offline straight communication |
| CN103813437A (en) * | 2012-11-07 | 2014-05-21 | 北京信威通信技术股份有限公司 | Mobile wireless ad hoc network clock synchronization method based on time domain narrow pulse |
| CN111490844A (en) * | 2020-04-24 | 2020-08-04 | 大唐联诚信息系统技术有限公司 | Clock synchronization method and device and electronic equipment |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6873573B2 (en) * | 2001-09-21 | 2005-03-29 | Quartex, Inc. | Wireless synchronous time system |
| NL2005929C2 (en) * | 2010-12-28 | 2012-07-02 | Eldolab Holding Bv | Led driver, lighting device and led based lighting application. |
| CN102355762B (en) * | 2011-06-18 | 2014-02-19 | 光宝电子(广州)有限公司 | LED light automation positioning synchronization method and apparatus thereof |
| JP2016009530A (en) | 2014-06-20 | 2016-01-18 | 東芝ライテック株式会社 | Switch device and lighting system |
| WO2016002130A1 (en) | 2014-06-30 | 2016-01-07 | パナソニックIpマネジメント株式会社 | Image pickup method, image pickup system, terminal device and server |
| CN104244399B (en) * | 2014-09-15 | 2018-04-17 | 歌尔股份有限公司 | The method of time synchronization, wireless device and wireless communication system between wireless device |
| CN106226734A (en) * | 2016-07-15 | 2016-12-14 | 吕斌如 | VLC localization method based on the transmission of visible light time and device |
| CN107819536B (en) * | 2016-09-14 | 2019-03-15 | 北京易方通达科技有限公司 | The method of LED light time synchronization |
| CN108243396B (en) * | 2016-12-27 | 2021-03-23 | 普天信息技术有限公司 | Time synchronization processing method and device |
| JP6846665B2 (en) | 2017-02-15 | 2021-03-24 | パナソニックIpマネジメント株式会社 | lighting equipment |
| CN107196726A (en) * | 2017-07-10 | 2017-09-22 | 吕志勤 | The clock synchronizing method and system of a kind of LED visible light indoor positioning |
| CN110246288A (en) * | 2019-06-17 | 2019-09-17 | 福州通安电子有限公司 | A kind of synchronisation control means of dazzling lamp |
| CN110413565A (en) * | 2019-06-28 | 2019-11-05 | 苏州浪潮智能科技有限公司 | Method, device and medium for synchronizing snapshots of multiple storage devices |
-
2020
- 2020-08-07 JP JP2020558620A patent/JP7266221B2/en active Active
- 2020-08-07 CN CN202080001577.8A patent/CN112219412A/en active Pending
- 2020-08-07 WO PCT/CN2020/107641 patent/WO2022027534A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1645766A (en) * | 2004-11-30 | 2005-07-27 | 西安电子科技大学 | Inter-synchronuos method for mobile wireless self-organized network |
| JP2013153400A (en) * | 2011-12-27 | 2013-08-08 | Mitsubishi Electric Corp | Radio communication system, radio communication device, and reference device |
| CN103327601A (en) * | 2012-03-23 | 2013-09-25 | 普天信息技术研究院有限公司 | Method and system achieving broadband colony offline straight communication |
| CN103813437A (en) * | 2012-11-07 | 2014-05-21 | 北京信威通信技术股份有限公司 | Mobile wireless ad hoc network clock synchronization method based on time domain narrow pulse |
| CN111490844A (en) * | 2020-04-24 | 2020-08-04 | 大唐联诚信息系统技术有限公司 | Clock synchronization method and device and electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022549388A (en) | 2022-11-25 |
| CN112219412A (en) | 2021-01-12 |
| JP7266221B2 (en) | 2023-04-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8492983B1 (en) | System and method to address and control serially connected LEDs | |
| CN103688488B (en) | The method and system of the power save proxy in communication network | |
| US7978717B2 (en) | Systems and methods for reducing power consumption in communication networks | |
| JP4946646B2 (en) | Communication network system and wakeup method for unwakened node | |
| CN100556225C (en) | Systems and methods for lighting control network recovery from primary equipment failure | |
| KR101190864B1 (en) | Asynchronous MAC protocol based sensor node using Wake-Up transceiver and data transmitting/receiving method in the sensor | |
| CN107409433B (en) | Energy efficient BLE mesh initialization and operation | |
| CN103906207A (en) | Wireless sensor network data transmission method based on self-adaptation required awakening technology | |
| EP3578010B1 (en) | Distributed control of a lighting network | |
| CN103476187B (en) | Tunnel LED lighting dimming device and dimming method | |
| WO2012006852A1 (en) | Method, system and clock board for transmitting synchronization status message | |
| US12052644B2 (en) | Method of waking up a mesh node in a wireless mesh network as well as a related mesh node and a computer program product | |
| CN102548146A (en) | Single lamp-based city street lam rapid scene control method, controller and system | |
| WO2022027534A1 (en) | Lamp synchronization method and terminal | |
| WO2020253665A1 (en) | Synchronization control method for flashlights | |
| CN1529469A (en) | Power Conservation Methods for Home Wireless Subnets | |
| CN111586917B (en) | LED lamp string system and control method thereof | |
| CN201252667Y (en) | Lighting system and lighting apparatus controller | |
| CN204681654U (en) | A kind of monitoring of the wisdom illumination LED electricity-saving lamp based on GTiBee technology and control appliance | |
| CN101753241A (en) | Network synchronization method and system | |
| CN213562601U (en) | A building block robot system module based on special mesh network sensor | |
| US10484194B2 (en) | Controlling a plurality of networked building technology devices | |
| CN107396433A (en) | WLAN energy-saving method and STA based on NDN frameworks | |
| CN206894688U (en) | Data output processing system for scene multipoint positioning | |
| CN223415047U (en) | A car taillight circuit based on body communication control |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2020558620 Country of ref document: JP Kind code of ref document: A |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20948289 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20948289 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03/08/2023) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20948289 Country of ref document: EP Kind code of ref document: A1 |