Device control method and device, router, wireless mesh network system and medium

By adopting the device control method of wireless mesh network in smart home devices, and using the proxy service node list to automatically recommend the target proxy service node, the network delay problem caused by the dependence of smart home device automation scene control on the cloud server is solved, and the gateway is realized Maximizing automated scenario execution when offline or with poor network quality improves user experience and system reliability.

CN115242824BActive Publication Date: 2024-10-22SHENZHEN LUMIUNITED TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110439295.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2024-10-22
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

The automated scene control of existing smart home devices relies on cloud servers, resulting in network delays and poor network quality, which affects the user experience.

Method used

Using a device control method based on wireless mesh network, the target proxy service node is automatically selected through the proxy service node list to realize automatic scene control of smart home devices, avoid relying on wide area network quality, and ensure that the gateway is still connected when the gateway is offline or the network quality is poor. Can maximize the execution of automation scenarios.

Benefits of technology

It reduces network delays, improves user experience, extends the battery life of wireless sensors, avoids single node failures and resource bottlenecks, and improves communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115242824B_ABST
    Figure CN115242824B_ABST
Patent Text Reader

Abstract

The present application provides a device control method and apparatus based on a wireless mesh network, a routing device, a wireless mesh network system and a computer storage medium. The device control method includes: obtaining a device control event; if the device is currently in a local proxy mode, selecting a target proxy service node according to a set proxy service node list, sending the device control event to the target proxy service node, and the target proxy service node sending a control instruction to the controlled device according to the device control event and the configured scene control information to control the controlled device to perform a corresponding action.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and in particular to a device control method and apparatus based on a wireless mesh network, a routing device, a wireless mesh network system, and a computer storage medium. Background Art

[0002] With the continuous development of the smart home industry, the concept of whole-house intelligence has been deeply rooted in people's minds, and the types and numbers of smart home devices in users' homes are increasing.

[0003] It is known that the automated scene control of smart home devices is implemented based on cloud servers. However, in actual applications, the automated scene control based on cloud servers has network delays, and when the external network service quality is poor, the automated scene control cannot be executed. Summary of the invention

[0004] To solve the existing technical problems, the present application provides a device control method and apparatus based on a wireless mesh network, a routing device, a wireless mesh network system and a computer storage medium that can maximize the execution of automated scene control of smart home devices.

[0005] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a device control method based on a wireless mesh network, comprising: obtaining a device control event; if currently in local proxy mode, selecting a target proxy service node according to a set proxy service node list, sending the device control event to the target proxy service node, and the target proxy service node sending a control instruction to the controlled device according to the device control event and the configured scene control information to control the controlled device to perform a corresponding action.

[0007] In a second aspect, an embodiment of the present application provides a device control apparatus based on a wireless mesh network, comprising: an acquisition module for acquiring device control events; a proxy module for, if currently in local proxy mode, selecting a target proxy service node according to a set proxy service node list, and sending the device control event to the target proxy service node, wherein the target proxy service node sends a control instruction to the controlled device according to the device control event and the configured scene control information, so as to control the controlled device to perform a corresponding action.

[0008] In a third aspect, an embodiment of the present application provides a routing device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, the device control method based on the wireless mesh network described in any embodiment of the present application is implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a wireless mesh network system, comprising a terminal node, a parent service node communicatively connected to the terminal node, and a controlled device communicatively connected to the parent service node, wherein a list of proxy service nodes is stored in the parent service node, the terminal node is used to obtain device control events and report the device control events to the parent service node, and the parent service node is used to execute the device control method based on the wireless mesh network described in any embodiment of the present application.

[0010] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a controller, the device control method based on the wireless mesh network described in any embodiment of the present application is implemented.

[0011] The device control method and apparatus based on wireless mesh network, routing device, wireless mesh network system and computer storage medium provided by the above embodiments of the present application, after the service node obtains the device control event, if it is currently in local proxy mode, it can select the target proxy service node according to the set proxy service node list, send the device control event to the target proxy service node, and the target proxy service node sends a control instruction to the controlled device according to the device control event and the configured scene control information to control the controlled device to perform the corresponding action. In this way, the target proxy service node is automatically selected based on the proxy service node list in the wireless mesh network, and the target proxy service node completes the control of the controlled device according to the device control event, so as not to rely on the network quality of the wide area network currently accessed by the controlled device. When the network quality is poor or the gateway is offline, the proxy service node can perform the automated scene control of the smart home device, so that the automated scene control of the smart home device can be maximized, reduce network delay, and improve user experience. Since the automated scene can still be maximized after the gateway itself fails in the wireless mesh network, the user experience is greatly improved. This technical solution has the following advantages in practical applications: 1. It fully considers the energy consumption of battery-powered wireless sensors; it reduces the number of messages sent by wireless sensors as much as possible, thereby extending the battery life of wireless sensors; it greatly reduces the frequency of battery replacement and maintenance costs for users. 2. It is more flexible in utilizing the resources of nodes (such as light controllers) involved in routing forwarding in the network. This ensures that the entire system does not have single node failure and single node resource bottleneck problems. 3. It does not use broadcast messages when forwarding messages, which reduces network congestion and improves the reliability of communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 Schematic diagram of optional application scenarios of a device control method based on a wireless mesh network in an embodiment;

