Link selection method, router, system and storage medium based on self-organizing network
By collecting and adjusting link metric information in the ad hoc network environment and selecting the optimal backhaul link, the problem of link quality changes in the ad hoc network environment is solved, and network coverage and user experience are improved.
Patent Information
- Application Number
- CN202310522215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-05-09
AI Technical Summary
In the ad hoc network environment, the link quality of the backhaul link is likely to change due to the addition of new routers, changes in connection type between routers, unstable connections, changes in router locations, or interference from external devices, resulting in a decrease in wireless transmission rate. Impact network coverage and quality.
A link selection method based on ad hoc network is adopted to collect backhaul link metric information of each slave router through the main router, calculate the initial estimated bandwidth of each link, and combine the wireless connection type, number of STA devices and channel utilization. Adjust the link with the best performance to achieve optimization of the backhaul link.
It improves the Internet access experience of user terminal devices on the ad hoc network node, enhances the stability of network coverage and signal quality, and automatically optimizes links in response to changes in the network environment.
Smart Images

Figure CN117715141B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of self-organizing networks, and in particular to a link selection method, router, system and storage medium based on a self-organizing network. Background Art
[0002] With the improvement of economic level, more and more families will choose large-sized apartments, duplexes or villas, or some companies will use large offices. However, partition walls, stairs, etc. will cause wireless signal attenuation, thereby reducing the wireless transmission rate and affecting the quality of wireless transmission. Therefore, in a relatively large space, a single router can no longer fully cover all areas.
[0003] Currently, multiple routers can be used to form a network topology to expand network coverage. However, the use of multiple routers to form a network faces a complex wireless network environment. The link quality of the backhaul link may change due to various reasons such as the addition of new routers, changes in the connection type between routers, unstable connections between routers, changes in router locations, and interference from external devices. In an ad hoc network environment, how to optimize the backhaul link has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a link selection method, router, system and storage medium based on an ad hoc network, which solves the technical problem of how to automatically optimize a return link in an ad hoc network environment.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In the first aspect, the embodiment of the present application provides a link selection method based on an ad hoc network. The method can be applied to the main router of the ad hoc network system. The method includes: on the established topology, N links are planned according to the number of slave routers in the ad hoc network system; according to the return link measurement information of each link in the N links, the initial estimated bandwidth of each link is obtained, and the return link measurement information of each link is obtained by measuring the return link of the topology structure from the slave router of each link; according to the number of wireless layers of each link, the initial estimated bandwidth after attenuation is obtained; according to the number of STA devices connected to the first router of each link, the first attenuation is obtained; according to the channel utilization rate of the first sub-link of each link, the second attenuation is obtained; the initial estimated bandwidth after attenuation is subtracted from the first attenuation and the second attenuation to obtain the final estimated bandwidth of each link; after obtaining the final estimated bandwidth of the N links, the first link is selected, and the first link is the link with the largest final estimated bandwidth among the N links.
[0007] In the above scheme, when the link quality of the backhaul link changes due to the addition of a new router, a change in the connection type between routers, an unstable connection between routers, a change in the location of a router, interference from external devices, etc., the master router can collect backhaul link measurement information from each slave router to obtain the initial estimated bandwidth of each link, and then adjust the initial estimated bandwidth of each link based on factors such as the impact of the attenuation of the wireless connection type on the estimated bandwidth, the impact of the STA device mounted on the slave router on the estimated bandwidth, and the impact of the channel utilization on the estimated bandwidth, so that the re-obtained estimated bandwidth is more accurate. In this way, the master router can select a link with the best performance from N links, realize the optimization of the backhaul link, and thus improve the Internet experience of users when using terminal devices to access each node of the self-organizing network.
[0008] In some embodiments, the backhaul link measurement information of each link may include at least one of the following: the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the protection interval of each link, and the bandwidth of each link. Exemplarily, a corresponding relationship table of frequency band, transmission rate, number of spatial streams, protection interval, bandwidth, and estimated bandwidth may be established in advance. When the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the protection interval of each link, and the bandwidth of each link are obtained, the main router may obtain the initial estimated bandwidth of each link by consulting the mapping relationship table.
[0009] It should be understood that compared with estimating the bandwidth of the link based only on RSSI, by collecting various link information such as the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the protection interval of each link and the bandwidth of each link, the initial estimated bandwidth of each link can be obtained more accurately.
[0010] In some embodiments, the backhaul link measurement information may also include the RSSI of the link. Accordingly, before obtaining the initial estimated bandwidth of each link according to the backhaul link measurement information of each link in the N links, the method may also include: obtaining the RSSI of each link from the backhaul link measurement information of each link; determining the transmission rate corresponding to the RSSI indication of each link. Among them, the correspondence between the received signal strength of the link and the transmission rate of the link is preset. Exemplarily, a mapping relationship table is established for the signal strength range and transmission rate of different frequency bands, for example, a mapping relationship table of the signal strength and transmission rate of the 2.4G frequency band and a mapping relationship table of the signal strength and transmission rate of the 5G frequency band are established. The main router can obtain the transmission rate corresponding to the RSSI indication of each link by looking up the table according to the frequency band of the link.
[0011] It should be understood that in some cases RSSI cannot well reflect the bandwidth of the link, but the transmission rate can better reflect the bandwidth of the link. In this case, the estimated bandwidth of the link can be calculated based on the transmission rate.
[0012] In some embodiments, the backhaul link measurement information may also include the number of layers and connection type of the link. Accordingly, according to the number of wireless layers of each link, the initial estimated bandwidth after attenuation is obtained, including: obtaining the number of layers and connection type of each link from the backhaul link measurement information of each link; determining the number of wireless layers of each link according to the number of layers and connection type of each link; when the number of wireless layers of the i-th link in N links is greater than or equal to 2, the initial estimated bandwidth after attenuation is obtained using the following relationship:
[0013] TP (i) *α*(Ln (i) -1);
[0014] The number of levels of each link refers to the number of sub-links from the slave router at the lowest level of each link to the main router. The number of wireless levels of each link refers to the number of wireless connection sub-links from the slave router at the lowest level of each link to the main router. The connection type is either wireless or wired. TP (i) represents the initial estimated bandwidth of the i-th link among N links, α is the wireless attenuation coefficient, Ln (i) Indicates the number of wireless layers of the i-th link.
[0015] It should be understood that when the number of wireless layers of the i-th link in N links is greater than or equal to 2, by multiplying the initial estimated bandwidth by the wireless attenuation coefficient and the number of wireless layers, the impact of the attenuation of the wireless connection type on the estimated bandwidth can be effectively reduced, so that the recalculated initial estimated bandwidth is closer to the actual bandwidth. It should be noted that when the number of wireless layers of the link is equal to 1, it is not necessary to multiply it by the wireless attenuation coefficient.
[0016] In some embodiments, the backhaul link metric information may also include the number of STA devices connected to the router. Accordingly, obtaining the first attenuation according to the number of STA devices connected to the first router of each link includes: obtaining the number of STA devices connected to the first router of each link from the backhaul link metric information of each link; and obtaining the first attenuation according to the number of STA devices using the following relationship:
[0017] β*Num sta(i) ;
[0018] Among them, β is the load weight coefficient, Num sta(i)Indicates the number of STA devices connected to the first router of the i-th link among N links.
[0019] Exemplarily, the first router of each link is any one of the following: a router at the upper level of the lowest-level slave router in each link; a slave router at the highest level in each link; a router with the largest number of STA devices mounted in each link; or all slave routers in each link.
[0020] It should be understood that the more STA devices connected to the router, the greater the impact on the estimated bandwidth. By multiplying the load weight coefficient by the number of STA devices connected to the first router to obtain the first attenuation, and then subtracting the first attenuation, the impact of the STA devices mounted on the AP device on the estimated bandwidth can be effectively reduced, so that the final estimated bandwidth is closer to the actual bandwidth.
[0021] In some embodiments, the backhaul link measurement information may also include channel utilization of each sub-link. Accordingly, obtaining the second attenuation according to the channel utilization of the first sub-link of each link includes: obtaining the channel utilization of the first sub-link of each link from the backhaul link measurement information of each link; and obtaining the second attenuation according to the channel utilization of the first sub-link of each link using the following relationship:
[0022] γ*ChU bssid(i) ;
[0023] Among them, γ is the channel utilization coefficient, ChU bssid(i) Indicates the channel utilization of the first sub-link of the i-th link among the N links.
[0024] Exemplarily, the first sub-link of each link is any one of the following: a sub-link of at least one sub-link of each link that is used to connect a slave router at the lowest level and a router at the upper level of the lowest level; a sub-link of at least one sub-link of each link that is used to connect a master router and a slave router at the highest level.
[0025] It should be understood that the higher the channel utilization of a sub-link, the smaller the remaining available bandwidth, and the greater the impact on the estimated bandwidth. By multiplying the channel utilization coefficient by the channel utilization of the first sub-link to obtain the second attenuation, and then subtracting the second attenuation, the impact of the channel utilization on the estimated bandwidth can be effectively reduced, so that the final estimated bandwidth is closer to the actual bandwidth.
[0026] In some embodiments, the final estimated bandwidth of each link is obtained by subtracting the first attenuation and the second attenuation from the initial estimated bandwidth after attenuation, including: calculating the final estimated bandwidth of each link using the following relationship:
[0027]
[0028] Where m represents the number of times the backhaul link measurement data is continuously collected after the preset time of establishing the topology structure, TP (ij) represents the initial estimated bandwidth of the ith link in the jth acquisition, α is the wireless attenuation coefficient, Ln (i) represents the number of wireless layers of the ith link, β is the load weight coefficient, Num sta(i) represents the number of STA devices connected to the first router of the i-th link among N links, γ is the channel utilization coefficient, ChU bssid(i) Indicates the channel utilization of the first sub-link of the i-th link among the N links.
[0029] It should be understood that when the master router periodically and continuously collects m times of return link measurement data from each slave router, since the topology structure is stable and unchanged, theoretically, Ln in each collection of return link measurement data is (i) Remains unchanged, and when the number of STA devices mounted on the router changes, it may cause β*Num sta(i) Dynamic changes, when the STA device's business changes may cause γ*ChU bssid(i) Dynamic changes, when the link frequency band, transmission rate, number of spatial streams, guard interval and / or frequency band changes, may cause TP (ij) Dynamic changes. When β*Num sta(i) , γ*ChU bssid(i) and TP (ij) When the estimated bandwidth changes dynamically, it may change. For each link, by taking the average of the m corrected estimated bandwidths, the final estimated bandwidth can be made more accurate, effectively reducing the error caused by some accidental factors.
[0030] In some embodiments, before planning N links according to the number of slave routers in the self-organizing network system, the method also includes: sending a return link metric query message to each slave router in the self-organizing network system; receiving a return link metric response message returned by each slave router, the return link metric response message containing return link metric information; and updating the return link metric information of each slave router stored in the data structure.
[0031] Exemplarily, the main router can trigger the link optimization process in any of the following situations: when the main router detects that a slave router joins the ad hoc network and establishes a topology structure, a return link metric query message is sent to each slave router in the ad hoc network system; or, when the main router detects that the connection type between routers in the ad hoc network system has changed and re-establishes the topology structure, a return link metric query message is sent to each slave router in the ad hoc network system; or, the main router sends a return link metric query message to each slave router in the ad hoc network system according to a preset period.
[0032] It should be understood that the master router can obtain the backhaul link metric information of these slave routers when the network environment of the ad hoc network changes by sending a backhaul link metric query message to each slave router, thereby optimizing the backhaul link.
[0033] In some embodiments, after selecting the first link, the method may further include: determining whether the first link belongs to a topological structure; if the first link does not belong to a topological structure, determining a slave router to be connected to the first link; and sending a return link switching request message to the router, the return link switching request message including a basic service setting identifier and channel information of the first link.
[0034] It should be understood that when the network environment of the ad hoc network changes, the link in the established topology structure may already be the optimal backhaul link, and there is no need to optimize the backhaul link. If the link in the established topology structure does not include the optimal backhaul link, it is necessary to optimize the backhaul link and notify the slave router that has not yet connected to the optimal backhaul link to switch the link.
[0035] In some embodiments, after sending a return link switching request message to the slave router to be connected to the first link, the method also includes: receiving a return link switching result message returned by the router, the return link switching result message indicating success or failure of switching to the first link; in the case where the return link switching result message indicates failure of switching to the first link, re-sending a return link metric query message to each slave router in the self-organizing network system, or re-sending a return link switching request message to the slave router to be connected to the first link.
[0036] It should be understood that the master router can promptly learn whether the slave router has successfully switched to the optimal backhaul link and determine whether it needs to re-initiate link measurement or link connection by obtaining the backhaul link switching result message from the slave router to be connected to the first link.
[0037] In the second aspect, the embodiment of the present application provides a link selection method based on an ad hoc network. The method can be applied to a slave router of an ad hoc network system. The method may include: periodically measuring the backhaul link of the slave router to obtain backhaul link measurement information; receiving a backhaul link measurement query message from a master router; in response to the backhaul link measurement query message, returning a backhaul link measurement response message to the master router, the backhaul link measurement response message including the backhaul link measurement information; receiving a backhaul link switching request message from the master router, the backhaul link switching request message including the basic service setting identifier and channel information of the first link, the first link being the link with the largest estimated bandwidth obtained according to the backhaul link measurement information of each slave router in the ad hoc network system; in response to the backhaul link switching request message, disconnecting the original backhaul link, and attempting to connect to the first link.
[0038] In the above scheme, when the link quality of the backhaul link changes due to the addition of a new router, a change in the connection type between routers, an unstable connection between routers, a change in the location of a router, interference from external devices, etc., the slave router can detect these change parameters in time by measuring the backhaul link and feed them back to the master router, so that the master router can obtain the estimated bandwidth of each link based on these change parameters, and then optimize the backhaul link based on the selected link with the best performance. In addition, based on the backhaul link switching request message of the master router, the slave router can switch to the optimal backhaul link.
[0039] In some embodiments, the above-mentioned backhaul link measurement information includes at least one of the following: the frequency band of the backhaul link from the router, the transmission rate of the backhaul link from the router, the number of spatial streams of the backhaul link from the router, the protection interval of the backhaul link from the router and the bandwidth of the backhaul link from the router.
[0040] It should be understood that the slave router uses various link information such as the frequency band of the backhaul link, the transmission rate of the backhaul link, the number of spatial streams of the backhaul link, the protection interval of the backhaul link, and the bandwidth of the backhaul link to facilitate the master router to more accurately obtain the initial estimated bandwidth of the backhaul link based on this information.
[0041] In some embodiments, after attempting to connect to the first link, the method further includes: sending a backhaul link switching result message to the primary router, the backhaul link switching result message indicating success or failure of switching to the first link.
[0042] It should be understood that the slave router to be connected to the first link can return the backhaul link switching result message to the master router, so that the master router can promptly know whether it has successfully switched to the optimal backhaul link and determine whether it needs to re-initiate link measurement or link connection.
[0043] In a third aspect, an embodiment of the present application provides a link selection method based on an ad hoc network. The method can be applied to an ad hoc network system, wherein the ad hoc network system includes a master router and multiple slave routers. The method comprises: a master router sends a backhaul link metric query message to each slave router among a plurality of slave routers; each slave router measures the backhaul link of each slave router in response to the backhaul link metric query message to obtain backhaul link metric information, and returns a backhaul link metric response message to the master router, wherein the backhaul link metric response message contains the backhaul link metric information; the master router plans N links according to the number of slave routers, and obtains the initial estimated bandwidth of each link according to the backhaul link metric information of each link in the N links; the master router obtains the final estimated bandwidth of each link according to the number of wireless layers of each link, the number of STA devices connected under the first router of each link, and the channel utilization rate of the first sub-link of each link, and selects the first link, wherein the first link is the link with the largest final estimated bandwidth among the N links; the master router sends a backhaul link switching request message to the first router among the plurality of slave routers, wherein the backhaul link switching request message contains the basic service setting identifier and channel information of the first link; the first router disconnects the original backhaul link in response to the backhaul link switching request message, and connects to the first link.
[0044] In the above scheme, in an ad hoc network system composed of a master router and multiple slave routers, when the master router detects that a new router joins the ad hoc network or the connection type between routers changes, the master router triggers the link optimization process, or the master router periodically triggers the link optimization process, thereby automatically optimizing the return link and improving the Internet experience of users when using terminal devices to access various nodes of the ad hoc network.
[0045] In a fourth aspect, the present application provides a device, the device comprising a unit for executing the method in the first aspect or the second aspect. The device may correspond to executing the method described in the first aspect or the second aspect. For the relevant description of the unit in the device, please refer to the description of the first aspect or the second aspect, and for the sake of brevity, it will not be repeated here.
[0046] In a fifth aspect, the present application provides a router. The router may be a master router. The router includes a processor and a memory coupled to the processor. The memory stores instructions, and when the processor executes the instructions, the master router executes the link selection method based on the self-organizing network of the first aspect.
[0047] In a sixth aspect, the present application provides a router. The router may be a slave router. The router includes a processor and a memory coupled to the processor. The memory stores instructions, and when the processor executes the instructions, the slave router executes the link selection method based on the self-organizing network according to the second aspect.
[0048] In a seventh aspect, the present application provides a self-organizing network system. The self-organizing network system includes a master router and a plurality of slave routers connected to the master router. The master router is used to execute the link selection method based on the self-organizing network as described in the first aspect above, and the slave router is used to execute the link selection method based on the self-organizing network as described in the second aspect above.
[0049] In an eighth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are executed on a router, the router executes the link selection method based on an ad hoc network as provided in the first aspect or the second aspect.
[0050] In a ninth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the link selection method based on an ad hoc network as provided in the first aspect or the second aspect.
[0051] In a tenth aspect, the present application provides a chip system. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The chip system can be applied to a terminal device including a communication module and a memory. The interface circuit is used to receive a signal from the memory of the terminal device and send the received signal to the processor, the signal including a computer instruction stored in the memory. When the processor executes the computer instruction, the router can execute the link selection method based on the self-organizing network provided in the first aspect or the second aspect.
[0052] It can be understood that the beneficial effects of the fourth to tenth aspects mentioned above can be found in the relevant descriptions of the first to third aspects mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of an application scenario of a link switching solution based on an ad hoc network provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the topological structure of a self-organizing network system provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of the hardware structure of a router provided in an embodiment of the present application;
[0056] Figure 4 One of the schematic diagrams of the link selection method based on the self-organizing network provided in the embodiment of the present application;
[0057] Figure 5A-5F A schematic diagram of a scenario of automatically optimizing a backhaul link provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the software structure of the ad hoc network system provided in the embodiment of the present application;
[0059] Figure 7 A second schematic diagram of a link selection method based on an ad hoc network provided in an embodiment of the present application;
[0060] Figure 8 A schematic diagram of the flow of the link optimization algorithm provided in the embodiment of the present application;
[0061] Figure 9A-9B A schematic diagram of a scenario for planning a new backhaul link provided in an embodiment of the present application;
[0062] Figure 10A-10B A schematic diagram of another set of scenarios for planning a new backhaul link provided in an embodiment of the present application;
[0063] Fig.11 A schematic diagram of an application scenario of a link optimization algorithm provided in an embodiment of the present application;
[0064] Fig.12 A schematic diagram of another link optimization algorithm application scenario provided in an embodiment of the present application;
[0065] Fig.13 A flowchart of a link optimization algorithm in different scenarios provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0067] In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. In the description of this application, "and / or" is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0068] The terms "first" and "second" in the specification and claims of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects. For example, the first link and the second link are used to distinguish different links, rather than to describe a specific order of links. In the embodiments of this application, "multiple" refers to two or more.
[0069] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0070] Some nouns or terms involved in this application are explained below.
[0071] Wireless fidelity (Wi-Fi) networks are mainly composed of access points (AP) and stations (STA). Among them, AP devices are electronic devices that act as APs in Wi-Fi networks, and STA devices are electronic devices that act as STAs in Wi-Fi networks. In a Wi-Fi network, one or more STA devices can establish a wireless connection with an AP device through a built-in wireless network card or Wi-Fi module. AP devices can provide wireless connection services for STA devices, and multiple STA devices can access the same Wi-Fi network through AP devices to achieve mutual connection. AP devices can be connected to the Internet via wired or wireless connections, so STA devices can connect to the Internet through AP devices, such as downloading data from the Internet side or uploading data to the Internet side, that is, STA devices can implement Wi-Fi Internet access services through AP devices. In an embodiment of the present application, the AP device can be a master router and a slave router, and the STA device can be a mobile phone, a personal computer (PC), a laptop computer, a smart screen, a wearable device, a virtual reality (VR) device, an augmented reality (AR) device or a tablet computer (Pad), etc. connected to the master router and the slave router.
[0072] An ad hoc network is a network that combines mobile communications and computer networks. In an ad hoc network environment, each node can join and leave the network at any time, and the failure of any node will not affect the operation of the entire network, which has strong anti-destruction capabilities. Each node has both router and host functions. As a router, the terminal needs to run the corresponding routing protocol and complete the forwarding and routing maintenance of data packets according to the routing strategy and routing table, so the node is required to implement a suitable routing protocol; as a host, the terminal needs to run various user-oriented applications.
[0073] The backhaul link, also known as the backhaul line, refers to the connection from the access network to the switching center. The switching center is connected to the backbone network, and the backbone network is connected to the core network. The backhaul link network is the middle layer of the telecommunications network structure. It is located between the access network and the backbone network, providing an important connection for the two networks. In an embodiment of the present application, the backhaul link refers to the link between the master router and the slave router, or the link between multiple slave routers, which has the characteristic of being invisible to STA devices such as mobile phones. When a router is connected to different routers, different backhaul links will be formed, and parameters such as the received signal strength indicator (RSSI) and bandwidth of different backhaul links will also be different.
[0074] The number of spatial streams, also known as the number of spatial streams, is determined by the number of antennas of the Wi-Fi device. The more antennas there are, the greater the number of spatial streams and the greater the overall throughput. For example, in a single-input single-output (SISO) Wi-Fi device, the number of spatial streams is 1. In a multiple-in multiple-out (MIMO) Wi-Fi device, the number of spatial streams is multiple, such as 2 or 4. In an embodiment of the present application, both the AP device and the STA device can be a Wi-Fi device.
[0075] The guard interval (GI) is a blank space. Since the maximum number of users that each carrier frequency can carry at the same time is limited, it is necessary to ensure that the time slots of each carrier frequency do not collide with each other during transmission. The purpose of setting the guard interval is to reduce the interference of network signals during transmission and prevent packet collision. The longer the set guard interval time, the smaller the probability of interference between network signals. Conversely, the shorter the set guard interval, the greater the probability of interference. The guard interval specified in protocol 802.11 is GI, and shortGI is a short guard interval. The default long guard interval is 800 nanoseconds. When it is confirmed that the number of users carried is small and the distance is short and it is not easy to collide with packets, the short guard interval used is 400 nanoseconds. It should be understood that in a theoretical interference-free environment, setting a short guard interval can increase the connection rate, but in an actual use environment, a short guard interval may reduce the ability to resist interference, so a long guard interval will be used in most scenarios. In the embodiment of the present application, the guard interval is divided into a short guard interval and a long guard interval, wherein the short guard interval is 400 nanoseconds and the long guard interval is 800 nanoseconds.
[0076] With the improvement of economic level, more and more families will choose large-sized apartments, duplexes or villas, or some companies will use large offices. However, partition walls, stairs, etc. will cause wireless signal attenuation, thereby reducing the wireless transmission rate and affecting the quality of wireless transmission. Therefore, in a relatively large space, a single router can no longer fully cover all areas.
[0077] Currently, multiple routers can be used to form a network topology, thereby expanding the network coverage. However, the use of multiple routers to form a network faces a complex wireless network environment. Due to various reasons such as unstable connection between routers, change of connection type between routers, change of router location, interference from external devices, or the addition of new routers, the link quality of the self-organizing network may change. For example, after router c joins the network, if router a reconnects to router c from router b, the link quality of router a connecting to router c is better than the link quality of router a connecting to router b. Therefore, in the self-organizing network environment, how to optimize the backhaul link has become a technical problem that needs to be solved urgently.
[0078] In view of the above technical problems, an embodiment of the present application provides a link selection scheme based on a self-organizing network. The scheme is applied to a self-organizing network system composed of a master router and multiple slave routers. When the master router detects that a new router joins the self-organizing network and the connection type between routers changes, the master router triggers the link optimization process, or the master router periodically triggers the link optimization process: obtains link metric information from each slave router, and selects the optimal return link based on the link metric information, and then sends the optimal return link to the slave router of the link to be adjusted, so that the slave router switches to the new return link. This solution solves the problem that when the network environment of the self-organizing network changes, the self-organizing network cannot be automatically optimized as the networking equipment increases.
[0079] The following is an example of an application scenario of the link switching solution based on a self-organizing network provided in an embodiment of the present application.
[0080] The first exemplary application scenario
[0081] like Figure 1As shown in the figure, the home fiber is connected to AP1 through a modem. In the initial ad hoc network environment, AP1 is the master router, and AP2 and AP4 are slave routers. AP1, AP2, and AP4 form a stable network topology. At a certain moment, the user places AP3 in the kitchen and connects AP3 to AP1. AP3 joins the ad hoc network as a slave router to form a new network topology. After AP1 detects that AP3 has joined, it determines through link measurement that the link quality of AP4 connecting to AP3 is better than the link quality of AP4 connecting to AP2. At this time, AP1 can notify AP4 to disconnect the backhaul link with AP2 and connect to the backhaul link with AP3.
[0082] The second exemplary application scenario
[0083] Still Figure 1 As shown, the home optical fiber is connected to AP1 through a modem. In the initial ad hoc network environment, AP1 is the master router, AP2, AP3 and AP4 are slave routers, AP1, AP2 and AP4 are connected wirelessly in turn, and AP1 and AP3 are connected wirelessly. AP1, AP2, AP3 and AP4 form a stable network topology. At a certain moment, the user connects AP1 and AP3 with a network cable, so that the connection mode between AP1 and AP3 is changed from wireless connection mode to wired mode. After AP1 detects that the connection mode between AP1 and AP3 has changed, it determines through link measurement that the link quality of AP4 connecting to AP3 is better than the link quality of AP4 connecting to AP2. At this time, AP1 can notify AP4 to disconnect the backhaul link with AP2 and connect to the backhaul link with AP3.
[0084] The third exemplary application scenario
[0085] Still Figure 1 As shown, the home fiber is connected to AP1 through a modem. In the initial ad hoc network environment, AP1 is the master router, and AP2 and AP4 are slave routers. AP1, AP2, and AP4 form a stable network topology. At a certain moment, due to various reasons such as unstable connection between AP2 and AP4, location change of AP2 or AP4, interference from external devices between AP2 and AP4, etc., the link between AP2 and AP4 may suddenly deteriorate. After AP1 detects that the link between AP2 and AP4 has deteriorated, it determines through link measurement that the link quality of AP4 connecting to AP3 is better than the link quality of AP4 connecting to AP2. At this time, AP1 can notify AP4 to disconnect the backhaul link with AP2 and connect to the backhaul link with AP3.
[0086] In the above three application scenarios, when the network environment of the ad hoc network changes, the ad hoc network can automatically optimize the backhaul link as the networking devices increase, the quality of the link changes, and the connection type between routers changes, thereby improving the Internet experience of users when using terminal devices to access various nodes of the ad hoc network.
[0087] It should be noted that the above embodiment is illustrated by taking the modem and the main router as two independent devices, which does not limit the present application. In actual implementation, the modem and the main router can also be integrated into the same electronic device, so that the main router is directly connected to the external network optical fiber.
[0088] An embodiment of the present application provides an ad hoc network system. The ad hoc network system may include a master router and multiple slave routers connected to the master router. The master router and the multiple slave routers may serve as APs in the ad hoc network system, and one or more STA devices may be connected to any router. The connection between the master router and the multiple slave routers may be a wired connection or a wireless connection. The multiple slave routers may be divided into one or more levels.
[0089] For example, Figure 2 A schematic diagram of the topological structure of a self-organizing network system provided in an embodiment of the present application.
[0090] like Figure 2 As shown, the ad hoc network system may include: a main router AP11, slave routers AP21 and AP22 connected to the main router AP11 and belonging to the first level, a slave router AP31 connected to the slave router AP21 and belonging to the second level, and a slave router AP32 connected to the slave router AP22 and belonging to the second level. A mobile phone 1 is connected to the main router AP11, a mobile phone 2 is connected to the slave router AP21, a printer and a projector are connected to the slave router AP22, a PAD is connected to the slave router AP31, and a PC is connected to the slave router AP32.
[0091] In the above-mentioned ad hoc network system, the master router AP11 can automatically perform the following operations based on the link metric information of the slave routers AP21, AP22, AP31 and AP32: Figure 2 For example, AP11 may notify AP31 to disconnect the backhaul link with AP21 and connect to the backhaul link of the master router AP11, the backhaul link of the slave router AP22, or the backhaul link of the slave router AP32. The specific implementation of selecting and adjusting the link in the ad hoc network can refer to the description of the following embodiment, which will not be repeated here.
[0092] It should be noted that the above embodiment is illustrated by taking the self-organizing network system including two levels of slave routing as an example, which does not limit the embodiments of the present application. It should be understood that the self-organizing network system may also include three levels and above of slave routing. As the level of the slave router increases, the signal quality of the router gradually decays, so the level of the slave router can usually be set within three levels.
[0093] For example, Figure 3 A schematic diagram of the hardware structure of a router provided in an embodiment of the present application.
[0094] like Figure 3 As shown, the router 300 may include a processor 301 , a wide area network (WAN) interface 302 , a local area network (LAN) interface 303 , a reset module 304 , a memory 305 , a power module 306 and a wireless communication module 307 .
[0095] It should be noted that the router 300 may be a main router in the ad hoc network system, such as Figure 2 The AP11 shown in FIG. 11 may also be a slave router in an ad hoc network system, such as Figure 2 AP21, AP22, AP31 or AP32 shown.
[0096] In a possible implementation, when the router 300 is a master router in an ad hoc network, the functions of the modules of the router 300 are as follows:
[0097] The processor 301 can be used to send a metric query message to each slave router through the LAN interface 303 or the wireless communication module 307, and select the optimal return link based on the link metric information from each slave router, and then send the optimal return link to the slave router of the link to be adjusted through the LAN interface 303 or the wireless communication module 307 again.
[0098] In addition, the processor 301 can also be used to send data from the STA device connected to the main router and data from the STA devices connected to each slave router to the external network through the WAN interface 302; and forward data from the external network to the STA device connected to the main router and the STA device connected to each slave router through the WAN interface 302.
[0099] The WAN interface 302 is a connection port for connecting to a modem and is used to access an external network.
[0100] The LAN interface 303 is a connection port for connecting to STA devices. The LAN interface 303 is used to connect various slave routers in the ad hoc network and various STA devices under the master router.
[0101] The reset module 304 can be used to restore the factory settings of the main router.
[0102] The memory 305 can be used to store the link metric information from the slave router. In addition, the memory 305 can be used to store the link metric information measured by the master router itself. The link metric information may include RSSI, the number of spatial streams, the protection interval, the frequency band of the link, the bandwidth of the link, the transmission rate of the link, the number of STA devices connected to each router, the connection type between routers, and the channel utilization between routers.
[0103] The power module 306 can be used to provide working power for the main router.
[0104] The wireless communication module 307 can integrate a sending device and a receiving device. The receiving device can receive electromagnetic waves via an antenna, frequency modulate and filter the electromagnetic wave signal, and send the processed signal to the processor 301. The sending device can receive the signal to be sent from the processor 301, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna to radiate it. For example, the receiving device sends the link metric information from the slave router to the processor 301. Then, the sending device sends the optimal return link processed by the processor 301 to the slave router of the link to be adjusted through the antenna. Then, the receiving device sends the return link optimization result from the slave router to the processor 301, and the return link optimization result is a link switching success or a link switching failure.
[0105] In another possible implementation, when the router 300 is a slave router in an ad hoc network, the functions of the modules of the router 300 are as follows:
[0106] The processor 301 can be used to respond to the metric query message from the main router and return the link metric information measured by itself to the main router; and to respond to the switching request message from the main router, disconnect the original backhaul link, and switch to the new backhaul link indicated by the switching request message.
[0107] The WAN interface 302 is a connection port for connecting to a router at an upper level in the topology structure. Link metric information, backhaul link optimization results, data from STA devices under the slave router, etc. can be sent to the master router through the WAN interface 302.
[0108] The LAN interface 303 is a connection port for connecting to the router of the next layer in the topology structure. The LAN interface 303 can forward the metric query message and the switching request message from the main router to the router of the next layer.
[0109] The reset module 304 can be used to restore the factory settings of the slave router.
[0110] The memory 305 can be used to store the link metric information obtained by periodic measurement of itself. The link metric information may include RSSI, number of spatial streams, guard interval, link frequency band, link bandwidth, link transmission rate, number of STA devices connected to each router, connection type between routers, and channel utilization between routers.
[0111] The power module 306 may be used to provide working power to the slave router.
[0112] The wireless communication module 307 can integrate a sending device and a receiving device. The receiving device can receive electromagnetic waves via an antenna, frequency modulate and filter the electromagnetic wave signal, and send the processed signal to the processor 301. The sending device can receive the signal to be sent from the processor 301, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna. For example, the receiving device sends the metric query message and the switching request message from the main router to the processor 301. Then, the sending device sends the link metric information and the backhaul link optimization result to the main router through the antenna.
[0113] It is understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the router. In other embodiments of the present application, the router may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0114] For example, Figure 4 The overall flow chart of the link selection method based on the self-organizing network provided in the embodiment of the present application is as follows. Figure 2 In the self-organizing network system shown, the self-organizing network system may include a master router and a plurality of slave routers connected to the master router. Figure 4 As shown, the method may include the following S401-S408.
[0115] S401, the primary router determines whether a condition for triggering link optimization is met.
[0116] The above-mentioned trigger link optimization conditions are conditions preset in the router by the equipment manufacturer, or conditions stored after the system is upgraded after the router is put into use.
[0117] After the master router and multiple slave routers are powered on and networked successfully, the master router will start to detect whether the conditions for triggering link optimization are met. If the conditions for triggering link optimization are met, the master router will trigger the link optimization process and execute the following S402; if the conditions for triggering link optimization are not met, the master router will continue to periodically detect whether the conditions for triggering link optimization are met, that is, execute the above S401.
[0118] In some embodiments, the above-mentioned trigger link optimization condition may be any one of the following:
[0119] 1. The master router detects that a new slave router has joined the ad hoc network.
[0120] Before a new slave router joins the ad hoc network, the master router and at least one slave router have formed a stable network topology. The new slave router can be directly connected to the master router by wired or wireless means, or indirectly connected to the master router through at least one slave router in the slave router. The master router can detect that a new slave router is online. The new slave router online may make the original network topology a non-optimal topology. In this case, the master router can trigger a link optimization process, such as improving the link quality of the backhaul link of a slave router by changing the backhaul link of the slave router.
[0121] 2. The main router detects that the connection type between routers has changed.
[0122] The above-mentioned “change in the connection type between routers” means that the type of the backhaul link between at least two routers has changed. For example, the connection type between Router 1 and Router 2 is changed from a wired connection to a wireless connection, or the connection type between Router 1 and Router 2 is changed from a wireless connection to a wired connection, or the connection type between Router 1 and Router 2 is changed from a 2.4G connection type to a 5G connection type, or the connection type between Router 1 and Router 2 is changed from a 5G connection type to a 2.4G connection type. Router 1 and Router 2 can be the master router and the slave router, or both Router 1 and Router 2 can be slave routers.
[0123] 3. The primary router periodically triggers the link optimization process.
[0124] After the master router starts to detect whether the conditions for triggering link optimization are met, a timer can be set and start timing, and then the link optimization process is triggered once every preset time interval. The preset time can be pre-set in the master router, or negotiated and determined by the master router and the slave router. In this way, when the link quality of the return link changes due to reasons such as the addition of a new router, changes in the connection type between routers, unstable connections between routers, changes in router locations, interference from external devices, etc., the master router can promptly detect these changes through periodic measurements.
[0125] S402, the master router sends a return link metric query message to each slave router in the ad hoc network.
[0126] The above-mentioned backhaul link metric query message is used to obtain the backhaul link metric information of each slave router.
[0127] The backhaul link metric information of each slave router is the relevant parameters obtained by measuring the backhaul link by the bottom layer driver of each slave router. For example, the backhaul link metric information may include RSSI, number of spatial streams, protection interval, link frequency band, link bandwidth, link transmission rate, number of STA devices connected to each router, connection type between routers, and channel utilization between routers.
[0128] S403, each slave router returns a return link metric response message to the master router respectively.
[0129] The above-mentioned return link metric response message contains the return link metric information of the slave router.
[0130] S404, the master router updates the return link metric information of each slave router.
[0131] The master router may store the return link metric information of each slave router in a data structure. Whenever the return link metric information of a slave router is received, the master router may update the return link metric information of the slave router. That is, the data structure of the master router is used to store the return link metric information of each router that is obtained by the latest measurement.
[0132] It should be noted that, in addition to obtaining the backhaul link measurement information of each slave router, the master router can also obtain the backhaul link measurement parameters of the master router, such as the number of STA devices mounted on the master router.
[0133] S405: The primary router calculates the optimal backhaul link according to the backhaul link metric information.
[0134] After obtaining the return link metric information updated by each slave router, the master router can calculate the return link with the highest score among multiple return links, that is, the optimal return link, according to the link optimization algorithm based on the return link metric information. Then, the master router can determine whether there is a slave router whose return link is to be adjusted based on the optimal return link. If there is a slave router whose return link is to be adjusted, the master router can send the optimal return link to the slave router whose return link is to be adjusted, that is, execute the following S406. If there is no slave router whose return link is to be adjusted, the master router can continue to periodically detect whether the conditions for triggering link optimization are met, that is, execute the above S401.
[0135] For the specific implementation of the link optimization algorithm, reference may be made to the description of the following embodiments and will not be repeated here.
[0136] S406, the master router sends the optimal backhaul link to the slave router whose backhaul link is to be adjusted, for example Figure 4 Slave Router 1 is shown.
[0137] The slave router of the backhaul link to be adjusted is a router that is included in the optimal backhaul link but has not yet joined the optimal backhaul link. For example, the link from router 1 to router 2 and then to router 3 is the optimal backhaul link, but before the backhaul link is adjusted, router 3 is not connected to router 2, but connected to router 4, so router 3 is the slave router of the link to be adjusted.
[0138] S407, the link to be adjusted is switched from the router to a new backhaul link included in the optimal backhaul link.
[0139] The slave router of the link to be adjusted may disconnect the original backhaul link and try to connect to a new backhaul link. The new backhaul link may be the entire optimal backhaul link or a part of the entire optimal backhaul link.
[0140] S408, the slave router of the link to be adjusted returns a return link response message to the master router.
[0141] The backhaul link response message includes the result of switching to the new backhaul link, such as link switching success or link switching failure.
[0142] For example, Figure 5A-5F A set of schematic diagrams of scenarios for automatically optimizing a backhaul link in an ad hoc network environment are shown.
[0143] Assume that AP1 is the master router, and AP2, AP3, and AP4 are slave routers.
[0144] like Figure 5AAs shown, before AP1 determines that the conditions for triggering link optimization are met, the self-organizing network includes two return links: AP4 to AP2 and then to AP1, and AP3 to AP1. After AP1 determines that the conditions for triggering link optimization are met, AP1 sends return link metric query messages to AP2 and AP3 respectively, and AP2 and AP3 return return link metric response messages to AP1 respectively. In addition, AP2 forwards the return link metric query message from AP1 to AP4, and AP4 returns the return link metric response message to AP1 through AP2. It should be noted that the return link metric response message of AP2 and the return link metric response message of AP4 can also be encapsulated by AP2 in the same message and returned to AP1 uniformly.
[0145] After AP1 obtains the updated backhaul link metric information of AP2, AP3, and AP4, AP1 can calculate the optimal backhaul link according to the updated backhaul link metric information and the link optimization algorithm. For example, the optimal backhaul link is the link from AP4 to AP3 and then to AP1. Figure 5B As shown, since AP4 is not yet connected to the optimal backhaul link at this time, AP1 can send a backhaul link switching request message to AP4 through AP2 based on the original link, and the message carries the optimal backhaul link. In addition, the link between AP3 and AP1 is already the optimal backhaul link, so AP3 can continue to maintain the original link without changing the backhaul link.
[0146] As an example, Figure 5C As shown in FIG, after AP4 receives the backhaul link switching request message, it can disconnect the backhaul link between AP2 and AP4 and connect to AP3, thereby establishing the optimal backhaul link. In addition, AP2 does not belong to the optimal backhaul link, so AP2 can continue to maintain the original link without changing the backhaul link. Then, as shown in FIG. Figure 5D As shown, AP4 may return a backhaul link switching response message to AP1 through AP3, where the backhaul link response message includes a result of successful switching to the new backhaul link.
[0147] As another example, Figure 5E As shown in FIG. 1 , after AP4 receives the backhaul link switching request message, it can disconnect the backhaul link between AP2 and AP4 and request to connect to AP3. If AP4 fails to connect to AP3, then AP4 can reconnect to AP2. After AP4 reconnects to AP2, as shown in FIG. Fig. 5F As shown, AP4 may return a backhaul link switching response message to AP1 through AP2, where the backhaul link response message includes the result of failure in switching to the new backhaul link.
[0148] In the link selection method based on the self-organizing network provided in the embodiment of the present application, when the main router detects that a new router joins the self-organizing network and the connection type between routers changes, the main router triggers the link optimization process, or the main router periodically triggers the link optimization process: obtains link metric information from each slave router, and selects the optimal return link based on the link metric information, and then sends the optimal return link to the slave router of the link to be adjusted, so that the slave router switches to the new return link. In this way, when the network environment of the self-organizing network changes, the self-organizing network can automatically optimize the return link as the networking equipment increases, the link quality changes, and the connection type between routers changes, thereby improving the Internet experience of users when using terminal devices to access each node of the self-organizing network.
[0149] The above embodiment is illustrated from the perspective of the interaction between the master router and multiple slave routers. In order to more clearly illustrate the present solution, the link selection method based on the self-organizing network provided by the present application is illustrated from the perspective of the master router and one slave router. For example, the slave router can be a slave router of the backhaul link to be adjusted. It should be noted that the number of slave routers of the backhaul link to be adjusted can also be multiple.
[0150] For example, Figure 6 A schematic diagram of the software structure of the ad hoc network system provided in an embodiment of the present application.
[0151] like Figure 6 As shown, the ad hoc network system includes a master router (controller) and a slave router (agent).
[0152] The main router includes a topology management module, a link metric module, a link optimization module and a message processing module.
[0153] The topology management module of the master router is used to detect whether a new slave router joins the ad hoc network and whether the connection type between the routers in the ad hoc network changes; and when it is detected that a new slave router joins the ad hoc network or that the connection type between the routers in the ad hoc network changes, an event notification is sent to the link metric module of the master router.
[0154] The link metric module of the master router is used to send a return link metric request message to the message processing module of the master router in response to the event notification of the topology management module of the master router; or to periodically send a return link metric request message to the message processing module of the master router.
[0155] The message processing module of the master router is used to send a backhaul link metric query message and a backhaul link switching request message to the slave router; and receive a backhaul link metric response message and a backhaul link switching response message from the slave router.
[0156] The link optimization module of the master router is used to receive the return link metric response message forwarded by the message processing module and the link metric module of the master router; use the link metric information carried by the return link metric response message as input, and calculate the optimal return link through the link optimization algorithm; send the optimal return link to the slave router through the message processing module of the master router; and confirm the result of switching from the slave router to the new return link.
[0157] The slave router includes a link metric module, a message processing module, a link optimization module and a Wi-Fi driver module.
[0158] The message processing module of the slave router is used to receive the backhaul link metric query message and the backhaul link switching request message from the master router; and return the backhaul link metric response message and the backhaul link switching response message to the master router.
[0159] The Wi-Fi driver module of the slave router is used to periodically obtain the backhaul link metric information of the router; and in response to the backhaul link switching request of the master router, switch to the optimal backhaul link.
[0160] The link metric module of the slave router is used to obtain the backhaul link metric information from the Wi-Fi driver module, and in response to the backhaul link metric query message, return the backhaul link metric response message to the master router through the message processing module of the slave router, wherein the backhaul link metric response message carries the backhaul link metric information of the router.
[0161] The link optimization module of the slave router is used to send the optimal backhaul link from the master router to the Wi-Fi driver module of the slave router, and return the result of switching to the new backhaul link from the Wi-Fi driver module to the master router.
[0162] For example, Figure 7 For Figure 6 A flowchart of the link selection method corresponding to the software structure.
[0163] like Figure 7 As shown, the method includes the following S1 to S20.
[0164] S1, the Wi-Fi driver module of the slave router reports the return link metric information to the link metric module of the slave router with a period of time T. After obtaining the return link metric information each time, the link metric module of the slave router saves the latest return link metric information in the data structure.
[0165] The above time length T is preset in the slave router, and may also be determined by negotiation between the master router and the slave router.
[0166] The above-mentioned backhaul link measurement information, also called the backhaul link measurement result, is the relevant parameters obtained by the Wi-Fi driver module of the slave router measuring the backhaul link of the slave router. Among them, the backhaul link measurement information may include the RSSI of the backhaul link of the slave router, the number of spatial streams of the slave router, the protection interval of the backhaul link of the slave router, the frequency band of the backhaul link of the slave router, the bandwidth of the backhaul link of the slave router, the transmission rate of the backhaul link of the slave router, the number of STA devices connected to the router, the connection type between the slave router and other routers, the channel utilization of the backhaul link of the slave router, etc.
[0167] Exemplarily, in one implementation, after the slave router joins the ad hoc network, the link measurement module of the slave router starts a timer, and sends a measurement instruction to the Wi-Fi driver module of the slave router, the measurement instruction is used to indicate that the return link is measured with a period of time T. The Wi-Fi driver module responds to the measurement instruction and returns the measurement information of the return link at intervals of time T. In another implementation, after the slave router joins the ad hoc network, the link measurement module of the slave router starts a timer, and sends a measurement instruction from the Wi-Fi driver module of the router at intervals of time T, each measurement instruction is used to indicate the measurement information of the return link once. The Wi-Fi driver module responds to each measurement instruction and returns the measurement information of the return link. After the Wi-Fi driver module returns the measurement information of the return link each time, the link measurement module of the slave router saves the most recently obtained return link measurement information in the data structure.
[0168] S2, the link metric module of the master router receives an event notification from the topology management module of the master router, or the timing duration of the link metric module of the master router reaches a preset duration.
[0169] The above event notification is detection of a new slave router joining the ad hoc network, or detection of a change in the connection type between routers in the ad hoc network.
[0170] The above preset duration is the periodic duration of the master router periodically sending the return link measurement request to the slave router. Exemplarily, after the master router starts to detect whether the conditions for triggering link optimization are met, a timer can be set and start timing, and then the link optimization process is triggered once every preset duration. Among them, the preset duration can be pre-set in the master router, or it can be determined by negotiation between the master router and the slave router.
[0171] It should be noted that the duration T in the above S1 may be less than or equal to the preset duration in the above S2.
[0172] Exemplarily, after the master router receives the online message from the slave router, the link metric module of the master router sends a time negotiation message to the link metric module of the slave router through the message processing module of the master router and the message processing module of the slave router, and the protocol message carries a negotiation time. Then, the link metric module of the slave router returns a negotiation time confirmation message to the link metric module of the master router through the message processing module of the slave router and the message processing module of the master router. In this way, the master router can use the negotiation time as a preset time, and trigger a link optimization process once every preset time interval; in addition, the slave router can use the negotiation time as a time T, and the Wi-Fi driver module of the slave router reports the return link metric information to the link metric module of the slave router every time interval T. It should be understood that when the time T in S1 is equal to the preset time in S2, the master router triggers the link optimization process and the slave router reports the return link metric information process in step, so that after the master router triggers the link optimization process each time, the latest return link metric information obtained by the slave router can be obtained.
[0173] S3, the link metric module of the master router sends a return link metric request message to the message processing module of the master router.
[0174] The backhaul link metric request message is used to request to obtain the backhaul link metric information from the router.
[0175] S4, the message processing module of the master router sends a backhaul link metric query message to the message processing module of the slave router. The backhaul link metric query message carries the encapsulated backhaul link metric request message.
[0176] S5, the message processing module of the slave router parses the return link metric query message to obtain a return link metric request message, and notifies the link metric module of the slave router of the return link metric request message.
[0177] S6, the link metric module of the slave router obtains the return link metric information obtained by the latest measurement from the saved data structure.
[0178] S7, the link metric module of the slave router assembles the return link metric information, and sends the assembled return link metric information to the message processing module of the slave router.
[0179] S8, the message processing module of the slave router returns a backhaul link metric response message to the message processing module of the master router. The backhaul link metric response message carries encapsulated backhaul link metric information.
[0180] S9, the message processing module of the main router parses the return link metric response message, obtains the return link metric information, and sends the return link metric information to the link metric module of the main router. Then, the link metric module of the main router forwards the return link metric information to the link optimization module of the main router.
[0181] S10, the link optimization module of the master router updates the backhaul link metric information of the slave router, and calculates the optimal backhaul link according to the backhaul link metric information updated by each slave router.
[0182] The master router can calculate the highest-scoring backhaul link among multiple backhaul links, i.e., the optimal backhaul link, according to the link optimization algorithm based on the backhaul link metric information updated by each slave router. Then, the master router can determine whether there is a slave router whose backhaul link is to be adjusted based on the optimal backhaul link. If the slave router is a router in the optimal backhaul link and the slave router has not yet been connected to the optimal backhaul link, the master router can send the optimal backhaul link to the slave router, i.e., execute the following S11.
[0183] S11, the link optimization module of the master router sends a backhaul link optimization message to the message processing module of the master router, where the backhaul link optimization message includes the optimal backhaul link.
[0184] Exemplarily, the backhaul link optimization message may specifically include the basic service set ID (BSSID) and channel information of the optimal backhaul link. In addition, the backhaul link optimization message may also include the media access control (MAC) address of the slave router to be adjusted. It should be understood that the BSSID of a link is used to uniquely identify the backhaul link, and the MAC address of a router is used to uniquely identify the router. The router that receives the backhaul link optimization message can determine the optimal backhaul link, the slave router that needs to adjust the link, and which router the slave router needs to be connected to based on the BSSID and MAC address carried by the message.
[0185] S12, the message processing module of the master router sends a backhaul link switching request message to the message processing module of the slave router. The backhaul link switching request message carries the encapsulated backhaul link optimization message.
[0186] Accordingly, after receiving the backhaul link switching request message, the message processing module of the slave router replies with an acknowledgment (ACK) message to the message processing module of the master router to indicate that the backhaul link switching request message has been received.
[0187] S13, the message processing module of the slave router parses the backhaul link switching request message to obtain a backhaul link optimization message, and notifies the link optimization module of the slave router of the backhaul link optimization message.
[0188] S14, the link optimization module of the slave router notifies the Wi-Fi driver module of the slave router of the backhaul link optimization message.
[0189] S15, the Wi-Fi driver module of the slave router responds to the backhaul link optimization message, disconnects the original backhaul link, and attempts to connect to the optimal backhaul link.
[0190] S16, the Wi-Fi driver module of the slave router returns a backhaul link switching result message to the link optimization module of the slave router. The backhaul link switching result message is used to indicate a backhaul link switching success or a backhaul link switching failure.
[0191] S17, the link optimization module of the slave router sends a backhaul link switching result message to the message processing module of the slave router.
[0192] S18, the message processing module of the slave router returns a backhaul link switching response message to the message processing module of the master router. The backhaul link switching response message carries the encapsulated backhaul link switching result message.
[0193] Correspondingly, after receiving the backhaul link switching response message, the message processing module of the master router replies with an ACK message to the message processing module of the slave router to indicate that the backhaul link switching response message has been received.
[0194] S19, the message processing module of the master router parses the backhaul link switching response message, obtains a backhaul link switching result message, and sends the backhaul link switching result message to the link optimization module of the master router.
[0195] S20, the link optimization module of the master router receives and confirms the backhaul link switching result message. If the backhaul link switching fails, the backhaul link optimization message or the backhaul link metric request message is resent to the slave router.
[0196] In some embodiments, the backhaul link switching result message may include an error code, which may be used to indicate the error type of the backhaul link switching failure. The link optimization module of the primary router may determine the cause of the backhaul link switching failure according to the error code and decide the next operation.
[0197] Exemplarily, Table 1 shows a correspondence between a set of error codes and error causes. If the error code returned from the router is the first error code in Table 1, the master router can re-initiate the link connection from S11; if the error code returned from the router is the second error code, the third error code or the fourth error code in Table 1, the master router can re-initiate the link measurement from S3. It should be noted that the error codes in Table 1 are only exemplary. In actual implementation, other error codes can also be used to indicate the error type of the backhaul link switching failure, and re-initiate the link measurement or link connection according to the error type.
[0198] Table 1
[0199]
[0200]
[0201] The following is an example to illustrate the link optimization algorithm.
[0202] In the link optimization algorithm, the master router first plans N links according to the number of slave routers; then, based on the backhaul link metric information of each link in the N links, the estimated bandwidth of each link is calculated; and then the link with the largest estimated bandwidth is selected as the optimal backhaul link.
[0203] For example, Figure 8 The flowchart of the link optimization algorithm provided in the embodiment of the present application is shown in FIG. Figure 6 The link optimization module of the main router is shown.
[0204] like Figure 8 As shown, the method includes the following S801 to S810.
[0205] S801: Based on the established topology structure, plan N links according to the number of slave routers.
[0206] After the link optimization module of the master router obtains the return link metric information from each slave router, the master router can add a new link to the established topology structure, and finally plan to obtain N links. The N links are composed of the original links and the new links.
[0207] In some embodiments, if the reason for triggering the link optimization process is that the topology management module detects that a new router has joined the self-organizing network, then the link optimization module of the main router can maintain the original links in the established topology structure when planning new links, and connect the new router to each router in the established topology structure to obtain one or more new links.
[0208] For example, Fig. 9AAs shown, in the established topology, the master router is connected to slave router 1 through link 1, the master router is connected to slave router 2 through link 2, and the master router is connected to slave router 3 through link 3. Fig. 9B As shown, it is assumed that at a certain moment, slave router 4 establishes a connection with slave router 1 through link 4 and joins the established topology structure, but link 4 may not be the optimal return link for slave router 4. In this case, the master router can send a return link metric query message to slave router 1, slave router 2, slave router 3 and slave router 4 to obtain the return link metric information of each slave router, and then plan new links on the established topology structure: link 5 for connecting slave router 2 and slave router 4, link 6 for connecting slave router 3 and slave router 4, and link 7 for connecting the master router and slave router 4. In this way, N=4 return links are finally planned: the first return link, slave router 4-slave router 1-master router; the second return link, slave router 4-slave router 2-master router; the third return link, slave router 4-master router; the fourth return link, slave router 4-slave router 3-master router.
[0209] In other embodiments, if the reason for triggering the link optimization process is that the topology management module of the main router detects that the connection type between routers in the self-organizing network has changed, then the link optimization module of the main router can connect the router corresponding to the link with the changed connection type with other routers in the established topology structure when planning a new link to obtain one or more new links.
[0210] For example, Fig. 10A As shown, in the established topology, the master router is connected to slave router 1 through link 1, the master router is connected to slave router 2 through link 2, the master router is connected to slave router 3 through link 3, and slave router 2 is connected to slave router 4 through link 4. Fig. 10BAs shown, it is assumed that at a certain moment, the connection type of link 4 changes from wired connection to wireless connection, but link 4 may not be the optimal backhaul link for slave router 4. In this case, the master router can send a backhaul link metric query message to slave router 1, slave router 2, slave router 3 and slave router 4 to obtain the backhaul link metric information of each slave router, and then plan new links on the established topology: link 5 for connecting slave router 1 and slave router 4, link 6 for connecting slave router 3 and slave router 4, and link 7 for connecting the master router and slave router 4. In this way, N=4 backhaul links are finally planned: the first backhaul link, slave router 4-slave router 1-master router; the second backhaul link, slave router 4-slave router 2-master router; the third backhaul link, slave router 4-master router; the fourth backhaul link, slave router 4-slave router 3-master router.
[0211] In some further embodiments, if the reason for triggering the link optimization process is the periodic triggering of the link metric module of the master router, then when planning a new link, the link optimization module of the master router can connect each slave router to other routers that have not yet been connected to obtain one or more new links.
[0212] After N links are planned, an estimated bandwidth of each link in the N links may be obtained. The estimated bandwidth of each link may be obtained by executing the following S802-S809.
[0213] The following is an example of link i among N links, where i is a positive integer less than or equal to N.
[0214] S802: Obtain the signal strength of link i.
[0215] The master router may first determine each router corresponding to the link i, and then obtain the signal strength of the link i from the return link metric information reported by these slave routers.
[0216] Exemplarily, the signal strength may specifically be RSSI.
[0217] S803, obtaining a transmission rate corresponding to the signal strength of link i.
[0218] In some embodiments, a mapping relationship table between the signal strength and the transmission rate of the backhaul link can be pre-established and stored in the master router. After obtaining the signal strength of link i, the link optimization module of the master router can obtain the transmission rate corresponding to the signal strength by consulting the mapping relationship table.
[0219] Typically, the signal strength range of the backhaul link is -100db to 0db. For ease of calculation, each value in the signal strength range of -100db to 0db can be added by 100, converted to 0db to 100db, and then a mapping relationship table between the signal strength range and the transmission rate can be established. In addition, since the same signal strength in different frequency bands corresponds to different transmission rates, a mapping relationship table between the signal strength range and the transmission rate of different frequency bands can be established separately, for example, a mapping relationship table between the signal strength and the transmission rate of the 2.4G frequency band, and a mapping relationship table between the signal strength and the transmission rate of the 5G frequency band can be established.
[0220] When obtaining the transmission rate corresponding to the signal strength of link i, the link optimization module of the main router can first determine the frequency band of link i (for example, 2.4G frequency band or 5G frequency band), and then consult the mapping relationship table corresponding to the frequency band to obtain the transmission rate corresponding to the signal strength of the frequency band.
[0221] S804 , obtaining an initial estimated bandwidth of link i according to the frequency band of link i, the transmission rate of link i, the number of spatial streams of link i, the guard interval of link i, and the bandwidth of link i.
[0222] The frequency band of the link i may be a 2.4 GHz frequency band or a 5 GHz frequency band. It should be understood that, when other parameters are the same, the initial estimated bandwidth of the 5 GHz frequency band is greater than the initial estimated bandwidth of the 2.4 GHz frequency band.
[0223] The transmission rate of the link i mentioned above refers to the rate at which data is transmitted on the link i. It should be understood that, when other parameters are the same, the higher the transmission rate of the link i, the larger the initial estimated bandwidth of the link i.
[0224] The number of spatial streams of the above link i is related to the number of antennas of the router connected to the link i. It should be understood that, when other parameters are the same, the more spatial streams of the link i, the larger the initial estimated bandwidth of the link i.
[0225] The protection interval of the link i can be a short protection interval or a long protection interval. It should be understood that, when other parameters are the same, the larger the protection interval of the link i, the smaller the initial estimated bandwidth of the link i; the smaller the protection interval of the link i, the larger the initial estimated bandwidth of the link i.
[0226] The bandwidth of the link i is the spectrum width. For example, the bandwidth of the link i can be 20M, 40M, 80M or 160M. It should be understood that, when other parameters are the same, the larger the bandwidth of the link i, the larger the initial estimated bandwidth of the link i; the smaller the bandwidth of the link i, the smaller the initial estimated bandwidth of the link i.
[0227] In some embodiments, a correspondence table of frequency band, transmission rate, number of spatial streams, protection interval, bandwidth, and estimated bandwidth may be pre-established. When the frequency band of link i, the transmission rate of link i, the number of spatial streams of link i, the protection interval of link i, and the bandwidth of link i are obtained, the link optimization module of the main router may obtain the initial estimated bandwidth of link i by consulting the mapping relationship table.
[0228] For example, the following Table 2 shows a partial correspondence between frequency band, transmission rate, number of spatial streams, guard interval, bandwidth, and estimated bandwidth, wherein the transmission rate s2 is greater than the transmission rate s1.
[0229] Table 2
[0230]
[0231] It should be noted that the above embodiment is described by taking the five parameters of the frequency band of link i, the transmission rate of link i, the number of spatial streams of link i, the protection interval of link i and the bandwidth of link i as an example to obtain the initial estimated bandwidth of link i, which does not limit the embodiment of the present application. In actual implementation, the initial estimated bandwidth of link i can also be obtained according to some of the five parameters, or according to any other possible parameters.
[0232] After obtaining the frequency band of link i, the transmission rate of link i, the number of spatial streams of link i, the protection interval of link i, and the bandwidth of link i, the initial estimated bandwidth of link i can be obtained by consulting the mapping relationship table. Since the main router collects various link information in the link measurement stage, the initial estimated bandwidth can be obtained more accurately.
[0233] S805: Determine the number of wireless layers of link i according to the number of layers of link i and the connection type of each layer. Then, obtain the initial estimated bandwidth after attenuation according to the number of wireless layers.
[0234] The number of levels of the above link i refers to the number of sub-links from the lowest-level slave router of link i to the master router. For example, the number of levels of link i is equal to the number of slave routers included in link i. It should be noted that when multiple slave routers are mounted under one slave router, the link from each slave router to the master router is counted as one link, so the slave routers included in link i belong to different levels.
[0235] The number of wireless levels of the above-mentioned link i refers to the number of wireless connection sub-links from the router to the main router at the lowest level of link i. Link i includes at least one level, and the connection type of each level may be a wireless connection type or a wired connection type. Generally, the link signal attenuation of the wired connection type is smaller, and the link signal attenuation of the wireless connection type is larger. In an embodiment of the present application, if a certain level of link i is a wired connection type, then the attenuation can be ignored; if a certain level of link i is a wireless connection type, then the attenuation of the initial estimated bandwidth needs to be calculated. In this case, the number of wireless levels of link i can be determined based on the number of levels of link i and the connection type of each level.
[0236] For example, Fig. 10B Take this as an example. Assume that the final planning results in 4 backhaul links: the first backhaul link, slave router 4-slave router 1-main router; the second backhaul link, slave router 4-slave router 2-main router; the third backhaul link, slave router 4-main router; the fourth backhaul link, slave router 4-slave router 3-main router. The number of levels of the first backhaul link is 2, the number of levels of the second backhaul link is 2, the number of levels of the third backhaul link is 1, and the number of levels of the fourth backhaul link is 2. Further, assuming that the backhaul link between the main router and slave router 2 is a wireless connection type, and the link between slave router 2 and slave router 4 is a wired connection type, then the number of wireless levels of the second backhaul link is 1.
[0237] In some embodiments, when the number of wireless layers of the i-th link among the N links is greater than or equal to 2, the following relationship (1) can be used to calculate the initial estimated bandwidth after attenuation:
[0238] TP (i) *α*(Ln (i) -1) (1).
[0239] Among them, TP (i) represents the initial estimated bandwidth of link i, α is the wireless attenuation coefficient, Ln (i) Indicates the number of wireless layers of link i. It should be noted that α is a preset coefficient obtained through experiments to adjust the impact of wireless attenuation on bandwidth. The larger the value of α, the greater the impact of wireless attenuation on bandwidth.
[0240] It should be understood that when the number of wireless layers of the i-th link in N links is greater than or equal to 2, by multiplying the initial estimated bandwidth by the wireless attenuation coefficient and the number of wireless layers, the impact of the attenuation of the wireless connection type on the estimated bandwidth can be effectively reduced, so that the recalculated initial estimated bandwidth is closer to the actual bandwidth. It should be noted that when the number of wireless layers of the link is equal to 1, it is not necessary to multiply it by the wireless attenuation coefficient, that is, the impact of the number of wireless layers on the bandwidth is ignored.
[0241] S806: Obtain a first attenuation according to the number of STA devices connected to the first router of link i.
[0242] In link i, each router can act as an AP, so at least one STA device can be connected to each router. Of course, some routers may not be connected to STA devices.
[0243] The first router may be any one of the following:
[0244] (1) The router at the upper level of the slave router at the lowest level in link i.
[0245] by Fig.11 Take the example for explanation. Assume that link 1 is from slave router 3 to slave router 1 and then to the master router, link 2 is from slave router 3 to the master router, and link 3 is from slave router 3 to slave router 2 and then to the master router. The slave routers at the lowest level of link 1, link 2, and link 3 are all slave router 3. The router (first router) at the upper level of slave router 3 in link 1 is slave router 1. The router (first router) at the upper level of slave router 3 in link 2 is the master router. The router (first router) at the upper level of slave router 3 in link 3 is slave router 2.
[0246] (2) The highest-level slave router in link i. It should be noted that if there is only one slave router in link i, the first router is the master router.
[0247] Still Fig.11 Take the example for explanation. Assume that link 1 is from slave router 3 to slave router 1 and then to the master router, link 2 is from slave router 3 to the master router, and link 3 is from slave router 3 to slave router 2 and then to the master router. Link 1 has two slave routers, and the highest-level slave router (first router) in link 1 is slave router 1. Link 2 has one slave router, and the first router in link 1 is the master router. Link 3 has two slave routers, and the highest-level slave router (first router) in link 3 is slave router 2.
[0248] (3) The router with the least number of STA devices mounted on link i.
[0249] For example, in link i, from the lowest level to the highest level, there are slave router 1, slave router 2, and slave router 3. The number of STA devices mounted on slave router 1 is 1, the number of STA devices mounted on router 2 is 2, and the number of STA devices mounted on router 3 is 3, so the first router is slave router 1. It should be understood that the fewer devices mounted on a router in a link, the smaller the impact on bandwidth, and the larger the estimated bandwidth obtained, so the router with the least number of STA devices mounted can be used as the first router.
[0250] In some embodiments, the first attenuation can be calculated using the following equation (2):
[0251] β*Num sta(i) (2).
[0252] Among them, β is the load weight coefficient, Num sta(i) Indicates the number of STA devices connected to the first router of link i. It should be noted that β is a preset coefficient obtained through experiments for adjusting the impact of load on bandwidth. The larger the value of β, the greater the impact of load on bandwidth.
[0253] It should be understood that the more STA devices connected to the router, the greater the impact on the estimated bandwidth. By multiplying the load weight coefficient by the number of STA devices connected to the first router to obtain the first attenuation, and then subtracting the first attenuation, the impact of the STA device on the estimated bandwidth can be effectively reduced, so that the final estimated bandwidth is closer to the actual bandwidth.
[0254] S807: Obtain a second attenuation according to the channel utilization of the first sub-link of link i.
[0255] The link i may include at least one sub-link, and each sub-link is used to connect two routers located at adjacent levels.
[0256] The first router may be any one of the following:
[0257] (1) A sublink in at least one sublink that is used to connect a slave router at the lowest level and a router at a level above the lowest level. That is, the first sublink may be a sublink at the lowest level in at least one sublink.
[0258] Still Fig.11Take an example for explanation. Link 1 includes a sub-link connecting the master router and slave router 1, and another sub-link connecting slave router 1 and slave router 3, wherein the sub-link connecting slave router 1 and slave router 3 is the first sub-link of link 1. Link 2 includes a sub-link connecting the master router and slave router 3, wherein the sub-link connecting the master router and slave router 3 is the first sub-link of link 2. Link 3 includes a sub-link connecting the master router and slave router 2, and another sub-link connecting slave router 2 and slave router 3, wherein the sub-link connecting slave router 2 and slave router 3 is the first sub-link of link 3.
[0259] (2) A sub-link in at least one sub-link that is used to connect the master router and the slave router at the highest level. That is, the first sub-link may be a sub-link at the highest level in at least one sub-link.
[0260] It should be noted that, when link i includes only one sub-link, the sub-link is the first sub-link.
[0261] In some embodiments, the second attenuation can be calculated using the following equation (3):
[0262] γ*ChU bssid(i) (3).
[0263] Among them, γ is the channel utilization coefficient, ChU bssid(i) Indicates the channel utilization of the first sub-link of link i. It should be noted that γ is a preset coefficient obtained through experiments for the influence of channel utilization on bandwidth. The larger the value of γ, the greater the influence of channel utilization on bandwidth.
[0264] It should be understood that the higher the channel utilization of a sub-link, the less the remaining available bandwidth, and the greater the impact on the estimated bandwidth. By multiplying the channel utilization coefficient by the channel utilization of the first sub-link to obtain the second attenuation, and then subtracting the second attenuation, the impact of the higher channel utilization on the estimated bandwidth can be effectively reduced, so that the final estimated bandwidth is closer to the actual bandwidth.
[0265] S808: Subtract the first attenuation amount and the second attenuation amount from the initial estimated bandwidth after attenuation to obtain a final estimated bandwidth of link i.
[0266] In some embodiments, by combining the above equations (1) to (3), equation (4) can be obtained. Then, the final estimated bandwidth of link i can be calculated using equation (4).
[0267] TP (i) *α*(Ln (i) -1)-β*Num sta(i) -γ*ChUbssid(i) (4).
[0268] The above S802-S808 introduces the process of calculating the final estimated bandwidth of link i. However, wireless connections are sometimes accidental, so the final estimated bandwidth calculated in a certain process may not be accurate. In order to reduce the measurement result error caused by accidentality, the embodiment of the present application proposes a method of averaging multiple measurements: after the topology structure is stable, the main router periodically and continuously collects m times of return link measurement data from each slave router. These data include RSSI, number of spatial streams, protection interval, link frequency band, link bandwidth, link transmission rate, number of STA devices connected to each router, connection type between routers, and channel utilization between routers; then, the main router obtains the final estimated bandwidth of each link based on the return link measurement data collected each time; then execute the following S809.
[0269] The above-mentioned topology structure is stable, which means that the timing starts after the master router detects that each slave router is online. After the timing reaches the preset time, the topology structure can be determined to be stable, so that the calculation process of the first estimated bandwidth can be started, until m final estimated bandwidths are calculated, and then the collection of return link measurement data is stopped.
[0270] S809: After obtaining m final estimated bandwidths corresponding to link i, an average value of the m final estimated bandwidths is taken, and the average value is used as the corrected final estimated bandwidth of link i.
[0271] Here, m is an integer greater than or equal to 2.
[0272] Exemplarily, the master router may use the following equation (5) to calculate the final estimated bandwidth of link i:
[0273]
[0274] Among them, m represents the number of acquisitions, TP (ij) represents the initial estimated bandwidth of link i in the jth acquisition.
[0275] It should be understood that when the master router periodically and continuously collects m times of return link measurement data from each slave router, since the topology structure is stable and unchanged, theoretically, Ln in each collection of return link measurement data is (i) Remains unchanged, and when the number of STA devices mounted on the router changes, it may cause β*Num sta(i) Dynamic changes, when the STA device's business changes may cause γ*ChU bssid(i) Dynamic changes, when the link frequency band, transmission rate, number of spatial streams, guard interval and / or frequency band changes, may cause TP (ij)Dynamic changes. When β*Num sta(i) , γ*ChU bssid(i) and TP (ij) When the estimated bandwidth changes dynamically, it may change. For each link, by taking the average of the m corrected estimated bandwidths, the final estimated bandwidth can be made more accurate, effectively reducing the error caused by some accidental factors.
[0276] S810: After obtaining the final estimated bandwidths of the N links, a link with the largest estimated bandwidth among the final estimated bandwidths of the N links is used as an optimal backhaul link.
[0277] The final estimated bandwidth of a link is used to represent the link quality of the link. In some embodiments, the final estimated bandwidths of each link can be converted to obtain a link quality score corresponding to each link. Then, the link with the highest link quality score is used as the optimal backhaul link.
[0278] In the above link optimization algorithm, since various link information such as the frequency band of link i, the transmission rate of link i, the number of spatial streams of link i, the protection interval of link i and link i are collected, the initial estimated bandwidth of link i can be obtained more accurately. Then, combined with factors such as the impact of the attenuation of the wireless connection type on the estimated bandwidth, the impact of the STA device on the estimated bandwidth, and the impact of the low channel utilization on the estimated bandwidth, the initial estimated bandwidth is adjusted so that the recalculated estimated bandwidth is closer to the actual bandwidth, so that the optimal backhaul link selected from the N links is also more accurate.
[0279] In order to more clearly understand the above link optimization algorithm, the algorithm is explained below with reference to an example.
[0280] For example, Fig.11 A schematic diagram of a link optimization algorithm application scenario provided in an embodiment of the present application.
[0281] 1. If Fig.11 As shown in the figure, after slave router 3 joins the topology structure consisting of the master router, slave router 1 and slave router 2, the master router plans three links on the original topology structure: link 1 (link1) is from slave router 3 to slave router 1 and then to the master router, link 2 (link2) is from slave router 3 to the master router, and link 3 (link3) is from slave router 3 to slave router 2 and then to the master router.
[0282] 2. The main router obtains the RSSI corresponding to the signal strength of link 1, the RSSI corresponding to the signal strength of link 2, and the RSSI corresponding to the signal strength of link 3. Then, the main router obtains the transmission rate corresponding to each RSSI by consulting the mapping relationship table, that is, the transmission rate of link 1, the transmission rate of link 2, and the transmission rate of link 3.
[0283] 3. The main router obtains the initial estimated bandwidth of each link based on the transmission rate of each link, the frequency band of each link, the number of spatial streams of each link, the protection interval of each link, and the bandwidth of each link. For example, the initial estimated bandwidth TP of link 1 is (1) , the initial estimated bandwidth TP of link 2 (2) , the initial estimated bandwidth TP of link 3 (3) .
[0284] 4. The main router obtains the wireless layer number of link 1 as 2, the wireless layer number of link 2 as 1, and the wireless layer number of link 3 as 2. If the wireless layer number of link 1 and link 3 is greater than or equal to 2, then the wireless layer number of link 1 and link 3 needs to be multiplied by the wireless attenuation coefficient; if the wireless layer number of link 2 is equal to 1, then the wireless layer number of link 2 does not need to be multiplied by the wireless attenuation coefficient.
[0285] For example, we can use the formula TP (i) *α*(Ln (i) -1), and obtain the initial estimated bandwidth after attenuation. (i) represents the initial estimated bandwidth of link i, α is the wireless attenuation coefficient, Ln (i) Indicates the wireless layer number of link i.
[0286] Accordingly, the initial estimated bandwidth of link 1 after attenuation can be expressed as: TP (1) *α*(Ln (1) -1); the initial estimated bandwidth of link 3 after attenuation can be expressed as: TP (3) *α*(Ln (3) -1). Among them, Ln (1) Indicates the wireless layer number of link 1, Ln (3) Indicates the wireless layer number of link 3.
[0287] 5. The main router calculates the number of STA devices mounted under slave router 1, the number of STA devices mounted under the main router, and the number of STA devices mounted under slave router 2. Then, the main router performs the following calculations for each link:
[0288] TP (1) *α*(Ln (1) -1)β*Num sta(1) .
[0289] TP (2) -β*Num sta(2) .
[0290] TP (3) *α*(Ln (3) -1)β*Num sta(3) .
[0291] Among them, β is the load weight coefficient.
[0292] Num sta(1) Indicates the number of STA devices mounted on link 1 from router 1.
[0293] Num sta(2) Indicates the number of STA devices mounted on the primary router of link 2.
[0294] Num sta(3) Indicates the number of STA devices mounted on link 3 from router 2.
[0295] 6. The master router calculates the channel utilization from router 3 to slave router 1, the channel utilization from router 3 to the master router, and the channel utilization from router 3 to slave router 2. The master router then performs the following calculations to obtain the corrected estimated bandwidth of each link:
[0296] TP (1) *α*(Ln (1) -1)-β*Num sta(1) -γ*ChU bssid(1) .
[0297] TP (2) -β*Num sta(2) -γ*ChU bssid(2) .
[0298] TP (3) *α*(Ln (3) -1)-β*Num sta(3) -γ*ChU bssid(3) .
[0299] Among them, γ is the channel utilization coefficient.
[0300] Uc bssid(1) Indicates the channel utilization from router 3 to slave router 1.
[0301] Uc bssid(2) Indicates the channel utilization from Router 3 to the main router.
[0302] Uc bssid(3) Indicates the channel utilization from router 3 to slave router 2.
[0303] 7. In order to avoid errors, after the topology structure is stable, the main router can periodically and continuously collect m times of return link measurement data from each slave router. These data include RSSI, number of spatial streams, protection interval, link frequency band, link bandwidth, link transmission rate, number of STA devices connected to each router, connection type between routers, and channel utilization between routers. The main router obtains the corrected estimated bandwidth of each link based on the return link measurement data collected each time. Then, for each link, the main router takes the average of the m corrected estimated bandwidths and uses the average as the final estimated bandwidth. Wherein, m is an integer greater than or equal to 2.
[0304] Exemplarily, the master router may use the following equations (6) to (8) to respectively calculate the final estimated bandwidths of link 1, link 2, and link 3:
[0305]
[0306]
[0307]
[0308] Among them, m represents the number of acquisitions, TP (1j) represents the initial estimated bandwidth of link 1 in the jth acquisition, TP (2j) represents the initial estimated bandwidth of link 2 in the jth acquisition, TP (3j) represents the initial estimated bandwidth of link 3 in the jth acquisition.
[0309] After calculation according to the link optimization algorithm provided in the above embodiment, the final estimated bandwidths of the three links can be obtained. Then, the link with the largest estimated bandwidth among the final estimated bandwidths of the three links is used as the optimal backhaul link.
[0310] The above embodiment is explained by taking a backhaul link connecting multiple routers as an example. In actual implementation, the backhaul link between multiple routers may be a 2.4G link, or a 5G link, or there may be both a 2.4G link and a 5G link. When there are both 2.4G links and 5G links in the backhaul link between multiple routers, when using the above link optimization algorithm, it is necessary to treat the 2.4G link and the 5G link as two links, and calculate the final estimated bandwidth of the 2.4G link and the final estimated bandwidth of the 5G link respectively.
[0311] For example, Fig.12 A schematic diagram of another link optimization algorithm application scenario provided in an embodiment of the present application. Fig.11 Different, although Fig.12 It also includes the main router, slave router 1, slave router 2 and slave router 3, but these routers all support 2.4G and 5G. Fig.12 As shown in the figure, it is assumed that the main router plans 6 return links:
[0312] Link 1-a is from slave router 3 to slave router 1 and then to the master router, and link 1-a is a 5G backhaul link;
[0313] Link 1-b is from slave router 3 to slave router 1 and then to the main router. Link 1-b is a 2.4G backhaul link.
[0314] Link 2-a is from slave router 3 to the master router, and link 2-a is a 5G backhaul link;
[0315] Link 2-b is from slave router 3 to the master router, and link 2-b is a 2.4G backhaul link;
[0316] Link 3-a is from slave router 3 to slave router 2 and then to the master router, and link 3-a is a 5G backhaul link;
[0317] Link 3-b is from slave router 3 to slave router 2 and then to the main router. Link 3-b is a 2.4G backhaul link.
[0318] After calculation according to the link optimization algorithm provided in the above embodiment, the final estimated bandwidths of the six links can be obtained. Then, the link with the largest estimated bandwidth among the final estimated bandwidths of the six links is used as the optimal backhaul link.
[0319] In combination with the description of the above embodiment, the master router can trigger the link optimization process under three conditions: detecting a new router joining the ad hoc network, the connection type between routers changing, and the timing duration of the link metric module of the master router reaching a preset duration. When the link optimization process is triggered under different conditions, the topological structure of the ad hoc network may change in different ways, and its link planning method and link optimization method may also be different.
[0320] For example, Fig.13 The flowchart of the link optimization algorithm in different scenarios provided by the embodiment of the present application is shown in FIG. Figure 6 The link optimization module of the main router is shown.
[0321] S1301, determining the reason for triggering the link optimization process.
[0322] If the reason for triggering the link optimization process is detection of a new router joining the ad hoc network, the following S1302 - S1304 are executed.
[0323] If the reason for triggering the link optimization process is a change in the connection type between routers, the following S1305-S1307 are executed.
[0324] If the reason for triggering the link optimization process is that the timing duration of the link metric module of the primary router reaches the preset duration, the following S1308-1310 is executed.
[0325] S1302, while maintaining the original links in the established topology, connect the newly added slave router a to the routers at the higher level in the established topology, and plan to obtain N1 links. It should be noted that for each link in the N1 links, the highest level is the master router, and the lowest level is the slave router a.
[0326] Among them, the high-level router is a router with a higher level than the slave router a.
[0327] S1303: Select one link from the N1 links as the optimal backhaul link from router a.
[0328] S1304, notify the slave router a to switch to the optimal backhaul link.
[0329] Still with the above Fig. 9B Take this as an example. After slave router 4 joins the original topology, the master router plans four return links: the first return link, slave router 4-slave router 1-master router; the second return link, slave router 4-slave router 2-master router; the third return link, slave router 4-master router; the fourth return link, slave router 4-slave router 3-master router. The master router can select a link from the four return links as the optimal return link for slave router 4 according to the link optimization algorithm provided in the above embodiment. Slave router 4 switches to the optimal return link.
[0330] S1305, while maintaining the original links in the established topology, connect the slave router b whose connection type has been changed to a router at a higher level in the established topology, and plan to obtain N2 links. It should be noted that for each link in the N2 links, the highest level is the master router, and the lowest level is the slave router b.
[0331] Among them, the high-level router is a router with a higher level than the slave router b.
[0332] S1306: Select one link from the N2 links as the optimal backhaul link from router b.
[0333] S1307, notify the slave router b to switch to the optimal backhaul link.
[0334] Still with the above Fig. 10B Take this as an example. After the connection type of slave router 4 changes from wired connection to wireless connection, the master router plans four return links: the first return link, slave router 4-slave router 1-master router; the second return link, slave router 4-slave router 2-master router; the third return link, slave router 4-master router; the fourth return link, slave router 4-slave router 3-master router. Then, the master router can select a link from the four return links as the optimal return link for slave router 4 according to the link optimization algorithm provided in the above embodiment.
[0335] S1308, while maintaining the original links in the established topology, connect the slave router c whose link quality has changed to a router at a higher level in the established topology, and plan to obtain N3 links. It should be noted that for each of the N3 links, the highest level is the master router, and the lowest level is the slave router c.
[0336] Among them, the high-level router is a router with a higher level than the slave router c.
[0337] S1309: Select one link from the N3 links as the optimal backhaul link from router c.
[0338] S1310, notify the slave router c to switch to the optimal backhaul link.
[0339] After S1304, S1307, and S1310, the following S1311 may be executed.
[0340] S1311, determining whether the router of the adjusted link belongs to the lowest level in the topology structure.
[0341] If the router of the adjusted link belongs to the lowest level in the topology structure, it continues to detect whether the condition for triggering the link optimization process is met, that is, S2 of the above embodiment is executed.
[0342] If the router of the adjusted link does not belong to the lowest level in the topology, after the router of the adjusted link switches to the optimal backhaul link, the backhaul link of the router of the lower level may not be the optimal backhaul link, and the backhaul link of the router of the lower level needs to be adjusted. In this case, for the routers of a lower level than the router of the adjusted link, S1312-S1314 are executed for each router of the lower level in descending order.
[0343] S1312, after reacquiring the link metric information, connect the low-level router with the high-level router in the topology structure, and plan to obtain N4 links corresponding to the low-level router. It should be noted that for each of the N4 links, the highest level is the main router, and the lowest level is the low-level router.
[0344] Among them, a high-level router is a router with a higher level than a low-level router.
[0345] S1313: According to the re-acquired link metric information, select one link from the N4 links as the optimal backhaul link of the router at the lower level.
[0346] S1314: Notify the lower-level router to switch to the optimal backhaul link.
[0347] It should be noted that if the backhaul link currently connected to a slave router is already the optimal backhaul link, the master router does not need to notify the slave router to switch the backhaul link.
[0348] It should be understood that by adjusting the backhaul links of the routers at each level in descending order from a high level to a low level, the backhaul links at each level can be made more stable and have the best quality.
[0349] An embodiment of the present application also provides a terminal device, including a processor, the processor is coupled to a memory, and the processor is used to execute a computer program or instruction stored in the memory, so that the terminal device implements the methods in the above embodiments.
[0350] The embodiment of the present application also provides a computer-readable storage medium, in which a computer instruction is stored; when the computer-readable storage medium is run on a device for setting a local number function, the device for setting the local number function executes the method shown above. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that can be integrated with one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0351] An embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes the methods in the above embodiments.
[0352] The embodiment of the present application also provides a chip, which is coupled to a memory, and the chip is used to read and execute a computer program or instruction stored in the memory to perform the methods in the above embodiments. The chip can be a general-purpose processor or a dedicated processor. It should be noted that the chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (field programmable gate array, FPGA), programmable logic devices (programmable logic device, PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
[0353] The terminal device, computer-readable storage medium, computer program product and chip provided in the above-mentioned embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the method provided above, and will not be repeated here.
[0354] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0355] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0356] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0357] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0358] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0359] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A link selection method based on an ad hoc network, characterized in that: The method is applied to a main router of an ad hoc network system, and the method comprises: On the established topology, planning N links according to the number of slave routers in the ad hoc network system; Acquire an initial estimated bandwidth of each link according to the backhaul link metric information of each link in the N links, wherein the backhaul link metric information is obtained by measuring the backhaul link of the topology structure from the router of each link; Obtaining the attenuated initial estimated bandwidth according to the number of wireless layers of each link; Acquire a first attenuation according to the number of STA devices connected to the first router of each link; Acquire a second attenuation according to a channel utilization rate of the first sub-link of each link; Subtract the first attenuation and the second attenuation from the initial estimated bandwidth after attenuation to obtain a final estimated bandwidth of each link; After obtaining the final estimated bandwidths of the N links, selecting a first link, where the first link is a link with the largest final estimated bandwidth among the N links; Sending a backhaul link switching request message to a slave router to be connected to the first link, wherein the backhaul link switching request message includes a basic service setting identifier and channel information of the first link; A backhaul link switching result message returned from a router to be connected to the first link is received, wherein the backhaul link switching result message indicates success or failure of switching to the first link.
2. The method according to claim 1, characterized in that The backhaul link metric information of each link includes at least one of the following: the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the protection interval of each link and the bandwidth of each link.
3. The method according to claim 2, characterized in that Before acquiring the initial estimated bandwidth of each link according to the backhaul link metric information of each link in the N links, the method further includes: Obtaining a received signal strength indication of each link from the backhaul link metric information of each link; determining a transmission rate corresponding to the received signal strength indication of each link; The corresponding relationship between the received signal strength and the transmission rate is preset.
4. The method according to claim 1, characterized in that The obtaining the attenuated initial estimated bandwidth according to the number of wireless layers of each link includes: Acquire the number of layers and the connection type of each link from the backhaul link metric information of each link; Determining the number of wireless layers of each link according to the number of layers and the connection type of each link; When the number of wireless layers of the i-th link in the N links is greater than or equal to 2, the initial estimated bandwidth after attenuation is obtained by using the following relationship: TP (i) *a*(Ln (i) -1); The number of levels of each link refers to the number of sub-links from the slave router at the lowest level of each link to the master router, the number of wireless levels of each link refers to the number of wireless connection sub-links from the slave router at the lowest level of each link to the master router, the connection type is a wireless connection type or a wired connection type, and TP (i) represents the initial estimated bandwidth of the i-th link among the N links, α is the wireless attenuation coefficient, Ln (i) represents the wireless layer number of the i-th link.
5. The method according to claim 1, characterized in that The obtaining the first attenuation according to the number of STA devices connected to the first router of each link includes: Acquire the number of STA devices connected to the first router of each link from the backhaul link metric information of each link; According to the number of STA devices, the first attenuation is obtained using the following relationship: β*Number sta(i) ; Among them, β is the load weight coefficient, Num sta(i) Indicates the number of STA devices connected to the first router of the i-th link among the N links.
6. The method according to claim 1, characterized in that The first router of each link is any one of the following: A router at an upper level of the slave router at the lowest level in each of the links; A slave router at the highest level in each of the links; The router having the least number of STA devices mounted on each link.
7. The method according to claim 1, characterized in that The acquiring the second attenuation according to the channel utilization of the first sub-link of each link includes: Acquire, from the backhaul link metric information of each link, a channel utilization rate of a first sub-link of each link; According to the channel utilization rate of the first sub-link of each link, the second attenuation is obtained by using the following relationship: γ*ChU bssid(i) ; Among them, γ is the channel utilization coefficient, ChU bssid(i) represents the channel utilization rate of the first sub-link of the i-th link among the N links.
8. The method according to claim 1, characterized in that The first sub-link of each link is any one of the following: At least one sub-link of each link is used to connect a slave router at the lowest level and a router at a level above the lowest level; The at least one sub-link of each link is used to connect the master router and the sub-link of the highest-level slave router.
9. The method according to claim 1, characterized in that: The step of subtracting the first attenuation and the second attenuation from the attenuated initial estimated bandwidth to obtain a final estimated bandwidth of each link includes: The final estimated bandwidth of each link is calculated using the following relationship: Wherein, m represents the number of times the backhaul link measurement data is continuously collected after the preset time length of the topology structure is established, TP (ij) represents the initial estimated bandwidth of the ith link in the jth acquisition, α is the wireless attenuation coefficient, Ln (i) represents the number of wireless layers of the i-th link, β is the load weight coefficient, Num sta(i) represents the number of STA devices connected to the first router of the i-th link among the N links, γ is the channel utilization coefficient, ChU bssid(i) represents the channel utilization rate of the first sub-link of the i-th link among the N links.
10. The method according to any one of claims 1 to 9, characterized in that Before planning N links according to the number of slave routers in the ad hoc network system, the method further includes: Sending a return link metric query message to each slave router in the ad hoc network system; receiving each return link metric response message returned from the router, wherein the return link metric response message includes the return link metric information; The backhaul link metric information of each slave router stored in the data structure is updated.
11. The method according to claim 10, characterized in that The sending of a return link metric query message to each slave router in the ad hoc network system includes: When the master router detects that a slave router joins the ad hoc network and establishes the topology structure, the master router sends the backhaul link metric query message to each slave router in the ad hoc network system; or When the master router detects that the connection type between the routers in the ad hoc network system has changed and re-establishes the topology structure, the master router sends the backhaul link metric query message to each slave router in the ad hoc network system; or The master router sends the backhaul link metric query message to each slave router in the ad hoc network system according to a preset period.
12. The method according to any one of claims 1 to 9, characterized in that After selecting the first link and before sending a backhaul link switching request message to a slave router to be connected to the first link, the method further includes: Determining whether the first link belongs to the topology structure; In a case where the first link does not belong to the topology structure, a slave router to be connected to the first link is determined.
13. The method according to claim 12, characterized in that After receiving the backhaul link switching result message returned from the router to be connected to the first link, the method further includes: When the backhaul link switching result message indicates that the switching to the first link fails, a backhaul link metric query message is resent to each slave router in the ad hoc network system, or a backhaul link switching request message is resent to the slave router to be connected to the first link.
14. A router, characterized in that: comprising a processor, and a memory coupled to the processor; The memory stores instructions, and when the processor executes the instructions, the router executes the link selection method based on an ad hoc network as described in any one of claims 1 to 13.
15. A self-organizing network system, characterized in that: The ad hoc network system includes a master router and a plurality of slave routers connected to the master router; The main router is used to execute the link selection method based on an ad hoc network as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a router, the router executes the link selection method based on an ad hoc network according to any one of claims 1 to 13.
Citation Information
Cited By
Communication device and method for backhaul link optimization
EP4791084A1
