Method for device to connect to network, and device, system, and readable storage medium
By comprehensively analyzing the signal indicators scanned from the main router, the system identifies and switches to the optimal routing device, thus solving the problem of unstable device connections in distributed routing systems and achieving high-quality, high-stability network connections.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-03-26
AI Technical Summary
In a distributed routing system, determining which routing device a device establishes a connection with is crucial for maintaining a good and stable network connection, and current technologies struggle to determine the optimal routing device.
The master router receives signal indicators scanned by each slave router, analyzes and compares them to determine the best routing device, establishes a connection with the device, and switches to the better routing device in a timely manner to maintain a high-quality and highly stable network connection.
This ensures that devices are always connected to the best routing device in a distributed routing system, maintaining a high-quality and stable network connection and avoiding connection interruptions and a decline in user experience.
Smart Images

Figure CN2025118619_26032026_PF_FP_ABST
Abstract
Description
Method, device, system and readable storage medium for connecting device to network
[0001] The present application claims priority to the Chinese patent application No. 202411336399.0, filed on September 23, 2024, and entitled "Method, device, system and readable storage medium for connecting device to network", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of communication technology, and in particular to a method, device, system and readable storage medium for connecting device to network. BACKGROUND
[0003] With the development of intelligent technology, more and more intelligent devices are widely used in people's work, study and life. For example, smart home devices such as smart speakers, smart door locks, smart curtains, smart air conditioners and smart televisions can provide users with more convenient and intelligent home experiences. In this scenario, devices need to access the same network, such as a wide area network or the Internet.
[0004] Currently, a routing device (denoted as "slave routing") is often set in different home spaces, and different slave routings are connected to the network through a routing device (denoted as "master routing"), and a distributed routing system is formed by the master routing and the slave routings. The master routing and the slave routings have wireless connection capabilities such as Bluetooth to support each device in different home spaces to connect to the network through the routing device.
[0005] In the distributed routing system, the signal strength of the routing device close to the device is not necessarily the best compared to other routing devices far away. Whether the device establishes a connection with which routing device is crucial for each device to maintain a good and stable network connection, and how to determine the best routing device for the device is a problem to be solved. SUMMARY
[0006] The present application provides a method, device, system and readable storage medium for connecting device to network, which can realize that the devices in the distributed routing system can maintain high-quality and high-stability network connection.
[0007] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0008] In a first aspect, a method for connecting a device to a network is provided. The method comprises: receiving, by a master router, a first signal indicator from a first slave router, the first signal indicator representing a signal indicator of a first broadcast message from the device scanned by the first slave router; receiving, by the master router, a second signal indicator from a second slave router, the second signal indicator representing a signal indicator of the first broadcast message from the device scanned by the second slave router; determining, by the master router, a best router device of the device according to the first signal indicator and the second signal indicator, the best router device being the first slave router or the second slave router; and instructing, by the master router, the best router device to establish a connection with the device.
[0009] With the above-mentioned first aspect, the master router can comprehensively analyze and compare the signal indicators of the wireless signals from the device received by each router device in the distributed routing system, and determine the best router device, so as to establish a connection between the best router device and the device, thereby enabling the device to maintain a connection with the best router device in the distributed routing system and maintain a high-quality and stable network connection.
[0010] As an example, the first signal indicator or the second signal indicator comprises one or more of the following indicators: a signal strength such as a received signal strength indicator (RSSI), a reference signal receiving power (RSRP), a reference signal received quality (RSRQ), a signal to interference plus noise ratio (SINR), etc., without limitation.
[0011] As an example, the first broadcast message comprises one or more of the following: a Bluetooth broadcast, a star flash broadcast, and a ZigBee broadcast.
[0012] As a possible implementation, when the master router receives the first signal indicator from the first slave router, the device is not connected to a network connected by the master router. The method further comprises: performing, by the master router, key negotiation with the device through the best router device to obtain a key configuration file of the device; and saving, by the master router, the key configuration file. In this way, in this scheme, the device performs key negotiation with the master router, and the master router is responsible for maintaining the key configuration file and other information, so that the slave router can be avoided from having a large processing load and storage load.
[0013] As a possible implementation manner, the message for key negotiation is transparently transmitted by the best route device between the master route and the device. Wherein, the transparent transmission of the message for key negotiation by the best route device means that the best route device only forwards the message without analyzing and processing, so that the large processing load and storage load can be avoided for the slave route.
[0014] As a possible implementation manner, the master route determines the best route device of the device according to the first signal index and the second signal index, including: if the first signal index is better than the second signal index, the master route determines that the best route device is the first slave route; if the second signal index is better than the first signal index, the master route determines that the best route device is the second slave route. In this way, the master route can comprehensively analyze and compare the signal indexes of the wireless signals from the device received by each route device in the distributed routing system, determine the best route device, and establish the connection between the best route device and the device, so that the device can be connected to the best route device in the distributed routing system after power-on, and maintain high-quality and high-stability network connection.
[0015] As a possible implementation manner, after the best route device and the device establish the connection, the method further includes: the master route transmits and receives the service data through the best route device and the device. In this way, the service data transmission can be performed based on the high-quality and high-stability network connection, and the user experience can be improved.
[0016] As a possible implementation manner, the best route device is the first slave route, and after the best route device and the device establish the connection, the method further includes: the master route receives a third signal index from the first slave route, the third signal index representing the signal index of the second broadcast message from the device scanned by the first slave route; the master route receives a fourth signal index from the second slave route, the fourth signal index representing the signal index of the second broadcast message from the device scanned by the second slave route; the master route determines that the second slave route meets the switching condition according to the third signal index and the fourth signal index; the master route instructs the first slave route to disconnect the connection with the device, and instructs the second slave route to establish the connection with the device. In this way, during the process that the device is connected to the network, if there is a route device with better signal index in the distributed routing system, the master route can comprehensively analyze and compare the signal indexes of the wireless signals from the device received by each route device in the distributed routing system, determine a new best route device according to the actual network condition, establish the connection between the new best route device and the device, so that the device is always connected to the best route device in the distributed routing system, and the device always maintains high-quality and high-stability network connection. In addition, the switching is initiated by the master route, and the slave route performs the disconnection and establishment of the connection, so that there is no special requirement for the capability of the device, such as supporting the route switching instruction or the gateway switching instruction, and thus the conventional device can be adapted.
[0017] As an example, the second broadcast message comprises one or more of the following: Bluetooth broadcast, StarFlash broadcast, ZigBee broadcast.
[0018] As a possible implementation, when the first slave router disconnects the connection with the device, the device does not perform a preset task, which comprises one or more of the following: software version upgrade, software repair, software package download, high-priority service. In this way, the connection switching can be avoided to interrupt a task with high importance, thereby affecting the user experience.
[0019] As a possible implementation, the second slave router satisfies the switching condition, which comprises that the fourth signal indicator is better than the third signal indicator. In this way, when there is a better routing device, the connection between the better routing device and the device can be established in time, so that the device is always connected to the best routing device in the distributed routing system, and the device always maintains a high-quality and stable network connection.
[0020] In a second aspect, a method for connecting a device to a network is provided. A master router receives a first signal indicator from a first slave router, the first signal indicator representing a signal indicator of a first broadcast message from a device scanned by the first slave router. The master router receives a second signal indicator from a second slave router, the second signal indicator representing a signal indicator of the first broadcast message from the device scanned by the second slave router. The master router determines a fifth signal indicator according to the first broadcast message from the device. The master router determines whether a best routing device of the device is the first slave router or the second slave router according to the first signal indicator, the second signal indicator, and the fifth signal indicator, and instructs the best routing device to establish a connection with the device. Alternatively, the master router determines whether the best routing device of the device is the master router according to the first signal indicator, the second signal indicator, and the fifth signal indicator, and establishes a connection with the device.
[0021] The above-mentioned second aspect provides a scheme. The master router can comprehensively analyze and compare signal indicators of wireless signals from the device received by each routing device in the distributed routing system, such as the master router and each slave router, to determine the best routing device, and establish a connection between the best routing device and the device, so that the device is always connected to the best routing device in the distributed routing system, and maintains a high-quality and stable network connection.
[0022] As an example, the first signal indicator, the second signal indicator, or the fifth signal indicator comprises one or more of the following indicators: RSSI, RSRP, RSRQ, SINR, etc., without limitation.
[0023] As an example, the first broadcast message comprises one or more of the following: Bluetooth broadcast, StarFlash broadcast, ZigBee broadcast.
[0024] As a possible implementation, when the master router receives the first signal indicator from the first slave router, the device is not connected to the network to which the master router is connected, and the method further comprises: the optimal routing device is the first slave router or the second slave router, the master router performs key negotiation with the device through the optimal routing device, obtains the key configuration file of the device, and the master router saves the key configuration file. Alternatively, the optimal routing device is the master router, the master router performs key negotiation with the device, obtains the key configuration file of the device, and the master router saves the key configuration file. In this way, the device in this scheme performs key negotiation with the master router, and the master router is responsible for maintaining the key configuration file and other information, so that the slave router can avoid large processing and storage loads.
[0025] As a possible implementation, the optimal routing device is the first slave router or the second slave router, and the message for key negotiation is transparently transmitted by the optimal routing device between the master router and the device. Wherein, the optimal routing device transparently transmitting the message for key negotiation means that the optimal routing device only forwards the message without analyzing and processing it, so that the slave router can avoid large processing and storage loads.
[0026] As a possible implementation, the master router determines the optimal routing device of the device according to the first signal indicator, the second signal indicator and the fifth signal indicator, comprising: if the first signal indicator is better than the second signal indicator and the fifth signal indicator, the master router determines that the optimal routing device is the first slave router; if the second signal indicator is better than the first signal indicator and the fifth signal indicator, the master router determines that the optimal routing device is the second slave router; and if the fifth signal indicator is better than the first signal indicator and the second signal indicator, the master router determines that the optimal routing device is the master router. In this way, the master router can comprehensively analyze and compare the signal indicators of the wireless signals from the device received by each routing device in the distributed routing system, determine the optimal routing device, and establish a connection between the optimal routing device and the device, so that the device can be connected to the optimal routing device in the distributed routing system after power-on, and maintain a high-quality and stable network connection.
[0027] As a possible implementation, the optimal routing device is a first slave routing, after the optimal routing device establishes a connection with the device, the method further comprises: the master routing receiving a third signal indicator from the first slave routing, the third signal indicator representing a signal indicator of the second broadcast message from the device scanned by the first slave routing; the master routing receiving a fourth signal indicator from the second slave routing, the fourth signal indicator representing a signal indicator of the second broadcast message from the device scanned by the second slave routing; the master routing determining a sixth signal indicator according to the second broadcast message from the device scanned; the master routing determining that the second slave routing satisfies the switching condition according to the third signal indicator, the fourth signal indicator and the sixth signal indicator, and the master routing instructing the first slave routing to disconnect the connection with the device and instructing the second slave routing to establish a connection with the device; or, the master routing determining that the master routing satisfies the switching condition according to the third signal indicator, the fourth signal indicator and the sixth signal indicator, and the master routing instructing the first slave routing to disconnect the connection with the device and the master routing establishing a connection with the device. In this way, during the process that the device is connected to the network, if there is a routing device with a better signal indicator in the distributed routing system, the master routing can comprehensively analyze and compare the signal indicators of the wireless signals from the device received by each routing device in the distributed routing system, determine a new optimal routing device according to the actual network condition, establish a connection between the new optimal routing device and the device, so that the device is always connected to the optimal routing device in the distributed routing system, and the device always maintains a high-quality and stable network connection. In addition, the switching is initiated by the master routing, and the slave routing performs the disconnection and establishment of the connection, and there is no special requirement for the capability of the device, for example, the device does not need to support routing switching instructions or gateway switching instructions, and therefore the device can be adapted to a conventional device.
[0028] As an example, the second broadcast message comprises one or more of the following: a Bluetooth broadcast, a star flash broadcast, a ZigBee broadcast.
[0029] As a possible implementation, when the first slave routing disconnects the connection with the device, the device does not perform a preset task, and the preset task comprises one or more of the following: software version upgrade, software repair, software package download, high-priority service. In this way, the connection switching can be avoided to interrupt a task with a higher importance, and the user experience can be affected.
[0030] As a possible implementation, the second slave routing satisfies the switching condition, comprising: the fourth signal indicator is better than the third signal indicator and the sixth signal indicator; the master routing satisfies the switching condition, comprising: the sixth signal indicator is better than the third signal indicator and the fourth signal indicator. In this way, when there is a better routing device, a connection between the better routing device and the device can be established in time, so that the device is always connected to the optimal routing device in the distributed routing system, and the device always maintains a high-quality and stable network connection.
[0031] In a third aspect, a routing device is provided, which comprises: a memory configured to store one or more programs; a transceiver configured to send or receive signals; and a processor configured to run the one or more programs to support the routing device to implement the method in any possible implementation of the first aspect or the second aspect.
[0032] In a fourth aspect, a distributed routing system is provided, which comprises: a master routing device, a slave routing device, and a device, wherein the master routing device is configured to implement the method in any possible implementation of the first aspect or the second aspect.
[0033] In a fifth aspect, a readable storage medium is provided, which stores a program, and the program, when executed by one or more processors, implements the method in any possible implementation of the first aspect or the second aspect.
[0034] In a sixth aspect, a program product containing instructions is provided, which, when executed on a routing device, causes the routing device to implement the method in any possible implementation of the first aspect or the second aspect.
[0035] In a seventh aspect, a chip system is provided, which comprises a processing circuit, and a storage medium storing a program, and the program, when executed by the processing circuit, implements the method in any possible implementation of the first aspect or the second aspect. The chip system can be composed of a chip, or can comprise a chip and other discrete devices. BRIEF DESCRIPTION OF DRAWINGS
[0036] FIG. 1 is a schematic diagram of two distributed routing system architectures provided by embodiments of the present application;
[0037] FIG. 2 is a schematic diagram of two scenarios of devices accessing a network for the first time provided by embodiments of the present application;
[0038] FIG. 3 is a schematic diagram of two scenarios of device connection switching due to location movement provided by embodiments of the present application;
[0039] FIG. 4 is a schematic diagram of two scenarios of device connection switching due to topology changes provided by embodiments of the present application;
[0040] FIG. 5 is a schematic diagram of two other scenarios of device connection switching due to topology changes provided by embodiments of the present application;
[0041] FIG. 6 is a schematic diagram of a structure of a distributed routing system provided by embodiments of the present application;
[0042] FIG. 7 is a flow chart of a method of devices connecting to a network in a first access scenario provided by embodiments of the present application;
[0043] FIG. 8 is a flowchart of a method for connecting a device to a network in a first access scenario according to an embodiment of the present application;
[0044] FIG. 9 is a flowchart of a method for connecting a device to a network in a handover scenario according to an embodiment of the present application;
[0045] FIG. 10 is a flowchart of a method for connecting a device to a network in another handover scenario according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; in this document, "and / or" only represents the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0047] Hereinafter, the terms "first", "second", and the like are only used to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity, or content of the described objects. For example, the described object is "field", and the ordinal numbers before "field" in "first field" and "second field" do not limit the position or order between "fields", and "first" and "second" do not limit whether the "fields" they modify are in the same message or not, nor do they limit the order of "first field" and "second field". For example, the described object is "level", and the ordinal numbers before "level" in "first level" and "second level" do not limit the priority between "levels". For example, the quantity of the described object is not limited, which can be one or more. For example, "first device", where the quantity of "device" can be one or more. In addition, objects modified by different prefix words can be the same or different, for example, the described object is "device", and "first device" and "second device" can be the same type of device or different types of device, for example, the described object is "information", and "first information" and "second information" can be information of the same content or information of different content. In short, the use of ordinal numbers and other prefix words in the embodiments of the present application for distinguishing description objects does not limit the described objects, and the description of the described objects in the claims or embodiments should not be limited by the use of such prefix words.
[0048] In addition, in embodiments of the present application, "connection" can be direct connection or indirect connection, and can refer to electrical connection or communication connection. For example, connection between two electrical elements A and B can refer to direct connection between A and B, or can refer to indirect connection between A and B through other electrical elements or connection medium, or can refer to indirect connection between A and B through other communication devices or communication medium, as long as communication between A and B can be realized.
[0049] The method for connecting devices to a network provided by embodiments of the present application can be applied to a distributed routing system architecture, which can include at least one slave routing and at least one master routing. The at least one slave routing is connected to a network (such as a wide area network or the Internet, etc.) through the master routing. In some embodiments, the master routing can also be referred to as "master control routing" or "parent routing", etc., and the slave routing can also be referred to as "child routing". The name or term of the routing device is not limited in embodiments of the present application.
[0050] As an example, refer to FIG. 1, which shows two distributed routing system architecture diagrams provided by embodiments of the present application. The distributed routing system involved in embodiments of the present application can include the master routing 110 shown in (a) of FIG. 1, and the slave routing 120 connected to the master routing 110; or the distributed routing system can include the master routing 110 shown in (b) of FIG. 1, and the slave routing 120 and the slave routing 130 connected to the master routing 110, etc.
[0051] In some embodiments, the slave routing in the distributed routing system has wireless connection capability, such as supporting wireless communication protocol. The slave routing can support the device to be connected to the network through connection with the slave routing. For example, the device can be connected to the slave routing 120 shown in (a) of FIG. 1 or (b) of FIG. 1, and be connected to the network through the slave routing 120 and the master routing 110; for another example, the device can be connected to the slave routing 130 shown in (b) of FIG. 1, and be connected to the network through the slave routing 130 and the master routing 110.
[0052] In some embodiments, the master routing in the distributed routing system has wireless connection capability. The master routing can support the device to be connected to the network through direct connection with the master routing. For example, the device can be directly connected to the master routing 110 shown in (a) of FIG. 1 or (b) of FIG. 1, to be connected to the network.
[0053] As an example, the device involved in embodiments of the present application can be a smart home device, such as a smart home gateway, a smart home hub, a smart home router, a smart home switch, a smart home camera, a smart home doorbell, a smart home lock, a smart home thermostat, a smart home bulb, a smart home speaker, a smart home robot, a smart home security system, a smart home security camera, a smart home security doorbell, a smart home security lock, a smart home security thermostat, a smart home security bulb, a smart home security speaker, a smart home security robot, etc. Bluetooth Low Energy (BLE), classic Bluetooth, such as basic rate (BR) Bluetooth, enhanced data rate (EDR) Bluetooth, etc., without specific limitation.
[0054] The distributed routing system architecture shown in FIG. 1 of the present application is only an example. In actual application, the number of master routes and slave routes included in the distributed routing system is not limited, and the connection relationship between each master route and slave route is not limited, which depends on the specific application scenario, device function, etc.
[0055] As described in the background, in the distributed routing system, which route device each device establishes a connection with is crucial to whether each device can maintain good and stable network connection.
[0056] In order to enable each device in the distributed routing system to maintain high-quality and high-stability network connection, guarantee the network speed to be stable when the user uses the device, avoid latency problems such as lag, and improve the user experience, the present application embodiment provides a device connection network method. Based on the method, the master route can determine the best route device of the device in the distributed routing system and establish a wireless connection between the best route device and the device. Based on this, the device can always maintain a connection with the best route device in the distributed routing system and maintain high-quality and high-stability network connection.
[0057] As an example, the best route device is the route device in the distributed routing system that receives the wireless signal from the device with the best signal index. In the present application embodiment, the best route device can be a slave route or a master route, without limitation.
[0058] As a possible implementation manner, the master route can obtain the signal index of the wireless signal from the device received by each slave route in the distributed routing system, determine the best route device of the device in the distributed routing system by comparing each signal index, and establish a wireless connection between the best route device and the device.
[0059] As a possible implementation manner, the master route can obtain the signal index of the wireless signal from the device received by all or part of the route devices (such as one master route and multiple slave routes) in the distributed routing system, determine the best route device of the device in the distributed routing system by comparing each signal index, and establish a wireless connection between the best route device and the device.
[0060] Exemplarily, the signal indicators can include, but are not limited to, one or more of the following: signal strength, signal quality, etc., without limitation. For example, the signal indicators can include, but are not limited to, one or more of the following: signal strength such as received signal strength indicator (RSSI), reference signal receiving power (RSRP), reference signal received quality (RSRQ), signal to interference plus noise ratio (SINR), etc., without limitation.
[0061] As an example, the master router can determine the optimal routing device when the device accesses the network for the first time after power-on, and instruct the optimal routing device to establish a wireless connection with the device. Based on this, the device can connect to the optimal routing device in the distributed routing system after power-on, and maintain a high-quality and high-stability network connection.
[0062] Exemplarily, please refer to FIG. 2, which shows two scenarios of devices accessing the network for the first time according to an embodiment of the present application. As shown in FIG. 2, the distributed routing system includes a master router 110, and a slave router 120 and a slave router 130 connected to the master router 110, respectively.
[0063] As shown in (a) of FIG. 2, assuming that the master router 110 does not have the wireless connection capability, the signal indicators (such as RSSI, etc.) of the wireless signals from the device received by the slave router 120 are better than the signal indicators (such as RSSI, etc.) of the wireless signals from the device received by the slave router 130, the master router 110 can instruct the slave router 120 to establish a connection with the device, so that the device maintains a high-quality and high-stability network connection, as shown in (a) of FIG. 2.
[0064] As shown in (b) of FIG. 2, assuming that the master router 110 has the wireless connection capability, the signal indicators (such as RSSI, etc.) of the wireless signals from the device received by the slave router 120 are better than the signal indicators (such as RSSI, etc.) of the wireless signals from the device received by the slave router 130, and better than the signal indicators (such as RSSI, etc.) of the wireless signals from the device received by the master router 110, the master router 110 can instruct the slave router 120 to establish a connection with the device, so that the device maintains a high-quality and high-stability network connection, as shown in (b) of FIG. 2.
[0065] As shown in (c) of FIG. 2, assuming that the master router 110 has When the signal indicators (e.g., RSSI, etc.) of the wireless signals from the device received by the master router 110 are better than the signal indicators (e.g., RSSI, etc.) of the wireless signals from the device received by the slave router 120, and better than the signal indicators (e.g., RSSI, etc.) of the wireless signals from the device received by the slave router 130, the master router 110 establishes a connection with the device directly, as shown in (c) of FIG. 2, so that the device maintains a high-quality and high-stability network connection.
[0066] As an example, when the device is connected to the network through a certain router device (denoted as a first router device), and the signal indicators of the wireless signals from the device received by the first router device become poor, or the signal indicators of the wireless signals from the device received by another router device (denoted as a second router device) are better than the signal indicators of the wireless signals from the device received by the first router device, the master router can determine a new optimal router device (e.g., the second router device) according to the actual network situation, and instruct the second router device to establish a wireless connection with the device. Based on this, the device can perform connection switching in a timely manner when the actual network situation changes, so that the device can be connected to the optimal router device in the distributed routing system, and maintain a high-quality and high-stability network connection.
[0067] As an example, the reasons why the device has a new optimal router device in the distributed routing system can include one or more of the following: the position of the device changes, the position of the router device to which the device is connected moves, the topology of the distributed routing system changes, etc., without specific limitation.
[0068] As an example, please refer to FIG. 3, which shows two scenarios of device connection switching due to position movement according to an embodiment of the present application.
[0069] As shown in (a) of FIG. 3, when the device is connected to the slave router 120, if the position of the device changes, e.g., moves from a position closer to the slave router 120 to a position closer to the slave router 130, and the signal indicators of the wireless signals from the device received by the slave router 130 are better than the signal indicators of the wireless signals from the device received by the slave router 120 due to the change of the position of the device, the master router 110 can dynamically determine a new optimal router device as the slave router 130 according to the actual network situation, instruct the slave router 120 to disconnect the wireless connection with the device, and instruct the slave router 130 to establish a wireless connection with the device, thereby completing the connection switching of the device and the router device.
[0070] As shown in (b) of FIG. 3, when the device is connected with the slave router 120, if the position of the slave router 120 changes, such as moving away from the device, assuming that the signal index of the wireless signal from the device received by the slave router 120 due to the change of the position of the slave router 120 is worse than the signal index of the wireless signal from the device received by the slave router 130, the master router 110 can dynamically determine the new optimal routing device as the slave router 130 according to the actual network condition, instruct the slave router 120 to disconnect the wireless connection with the device, instruct the slave router 130 to establish the wireless connection with the device, and complete the switching of the connection between the device and the routing device.
[0071] As an example, refer to FIG. 4, which shows two scenarios of the switching of the connection between the device and the routing device due to the change of the topology structure provided by the embodiments of the present application.
[0072] As shown in (a) of FIG. 4, when the device is connected with the slave router 120, if the connection between the slave router 120 and the master router 110 is disconnected, causing the device to be unable to connect to the network through the slave router 120, the master router 110 can dynamically determine the new optimal routing device as the slave router 130 according to the actual network condition, instruct the slave router 130 to establish the wireless connection with the device, and complete the switching of the connection between the device and the routing device.
[0073] As shown in (b) of FIG. 4, when the device is connected with the slave router 120, if the connection between the slave router 120 and the master router 110 is disconnected, causing the device to be unable to connect to the network through the slave router 120, the master router 110 can determine the new optimal routing device as the master router 110 according to the actual network condition, and directly connect with the device, and complete the switching of the connection between the device and the routing device.
[0074] As an example, refer to FIG. 5, which shows two other scenarios of the switching of the connection between the device and the routing device due to the change of the topology structure provided by the embodiments of the present application.
[0075] As shown in (a) of FIG. 5, when the device is connected with the slave router 120, there is a newly added slave router 130 connected with the master router 110, if the signal index of the wireless signal from the device received by the slave router 130 is better than the signal index of the wireless signal from the device received by the slave router 120, the master router 110 can dynamically determine the new optimal routing device as the slave router 130 according to the actual network condition, instruct the slave router 120 to disconnect the wireless connection with the device, instruct the slave router 130 to establish the wireless connection with the device, and complete the switching of the connection between the device and the routing device.
[0076] As shown in Figure 5(b), when the device is directly connected to the main router 110, there is a newly added slave router 120 connected to the main router 110. If the signal strength of the wireless signal received by the slave router 120 from the device is better than that of the wireless signal received by the main router 110 from the device, the main router 110 can dynamically determine the new best routing device as the slave router 120 according to the actual network conditions, connect directly to the device, instruct the slave router 120 to establish a wireless connection with the device, and complete the switching of the connection between the device and the routing device.
[0077] The device connection switching scenarios shown in Figures 3-5 of this application are only examples. In actual applications, the specific reasons for device connection switching are not limited and can be determined according to the specific circumstances.
[0078] As an example, the device involved in this application embodiment may be equipped with Electronic devices with wireless connectivity, including but not limited to: wired headphones, wireless headphones, smart speakers, smart wearable devices, augmented reality (AR) devices, virtual reality (VR) devices, portable game controllers, surveillance cameras, smart toothbrushes, smart scales, smart door locks, smart home devices, etc., are not limited here. For example, wireless headphones include true wireless stereo (TWS) Bluetooth headphones, neckband Bluetooth headphones, and over-ear Bluetooth headphones; smart wearable devices include smartwatches, smart bracelets, smart glasses, smart ankle bracelets, smart rings, and smart necklaces; smart home devices include smart air conditioners, smart curtains, smart refrigerators, smart lights, smart speakers, smart TVs, smart washing machines, and smart robot vacuums, etc., are not limited here.
[0079] As an example, the router described in this application embodiment can be a wireless router, a customer premises equipment (CPE), or other electronic devices with wireless routing capabilities, such as mobile phones, tablets, desktop / laptop / handheld computers, netbooks, AR / VR devices, smart TVs, smartwatches and other wearable devices, servers, mobile email devices, in-vehicle devices, portable music players, e-readers, etc., which have one or more processors embedded or coupled to them and are capable of accessing the network. No limitation is imposed here.
[0080] As an example, please refer to Figure 6, which shows a schematic diagram of a distributed routing system structure for implementing a method for connecting devices to a network, according to an embodiment of this application. As shown in Figure 6, the distributed routing system may include a master router 110, slave routers 120, slave routers 130, and devices.
[0081] As shown in FIG. 6, the master router 110 can include an information holding unit 110-1, a roaming decision unit 110-2, and a message transceiving unit 110-3.
[0082] The information holding unit 110-1 can be configured to hold information including an identifier of a device and a key configuration file, etc. For example, the identifier of the device can be a media access control address (MAC) or the like, without limitation.
[0083] The roaming decision unit 110-2 can be configured to acquire signal indicators of wireless signals from the device received by each routing device in the distributed routing system, compare the signal indicators, determine a best routing device of the device in the distributed routing system, and notify the best routing device to establish a wireless connection with the device.
[0084] The message transceiving unit 110-3 can be configured to receive a message from the device, such as a message directly sent by the device or a message from the device forwarded by the slave router 120 or the slave router 130. The message transceiving unit 110-3 can also be configured to send a message, such as directly sending a message to the device or sending a message to the device through the slave router 120 or the slave router 130.
[0085] As shown in FIG. 6, the slave router 120 can include a message transceiving unit 120-1 and a broadcast transceiving unit 120-2, and the slave router 130 can include a message transceiving unit 130-1 and a broadcast transceiving unit 130-2.
[0086] The message transceiving unit 120-1 and the message transceiving unit 130-1 can be configured to send a message to the master router 110 and receive a message sent by the master router 110. The message transceiving unit 120-1 and the message transceiving unit 130-1 can also be configured to send a message to the device and receive a message from the device.
[0087] The broadcast transceiving unit 120-2 and the broadcast transceiving unit 130-2 can be configured to receive a wireless signal (such as a broadcast message) from the device, acquire a signal indicator of the wireless signal, and send the acquired signal indicator to the master router 110. The broadcast transceiving unit 120-2 and the broadcast transceiving unit 130-2 can also be configured to receive information such as an identifier (such as a MAC address) of the device, send the identifier of the device to the master router 110, and forward a message for key negotiation between the device and the master router 110.
[0088] The functional units included in the master router 110, the slave router 120 and the slave router 130 shown in FIG. 6 are schematic and only a logical functional division, and in actual applications, there can be another division manner. For example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. Each unit shown in FIG. 6 can be realized in the form of hardware or in the form of a software functional unit.
[0089] In the following, the method for connecting a device to a network provided by the embodiments of the present application will be specifically introduced in combination with specific scenarios.
[0090] As an example, the method for connecting a device to a network provided by the embodiments of the present application can be applied in a first access scenario, such as a scenario of first accessing a network after the device is powered on.
[0091] As an example, please refer to FIG. 7, which shows a distributed routing system including a master router, a first slave router and a second slave router, the first slave router and the second slave router have wireless connection capability, and the master router does not have As an example, a first access scenario is taken, in which the master router does not have
[0092] S701: The device sends a first broadcast message.
[0093] As an example, the first broadcast message can include but is not limited to broadcast, broadcast, etc. The Bluetooth broadcast, such as BLE Bluetooth broadcast, BR Bluetooth broadcast, EDR Bluetooth broadcast, etc., is not limited.
[0094] As an example, the device can periodically send a broadcast message according to a preset broadcast frequency, or send a broadcast message within a preset time window, or send a broadcast message when a preset condition is met, etc. The specific manner and process of the device sending a broadcast message are not limited in the embodiments of the present application and can be determined according to specific conditions.
[0095] S702: The first slave router performs broadcast scanning and scans the first broadcast message from the device; the second slave router performs broadcast scanning and scans the first broadcast message from the device.
[0096] In some embodiments, the first broadcast message from the device scanned by the first slave route and the second slave route can carry an identity of the device, the first slave route and the second slave route can obtain the identity of the device from the respective scanned first broadcast message, and determine the identity of the device related to the first broadcast message based on the identity. Exemplarily, the identity of the device can include, but is not limited to, a MAC address, etc., without limitation.
[0097] As a possible implementation, the first slave route and the second slave route can periodically scan the broadcast message at a preset scanning frequency, or scan the broadcast message within a preset time window, or scan the broadcast message when a preset condition is met, etc. The specific manner and process of scanning the broadcast message by the slave route are not limited in the embodiments of the present application, and can be determined according to specific conditions.
[0098] S703: The first slave route determines a first signal indicator according to the scanned first broadcast message; and the second slave route determines a second signal indicator according to the scanned first broadcast message.
[0099] As an example, the first signal indicator can represent one or more of the following indicators of the first broadcast message from the device received by the first slave route: signal strength, signal quality. For example, the first signal indicator can include one or more of the following: RSSI, RSRP, RSRQ, SINR, etc.
[0100] As an example, the second signal indicator can represent one or more of the following indicators of the first broadcast message from the device received by the second slave route: signal strength, signal quality. For example, the second signal indicator can include one or more of the following: RSSI, RSRP, RSRQ, SINR, etc.
[0101] As an example, RSSI can represent the received signal strength and interference level of the channel between the slave route and the device; RSRQ can represent the signal-to-noise ratio and interference of the channel between the slave route and the device; and SINR can represent the link quality of the channel between the slave route and the device.
[0102] S704: The first slave route sends the first signal indicator to the master route; and the second slave route sends the second signal indicator to the master route.
[0103] In some embodiments, the first slave route can send the identity (such as a MAC address) of the device obtained from the first broadcast message to the master route, and the master route determines the identity of the device related to the first signal indicator based on the identity of the device; and the second slave route can send the identity (such as a MAC address) of the device obtained from the first broadcast message to the master route, and the master route obtains the identity of the device related to the second signal indicator based on the identity of the device.
[0104] S705: The master router determines that the optimal routing device of the device is the first slave router according to the first signal indicator and the second signal indicator, and the first signal indicator is superior to the second signal indicator.
[0105] As a possible implementation, the master router can determine the optimal routing device of the device by comprehensively analyzing and comparing the first signal indicator and the second signal indicator.
[0106] Taking an example that the first signal indicator includes a first RSSI and the second signal indicator includes a second RSSI, as an example, if the first signal indicator is superior to the second signal indicator, such as first RSSI>second RSSI or first RSSI-second RSSI>c1, the master router can determine that the optimal routing device of the device is the first slave router; if the second signal indicator is superior to the first signal indicator, such as second RSSI>first RSSI or second RSSI-first RSSI>c1, the master router can determine that the optimal routing device of the device is the second slave router. As an example, the value range of c1may be (0dB, 4dB), for example, c1=2dB, without limitation.
[0107] In some embodiments, if first RSSI=second RSSI or |first RSSI-second RSSI|≤c1, the master router can randomly determine the first slave router or the second slave router as the optimal routing device, or the master router can determine the optimal routing device from the first slave router and the second slave router by referring to other data (such as the relative positions of the first slave router and the second slave router with the device, other signal evaluation indicators, etc.), without specific limitation.
[0108] Taking an example that the first signal indicator includes a first RSRQ and the second signal indicator includes a second RSRQ, as an example, if the first signal indicator is superior to the second signal indicator, such as first RSRQ>second RSRQ or first RSRQ-second RSRQ>c2, the master router can determine that the optimal routing device of the device is the first slave router; if the second signal indicator is superior to the first signal indicator, such as second RSRQ>first RSRQ or second RSRQ-first RSRQ>c2, the master router can determine that the optimal routing device of the device is the second slave router.
[0109] In some embodiments, if first RSRQ=second RSRQ or |first RSRQ-second RSRQ|≤c2, the master router can randomly determine the first slave router or the second slave router as the optimal routing device, or the master router can determine the optimal routing device from the first slave router and the second slave router by referring to other data (such as the relative positions of the first slave router and the second slave router with the device, other signal evaluation indicators, etc.), without specific limitation.
[0110] As an example, if the first signal indicator is better than the second signal indicator, such as first SIR > second SIR, or first SIR-second SIR > c3, the master router can determine that the best routing device for the device is the first slave router. If the second signal indicator is better than the first signal indicator, such as second SIR > first SIR, or second SIR-first SIR > c3, the master router can determine that the best routing device for the device is the second slave router.
[0111] In some embodiments, if first SIR = second SIR, or |first SIR-second SIR|≤c3, the master router can randomly determine the first slave router or the second slave router as the best routing device, or the master router can determine the best routing device from the first slave router and the second slave router based on other data (such as relative positions of the first slave router and the second slave router with respect to the device, other signal evaluation indicators, etc.), without being limited thereto.
[0112] As an example, if the first signal indicator is better than the second signal indicator, such as first RSSI≥second RSSI and / or first RSRQ > second RSRQ, or first RSSI > second RSSI and / or first RSRQ-second RSRQ > c2, or first RSSI-second RSSI > c1 and / or first RSRQ-second RSRQ > c2, or first RSSI-second RSSI > c1 and / or first RSRQ > second RSRQ, the master router can determine that the best routing device for the device is the first slave router. If the second signal indicator is better than the first signal indicator, such as second RSSI > first RSSI and / or second RSRQ > first RSRQ, or second RSSI > first RSSI and / or second RSRQ-first RSRQ > c2, or second RSSI-first RSSI > c1 and / or second RSRQ-first RSRQ > c2, or second RSSI-first RSSI > c1 and / or second RSRQ > first RSRQ, the master router can determine that the best routing device for the device is the second slave router.
[0113] In some embodiments, if the first RSSI = the second RSSI and the first RSRQ = the second RSRQ, or the first RSSI = the second RSSI and |the first RSRQ - the second RSRQ|≤c2, or |the first RSSI - the second RSSI|≤c1 and the first RSRQ = the second RSRQ, or |the first RSSI - the second RSSI|≤c1 and |the first RSRQ - the second RSRQ|≤c2, the master router can randomly determine the first slave router or the second slave router as the best routing device, or the master router can determine the best routing device from the first slave router and the second slave router by referring to other data (such as the relative positions of the first slave router and the second slave router with the device, other signal evaluation indicators, etc.), without specific limitation.
[0114] For example, if the first signal indicator is better than the second signal indicator, such as the first RSSI > the second RSSI and / or the first SINR > the second SINR, or the first RSSI > the second RSSI and / or the first SINR - the second SINR > c3, or the first RSSI - the second RSSI > c1 and / or the first SINR - the second SINR > c3, or the first RSSI - the second RSSI > c1 and / or the first SINR > the second SINR, the master router can determine that the best routing device of the device is the first slave router; if the second signal indicator is better than the first signal indicator, such as the second RSSI > the first RSSI and / or the second SINR > the first SINR, or the second RSSI > the first RSSI and / or the second SINR - the first SINR > c3, or the second RSSI - the first RSSI > c1 and / or the second SINR - the first SINR > c3, or the second RSSI - the first RSSI > c1 and / or the second SINR > the first SINR, the master router can determine that the best routing device of the device is the second slave router.
[0115] In some embodiments, if the first RSSI = the second RSSI and the first SINR = the second SINR, or the first RSSI = the second RSSI and |the first SINR - the second SINR|≤c3, or |the first RSSI - the second RSSI|≤c1 and the first SINR = the second SINR, or |the first RSSI - the second RSSI|≤c1 and |the first SINR - the second SINR|≤c3, the master router can randomly determine the first slave router or the second slave router as the best routing device, or the master router can determine the best routing device from the first slave router and the second slave router by referring to other data (such as the relative positions of the first slave router and the second slave router with the device, other signal evaluation indicators, etc.), without specific limitation.
[0116] The above example of determining the optimal routing device according to the first signal indicator and the second signal indicator is only for example, for the case that the first signal indicator includes other types of indicators, the above example of determining the optimal routing device can also be referred to, and no further description is made.
[0117] S706: The master routing device instructs the first slave routing device to initiate connection with the device.
[0118] As an example, the implementation of the master routing device instructing the first slave routing device to initiate connection with the device is that the master routing device can send a packet or message carrying a first parameter and an identifier of the device to the first slave routing device, so as to instruct the first slave routing device to initiate connection with the device according to the identifier, and the first parameter indicates to establish the connection.
[0119] S707: The first slave routing device initiates connection with the device.
[0120] S708: After the device establishes the connection with the first slave routing device, the device performs information transmission and reception with the master routing device through the first slave routing device, and performs key negotiation.
[0121] As a possible implementation, the device can send a packet for key negotiation to the first slave routing device, and after receiving the packet for key negotiation, the first slave routing device transmits the packet to the master routing device. Wherein, the first slave routing device transmits the packet for key negotiation means that the first slave routing device only forwards the packet without analyzing and processing, so that the first slave routing device can avoid large processing load and storage load.
[0122] As an example, the key negotiation can include but is not limited to one or more of the following: encryption mode negotiation, encryption / decryption key negotiation, encryption security policy negotiation, etc., without limitation. The way and process of the device performing key negotiation with the master routing device can refer to the conventional technology, and no further description is made.
[0123] S709: The master routing device obtains and saves the key configuration file of the device.
[0124] In some embodiments, the master routing device can save the identifier (such as the MAC address) of the device and the corresponding key configuration file.
[0125] As an example, the key configuration file can include the encryption / decryption key determined by the device and the master routing device through key negotiation. For example, the encryption key can be used by the master routing device to encrypt the packet to be sent to the device, and the decryption key can be used by the master routing device to decrypt the encrypted packet from the device.
[0126] As an example, the key configuration file can include an encryption mode and / or an encryption security policy determined by the device and the master router through key negotiation. Illustratively, the master router can encrypt the packet to be sent to the device according to the encryption mode and / or the encryption security policy, and decrypt the encrypted packet from the device using the corresponding decryption mode and / or decryption policy.
[0127] Based on S701-S709 shown in FIG. 7, the device can access the network to which the master router is connected. In some embodiments, as shown in FIG. 7, after the device accesses the network to which the master router is connected, the device can perform subsequent sending and receiving of traffic data through the link including the first slave router and the master router. The application embodiments do not make redundant description on the process of sending and receiving traffic data, which can be determined according to specific business types and other occasions.
[0128] FIG. 7 only takes the first slave router as an example of the optimal routing device. In some embodiments, if the second signal indicator is better than the first signal indicator, the master router can determine that the optimal routing device is the second slave router, and instruct the second slave router to initiate connection with the device. After the second slave router establishes connection with the device, the second slave router can transparently transmit the packet for key negotiation between the device and the master router, so as to support the device and the master router to complete the key negotiation process. Wherein, the second slave router transparently transmitting the packet for key negotiation means that the second slave router only forwards the packet without analyzing and processing it. In this way, the second slave router can be avoided from having large processing load and storage load.
[0129] For the case where the second slave router is the optimal routing device, the process of the device connecting to the network can refer to the process shown in FIG. 7, and no redundant description is made.
[0130] As an example, please refer to FIG. 8, which takes the distributed routing system including the master router, the first slave router and the second slave router as an example, and the master router, the first slave router and the second slave router all have As an example, please refer to FIG. 8, which takes the distributed routing system including the master router, the first slave router and the second slave router as an example, and the master router, the first slave router and the second slave router all have
[0131] S801: The device sends a first broadcast message.
[0132] For the related introduction of S801, please refer to the description of S701 in the foregoing, which will not be repeated here.
[0133] S802: The first slave router performs broadcast scanning and scans the first broadcast message from the device; the second slave router performs broadcast scanning and scans the first broadcast message from the device; and the master router performs broadcast scanning and scans the first broadcast message from the device.
[0134] The related description of S802 can refer to the description of S702 in the above, wherein the related description of the master route performing the broadcast scanning and scanning the first broadcast message from the device can refer to the description of the first slave route or the second slave route performing the broadcast scanning, which is not repeated here.
[0135] S803: The first slave route determines a first signal index according to the scanned first broadcast message; the second slave route determines a second signal index according to the scanned first broadcast message; and the master route determines a fifth signal index according to the scanned first broadcast message.
[0136] The related description of S803 can refer to the description of S703 in the above, wherein the related description of determining the fifth signal index according to the scanned first broadcast message from the device can refer to the description of the first slave route determining the first signal index according to the scanned first broadcast message from the device or the second slave route determining the second signal index according to the scanned first broadcast message from the device, which is not repeated here.
[0137] S804: The first slave route sends the first signal index to the master route; and the second slave route sends the second signal index to the master route.
[0138] The related description of S804 can refer to the description of S704 in the above, which is not repeated here.
[0139] S805: The master route determines that the best route device of the device is the master route according to the first signal index, the second signal index and the fifth signal index.
[0140] The fifth signal index is better than the first signal index and the second signal index.
[0141] As a possible implementation manner, the master route can determine the best route device of the device by comprehensively analyzing and comparing the first signal index, the second signal index and the fifth signal index.
[0142] As an example, if the fifth signal indicator is better than the first signal indicator and the second signal indicator, such as third RSSI>first RSSI and third RSSI>second RSSI, or third RSSI-first RSSI>c1 and third RSSI-second RSSI>c1, the master router can determine that the best routing device of the device is the master router; if the first signal indicator is better than the second signal indicator and the fifth signal indicator, such as first RSSI>second RSSI and first RSSI>third RSSI, or first RSSI-second RSSI>c1 and first RSSI-third RSSI>c1, the master router can determine that the best routing device of the device is the first slave router; if the second signal indicator is better than the first signal indicator and the fifth signal indicator, such as second RSSI>first RSSI and second RSSI>third RSSI, or second RSSI-first RSSI>c1 and second RSSI-third RSSI>c1, the master router can determine that the best routing device of the device is the second slave router.
[0143] For the related description of S805, reference can be made to the description of S705 in the foregoing, which will not be repeated here.
[0144] S806: The master router initiates connection with the device.
[0145] S807: The master router performs key negotiation with the device.
[0146] As a possible implementation manner, the device can perform one or more rounds of message sending and receiving with the master router to perform key negotiation.
[0147] As an example, the key negotiation can include but is not limited to one or more of the following: encryption mode negotiation, encryption / decryption key negotiation, encryption security policy negotiation, etc., without limitation. For the manner and process of the device performing key negotiation with the master router, reference can be made to the conventional technology, which will not be repeated here.
[0148] S808: The master router acquires and saves the key configuration file of the device.
[0149] For the related description of S808, reference can be made to the description of S709 in the foregoing, which will not be repeated here.
[0150] Based on S801-S808 shown in FIG. 8, the device can access the network connected by the master router. In some embodiments, as shown in FIG. 8, after the device accesses the network connected by the master router, the device can perform subsequent sending and receiving of service data through the link between the device and the master router.
[0151] Fig. 8 only takes the main route being the optimal route device as an example, in some embodiments, if the first signal index is better than the second signal index and the fifth signal index, the main route can determine that the optimal route device is the first slave route, and the main route instructs the first slave route to initiate connection with the device; after the first slave route establishes connection with the device, the first slave route can transparently transmit the message for key negotiation between the device and the main route, so that the device and the main route complete the key negotiation process. In other embodiments, if the second signal index is better than the first signal index and the fifth signal index, the main route can determine that the optimal route device is the second slave route, and instruct the second slave route to initiate connection with the device; after the second slave route establishes connection with the device, the second slave route can transparently transmit the message for key negotiation between the device and the main route, so that the device and the main route complete the key negotiation process.
[0152] In addition, Fig. 8 only takes the distributed routing system including multiple slave routes as an example, in some embodiments, if the distributed routing system includes a main route and one slave route, the device can also be connected to the network based on a similar process. For example, for the case where the distributed routing system includes a main route and a first slave route, the first slave route can determine the first signal index based on the scanned first broadcast message from the device and send it to the main route when scanning the first broadcast message from the device, the main route can determine the fifth signal index based on the scanned first broadcast message from the device when scanning the first broadcast message from the device, and determine the optimal route device according to the first signal index and the fifth signal index, initiate connection between the optimal route device and the device, and perform subsequent key negotiation process with the device. The specific process can refer to the steps shown in Fig. 8, which will not be described here.
[0153] Based on the method of connecting the device to the network shown in Fig. 7 or Fig. 8, when the device is powered on and first accesses the network, the main route can comprehensively analyze and compare the signal indexes of the wireless signals received from the device by each route device (such as each slave route, or the main route and each slave route) in the distributed routing system, determine the optimal route device therefrom, and establish connection between the optimal route device and the device, so that the device is connected to the optimal route device in the distributed routing system after power-on, and maintains high-quality and high-stability network connection.
[0154] In addition, in the method shown in Fig. 7 or Fig. 8, for the case where the optimal route device is a slave route, the device directly performs key negotiation with the main route, and the main route is responsible for maintaining the information such as the MAC address of the device and the key configuration file, as well as the pairing verification during subsequent device connection switching. The slave route only transparently transmits the message for key negotiation, and does not analyze and process it, so that the slave route can be avoided from being brought large processing load and storage load.
[0155] As an example, the method for a device to connect to a network provided by the embodiments of the present application can be applied in a switching scenario, such as a scenario where the device is switched from a first routing device to a second routing device, for example, a switching scenario caused by the reasons shown in FIG. 3, FIG. 4, and FIG. 5.
[0156] As an example, please refer to FIG. 9, which shows a distributed routing system including a master routing device, a first slave routing device, and a second slave routing device, the first slave routing device and the second slave routing device have wireless connection capabilities, and the master routing device does not have As an example, a method flowchart for a device to connect to a network in a switching scenario provided by the embodiments of the present application is shown, taking the example of the master routing device, the first slave routing device, and the second slave routing device having
[0157] As an example, the method for a device to connect to a network shown in FIG. 9 can be implemented based on the method shown in FIG. 7 or FIG. 8.
[0158] As shown in FIG. 9, the method for a device to connect to a network provided by the embodiments of the present application can be implemented based on S901-S907:
[0159] S901: In the process of connecting the device to the first slave routing device, the device sends a second broadcast message.
[0160] As an example, the connection between the device and the first slave routing device is established when the device is powered on for the first time to access the network, or the device is switched to the first slave routing device from another routing device, which is not limited.
[0161] For related introduction of the device sending the second broadcast message, please refer to the description of S701 above, which is not repeated here.
[0162] S902: The first slave routing device performs broadcast scanning and scans the second broadcast message from the device; the second slave routing device performs broadcast scanning and scans the second broadcast message from the device.
[0163] S903: The first slave routing device determines a third signal indicator according to the scanned second broadcast message from the device; the second slave routing device determines a fourth signal indicator according to the scanned second broadcast message from the device.
[0164] As an example, the third signal indicator and the fourth signal indicator can include one or more of the following: RSSI, RSRP, RSRQ, SINR, etc.
[0165] S904: The first slave routing device sends the third signal indicator to the master routing device; the second slave routing device sends the fourth signal indicator to the master routing device.
[0166] For more information on S902-S904, please refer to the description of S702-S704 above; it will not be repeated here.
[0167] S905: The main router determines whether there are routing devices that meet the switching conditions based on the third and fourth signal indicators.
[0168] As an example, the main router can determine whether there are routing devices that meet the switching conditions by comprehensively analyzing and comparing the third and fourth signal indicators.
[0169] As an example, meeting the handover conditions may include having a routing device with better signal metrics. For instance, if the fourth signal metric is better than the third signal metric, then the second slave route is determined to meet the handover conditions; if the fourth signal metric is worse than the third signal metric or the fourth signal metric is equal to the third signal metric, then the second slave route is determined not to meet the handover conditions.
[0170] Taking the third signal indicator including the first RSSI and the fourth signal indicator including the second RSSI as an example, if the second RSSI > the first RSSI, or the second RSSI - the first RSSI > d1, then the master route can determine that the second slave route meets the handover conditions; if the second RSSI ≤ the second RSSI, or |second RSSI - first RSSI| ≤ d1, then the master route can determine that the second slave route does not meet the handover conditions.
[0171] As an example, the range of values for d1 could be (0dB, 4dB), for example, d1 = 3dB, without limitation.
[0172] Regarding the cases where the third and fourth signal indicators include RSRQ or SINR, and the cases where the third and fourth signal indicators include RSSI and RSRQ / SINR, the relevant introduction on how the main router determines whether the handover conditions are met can be found in the judgment process when the third and fourth signal indicators include RSSI, or in other judgment processes in conventional technologies. This application does not limit the scope of the embodiments.
[0173] In some embodiments, if the master router determines that there is no routing device that meets the switching conditions, the master router does not take any action, and the device continues to connect to the first slave router.
[0174] In some embodiments, if the master route determines that the second slave route meets the switching conditions, the master route executes the following S906-S907.
[0175] In some embodiments, the device does not perform the preset task when the first slave router disconnects from the device. As an example, the preset task can be a task with high importance, and the preset task can include, but is not limited to, one or more of the following: software version upgrade, software repair, software package download, high-priority service, etc.
[0176] As a possible implementation, the master router can determine whether the device is performing a preset task, and when the device is not performing the preset task, determine whether there is a router device satisfying the switching condition according to the third signal indicator and the fourth signal indicator; or when the device is performing the preset task, do not process until the preset task is completed, and then determine whether there is a router device satisfying the switching condition according to the third signal indicator and the fourth signal indicator.
[0177] As a possible implementation, when it is determined that there is a router device satisfying the switching condition, the master router can determine whether the device is performing a preset task, and when the device is not performing the preset task, perform S906-S907; or when the device is performing the preset task, do not process until the preset task is completed, and then re-perform the steps shown in S901-S905.
[0178] S906: The master router instructs the first slave router to disconnect from the device, and instructs the second slave router to initiate connection with the device.
[0179] As an example, the implementation of "the master router instructs the first slave router to disconnect from the device" is that the master router can send a packet or message carrying a second parameter and an identifier of the device to the first slave router, to instruct the second slave router to disconnect from the device according to the identifier, and the second parameter indicates disconnection.
[0180] As an example, the implementation of "the master router instructs the second slave router to initiate connection with the device" is that the master router can send a packet or message carrying a first parameter and an identifier of the device to the second slave router, to instruct the second slave router to initiate connection with the device according to the identifier, and the first parameter indicates connection establishment.
[0181] S907: After the device establishes connection with the second slave router, the device transmits and receives service data with the master router through the second slave router.
[0182] FIG. 9 only takes the master router without wireless connection capability as an example. In some embodiments, the master router also has wireless connection capability. For this case, as shown in FIG. 10, the method for the device to connect to the network provided by the embodiments of the present application can be implemented based on S1001-S1007, or based on S1001-S1005 and S1008-S1009.
[0183] S1001: In the process that the device connects with the first slave route, the device sends the second broadcast message.
[0184] For the related introduction of S1001, please refer to the description of S901 above, which will not be repeated here.
[0185] S1002: The first slave route performs broadcast scanning and scans the second broadcast message from the device; the second slave route performs broadcast scanning and scans the second broadcast message from the device; and the master route performs broadcast scanning and scans the second broadcast message from the device.
[0186] For the related introduction of S1002, please refer to the description of S802 above, which will not be repeated here.
[0187] S1003: The first slave route determines the third signal index according to the scanned second broadcast message from the device; the second slave route determines the fourth signal index according to the scanned second broadcast message from the device; and the master route determines the sixth signal index according to the scanned second broadcast message from the device.
[0188] For the related introduction of S1003, please refer to the description of S803 above, which will not be repeated here.
[0189] S1004: The first slave route sends the third signal index to the master route; and the second slave route sends the fourth signal index to the master route.
[0190] For the related introduction of S1004, please refer to the description of S804 above, which will not be repeated here.
[0191] S1005: The master route determines whether there is a route device satisfying the switching condition according to the third signal index, the fourth signal index and the sixth signal index.
[0192] As an example, the master route can determine whether there is a route device satisfying the switching condition by comprehensively analyzing and comparing the third signal index, the fourth signal index and the sixth signal index. For example, if the sixth signal index is better than the third signal index and the fourth signal index, it is determined that the master route satisfies the switching condition; if the fourth signal index is better than the third signal index and the sixth signal index, it is determined that the second slave route satisfies the switching condition.
[0193] As an example, if the second RSSI > the first RSSI and the second RSSI > the third RSSI, or the second RSSI - the first RSSI > d1 and the second RSSI - the third RSSI > d1, the master router can determine that the second slave router satisfies the switching condition; or the third RSSI > the first RSSI and the third RSSI > the second RSSI, or the third RSSI - the first RSSI > d1 and the third RSSI - the second RSSI > d1, the master router can determine that the master router satisfies the switching condition.
[0194] For other related descriptions of S1005, refer to the description of S905 above, which will not be repeated here.
[0195] In some embodiments, if the master router determines that neither the second slave router nor the master router satisfies the switching condition, the master router does not process, and the device continues to connect with the first slave router, as shown in FIG. 10.
[0196] In some embodiments, if the master router determines that the master router satisfies the switching condition, the master router performs the following S1006-S1007:
[0197] S1006: The master router instructs the first slave router to disconnect with the device, and the master router establishes a connection with the device.
[0198] S1007: After establishing a connection with the master router, the device transmits and receives service data with the master router.
[0199] In some embodiments, if the master router determines that the second slave router satisfies the switching condition, the master router performs the following S1008-S1009:
[0200] S1008: The master router instructs the first slave router to disconnect with the device, and instructs the second slave router to initiate a connection with the device.
[0201] S1009: After establishing a connection with the second slave router, the device transmits and receives service data with the master router through the second slave router.
[0202] As an example, the method for the device to connect to the network shown in FIG. 10 can be implemented based on the method shown in FIG. 7 or FIG. 8.
[0203] FIG. 10 is only an example of the switching of the device connection based on the process in the distributed routing system including multiple slave routes. In some embodiments, if the distributed routing system includes a master route and one slave route, the switching of the device connection can also be implemented based on a similar process. For example, for the case that the distributed routing system includes a master route and a first slave route, during the process that the device is connected with the first slave route, the first slave route can determine the third signal indicator based on the scanned second broadcast message and send the third signal indicator to the master route when the second broadcast message from the device is scanned, the master route can determine the sixth signal indicator based on the scanned second broadcast message when the second broadcast message from the device is scanned, and determine whether the master route meets the switching condition according to the third signal indicator and the sixth signal indicator, and disconnect the connection between the first slave route and the device when the master route meets the switching condition, and establish the direct connection between the master route and the device. The specific process can refer to the steps shown in FIG. 10, which will not be repeated here.
[0204] Based on the method of the device connection network shown in FIG. 9 or FIG. 10, during the process that the device is connected to the network, if there is a routing device with better signal indicator in the distributed routing system, the master route can comprehensively analyze and compare the signal indicators of the wireless signals from the device received by each routing device in the distributed routing system, determine a new best routing device according to the actual network condition, and establish the connection between the new best routing device and the device, so that the device is always connected with the best routing device in the distributed routing system, and the device always maintains the high-quality and high-stability network connection.
[0205] In addition, in the method shown in FIG. 9 or FIG. 10, the switching of the device connection is initiated by the master route, and the slave route or the master route performs the disconnection and establishment of the connection, and there is no special requirement for the capability of the device, for example, the device does not need to support the routing switching instruction or the gateway switching instruction, and thus the conventional device can be adapted.
[0206] It should be understood that the various schemes of the embodiments of the present application can be reasonably combined, and the explanation or description of each term appearing in the embodiments can be mutually referenced or explained in the various embodiments, and this is not limited.
[0207] It should also be understood that in various embodiments of the present application, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0208] It can be understood that, in order to implement the functions of any one of the above embodiments, the device comprises a hardware structure and / or a software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and software. Whether a certain function is implemented in hardware or software driven hardware depends on the specific application of the technical solution and the design constraints. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0209] The embodiments of the present application can divide the functions of the device into function modules. For example, each function module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or software function module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. Actual implementation can have another division method.
[0210] It should also be understood that each module in the device can be implemented in the form of software and / or hardware, and is not specifically limited. In other words, the electronic device or server is presented in the form of a function module. The "module" here can refer to an application specific integrated circuit (ASIC), a circuit, a processor and a memory executing one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions.
[0211] In an optional manner, when the data transmission is implemented by using software, it can be implemented in the form of a program product (also referred to as a computer program product) in whole or in part. The program product includes one or more instructions (also referred to as computer instructions). When the instructions are loaded and executed on a device or a computer, the processes or functions related to the embodiments of the present application are implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The instructions can be stored in a readable storage medium (also referred to as a computer readable storage medium) or transferred from one readable storage medium to another readable storage medium, for example, the instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as a coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The readable storage medium can be any available medium that can be accessed by a device or a computer, or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium, etc.
[0212] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, registers, hard disk, a removable media, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. Alternatively, the processor and the storage medium can be located in a remote terminal. The processor and the storage medium can constitute a computing platform for implementing a portion or all of the embodiments disclosed herein.
[0213] Those skilled in the art can clearly understand that, for the convenience and brevity, only the division of the above functional modules is taken as an example for description, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
Claims
A method of connecting a device to a network, characterized by The method comprises: The master router receives a first signal indicator from a first slave router, the first signal indicator representing a signal indicator of a first broadcast message from a device scanned by the first slave router; The master router receives a second signal indicator from a second slave router, the second signal indicator representing a signal indicator of the first broadcast message from the device scanned by the second slave router; The master router determines a best router device of the device according to the first signal indicator and the second signal indicator, the best router device being the first slave router or the second slave router; The master router instructs the best router device to establish a connection with the device. The method of claim 1, wherein When the master router receives the first signal indicator from the first slave router, the device is not connected to a network to which the master router is connected, and the method further comprises: The master router performs key negotiation with the device through the best router device to obtain a key profile of the device; The master router saves the key profile. The method according to claim 2, characterized in that A message for key negotiation is transparently transmitted between the master router and the device by the best router device. The method according to any one of claims 1-3, characterized in that The master router determines the best router device of the device according to the first signal indicator and the second signal indicator, comprising: If the first signal indicator is better than the second signal indicator, the master router determines that the best router device is the first slave router; If the second signal indicator is better than the first signal indicator, the master router determines that the best router device is the second slave router. The method according to any one of claims 1-4, characterized in that The best router device is the first slave router, and after the best router device establishes a connection with the device, the method further comprises: The master router receives a third signal indicator from the first slave router, the third signal indicator representing a signal indicator of a second broadcast message from the device scanned by the first slave router; The master router receives a fourth signal indicator from the second slave router, the fourth signal indicator representing a signal indicator of the second broadcast message from the device scanned by the second slave router; The master router determines that the second slave router satisfies a switching condition according to the third signal indicator and the fourth signal indicator; The master router instructs the first slave router to disconnect the connection with the device and instructs the second slave router to establish a connection with the device. The method according to claim 5, characterized in that When the first slave router disconnects the connection with the device, the device does not perform a preset task, and the preset task comprises one or more of the following: software version upgrade, software repair, software package download, high-priority service. The method according to claim 5 or 6, characterized in that The second slave router satisfies the switching condition, comprising that the fourth signal indicator is better than the third signal indicator. A method of connecting a device to a network, characterized by The method comprises: The master router receives a first signal indicator from a first slave router, the first signal indicator representing a signal indicator of a first broadcast message from a device scanned by the first slave router; The master router receives a second signal indicator from a second slave router, the second signal indicator representing a signal indicator of the first broadcast message from the device scanned by the second slave router; The master router determines a fifth signal indicator according to the first broadcast message scanned from the device; The master router determines that the optimal routing device of the device is the first slave router or the second slave router according to the first signal indicator, the second signal indicator and the fifth signal indicator, and the master router instructs the optimal routing device to establish a connection with the device; or, the master router determines that the optimal routing device of the device is the master router according to the first signal indicator, the second signal indicator and the fifth signal indicator, and the master router establishes a connection with the device. The method of claim 8, wherein The method further comprises: when the master router receives the first signal indicator from the first slave router, the device is not connected to the network to which the master router is connected, and the method further comprises: The optimal routing device is the first slave router or the second slave router, and the master router performs key negotiation with the device through the optimal routing device to obtain a key configuration file of the device; The master router saves the key configuration file; Or, The optimal routing device is the master router, and the master router performs key negotiation with the device to obtain a key configuration file of the device; The master router saves the key configuration file. The method of claim 9, wherein The optimal routing device is the first slave router or the second slave router, and a message for key negotiation is transparently transmitted between the master router and the device by the optimal routing device. The method according to any one of claims 8-10, characterized in that The master router determines the optimal routing device of the device according to the first signal indicator, the second signal indicator and the fifth signal indicator, comprising: If the first signal indicator is better than the second signal indicator and the fifth signal indicator, the master router determines that the optimal routing device is the first slave router; If the second signal indicator is better than the first signal indicator and the fifth signal indicator, the master router determines that the optimal routing device is the second slave router; If the fifth signal indicator is better than the first signal indicator and the second signal indicator, the master router determines that the optimal routing device is the master router. The method according to any one of claims 8-11, characterized in that The optimal routing device is the first slave router, and after the optimal routing device establishes a connection with the device, the method further comprises: The master router receives a third signal indicator from the first slave router, and the third signal indicator represents a signal indicator of a second broadcast message scanned by the first slave router from the device; The master router receives a fourth signal indicator from the second slave router, and the fourth signal indicator represents a signal indicator of the second broadcast message scanned by the second slave router from the device; The master router determines a sixth signal indicator according to the second broadcast message scanned from the device; The master router determines, according to the third signal index, the fourth signal index and the sixth signal index, that the second slave router meets a switching condition, instructs the first slave router to disconnect from the device, and instructs the second slave router to establish a connection with the device; or the master router determines, according to the third signal index, the fourth signal index and the sixth signal index, that the master router meets a switching condition, instructs the first slave router to disconnect from the device, and establishes a connection with the device. The method of claim 12, wherein When the first slave router disconnects from the device, the device does not perform a preset task, and the preset task includes one or more of the following: software version upgrade, software repair, software package download, high-priority service. The method of claim 12 or 13, wherein The second slave router meets a switching condition, including that the fourth signal index is better than the third signal index and the sixth signal index. The master router meets a switching condition, including that the sixth signal index is better than the third signal index and the fourth signal index. A routing device, characterized by The routing device includes: a memory for storing one or more programs; a transceiver for transmitting or receiving signals; a processor for running the one or more programs to support the routing device to implement the method of any one of claims 1-7 or 8-14. A readable storage medium characterized by, The readable storage medium has a program stored thereon, and the program, when run by one or more processors, implements the method of any one of claims 1-7 or 8-14.
Citation Information
Patent Citations
A method for establishing and switching communication link, and related device and system
CN109039890A
Network optimization method and device, electronic equipment and storage medium
CN117692928A
Network access method, apparatus and device
US20230117118A1
Network access method and device
WO2019075647A1