[0013] Figure 2 is a flow chart of a device control method based on a wireless mesh network in one embodiment;

[0014] Figure 3 is a schematic diagram of a wireless mesh network in a local proxy mode according to an embodiment;

[0015] Figure 4 is a schematic diagram of an embodiment in a local proxy mode;

[0016] Figure 5 is a schematic diagram of an embodiment in a cloud control mode;

[0017] Figure 6 is a flow chart of a device control method based on a wireless mesh network in another embodiment;

[0018] Figure 7 is a flow chart of a service node discovery process in an embodiment;

[0019] Figure 8 is a flowchart of a scene list synchronization process in an embodiment;

[0020] Fig. 9 is a schematic diagram of a device control apparatus based on a wireless mesh network in one embodiment;

[0021] Fig.10 Schematic diagram of a routing device in an embodiment. DETAILED DESCRIPTION

[0022] The technical solution of the present application is further elaborated in detail below in conjunction with the accompanying drawings and specific embodiments of the specification.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the implementation of this application. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0024] In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present application. In the description of the present application, unless otherwise specified, "multiple" means two or more.

[0025] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0026] See also Figure 1, is a framework diagram of a wireless Mesh network (wireless mesh network) for optional application scenarios of a device control method based on a wireless mesh network provided in an embodiment of the present application. Among them, a wireless mesh network is also called a "multi-hop" network. In a wireless mesh network, any wireless device node can act as an AP (access point) and a router at the same time. Each node in the network can send and receive signals, and each node can communicate directly with one or more peer nodes to achieve multi-hop access. In this embodiment, the wireless mesh network system includes a terminal node, a parent service node connected to the terminal node in communication, a controlled device and an agent service node connected to the parent service node in communication, a gateway device, a server, and a terminal device. The terminal device 51 can be any device with communication and storage functions, such as a smart phone, a desktop computer, a laptop computer, a tablet computer, or other intelligent communication devices with network connection functions. The server 52 can be a network access server, a database server, a cloud server, etc. The controlled device can be a smart home product including but not limited to smart lamps, automatic curtains, air conditioners, door locks, etc. The terminal node is associated with the controlled device and is used to control the associated smart home products to turn on and off according to the user operation. The terminal node can be a wireless sensor, smart switch, smart socket, etc. The proxy service node and the parent service node can be a routing device or a controller of a smart home device in a wireless mesh network system.

[0027] Optionally, the gateway device 53 can be built based on the ZigBee protocol, and the controlled device is controlled by the terminal device 51. It can be pre-added to the gateway device 53. For example, the smart home device can be a device in the kit to which the gateway device 53 belongs when the gateway device 53 leaves the factory; it can also be a device subsequently connected to the gateway device 53 through user operation.

[0028] Optionally, the controlled device and the terminal node may establish a network connection with the gateway device 53 based on the ZigBee protocol, thereby joining the ZigBee network, and the wireless mesh network is a ZigBee wireless mesh network.

[0029] Both the smart home device and the terminal device 51 can be connected to the Ethernet through the gateway device 53, and the gateway device 53 can be connected to the server through a wired or wireless communication connection. For example, the gateway device 53 and the terminal device 51 can store the acquired information in the server 52. Optionally, the terminal device 51 can establish a network connection with the server 52 through 2G / 3G / 4G / 5G, WiFi, etc., and send data to the server 52 or obtain data sent by the server 52.

[0030] Optionally, the terminal node, parent service node, proxy service node, controlled device and gateway device 53 are in the same wireless network state, and in the same wide area network through gateway device 53 and server 52. The terminal node can communicate with the controlled device through the parent service node and proxy service node, and can also interact with the gateway device 53 and the terminal device connected to the gateway device 53 through the wide area network path. The terminal node receives the user's operation on the smart home device, and realizes the opening or closing control of the smart home device within the local area network or the corresponding connection thereto through the proxy service node in the wireless mesh network. The smart home device may include but is not limited to smart home products such as smart lamps, automatic curtains, air conditioners, door locks, etc.

[0031] See also Figure 2 , a device control method based on a wireless mesh network provided by an embodiment of the present application, which can be applied to Figure 1 The device control method includes but is not limited to S101 and S103, which are described in detail as follows:

[0032] S101, obtaining a device control event.

[0033] The device control event refers to an operation event of controlling the controlled device to be turned on or off. In an optional embodiment, the controlled device may be a smart home device connected to a wireless mesh network, and the device control event may be an event of controlling the smart home device to be turned on or off.

[0034] The acquisition of device control events may refer to the terminal node detecting the device control event input by the user and reporting it to the parent service node, and the parent service node acquiring the device control event reported by the terminal node. The terminal node may refer to a device for detecting device control events, such as a smart switch, a smart socket, or a wireless sensor.

[0035] S103, if the current mode is local proxy mode, select a target proxy service node according to the set proxy service node list, send the device control event to the target proxy service node, and the target proxy service node sends a control instruction to the controlled device according to the device control event and the configured scene control information to control the controlled device to perform a corresponding action.

