Mesh network topology management method, device and equipment
By selecting the optimal gateway device in the Mesh network for data transmission, the problems of high data communication cost and network congestion are solved, and efficient data transmission and stable network communication are achieved.
Patent Information
- Application Number
- CN202510283283.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-01
AI Technical Summary
In the existing Mesh network, when node devices send data to the server, there are problems such as high data communication costs and high service costs on the server. When servers send data to node devices, network congestion and transmission delays are likely to occur.
By obtaining network information between the gateway device and the node device, selecting the optimal gateway device for data transmission, avoiding redundancy and interference caused by multiple communication paths, and using collaborative management of network topology to optimize data transmission paths.
Effectively reduce data communication costs and server-side service costs, improve data transmission efficiency and user experience, and avoid network congestion and transmission delay.
Smart Images

Figure CN120238915A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network management technologies, and specifically to a method and apparatus for managing a mesh network topology, and an electronic device. Background Art
[0002] With the development of whole-house intelligent applications, there are more and more devices with gateway capabilities such as central control screens and speakers in the whole-house space. At the same time, considering factors such as wiring, cost, and local control response, the local and timely response advantages of the mesh network (Mesh network) make it gradually become the mainstream. Especially, gateway devices have multiple communication integration capabilities and can combine other reliable connection methods to further enhance the capabilities of the Mesh network.
[0003] In a physical space, there may be multiple gateway devices (such as central control screens, speakers, etc.) and multiple node devices (such as smart lights, smart curtains, smart locks, etc.) in the Mesh network topology. The node devices communicate with the server (such as the cloud IoT cloud platform, application system server, etc.) through the gateway devices. The gateway devices allow the node devices to upload data, and remote instructions can also be sent to the local node devices through the gateway devices. For the node devices, the node messages are sent in a broadcast manner, and as long as they are within the Mesh network range (within the communication range or within the range that can be covered through relays), all gateway devices can receive them. Similarly, when the gateway devices send messages, they also send them in a broadcast manner, and all node devices within the network range can receive the messages. Currently, when the node data of the local Mesh network needs to be synchronized to the server, each gateway device that receives the message has to report the data to the server; when the server sends messages through the gateway devices, multiple paths will also be formed for sending based on the Mesh network topology to ensure network reliability.
[0004] However, the inventors found that the above existing Mesh network topology management solutions have at least the following problems: 1) When the node data of the local Mesh network needs to be synchronized to the server, since each gateway device has to report the data to the server, a large amount of redundant data will be reported to the server, thereby increasing the data communication cost. And since the server has to handle abnormal problems such as a large amount of data aggregation, the service cost of the server is increased; 2) When the server sends messages through the gateway devices, due to the Mesh network topology, each gateway device has to send messages to the node devices in a broadcast manner. If the multiple sending paths formed are in the same physical space, it will cause a large amount of interference to the wireless signals in the air, resulting in wireless conflicts, transmission failures, network congestion, and transmission delays.
[0005] In summary, when a node device sends data to a server, how to reduce the data communication cost and the service cost of the server; when the server sends data to a node device, how to reduce network congestion to improve data transmission efficiency are problems that urgently need to be studied and tackled. Summary of the Invention
[0006] The present application provides a grid network topology management method to solve the problem of high data communication cost and server service cost when a node device sends data to a server in the prior art. The present application further provides a grid network topology management method to solve the problem of low data transmission efficiency caused by network congestion when the server sends data to a node device in the prior art. The present application further provides a grid network topology management device and system, as well as an electronic device.
[0007] The present application provides a grid network topology management method for a gateway device in a grid network. The grid network includes a plurality of the gateway devices and a plurality of node devices, and the method includes:
[0008] Obtaining first network information between each of the plurality of gateway devices and a node device;
[0009] Obtaining first target data;
[0010] Selecting a first target gateway device from the plurality of gateway devices according to the first network information, and sending the first target data to a target node device through the first target gateway device.
[0011] Optionally, the first network information includes at least one of the following information: a first connection state between a node device and a gateway device, a relay hop count between a node device and a gateway device, and a signal strength of a node device with respect to a gateway device;
[0012] The selecting a first target gateway device from the plurality of gateway devices according to the first network information includes at least one of the following processes:
[0013] Selecting a gateway device connected to the target node device according to the first connection state;
[0014] Selecting a gateway device that meets the relay hop count condition with the target node device according to the relay hop count;
[0015] Selecting a gateway device that meets the signal strength condition with the target node device according to the signal strength.
[0016] Optionally, the first network information includes: a proxy channel construction state of a node device;
[0017] Selecting a first target gateway device from the multiple gateway devices according to the first network information includes:
[0018] Selecting a gateway device that has established a proxy channel with the target node device according to the proxy channel construction status.
[0019] Optionally, the first network information includes: the first data transmission delay between the node device and the gateway device;
[0020] Selecting a first target gateway device from the multiple gateway devices according to the first network information includes:
[0021] Selecting a gateway device that meets the data transmission delay condition with the target node device according to the first data transmission delay.
[0022] Optionally, it further includes:
[0023] Obtaining second network information between each of the multiple gateway devices and the server;
[0024] Selecting a second target gateway device from the multiple gateway devices according to the second network information to communicate with the server through the second target gateway device.
[0025] Optionally, the second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server;
[0026] Selecting a second target gateway device from the multiple gateway devices according to the second network information includes at least one of the following processes:
[0027] Selecting a gateway device that meets the data transmission delay condition with the server according to the second data transmission delay;
[0028] Selecting a gateway device that meets the consecutive packet loss count condition with the server according to the consecutive packet loss count.
[0029] Optionally, obtaining first target data includes:
[0030] Receiving first target data sent by the server to the target node device through the second target gateway device.
[0031] Optionally, it further includes:
[0032] Receiving second target data sent by the node device to the server;
[0033] Communicating with the server through the second target gateway device includes:
[0034] Send the second target data to the server through the second target gateway device.
[0035] Optionally, obtaining the first target data includes:
[0036] Receive the first target data sent by the server to the target node device.
[0037] Optionally, the mesh network includes a Bluetooth mesh network, the gateway device includes a Bluetooth mesh gateway device, the node device includes a Bluetooth mesh node device, and the server includes an Internet of Things server.
[0038] Optionally, obtaining the first network information between multiple gateway devices and node devices respectively includes:
[0039] Obtain the first network information of the node device and provide the first network information to other gateway devices in the mesh network;
[0040] Receive the first network information provided by the other gateway devices.
[0041] Optionally, obtaining the second network information between multiple gateway devices and the server respectively includes:
[0042] Obtain the second network information between the gateway device and the server, and provide the second network information between the gateway device and the server to other gateway devices in the mesh network;
[0043] Receive the second network information between the other gateway devices and the server provided by the other gateway devices.
[0044] This application also provides a mesh network topology management method for a gateway device in a mesh network. The mesh network includes multiple gateway devices and multiple node devices, and includes:
[0045] Obtain the second network information between the multiple gateway devices and the server;
[0046] Select a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
[0047] Optionally, the second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server;
[0048] The selecting a second target gateway device from the multiple gateway devices according to the second network information includes at least one of the following processes:
[0049] Select a gateway device that meets the data transmission delay condition with the server according to the second data transmission delay;
[0050] Select a gateway device that meets the continuous packet loss count condition with the server according to the continuous packet loss count.
[0051] Optionally, it further includes:
[0052] Receive the first target data sent by the server to the target node device through the second target gateway device.
[0053] Optionally, it further includes:
[0054] Receive the second target data sent by the node device to the server;
[0055] The communication with the server through the second target gateway device includes:
[0056] Send the second target data to the server through the second target gateway device.
[0057] This application also provides a mesh network topology management device for gateway devices in a mesh network. The mesh network includes multiple gateway devices and multiple node devices, and includes:
[0058] A first network information acquisition unit for acquiring first network information between multiple gateway devices and node devices respectively;
[0059] A data acquisition unit for acquiring first target data;
[0060] A second gateway device selection unit for selecting a first target gateway device from the multiple gateway devices according to the first network information, so as to send the first target data to the target node device through the first target gateway device.
[0061] This application also provides a mesh network topology management device for gateway devices in a mesh network. The mesh network includes multiple gateway devices and multiple node devices, and includes:
[0062] A second network information acquisition unit for acquiring second network information between multiple gateway devices and the server respectively;
[0063] A second gateway device selection unit for selecting a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
[0064] This application also provides an electronic device, including:
[0065] a processor; and
[0066] a memory for storing a program for implementing the method according to any one of the above, the device being powered on and running the program of the method through the processor.
[0067] This application provides an electronic device, comprising:
[0068] a processor; and
[0069] a memory for storing a program for implementing the method according to any one of the above, the device being powered on and running the program of the method through the processor.
[0070] This application further provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on a computer, the computer is caused to execute the above various methods.
[0071] This application further provides a computer program product comprising instructions, and when the computer program product is run on a computer, the computer is caused to execute the above various methods.
[0072] Compared with the prior art, this application has the following advantages:
[0073] The grid network topology management method provided by the embodiment of this application is used for a gateway device in a grid network. The grid network includes a plurality of gateway devices and a plurality of node devices. The method includes obtaining first network information between each of the plurality of gateway devices and the node devices; obtaining first target data; and selecting a first target gateway device from the plurality of gateway devices according to the first network information, so as to send the first target data to a target node device through the first target gateway device. By adopting this processing method, not only can the stability of network communication in the physical space be ensured, but also when sending data to the node device, multiple gateway devices can collaboratively manage the network topology, select a better gateway device among them to send the data to the node device, so that there is only one communication link in the same physical space, and there will be no interference of wireless signals in the air, and thus there will be no network congestion and transmission delay; therefore, the data transmission efficiency and user experience can be effectively improved.
[0074] The mesh network topology management method provided by the embodiments of the present application is used for gateway devices in a mesh network. The mesh network includes multiple gateway devices and multiple node devices. This method obtains the second network information between the multiple gateway devices and the server; according to the second network information, a second target gateway device is selected from the multiple gateway devices to communicate with the server through the second target gateway device. By adopting this processing method, not only can the stability of network communication in the physical space be ensured, but also when data is transmitted between the server and the node devices, multiple gateway devices can cooperate to manage the network topology, select a better gateway device among them to communicate with the server, and avoid each gateway device communicating with the server. Therefore, the data communication cost, the service cost of the server, and the service cost of the gateway device can be effectively reduced. Specifically, when a node device sends data to the server, it avoids each gateway device sending data to the server, eliminates redundant data in data communication, and the server will not have abnormal problems caused by a large amount of data aggregation. Therefore, the data communication cost and the service cost of the server can be effectively reduced, thereby improving the real-time performance of the network and ensuring the reliability of the mesh network. When the server sends data to the node devices, it avoids sending data to each gateway device, eliminates redundant data in data communication, and only one gateway device needs to receive and process the data. Therefore, the data communication cost and the service cost of the gateway device can be effectively reduced. Description of the Drawings
[0075] Figure 1 Flow schematic diagram of an embodiment of the mesh network topology management method provided by the present application;
[0076] Figure 2 Mesh network schematic diagram of an embodiment of the mesh network topology management method provided by the present application;
[0077] Figure 3 Gateway device connection schematic diagram of an embodiment of the mesh network topology management method provided by the present application;
[0078] Figure 4 Schematic diagram of multiple gateway devices working together in an embodiment of the mesh network topology management method provided by the present application;
[0079] Figure 5 Data transmission link schematic diagram between a gateway device and a node device in an embodiment of the mesh network topology management method provided by the present application;
[0080] Figure 6 Data transmission link schematic diagram between a gateway device and a server in an embodiment of the mesh network topology management method provided by the present application;
[0081] Figure 7Flow chart of an embodiment of the mesh network topology management method provided in this application. Detailed implementation manners
[0082] In the following description, many specific details are set forth in order to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotions without departing from the connotation of this application. Therefore, this application is not limited by the specific implementations disclosed below.
[0083] In this application, a mesh network topology management method and apparatus, and an electronic device are provided. Various solutions will be described in detail in each of the following embodiments.
[0084] First Embodiment
[0085] Please refer to Figure 1 , which is a flow chart of the mesh network topology management method of this application. In this embodiment, the method may include the following steps:
[0086] Step S101: Obtain first network information between multiple gateway devices and node devices respectively.
[0087] The mesh network topology management method provided in the embodiments of this application is used for gateway devices in a mesh network. A mesh network is a Mesh network, which includes multiple gateway devices and multiple node devices, and each gateway device can be the execution subject of the method provided in the embodiments of this application.
[0088] A Mesh network does not rely on a certain central device (hub device) and has the characteristic of decentralization. Even if some nodes fail, information can still be transmitted through other nodes, and it can achieve powerful concurrent multicast communication in a network with thousands of nodes, with relatively high communication efficiency and stability. For example, the Mesh network is a Bluetooth Mesh network, which uses low-power Bluetooth as the information carrier method. Through self-organizing network technology, Bluetooth devices can be used as gateway devices. By establishing a low-power network for multi-to-multi device communication, multiple nodes in the same physical space can be closely connected together to achieve interconnection and interoperability between devices. Each device can directly or indirectly connect to other devices, and the signal is transmitted through nearby devices to form a stable full-coverage communication network. The Bluetooth gateway device and the Bluetooth node device in the Bluetooth Mesh network communicate via Bluetooth. The Bluetooth node device communicates with the server through the Bluetooth gateway device.
[0089] The gateway device in a Mesh network is a relatively powerful network device capable of managing the local network. Gateway devices usually have multiple communication integration capabilities, that is, they can communicate with node devices via short-range wireless means, and can also combine other reliable connection methods such as network cables, wireless WiFi, or power lines to further enhance the capabilities of the Mesh network. The gateway device enables node devices to upload data, and remote instructions can also be sent to local node devices through the gateway device. In practical applications, the gateway device can be a central control screen, smart speaker, smart TV, etc. At the same time, the gateway device itself can also act as a node device, such as a smart speaker, smart TV, etc.
[0090] Node devices in a Mesh network can communicate with the gateway device via short-range wireless means. If a node device only has limited communication integration capabilities, it cannot act as a gateway device, such as smart lights, smart curtains, smart door locks, etc. If a node device has multiple communication integration capabilities, it can also act as a gateway device, such as a smart speaker, smart TV, etc.
[0091] The gateway device in a Mesh network enables node devices to upload data to the server, and at the same time, remote instructions from the server can also be sent to local node devices through the gateway device. The server can be a device that provides services to node devices, such as the cloud platform (abbreviated as the cloud) in the Internet of Things (IoT), the server of any application system, etc.
[0092] Taking the Internet of Things as an example, users can remotely control smart devices (such as air purifiers, etc.) in their homes through an application installed in the user device (such as a mobile phone APP). The smart devices can upload device data to the IoT cloud platform, and the IoT cloud platform can send control instructions to the smart devices. As Figure 2 shown, multiple smart devices in the user's home form a Mesh network, which includes multiple gateway devices, such as Figure 2 the central control, central control 1, central control 2, central control 3, and the mobile phone App in it. In addition, the network also includes multiple node devices, such as Figure 2 T1 to T24 in it, among which node devices with triggering capabilities such as switch panels, and devices with execution capabilities such as smart lights, etc. As Figure 3 shown, the four central controls (the aforementioned central control, central control 1, central control 2, central control 3) in the same physical space can be connected through communication methods such as network cables, wireless WiFi, or power lines to transmit data to each other.
[0093] Any gateway device in the Mesh network can be the execution subject of the method provided by the embodiments of the present application. In the case where there are multiple gateway devices in a certain physical space, the multiple gateway devices cooperate to uniformly manage the network topology of the node devices under the entire physical space. For this purpose, the gateway device needs to obtain the first network information between each of the multiple gateway devices in the Mesh network and its surrounding node devices, so that each gateway device obtains the first network information between all gateway devices and their surrounding node devices.
[0094] Each gateway device can sense the network information of its surrounding node devices and use this network information as the first network information between the gateway device and the surrounding node devices. The first network information includes at least one of the following information: the first connection state between the node device and the gateway device, the relay hop count between the node device and the gateway device, the signal strength of the node device with respect to the gateway device, the proxy channel construction state between the node device and the gateway device, and the first data transmission delay between the node device and the gateway device. The first connection state can be connected or not connected. The proxy channel construction state refers to whether the node device is a proxy node. If the node device is a proxy node, a proxy channel is established between the gateway device and the node device, and the communication rate between the two is faster. The first data transmission delay (RTT value) can be the time interval from when the gateway device initiates a query to when it receives a response from the specified node device, specifically, it can be the average RTT value, the maximum RTT value, etc.
[0095] As Figure 4 shown, each gateway device obtains the first network information between all gateway devices and their surrounding node devices. The specific first network information is as follows. Figure 2 In the Mesh network, the relay hop count between the central control and the node devices T7, T10, T14 - T17, D11, D13 - D21 is one hop, the relay hop count between the central control and T4, T5, T8 - T9, T11 - T13, T18 - T22 is two hops, and the relay hop count between the central control and T1 - T3, T6, T23, and T24 is three hops. The relay hop count between central control 1 and the node devices T3, T5 - T7, D1 - D6, D11 is one hop, and so on. It can be seen that the first network information between all gateway devices in the Mesh network and the node devices respectively includes the network information between each gateway device and each node device.
[0096] In one example, step S101 can be implemented in the following manner: The gateway device obtains the first network information of its surrounding node devices and provides this first network information to other gateway devices in the mesh network; and, the gateway device receives the first network information provided by other gateway devices. Specifically, when the gateway device senses that the first network information of its surrounding node devices has changed, it synchronizes this network information to other gateway devices.
[0097] Step S103: Obtain the first target data.
[0098] The first target data can be data that the gateway device wants to send to the node device, such as a control instruction or configuration data, etc.
[0099] The first target data can also be the first target data sent by the server to the target node device. In this case, step S103 can be implemented in the following manner: Receive the first target data sent by the server to the target node device. Taking the server as the IoT cloud platform as an example, the gateway device can receive device control instructions or device configuration data, etc., sent by the IoT cloud platform to the smart devices in the user's home as the first target data.
[0100] Step S105: Select a first target gateway device from the multiple gateway devices according to the first network information, so as to send the first target data to the target node device through the first target gateway device.
[0101] When the gateway device obtains the first target data, it may not directly send this data, but instead, in combination with the first network information of its surrounding node devices maintained by all gateway devices, select a gateway device with a more suitable communication link to the target node device as the first target gateway device. For example Figure 5 as shown, if the gateway device that executes the method provided in the embodiment of the present application selects itself and finds that it is not a more suitable gateway device for sending the first target data, it will not send the first target data into the air, thereby making the processing of the first target data by the gateway device more efficient.
[0102] In one example, the first network information includes at least one of the following information: the first connection state between the node device and the gateway device, the relay hop count between the node device and the gateway device, the signal strength of the node device with respect to the gateway device; step S105 may include at least one of the following processes: Select the gateway device connected to the target node device according to the first connection state; Select the gateway device that meets the relay hop count condition with the target node device according to the relay hop count; Select the gateway device that meets the signal strength condition with the target node device according to the signal strength.
[0103] The first network information includes: the first connection status between the node device and the gateway device; step S105 may include the following processing: according to the first connection status, select the gateway device connected to the target node device. Adopting this processing method enables checking the online or offline status of the peripheral node devices of the gateway device. Online (connected to this gateway device) indicates that normal communication can be established between the gateway device and the target node device, and offline (not connected to this gateway device) indicates that normal communication cannot be established. Gateway devices detected with the target node device being "offline" can be excluded.
[0104] The first network information includes: the relay hop count between the node device and the gateway device; step S105 may include the following processing: according to the relay hop count, select the gateway device that meets the relay hop count condition with the target node device. The relay hop count condition may be that the relay hop count is less than the hop count threshold. The fewer the relay hop counts, the fewer relays the gateway device needs to pass through to reach the target node device, and the shorter the distance. Adopting this processing method can exclude gateway devices that do not meet the relay hop count condition, such as excluding gateway devices with a larger hop count.
[0105] The first network information includes: the signal strength of the node device with respect to the gateway device; step S105 may include the following processing: according to the signal strength, select the gateway device that meets the signal strength condition with the target node device. The signal strength condition may be that the signal strength is less than the signal strength threshold. Adopting this processing method can exclude gateway devices with a smaller detected signal strength of the target node device. For example, if there are multiple gateway devices that are one hop away from the target node device, then exclude the gateway devices with a smaller detected signal strength of the target node device.
[0106] In another example, the first network information may include: the proxy channel construction status of the node device; step S105 may include the following processing: according to the proxy channel construction status, select the gateway device that has established a proxy channel with the target node device. Adopting this processing method can select the gateway device that has established a proxy channel with the target node device. For example, if there are multiple gateway devices that are one hop away from the target node device and have good signal strength, the gateway device that has established a Proxy proxy channel with the target node device can be selected, and the communication rate between this gateway device and the target node device is faster.
[0107] In yet another example, the first network information may include: the first data transmission delay (RTT) between the node device and the gateway device; step S105 may include the following processing: according to the first data transmission delay, select a gateway device that meets the data transmission delay condition with the target node device. The data transmission delay condition may be that the first data transmission delay is less than the delay threshold. By adopting this processing method, a gateway device with a smaller first data transmission delay can be selected. For example, when there are still multiple gateway devices to be selected after the above several processes, the gateway device with a smaller RTT time recorded for communicating with the target node device can be selected according to the RTT time recorded by the gateway device.
[0108] In one example, the method provided by the embodiments of the present application may further include the following steps:
[0109] Step S201: Obtain second network information between each of the multiple gateway devices and the server.
[0110] Each gateway device that executes the method provided by the embodiments of the present application can obtain the network information between itself and the server, and use this network information as the second network information between the gateway device and the server. The second network information includes at least one of the following information: the second data transmission delay between the gateway device and the server, the number of consecutive packet losses of the server. The second data transmission delay may be the time interval from when the gateway device initiates a query to when it receives a reply from the server, and specifically may be an average RTT value, a maximum RTT value, etc. In specific implementation, the gateway device can select its idle period and record the second network information by sending ICMP (Internet Control Message Protocol) probe packets to the server.
[0111] In one example, step S201 may be implemented in the following manner: The gateway device obtains the second network information between itself and the server, and provides the second network information between itself and the server to other gateway devices in the grid network; receives the second network information between other gateway devices and the server provided by other gateway devices. In specific implementation, after the gateway device learns that the second network information between itself and the server has changed, it synchronizes this network information to other gateway devices.
[0112] Step S203: Select a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
[0113] When the gateway device communicates with the server, it can combine the second network information between each gateway device and the server respectively, and select a gateway device with a better communication link with the server as the second target gateway device. For example,Figure 6 As shown, if it is found that itself is not a better gateway device for communicating with the server, it will not communicate with the server, thereby making the communication between the gateway device and the server more optimized.
[0114] In one example, the second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server; step S203 may include at least one of the following processes: according to the second data transmission delay, select a gateway device that meets the data transmission delay condition with the server; according to the number of consecutive packet losses, select a gateway device that meets the number of consecutive packet loss conditions with the server.
[0115] The second network information includes: the second data transmission delay between the server and the gateway device; step S203 may include the following process: according to the second data transmission delay, select a gateway device that meets the data transmission delay condition with the server. The data transmission delay condition may be that the second data transmission delay is less than the delay threshold, for example, the delay threshold is 200 milliseconds. By adopting this processing method, a gateway device with a smaller second data transmission delay can be selected.
[0116] The second network information includes: the number of consecutive packet losses of the server; step S203 may include the following process: according to the number of consecutive packet losses of the server, select a gateway device that meets the number of consecutive packet loss conditions with the server. The number of consecutive packet loss conditions may be that the number of consecutive packet losses is less than the number threshold, for example, the number threshold is 3 times. By adopting this processing method, a gateway device with a smaller number of consecutive packet losses can be selected.
[0117] In one example, step S103 may be implemented in the following manner: through the second target gateway device, receive the first target data sent by the server to the target node device. As Figure 6 shown, by adopting this processing method, the second target gateway device obtains the first target data from the server, avoiding all gateway devices from obtaining the first target data from the server; therefore, the data communication cost can be effectively reduced, and the processing cost of the gateway device can be reduced.
[0118] In one example, the method provided by the embodiments of the present application may further include the following steps: receiving second target data sent by the node device to the server. Correspondingly, in step S203, communicating with the server through the second target gateway device may be implemented in the following manner: sending the second target data to the server through the second target gateway device. By adopting this processing method, when the gateway device receives the second target data from the node device, it will not directly send the second target data to the server, but will comprehensively consider the second network information of all gateway devices, select a second gateway device with a better link to the server, and report the second target data to the server by the gateway device with a better link.
[0119] As can be seen from the above embodiments, the grid network topology management method provided by the embodiments of the present application is used for gateway devices in a grid network. The grid network includes multiple gateway devices and multiple node devices. The method includes: obtaining first network information between multiple gateway devices and node devices respectively; obtaining first target data; and selecting a first target gateway device from the multiple gateway devices according to the first network information, so as to send the first target data to the target node device through the first target gateway device. By adopting this processing method, it can not only ensure the stability of network communication in the physical space, but also enable multiple gateway devices to cooperate in managing the network topology when sending data to the node device, select a better gateway device among them to send the data to the node device, so that there is only one communication link in the same physical space, and there will be no interference of wireless signals in the air, nor network congestion and transmission delay; therefore, the data transmission efficiency and user experience can be effectively improved.
[0120] Second Embodiment
[0121] In the above embodiment, a grid network topology management method is provided. Correspondingly, the present application also provides a grid network topology management device. This device corresponds to the embodiment of the above method. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0122] The present application further provides a grid network topology management device for gateway devices in a grid network. The grid network includes multiple gateway devices and multiple node devices, and includes: a first network information acquisition unit, a data acquisition unit, and a gateway device selection unit.
[0123] Among them, the first network information acquisition unit is used to acquire the first network information between multiple gateway devices and node devices respectively; the data acquisition unit acquires the first target data; the gateway device selection unit is used to select a first target gateway device from the multiple gateway devices according to the first network information, so as to send the first target data to the target node device through the first target gateway device.
[0124] In specific implementation, the first network information includes at least one of the following information: the first connection state between the node device and the gateway device, the relay hop count between the node device and the gateway device, the signal strength of the node device with respect to the gateway device; the selection of the first target gateway device from the multiple gateway devices according to the first network information includes at least one of the following processes: selecting the gateway device connected to the target node device according to the first connection state; selecting the gateway device that meets the relay hop count condition with the target node device according to the relay hop count; selecting the gateway device that meets the signal strength condition with the target node device according to the signal strength.
[0125] In specific implementation, the first network information includes: the proxy channel construction state of the node device; the selection of the first target gateway device from the multiple gateway devices according to the first network information includes: selecting the gateway device that has established a proxy channel with the target node device according to the proxy channel construction state.
[0126] In specific implementation, the first network information includes: the first data transmission delay between the node device and the gateway device; the selection of the first target gateway device from the multiple gateway devices according to the first network information includes: selecting the gateway device that meets the data transmission delay condition with the target node device according to the first data transmission delay.
[0127] In specific implementation, the device further includes: a second network information acquisition unit, which is used to acquire the second network information between the multiple gateway devices and the server respectively; a second gateway device selection unit, which is used to select a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
[0128] In specific implementation, the second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server; selecting the second target gateway device from the multiple gateway devices according to the second network information includes at least one of the following processes: selecting a gateway device that meets the data transmission delay condition with the server according to the second data transmission delay; selecting a gateway device that meets the consecutive packet loss condition with the server according to the number of consecutive packet losses.
[0129] In specific implementation, obtaining the first target data includes: receiving, through the second target gateway device, the first target data sent by the server to the target node device.
[0130] In specific implementation, it further includes: receiving the second target data sent by the node device to the server; communicating with the server through the second target gateway device includes: sending the second target data to the server through the second target gateway device.
[0131] In specific implementation, obtaining the first target data includes: receiving the first target data sent by the server to the target node device.
[0132] In specific implementation, the mesh network includes a Bluetooth mesh network, the gateway device includes a Bluetooth mesh gateway device, the node device includes a Bluetooth mesh node device, and the server includes an Internet of Things server.
[0133] In specific implementation, obtaining the first network information between each of the multiple gateway devices and the node device includes: obtaining the first network information of the node device and providing the first network information to other gateway devices in the mesh network; receiving the first network information provided by the other gateway devices.
[0134] In specific implementation, obtaining the second network information between each of the multiple gateway devices and the server includes: obtaining the second network information between the gateway device and the server and providing the second network information between the gateway device and the server to other gateway devices in the mesh network; receiving the second network information between the other gateway devices and the server provided by the other gateway devices.
[0135] Third Embodiment
[0136] In the above embodiment, a mesh network topology management method is provided. Correspondingly, the present application also provides a mesh network topology management method. This method corresponds to the embodiment of the above method, so the description is relatively simple. For related parts, refer to the partial description of Method Embodiment 1. The method embodiments described below are only illustrative.
[0137] Please refer to Figure 7 , which is a flowchart of the grid network topology management method of the present application. In this embodiment, the method may include the following steps:
[0138] Step S301: Obtain the second network information between the multiple gateway devices and the server.
[0139] Step S303: Select a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
[0140] The second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server; Step S303 may include at least one of the following processes: select a gateway device that meets the data transmission delay condition with the server according to the second data transmission delay; select a gateway device that meets the consecutive packet loss condition with the server according to the number of consecutive packet losses.
[0141] In an example, the method may further include the following steps: receive the first target data sent by the server to the target node device through the second target gateway device. Adopting this processing method, when the server sends data to the node device, it avoids sending data to each gateway device, eliminates redundant data in data communication, and only one gateway device needs to receive and process the data. Therefore, it can effectively reduce the data communication cost and the service cost of the gateway device.
[0142] In an example, the method may further include the following steps: receive the second target data sent by the node device to the server; communicating with the server through the second target gateway device in Step S303 includes: sending the second target data to the server through the second target gateway device. Adopting this processing method, when the node device sends data to the server, it avoids each gateway device sending data to the server, eliminates redundant data in data communication, and the server will not have abnormal problems caused by the aggregation of a large amount of data. Therefore, it can effectively reduce the data communication cost and the service cost of the server, thereby improving the real-time performance of the network and ensuring the reliability of the grid network at the same time.
[0143] As can be seen from the above embodiments, the mesh network topology management method provided by the embodiments of the present application is used for gateway devices in a mesh network. The mesh network includes multiple gateway devices and multiple node devices. This method obtains second network information between the multiple gateway devices and the server; according to the second network information, a second target gateway device is selected from the multiple gateway devices to communicate with the server through the second target gateway device. By adopting this processing method, not only can the stability of network communication in the physical space be ensured, but also when transmitting data between the server and the node devices, multiple gateway devices can collaboratively manage the network topology, select a better gateway device among them to communicate with the server, and avoid each gateway device communicating with the server. Therefore, the data communication cost, the service cost of the server, and the service cost of the gateway device can be effectively reduced.
[0144] Fourth Embodiment
[0145] In the above embodiments, a mesh network topology management method is provided. Correspondingly, the present application also provides a mesh network topology management device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple. For related parts, refer to the partial description of the method embodiments. The device embodiments described below are only illustrative.
[0146] The present application further provides a mesh network topology management device, including:
[0147] A second network information acquisition unit, configured to acquire second network information between multiple gateway devices and the server respectively;
[0148] A second gateway device selection unit, configured to select a second target gateway device from the multiple gateway devices according to the second network information to communicate with the server through the second target gateway device.
[0149] Specifically, the second network information includes at least one of the following information: the second data transmission delay between the server and the gateway device, the number of consecutive packet losses of the server; the selecting a second target gateway device from the multiple gateway devices according to the second network information includes at least one of the following processes: selecting a gateway device that meets the data transmission delay condition with the server according to the second data transmission delay; selecting a gateway device that meets the consecutive packet loss condition with the server according to the number of consecutive packet losses.
[0150] Specifically, the device further includes: a first target data receiving unit, configured to receive first target data sent by the server to the target node device through the second target gateway device.
[0151] In specific implementation, the device further includes: a second target data receiving unit, configured to receive second target data sent by the node device to the server; and the communication with the server through the second target gateway device includes: sending the second target data to the server through the second target gateway device.
[0152] The Fifth Embodiment
[0153] In the above embodiments, a mesh network topology management method is provided. Correspondingly, the present application also provides an electronic device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple. For related parts, refer to the partial description of the method embodiments. The device embodiments described below are merely illustrative.
[0154] The electronic device of this embodiment includes: a memory and a processor; the memory is used to store a program for implementing any of the above mesh network topology management methods, and the device is powered on and runs the program of any of the above mesh network topology management methods through the processor.
[0155] This electronic device can be a gateway device in a Mesh network. A gateway device is a network device with relatively strong performance capable of managing a local network. A gateway device usually has various communication fusion capabilities, that is, it can communicate with node devices through a short-range wireless method, and can also further enhance the capabilities of the Mesh network by combining other reliable connection methods such as network cables, wireless WiFi, or power lines. A gateway device can enable node devices to upload data, and remote instructions can also be sent to local node devices through the gateway device. In practical applications, the gateway device can be a central control screen, a smart speaker, a smart TV, etc. At the same time, the gateway device itself can also be used as a node device, such as a smart speaker, a smart TV, etc.
[0156] The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc.
[0157] In specific implementation, the electronic device may further include one or more of the following components: a power component, an input / output (I / O) interface, and a communication component. The power component provides power for various components of the electronic device. The power component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device. The I / O interface provides an interface between the processor 503 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. The communication component is configured to facilitate communication between the electronic device and a user device (such as a smart phone, a tablet computer, etc.) in a wired or wireless manner.
[0158] Sixth Embodiment
[0159] The present application also provides a computer-readable storage medium. Since the embodiments of the computer-readable storage medium are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference may be made to the partial description of the method embodiments. The following description of the embodiments of the computer-readable storage medium is only illustrative.
[0160] In this embodiment, a non-transitory computer-readable storage medium including instructions is provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete any of the above grid network topology management methods provided by the technical solution of the present disclosure. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0161] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data may be used in the solutions described herein within the scope permitted by applicable laws and regulations in compliance with the requirements of the applicable laws and regulations of the country where it is located (for example, with the user's explicit consent, giving the user a practical notice, etc.).
[0162] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data may be used in the solutions described herein within the scope permitted by applicable laws and regulations in compliance with the requirements of the applicable laws and regulations of the country where it is located (for example, with the user's explicit consent, giving the user a practical notice, etc.).
[0163] Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be defined by the scope of the claims of the present application.
[0164] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0165] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0166] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0167] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
Claims
1. A mesh network topology management method, used for a gateway device in a mesh network, wherein the mesh network includes a plurality of the gateway devices and a plurality of node devices, characterized in that: include: Acquire first network information between multiple gateway devices and node devices respectively; Acquiring first target data; A first target gateway device is selected from the plurality of gateway devices according to the first network information, so as to send the first target data to a target node device through the first target gateway device.
2. The method according to claim 1, characterized in that The first network information includes at least one of the following information: a first connection state between the node device and the gateway device, the number of relay hops between the node device and the gateway device, and a signal strength of the node device to the gateway device; The selecting a first target gateway device from the plurality of gateway devices according to the first network information includes at least one of the following processes: Selecting a gateway device connected to the target node device according to the first connection state; According to the relay hop count, selecting a gateway device that meets the relay hop count condition between the gateway device and the target node device; According to the signal strength, a gateway device that meets the signal strength condition with the target node device is selected.
3. The method according to claim 1, characterized in that The first network information includes: the proxy channel construction status of the node device; The selecting a first target gateway device from the plurality of gateway devices according to the first network information includes: According to the proxy channel construction status, a gateway device that has established a proxy channel with the target node device is selected.
4. The method according to claim 1, characterized in that: The first network information includes: a first data transmission delay between a node device and a gateway device; The selecting a first target gateway device from the plurality of gateway devices according to the first network information includes: According to the first data transmission delay, a gateway device that meets the data transmission delay condition between the gateway device and the target node device is selected.
5. The method according to claim 1, characterized in that Also includes: Acquire second network information between the plurality of gateway devices and the server respectively; A second target gateway device is selected from the plurality of gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
6. The method according to claim 5, characterized in that The second network information includes at least one of the following information: a second data transmission delay between the server and the gateway device, and a number of consecutive packet losses at the server; The selecting a second target gateway device from the plurality of gateway devices according to the second network information includes at least one of the following processes: According to the second data transmission delay, selecting a gateway device that meets the data transmission delay condition between the gateway device and the server; According to the number of consecutive packet losses, a gateway device that meets the condition of the number of consecutive packet losses with the server is selected.
7. The method according to claim 5, characterized in that The obtaining of the first target data comprises: The first target data sent by the service end to the target node device is received through the second target gateway device.
8. The method according to claim 5 or 7, characterized in that: Also includes: Receiving second target data sent by the node device to the server; The communicating with the server through the second target gateway device includes: The second target data is sent to the server through the second target gateway device.
9. The method according to claim 1, characterized in that: The obtaining of the first target data comprises: The first target data sent by the receiving service end to the target node device.
10. The method according to claim 1, characterized in that The mesh network includes a Bluetooth mesh network, the gateway device includes a Bluetooth mesh gateway device, the node device includes a Bluetooth mesh node device, and the server includes an Internet of Things server.
11. A mesh network topology management method, used for a gateway device in a mesh network, wherein the mesh network includes a plurality of gateway devices and a plurality of node devices, characterized in that: include: Acquire second network information between the plurality of gateway devices and the server; A second target gateway device is selected from the plurality of gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
12. A mesh network topology management device, used for a gateway device in a mesh network, wherein the mesh network includes a plurality of the gateway devices and a plurality of node devices, characterized in that: include: A first network information acquisition unit, used to acquire first network information between a plurality of gateway devices and the node devices respectively; A data acquisition unit, used for acquiring first target data; The first gateway device selection unit is used to select a first target gateway device from the multiple gateway devices according to the first network information, so as to send the first target data to the target node device through the first target gateway device.
13. A mesh network topology management device, used for a gateway device in a mesh network, wherein the mesh network includes a plurality of the gateway devices and a plurality of node devices, characterized in that: include: A second network information acquisition unit, used to acquire second network information between a plurality of gateway devices and the server respectively; The second gateway device selection unit is used to select a second target gateway device from the multiple gateway devices according to the second network information, so as to communicate with the server through the second target gateway device.
14. An electronic device, characterized in that: include: processor; as well as A memory for storing a program for implementing the method according to any one of claims 1 to 11, wherein the device is powered on and runs the program of the method through the processor.