A system for realizing synchronous execution of device status differentiation based on non-response packet sending
By adopting the unresponsive packet transmission mechanism in the intelligent control system, combining path loss time and fixed packet transmission time, the packet conflict and blocking problems in differentiated synchronization control between devices are solved, and efficient device state synchronous execution is achieved, supporting more The synchronous control of controlled devices improves system stability and success rate.
Patent Information
- Application Number
- CN202210873919.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In the prior art, in intelligent control, packet conflicts and blocking problems are prone to differentiated state synchronization control between devices, resulting in packet loss or system downtime, and traditional broadcast group control methods cannot effectively support multiple controlled devices. Synchronous execution results in incomplete synchronization of device control.
Using a system based on unresponsive packet transmission, the gateway sends status requests to the controlled device in an idle state, and sets the delay time according to the path loss time and the number of controlled devices to ensure that all controlled devices perform actions at the same time and pass the gateway to The calculation of the path loss time of the equipment is combined with the fixed packet time to realize differentiated synchronization control of the equipment status.
It effectively avoids packet conflicts and blockages, improves packet success rate, ensures the accuracy and efficiency of differentiated synchronization control of equipment status, supports simultaneous execution of more controlled devices, and improves the stability and reliability of the system.
Smart Images

Figure CN115333663B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of device state differential synchronous execution, and in particular, relates to a system for realizing device state differential synchronous execution based on non-response packet sending. Background Art
[0002] When two devices interact, one sends a request, and the other gives a success or failure response (as well as active reporting after the state changes). This is the basic idea of current intelligent control. All devices currently do this. For example, in the field of smart homes, when the gateway sends an execution command to the device, the device will report a response to the gateway. Those skilled in the art are aware that when the gateway controls a large amount of devices at the same time, conflicts will occur between packets (frequent collisions or avoidances), which may easily lead to packet loss or blocking. Blockage will directly cause the gateway to crash. If packet loss occurs, the gateway needs to resend the command packet to the corresponding device, which will further aggravate the blocking. Therefore, those skilled in the art have also conducted research on this issue. However, all current research focuses on how to reduce the blocking probability caused by a large number of reported response packets, such as the sorting delay reporting method proposed in Publication No. CN110716438B, and the discrete time-sharing reporting method proposed by the applicant in Publication No. CN113485129B. The aforementioned methods can reduce the probability of network storms, but the premise is that there is the basic idea of reporting response packets, which is still limited by the bottleneck of technological development and it is difficult to have a greater technological breakthrough.
[0003] In addition, state-differentiated synchronous control means that the gateway sends control commands to multiple controlled devices to make them perform different actions at the same time. Since state-differentiated control needs to be implemented, the traditional broadcast group control method cannot be used. And because it needs to be executed simultaneously, all controlled devices need to be executed within a time period that the naked eye cannot perceive the change, which is generally 100ms, and the packet sending time interval of the gateway is 10ms, so the current state-differentiated synchronous control can only support up to 10 controlled devices. Moreover, since the device will report a response when it receives a control command, when there are multiple devices in the system reporting a response, it will affect the packet sending action of the gateway, and the gateway needs to re-send the packet. Therefore, under normal circumstances, the state-differentiated synchronous control can only support up to 6-8 controlled devices, which can only meet the needs of a small number of scenarios and cannot meet more scenarios.
[0004] In addition, because in a mesh network, communication messages between devices need to be forwarded by multiple routing devices, even when using the traditional network group control method, the control of different devices in the same group will not be completely synchronized. For example, if one device is very close to the gateway, the gateway control message can be delivered to the device without forwarding, while another device is far away from the gateway and needs to be forwarded by multiple routing devices before the control message can be delivered. Therefore, the time points at which these two devices receive the same control message cannot be synchronized. This control time difference can already make people feel obvious control asynchrony for lighting equipment. Summary of the invention
[0005] The purpose of the present invention is to provide a system for realizing differentiated synchronous execution of device states based on non-response packet sending in view of the above problems.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A system for realizing device status differential synchronous execution based on non-response packet sending, comprising a gateway and controlled devices, wherein all controlled devices in the system are in a silent state and are used to return a status response packet to the gateway upon receiving a status request from the gateway;
[0008] The gateway is used to set the delay time for each controlled device according to the number of controlled devices in the current state differential synchronization control and the path loss time from the gateway to the controlled device;
[0009] The gateway includes the gateway application layer and the gateway bottom layer, and the controlled device includes the device bottom layer and the device application layer;
[0010] The gateway application layer sends a control command packet containing a delay time to the gateway bottom layer in turn for each controlled device, and the gateway bottom layer is used to send the control command packet to the corresponding device bottom layer at least once until the device bottom layer returns a response of successful receipt;
[0011] The device bottom layer sends the received control command packet to the device application layer, and the device application layer executes the control command after a delay time;
[0012] In idle state, the gateway sends a status request to the controlled device. The status request is sent from the gateway application layer to the device application layer through the gateway bottom layer and the device bottom layer. The device application layer returns a status response packet. The status response packet is returned from the device application layer to the gateway application layer through the device bottom layer and the gateway bottom layer.
[0013] In the above-mentioned system for realizing device state differential synchronization execution based on non-response packet transmission, in one state differential synchronization control, the delay time of each controlled device is determined by the fixed packet transmission time and the path loss time from the gateway to itself.
[0014] In the above-mentioned system for realizing device state differential synchronous execution based on non-response packet sending, the path loss time from the gateway to the controlled device is obtained by the following method:
[0015] Tr=(Tdr)*(N / (N+M))
[0016] Tr represents the path loss time from the gateway to the controlled device; Tdr represents the loss time of the bidirectional path from the gateway to the controlled device; N represents the number of path loss hops from the gateway to the controlled device; M represents the number of path loss hops from the controlled device to the gateway.
[0017] In the above-mentioned system for realizing device state differential synchronous execution based on non-response packet sending, the path loss hop number M from the controlled device to the gateway, the path loss hop number N from the gateway to the controlled device, and the bidirectional path loss time Tdr from the gateway to the controlled device are obtained by the following method:
[0018] The gateway sends a query request carrying its own current system time Tsy1 to the controlled device;
[0019] The controlled device receives the query request and obtains N at the same time, and returns a response packet carrying Tsy1 and N to the gateway;
[0020] When the gateway receives the response packet from the controlled device, it obtains M and calculates the loss time Tdr of the bidirectional path based on Tsy1 and the current system time Tsy2.
[0021] In the above-mentioned system for implementing differentiated synchronous execution of device status based on non-response packet sending, the query request is the status request; and the response packet is the status response packet.
[0022] In the above-mentioned system for implementing device state differential synchronization based on non-response packet transmission, the fixed packet transmission time of each controlled device is determined according to the number of controlled devices that are arranged after the controlled device in this state differential synchronization control.
[0023] In the above-mentioned system for realizing device state differential synchronous execution based on non-response packet sending, the fixed packet sending time of each controlled device is as follows:
[0024] Ty=Ti*(nx)
[0025] Ti represents the fixed packet sending interval of the gateway; n represents the n devices in this state differential synchronization control; x represents the controlled device that sends the xth control command packet in this state differential synchronization control.
[0026] In the above-mentioned system for realizing device state differential synchronization based on non-response packet sending, each time the state differential synchronization control is performed, the gateway first calculates the path loss time of each controlled device, and then arranges all controlled devices in this state differential synchronization control group according to the following rules:
[0027] Extract the controlled device with the largest path loss time and arrange it to the last one, and randomly arrange the remaining controlled devices;
[0028] After all controlled devices are arranged in order, the delay time of all controlled devices is calculated, and then control commands are sent to the controlled devices in sequence according to the arrangement order.
[0029] In the above-mentioned system for realizing device state differential synchronous execution based on non-response packet sending, the delay time of each controlled device is determined by the following method:
[0030] Td=Ti*(nx)+(Trmax-Trx)
[0031] Trx represents the path loss time of the xth controlled device, and Trmax represents the path loss time of the last controlled device in the arrangement sequence.
[0032] In the above-mentioned system for realizing differentiated synchronous execution of device states based on non-response packet sending, the gateway bottom layer sends the control command packet to the corresponding device bottom layer at most 4 times.
[0033] The advantages of the present invention are:
[0034] 1. This solution fundamentally solves the problem and proposes a new communication mechanism, achieving a breakthrough technical improvement. In this system, only the gateway will actively send packets, and the controlled devices are in a silent state, only responsible for receiving command packets and executing them, and not actively returning response packets about the execution results. In such a system, there are no miscellaneous packets, which can ensure that the gateway controls all the messages in the system. The gateway controls all the packets, which can ensure the orderliness of the messages and effectively avoid collisions and blocking problems between packets, thereby greatly improving the success rate of packet sending;
[0035] 2. Although the application layer adopts a single packet transmission without response, the bottom layer still adopts a multiple retransmission mechanism, and there is still a response between the bottom layers, so it can ensure that the bottom layer of the device receives the command packet, thereby ensuring the execution success rate and providing bottom-level technical support for a success rate close to 100%;
[0036] 3. The gateway requests the device status in idle state. At this time, the device application layer will return a status response packet. Therefore, even in the above method, the gateway can efficiently obtain the device status. However, this status is actively obtained by the gateway in idle state and is still arranged in order by the gateway.
[0037] 4. At the same time, the periodic query of each device in the idle state of the gateway also provides an effective guarantee for the accurate calculation of the one-way path loss time from the gateway to the device;
[0038] 5. Under the differentiated control of device status, a unified delay time allocation method is adopted, and the delay time allocation takes into account both the packet sending time interval and the path loss time, which can ensure that all controlled devices under differentiated control are executed at the same time and are not limited to a small number of controlled devices;
[0039] 6. First, arrange the controlled devices according to their path loss time, then calculate the delay time according to the arrangement order, and finally provide a delay time algorithm that combines the fixed packet sending time and the path loss time, which can achieve more accurate delay time control, thereby ensuring that all devices under differentiated device states can execute at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the communication process between the gateway and the controlled device in the system for realizing the differentiated synchronous execution of the device status based on the non-response packet sending of the present invention;
[0041] Figure 2 It is a flow chart of a method for realizing device state differential synchronous execution in a system for realizing device state differential synchronous execution based on non-response packet sending of the present invention;
[0042] Figure 3 It is a flow chart of a method for determining the packet sending order by a gateway for a state differentiation synchronization control in a system for realizing device state differentiation synchronization execution based on non-response packet sending of the present invention;
[0043] Figure 4 The figure is a schematic diagram of the gateway packet sending and the controlled device execution time, taking a group of state-differentiated synchronous control with 7 controlled devices as an example. DETAILED DESCRIPTION
[0044] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0045] like Figure 1 and Figure 2 As shown, this embodiment discloses a system for realizing differentiated synchronous execution of device status based on non-response packet sending, including a gateway and controlled devices. All controlled devices in the system are in a silent state and only return a status response packet to the gateway when receiving a status request from the gateway.
[0046] The gateway is used to set a delay time for each controlled device according to the number of controlled devices in the current state differential synchronization control and the path loss time from the gateway to the controlled device;
[0047] The gateway includes the gateway application layer and the gateway bottom layer, and the controlled device includes the device bottom layer and the device application layer;
[0048] The gateway application layer sends a control command packet containing a delay time to the gateway bottom layer for each controlled device in turn. The gateway bottom layer is used to send the control command packet to the corresponding device bottom layer at least once until the device bottom layer returns a successful response; and the gateway bottom layer sends the control command packet to the corresponding device bottom layer at most 4 times;
[0049] The device bottom layer sends the received control command packet to the device application layer, and the device application layer executes the control command after a delay time;
[0050] In idle state, the gateway sends a status request to the controlled device. The status request is sent from the gateway application layer to the device application layer through the gateway bottom layer and the device bottom layer. The device application layer returns a status response packet. The status response packet is returned from the device application layer to the gateway application layer through the device bottom layer and the gateway bottom layer.
[0051] This solution fundamentally solves the problem. In this system, only the gateway is allowed to initiate operation requests. The controlled devices are in a silent state and are only responsible for receiving command packets and executing them. They do not actively return response packets about the execution results, thus achieving a very clean network. In such a system, there are no miscellaneous packets, which can ensure that the gateway controls all the messages in the system. The gateway controls all packets, which can ensure the orderliness of the messages and effectively avoid collisions and blocking problems between packets, thereby greatly improving the success rate of packet sending. In order to verify the significant improvement in the success rate of packet sending in this solution, the applicant conducted a large number of experiments, and some experimental data are provided below:
[0052] Test content: Use the same actual device deployment environment and prepare two gateways that are the same in other aspects but different in communication mechanisms. They are called traditional gateway and lighting control gateway respectively. The lighting control gateway uses the communication mechanism provided by this solution where only the gateway can actively send data. The traditional gateway uses the communication mechanism where both the gateway and the device can actively send data. Compare the success rates of the two gateways (two communication mechanisms) controlling the devices when the traditional gateway and the lighting control gateway are replaced.
[0053] Test conditions:
[0054] ① Network scale: 200 routing devices (lighting control panels);
[0055] ② In the same equipment deployment environment, only two gateways are replaced to build two network control solutions;
[0056] Test requirements:
[0057] ① The number of measurements and controls is at least 10,000 times, meeting the statistical requirement of 0.01% difference;
[0058] ②Automatically calculate the controlled success rate and eliminate human statistical factors;
[0059]
[0060] X: represents 60:12:30:00:0E
[0061] From the above data, we can see that the success rate of the traditional method is only about 98%, while the success rate of the application can be close to 100%. Therefore, using this method, on the surface, there is no response and it seems that the execution success of the device cannot be guaranteed, but in fact, it does improve the execution success rate of the device, and has a very obvious effect advantage in practical application.
[0062] In addition, this solution uses the fact that the underlying transmission time is much lower than the packet transmission time interval of the application layer (the underlying transmission time is about 1ms), and adopts a multiple retransmission packet transmission mechanism at the bottom layer, and uses the high efficiency of the underlying data transmission to ensure that the device receives the packet, which can avoid the problem of packet collision and ensure that the device receives the packet. Figure 1 It can also be seen that the transmission between application layers is one-way, and the packet time interval of the application layer is 10ms. Therefore, the interval between packets received by the bottom layer is as long as 10ms, and the sending response of a packet in the bottom layer can be completed within 4ms at most, so the problem of packet collision can be effectively avoided. In addition, the periodic query status of each device in the idle state of the gateway also provides an effective guarantee for the accurate calculation of the one-way path loss time from the gateway to the device.
[0063] Specifically, in a state-differentiated synchronous control, the delay time of each controlled device is determined by the fixed packet sending time and the path loss time from the gateway to itself.
[0064] like Figure 3 As shown, in each state-differentiated synchronous control process, the gateway first calculates the path loss time from the gateway to the controlled device for each controlled device in this control, and then arranges all controlled devices in this state-differentiated synchronous control group according to the following rules:
[0065] Extract the controlled device with the largest path loss time and place it last, and randomly sort the remaining controlled devices;
[0066] After all controlled devices are arranged in order, the delay time of all controlled devices is calculated, and then control commands are sent to the controlled devices in sequence according to the arrangement order.
[0067] Specifically, the delay time of each controlled device is calculated as follows:
[0068] Fixed package delivery time calculation:
[0069] Ty=Ti*(nx)
[0070] Ti represents the fixed packet sending interval of the gateway; n represents the n devices in this state differential synchronization control; x represents the controlled device that sends the xth control command packet in this state differential synchronization control.
[0071] Calculation of path loss time from gateway to controlled device:
[0072] Tr=(Tdr)*(N / (N+M))
[0073] Tr represents the path loss time from the gateway to the controlled device; Tdr represents the loss time of the bidirectional path from the gateway to the controlled device; N represents the number of path loss hops from the gateway to the controlled device; M represents the number of path loss hops from the controlled device to the gateway.
[0074] Since the paths from the gateway to the device and from the device to the gateway may not be exactly the same, for example, the message sent from the gateway to a device needs to be forwarded through 3 hops, while the message from the device to the gateway may only need 1 hop. Here, the path loss hop count from the gateway to the device is marked as N, and the path loss hop count from the device to the gateway is marked as M. The calculation of the path loss hop count and the path loss time depends on the gateway's active query of the device status in the idle state, at which time the device will return a status response. In this process, the device will obtain N when it receives the downlink message (query request) from the gateway, and M when the gateway receives the uplink message (response packet) from the device. In addition, each query request message sent by the gateway to the device carries its own current system time Tsy1 (accuracy is us), and the status response message returned by the device carries Tsy1 and N. In this way, when the gateway receives the uplink message (response packet) from the device, it can obtain M, N, and Tsy1, and then obtain the bidirectional path loss time Tdr=Tsy2-Tsy1 based on the current system time Tsy2.
[0075] Based on the above calculation, the delay time of each controlled device is:
[0076] Td=Ti*(nx)+(Trmax-Trx)
[0077] Trx represents the path loss time of the xth controlled device, and Trmax represents the path loss time of the last controlled device in the arrangement sequence.
[0078] The following describes this solution using 7 controlled devices as an example:
[0079] In the embodiment, the packet sending time interval of the gateway is 10ms. The controlled device 7 is the device with the longest path loss time calculated by the gateway, so it is arranged at the 7th. The remaining controlled devices are randomly arranged to obtain an arrangement order of 1-7. The gateway calculates the delay time for the 7 controlled devices respectively, and then sends the control command carrying the delay time to the controlled devices 1-controlled device 7 in sequence. The delay time of the controlled device 7 is zero, and it is executed immediately after receiving the control command. The delay time of the controlled device 6 is 10+Tr7-Tr6. It is executed after receiving the controlled command after 10+Tr7-Tr6. The remaining controlled devices are all executed after the corresponding delay time, and finally the 7 controlled devices perform differentiated actions at the same time. Afterwards, the gateway will request the status of each controlled device in the idle time, and each controlled device will upload the status to the gateway at this time. The gateway also uses the request to update the path loss time of each controlled device, providing an effective guarantee for the accurate calculation of the delay time, thereby ensuring the synchronous execution effect of each controlled device in each differentiated synchronous control.
[0080] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A system for realizing device state differential synchronous execution based on non-response packet sending, comprising a gateway and a controlled device, characterized in that: All controlled devices in the system are in silent state. When receiving a control command packet, they only execute but do not return a response packet. When receiving a status request, they return a status response packet. The gateway is used to set the delay time for each controlled device according to the number of controlled devices in the current state differential synchronization control and the path loss time from the gateway to the controlled device; The gateway includes the gateway application layer and the gateway bottom layer, and the controlled device includes the device bottom layer and the device application layer; The gateway application layer sends a control command packet containing a delay time to the gateway bottom layer for each controlled device in turn, and the gateway bottom layer is used to send the control command packet to the corresponding device bottom layer at least once until the device bottom layer returns a response of successful receipt; The device bottom layer sends the received control command packet to the device application layer, and the device application layer executes the control command after a delay time; The gateway sends a status request to the controlled device in idle state. The status request is sent from the gateway application layer to the device application layer through the gateway bottom layer and the device bottom layer. The device application layer returns a status response packet. The status response packet is returned from the device application layer to the gateway application layer through the device bottom layer and the gateway bottom layer. In a state-differentiated synchronous control, the delay time of each controlled device is determined by the fixed packet sending time and the path loss time from the gateway to itself.
2. The system for realizing device status differential synchronous execution based on non-response packet sending according to claim 1, characterized in that: The path loss time from the gateway to the controlled device is obtained in the following way: Tr = (Tdr) * (N / (N + M)) Tr represents the path loss time from the gateway to the controlled device; Tdr represents the bidirectional path loss time from the gateway to the controlled device; N represents the number of path loss hops from the gateway to the controlled device; M represents the number of path loss hops from the controlled device to the gateway.
3. The system for realizing device state differential synchronous execution based on non-response packet sending according to claim 2, characterized in that: The path loss hop count M from the controlled device to the gateway, the path loss hop count N from the gateway to the controlled device, and the bidirectional path loss time Tdr from the gateway to the controlled device are obtained in the following way: The gateway sends a query request carrying its own current system time Tsy1 to the controlled device; The controlled device receives the query request and obtains N at the same time, and returns a response packet carrying Tsy1 and N to the gateway; When the gateway receives the response packet from the controlled device, it obtains M and calculates the loss time Tdr of the bidirectional path based on Tsy1 and the current system time Tsy2.
4. The system for realizing device state differential synchronous execution based on non-response packet sending according to claim 1, characterized in that: The fixed packet sending time of each controlled device is determined according to the number of controlled devices that are arranged after the controlled device in the current state differential synchronization control.
5. The system for realizing device status differential synchronous execution based on non-response packet sending according to claim 4, characterized in that: The fixed packet sending time for each controlled device is as follows: Ty = Ti * (n - x) Ti represents the fixed packet sending interval of the gateway; n represents the n devices in this state differential synchronization control; x represents the controlled device that sends the xth control command packet in this state differential synchronization control.
6. The system for realizing device state differential synchronous execution based on non-response packet sending according to claim 5, characterized in that: Each time the state differential synchronization control is performed, the gateway first calculates the path loss time of each controlled device, and then arranges all controlled devices in this state differential synchronization control group according to the following rules: Extract the controlled device with the largest path loss time and arrange it to the last one, and randomly arrange the remaining controlled devices; After all controlled devices are arranged in order, the delay time of all controlled devices is calculated, and then control commands are sent to the controlled devices in sequence according to the arrangement order.
7. The system for realizing device status differential synchronous execution based on non-response packet sending according to claim 6, characterized in that: The delay time of each controlled device is determined by: Td = Ti * (n - x) + (Trmax - Trx) Trx represents the path loss time of the xth controlled device, and Trmax represents the path loss time of the last controlled device in the arrangement sequence.
8. The system for realizing device state differential synchronous execution based on non-response packet sending according to claim 1, characterized in that: The gateway bottom layer sends the control command packet to the corresponding device bottom layer at most 4 times.
Citation Information
Patent Citations
A method and apparatus for executing linked scenes
CN110716438B
Device control and reporting methods under scenario modes in a whole-house smart system
CN113485129B
Intelligent power line carrier synchronous control method
CN103873112A
Method and device for scene linkage execution
CN110716438A
Internet of Things smart home system
CN210380888U