[0036] The local proxy mode refers to a mode in which the proxy service node replaces the gateway device to perform automated scene control on the smart home device. A scene refers to making the state of one or more preset smart home devices reach the expected state set by humans. For example, in the home scene, users usually want to turn on the living room lights, curtains, and air conditioners when they get home. In this way, "turn on the living room lights, curtains, and air conditioners" can be configured as the execution actions of the smart home devices included in the home scene; for another example, in the wake-up scene, users usually want to open the curtains, the sockets on the table, and the sockets in the living room when they get up. In this way, "open the curtains, open the sockets on the table, and open the sockets in the living room" can be configured as the execution actions of the smart home devices included in the wake-up scene. Automated scene control means that after the user pre-sets the expected state of one or more smart home devices in each scene, they can quickly switch between different scenes by selecting a scene. For example, when switching from the home scene to the wake-up scene, the current state of "turn on the living room lights, curtains, and air conditioners" is directly switched to the state of "open the curtains, open the sockets on the table, and open the sockets in the living room", without having to switch the execution actions of multiple smart home devices one by one.

[0037] After the parent service node obtains the device control event, if it is determined that it is currently in local proxy mode, it selects the target proxy service node according to the set proxy service node list, sends the device control event to the target proxy service node, and the target proxy service node replaces the gateway device to perform automated scene control on the smart home device. Optionally, the parent service node can be a routing device that stores a proxy service node list in the wireless mesh network. The proxy service node can also be a routing device that stores scene control information in the wireless mesh network. Among them, the proxy service node can include one or more, and the proxy service node list contains the corresponding relationship between the proxy service node and the controlled device.

[0038] The target proxy service node refers to a proxy service node that is determined based on the correspondence between the device control event and the controlled device, and the correspondence between the proxy service node and the controlled device, and that can control the corresponding controlled device to perform an action according to the current device control event. The target proxy service node is selected based on the set proxy service node list, and the proxy service node that can control the corresponding controlled device to perform an action can be selected from the proxy service node list according to the correspondence between the device control event and the controlled device, and the correspondence between the proxy service node and the controlled device, and that can be determined based on the current device control event as the target proxy service node.

[0039] Scene control information may refer to the expected status of one or more smart home devices included in each preset scene, such as the preset sleeping scene, the corresponding bedroom light 1 is turned off, the living room light 2 is turned off, and the bedroom sleeping light 3 is turned on; another example is the preset leaving home scene, the corresponding smart home devices in the whole house are turned off; another example is the movie scene, the corresponding living room light 2 is turned off, the living room atmosphere light 4 is turned on, etc. Preset multiple scenes and the corresponding working status of one or more smart home devices in each scene. When the smart switch is pressed to switch the scene, when the pressing operation of the smart switch is received, it can be determined according to the scene control information which smart home devices currently need to be controlled and which actions these smart home devices need to be controlled to perform respectively, and send corresponding control instructions to these smart home devices through the target proxy service node.

[0040] It should be noted that, for the same physical routing device, it may be a parent service node in some practical application scenarios, and may also be a proxy service node in other practical application scenarios.

[0041] In the above embodiment, after the service node obtains the device control event, if it is currently in the local proxy mode, it can select the target proxy service node according to the set proxy service node list, send the device control event to the target proxy service node, and the target proxy service node sends a control instruction to the controlled device according to the device control event and the configured scene control information to control the controlled device to perform the corresponding action. In this way, the target proxy service node is automatically selected based on the proxy service node list in the wireless mesh network, and the target proxy service node completes the control of the controlled device according to the device control event, so as not to rely on the network quality of the wide area network currently connected to the controlled device. When the network quality is poor or the gateway is offline, the proxy service node can perform the automated scene control of the smart home device, so that the automated scene control of the smart home device can be maximized, reduce network delay, and improve user experience. Since the automated scene can still be maximized after the gateway itself fails in the wireless mesh network, the user experience is greatly improved. This technical solution has the following advantages in practical applications: 1. It fully considers the energy consumption of battery-powered wireless sensors; it reduces the number of messages sent by wireless sensors as much as possible, thereby extending the battery life of wireless sensors; it greatly reduces the frequency of battery replacement and maintenance costs for users. 2. It is more flexible in utilizing the resources of nodes (such as light controllers) involved in routing forwarding in the network. This ensures that the entire system does not have single node failure and single node resource bottleneck problems. 3. It does not use broadcast messages when forwarding messages, which reduces network congestion and improves the reliability of communication.

[0042] In some embodiments, if the current state is in the local proxy mode, selecting a target proxy service node according to a set proxy service node list, and sending the device control event to the target proxy service node includes:

[0043] Determining the online status of the associated gateway of the controlled device;

[0044] When it is determined that the associated gateway device of the controlled device is in an offline state, it is confirmed that the device is currently in a local proxy mode, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node;

[0045] When it is determined that the associated gateway device of the controlled device is online, it means that it is currently in cloud control mode, and the device control event is sent to the cloud. The cloud returns the control instruction to the controlled device according to the device control event to control the controlled device to perform the corresponding action.

