A node light control method and system for landscape lighting

Through the node light control method, the problems of difficult deployment and high maintenance cost of the landscape lighting control system are solved, high versatility and high portability based on the Internet of Things are achieved, the cost is reduced and the playback effect is improved.

CN115065786BActive Publication Date: 2024-08-30SUZHOU XUYAO PHOTO-ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210644478.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2024-08-30
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

Existing landscape lighting control systems have problems such as difficulty in deployment, high maintenance costs, and poor versatility and portability.

Method used

Using the node light control method, the time synchronization thread, DMX512 thread and data routing thread are created by obtaining the operating system startup instruction, performing time synchronization verification and file data verification, and generating blocking thread instructions and startup instructions to ensure that the DMX512 task is waiting for the event bit It receives instructions and performs serial port playback to achieve high versatility and portability based on the Internet of Things.

Benefits of technology

It reduces the cost of landscape lighting control, achieves smooth playback effects, and improves the deployment convenience and maintenance efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115065786B
    Figure CN115065786B
Patent Text Reader

Abstract

The present invention discloses a node light control method and system for landscape lighting, which relates to the relevant field of landscape lighting intelligent control. According to the startup instruction of the operating system, a time synchronization thread, a DMX512 thread and a data routing thread are created; the time synchronization verification result is obtained; the file data verification is performed to obtain the video file data verification result, and when the verification result is passed, a blocking thread instruction is generated, and the video file is updated at the same time; the DMX512 task generated by the DMX512 thread is blocked and placed in a waiting event position; when the time synchronization verification result is a verification pass, a first startup instruction is generated, and when the video file is updated, a second startup instruction is generated; when the first startup instruction and the second startup instruction are received at the same time, serial port playback is performed according to the video file after the update is completed. The present invention solves the technical problems of the prior art in the process of landscape lighting control, such as difficult deployment, high maintenance cost, poor versatility and poor transplantability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field related to intelligent control of landscape lighting, and in particular to a node light control method and system for landscape lighting. Background Art

[0002] With the development of landscape lighting, landscape lighting control systems need to process an increasing amount of data and control the number of LEDs. At this stage, they are mainly divided into offline control and online control. Whether it is an offline control system or an online control system, a large number of data lines need to be deployed when the system is deployed. In complex environmental scenarios, the deployment difficulty and subsequent maintenance costs are greatly increased. How to provide low-cost and easy-to-maintain landscape lighting control while ensuring high versatility and high portability is an urgent problem to be solved.

[0003] In the process of landscape lighting control, the existing technology has technical problems such as difficult deployment, high maintenance cost, poor versatility and poor portability. Summary of the invention

[0004] The present application provides a node lighting control method and system for landscape lighting, thereby solving the technical problems of difficult deployment, high maintenance cost, poor versatility and portability in the prior art during landscape lighting control. Through node lighting control deployment, a technical effect of smooth playback is achieved while reducing costs based on the Internet of Things and ensuring high versatility and high portability through node lighting control.

[0005] In view of the above problems, the present application provides a node light control method and system for landscape lighting.

[0006] In a first aspect, the present application provides a node lighting control method for landscape lighting, the method comprising: obtaining an operating system startup instruction, creating a time synchronization thread, a DMX512 thread and a data routing thread according to the operating system startup instruction; creating a time synchronization task through the time synchronization thread, performing a time synchronization check based on the time synchronization task, and obtaining a time synchronization check result; creating a data routing task through the data routing thread, performing a file data check based on the data routing task, and obtaining a video file data check result; when the video file data check result is a check pass result, generating a blocking thread instruction and updating the video file at the same time; blocking the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and placing the DMX512 task in a waiting event position; when the time synchronization check result is a check pass result, generating a first startup instruction, and when the video file is updated, generating a second startup instruction; when the DMX512 task placed in the waiting event position receives the first startup instruction and the second startup instruction at the same time, serial port playback is performed according to the video file after the update is completed.

