Multi-node ad hoc network synchronization control method and sound lighting lamp using same
By using synchronous time difference data exchange and differential timing calibration between the master and slave devices, the problem of data transmission synchronization and accuracy in multi-node self-organizing networks is solved, realizing efficient, stable and flexible data transmission between node devices, which is suitable for multi-node self-organizing network systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2026-04-10
AI Technical Summary
In existing multi-node self-organizing network technologies, the lack of a delay calibration mechanism between nodes leads to poor data transmission synchronization and accuracy. Furthermore, the lack of reverse feedback confirmation between slave nodes and master nodes affects the accuracy of data transmission.
A multi-node self-organizing network synchronization control method is adopted. Through the synchronization time difference data exchange between the master and slave, the master receives the acknowledgment information from the slave, performs verification, and synchronizes the data information to each slave through differential timing according to the synchronization time difference parameter indexed in the device table, so as to ensure the synchronization and accuracy of data transmission.
It enables time deviation adjustment between node devices, ensuring the synchronization and accuracy of data transmission, improving the stability and reliability of the networking system, simplifying the networking process, reducing network configuration complexity, and enhancing the system's flexibility and scalability.
Smart Images

Figure CN121842813A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of device networking, and particularly refers to a multi-node ad hoc network synchronization control method and a sound lighting lamp applying the method. BACKGROUND
[0002] With the development of intelligent device technology, various intelligent devices gradually penetrate into all aspects of our life. The application scenarios of intelligent devices are gradually complex, and the working environment is increasingly harsh. At the same time, the collaborative work of various intelligent devices is also seeking development. Among them, the multi-node ad hoc network technology is a temporary communication network formed by multiple dynamic nodes self-organizing without fixed infrastructure support, which has high flexibility and robustness.
[0003] However, in the existing multi-node ad hoc network technology, there is no delay calibration mechanism between each node, which easily affects the synchronization of data transmission. In addition, there is no reverse backhaul confirmation between the slave node and the master node, which easily affects the accuracy of data transmission. SUMMARY
[0004] The purpose of the present application is to provide a multi-node ad hoc network synchronization control method and a sound lighting lamp applying the method, which can ensure the synchronization and accuracy of data transmission between nodes.
[0005] To achieve the above purpose, the solution of the present application is: a multi-node ad hoc network synchronization control method, characterized by comprising the following steps:
[0006] S1: any node device in the network device group acts as a host or a slave, and the node device starts to work as a slave by default after starting, and is used to wait for receiving data information, and when any node device is connected by an external device, the node device works as a host;
[0007] S2: the host transmits data information to the slave, the slave and the host are paired and connected, and the slave transmits synchronization time difference data to the host to keep the synchronization of data information;
[0008] S3: the host receives the synchronization time difference data sent by the slave and stores it as a synchronization time difference parameter in a device table, the host corrects the data information, and according to the synchronization time difference parameter indexed by the device table, the data information is synchronized to each slave through differential time sequence to complete the synchronization networking.
[0009] In a preferred embodiment, in the step S1, the network device group allows multiple node devices to work as hosts at the same time.
[0010] In a preferred embodiment, in the step S2, the host transmits data information to the slave in the form of broadcast, and the slave and the host are paired and connected through BLE technology.
[0011] Preferably, the networking process is a non-aware networking process, when there are multiple node devices as masters, the node devices as slaves only receive data information transmitted by the node devices as masters which first establish connections.
[0012] Preferably, the timing of the non-aware networking process includes: when any node device is connected by an external device, the node device changes from a slave waiting mode to a master mode, at this time the master sends data information to all slaves through Bluetooth broadcast; the slave initiates BLE reconnection after receiving the data information, and sends back the current synchronization time difference data after a successful connection; the master receives the feedback information from the slave, and performs timing calibration and initiates data information contained in the next group of 10 frame timing again.
[0013] Preferably, the synchronization time difference data includes synchronization frame time and synchronization frame time interval, and the acquisition step of the synchronization time difference data includes:
[0014] Step one: the average time value of the data packet interaction loss of the multiple master controller interfaces during the data interaction between the master and the slave is recorded as SDataSpendTime;
[0015] Step two: the time of the first frame when the master starts to send every N (N >= 10) synchronization frames is recorded as MSendStart;
[0016] Step three: the synchronization frame time interval sent by the master to the slave is recorded as MIntervel;
[0017] Step four: the time of the first synchronization frame when the master receives the feedback from the slave is recorded as MRecEnd;
[0018] Step five: the time from the time when the master starts to send the first frame of every N (N >= 0) synchronization frames to the time when all slaves complete the feedback is recorded as MSpendTime = MRecEnd-MSendStart(MIntervel*n);
[0019] The final synchronization time difference data is MEffectDelay = MSpendTime-SDataSpendTime.
[0020] Preferably, after the master receives the feedback information from the slave, the synchronization frame number of the next group is obtained through the last calibrated synchronization time difference data, so as to initiate the data information contained in the timing of the next group of frames again, and the acquisition step includes:
[0021] S10: the time difference (ms) of the last calibration is recorded as Difftime = |MEffectDelay0-
[0022] (MEffectDelay1+MEffectDelay2+...MEffectDelayn) / n|;
[0023] S20: The number of synchronization frames of the next group is: 10+time(Difftime>10?0:(10-Difftime));
[0024] If Difftime is greater than 10 ms, the number of synchronization frames of the next group is 10.
[0025] If Difftime is less than 10 ms, the number of synchronization frames of the next group is 10+(10-Difftime).
[0026] Preferably, a calibration delay mechanism is provided between the master and the slave, and the delay time of the calibration delay mechanism is the average of the synchronization time difference data of the master and each slave.
[0027] An audio lighting lamp characterized in that the multi-node ad hoc network synchronization control method of any one of claims 1-8 is applied, the number of the audio lighting lamps is at least two, the data information includes audio data and light effect data, and the control steps include:
[0028] S100: Any audio lighting lamp is a master or a slave, and when the audio lighting lamp is searched and connected by a source device of Bluetooth audio, the audio lighting lamp works as a master;
[0029] S200: The audio lighting lamp as a master transmits audio data and light effect data to the audio lighting lamp as a slave in the form of broadcast, the audio lighting lamp as a slave is connected to the audio lighting lamp as a master through BLE technology, and the audio lighting lamp as a slave transmits synchronization time difference data to the audio lighting lamp as a master to keep the synchronization of the audio data and the light effect data.
[0030] S300: The audio lighting lamp as a master receives the synchronization time difference data sent by the audio lighting lamp as a slave and stores the synchronization time difference data as a synchronization time difference parameter in a device table, the audio lighting lamp as a master calibrates each frame of audio data and light effect data, and according to the synchronization time difference parameter indexed by the device table, the audio data and the light effect data are synchronized to each audio lighting lamp as a slave through differential time sequence to complete synchronization networking.
[0031] Preferably, the source device of Bluetooth audio is a mobile phone, a tablet or a PC, and the audio lighting lamp and the source device are connected through Bluetooth A2DP protocol.
[0032] The beneficial effects of this invention, achieved by adopting the above scheme, are as follows: By transmitting synchronization time difference data from slave devices to master devices, the time deviation between each master and slave device can be adjusted, ensuring the synchronization of data transmission. Furthermore, the master device receives the synchronization time difference data sent by the slave devices and stores it as a synchronization time difference parameter in the device table. The master device verifies the data information and, based on the synchronization time difference parameter indexed in the device table, synchronizes the data information to each slave device using differential timing, further ensuring the accuracy of data transmission and providing flexibility in use. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of data transmission between node devices of the present invention;
[0034] Figure 2 This is a schematic diagram of the broadcast data format between the audio and lighting lamps of the present invention;
[0035] Figure 3 This is a schematic diagram of data transmission between the audio and lighting lamps of the present invention;
[0036] Figure 4 This is a partial synchronization time difference data calibration statistics table of the present invention.
[0037] Label Explanation:
[0038] 1. Broadcast data format; 2. Node equipment; 20. Audio and lighting equipment; 3. Source equipment. Detailed Implementation
[0039] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0040] S1: Any node device 2 in the network device group can act as a master or slave. After starting up, node device 2 will work as a slave by default, waiting to receive data information. When any node device 2 is connected to an external device, this node device 2 will work as a master.
[0041] S2: The master transmits data information to the slave, the slave pairs with the master, and the slave transmits synchronization time difference data to the master to maintain data synchronization;
[0042] S3: The host receives the synchronization time difference data sent by the slave and stores it in the device table as a synchronization time difference parameter. The host verifies the data information and synchronizes the data information to each slave through differential timing according to the synchronization time difference parameter indexed in the device table, thereby completing the synchronization network.
[0043] In this embodiment, node device 2 in the network can flexibly switch between working as a host or a slave. When any node device 2 is connected to an external device, it can automatically switch to host mode, while other node devices 2 act as slaves waiting to receive data information, making network construction more convenient and eliminating the need for complex configuration processes.
[0044] By transmitting synchronization time difference data from the slave device to the master device, the time deviation between each node device 2 can be precisely adjusted, ensuring the synchronization of data information, reducing delays and errors in the data transmission process, and improving the operating efficiency and data accuracy of the networking system.
[0045] The host synchronizes data to each slave device using differential timing based on the synchronization time difference parameter in the device table index, enhancing the stability and reliability of the entire network system. Since node device 2 can flexibly join or leave the network system, the network framework in this embodiment has excellent scalability.
[0046] Furthermore, the networking device group in this embodiment allows multiple node devices 2 to work as hosts simultaneously, and one host device can be paired with and connected to multiple slave devices at the same time, with a maximum of 32 slave devices, which can effectively improve the flexibility and efficiency of use.
[0047] Furthermore, in this embodiment, the host transmits data information to the slave device via broadcast. The slave device and the host are paired and connected using BLE technology, which significantly reduces power consumption when the slave device receives data information broadcast by the host. Simultaneously, BLE technology supports fast connection; the slave device can quickly respond to the host's broadcast and establish a connection. The low communication latency of BLE also ensures rapid response in data transmission.
[0048] Furthermore, the networking process in this embodiment is seamless, making the networking process simpler, faster, and more stable. Users do not need to manually configure complex network parameters or handle the connection relationships between multiple devices; they only need to start the devices and wait for them to connect automatically, improving convenience. When there are multiple master node devices 2, the slave node devices 2 only receive data information transmitted by the first master node device 2 to establish a connection, reducing the complexity of network configuration and minimizing the possibility of data transmission failures.
[0049] Specifically, such as Figure 1 As shown, the timing of the seamless networking in this embodiment includes: when any node device 2 is connected to an external device, the node device 2 changes from slave waiting mode to master mode, without the need for manual configuration, simplifying the operation process. At this time, the master sends data information to all slaves via Bluetooth broadcast, so that all slaves can quickly sense the presence of the master and start establishing a connection.
[0050] After receiving data, the slave device initiates a BLE reconnection. Once the connection is successful, it sends back the current synchronization time difference data, which can effectively improve the accuracy of the data.
[0051] After receiving the acknowledgment information from the slave, the master performs timing verification and initiates the next set of 10 frames containing the data information to ensure the synchronization of data transmission.
[0052] Furthermore, in this embodiment, the synchronization time difference data includes the synchronization frame time and the synchronization frame time interval. Specifically, the steps for obtaining the synchronization time difference data include:
[0053] Step 1: Record the average time loss of data packet exchange between multiple host controller interfaces during data interaction between the host and slave as SDataSpendTime;
[0054] Step 2: The time when the host starts sending the first frame of every N (N>=10) synchronization frames is denoted as MSendStart;
[0055] Step 3: The time interval for the synchronization frames sent from the master to the slave is denoted as MIntervel;
[0056] Step 4: Record the time of the first synchronization frame received by the master from the slave as MRecEnd;
[0057] Step 5: The time from the start of the master sending the first frame of every N (N>=0) synchronization frames until all slaves complete the acknowledgment is recorded as: MSpendTime = MRecEnd - MSendStart(MIntervel*n);
[0058] The final synchronization time difference data is: MEffectDelay = MSpendTime - SDataSpendTim.
[0059] like Figure 4 As shown, the default value in this embodiment is 180ms. Taking five slave devices as an example, the synchronization time difference between the first and third calibrations remains unchanged. When the synchronization time difference between a slave device and the master device has an error of more than ±20ms compared with the average value, it is determined that the signal between the slave device and the master device is poor. The synchronization time difference of the fifth slave device during the second calibration is 300ms. Therefore, this data is abnormal and is not included in the average value for reference.
[0060] Furthermore, in this embodiment, after the host receives the acknowledgment information from the slave, it obtains the next set of synchronization frame numbers through the most recently calibrated synchronization time difference data, and then initiates the next set of frame number timing information containing the data information. The specific acquisition steps include:
[0061] S10: The time difference (ms) between the most recent calibration is recorded as:
[0062] Difftime=|MEffectDelay0-(MEffectDelay1+MEffectDelay2+...MEffectDelayn) / n|;
[0063] S20: The next group's synchronization frame count is: 10 + time (Difftime > 10? 0: (10 - Difftime));
[0064] If Difftime is greater than 10ms, the number of synchronization frames for the next group is 10. If Difftime is less than 10ms, the number of synchronization frames for the next group is 10 + (10 - Difftime). The greater the time difference between the master and slave, the fewer the total number of frames required for calibration. In other words, the master and slave need to calibrate more frequently to ensure the synchronization of data information.
[0065] Furthermore, a calibration delay mechanism is provided between the master and slave devices to ensure the synchronization of data transmission between them. The delay time of the calibration delay mechanism is the average of the synchronization time difference data between the master and each slave device. As mentioned earlier, when the error of the synchronization time difference data between a slave device and the master device compared with the average value exceeds ±20ms, it is determined that the signal between the slave device and the master device is poor.
[0066] The multi-node self-organizing network synchronization control method of the present invention can be applied to multiple node devices that need to be networked. This embodiment takes audio lighting as an example for further explanation, but it is not limited thereto.
[0067] In this embodiment, the number of audio lighting lamps 20 is at least two, and the data information includes audio data and lighting effect data. The control steps include:
[0068] S100: Any speaker light 20 acts as a master or slave. When the speaker light 20 is searched and connected by the source device 3 of Bluetooth audio, the speaker light 20 works as a master.
[0069] S200: The host audio lighting 20 transmits audio data and lighting effect data to the slave audio lighting 20 via broadcast. The slave audio lighting 20 pairs with the host audio lighting 20 via BLE technology. The slave audio lighting 20 transmits synchronization time difference data to the host audio lighting 20 to maintain the synchronization of audio data and lighting effect data.
[0070] S300: The master speaker and lighting lamp 20 receives the synchronization time difference data sent by the slave speaker and lighting lamp 20 and stores it in the device table as a synchronization time difference parameter. The master speaker and lighting lamp 20 calibrates the audio data and lighting effect data of each frame, and synchronizes the audio data and lighting effect data to each slave speaker and lighting lamp 20 through differential timing according to the synchronization time difference parameter indexed in the device table, thereby completing the synchronization network.
[0071] In this embodiment, the speaker lights 20 are paired and connected via BLE (Bluetooth Low Energy) technology to form a self-organizing network. This allows the number of speaker lights 20 to be flexibly adjusted according to actual needs, without the need for complex wiring or a pre-set network structure. As the number of speaker lights 20 increases, the network can automatically adapt and expand. One speaker light 20 acting as a master can pair and connect to up to 32 speaker lights 20 acting as slaves, improving efficiency.
[0072] like Figure 2 As shown, in this embodiment, the audio and lighting lights 20 transmit audio and lighting effect data through a specific broadcast data format 1, and perform differential timing adjustment by combining synchronization time difference data. By redefining the broadcast data protocol frame, broadcast data synchronization is achieved with the addition of a small amount of data, and multiple connections are implemented using BLE technology, sacrificing a small amount of resources to achieve node transmission bandwidth and latency correction. After the network is completed, the final synchronization error between the host's audio and lighting effects and the slave devices is less than 3ms, ensuring that the audio and lighting effects of all audio and lighting lights 20 can be synchronized with high precision.
[0073] In this embodiment, the audio and lighting lamps 20 are connected in a seamless network. When multiple audio and lighting lamps 20 are connected to multiple external devices and work as the host, the audio and lighting lamps 20 acting as slaves always only receive the audio data and lighting effect data of the first audio and lighting lamp 20 that established the connection as the host.
[0074] like Figure 3 As shown, the timing logic for the seamless networking between the master speaker / lighting lamp 20 and the slave speaker / lighting lamp 20 includes:
[0075] When any speaker light 20 is connected to an external device, the speaker light 20 changes from slave waiting mode to master mode. At this time, the speaker light 20 acting as the master sends audio data and lighting effect data to all speaker lights 20 acting as slaves via Bluetooth broadcast.
[0076] After receiving audio data and lighting effect data, the slave device audio and lighting lamp 20 initiates a BLE reconnection. After a successful connection, it sends an acknowledgment of the currently received synchronization frame time and interval. The synchronization interval depends on the degree of frame synchronization; the more stable the synchronization, the longer the interval.
[0077] After receiving the acknowledgment information from the slave audio and lighting lamp 20, the master audio and lighting lamp 20 performs timing calibration and initiates the next set of 10 frames of timing containing audio data and lighting effect data. This process is repeated to ensure that the slave audio and lighting lamp 20 will not experience timing deviations due to signal interference.
[0078] In this embodiment, the host sends 10 timing frames by default. The adjustment of the frame number timing is as described above. The greater the time difference between the host and slave, the fewer frames are needed for calibration. This means the host and slave need to calibrate more frequently to ensure data synchronization. Furthermore, any deviations from normal communication time values should be treated as signal failure; that is, the calibration delay mechanism between the host and slave, as mentioned above, will not be elaborated further.
[0079] Furthermore, the source device 3 for Bluetooth audio in this implementation can be a mobile phone, tablet, or PC, but is not limited to these. The speaker lighting 20 establishes a communication connection with the source device 3 via the Bluetooth A2DP protocol. In addition, for the audio data and lighting effect data, the amplitude of the volume can be acquired through a reverse ADC, and the light can be made to move in rhythm with the music through HSV and RGB algorithms. This is well known to those skilled in the art and will not be described in detail here.
[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the design of this case. All equivalent changes made based on the key design features of this case shall fall within the protection scope of this case.
Claims
1. A method for synchronous control of a multi-node self-organizing network, characterized in that: Includes the following steps: S1: Any node device in the network device group can act as a master or slave device. After the node device is started, it will work as a slave device by default to wait to receive data information. When any node device is connected to an external device, this node device will work as a master device. S2: The master transmits data information to the slave, the slave pairs with the master, and the slave transmits synchronization time difference data to the master to maintain data synchronization; S3: The host receives the synchronization time difference data sent by the slave and stores it in the device table as a synchronization time difference parameter. The host verifies the data information and synchronizes the data information to each slave through differential timing according to the synchronization time difference parameter indexed in the device table, thereby completing the synchronization network.
2. The multi-node self-organizing network synchronization control method as described in claim 1, characterized in that: In step S1, the network device group allows multiple node devices to work as hosts simultaneously.
3. The multi-node self-organizing network synchronization control method as described in claim 1, characterized in that: In step S2, the host transmits data information to the slave via broadcast, and the slave and host are paired and connected via BLE technology.
4. The multi-node self-organizing network synchronization control method as described in claim 1, characterized in that: The networking process is a seamless networking process. When there are multiple node devices acting as masters, the node devices acting as slaves only receive the data information transmitted by the node device that first established the connection as the master.
5. The multi-node self-organizing network synchronization control method as described in claim 4, characterized in that: The timing sequence of the seamless networking includes: When any node device is connected to an external device, the node device changes from slave waiting mode to master mode. At this time, the master will broadcast data information to all slave devices via Bluetooth. After receiving data, the slave device initiates a BLE reconnection and sends back the current synchronization time difference data upon successful connection. After receiving the acknowledgment information from the slave, the master performs timing verification and initiates the next set of 10 frames containing the data information.
6. The multi-node self-organizing network synchronization control method as described in claim 5, characterized in that: The synchronization time difference data includes the synchronization frame time and the synchronization frame time interval. The steps for obtaining the synchronization time difference data include: Step 1: Record the average time loss of data packet exchange between multiple host controller interfaces during data interaction between the host and slave as SDataSpendTime; Step 2: The time when the host starts sending the first frame of every N (N>=10) synchronization frames is denoted as MSendStart; Step 3: The time interval for the synchronization frames sent from the master to the slave is denoted as MIntervel; Step 4: Record the time of the first synchronization frame received by the master from the slave as MRecEnd; Step 5: The time from the start of the master sending the first frame of every N (N>=0) synchronization frames until all slaves complete the acknowledgment is recorded as: MSpendTime = MRecEnd - MSendStart(MIntervel*n); The final synchronization time difference data is: MEffectDelay = MSpendTime - SDataSpendTime.
7. The multi-node self-organizing network synchronization control method as described in claim 6, characterized in that: After receiving the acknowledgment information from the slave, the master obtains the next set of synchronization frame numbers using the most recently calibrated synchronization time difference data, and then initiates the next set of frame number timing information. The acquisition steps include: S10: The time difference (ms) of the most recent calibration is denoted as: Difftime = |MEffectDelay0 - (MEffectDelay1 + MEffectDelay2 + ... + MEffectDelayn) / n |; S20: The next group's synchronization frame count is: 10 + time (Difftime > 10? 0: (10 - Difftime)); If Difftime is greater than 10ms, the number of synchronization frames for the next group is 10. If Difftime is less than 10ms, the number of synchronization frames for the next group is 10 + (10 - Difftime).
8. The multi-node self-organizing network synchronization control method as described in claim 1, characterized in that: A synchronization delay mechanism is provided between the master and slave devices, and the delay time of the synchronization delay mechanism is the average value of the synchronization time difference data between the master and each slave device.
9. An audio lighting lamp, characterized in that: The multi-node self-organizing network synchronization control method as described in any one of claims 1-8, wherein the number of audio and lighting lamps is at least two, and the data information includes audio data and lighting effect data, and the control steps include: S100: Any speaker light can act as a master or slave. When the speaker light is searched and connected by a Bluetooth audio source device, the speaker light works as a master. S200: The master audio and lighting light transmits audio and lighting data to the slave audio and lighting light via broadcast. The slave audio and lighting light is paired with the master audio and lighting light via BLE technology. The slave audio and lighting light transmits synchronization time difference data to the master audio and lighting light to maintain synchronization between audio and lighting data. S300: The master speaker and lighting unit receives the synchronization time difference data sent by the slave speakers and lighting units and stores it in the device table as a synchronization time difference parameter. The master speaker and lighting unit calibrates the audio data and lighting effect data of each frame, and synchronizes the audio data and lighting effect data to each slave speaker and lighting unit through differential timing according to the synchronization time difference parameter indexed in the device table, thereby completing the synchronization network.
10. The audio lighting lamp as described in claim 9, characterized in that: The source device for the Bluetooth audio is a mobile phone, tablet, or PC, and the speaker and lighting establish a communication connection with the source device via the Bluetooth A2DP protocol.