[0046] The associated gateway device is the gateway device that connects the controlled device to the wide area network. Figure 3 After the terminal node detects the device control event, it reports it to the parent service node. After the parent service node obtains the device control event, it determines whether the associated gateway device is currently offline. If it is determined that the gateway device is offline, it means that it is in local proxy mode. According to the set proxy service node list, the device control event is sent to the target proxy service node. Please refer to Figure 4 In the local proxy mode, the terminal node detects the device control event and reports it to the parent service node. For example, after the smart switch ③ is pressed, the "smart switch ③ press event" is reported to the parent service node ⑤ in the form of a message. The parent service node ⑤ forwards it to the proxy service node ① according to the service proxy node list and routing table. The proxy service node ① sends the control instruction of "turn on light ⑥" to the gateway 0 according to the automation scene information (the smart switch is pressed, then the light ⑥ is turned on). The gateway 0 sends the control instruction of "turn on light ⑥" to the light ⑥; after receiving the control instruction, the light ⑥ turns on itself.

[0047] In the above embodiment, when the gateway device is in an offline state, it is considered to be in local proxy mode, and the proxy service node in the wireless mesh network completes the control of the controlled device according to the device control event. In this way, when the gateway is offline, the proxy service node can still execute the automated scene control of the smart home device, so that the automated scene control of the smart home device can be maximized, reducing network delays and improving user experience.

[0048] Optionally, in some embodiments, when it is determined that the associated gateway device of the controlled device is in an online state, it means that it is currently in cloud control mode, and a device control event is sent to the cloud. The cloud returns a control instruction to the controlled device based on the device control event to control the controlled device to perform a corresponding action.

[0049] Cloud control mode refers to the mode in which the cloud and gateway perform automated scene control on smart home devices. Figure 5 In the cloud control mode, after the terminal node detects the device control event, it reports it to the parent service node ⑤. For example, after the smart switch ③ is pressed, the "smart switch ③ pressed event" is reported to the parent service node ⑤ in the form of a message. The parent service node ⑤ forwards the message to the gateway according to the reason table. Gateway 0 reports the "smart switch pressed event" to the cloud server. The cloud server sends the control instruction of "turn on light ⑥" to gateway 0 according to the automation scene information configured by the user (when the smart switch is pressed, light ⑥ turns on). Gateway 0 sends the control instruction of "turn on light ⑥" to light ⑥; after receiving the control instruction, light ⑥ turns on itself.

[0050] In the above-mentioned embodiments, the device control method of the wireless mesh network provided in the embodiments of the present application can be compatible with the cloud control mode. When the gateway device is online, it indicates that the network quality of the currently connected external network is good, so that the cloud control mode can be used to realize the automated scene control of the smart home device. When the gateway device is offline, it can automatically switch to the local proxy mode, and the target proxy service node replaces the gateway to realize the automated scene control of the smart home device. This not only ensures that the automated scene control of the smart home device can be maximized, but also effectively reduces network delay and improves user experience.

[0051] In some embodiments, if the current state is in the local proxy mode, selecting a target proxy service node according to a set proxy service node list, and sending the device control event to the target proxy service node includes:

[0052] Determine the operating status of the currently connected wide area network;

[0053] In the case where it is determined that the currently accessed wide area network is in abnormal operation, the current local proxy mode is selected, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node;

[0054] When it is determined that the currently connected wide area network is operating normally, it means that it is currently in cloud control mode, and the device control event is sent to the cloud. The cloud returns the control instruction to the controlled device according to the device control event to control the controlled device to perform the corresponding action.

[0055] The situation that the currently connected wide area network is in abnormal operation may refer to the situation that the currently connected wide area network cannot meet the needs of timely controlling the automation scene of smart home devices due to various controllable or uncontrollable reasons. Optionally, the situation that the currently connected wide area network is in abnormal operation may include at least one of the following: the network speed of the currently connected wide area network is lower than the set value, the currently connected wide area network stops service due to arrears or connection failure. Optionally, after the terminal node detects the device control event, it reports it to the parent service node. After the parent service node obtains the device control event, it determines whether the currently connected wide area network is in normal operation. When it is determined that the currently connected wide area network is in abnormal operation, it means that it is in local proxy mode, and the device control event is sent to the target proxy service node according to the set proxy service node list. When it is determined that the currently connected wide area network is in normal operation, it means that it is currently in cloud control mode, where the cloud control mode is the same as the aforementioned Figure 5 The same as shown, no further description is given here.

[0056] In the above embodiment, when the currently connected wide area network is in a state of poor network quality, or when the currently connected wide area network has stopped service, it is considered to be currently in local proxy mode, and the proxy service node in the wireless mesh network completes the control of the controlled device according to the device control event. In this way, when the currently connected wide area network cannot meet the automation scene control of the smart home device, the proxy service node can still be used to perform the automation scene control of the smart home device, so that the automation scene control of the smart home device can be maximized, reduce network delay, and improve user experience. The local proxy mode and the cloud control mode can exist compatibly. The cloud control mode is the initial mode. After the terminal node detects the device control event, it reports it to the parent service node. After the parent service node obtains the device control event, it can judge the operation status of the currently connected wide area network in real time. When the currently connected wide area network is in an abnormal operation state, the local proxy mode is intelligently selected, which can effectively reduce network delay and improve user experience.