[0007] On the other hand, the present application also provides a node lighting control system for landscape lighting, the system comprising: a startup module, the startup module is used to obtain an operating system startup instruction, and create a time synchronization thread, a DMX512 thread and a data routing thread according to the operating system startup instruction; a time synchronization verification module, the time synchronization verification module is used to create a time synchronization task through the time synchronization thread, perform a time synchronization verification based on the time synchronization task, and obtain a time synchronization verification result; a video file verification module, the video file verification module is used to create a data routing task through the data routing thread, perform a file data verification based on the data routing task, and obtain a video file data verification result; a blocking module, the blocking module is used when the When the video file data verification result is a verification pass result, a blocking thread instruction is generated, and the video file is updated at the same time; a task generation module, the task generation module is used to block the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and put the DMX512 task in the waiting event position; an instruction generation module, the instruction generation module is used to generate a first start instruction when the time synchronization verification result is a verification pass, and generate a second start instruction when the video file is updated; a playback module, the playback module is used to perform serial port playback according to the video file after the update is completed when the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time.

[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0009] Due to the adoption of obtaining the operating system startup instruction, creating a time synchronization thread, a DMX512 thread and a data routing thread according to the operating system startup instruction; creating a time synchronization task through the time synchronization thread, performing time synchronization verification based on the time synchronization task, and obtaining the time synchronization verification result; creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining the video file data verification result; when the video file data verification result is a verification pass result, generating a blocking thread instruction, and updating the video file at the same time; blocking the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and placing the DMX512 task in the waiting event position; when the time synchronization verification result is a verification pass, generating a first startup instruction, and when the video file is updated, generating a second startup instruction; when the DMX512 task placed in the waiting event position receives the first startup instruction and the second startup instruction at the same time, serial port playback is performed according to the video file after the update is completed. Based on the Internet of Things, the node lighting control is used to reduce costs and achieve smooth playback on the basis of ensuring high versatility and high portability.