[0057] In some embodiments, before selecting a target service proxy node according to the set proxy service node list and sending the device control event to the target proxy service node, the method further includes:

[0058] Determine whether the proxy service node list is empty;

[0059] When the proxy service node list is empty, query the service node and update the proxy service node list;

[0060] In the case that the proxy service node list is not empty, the step of selecting a target service proxy node according to the set proxy service node list and sending the device control event to the target proxy service node is performed.

[0061] The proxy service node list refers to a list of all proxy service nodes in the wireless mesh network. The proxy service node list can be obtained according to the user's configuration of the wireless mesh network, or it can be automatically selected by the local controller in the wireless mesh network according to the screening strategy. The wireless mesh network may include one or more service nodes, some of which are used to communicate with the terminal node, and are used to obtain the device control event reported by the terminal node and then forward it to the proxy service node that replaces the gateway device to perform automated scene control. This part of the nodes is called the parent service node, and the parent service node stores a proxy service node list respectively. The proxy service node may also include one or more. After receiving the device control event, the parent service node determines a proxy service node that can send a control instruction to the corresponding controlled device as the target proxy service node according to the correspondence between the proxy service node and the controlled device recorded in the proxy service node list, so as to control the corresponding controlled device to perform the corresponding action through the target proxy service node according to the scene control information. The scene control information is stored in the proxy service nodes respectively.

[0062] In the above embodiment, when the proxy service node list is empty, the parent service node can automatically query the service node in the wireless mesh network, select and determine the proxy service node based on the queried service node and update the proxy service node list, and then execute the subsequent process of forwarding the device control event in the local proxy mode and controlling the controlled device to perform the corresponding action according to the updated proxy service node list. By automatically querying and selecting the proxy service node, the automatic scene control of the smart home device can be maximized. When the proxy service node list is not empty, the subsequent process of forwarding the device control event in the local proxy mode and controlling the controlled device to perform the corresponding action is directly executed according to the existing proxy service node list, which can improve the execution efficiency.

[0063] In some embodiments, the querying service node and updating the proxy service node list includes:

[0064] broadcasting a query message of a service node to the wireless mesh network, and upon receiving a response message from at least one service node to the query message, adding the at least one service node to the proxy service node list; or,

[0065] A query message is sent to a proxy service node in the wireless mesh network, and when a response message of at least one proxy service node to the query message is received, the at least one proxy service node is added to the proxy service node list.

[0066] Broadcasting a query message of a service node to the wireless mesh network may refer to sending a query message of a service node in a message broadcast manner in the wireless mesh network. When a parent service node receives a device control event reported by a terminal node and is currently in a local proxy mode, and the proxy service node list is empty, the parent service node may send a query message in a broadcast message manner, and the proxy service node returns a response message to the parent service node after receiving the broadcast query message. When the parent service node receives the response message returned by the proxy service node, the proxy service node is added to the proxy service node list to complete the query service node and update the proxy service node list.

[0067] When the parent service node receives a device control event reported by the terminal node and is currently in local proxy mode, and the proxy service node list is empty, the parent service node may send a query message to the proxy service node in the wireless mesh network. After receiving the query message, the proxy service node returns a reply message to the parent service node. When the parent service node receives the reply message returned by the proxy service node, the proxy service node is added to the proxy service node list to complete the query service node and update the proxy service node list.

[0068] In the above embodiment, when the parent service node is unable to obtain the configuration information of the wireless mesh network, the parent service node can automatically query the proxy service node and update the proxy service node list by broadcasting a query message, thereby ensuring that the automated scene control of the smart home device can be maximized; when the parent service node is able to obtain the configuration information of the wireless mesh network, the parent service node can automatically query the proxy service node and update the proxy service node list by sending a query message to the candidate proxy service node, thereby ensuring that the automated scene control of the smart home device can be maximized.

[0069] In some embodiments, the querying service node and updating the proxy service node list further includes:

[0070] When no response message is received from the proxy service node for the query message, determining whether the own node is a proxy service node;

[0071] If so, the node itself is used as a proxy service node and added to the proxy service node list.

[0072] When the parent service node receives the device control event reported by the terminal node and is currently in the local proxy mode, and the proxy service node list is empty, the parent service node may query the wireless mesh network in the form of a broadcast message, or send a query message to the candidate proxy service node of the wireless mesh network. If the parent service node does not receive a response message returned by the proxy service node for the query message, it determines whether it is a proxy service node. If so, it adds itself to the proxy service node list as a proxy service node. The parent service node does not receive the response message returned by the proxy service node for the query message, which may include the following situations: there are no other proxy service nodes in the wireless gateway network, the communication connection between the proxy service node and the parent service node in the wireless gateway network is abnormal, etc.

[0073] In the above embodiment, when the parent service node cannot query other proxy service nodes, the parent node is added to the proxy service node list according to whether the parent node is a service node, which can ensure that the automated scene control of the smart home device can be maximized.

[0074] In some embodiments, the method further comprises:

[0075] When update information for updating the scene control information is received, the update information is sent to the target proxy service node for synchronous update.

[0076] A scene refers to the expected state of one or more smart home devices included in each preset scene. The scene control information includes the correspondence between the device control event and the expected state of the controlled device. When the terminal node receives a device control event, it can determine which smart home devices are controlled to switch to the expected state according to the device control event according to the scene control information. Usually, the user can install an application for managing smart home devices on the terminal device, configure the scene through the application on the terminal device, the terminal device forms the scene control information according to the configuration operation, and synchronously stores the scene control information in the gateway device and the proxy service node. The user can also modify the set scene in the application on the terminal device, or modify the set scene on the terminal node, such as adding, reducing or modifying the expected state of one or more smart home devices corresponding to a device control event in a known scene. The terminal device or the terminal node respectively forms the scene control information according to the modification operation, and synchronously stores the scene control information in the gateway device and the proxy service node. Here, the update information for updating the scene control information includes: scene control information formed by the user configuring the scene on the terminal device, scene control information formed by the application on the terminal device modifying the set scene, and / or scene control information formed by modifying the set scene on the terminal node.

[0077] In the above embodiment, when the scene control information is updated, the proxy service node will promptly and synchronously update the stored scene control information to ensure that in the local proxy mode, the target proxy service node accurately controls the controlled device to perform corresponding actions according to the device control event and the configured scene control information.

[0078] Optionally, when receiving update information for updating the scene control information, sending the update information to the target proxy service node for synchronous update includes:

[0079] Receiving modification information or version update instruction of the scene control information;

[0080] Determining whether the scene control information stored in the proxy service node is the latest data based on the proxy service node list according to the modification information or the version update instruction;

[0081] When the scene control information stored in the proxy service node is not the latest data, the scene control information is synchronously updated according to the modification information or the version update instruction.

[0082] Wherein, updating the scene control information may include modification information or version update instructions for the scene control information. After receiving the modification information or version update instructions for the scene control information, the parent service node may notify the proxy service node according to the proxy service node list to query whether the scene control information stored by itself is the latest data. If the scene control information in the proxy service node is not the latest data, the parent service node will send the modification information or the version update instructions to the proxy service node to synchronize the scene control information. Wherein, receiving the modification information or version update instructions for the scene control information in the wireless mesh network may be that the parent service node receives the modification information or version update instructions reported by the terminal node, or the parent service node receives the modification information or version update instructions sent by the user through the gateway using the terminal device. The version update instruction may mean that the user can pre-configure the version of the scene in the application of the terminal device, and the application page of the terminal device may be provided with an update button, and the user clicks the update button to form a version update instruction; or the user can pre-configure the version of the scene in the application of the terminal device, and pre-configure the specified operation of the terminal node, such as double-clicking the panel switch button to form a version update instruction.

[0083] In the above embodiments, when the user uses the application on the terminal device to modify the information or update the version of the scene control information, or when the terminal node modifies or updates the scene control information, the proxy service node will promptly and synchronously update the stored scene control information to ensure that in the local proxy mode, the target proxy service node accurately controls the controlled device to perform corresponding actions according to the device control event and the configured scene control information.

[0084] In order to have a more comprehensive understanding of the device control method based on wireless mesh network provided by this application, please refer to Figure 6 The following is an optional specific example of a device control method for a wireless mesh network, which includes:

[0085] S11, the terminal node receives the device control event and reports it to the parent service node; for example, the wireless switch is pressed and the "wireless switch pressing event" is reported to the parent service node;

[0086] S12, the parent service node determines that the gateway device is currently offline, and forwards the device control event to the proxy service node according to the set proxy service node list; wherein, when the parent service node reports the event from the terminal node to the gateway and the cloud server, if it is determined that the parent service node and the gateway are disconnected, the parent service node can find the automation scene service node according to the service node discovery process, please refer to Figure 7 , the service node discovery process includes the following steps:

[0087] S121, power on / on demand; for example, when the parent service node is powered on or when the parent service node determines that it is currently in local proxy mode.

[0088] S122, determine whether the service node list is empty; if so, execute S123, if not, execute S129;

[0089] S123, query service node;

[0090] S124: Is a response from the service node received? If yes, execute S128; if no, execute S125;

[0091] S128, refresh the service node list; and execute S129.

[0092] S125, determining whether the node is a service node;

[0093] If yes, S126, upgrade the node to a proxy service node; S127, refresh the service node list and broadcast;

[0094] If not, S129 ends.

[0095] S13, the proxy service node controls the corresponding controlled device to perform corresponding actions according to the scene control information. The scene control information can be synchronized according to the scene list synchronization process, please refer to Figure 8 , the scene list synchronization process includes:

[0096] S131, after the user modifies the duration of the scene list; or S132, after receiving the version number reported by the scene list;

[0097] S133, querying the version number of the current scene control information according to the service node list;

[0098] S134, determining whether the version number of the scene control information is smaller than the current version number;