[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic diagram of a flow chart of a node light control method for landscape lighting in this application;

[0012] Figure 2 A schematic diagram of a time verification process of a node light control method for landscape lighting in this application;

[0013] Figure 3 A schematic diagram of a cluster network structure flow of a node light control method for landscape lighting in this application;

[0014] Figure 4 A schematic diagram of the process of cluster head node synchronization of a node light control method for landscape lighting in this application;

[0015] Figure 5 This is a structural schematic diagram of a node lighting control system for landscape lighting in this application.

[0016] Description of the accompanying drawings: starting module 1, time synchronization verification module 2, video file verification module 3, blocking module 4, task generation module 5, instruction generation module 6, playback module 7. DETAILED DESCRIPTION

[0017] The present application solves the technical problems of difficult deployment, high maintenance cost, poor versatility and portability in the prior art during landscape lighting control by providing a node light control method and system for landscape lighting. Through the deployment of node light control, a technical effect based on the Internet of Things is achieved, which reduces costs and realizes smooth playback while ensuring high versatility and high portability. The embodiments of the present application are described below in conjunction with the accompanying drawings. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.

[0018] The terms "comprising" and "having" and any variations thereof throughout the application are intended to cover a non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a list of elements is not necessarily limited to those elements but may include other elements not expressly listed or inherent to such process, method, product, or apparatus.

[0019] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.

[0020] Embodiment 1

[0021] like Figure 1 As shown, the present application provides a node light control method for landscape lighting, the method comprising:

[0022] Step S100: obtaining an operating system startup instruction, and creating a time synchronization thread, a DMX512 thread, and a data routing thread according to the operating system startup instruction;

[0023] Step S200: creating a time synchronization task through the time synchronization thread, performing a time synchronization check based on the time synchronization task, and obtaining a time synchronization check result;

[0024] Specifically, the lighting control node is a node for combined playback of landscape lighting effects control. In order to ensure the universality and compatibility of the interface, each lighting control node uses lamps that support the DMX512 protocol, and the lighting control node needs to have 2.4Ghz wireless communication capabilities and can form a wireless sensor network in a self-organizing manner with other nodes.

[0025] This operating system can be an embedded real-time operating system RT-Thread, which switches threads through the operating system, making the system highly concurrent and real-time. After receiving the operating system startup command and successfully starting the operating system, the lighting control gateway related system will synchronously create three concurrent threads, namely the time synchronization thread, the data routing thread, and the DMX512 thread.

[0026] The time synchronization thread is a thread for solving clock drift to achieve time synchronization of the entire network, generally including time synchronization of cluster head nodes and time synchronization of nodes within the cluster. The data routing thread is a thread that receives broadcast data at each node, identifies the data, and then forwards it. The DMX512 thread is a thread for playback control.

[0027] Furthermore, a time synchronization task is created through the time synchronization thread, and a time synchronization check is performed based on the time synchronization task to obtain a time synchronization check result.

[0028] Further, if Figure 2 As shown, the time synchronization check is performed based on the time synchronization task, and step S200 of the present application also includes:

[0029] Step S210: judging whether it is a synchronization initiating node based on the time synchronization task;

[0030] Step S220: When the node is not a synchronization initiating node, determining whether a time synchronization frame is received;

[0031] Step S230: after receiving the time synchronization frame, determine the node type;

[0032] Step S240: When the node type is a cluster head node, time synchronization is completed through data interaction, and the time synchronization verification result is obtained, and the time synchronization verification result is verification passed.

[0033] Specifically, in the process of time synchronization, the present application gives priority to using an RBS-based method for time synchronization. When the RBS algorithm is applied to the synchronization of a multi-hop sensor network, it is necessary to broadcast messages multiple times and exchange messages between receiving nodes multiple times to achieve time synchronization of the entire network. However, in actual applications, if the number of nodes is large and the coverage area is large, it is not very suitable to use the traditional RBS algorithm for time synchronization at this time. Therefore, when the number of nodes is large and the coverage area of ​​the nodes is relatively wide, the entire sensor network is divided into clusters one by one, and a cluster head is given. As long as each cluster head is synchronized, the cluster head is synchronized with other nodes in the cluster, and finally the time synchronization of the entire network can be achieved.

[0034] When executing the time synchronization thread, the time synchronization task is used to determine whether each task is a synchronization initiating node. If it is a synchronization initiating node, time synchronization is initiated directly. When it is not a synchronization initiating node, it is determined whether the time synchronization task has received a time synchronization frame. If the time synchronization frame is not received, time synchronization is also directly initiated. When a time synchronization frame is received, it is processed according to the node type.

[0035] When receiving the time synchronization frame, and the node type is a cluster head node, time synchronization is completed through data interaction. Take two cluster head nodes as an example, node i is the cluster head node of network domain A, and node j is the cluster head node of network domain B. Figure 3 shown.

[0036] First, node i initiates a synchronization signal and records the time at that moment. Assume that this moment is T i0 , then node j will immediately send back to node i after receiving the synchronization signal. Assume that the time when node i receives the data sent back is T i1 , the time difference is ΔT=T i1 -T i0 According to the analysis in the previous section, ΔT is mainly caused by transmission delay, sending and access delay, and this error is equivalent to the same process twice, so we can assume that the delay of a data packet transmission is Therefore, node i sends the timestamp information to node j again at this time. The timestamp information contains the local time T when node i sent the data packet. i2 After receiving the calculated delay t, node j adds i's local time Ti2 to t to synchronize the two nodes. The main process is as follows Figure 4 By analogy, the time synchronization is performed between node j and its adjacent cluster head nodes, and finally the synchronization of all cluster head nodes is achieved.

[0037] Furthermore, step S230 of the present application also includes:

[0038] Step S231: When the node type is not a cluster head node, the RBS algorithm is used to achieve time synchronization within the cluster, and it is determined whether it is the first synchronization;

[0039] Step S232: when the intra-cluster time synchronization is not the first synchronization, perform time error analysis and calculate the error average value;

[0040] Step S233: performing error compensation for each time tick using the error average value, and completing time synchronization.

[0041] Specifically, time synchronization within the cluster can be performed through the RBS algorithm. A cluster belongs to a network domain and is within the communication range of the cluster head node. Therefore, it is only necessary to calibrate the time in all cluster heads, and then have one node set a standard time for time synchronization within the cluster. When this time reference is reached, all cluster head nodes will send beacon packets by broadcasting, so that the time of the nodes in the cluster is synchronized. Because all cluster heads send beacon packets at the same time, time synchronization of the entire network can be achieved.

[0042] Due to the different hardware and environment of the nodes, the crystal oscillator of the nodes is affected, causing the error to increase over time. Therefore, time synchronization achieved by optimization algorithms alone can only meet temporary needs but cannot be maintained for a long time. Therefore, it is necessary to correct the time on this basis to reduce the error.

[0043] The essence of time correction is to compensate for the local time of the node. For example, node i is the cluster head node of network domain A, and node j is the cluster head node of network domain B. The two nodes have been synchronized after the steps in the previous section. After a period of time Tt, the two nodes exchanged timestamp information and obtained a time error of σt1 between the two nodes. Then, they were synchronized again through the time synchronization algorithm. After another period of time Tt, the two nodes obtained a time error of σt2. It is approximately considered that σt1 = σt2. On this basis, if the two nodes have an error σt after a period of time Tt, then an error of σt will also be generated in the next same period of time Tt. That is, assuming that time synchronization has been performed once before, and then after a period of time Tt, node i in Tt m At this moment, the timestamp information is sent to j again. If there is no clock drift, the time when j receives the timestamp information is Tm+t, but the local time of node j at this moment is Tn, and the error Δt between these two moments is |Δt|=|Tn-Tm|, which is the time drift. Δt can be used for time compensation, and it can be known that the two nodes are in this period of time T t A total error of Δt is generated, that is, the error between the two nodes per unit time is Then at node j, the local time is compensated or regressed by Δ for every unit of time that passes.

[0044] Save the time error Δt obtained after each synchronization i , then after n times, the compensation or setback time per unit time Δ n for:

[0045]

[0046] By saving the error generated after each synchronization and then averaging it, the calculated error is made more accurate. Using this compensation mechanism for time correction effectively solves the time error caused by clock skew and clock drift, thereby reducing the overall time error of the system.

[0047] Step S300: creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining a video file data verification result;

[0048] Step S400: when the video file data verification result is a verification passing result, a blocking thread instruction is generated, and the video file is updated at the same time;

[0049] Specifically, the process of creating the data routing task is a process of performing wireless data communication verification, that is, performing data identification on the data broadcasted by each node and then forwarding it.

[0050] Furthermore, the step S300 further includes:

[0051] Step S310: After the data routing task is created, WSN initialization is first performed;

[0052] Step S320: after the initialization is completed, determining whether a wireless reception interruption occurs in the data routing task;

[0053] Step S330: when there is no wireless reception interruption, obtaining wireless reception data information;

[0054] Step S340: determining whether the wireless received data information matches the current node, and if it matches the current node, performing a data type check on the wireless received data information;

[0055] Step S350: Obtain the video file data verification result according to the data type verification result.

[0056] Specifically, assume that there are N wireless light control nodes deployed in an area along a straight line and in an orderly manner, and each light control node has the following properties:

[0057] The entire wireless sensor network is a static network with appropriate density, that is, each node must have adjacent nodes within its wireless communication range, there will be no intermediate faults, and there will be more than two adjacent points, so that the entire wireless network can still be used after a node in the middle is disconnected, and the position of the node will not change randomly after deployment;

[0058] The hardware of each node is the same, including wireless transmission power, system clock and other hardware. And the node is powered by 24V power supply;

[0059] Each node has the ability to send and receive, and has its own software address, which is the unique number of the same wireless sensor network node, which cannot be repeated but can be modified. The number of the software address increases in sequence along a single direction to facilitate the control of the entire system.

[0060] The process of WSN initialization is to assign the variables of the wireless sensor network to the default values. After the WSN variables are assigned to the default values, the Src node (source node) first encapsulates the valid data to be sent into frames, and encapsulates them strictly in accordance with the routing transmission protocol specified in the previous section. If the valid data is greater than the valid data bytes of a data packet, it needs to be split and broadcasted in sequence. Then other nodes in the same wireless network that meet the communication range will receive the data packet. When the node receives the data, the first data frame received is sent to itself, and then it checks whether the data has been received. According to whether it is split into several frames for sending, it records the frames that have been received. If it has been received, it will send a response frame to the Src node to tell the Src node that the data has been received. If it has not been received, it will wait. If it has not been received after 2 minutes, it will send a request to resend the naming frame to Src, and the missing frame will also be sent to the Src node with this resend frame. If it is still not completed after three requests for resending, all the data received this time will be lost. After confirming that the data has been received, the node will perform corresponding operations according to different types of nodes. When it matches this node, the data type check of the wireless received data information is performed. When the data type check result is the video file data, it is considered that the check passes, a blocking thread instruction is generated, and the video file is updated at the same time.

[0061] Furthermore, step S350 of the present application also includes:

[0062] Step S351: determining whether the data type verification result is video file data;

[0063] Step S352: when the data type verification result is not video file data, obtaining a node configuration data identification result;

[0064] Step S353: Perform data configuration of the current node according to the node configuration data identification result, and restart the node after the data configuration is completed.

[0065] Specifically, when the data type verification result is not video file data, it is proved that the obtained data is node configuration data, wherein the node configuration data includes node management and configuration data and program update files. The node configuration, management and program update processes are all node maintenance processes, and the node information is updated and configured through the node configuration data identification result, and after the update is completed, the node is restarted, and the completion of the restart indicates that the maintenance is completed.

[0066] Step S500: blocking the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and placing the DMX512 task in a waiting event position;

[0067] Step S600: When the time synchronization check result is a check pass, a first start instruction is generated, and when the video file is updated, a second start instruction is generated;

[0068] Step S700: When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, serial port playback is performed according to the updated video file.

[0069] Specifically, the DMX512 task generated by the DMX512 thread is blocked according to the blocking thread instruction, and is placed in the waiting event position to wait. When the time synchronization check result is a pass, it proves that the node time at this time has been adjusted to remain consistent. At this time, a first start instruction is obtained, and the video file of the DMX512 task is updated through the identified video file check result. When the update is completed, a second start instruction is obtained.

[0070] When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, serial port playback is triggered, that is, the video file after the update is completed is played through the serial port.

[0071] Furthermore, step S352 of the present application also includes:

[0072] Step S3521: judging whether it is a program update file according to the node configuration data identification result;

[0073] Step S3522: When the node configuration data identification result is a program update file, the data frame protocol is updated by retaining the update, wherein the data field in the data frame protocol includes an update handshake frame, an update start frame, an update check frame, an update command frame and an update return frame.

[0074] Specifically, it is determined whether it is a program update file based on the identification result of the node configuration data. When the identification result is a program update file, the update is retained. When an update request is received, there is no need to erase the old User program. The new User program can be directly received and the received User program can be placed in the specified Flash sector. After the reception is completed, the new program will overwrite the old program to implement the program update. In the update data frame protocol process, an update data field is included, and the update data field can be subdivided into five frame types: update handshake frame, update start frame, update check frame, update command frame and update return frame.

[0075] The update handshake frame is the terminal's reply information after the host computer program sends a handshake request to the terminal. The format of the update handshake frame is shown in Table 1.

[0076] Table 1

[0077] name Chip Model User program version number User program starting address length 10 bytes 10 bytes 4 bytes

[0078] After the terminal node and the host computer program have successfully handshaked, the program update start signal can be initiated. The update start frame format is shown in Table 2.

[0079] Table 2

[0080] name Frame ID Total Frames Frame number Update code size length ‘0’ 2 bytes 2 bytes 4 bytes

[0081] The update start frame is marked as 0, and all update data frames marked as 0 are mirror data to be updated. The terminal identifies the lost frame number by identifying the total number of frames and the frame number, so that the lost frame can be retransmitted later.

[0082] The update check frame is returned after the node verifies the received update image file. The format of the update check frame is shown in Table 3.

[0083] Table 3

[0084] name Frame ID Number of lost frames Lost frame number length ‘1’ 1 byte 80 bytes

[0085] If the terminal node detects frame loss, it records the lost frame number in the lost frame number field and sends it to the host computer.

[0086] The update command frame is a command initiated by the client after the terminal performs update verification and the verification is successful. It is used to indicate the end of the update operation. The terminal can return to the BIOS to erase the original User program and write the new User program. The update command frame format is shown in Table 4.

[0087] Table 4

[0088] name Frame ID byte ‘2’

[0089] Each time the host computer software sends an update data frame to the terminal node, the terminal node must send a return frame to notify the host computer program to proceed to the next step. The update return frame format is shown in Table 5.

[0090] Table 5

[0091] name Frame ID Frame number Return Status length ‘5’ 2 bytes 1 byte

[0092] Furthermore, step S700 of the present application also includes:

[0093] Step S710: When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, checking whether the video file is a playback signal;

[0094] Step S720: When there is a play signal, read the video file and play it through the serial port.

[0095] Specifically, when the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, the updated video file is checked for the presence of a playback signal. When it is detected that no playback signal exists, the task continues to be placed in the waiting event position and waits. When it is detected that a playback signal exists, the updated video file is read and played through the serial port according to the reading result.

[0096] In summary, the node light control method for landscape lighting provided by this application has the following technical effects:

[0097] Due to the adoption of obtaining the operating system startup instruction, creating a time synchronization thread, a DMX512 thread and a data routing thread according to the operating system startup instruction; creating a time synchronization task through the time synchronization thread, performing time synchronization verification based on the time synchronization task, and obtaining the time synchronization verification result; creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining the video file data verification result; when the video file data verification result is a verification pass result, generating a blocking thread instruction, and updating the video file at the same time; blocking the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and placing the DMX512 task in the waiting event position; when the time synchronization verification result is a verification pass, generating a first startup instruction, and when the video file is updated, generating a second startup instruction; when the DMX512 task placed in the waiting event position receives the first startup instruction and the second startup instruction at the same time, serial port playback is performed according to the video file after the update is completed. Based on the Internet of Things, the node lighting control is used to reduce costs and achieve smooth playback on the basis of ensuring high versatility and high portability.

[0098] Embodiment 2

[0099] Based on the same inventive concept as the node light control method of landscape lighting in the aforementioned embodiment, the present invention also provides a node light control system of landscape lighting, such as Figure 5 As shown, the system comprises:

[0100] A startup module 1, wherein the startup module 1 is used to obtain an operating system startup instruction, and create a time synchronization thread, a DMX512 thread, and a data routing thread according to the operating system startup instruction;

[0101] A time synchronization verification module 2, wherein the time synchronization verification module 2 is used to create a time synchronization task through the time synchronization thread, perform a time synchronization verification based on the time synchronization task, and obtain a time synchronization verification result;

[0102] A video file verification module 3, wherein the video file verification module 3 is used to create a data routing task through the data routing thread, perform file data verification based on the data routing task, and obtain a video file data verification result;

[0103] A blocking module 4, wherein the blocking module 4 is used to generate a blocking thread instruction and update the video file at the same time when the video file data verification result is a verification pass result;

[0104] A task generation module 5, the task generation module 5 is used to block the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and put the DMX512 task into a waiting event position;

[0105] An instruction generation module 6, wherein the instruction generation module 6 is used to generate a first start instruction when the time synchronization check result is a check pass, and to generate a second start instruction when the video file is updated;

[0106] The playing module 7 is used for performing serial port playback according to the updated video file when the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time.

[0107] Furthermore, the video file verification module 3 is also used for:

[0108] After the data routing task is created, WSN initialization is first performed;

[0109] After the initialization is completed, determining whether a wireless reception interruption occurs in the data routing task;

[0110] When there is no wireless reception interruption, wireless reception data information is obtained;

[0111] Determine whether the wireless received data information matches the current node, and if it matches the current node, perform data type verification on the wireless received data information;

[0112] The video file data verification result is obtained according to the data type verification result.

[0113] Furthermore, the video file verification module 3 is also used for:

[0114] Determining whether the data type verification result is video file data;

[0115] When the data type verification result is not video file data, obtaining a node configuration data identification result;

[0116] The data of the current node is configured according to the node configuration data identification result, and the node is restarted after the data configuration is completed.

[0117] Furthermore, the time synchronization verification module 2 is also used for:

[0118] Determine whether it is a synchronization initiating node based on the time synchronization task;

[0119] When it is not a synchronization initiating node, determining whether a time synchronization frame is received;

[0120] After receiving the time synchronization frame, the node type is judged;

[0121] When the node type is a cluster head node, time synchronization is completed through data interaction, and the time synchronization verification result is obtained, and the time synchronization verification result is verification passed.

[0122] Furthermore, the time synchronization verification module 2 is also used for:

[0123] When the node type is not a cluster head node, the RBS algorithm is used to achieve time synchronization within the cluster and determine whether it is the first synchronization;

[0124] When the time synchronization within the cluster is not the first synchronization, the time error analysis is performed and the error average value is calculated;

[0125] The error compensation for each time tick is performed by using the error average value, and time synchronization is completed.

[0126] Furthermore, the video file verification module 3 is also used for:

[0127] Determining whether it is a program update file according to the node configuration data identification result;

[0128] When the node configuration data identification result is a program update file, the data frame protocol is updated by retaining the update, wherein the data field in the data frame protocol includes an update handshake frame, an update start frame, an update check frame, an update command frame and an update return frame.

[0129] Furthermore, the playing module 7 is also used for:

[0130] When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, checking whether the video file is a playback signal;

[0131] When there is a play signal, the video file is read and played through the serial port.

[0132] The foregoing Figure 1The various variations and specific examples of a node light control method for landscape lighting in Example 1 are also applicable to a node light control system for landscape lighting in this embodiment. Through the above detailed description of a node light control method for landscape lighting, those skilled in the art can clearly know the implementation method of a node light control system for landscape lighting in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here.

[0133] The above description is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims

1. A node light control method for landscape lighting, It is characterized in that The method comprises: Obtain an operating system startup instruction, and create a time synchronization thread, a DMX512 thread, and a data routing thread according to the operating system startup instruction; Creating a time synchronization task through the time synchronization thread, performing a time synchronization check based on the time synchronization task, and obtaining a time synchronization check result; Creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining a video file data verification result; When the video file data verification result is a verification passing result, a blocking thread instruction is generated, and the video file is updated at the same time; Block the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and place the DMX512 task in a waiting event position; When the time synchronization check result is a check pass, a first start instruction is generated, and when the video file is updated, a second start instruction is generated; When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, serial port playback is performed according to the video file after the update is completed; Wherein, the time synchronization check includes: Determine whether it is a synchronization initiating node based on the time synchronization task; When it is not a synchronization initiating node, determining whether a time synchronization frame is received; After receiving the time synchronization frame, the node type is judged; When the node type is a cluster head node, time synchronization is completed through data interaction, and the time synchronization verification result is obtained, and the time synchronization verification result is verification passed; The method further includes creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining a video file data verification result. After the data routing task is created, WSN initialization is first performed; After the initialization is completed, determining whether a wireless reception interruption occurs in the data routing task; When there is no wireless reception interruption, wireless reception data information is obtained; Determine whether the wireless received data information matches the current node, and if it matches the current node, perform data type verification on the wireless received data information; The video file data verification result is obtained according to the data type verification result.

2. The method according to claim 1, It is characterized in that The method further comprises: Determining whether the data type verification result is video file data; When the data type verification result is not video file data, obtaining a node configuration data identification result; The data of the current node is configured according to the node configuration data identification result, and the node is restarted after the data configuration is completed.

3. The method according to claim 1, It is characterized in that The method further comprises: When the node type is not a cluster head node, the RBS algorithm is used to achieve time synchronization within the cluster and determine whether it is the first synchronization; When the time synchronization within the cluster is not the first synchronization, the time error analysis is performed and the error average value is calculated; The error compensation of each time tick is performed by using the error average value, and time synchronization is completed.

4. The method according to claim 2, It is characterized in that The method further comprises: Determining whether it is a program update file according to the node configuration data identification result; When the node configuration data identification result is a program update file, the data frame protocol is updated by retaining the update, wherein the data field in the data frame protocol includes an update handshake frame, an update start frame, an update check frame, an update command frame and an update return frame.

5. The method according to claim 1, It is characterized in that The method further comprises: When the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, checking whether the video file is a playback signal; When there is a play signal, the video file is read and played through the serial port.

6. A node lighting control system for landscape lighting, It is characterized in that The system comprises: A startup module, the startup module is used to obtain an operating system startup instruction, and create a time synchronization thread, a DMX512 thread, and a data routing thread according to the operating system startup instruction; A time synchronization verification module, wherein the time synchronization verification module is used to create a time synchronization task through the time synchronization thread, perform a time synchronization verification based on the time synchronization task, and obtain a time synchronization verification result; A video file verification module, the video file verification module is used to create a data routing task through the data routing thread, perform file data verification based on the data routing task, and obtain a video file data verification result; A blocking module, wherein the blocking module is used to generate a blocking thread instruction and update the video file at the same time when the video file data verification result is a verification passing result; A task generation module, the task generation module is used to block the DMX512 task generated by the DMX512 thread according to the blocking thread instruction, and put the DMX512 task into a waiting event position; An instruction generation module, the instruction generation module is used to generate a first start instruction when the time synchronization check result is a check pass, and generate a second start instruction when the video file is updated; A playing module, wherein when the DMX512 task placed in the waiting event position receives the first start instruction and the second start instruction at the same time, the playing module performs serial port playback according to the updated video file; Wherein, the time synchronization check includes: Determine whether it is a synchronization initiating node based on the time synchronization task; When it is not a synchronization initiating node, determining whether a time synchronization frame is received; After receiving the time synchronization frame, the node type is judged; When the node type is a cluster head node, time synchronization is completed through data interaction, and the time synchronization verification result is obtained, and the time synchronization verification result is verification passed; The method further includes creating a data routing task through the data routing thread, performing file data verification based on the data routing task, and obtaining a video file data verification result. After the data routing task is created, WSN initialization is first performed; After the initialization is completed, determining whether a wireless reception interruption occurs in the data routing task; When there is no wireless reception interruption, wireless reception data information is obtained; Determine whether the wireless received data information matches the current node, and if it matches the current node, perform data type verification on the wireless received data information; The video file data verification result is obtained according to the data type verification result.

Citation Information

Patent Citations

  • GSM-based streetlight wireless command and control system

    IN201921008358A

  • Time signaling for media streaming

    IN202047057259A