[0099] If yes, S135, synchronize the latest data to the corresponding proxy service node;

[0100] If not, S136, the distribution synchronization ends.

[0101] In the above-mentioned embodiments of the present application, after the gateway device in the wireless mesh network fails, the automated scene control of the smart home devices can still be executed to the maximum extent, which greatly improves the user experience; secondly, for the terminal nodes in the wireless mesh network include wireless sensors, a device control event detected by the wireless sensor can realize the switching of the expected state of one or more smart home devices in the scene, which can minimize the number of messages sent by the wireless sensor, extend the battery life of the wireless sensor, and reduce the frequency of battery replacement and maintenance costs of users; thirdly, for the service nodes participating in routing forwarding in the wireless mesh network (such as controllers of various smart home devices), resource utilization is more flexible, making it more systematic without single node failure or single node resource bottleneck problems; thirdly, in the process from the terminal node obtaining the device control event to controlling the corresponding controlled node device to perform the corresponding action, there is no need to forward the device control event in the form of a broadcast message, which reduces network congestion, reduces network latency, and improves the reliability of communication and control.

[0102] See also Fig. 9 On the other hand, the present application also provides a device control apparatus based on a wireless mesh network, including an acquisition module 11 for acquiring device control events; and an agent module 13 for, if currently in local agent mode, selecting a target agent service node according to a set agent service node list, and sending the device control event to the target agent service node, and the target agent service node sending a control instruction to the controlled device according to the device control event and the configured scene control information, so as to control the controlled device to perform a corresponding action.

[0103] The proxy module 13 is used to select a target proxy service node according to a set proxy service node list and send the device control event to the target proxy service node when it is determined that the associated gateway device of the controlled device is in an offline state.

[0104] The proxy module 13 is used to select a target service proxy node according to a set proxy service node list and send the device control event to the target proxy service node when it is determined that the currently accessed wide area network is in abnormal operation and is currently in local proxy mode.

[0105] The device control apparatus further includes a node query module, which is used to determine whether the proxy service node list is empty; if the proxy service node list is empty, query the service node and update the proxy service node list; if the proxy service node list is not empty, execute the step of sending the device control event to the target proxy service node according to the set proxy service node list.

[0106] The node query module is specifically used to broadcast a query message of a service node to the wireless mesh network, and when a response message from at least one service node to the query message is received, add the at least one service node to the proxy service node list; or, send a query message to a proxy service node in the wireless mesh network, and when a response message from at least one proxy service node to the query message is received, add the at least one proxy service node to the proxy service node list.

[0107] The node query module is also used to determine whether the own node is a proxy service node when no response message is received from the proxy service node for the query message; if so, take the own node as a proxy service node and add it to the proxy service node list.

[0108] The device control apparatus further comprises a scene updating module, which is used to send the updating information to the target proxy service node for synchronous updating when the updating information for updating the scene control information is received.

[0109] The scene update module is also used to receive modification information or version update instructions for the scene control information; determine whether the scene control information stored in the proxy service node is the latest data based on the proxy service node list according to the modification information or version update instructions; when the scene control information stored in the proxy service node is not the latest data, synchronously update the scene control information according to the modification information or the version update instruction.

[0110] It should be noted that: the device control device based on the wireless mesh network provided in the above embodiment only uses the division of the above program modules as an example to illustrate the process of realizing scene monitoring. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the method steps described above. In addition, the device control device based on the wireless mesh network provided in the above embodiment and the device control method embodiment based on the wireless mesh network belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0111] On the other hand, please refer to Fig.10 , also provides a routing device, including a processor 211 and a memory 212, the memory 212 stores a computer program that can be executed by the processor, and when the computer program is executed by the processor 211, it implements the device control method based on the wireless mesh network provided in any embodiment of the present application, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0112] On the other hand, the present application also provides a wireless mesh network, including a terminal node, a parent service node connected to the terminal node in communication, and a controlled device connected to the parent service node in communication, wherein the parent service node stores a list of proxy service nodes, the terminal node is used to obtain device control events, and report the device control events to the parent service node, and the parent service node is used to execute the device control method based on the wireless mesh network provided in any embodiment of the present application. Please refer again Figure 1 The wireless mesh network further includes a proxy service node that is communicatively connected to the parent service node, and the proxy service node stores scene control information. The wireless mesh network further includes a gateway device, and the parent service node accesses a wide area network through the gateway device. The terminal node may be at least one of the following: a wireless sensor, a smart switch, and a smart socket.

[0113] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the multi-mode configuration method embodiment of the above-mentioned intelligent control panel is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A device control method based on a wireless mesh network, characterized in that: include: Obtain device control events reported by terminal nodes in the wireless mesh network; If the local proxy mode is currently in place, the proxy service node that can control the corresponding controlled device to perform an action is selected from each proxy service node as the target proxy service node according to the corresponding relationship between the device control event and the controlled device, and the corresponding relationship between the proxy service node and the controlled device; the local proxy mode refers to a mode in which the proxy service node in the wireless mesh network controls the controlled device connected to the wireless mesh network instead of the associated gateway device when the associated gateway device corresponding to the controlled device in the device control event and / or the network currently accessed by the controlled device is abnormal; The associated gateway device refers to a gateway device that connects the controlled device to a wide area network; The device control event is sent to the target proxy service node, and the target proxy service node sends a control instruction to the controlled device through the wireless mesh network according to the device control event and the configured scene control information, so as to control the controlled device to perform a corresponding action.

2. The device control method according to claim 1, characterized in that: If the current mode is in the local proxy mode, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node, including: Determining the online status of the associated gateway of the controlled device; When it is determined that the associated gateway device of the controlled device is in an offline state, it is confirmed that the device is currently in a local proxy mode, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node; When it is determined that the associated gateway device of the controlled device is online, it means that it is currently in cloud control mode, and the device control event is sent to the cloud. The cloud returns the control instruction to the controlled device according to the device control event to control the controlled device to perform the corresponding action.

3. The device control method according to claim 1, characterized in that: If the current mode is in the local proxy mode, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node, including: Determine the operating status of the currently connected wide area network; If it is determined that the currently connected wide area network is in abnormal operation, it is confirmed that it is currently in local proxy mode, a target proxy service node is selected according to a set proxy service node list, and the device control event is sent to the target proxy service node; When it is determined that the currently connected wide area network is operating normally, it means that it is currently in cloud control mode, and the device control event is sent to the cloud. The cloud returns the control instruction to the controlled device according to the device control event to control the controlled device to perform the corresponding action.

4. The device control method according to claim 1, characterized in that: Before selecting a target service proxy node according to the set proxy service node list and sending the device control event to the target proxy service node, the method further includes: Determine whether the proxy service node list is empty; When the proxy service node list is empty, query the service node and update the proxy service node list; In the case that the proxy service node list is not empty, the step of selecting a target service proxy node according to the set proxy service node list and sending the device control event to the target proxy service node is performed.

5. The device control method according to claim 4, characterized in that: The querying service node and updating the proxy service node list includes: broadcasting a query message of a service node to the wireless mesh network, and upon receiving a response message from at least one service node to the query message, adding the at least one service node to the proxy service node list; or, A query message is sent to a proxy service node in the wireless mesh network, and when a response message of at least one proxy service node to the query message is received, the at least one proxy service node is added to the proxy service node list.

6. The device control method according to claim 5, characterized in that: The querying service node and updating the proxy service node list further includes: When no response message is received from the proxy service node for the query message, determining whether the own node is a proxy service node; If so, the node itself is used as a proxy service node and added to the proxy service node list.

7. The device control method according to any one of claims 1 to 6, characterized in that: The method further comprises: When update information for updating the scene control information is received, the update information is sent to the target proxy service node for synchronous update.

8. The device control method according to claim 7, characterized in that: The step of sending the update information to the target proxy service node for synchronous update upon receiving the update information for updating the scene control information comprises: Receiving modification information or version update instruction of the scene control information; Determining whether the scene control information stored in the proxy service node is the latest data based on the proxy service node list according to the modification information or the version update instruction; When the scene control information stored in the proxy service node is not the latest data, the scene control information is synchronously updated according to the modification information or the version update instruction.

9. A device control device based on a wireless mesh network, characterized in that: include: An acquisition module, used to acquire device control events reported by terminal nodes in the wireless mesh network; The proxy module is used for, if currently in the local proxy mode, selecting a proxy service node that can control the corresponding controlled device to perform an action from each proxy service node as a target proxy service node according to the corresponding relationship between the device control event and the controlled device and the corresponding relationship between the proxy service node and the controlled device, sending the device control event to the target proxy service node, and the target proxy service node sending a control instruction to the controlled device through the wireless mesh network according to the device control event and the configured scene control information, so as to control the controlled device to perform the corresponding action; In the device control event, when the associated gateway device corresponding to the controlled device and / or the network currently accessed by the controlled device is abnormal, the proxy service node in the wireless mesh network replaces the associated gateway device to control the controlled device accessing the wireless mesh network; The associated gateway device refers to a gateway device that connects the controlled device to a wide area network.

10. A routing device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, the device control method based on a wireless mesh network as claimed in any one of claims 1 to 8 is implemented.

11. A wireless mesh network system, characterized in that: It includes a terminal node, a parent service node communicatively connected to the terminal node, and a controlled device communicatively connected to the parent service node, wherein the parent service node stores a list of proxy service nodes, the terminal node is used to obtain device control events, and report the device control events to the parent service node, and the parent service node is used to execute the device control method based on a wireless mesh network as described in any one of claims 1 to 8.

12. The wireless mesh network system according to claim 11, wherein: The wireless mesh network system further includes a proxy service node that is communicatively connected to the parent service node, and the proxy service node stores scene control information.

13. The wireless mesh network system according to claim 11, wherein: The wireless mesh network system further includes a gateway device, and the parent service node accesses the wide area network through the gateway device.

14. The wireless mesh network system according to claim 11, wherein: The terminal node is at least one of the following: a wireless sensor, a smart switch, and a smart socket.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the controller, the device control method based on the wireless mesh network according to any one of claims 1 to 8 is implemented.