CN117715141A - Ad hoc network-based link selection method, router, system and storage medium - Google Patents
Ad hoc network-based link selection method, router, system and storage medium Download PDFInfo
- Publication number
- CN117715141A CN117715141A CN202310522215.9A CN202310522215A CN117715141A CN 117715141 A CN117715141 A CN 117715141A CN 202310522215 A CN202310522215 A CN 202310522215A CN 117715141 A CN117715141 A CN 117715141A
- Authority
- CN
- China
- Prior art keywords
- link
- router
- slave
- backhaul
- backhaul link
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010187 selection method Methods 0.000 title claims abstract description 26
- 238000000034 method Methods 0.000 claims abstract description 91
- 238000005259 measurement Methods 0.000 claims description 90
- 230000005540 biological transmission Effects 0.000 claims description 60
- 230000004044 response Effects 0.000 claims description 40
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002238 attenuated effect Effects 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 15
- 238000005457 optimization Methods 0.000 description 55
- 238000012545 processing Methods 0.000 description 34
- 230000008859 change Effects 0.000 description 27
- 238000004422 calculation algorithm Methods 0.000 description 23
- 238000010586 diagram Methods 0.000 description 13
- 238000013507 mapping Methods 0.000 description 13
- 230000002829 reductive effect Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 7
- 230000006855 networking Effects 0.000 description 7
- 238000007726 management method Methods 0.000 description 6
- 101100454361 Arabidopsis thaliana LCB1 gene Proteins 0.000 description 5
- 101100171146 Oryza sativa subsp. japonica DREB2C gene Proteins 0.000 description 5
- 238000012935 Averaging Methods 0.000 description 4
- 239000000835 fiber Substances 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000036039 immunity Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/12—Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
- H04W40/248—Connectivity information update
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/34—Modification of an existing route
- H04W40/36—Modification of an existing route due to handover
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the application provides a link selection method, a router, a system and a storage medium based on an ad hoc network, and relates to the technical field of the ad hoc network. In an ad hoc network system composed of a master router and a plurality of slave routers, the master router triggers a link preference process when the master router detects that a new router joins the ad hoc network or a connection type between routers changes, or periodically triggers a link preference process: link metric information is acquired from each slave router, an optimal backhaul link is selected based on the link metric information, and then the optimal backhaul link is issued to the slave router of the link to be adjusted, so that the slave router switches to a new backhaul link. When the network environment of the ad hoc network changes, the ad hoc network can automatically optimize the backhaul link, so that the internet surfing experience of a user when the user accesses each node of the ad hoc network by using the terminal equipment is improved.
Description
Technical Field
The present disclosure relates to the field of ad hoc networks, and in particular, to a link selection method, a router, a system, and a storage medium based on an ad hoc network.
Background
With the improvement of economic level, more and more families can select residences such as large houses, duplex houses or villas, or certain offices with larger areas can be used by public, but partition walls, stairs and the like can lead to wireless signal attenuation, so that the wireless transmission rate is reduced, and the wireless transmission quality is affected. Thus, in a relatively large space, a single router cannot completely cover all areas.
At present, a plurality of routers can be used for forming a network topology, so that the expansion of network coverage is realized. However, networking using multiple routers faces a complex wireless network environment, and the link quality of the backhaul link may change based on various reasons such as new router addition, connection type change between routers, connection instability between routers, router position change, and external device interference. In an ad hoc network environment, how to optimize the backhaul link becomes a technical problem to be solved.
Disclosure of Invention
The application provides a link selection method, a router, a system and a storage medium based on an ad hoc network, which solve the technical problem of how to automatically optimize a backhaul link in an ad hoc network environment.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a link selection method based on an ad hoc network. The method can be applied to a master router of an ad hoc network system. The method comprises the following steps: on the established topological structure, planning N links according to the number of slave routers in the ad hoc network system; acquiring initial estimated bandwidth of each link according to backhaul link measurement information of each link in the N links, wherein the backhaul link measurement information of each link is obtained by measuring a backhaul link of a topological structure by a slave router of each link; obtaining an initial estimated bandwidth after attenuation according to the number of wireless layers of each link; acquiring a first attenuation amount according to the number of STA equipment connected under a first router of each link; acquiring a second attenuation amount according to the channel utilization rate of the first sub-link of each link; subtracting the first attenuation amount and the second attenuation amount from the attenuated initial estimated bandwidth to obtain the final estimated bandwidth of each link; after the final estimated bandwidth of the N links is obtained, a first link is selected, wherein the first link is the link with the largest final estimated bandwidth in the N links.
In the above scheme, when the link quality of the backhaul link changes due to new router joining, connection type change between routers, connection instability between routers, router position change, external equipment interference and the like, the master router may collect backhaul link metric information from each slave router to obtain an initial estimated bandwidth of each link, and then adjust the initial estimated bandwidth of each link by combining the influence of attenuation of the wireless connection type on the estimated bandwidth, the influence of STA equipment mounted on the slave router on the estimated bandwidth, the influence of channel utilization on the estimated bandwidth and the like, so that the obtained estimated bandwidth is more accurate. Therefore, the main router can screen one link with optimal performance from N links, and optimization of the return link is realized, so that the Internet surfing experience of a user when the user accesses each node of the ad hoc network by using the terminal equipment is improved.
In some embodiments, the backhaul link metric information for each link may include at least one of: the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the guard interval of each link and the bandwidth of each link. For example, a table of correspondence between the frequency band, the transmission rate, the number of spatial streams, the guard interval, the bandwidth, and the estimated bandwidth may be pre-established. Under the condition that 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 can obtain the initial estimated bandwidth of each link by referring to the mapping relation table.
It should be appreciated that the initial estimated bandwidth of each link can be more accurately obtained 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 guard interval of each link, and the bandwidth of each link, as compared to estimating the bandwidth of the link only according to the RSSI.
In some embodiments, the backhaul link metric information may also include the RSSI of the link. Accordingly, 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 may further include: acquiring the RSSI of each link from the backhaul link measurement information of each link; a transmission rate corresponding to the RSSI indication for each link is determined. The corresponding relation between the received signal strength of the link and the transmission rate of the link is preset. For example, mapping relation tables are respectively established for signal strength ranges and transmission rates of different frequency bands, for example, a mapping relation table of signal strength and transmission rate of a 2.4G frequency band and a mapping relation table of signal strength and transmission rate of a 5G frequency band are established. The main router can obtain the transmission rate corresponding to the RSSI indication of each link in a table look-up mode according to the frequency band of the link.
It should be understood that in some cases, the RSSI may not reflect the bandwidth of the link well, and the transmission rate may reflect the bandwidth of the link well, where the estimated bandwidth of the link may be calculated according to the transmission rate.
In some embodiments, the backhaul link metric information may also include the number of levels of links and the connection type. Correspondingly, according to the number of wireless layers of each link, obtaining the initial estimated bandwidth after attenuation, including: acquiring the level number and the connection type of each link from the backhaul link measurement information of each link; determining the wireless layer level number of each link according to the layer level number and the connection type of each link; under the condition that the number of wireless layer levels of the ith link in the N links is greater than or equal to 2, the following relation is adopted to obtain the initial estimated bandwidth after attenuation:
TP (i) *α*(Ln (i) -1);
wherein the number of levels of each link refers to the number of sub-links from the slave router to the master router at the lowest level of each link, the number of wireless layer levels of each link refers to the number of wireless connection sub-links from the slave router to the master router at the lowest level of each link, and the connection type is a wireless connection typeOr wired connection type, TP (i) Representing the initial estimated bandwidth of the ith link in N links, alpha being the wireless attenuation coefficient Ln (i) Representing the number of radio layers of the ith link.
It should be understood that, in the case that the number of wireless layer levels of the ith link in the 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 layer levels, the influence 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 real bandwidth. It should be noted that when the number of radio layers of the link is equal to 1, it may not be necessary to multiply the number by the radio attenuation coefficient.
In some embodiments, the backhaul link metric information may also include the number of STA devices connected under the router. Correspondingly, according to the number of the STA devices connected under the first router of each link, acquiring the first attenuation comprises the following steps: acquiring the number of STA equipment connected under a first router of each link from backhaul link measurement information of each link; according to the number of STA equipment, the first attenuation is obtained by adopting the following relation:
β*Num sta(i) ;
wherein, beta is a load weight coefficient, num sta(i) Representing the number of STA devices connected under the first router of the ith link of the N links.
Illustratively, the first router of each link is any one of: the router of the upper level of the slave routers at the lowest level in each link; the highest level of slave routers in each link; the router with the largest number of STA devices is mounted in each link; all slave routers in each link.
It should be appreciated that the more STA devices connected under the router, the greater the impact on the estimated bandwidth. The load weight coefficient is multiplied by the number of the STA devices connected under the first router to obtain a first attenuation amount, and the first attenuation amount is subtracted, so that the influence of the STA devices mounted on the AP device on the estimated bandwidth can be effectively reduced, and the finally obtained estimated bandwidth is closer to the real bandwidth.
In some embodiments, the backhaul link metric information may also include channel utilization of individual sub-links. Accordingly, according to the channel utilization of the first sub-link of each link, obtaining the second attenuation amount includes: acquiring the channel utilization rate of a first sub-link of each link from the backhaul link measurement information of each link; according to the channel utilization rate of the first sub-link of each link, the following relation is adopted to obtain the second attenuation:
γ*ChU bssid(i) ;
Wherein, gamma is the channel utilization coefficient, chU bssid(i) The channel utilization of the first sub-link of the ith link of the N links is represented.
Illustratively, the first sub-link of each link is any one of: at least one sub-link of each link is used for connecting a slave router at the lowest level and a sub-link of a router at the upper level of the lowest level; at least one sub-link of each link is used for connecting with a master router and sub-links of a slave router of the highest hierarchy.
It will be appreciated that the higher the channel utilization of one sub-link, the less bandwidth is available remaining, and the greater the impact on the estimated bandwidth. The second attenuation amount is obtained by multiplying the channel utilization coefficient with the channel utilization of the first sub-link, and then the second attenuation amount is subtracted, so that the influence of the channel utilization on the estimated bandwidth can be effectively reduced, and the finally obtained estimated bandwidth is closer to the real bandwidth.
In some embodiments, subtracting the first attenuation amount and the second attenuation amount from the attenuated initial estimated bandwidth to obtain a final estimated bandwidth of each link includes: the final estimated bandwidth for each link is calculated using the following relationship:
wherein m represents the number of times of continuously collecting backhaul link measurement data after establishing a preset duration of a topology structure, and TP (ij) Representing an initial estimated bandwidth of an ith link in a jth acquisitionAlpha is the wireless attenuation coefficient, ln (i) The number of wireless layers of the ith link is represented, beta is the load weight coefficient, num sta(i) Representing the number of STA devices connected under the first router of the ith link in N links, wherein gamma is the channel utilization coefficient ChU bssid(i) The channel utilization of the first sub-link of the ith link of the N links is represented.
It should be understood that when the master router periodically and continuously collects the backhaul link metric data m times from each slave router, since the topology is stable, ln in the backhaul link metric data is theoretically collected each time (i) Remains unchanged, and may result in betanum when the number of STA devices mounted on the router changes sta(i) Dynamic changes, which may result in y ChU when traffic of STA devices changes bssid(i) Dynamic changes, which may cause TP when the frequency band, transmission rate, number of spatial streams, guard interval, and/or frequency band of the link change (ij) Dynamically changing. When beta is Num sta(i) 、γ*ChU bssid(i) And TP (ij) When dynamically changing, the estimated bandwidth may change. For each link, the estimated bandwidth obtained finally can be more accurate by averaging the m corrected estimated bandwidths, and errors caused by some accidental factors are effectively reduced.
In some embodiments, before planning N links from the number of routers in the ad hoc network system, the method further comprises: sending a backhaul link metric query message to each slave router in the ad hoc network system; receiving a backhaul link metric response message returned by each slave router, wherein the backhaul link metric response message comprises backhaul link metric information; backhaul link metric information for each slave router stored in the data structure is updated.
Illustratively, the primary route may trigger the link optimization procedure in any of the following cases: under the condition that a master router detects that slave routers join an ad hoc network and establishes a topological structure, sending a backhaul link measurement query message to each slave router in an ad hoc network system; or under the condition that the main router detects that the connection type between routers in the ad hoc network system is changed and the topology structure is re-established, sending a backhaul link measurement query message to each slave router in the ad hoc network system; or the master router sends the backhaul link measurement inquiry message to each slave router in the ad hoc network system according to a preset period.
It should be appreciated that the master route may obtain backhaul link metric information of each slave router when a network environment of the ad hoc network is changed by transmitting a backhaul link metric query message to the slave router, thereby optimizing the backhaul link.
In some embodiments, after selecting the first link, the method may further comprise: judging whether the first link belongs to a topological structure or not; determining a slave router to be connected to the first link in case the first link does not belong to the topology; and sending a backhaul link switching request message to the router, wherein the backhaul link switching request message comprises a basic service setting identifier and channel information of the first link.
It should be appreciated that when the network environment of the ad hoc network changes, the links in the established topology may already be optimal backhaul links, at which point there is no need to optimize the backhaul links. If the links in the established topology do not contain the optimal backhaul link, it is necessary to optimize the backhaul link at this time and notify the slave router that the link has not been connected to the optimal backhaul link.
In some embodiments, after sending the backhaul link switching request message to the slave router to be connected to the first link, the method further comprises: receiving a return link switching result message returned by the router, wherein the return link switching result message indicates that switching to the first link is successful or failed; and under the condition that the backhaul link switching result message indicates that the switching to the first link fails, sending a backhaul link measurement inquiry message to each slave router in the ad hoc network system again, or sending a backhaul link switching request message to the slave router to be connected to the first link again.
It should be appreciated that by acquiring the backhaul link switching result message from the slave router to be connected to the first link, the master router can timely learn whether the slave router has successfully switched to the optimal backhaul link, and determine whether the link metric or link connection needs to be reinitiated.
In a second aspect, an 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 metric query message from a master router; responding to the backhaul link measurement inquiry message, and returning a backhaul link measurement response message to the main router, wherein the backhaul link measurement response message comprises the backhaul link measurement information; receiving a backhaul link switching request message from a master router, wherein the backhaul link switching request message comprises a basic service setting identifier and channel information of a first link, and the first link is a link with the maximum estimated bandwidth obtained according to backhaul link measurement information of each slave router in an ad hoc network system; and responding to the backhaul link switching request message, disconnecting the original backhaul link and attempting to connect to the first link.
In the above scheme, when the link quality of the backhaul link changes due to the addition of a new router, the change of the connection type between the routers, the unstable connection between the routers, the change of the router position, the interference of external equipment and the like, the slave router can timely detect the change parameters by measuring the backhaul link and feed the change parameters back to the master router, so that the master router can obtain the estimated bandwidth of each link according to the change parameters, and further optimize the backhaul link according to the screened link with optimal performance. In addition, the slave router can switch to the optimal backhaul link according to the backhaul link switching request message of the master router.
In some embodiments, the backhaul link metric information includes at least one of: the method comprises the steps of a frequency band of a return link of a slave router, a transmission rate of the return link of the slave router, the number of spatial streams of the return link of the slave router, a protection interval of the return link of the slave router and a bandwidth of the return link of the slave router.
It should be understood that the slave router can obtain the initial estimated bandwidth of the backhaul link more accurately according to 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 guard interval of the backhaul link, the bandwidth of the backhaul link, and the like.
In some embodiments, after attempting to connect to the first link, the method further comprises: and sending a backhaul link switching result message to the main router, wherein the backhaul link switching result message indicates that switching to the first link is successful or failed.
It should be appreciated that by returning the backhaul link switching result message to the master router from the slave router to be connected to the first link, the master router can timely learn whether the handover to the optimal backhaul link has been successful, and determine whether the link metric or link connection needs to be re-initiated.
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, and the ad hoc network system comprises a master router and a plurality of slave routers. The method comprises the following steps: the method comprises the steps that a master router sends a backhaul link metric query message to each of a plurality of slave routers; each slave router responds to the backhaul link measurement inquiry message, obtains backhaul link measurement information for the backhaul link of each slave router, and returns a backhaul link measurement response message to the master router, wherein the backhaul link measurement response message comprises the backhaul link measurement information; the method comprises the steps that a master router plans N links according to the number of slave routers, and obtains initial estimated bandwidth of each link according to backhaul link measurement information of each link in the N links; the method comprises the steps that a main router obtains the final estimated bandwidth of each link according to the number of wireless layers of each link, the number of STA equipment connected under a first router of each link, the channel utilization rate of a first sub-link of each link, and the first link is selected, wherein the first link is the link with the largest final estimated bandwidth in N links; the method comprises the steps that a master router sends a backhaul link switching request message to a first router in a plurality of slave routers, wherein the backhaul link switching request message comprises a basic service setting identifier and channel information of a first link; the first router responds to the backhaul link switching request message, disconnects the original backhaul link and connects to the first link.
In the above scheme, in the ad hoc network system composed of the master router and the plurality of slave routers, when the master router detects that a new router joins the ad hoc network and the connection type between the routers is changed, the master router triggers the link optimization process, or the master router periodically triggers the link optimization process, thereby automatically optimizing the backhaul link and improving the internet surfing experience when the user accesses each node of the ad hoc network by using the terminal equipment.
In a fourth aspect, the present application provides an apparatus comprising means for performing the method of the first or second aspect described above. The apparatus may correspond to performing the method described in the first aspect or the second aspect, and for relevant description of the units in the apparatus, reference is made to the description of the first aspect or the second aspect, which is not repeated herein for brevity.
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 that, when executed by the processor, cause the master router to perform the ad hoc network-based link selection method of the first aspect.
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. Wherein the memory has instructions stored therein that, when executed by the processor, cause the slave router to perform the ad hoc network-based link selection method of the second aspect described above.
In a seventh aspect, the present application provides an ad hoc network system. The ad hoc network system comprises a master router and a plurality of slave routers connected with the master router. Wherein the master router is configured to perform the ad hoc network-based link selection method of the first aspect as described above, and the slave router is configured to perform the ad hoc network-based link selection method of the second aspect as described above.
In an eighth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. The computer instructions, when executed on a router, cause the router to perform the ad hoc network based link selection method as provided in the first or second aspect.
In a ninth aspect, the present application provides a computer program product. The computer program product, when run on a computer, causes the computer to perform the ad hoc network based link selection method as provided in the first or second aspect.
In a tenth aspect, the present application provides a chip system. The system-on-chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a wire. The chip system can be applied to a terminal device comprising a communication module and a memory. The interface circuit is for receiving signals from the memory of the terminal device and transmitting the received signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the router may perform the ad hoc network based link selection method as provided in the first or second aspect.
It will be appreciated that the advantages of the fourth to tenth aspects may be found in the relevant description of the first to third aspects, and are not described here again.
Drawings
Fig. 1 is a schematic diagram of an application scenario of an ad hoc network-based link switching scheme provided in an embodiment of the present application;
fig. 2 is a schematic topology diagram of an ad hoc network system according to an embodiment of the present application;
fig. 3 is a schematic hardware structure of a router according to an embodiment of the present application;
fig. 4 is a schematic diagram of an ad hoc network-based link selection method according to an embodiment of the present application;
Fig. 5A-5F are schematic diagrams of a set of scenario for automatically optimizing backhaul links provided in an embodiment of the present application;
fig. 6 is a schematic software structure of an ad hoc network system according to an embodiment of the present application;
fig. 7 is a second schematic diagram of an ad hoc network-based link selection method according to an embodiment of the present application;
fig. 8 is a schematic flow chart of a link optimization algorithm provided in an embodiment of the present application;
fig. 9A-9B are schematic diagrams of a set of scenarios for planning a new backhaul link provided in an embodiment of the present application;
fig. 10A-10B are schematic diagrams of another set of scenarios for planning a new backhaul link provided in an embodiment of the present application;
fig. 11 is a schematic diagram of a link optimization algorithm application scenario provided in an embodiment of the present application;
fig. 12 is a schematic diagram of another link preference algorithm application scenario provided in an embodiment of the present application;
fig. 13 is a schematic flow chart of a link optimization algorithm under different scenarios according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments.
In the description of the present application, "/" means or, unless otherwise indicated, for example, a/B may mean a or B. In the description of the present application, "and/or" is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" and the like in the description and in the claims, are used for distinguishing between different objects or between different processes of the same object and not for describing a particular sequential order of objects. For example, a first link and a second link, etc., are used to distinguish between different links, and are not used to describe a particular order of links. In the present embodiment, "plurality" means two or more.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Some terms or terminology referred to in this application are explained below.
A Wi-Fi (wireless fidelity) network mainly consists of an Access Point (AP) and a Station (STA). The AP equipment is electronic equipment taking an AP role in a Wi-Fi network, and the STA equipment is electronic equipment taking an STA role in the Wi-Fi network. In a Wi-Fi network, one or more STA devices may establish a wireless connection with an AP device through a built-in wireless network card or Wi-Fi module. The AP equipment can provide wireless connection service for the STA equipment, and a plurality of STA equipment can access the same Wi-Fi network through the AP equipment to realize interconnection. The AP device may be connected to the Internet (Internet) through a wire or wirelessly, so that the STA device may be connected to the Internet through the AP device, for example, download data from the Internet side or upload data to the Internet side, i.e., the STA device may implement Wi-Fi Internet service through the AP device. In this embodiment of the present application, the AP device may be a master router and a slave router, and the STA device may be a mobile phone, a Personal Computer (PC), a notebook computer, a smart screen, a wearable device, a Virtual Reality (VR) device, an augmented reality (augmented reality, AR) device, or a tablet computer (Pad) connected to the master router and the slave router.
An ad hoc network is a network in which mobile communication and a computer network are combined. Under the self-networking environment, each node can join and leave the network at any time, and the faults of any node can not influence the operation of the whole network, so that the self-networking network has stronger survivability. Each node has two functions of a router and a host. As a router, the terminal needs to run a corresponding routing protocol, and completes the forwarding and routing maintenance work of the data packet according to a routing strategy and a routing table, so that the node is required to realize a proper routing protocol; as a host, the terminal needs to run various user-oriented applications.
The backhaul link (backhaul), also referred to as backhaul, refers to a connection from an access network to a switching center. The switching center is connected to a backbone network, which is connected to a core network. The backhaul link network is an intermediate layer of the telecommunications network structure that is located between the access network and the backbone network, providing an important connection for both networks. In the embodiment of the present application, the backhaul link refers to a link between a master router and a slave router, or a link between a plurality of slave routers, and the link has a characteristic of being invisible to STA devices such as a mobile phone. When one router is connected to a different router, different backhaul links will be formed, and parameters such as received signal strength indication (received signal strength indicator, RSSI) and bandwidth of the different backhaul links will also be different.
The number of spatial streams, also referred to as the number of spatial streams, is determined by the number of antennas of the Wi-Fi device. The more antennas, the larger the number of spatial streams, and the larger the overall throughput. For example, in a single-input single-output (SISO) Wi-Fi device, the number of spatial streams is 1. In multiple-out (MIMO) Wi-Fi devices, the number of spatial streams is multiple, such as 2 or 4. In the embodiment of the application, both the AP device and the STA device may be Wi-Fi devices.
The Guard Interval (GI) is a blank space. Because the number of users carried by each carrier frequency is limited at most, the time slot transmission of each carrier frequency must not be mutually ensured. The guard interval is set to reduce interference of network signals in transmission process and prevent packet collision. The longer the set guard interval time is, the smaller the probability of interference between network signals is, otherwise, the shorter the set guard interval is, the larger the probability of interference is. The guard interval specified by protocol 802.11 is a GI and the shortGI is a short guard interval. The long guard interval employed by default is 800 nanoseconds. In the case where the number of users confirming the bearer is small and the distance is short and the packet is not easy to collide, the short guard interval employed is 400 ns. It will be appreciated that in a theoretically non-interfering environment, setting a short guard interval may increase the connection rate, but in a practical use environment, a short guard interval may reduce the immunity to interference, so in most scenarios a long guard interval will be used. In this embodiment, the guard interval is divided into a short guard interval and a long guard interval, where the short guard interval is 400 ns and the long guard interval is 800 ns.
With the improvement of economic level, more and more families can select residences such as large houses, duplex houses or villas, or certain offices with larger areas can be used by public, but partition walls, stairs and the like can lead to wireless signal attenuation, so that the wireless transmission rate is reduced, and the wireless transmission quality is affected. Thus, in a relatively large space, a single router cannot completely cover all areas.
At present, a plurality of routers can be used for forming a network topology, so that the expansion of network coverage is realized. However, networking using multiple routers faces a complex wireless network environment, and the link quality of the ad hoc network may change due to various reasons such as unstable connection between routers, change in connection type between routers, change in router location, interference of external devices, or addition of new routers. For example, after router c joins the networking, if router a is reconnected from router b to router c, the link quality of router a to router c is better than the link quality of router a to router b. Therefore, how to optimize the backhaul link in the ad hoc network environment is a technical problem to be solved.
In view of the above technical problems, embodiments of the present application provide a link selection scheme based on an ad hoc network. The scheme is applied to an ad hoc network system consisting of a master router and a plurality of slave routers. When the main router detects that a new router joins the ad hoc network and the connection type between the routers is changed, the main router triggers a link optimization process, or the main router periodically triggers the link optimization process: link metric information is acquired from each slave router, an optimal backhaul link is selected based on the link metric information, and then the optimal backhaul link is issued to the slave router of the link to be adjusted, so that the slave router switches to a new backhaul link. The scheme solves the problem that when the network environment of the ad hoc network changes, the ad hoc network cannot be automatically optimized along with the increase of networking equipment.
The following illustrates an application scenario of the link switching scheme based on the ad hoc network provided in the embodiment of the present application.
First exemplary application scenario
As shown in fig. 1, the fiber to the home is connected to the AP1 through a modem. In the initial ad hoc environment, AP1 is a master router and AP2 and AP4 are slave routers. AP1, AP2 and AP4 form a stable network topology. At some point, the user places AP3 in the kitchen and connects AP3 with AP 1. The AP3 joins the ad hoc network as a slave router to form a new network topology. After AP1 detects the joining of AP3, it determines, through link metrics, that the link quality of AP4 to AP3 is better than the link quality of AP4 to AP 2. At this time, the AP1 may inform the AP4 to disconnect the backhaul link with the AP2 and connect to the backhaul link with the AP 3.
Second exemplary application scenario
As also shown in fig. 1, the fiber to home is connected to AP1 through a modem. In the initial ad hoc network environment, the AP1 is a master router, the AP2, the AP3 and the AP4 are slave routers, the AP1, the AP2 and the AP4 are sequentially connected through wireless, and the AP1 and the AP3 are connected through wireless. AP1, AP2, AP3 and AP4 form a stable network topology. At a certain moment, the user connects the network cable with the AP1 and the AP3, so that the connection mode between the AP1 and the AP3 is changed from a wireless connection mode to a wired mode. After the AP1 detects that the connection mode with the AP3 changes, the link quality of the AP4 connected to the AP3 is determined by the link metric, which is better than the link quality of the AP4 connected to the AP 2. At this time, the AP1 may inform the AP4 to disconnect the backhaul link with the AP2 and connect to the backhaul link with the AP 3.
Third exemplary application scenario
As also shown in fig. 1, the fiber to home is connected to AP1 through a modem. In the initial ad hoc environment, AP1 is a master router and AP2 and AP4 are slave routers. AP1, AP2 and AP4 form a stable network topology. At some point, there is a possibility that the link between the AP2 and the AP4 suddenly gets worse due to various reasons such as unstable connection between the AP2 and the AP4, change in the position of the AP2 or the AP4, and interference of external devices existing in the AP2 and the AP 4. After the AP1 detects the link between the AP2 and the AP4 is degraded, the link quality of the AP4 connected to the AP3 is determined by the link metric to be better than the link quality of the AP4 connected to the AP 2. At this time, the AP1 may inform the AP4 to disconnect the backhaul link with the AP2 and connect to the backhaul link with the AP 3.
In the three application scenarios, when the network environment of the ad hoc network changes, the ad hoc network can automatically optimize the backhaul link along with the increase of networking equipment, the quality change of the link and the connection type change between routers, so that the internet surfing experience when a user accesses each node of the ad hoc network by using the terminal equipment is improved.
The foregoing embodiments are exemplified by two independent devices, i.e., the modem and the master router, and are not limited to this application. In actual implementation, the modem and the main router may be integrated into the same electronic device, so that the main router is directly connected to the external network optical fiber.
The embodiment of the application provides an ad hoc network system. An ad hoc network system may include a master router and a plurality of slave routers connected to the master router. The master router and the plurality of slave routers can be used as an AP in an ad hoc network system, and one or a plurality of STA devices can be connected under any router. The connection mode of the master router and the plurality of slave routers is wired connection or wireless connection. The plurality of slave routers may in turn be divided into one or more tiers.
Fig. 2 is a schematic topology diagram of an ad hoc network system according to an embodiment of the present application.
As shown in fig. 2, the ad hoc network system may include: the master router AP11, the slave router AP21 and the slave router AP22 belonging to the first hierarchy connected to the master router AP11, the slave router AP31 belonging to the second hierarchy connected to the slave router AP21, and the slave router AP32 belonging to the second hierarchy connected to the slave router AP 22. Wherein, a mobile phone 1 is connected under the main router AP11, a mobile phone 2 is connected under the slave router AP21, a printer and a projector are connected under the slave router AP22, a PAD is connected under the slave router AP31, and a PC is connected under the slave router AP32.
In the above-described ad hoc network system, the master router AP11 may automatically adjust the topology structure as shown in fig. 2 according to the link metric information of the slave router AP21, the slave router AP22, the slave router AP31 and the slave router AP32. For example, AP11 may notify AP31 to disconnect the backhaul link with AP21 and connect to the backhaul link of master router AP11, the backhaul link of slave router AP22, or the backhaul link of slave router AP32. For a specific implementation of selecting and adjusting links under the ad hoc network, reference may be made to the following description of embodiments, which are not described herein.
It should be noted that, the foregoing embodiments are exemplified by an example in which the ad hoc network system includes two levels of slave routes, which are not limiting to the embodiments of the present application. It should be understood that an ad hoc network system may also include three levels and more of slave routes. As the level of slave routers increases, the signal quality of the routers gradually decays, so that the level of slave routers can be generally set within three levels.
Fig. 3 is a schematic hardware structure of a router according to an embodiment of the present application.
As shown in fig. 3, the router 300 may include a processor 301, a wide area network (wide area network, WAN) interface 302, a local area network (local area network, LAN) interface 303, a reset module 304, a memory 305, a power supply module 306, and a wireless communication module 307.
It should be noted that, the router 300 may be a master router in an ad hoc network system, such as the AP11 shown in fig. 2; or may be a slave router in an ad hoc network system, such as AP21, AP22, AP31 or AP32 as shown in fig. 2.
In one possible implementation, when router 300 is the master router in an ad hoc network, the functions of the various modules of router 300 are as follows:
The processor 301 may be configured to send a metric query message to each slave router through the LAN interface 303 or the wireless communication module 307, select an optimal backhaul link based on link metric information from each slave router, and then issue the optimal backhaul link to the slave router of the link to be adjusted again through the LAN interface 303 or the wireless communication module 307.
Further, the processor 301 may be further configured to send data of the STA device connected to the master router, data from the STA device connected to each slave router, and the data to the external network through the WAN interface 302; and forwarding data from the external network to the STA device connected to the master router, the STA device connected to each slave router, through the WAN interface 302.
The WAN interface 302 is a connection port to which the modem is connected. The external network is accessed through WAN interface 302.
The LAN interface 303 is a connection port for connecting to the STA device. Each slave router in the ad hoc network, and each STA device under the master router, are connected through the LAN interface 303.
The reset module 304 may be used to restore factory settings of the master router.
Memory 305 may be used to store link metric information from the slave routers. In addition, the memory 305 may be used to store link metric information measured by the master router on its own. The link metric information may include RSSI, the number of spatial streams, a guard interval, a frequency band of a link, a bandwidth of the link, a transmission rate of the link, the number of STA devices connected under each router, a connection type between routers, a channel utilization between routers, and the like.
A power module 306, which may be used to provide operating power to the primary router.
The wireless communication module 307 may integrate a transmitting device and a receiving device. The receiving device may receive the electromagnetic wave via the antenna, frequency modulate the electromagnetic wave signal, and filter the processed signal to the processor 301. The transmitting device may receive the signal to be transmitted from the processor 301, frequency-modulate it, amplify it, and convert it into electromagnetic waves via the antenna. For example, the receiving device sends link metric information from the router to the processor 301. Then, the transmitting device transmits the optimal backhaul link processed by the processor 301 to the slave router of the link to be adjusted through the antenna. The receiving device then sends the backhaul link preference result from the slave router to the processor 301, the backhaul link preference result being either a successful link handoff or a failed link handoff.
In another possible implementation, when the router 300 is a slave router in an ad hoc network, the functions of the respective modules of the router 300 are as follows:
the processor 301 may be configured to respond to a metric query packet from the master router, and return link metric information obtained by measuring itself to the master router; and the switching unit is used for responding to the switching request message from the main router, disconnecting the original backhaul link and switching to a new backhaul link indicated by the switching request message.
WAN interface 302 is a connection port that connects with a router of the upper level in the topology. Link metric information, backhaul link preference results, data from STA devices under the slave router, etc. may be sent to the master router over the WAN interface 302.
The LAN interface 303 is a connection port to which a router of the next level in the topology connects. Metric query messages and handoff request messages from the master router, etc., may be forwarded to routers of the next level through LAN interface 303.
A reset module 304 may be used to restore factory settings from the router.
Memory 305 may be used to store link metric information measured periodically on its own. The link metric information may include RSSI, the number of spatial streams, a guard interval, a frequency band of a link, a bandwidth of the link, a transmission rate of the link, the number of STA devices connected under each router, a connection type between routers, a channel utilization between routers, and the like.
A power module 306, which may be used to provide operating power for the slave router.
The wireless communication module 307 may integrate a transmitting device and a receiving device. The receiving device may receive the electromagnetic wave via the antenna, frequency modulate the electromagnetic wave signal, and filter the processed signal to the processor 301. The transmitting device may receive the signal to be transmitted from the processor 301, frequency-modulate it, amplify it, and convert it into electromagnetic waves via the antenna. For example, the receiving device sends a metric query message, a handover request message from the master router to the processor 301. The transmitting device then transmits the link metric information and the backhaul link preference result to the master router via the antenna.
It will be appreciated that the architecture illustrated in the embodiments of the present application does not constitute a specific limitation on routers. In other embodiments of the present application, a router may include more or fewer components than shown, or may combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Fig. 4 is a general flow chart of an ad hoc network-based link selection method according to an embodiment of the present application. The method may be applied to an ad hoc network system as shown in fig. 2, which may include a master router and a plurality of slave routers connected to the master router. As shown in fig. 4, the method may include S401-S408 described below.
S401, the main router judges whether the condition for triggering the link preference is satisfied.
The preferable condition of the triggering link is a condition preset in the router by the equipment manufacturer or a condition stored after the router is used and the system is upgraded.
After the master router and the plurality of slave routers are powered on and networking is successful, the master router starts to detect whether the condition for triggering link preference is met. If the condition for triggering link preference is satisfied, the master router will trigger a link preference procedure, performing S402 described below; if the trigger link preferred condition is not met, the master router will continue to periodically check if the trigger link preferred condition is met, i.e. perform S401 described above.
In some embodiments, the above-mentioned conditions for triggering the link may be any of the following:
1. the master router detects that a new slave router joins the ad hoc network.
The master router and at least one slave router have formed a stable network topology before the new slave router joins the ad hoc network. The new slave router may be connected to the master router directly by wire or wirelessly, or indirectly through at least one slave router. The master router may detect a new slave router is online. New slave routers may be brought online to make the original network topology a non-optimal topology. In this case, the master router may trigger a link optimization procedure, such as by changing the backhaul link of a certain slave router, to improve the link quality of the backhaul link of the slave router.
2. The master router detects that the connection type between the routers has changed.
The above-mentioned "the connection type between routers is changed" means that the type of the backhaul link between at least two routers is changed. For example, the connection type between the router 1 and the router 2 is changed from a wired connection to a wireless connection, or the connection type between the router 1 and the router 2 is changed from a wireless connection to a wired connection, or the connection type between the router 1 and the router 2 is changed from a 2.4G connection type to a 5G connection type, or the connection type between the router 1 and the router 2 is changed from a 5G connection type to a 2.4G connection type. The router 1 and the router 2 may be a master router and a slave router, and the router 1 and the router 2 may be slave routers.
3. The master router periodically triggers the link optimization procedure.
After the master router starts to detect whether the condition for triggering the link preference is satisfied, a timer may be set, and start to count, and then trigger the link preference process once every preset time period. The preset duration can be preset in the master router or can be determined by negotiation between the master router and the slave router. Thus, when the link quality of the backhaul link changes due to the addition of a new router, the change of the connection type between routers, the unstable connection between routers, the change of the router position, the interference of external equipment and the like, the main router can timely discover the changes through the period measurement.
S402, the master router sends a backhaul link metric query message to each slave router in the ad hoc network.
The backhaul link metric query message is used for obtaining backhaul link metric information of each slave router.
Wherein the backhaul link metric information of each slave router is a relevant parameter measured for the backhaul link by the underlying driver of each slave router. For example, the backhaul link metric information may include RSSI, the number of spatial streams, a guard interval, a frequency band of a link, a bandwidth of a link, a transmission rate of a link, the number of STA devices connected under each router, a connection type between routers, a channel utilization between routers, and the like.
S403, each slave router respectively returns a return link metric response message to the master router.
The backhaul link metric response message contains backhaul link metric information of the slave router.
S404, the master router updates backhaul link metric information of each slave router.
The master router may store backhaul link metric information for each slave router in a data structure. The master router may update the backhaul link metric information of one slave router whenever the backhaul link metric information is received. That is, the data structure of the master router is used to store the latest measured backhaul link metric information for each router.
It should be noted that, in addition to obtaining the backhaul link metric information of each slave router, the master router may also obtain parameters measured by the backhaul link of the master router, such as the number of STA devices mounted on the master router.
S405, the main router calculates the optimal backhaul link according to the backhaul link metric information.
After obtaining the backhaul link metric information updated by each slave router, the master router may calculate, according to the backhaul link metric information and a link optimization algorithm, a backhaul link with the highest score, that is, an optimal backhaul link, from the plurality of backhaul links. The master router may then determine, based on the optimal backhaul link, whether there are slave routers for the backhaul link to be adjusted. If there is a slave router of the backhaul link to be adjusted, the master router may issue the optimal backhaul link to the slave router of the backhaul link to be adjusted, i.e., perform S406 described below. If there is no slave router to adjust the backhaul link, the master router may continue to periodically detect whether the condition triggering link preference is satisfied, i.e., perform S401 described above.
For a specific implementation of the link optimization algorithm, reference may be made to the following description of embodiments, which are not repeated here.
S406, the master router issues the optimal backhaul link to a slave router of the backhaul link to be adjusted, such as slave router 1 shown in fig. 4.
The secondary router of the backhaul link to be adjusted is a router which is included in the optimal backhaul link but not added into the optimal backhaul link. For example, the link from the router 1 to the router 2 to the router 3 is the optimal backhaul link, but before the backhaul link is adjusted, the router 3 is not connected to the router 2 but is connected to the router 4, so the router 3 is a slave router to the link to be adjusted.
S407, the slave router of the link to be adjusted is switched to a new backhaul link contained in the optimal backhaul link.
The slave router of the link to be adjusted may disconnect the original backhaul link and attempt to connect to the new backhaul link. The new backhaul link may be the entire optimal backhaul link or a part of the entire optimal backhaul link.
S408, the slave router of the link to be adjusted returns a return link response message to the master router.
The backhaul link response message contains a result of switching to the new backhaul link, such as a successful link switching or a link switching failure.
Fig. 5A-5F illustrate a set of schematic diagrams of scenarios for automatically optimizing backhaul links in an ad hoc network environment.
Assuming AP1 as the master router, AP2, AP3 and AP4 as the slave routers.
As shown in fig. 5A, before the AP1 determines that the condition for triggering the link preference is satisfied, the ad hoc network includes two backhaul links: AP4 to AP2 to AP1, and AP3 to AP1. After the AP1 determines that the condition for triggering link preference is satisfied, the AP1 sends backhaul link metric query messages to the AP2 and the AP3, respectively, and correspondingly, the AP2 and the AP3 return backhaul link metric response messages to the AP1 respectively. In addition, AP2 forwards the backhaul link metric query message from AP1 to AP4, and accordingly, AP4 returns a backhaul link metric response message to AP1 through AP 2. Note that, the backhaul link metric response message of the AP2 and the backhaul link metric response message of the AP4 may be encapsulated in the same message by the AP2 and uniformly returned to the AP1.
After the AP1 obtains the updated backhaul link metric information of the AP2, the AP3 and the AP4, the AP1 may calculate the optimal backhaul link according to the link optimization algorithm according to the updated backhaul link metric information. Take the example that the optimal backhaul link is a link from AP4 to AP3 to AP1. As shown in fig. 5B, since the AP4 is not yet connected to the optimal backhaul link at this time, the AP1 may send a backhaul link handover request message to the AP4 through the AP2 based on the original link, the message carrying the optimal backhaul link. In addition, the link between the AP3 and the AP1 already belongs to the optimal backhaul link, so the AP3 can continue to maintain the original link without changing the backhaul link.
As an example, as shown in fig. 5C, after the AP4 receives the backhaul link switching request message, the backhaul link between the AP2 and the AP4 may be disconnected and connected to the AP3, thereby establishing an optimal backhaul link. In addition, the AP2 does not belong to the optimal backhaul link, so the AP2 may continue to maintain the original link without changing the backhaul link. Then, as shown in fig. 5D, the AP4 may return a backhaul link switching response message to the AP1 through the AP3, where the backhaul link switching response message includes a result of successful switching to the new backhaul link.
As another example, as shown in fig. 5E, after the AP4 receives the backhaul link switching request message, the backhaul link between the AP2 and the AP4 may be disconnected and connection to the AP3 may be requested. If AP4 fails to connect to AP3, then AP4 may reconnect to AP2. After the AP4 is reconnected to the AP2, as shown in fig. 5F, the AP4 may return a backhaul link switching response message to the AP1 through the AP2, where the backhaul link switching response message includes a result of a failure to switch to the new backhaul link.
In the link selection method based on the ad hoc network provided in the embodiment of the present application, when the master router detects that a new router joins the ad hoc network and a connection type between routers is changed, the master router triggers a link optimization process, or the master router periodically triggers a link optimization process: link metric information is acquired from each slave router, an optimal backhaul link is selected based on the link metric information, and then the optimal backhaul link is issued to the slave router of the link to be adjusted, so that the slave router switches to a new backhaul link. Therefore, when the network environment of the ad hoc network changes, the ad hoc network can automatically optimize the return link along with the increase of networking equipment, the change of link quality and the change of connection types among routers, so that the internet surfing experience of a user when the user accesses each node of the ad hoc network by using the terminal equipment is improved.
The foregoing embodiments are illustrated from the perspective of interaction between a master router and a plurality of slave routers, and in order to more clearly illustrate the present solution, the link selection method based on the ad hoc network provided in the present application is illustrated from the perspective of a master router and a slave router. For example, the slave router may 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 may be plural.
Fig. 6 is a schematic software structure of an ad hoc network system according to an embodiment of the present application.
As shown in fig. 6, the ad hoc network system includes a master router (controller) and a slave router (agent).
The main router comprises a topology management module, a link measurement module, a link optimization module and a message processing module.
The topology management module of the master router is used for detecting whether a new slave router joins the ad hoc network or not and detecting whether the connection type between the routers of the ad hoc network is changed or not; and sending an event notification to a link metric module of the master router when a new slave router is detected to join the ad hoc network or a change in the connection type between routers of the ad hoc network is detected.
The link measurement module of the main router is used for responding to the event notification of the topology management module of the main router and sending a backhaul link measurement request message to the message processing module of the main router; or periodically sending a backhaul link metric request message to a message processing module of the master router.
The message processing module of the main router is used for sending a backhaul link measurement inquiry message and a backhaul link switching request message to the slave router; and receiving a backhaul link metric response message and a backhaul link switching response message from the slave router.
The link optimization module of the main router is used for receiving the backhaul link measurement response message forwarded by the message processing module and the link measurement module of the main router; taking the link metric information carried by the backhaul link metric response message as input, and calculating to obtain an optimal backhaul link through a link optimization algorithm; sending an optimal return link to the slave router through a message processing module of the master router; and confirming a result of the handover from the router to the new backhaul link.
The slave router comprises a link measurement module, a message processing module, a link optimization module and a Wi-Fi driving module.
The message processing module of the slave router is used for receiving the backhaul link measurement inquiry message and the backhaul link switching request message from the master router; and returning a backhaul link metric response message and a backhaul link handover response message to the master router.
The Wi-Fi driving module of the slave router is used for periodically acquiring backhaul link measurement information of the router; and switching to the optimal backhaul link in response to the backhaul link switching request of the master router.
And the link measurement module of the slave router is used for acquiring the backhaul link measurement information from the Wi-Fi driving module, responding to the backhaul link measurement inquiry message and returning a backhaul link measurement response message to the master router through the message processing module of the slave router, wherein the backhaul link measurement response message carries the backhaul link measurement information of the router.
And the link optimization module of the slave router is used for transmitting the optimal backhaul link from the master router to the Wi-Fi driving module of the slave router and returning the result of switching from the Wi-Fi driving module to the new backhaul link to the master router.
Illustratively, fig. 7 is a flow chart of a link selection method corresponding to the software structure of fig. 6.
As shown in fig. 7, the method includes the following S1 to S20.
S1, a Wi-Fi driving module of a slave router reports backhaul link measurement information to a link measurement module of the slave router by taking a duration T as a period. The link metric module of the slave router saves the latest backhaul link metric information in the data structure after obtaining the backhaul link metric information each time.
The time length T is preset in the slave router, and can also be determined by negotiation between the master router and the slave router.
The backhaul link metric information, also referred to as backhaul link metric result, is a relevant parameter measured by the Wi-Fi driving module of the slave router on the backhaul link of the slave router. The backhaul link metric information may include an RSSI of the backhaul link of the slave router, a number of spatial streams of the slave router, a guard interval of the backhaul link of the slave router, a frequency band of the backhaul link of the slave router, a bandwidth of the backhaul link of the slave router, a transmission rate of the backhaul link of the slave router, a number of STA devices connected under the router, a connection type between the slave router and other routers, a channel utilization rate of the backhaul link of the slave router, and the like.
Illustratively, in one implementation, after the slave router joins the ad hoc network, the link metric module of the slave router starts a timer and issues a metric instruction to the Wi-Fi driver module of the slave router, where the metric instruction is used to instruct to measure the backhaul link with the period of time T. The Wi-Fi driving module responds to the measurement instruction, and returns measurement information of the backhaul link every interval duration T. In another implementation, after the slave router joins the ad hoc network, the link metric module of the slave router starts a timer, and issues a metric instruction from the Wi-Fi driver module of the router every interval duration T, where each metric instruction is used to indicate metric information of measuring one backhaul link. The Wi-Fi driver module returns metric information for the backhaul link in response to each metric instruction. After the Wi-Fi driving module returns the measurement information of the backhaul link each time, the link measurement module of the slave router saves the backhaul link measurement information obtained at the latest time in the data structure.
S2, the link measurement module of the main router receives event notification from the topology management module of the main router, or the timing duration of the link measurement module of the main router reaches the preset duration.
The event notification is a detection of a new slave router joining the ad hoc network or a detection of a change in the connection type between routers in the ad hoc network.
The preset duration is the period duration of periodically sending the backhaul link measurement request to the slave router by the master router. For example, after the master router starts to detect whether the condition for triggering link preference is satisfied, a timer may be set and started to count time, and then a link preference procedure is triggered every preset time period. The preset duration can be preset in the master router or can be determined by negotiation between the master router and the slave router.
It should be noted that, the duration T in S1 may be less than or equal to the preset duration in S2.
Illustratively, after the master router receives the online message of the slave router, the link metric module of the master router sends a duration 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, wherein the protocol message carries a negotiation duration. And then, the link measurement module of the slave router returns a negotiation time length confirmation message to the link measurement 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 main router can take the negotiation time length as the preset time length, and trigger a link optimization process once every preset time length; in addition, the slave router can report the backhaul link metric information to the link metric module of the slave router every time duration T by taking the negotiation duration as the duration T. It should be understood that when the duration T in S1 is equal to the preset duration in S2, the master router triggers the link optimization procedure and the slave router reports the synchronization of the backhaul link metric information procedure, so that the backhaul link metric information latest obtained by the slave router can be obtained after the master router triggers the link optimization procedure each time.
S3, the link measurement module of the main router sends a backhaul link measurement request message to the message processing module of the main router.
The backhaul link metric request message is used for requesting to acquire backhaul link metric information of the slave router.
S4, the message processing module of the master router sends a backhaul link measurement query message to the message processing module of the slave router. The backhaul link metric query message carries an encapsulated backhaul link metric request message.
S5, the message processing module of the slave router analyzes the backhaul link measurement inquiry message to obtain a backhaul link measurement request message, and informs the link measurement module of the slave router of the backhaul link measurement request message.
S6, the link measurement module of the slave router acquires the backhaul link measurement information obtained by the latest measurement from the stored data structure.
S7, the link measurement module of the slave router assembles the backhaul link measurement information and sends the assembled backhaul link measurement information to the message processing module of the slave router.
S8, the message processing module of the slave router returns a return link measurement response message to the message processing module of the master router. The backhaul link metric response message carries the encapsulated backhaul link metric information.
S9, the message processing module of the main router analyzes the backhaul link measurement response message to obtain backhaul link measurement information, and sends the backhaul link measurement information to the link measurement module of the main router. The link metric module of the master router then forwards the backhaul link metric information to the link preference module of the master router.
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.
The master router can calculate the backhaul link with the highest score, namely the optimal backhaul link, in the plurality of backhaul links according to the backhaul link metric information updated by each slave router and the link optimization algorithm. The master router may then determine, based on the optimal backhaul link, whether there are slave routers for the backhaul link to be adjusted. If the slave router is a router in the optimal backhaul link and the slave router is not yet connected to the optimal backhaul link, the master router may issue the optimal backhaul link to the slave router, i.e., perform S11 described below.
S11, the link optimization module of the main router sends a backhaul link optimization message to the message processing module of the main router, wherein the backhaul link optimization message comprises the optimal backhaul link.
Illustratively, the backhaul link preference message may specifically include a basic service set identification (basic service set ID, BSSID) of the optimal backhaul link and channel information. In addition, the backhaul link preference message may also include a media access control (media access control, MAC) address of the slave router to be adjusted. It should be appreciated that the BSSID of a link is used to uniquely identify the backhaul link, the MAC address of a router is used to uniquely identify the router, and the router that receives the backhaul link preference message can determine the optimal backhaul link, the slave router that needs to adjust the link, and to which router the slave router needs to connect based on the BSSID and MAC address carried by the message.
S12, the message processing module of the master router sends a return link switching request message to the message processing module of the slave router. The backhaul link switching request message carries an encapsulated backhaul link preference message.
Correspondingly, after the message processing module of the slave router receives the backhaul link switching request message, an Acknowledgement (ACK) message is replied to the message processing module of the master router, and is used for indicating that the backhaul link switching request message has been received.
S13, the message processing module of the slave router analyzes the backhaul link switching request message to obtain a backhaul link preference message, and notifies the link preference module of the slave router of the backhaul link preference message.
S14, the link preference module of the slave router informs the Wi-Fi drive module of the slave router of the backhaul link preference message.
S15, the Wi-Fi driving module of the slave router responds to the backhaul link preference message, disconnects the original backhaul link and tries to connect to the optimal backhaul link.
S16, the Wi-Fi driving module of the slave router returns a return link switching result message to the link optimization module of the slave router. The backhaul link switching result message is used for indicating that the backhaul link switching is successful or the backhaul link switching is failed.
S17, the link optimization module of the slave router sends the backhaul link switching result message to the message processing module of the slave router.
S18, the message processing module of the slave router returns a return 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.
Correspondingly, after the message processing module of the master router receives the backhaul link switching response message, an ACK message is replied to the message processing module of the slave router, and the ACK message is used for indicating that the backhaul link switching response message has been received.
S19, the message processing module of the main router analyzes the return link switching response message to obtain a return link switching result message, and sends the return link switching result message to the link optimization module of the main router.
S20, the link optimization module of the main router receives and confirms the return link switching result message. If the backhaul link handover fails, the backhaul link preference message or the backhaul link metric request message is re-transmitted to the slave router.
In some embodiments, the backhaul link handover result message may include an error code, which may be used to indicate an error type of backhaul link handover failure. The link optimization module of the main router can determine the reason of the backhaul link switching failure according to the error code and decide the next operation.
Illustratively, table 1 shows a set of correspondence between error codes and error causes. If the error code returned from the router is the first error code in table 1, the master router may reinitiate the link connection starting 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 may reinitiate the link metric from S3. It should be noted that each error code in table 1 is only exemplary, and other error codes may be used to indicate the error type of the backhaul link handover failure when actually implemented, and re-initiate the link metric or the link connection according to the error type.
TABLE 1
The link preference algorithm is exemplified below.
In a link optimization algorithm, a master router firstly plans N links according to the number of slave routers; then calculating to obtain the estimated bandwidth of each link according to the backhaul link measurement information of each link in the N links; and then taking the link with the maximum estimated bandwidth as the optimal backhaul link.
Fig. 8 is a schematic flow chart of a link optimization algorithm according to an embodiment of the present application. The execution body of the method may be a link preference module of the master router as shown in fig. 6.
As shown in fig. 8, the method includes S801 to S810 described below.
S801, on the already established topology, N links are planned according to the number of slave routers.
After the link optimization module of the master router obtains the backhaul link metric information from each slave router, the master router can add new links on the established topology structure, and finally plan to obtain N links. The N links are composed of an original link and a new link.
In some embodiments, if the reason for triggering the link optimization procedure is that the topology management module detects that a new router joins the ad hoc network, the link optimization module of the master router may maintain the original links in the already established topology and connect the new router with each router in the already established topology to obtain one or more new links when planning the new links.
Illustratively, as shown in fig. 9A, in the topology that has been established, a master router is connected with a slave router 1 through a link 1, the master router is connected with a slave router 2 through a link 2, and the master router is connected with a slave router 3 through a link 3. As shown in fig. 9B, it is assumed that at some point, the slave router 4 establishes a connection with the slave router 1 through the link 4, joining the already established topology, but the link 4 may not be an optimal backhaul link for the slave router 4. In this case, the master router may send backhaul link metric query messages to the slave router 1, the slave router 2, the slave router 3 and the slave router 4 to obtain backhaul link metric information of each slave router, and then plan a new link on the already established topology: a link 5 for connecting the slave router 2 and the slave router 4, a link 6 for connecting the slave router 3 and the slave router 4, and a link 7 for connecting the master router and the slave router 4. Thus, n=4 backhaul links are finally planned: a first backhaul link, slave router 4-slave router 1-master router; a second backhaul link, slave router 4-slave router 2-master router; a third backhaul link, slave router 4-master router; a fourth backhaul link, slave router 4-slave router 3-master router.
In other embodiments, if the reason for triggering the link optimization procedure is that the topology management module of the master router detects that the connection type between routers in the ad hoc network has changed, the link optimization module of the master router may connect the router corresponding to the link with which the connection type has changed with other routers in the already established topology to obtain one or more new links when planning the new links.
Illustratively, as shown in fig. 10A, in the topology that has been established, a master router is connected with a slave router 1 through a link 1, the master router is connected with a slave router 2 through a link 2, the master router is connected with a slave router 3 through a link 3, and the slave router 2 is connected with a slave router 4 through a link 4. As shown in fig. 10B, it is assumed that the connection type of the link 4 is changed from a wired connection to a wireless connection at some point, but the link 4 may not be an optimal backhaul link for the slave router 4. In this case, the master router may send backhaul link metric query messages to the slave router 1, the slave router 2, the slave router 3 and the slave router 4 to obtain backhaul link metric information of each slave router, and then plan a new link on the already established topology: a link 5 for connecting the slave router 1 and the slave router 4, a link 6 for connecting the slave router 3 and the slave router 4, and a link 7 for connecting the master router and the slave router 4. Thus, n=4 backhaul links are finally planned: a first backhaul link, slave router 4-slave router 1-master router; a second backhaul link, slave router 4-slave router 2-master router; a third backhaul link, slave router 4-master router; a fourth backhaul link, slave router 4-slave router 3-master router.
In still other embodiments, if the reason for triggering the link optimization procedure is periodic triggering of the link metric module of the master router, the link optimization module of the master router may connect each slave router with other routers that have not yet been connected, respectively, to obtain one or more new links when planning new links.
After planning to obtain N links, the estimated bandwidth of each link in the N links can be obtained. The estimated bandwidth for each link may be obtained by performing S802-S809 described below.
The following will exemplify a link i among the N links. Wherein i is a positive integer less than or equal to N.
S802, acquiring the signal strength of a link i.
The master router may first determine each router corresponding to link i, and then obtain the signal strength of link i from the backhaul link metric information reported by these slave routers.
The signal strength may be specifically, for example, RSSI.
S803, a transmission rate corresponding to the signal strength of the link i is acquired.
In some embodiments, a mapping relationship table of the signal strength and the transmission rate of the backhaul link may be pre-established and stored in the master router. After the signal intensity of the link i is obtained, the link optimization module of the main router can obtain the transmission rate corresponding to the signal intensity by referring to the mapping relation table.
Typically, the signal strength of the backhaul link ranges from-100 db to 0db. For ease of calculation, each value in the signal strength range-100 db to 0db may be added with 100, converted into 0db to 100db, and then a mapping table of the signal strength range and the transmission rate may be established. In addition, since the same signal strength of different frequency bands corresponds to different transmission rates, mapping relation tables can be respectively established for the signal strength ranges and the transmission rates of different frequency bands, for example, a mapping relation table of the signal strength and the transmission rate of a 2.4G frequency band is established, and a mapping relation table of the signal strength and the transmission rate of a 5G frequency band is established.
When acquiring the transmission rate corresponding to the signal strength of the link i, the link optimization module of the master router may determine the frequency band (for example, the 2.4G frequency band or the 5G frequency band) of the link i first, and then consult the mapping relation table corresponding to the frequency band, so as to acquire the transmission rate corresponding to the signal strength of the frequency band.
S804, obtaining the initial estimated bandwidth of the link i according to the frequency band of the link i, the transmission rate of the link i, the number of spatial streams of the link i, the guard interval of the link i and the bandwidth of the link i.
The frequency band of the link i can be 2.4G frequency band or 5G frequency band. It should be appreciated that the initial estimated bandwidth of the 5G band is greater than the initial estimated bandwidth of the 2.4G band with the other parameters being the same.
The transmission rate of the link i refers to the rate at which data is transmitted over the link i. It will be appreciated that the higher the transmission rate of link i, the greater the initial estimated bandwidth of link i, with the other parameters being the same.
The number of spatial streams of the link i is related to the number of antennas of the router to which the link i is connected. It should be appreciated that the larger the number of spatial streams for link i, the greater the initial estimated bandwidth for link i, with the other parameters being the same.
The guard interval of the link i may be a short guard interval or a long guard interval. It should be understood that, in the case where the other parameters are the same, the larger the guard interval of the link i, the smaller the initial estimated bandwidth of the link i; the smaller the guard interval of link i, the greater the initial estimated bandwidth of link i.
The bandwidth of the link i, i.e. the spectrum width. For example, the bandwidth of link i may be 20M, 40M, 80M, or 160M. It should be understood that, under the condition that other parameters are the same, the larger the bandwidth of the link i is, the larger the initial estimated bandwidth of the link i is; the smaller the bandwidth of link i, the smaller the initial estimated bandwidth of link i.
In some embodiments, a table of correspondence between frequency bands, transmission rates, number of spatial streams, guard intervals, bandwidths, and estimated bandwidths may be pre-established. Under the condition that the frequency band of the link i, the transmission rate of the link i, the number of spatial streams of the link i, the protection interval of the link i and the bandwidth of the link i are obtained, the link optimization module of the main router can obtain the initial estimated bandwidth of the link i by referring to the mapping relation table.
Illustratively, table 2 below shows the correspondence between the frequency band, the transmission rate, the number of spatial streams, the guard interval, the bandwidth, and the portion of the estimated bandwidth. Wherein the transmission rate s2 is greater than the transmission rate s1.
TABLE 2
It should be noted that, the above embodiment is described by taking, as an example, obtaining the initial estimated bandwidth of the link i according to 5 parameters, that is, the frequency band of the link i, the transmission rate of the link i, the number of spatial streams of the link i, the guard interval of the link i, and the bandwidth of the link i, which is not limited to the embodiment of the present application. In actual implementation, the initial estimated bandwidth of the link i may also be obtained according to some of the 5 parameters, or according to any other possible parameters.
Under the condition that the frequency band of the link i, the transmission rate of the link i, the number of spatial streams of the link i, the guard interval of the link i and the bandwidth of the link i are obtained, the initial estimated bandwidth of the link i can be obtained by consulting the mapping relation table. Because the main router collects various link information in the link measurement stage, the initial estimated bandwidth can be obtained more accurately.
S805, determining the wireless layer number of the link i according to the layer number of the link i and the connection type of each layer. And then, obtaining the initial estimated bandwidth after attenuation according to the number of wireless layers.
The number of levels of the link i refers to the number of sub-links between the slave router of the lowest level of the slave link i and the master router. For example, the number of tiers of link i is equal to the number of slave routers that link i contains. When a plurality of slave routers are mounted on one slave router, the link from each of the plurality of slave routers to the master router is calculated as one link, and thus the slave routers included in the link i belong to different tiers.
The number of radio layer levels of the link i refers to the number of radio connection sub-links between the slave router of the lowest level of the slave link i and the master router. The link i comprises at least one hierarchy, and the connection type of each hierarchy may be a wireless connection type or a wired connection type. In general, the link signal attenuation of the wired connection type is small, and the link signal attenuation of the wireless connection type is large. In the embodiment of the present application, if a certain level of the link i is a wired connection type, attenuation may be ignored; if a certain level of link i is a radio connection type, then the attenuation of the initial estimated bandwidth needs to be calculated. In this case, the number of wireless layers of the link i may be determined according to the number of layers of the link i and the connection type of each layer.
Illustratively, fig. 10B is taken as an example. Suppose that the final plan yields 4 backhaul links: a first backhaul link, slave router 4-slave router 1-master router; a second backhaul link, slave router 4-slave router 2-master router; a third backhaul link, slave router 4-master router; a fourth backhaul link, slave router 4-slave router 3-master 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 master router and the slave router 2 is of a wireless connection type and the link between the slave router 2 and the slave router 4 is of a wired connection type, the number of wireless layers of the second backhaul link is 1.
In some embodiments, in the case where the number of radio layer levels of the ith link in the N links is greater than or equal to 2, the following relation (1) may be used to calculate the initial estimated bandwidth after attenuation:
TP (i) *α*(Ln (i) -1) (1)。
wherein TP (i) Representing the initial estimated bandwidth of link i, alpha being the wireless attenuation coefficient, ln (i) Representing the number of radio layer levels for link i. It should be noted that α is a preset coefficient obtained through experiments for adjusting the influence of wireless attenuation on bandwidth. The larger the value of α, the greater the impact of wireless attenuation on bandwidth.
It should be understood that, in the case that the number of wireless layer levels of the ith link in the 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 layer levels, the influence 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 real bandwidth. It should be noted that when the number of radio layers of the link is equal to 1, it is not necessary to multiply the number of radio layers by the radio attenuation coefficient, i.e., the influence of the number of radio layers on the bandwidth is ignored.
S806, obtaining a first attenuation amount according to the number of STA devices connected under the first router of the link i.
Each router may act as an AP in link i, and thus at least one STA device may be connected under each router. Of course, some routers may not be connected to STA devices.
The first router may be any one of the following:
(1) The router of the upper level of the slave router located at the lowest level in the link i.
An example is illustrated in fig. 11. Let it be assumed that link 1 is from slave router 3 to slave router 1 to master router, link 2 is from slave router 3 to master router, and link 3 is from slave router 3 to slave router 2 to master router. The lowest level slave routers of links 1, 2 and 3 are all slave routers 3. The router (first router) located at the upper level of the slave router 3 in the link 1 is the slave router 1. The router (first router) located at the upper level of the slave router 3 in the link 2 is the master router. The router (first router) located at the upper level of the slave router 3 in the link 3 is the slave router 2.
(2) The highest level of slave routers in link i. It should be noted that if there is only one slave router in the link i, the first router is the master router.
The illustration is still given by way of example in fig. 11. Let it be assumed that link 1 is from slave router 3 to slave router 1 to master router, link 2 is from slave router 3 to master router, and link 3 is from slave router 3 to slave router 2 to 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 a slave router, the first router in link 1 being the master router. Link 3 has two slave routers, and the highest level slave router (first router) in link 3 is slave router 2.
(3) The router with the least number of STA devices is mounted in link i.
For example, the link i is sequentially from the lowest level to the highest level, namely, the slave router 1, the slave router 2 and the slave router 3. The number of the STA devices mounted on the slave router 1 is 1, the number of the STA devices mounted on the slave router 2 is 2, and the number of the STA devices mounted on the slave router 3 is 3, so that the first router is the 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 that the router with the least number of STA mounted devices may be used as the first router.
In some embodiments, the first attenuation amount may be calculated using the following relation (2):
β*Num sta(i) (2)。
wherein, beta is a load weight coefficient, num sta(i) Representing the number of STA devices connected under the first router of link i. It should be noted that β is a preset coefficient obtained through experiments for adjusting the influence of the load on the bandwidth. The larger the value of beta is, the larger the load has an influence on the bandwidth.
It should be appreciated that the more STA devices connected under the router, the greater the impact on the estimated bandwidth. The load weight coefficient is multiplied by the number of the STA devices connected under the first router to obtain a first attenuation amount, and the first attenuation amount is subtracted, so that the influence of the STA devices on the estimated bandwidth can be effectively reduced, and the finally obtained estimated bandwidth is closer to the real bandwidth.
S807, obtaining a second attenuation amount according to the channel utilization of the first sub-link of the link i.
The above-mentioned link i may comprise at least one sub-link, each for connecting two routers at adjacent levels.
The first router may be any one of the following:
(1) At least one sub-link is used for connecting the slave router at the lowest level and the sub-link of the router at the upper level of the lowest level. That is, the first sub-link may be the lowest level sub-link of the at least one sub-link.
The illustration is still given by way of example in fig. 11. The link 1 comprises one sub-link connecting the master router and the slave router 1, and another sub-link connecting the slave router 1 and the slave router 3, wherein the sub-link connecting the slave router 1 and the slave router 3 is the first sub-link of the link 1. The link 2 comprises one sub-link connecting the master router and the slave router 3, wherein the sub-link connecting the master router and the slave router 3 is the first sub-link of the link 2. The link 3 comprises one sub-link connecting the master router and the slave router 2 and another sub-link connecting the slave router 2 and the slave router 3, wherein the sub-link connecting the slave router 2 and the slave router 3 is the first sub-link of the link 3.
(2) At least one sub-link is used for connecting with a master router and a sub-link of a slave router of the highest level. That is, the first sub-link may be the highest level sub-link of the at least one sub-link.
It should be noted that, when the link i includes only one sub-link, the sub-link is the first sub-link.
In some embodiments, the second attenuation amount may be calculated using the following relation (3):
γ*ChU bssid(i) (3)。
wherein, gamma is the channel utilization coefficient, chU bssid(i) Indicating the channel utilization of the first sub-link of link i. It should be noted that γ is a preset coefficient for influencing the bandwidth by the channel utilization obtained through experiments. The larger the gamma value is, the channel utilization rate has a influence on bandwidthThe louder is.
It will be appreciated that the higher the channel utilization of one sub-link, the less bandwidth is available remaining, with greater impact on the estimated bandwidth. The second attenuation amount is obtained by multiplying the channel utilization coefficient with the channel utilization of the first sub-link, and then the second attenuation amount is subtracted, so that the influence of higher channel utilization on the estimated bandwidth can be effectively reduced, and the finally obtained estimated bandwidth is closer to the real bandwidth.
S808, subtracting the first attenuation amount and the second attenuation amount from the attenuated initial estimated bandwidth to obtain the final estimated bandwidth of the link i.
In some embodiments, the above-described relational expressions (1) to (3) are combined to obtain relational expression (4). The final estimated bandwidth for link i can then be calculated using relation (4).
TP (i) *α*(Ln (i) -1)-β*Num sta(i) -γ*ChU bssid(i) (4)。
The above-described S802-S808 introduce a process of calculating the final estimated bandwidth of link i. However, wireless connections are sometimes occasional, so the final estimated bandwidth calculated for a process may not be accurate. In order to reduce measurement result errors caused by contingency, the embodiment of the application proposes a method for averaging multiple measurements: after the topology structure is stable, the master router periodically and continuously collects m times of backhaul link measurement data from each slave router, wherein the data comprise RSSI, the number of spatial streams, a guard interval, the frequency band of a link, the bandwidth of the link, the transmission rate of the link, the number of STA devices connected under each router, the connection types among the routers, the channel utilization rate among the routers and the like; then, the main router obtains the final estimated bandwidth of each link according to the backhaul link measurement data collected each time; after that, S809 described below is performed.
The above topology structure stabilization refers to starting timing after the master router detects that each slave router is on line, and determining that the topology structure is stable after the timing time reaches a preset time, so that the calculation process of the first estimated bandwidth can be started until m final estimated bandwidths are obtained by calculation, and stopping continuously collecting the backhaul link metric data.
S809, after obtaining m final estimated bandwidths corresponding to the link i, averaging the m final estimated bandwidths, and taking the average value as the final estimated bandwidth of the corrected link i.
Wherein m is an integer greater than or equal to 2.
Illustratively, the master router may calculate the final estimated bandwidth of link i using the following relation (5):
wherein m represents the acquisition times, TP (ij) Representing the initial estimated bandwidth of link i in the jth acquisition.
It should be understood that when the master router periodically and continuously collects the backhaul link metric data m times from each slave router, since the topology is stable, ln in the backhaul link metric data is theoretically collected each time (i) Remains unchanged, and may result in betanum when the number of STA devices mounted on the router changes sta(i) Dynamic changes, which may result in y ChU when traffic of STA devices changes bssid(i) Dynamic changes, which may cause TP when the frequency band, transmission rate, number of spatial streams, guard interval, and/or frequency band of the link change (ij) Dynamically changing. When beta is Num sta(i) 、γ*ChU bssid(i) And TP (ij) When dynamically changing, the estimated bandwidth may change. For each link, the estimated bandwidth obtained finally can be more accurate by averaging the m corrected estimated bandwidths, and errors caused by some accidental factors are effectively reduced.
S810, after the final estimated bandwidths of the N links are obtained, taking the link with the largest estimated bandwidth in the final estimated bandwidths of the N links as the optimal backhaul link.
The final estimated bandwidth of a link is used to represent the link quality of the link. In some embodiments, the final estimated bandwidth of each link may 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.
In the link optimization algorithm, since a plurality of link information such as the frequency band of the link i, the transmission rate of the link i, the number of spatial streams of the link i, the guard interval of the link i, the link i and the like are collected, the initial estimated bandwidth of the link i can be obtained more accurately. Then, the initial estimated bandwidth is adjusted by combining the factors of the attenuation of the wireless connection type, the influence of the STA equipment on the estimated bandwidth, the influence of the lower channel utilization rate on the estimated bandwidth and the like, so that the estimated bandwidth obtained by recalculation is closer to the real bandwidth, and the optimal backhaul link screened from the N links is more accurate.
To more clearly understand the above link preference algorithm, the algorithm is described below in connection with one example.
Fig. 11 is a schematic diagram of a link preference algorithm application scenario provided in an embodiment of the present application.
1. As shown in fig. 11, after the slave router 3 joins the topologies of the master router, the slave router 1 and the slave router 2, the master router plans 3 links on the original topology: link1 (link 1) is from the slave router 3 to the slave router 1 to the master router, link2 (link 2) is from the slave router 3 to the master router, and link3 (link 3) is from the slave router 3 to the slave router 2 to the master router.
2. The master router acquires RSSI corresponding to the signal strength of link1, RSSI corresponding to the signal strength of link2, and RSSI corresponding to the signal strength of link3, respectively. Then, the master router acquires the transmission rate corresponding to each RSSI, that is, the transmission rate of link1, the transmission rate of link2, the transmission rate of link3, by referring to the map.
3. The primary router obtains an initial estimated bandwidth of each link, for example, an initial estimated bandwidth T of link1, according to a transmission rate of each link, a frequency band of each link, a number of spatial streams of each link, a guard interval of each link, and a bandwidth of each link P (1) Initial estimated bandwidth TP for link 2 (2) Initial estimated bandwidth TP for link 3 (3) 。
4. The main router respectively acquires the wireless layer level number of the link 1 as 2, the wireless layer level number of the link 2 as 1 and the wireless layer level number of the link 3 as 2. The number of wireless layer levels of the link 1 and the link 3 is greater than or equal to 2, and then the number of wireless layer levels of the link 1 and the link 3 needs to be multiplied by a wireless attenuation coefficient; the number of radio layers of link 2 is equal to 1, then the number of radio layers of link 2 need not be multiplied by the radio attenuation coefficient.
For example, it may be according to formula TP (i) *α*(Ln (i) -1) obtaining an initial estimated bandwidth after attenuation. Wherein TP (i) Representing the initial estimated bandwidth of link i, alpha being the wireless attenuation coefficient, ln (i) Representing the number of radio layer levels for link i.
Accordingly, the initial estimated bandwidth of link 1 after attenuation can be expressed as: TP (Transmission protocol) (1) *α*(Ln (1) -1); the initial estimated bandwidth of the attenuated link 3 may be expressed as: TP (Transmission protocol) (3) *α*(Ln (3) -1). Wherein Ln (1) Representing the number of radio layers of link 1, ln (3) Representing the number of radio layer levels for link 3.
5. The master router calculates the number of STA devices downloaded from the router 1, the number of STA devices downloaded from the master router, and the number of STA devices downloaded from the router 2, respectively. The following calculations are then performed for each link master router:
TP (1) *α*(Ln (1) -1)β*Num sta(1) 。
TP (2) -β*Num sta(2) 。
TP (3) *α*(Ln (3) -1)β*Num sta(3) 。
Wherein, beta is a load weight coefficient.
Num sta(1) Representing the number of STA devices of link 1 that are downloaded from router 1.
Num sta(2) Representing the number of STA devices that the master router of link 2 downloads.
Num sta(3) Representing Link 3Is downloaded from the router 2.
6. The master router calculates the channel utilization from the slave router 3 to the slave router 1, the channel utilization from the slave router 3 to the master router, and the channel utilization from the slave router 3 to the slave router 2, respectively. And then the main router performs the following calculation to obtain the estimated bandwidth after each link is corrected:
TP (1) *α*(Ln (1) -1)-β*Num sta(1) -γ*ChU bssid(1) 。
TP (2) -β*Num sta(2) -γ*ChU bssid(2) 。
TP (3) *α*(Ln (3) -1)-β*Num sta(3) -γ*ChU bssid(3) 。
where γ is the channel utilization coefficient.
ChU bssid(1) The channel utilization from router 3 to router 1 is shown.
ChU bssid(2) Indicating the channel utilization from router 3 to the master router.
ChU bssid(3) Indicating the channel utilization from router 3 to router 2.
7. In order to avoid errors, after the topology structure is stable, the master router may periodically and continuously collect m times of backhaul link metric data from each slave router, where the data includes RSSI, the number of spatial streams, a guard interval, a frequency band of a link, a bandwidth of the link, a transmission rate of the link, the number of STA devices connected under each router, a connection type between routers, and a channel utilization rate between routers. And the main router obtains the estimated bandwidth after each link correction according to the backhaul link measurement data acquired each time. Then, for each link, the master router averages the m corrected estimated bandwidths, and takes the average as the final estimated bandwidth. Wherein m is an integer greater than or equal to 2.
Illustratively, the master router may calculate the final estimated bandwidths for links 1, 2 and 3 using the following relations (6) -8), respectively:
wherein m represents the acquisition times, TP (1j) Representing the initial estimated bandwidth, TP, of link 1 in the jth acquisition (2j) Representing the initial estimated bandwidth, TP, of link 2 in the jth acquisition (3j) Representing the initial estimated bandwidth of link 3 in the jth acquisition.
After calculation according to the link optimization algorithm provided in the above embodiment, the final estimated bandwidth of 3 links can be obtained. And then taking the link with the maximum estimated bandwidth in the final estimated bandwidths of the 3 links as the optimal backhaul link.
The above embodiments are described taking an example in which a plurality of routers are connected by one backhaul link. In actual implementation, the backhaul link between the routers may be a 2.4G link, a 5G link, or both a 2.4G link and a 5G link. When the backhaul links between the routers have 2.4G links and 5G links at the same time, then when the above link optimization algorithm is adopted, the 2.4G links and the 5G links need to be used as two links, and the final estimated bandwidth of the 2.4G links and the final estimated bandwidth of the 5G links are calculated respectively.
Fig. 12 is a schematic diagram of another link preference algorithm application scenario provided in an embodiment of the present application. Unlike fig. 11, although fig. 12 also contains a master router, a slave router 1, a slave router 2, and a slave router 3, these routers each support 2.4G and 5G. Thus, as shown in fig. 12, assume that the master router has planned 6 backhaul links:
link 1-a is from slave router 3 to slave router 1 to the master router, and link 1-a is a 5G backhaul link;
link 1-b is from slave router 3 to slave router 1 to the master router, and link 1-b is a 2.4G backhaul link;
link 2-a is from slave router 3 to the master router, and link 2-a is a 5G backhaul link;
link 2-b is from slave router 3 to the master router, and link 2-b is a 2.4G backhaul link;
link 3-a is from slave router 3 to slave router 2 to the master router, and link 3-a is a 5G backhaul link;
link 3-b is a 2.4G backhaul link from slave router 3 to slave router 2 to the master router.
After calculation according to the link optimization algorithm provided in the above embodiment, the final estimated bandwidth of 6 links can be obtained. And then taking the link with the maximum estimated bandwidth in the final estimated bandwidths of the 6 links as the optimal backhaul link.
In connection with the above description of embodiments, the master router may trigger the link optimization procedure under three conditions: and detecting that the new router joins the ad hoc network, the connection type between the routers is changed, and the timing duration of the link measurement module of the main router reaches the preset duration. When the link optimization procedure is triggered under different conditions, the topology of the ad hoc network may be changed in different ways, and the link planning and link optimization manners may be different.
Fig. 13 is a schematic flow chart of a link optimization algorithm in different scenarios according to an embodiment of the present application. The execution body of the method may be a link preference module of the master router as shown in fig. 6.
S1301, judging the reason for triggering the link optimization process.
If the reason for triggering the link preference procedure is that a new router is detected to join the ad hoc network, the following S1302-S1304 are performed.
If the reason for triggering the link preference procedure is a change in the connection type between routers, S1305 to S1307 described below are executed.
If the reason for triggering the link preference procedure is that the timing duration of the link metric module of the master router reaches the preset duration, the following S1308-1310 are performed.
S1302, connecting the newly added slave router a with a router of a high level in the established topology structure under the condition of maintaining the original link in the established topology structure, and planning to obtain N 1 And (5) a link. For N 1 Each of the links has a highest level of the master router and a lowest level of the slave router a.
The router of the higher hierarchy is a router of which hierarchy is higher than that of the slave router a.
S1303 from N 1 And screening one link from the links to serve as an optimal backhaul link of the slave router a.
S1304, notifying the switch from router a to the optimal backhaul link.
The description will be given taking the above-described fig. 9B as an example. After the slave router 4 joins the original topology, the master router has planned 4 backhaul links: a first backhaul link, slave router 4-slave router 1-master router; a second backhaul link, slave router 4-slave router 2-master router; a third backhaul link, slave router 4-master router; a fourth backhaul link, slave router 4-slave router 3-master router. The master router may screen one link from the 4 backhaul links as the optimal backhaul link of the slave router 4 according to the link preference algorithm provided in the above embodiment. From the router 4 to the optimal backhaul link.
S1305, under the condition of maintaining the original links in the established topology structure, the slave router b with changed connection types is connected with the routers of the high level in the established topology structure, and N is planned to be obtained 2 And (5) a link. For N 2 Each of the links has a highest level of the master router and a lowest level of the slave router b.
Wherein the router of the higher hierarchy is a router of which hierarchy is higher than the slave router b.
S1306, from N 2 And screening one link from the links to serve as an optimal backhaul link of the slave router b.
S1307, the notification is switched from router b to the optimal backhaul link.
The description will be given taking the above-described fig. 10B as an example. After the connection type of the slave router 4 changes from a wired connection to a wireless connection, the master router plans 4 backhaul links: a first backhaul link, slave router 4-slave router 1-master router; a second backhaul link, slave router 4-slave router 2-master router; a third backhaul link, slave router 4-master router; a fourth backhaul link, slave router 4-slave router 3-master router. Then, the master router may screen out one link from the 4 backhaul links as the optimal backhaul link of the slave router 4 according to the link preference algorithm provided in the above embodiment.
S1308, under the condition of keeping the original links in the established topology structure, the slave router c with the link quality changed is connected with the routers with high levels in the established topology structure, and N is planned to be obtained 3 And (5) a link. For N 3 Each of the links has a highest level of a master router and a lowest level of a slave router c.
Wherein the router of the higher hierarchy is a router of which hierarchy is higher than the slave router c.
S1309 from N 3 And screening one link from the links to serve as an optimal backhaul link of the slave router c.
S1310, notifying the switch from the router c to the optimal backhaul link.
After S1304, S1307, S1310, S1311 described below may also be performed.
S1311, it is determined whether the router of the adjusted link belongs to the lowest level in the topology.
If the router of the adjusted link belongs to the lowest level in the topology, it is continued to detect whether the condition triggering the link preference procedure is fulfilled, i.e. S2 of the above embodiment is performed.
If the router of the adjusted link does not belong to the lowest level in the topology, after the router of the adjusted link is switched to the optimal backhaul link, the backhaul link of the router of the low level may be caused to be not the optimal backhaul link, and thus the backhaul link of the router of the low level needs to be adjusted. In this case, for routers lower than the level of the router of the link being adjusted, S1312-S1314 are performed for each router of the lower level in order of decreasing level by level.
S1312, after re-acquiring the link metric information, connecting the low-level router with the router of the high level in the topology structure, and planning to obtain N corresponding to the low-level router 4 And (5) a link. For N 4 Each of the links has a highest level of the primary router and a lowest level of the low level router.
The routers of the high level are routers of which the level is higher than that of the low level.
S1313, based on the re-acquired link metric information, selecting from N 4 And selecting one link from the links as an optimal backhaul link of the low-level router.
S1314, notifying the low-level router to switch to the optimal backhaul link.
Note that if the backhaul link to which a certain slave router is currently connected is already the optimal backhaul link, the master router does not need to notify the slave router to switch the backhaul link.
It should be understood that, by sequentially adjusting the backhaul links of the routers of each level from the higher level to the lower level in the order of lowering the level by level, the backhaul links of each level can be more stable and the quality can be optimized.
The embodiment of the application also provides a terminal device, which comprises a processor, wherein the processor is coupled with the memory, and the processor is used for executing the computer program or the instructions stored in the memory, so that the terminal device realizes the method in each embodiment.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions; the computer readable storage medium, when run on a device for setting a local number function, causes the device for setting a local number function to perform the method as shown above. The computer instructions may 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 instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more servers, data centers, etc. that can be integrated with the medium. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium, or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
The present application also provides a computer program product comprising computer program code for causing a computer to perform the method of the embodiments described above when the computer program code is run on the computer.
Embodiments of the present application also provide a chip coupled to a memory, the chip being configured to read and execute a computer program or instructions stored in the memory to perform the methods of the embodiments described above. The chip may be a general-purpose processor or a special-purpose processor. It should be noted that the chip may 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 circuit or combination of circuits capable of performing the various functions described throughout this application.
The terminal device, the computer readable storage medium, the computer program product and the chip provided in the embodiments of the present application are used to execute the method provided above, so that the beneficial effects achieved by the method provided above can be referred to the beneficial effects corresponding to the method provided above, and are not repeated herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (19)
1. A link selection method based on an ad hoc network, wherein the method is applied to a master router of an ad hoc network system, the method comprising:
on the established topological structure, planning N links according to the number of slave routers in the ad hoc network system;
acquiring initial estimated bandwidth of each link according to backhaul link measurement information of each link in the N links, wherein the backhaul link measurement information is obtained by measuring a backhaul link of the topological structure by a slave router of each link;
obtaining the initial estimated bandwidth after attenuation according to the number of wireless layers of each link;
acquiring a first attenuation amount according to the number of STA equipment connected under the first router of each link;
acquiring a second attenuation amount according to the channel utilization rate of the first sub-link of each link;
Subtracting the first attenuation amount and the second attenuation amount from the attenuated initial estimated bandwidth to obtain a final estimated bandwidth of each link;
after the final estimated bandwidth of the N links is obtained, a first link is selected, wherein the first link is the link with the largest final estimated bandwidth in the N links.
2. The method of claim 1, wherein the backhaul link metric information for each link comprises at least one of: the frequency band of each link, the transmission rate of each link, the number of spatial streams of each link, the guard interval of each link and the bandwidth of each link.
3. The method of claim 2, wherein before obtaining the initial estimated bandwidth for each of the N links based on backhaul link metric information for each of the N links, the method further comprises:
acquiring 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 for each link;
wherein, the corresponding relation between the received signal strength and the transmission rate is preset.
4. A method according to any one of claims 1 to 3, wherein said obtaining said initial estimated bandwidth after attenuation according to said number of radio layer levels of each link comprises:
acquiring the level number and the connection type of each link from the backhaul link measurement information of each link;
determining the wireless layer number of each link according to the layer number and the connection type of each link;
and under the condition that the number of wireless layer levels of the ith link in the N links is greater than or equal to 2, obtaining the attenuated initial estimated bandwidth by adopting the following relation:
TP (i) *α*(Ln (i) 1);
wherein the number of levels of each link refers to the number of sub-links from the slave router located 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 located at the lowest level of each link to the master router, the connection type is a wireless connection type or a wired connection type, TP (i) Representing the initial estimated bandwidth of the ith link in the N links, wherein alpha is a wireless attenuation coefficient Ln (i) Representing the number of radio layers of the ith link.
5. The method according to any one of claims 1 to 4, wherein the obtaining a first attenuation amount according to the number of STA devices connected under the first router of each link includes:
acquiring the number of STA equipment connected under a first router of each link from the backhaul link measurement information of each link;
and acquiring the first attenuation amount according to the number of the STA equipment by adopting the following relation:
β*Num sta(i) ;
wherein, beta is a load weight coefficient, num sta(i) And representing the number of the STA devices connected under the first router of the ith link in the N links.
6. The method according to any one of claims 1 to 5, wherein the first router of each link is any one of:
the router of the upper level of the slave routers positioned at the lowest level in each link;
the highest level slave router in each link;
and the router with the least number of STA devices is mounted in each link.
7. The method according to any one of claims 1 to 6, wherein the obtaining the second attenuation amount according to the channel utilization of the first sub-link of each link includes:
Acquiring the channel utilization rate of a first sub-link of each link from the backhaul link measurement information of each link;
and acquiring the second attenuation amount according to the channel utilization rate of the first sub-link of each link by adopting the following relation:
γ*ChU bssid(i) ;
wherein, gamma is the channel utilization coefficient, chU bssid(i) And the channel utilization rate of a first sub-link of an ith link in the N links is represented.
8. The method according to any one of claims 1 to 7, wherein the first sub-link of each link is any one of:
the sub-link of at least one sub-link of each link is used for connecting the slave router of the lowest level and the router of the upper level of the lowest level;
and at least one sub-link of each link is used for connecting the main router and the sub-link of the slave router at the highest level.
9. The method of any one of claims 1 to 8, wherein subtracting the first attenuation and the second attenuation from the attenuated initial estimated bandwidth to obtain the final estimated bandwidth for each link, comprises:
the final estimated bandwidth of each link is calculated using the following relationship:
Wherein m represents the number of times of continuously collecting backhaul link metric data after establishing a preset duration of the topology structure, and TP (ij) Representation ofThe initial estimated bandwidth of the ith link in the jth acquisition, alpha is the wireless attenuation coefficient Ln (i) Representing the number of wireless layers of the ith link, wherein beta is a load weight coefficient, num sta(i) Representing the number of STA devices connected under the first router of the ith link in the N links, wherein gamma is a channel utilization coefficient ChU bssid(i) And the channel utilization rate of a first sub-link of an ith link in the N links is represented.
10. The method according to any one of claims 1 to 9, wherein before planning N links from the number of routers in the ad hoc network system, the method further comprises:
sending a backhaul link metric query message to each slave router in the ad hoc network system;
receiving a return link measurement response message returned by each slave router, wherein the return link measurement response message comprises the return link measurement information;
and updating the backhaul link metric information of each slave router stored in the data structure.
11. The method of claim 10, wherein said sending a backhaul link metric query message to each slave router in the ad hoc network system comprises:
Sending the backhaul link metric query message to each slave router in the ad hoc network system under the condition that the master router detects that the slave router joins the ad hoc network and establishes the topological structure; or,
under the condition that the main router detects that the connection type between routers in the ad hoc network system is changed and the topological structure is reestablished, sending the backhaul link measurement inquiry message to each slave router in the ad hoc network system; or,
and the master router sends the backhaul link measurement inquiry 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 11, wherein after the selecting the first link, the method further comprises:
judging whether the first link belongs to the topological structure or not;
determining a slave router to be connected to the first link in case the first link does not belong to the topology;
and 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 comprises a basic service setting identifier and channel information of the first link.
13. The method of claim 12, wherein after the sending the backhaul link handover request message to the slave router to be connected to the first link, the method further comprises:
receiving a backhaul link switching result message returned from a router to be connected to the first link, wherein the backhaul link switching result message indicates that switching to the first link is successful or failed;
and under the condition that the backhaul link switching result message indicates that switching to the first link fails, re-sending a backhaul link measurement query message to each slave router in the ad hoc network system, or re-sending a backhaul link switching request message to a slave router to be connected to the first link.
14. A method for link selection based on an ad hoc network, the method being applied to a slave router of an ad hoc network system, the method comprising:
periodically measuring the backhaul link of the slave router to obtain backhaul link measurement information;
receiving a backhaul link metric query message from a master router of the ad hoc network system;
responding to the backhaul link metric query message, and returning a backhaul link metric response message to the main router, wherein the backhaul link metric response message contains the backhaul link metric information;
Receiving a backhaul link switching request message from the master router, wherein the backhaul link switching request message comprises a basic service setting identifier and channel information of a first link, and the first link is a link with the largest estimated bandwidth selected according to backhaul link measurement information of each slave router in the ad hoc network system;
and responding to the backhaul link switching request message, disconnecting the original backhaul link and attempting to connect to the first link.
15. The method of claim 14, wherein the backhaul link metric information comprises at least one of: the method comprises the steps of receiving a request from a slave router, wherein the request comprises a frequency band of a return link of the slave router, a transmission rate of the return link of the slave router, the number of spatial streams of the return link of the slave router, a guard interval of the return link of the slave router and a bandwidth of the return link of the slave router.
16. The method of claim 14 or 15, wherein after the attempting to connect to the first link, the method further comprises:
and sending a backhaul link switching result message to the main router, wherein the backhaul link switching result message indicates that switching to the first link is successful or failed.
17. A router comprising a processor, and a memory coupled to the processor;
wherein the memory has instructions stored therein that, when executed by the processor, cause the router to perform the ad hoc network-based link selection method of any one of claims 1 to 16.
18. An ad hoc network system, comprising a master router and a plurality of slave routers connected with the master router;
wherein the master router is configured to perform the ad hoc network-based link selection method of any one of claims 1 to 13, and the slave router is configured to perform the ad hoc network-based link selection method of any one of claims 14 to 16.
19. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when run on a router, causes the router to perform the ad hoc network based link selection method according to any one of claims 1 to 16.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310522215.9A CN117715141A (en) | 2023-05-09 | 2023-05-09 | Ad hoc network-based link selection method, router, system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310522215.9A CN117715141A (en) | 2023-05-09 | 2023-05-09 | Ad hoc network-based link selection method, router, system and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117715141A true CN117715141A (en) | 2024-03-15 |
Family
ID=90153953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310522215.9A Pending CN117715141A (en) | 2023-05-09 | 2023-05-09 | Ad hoc network-based link selection method, router, system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117715141A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1659905A (en) * | 2002-06-06 | 2005-08-24 | 摩托罗拉公司(在特拉华州注册的公司) | Protocol and structure for mobile nodes in a self-organizing communication network |
US20160192203A1 (en) * | 2014-12-24 | 2016-06-30 | Airties Kablosuz Iletisim San. Ve Dis Tic. A.S. | Mesh islands |
CN106507373A (en) * | 2016-10-17 | 2017-03-15 | 安徽智瑞电气有限公司 | A kind of method for wireless communication networking of electric automobile charging pile cluster |
CN114025411A (en) * | 2021-10-27 | 2022-02-08 | 浙江大华技术股份有限公司 | Method and device for selecting wireless access point and electronic equipment |
CN115529668A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Channel selection method, electronic device and storage medium |
-
2023
- 2023-05-09 CN CN202310522215.9A patent/CN117715141A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1659905A (en) * | 2002-06-06 | 2005-08-24 | 摩托罗拉公司(在特拉华州注册的公司) | Protocol and structure for mobile nodes in a self-organizing communication network |
US20160192203A1 (en) * | 2014-12-24 | 2016-06-30 | Airties Kablosuz Iletisim San. Ve Dis Tic. A.S. | Mesh islands |
CN106507373A (en) * | 2016-10-17 | 2017-03-15 | 安徽智瑞电气有限公司 | A kind of method for wireless communication networking of electric automobile charging pile cluster |
CN114025411A (en) * | 2021-10-27 | 2022-02-08 | 浙江大华技术股份有限公司 | Method and device for selecting wireless access point and electronic equipment |
CN115529668A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Channel selection method, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9107149B2 (en) | Wireless portable computer capable of autonomously adjusting load of wireless base station | |
US9014112B2 (en) | System and method for computing coverage set and resource allocations in wireless networks | |
RU2562250C2 (en) | Control over power of transmission in wireless local network, controller and access point | |
KR100960705B1 (en) | Systems and methods for channel selection management in a wireless communication network | |
US11930381B2 (en) | Backup link for low latency communication | |
CN111869127A (en) | Utilizing interference measurements in beam recovery processes | |
JP2006157839A (en) | Wireless networks, methods and systems of dynamic channel allocation for access points | |
JP2008048440A (en) | Method for storing mobile station physical measurements and mac performance statistics in management information base of access point | |
MXPA06005937A (en) | Wireless communication method and apparatus for optimizing access point channel selection. | |
US20160373968A1 (en) | Method of setting a plurality of parameters in a wireless telecommunication network | |
CN111866897B (en) | Networking method of intelligent household system and intelligent household system | |
US20190306789A1 (en) | Access Point Handover Method in Wireless Communications, Network Control Node, and User Equipment | |
CN110089089A (en) | A kind of method for network access and equipment | |
EP1458116A2 (en) | Method of controlling power of wireless access node in a wireless LAN system | |
US9408181B2 (en) | Automatic calibration of probe request received signal strength indication (RSSI) threshold to control associations | |
EP4184842A1 (en) | Signal transmission method and apparatus, node, and storage medium | |
CN117715141A (en) | Ad hoc network-based link selection method, router, system and storage medium | |
US20180115941A1 (en) | Wireless Local Area Network Association Method and Device, and Central Access Point | |
WO2022022673A1 (en) | Communication method and device | |
US20200275453A1 (en) | Mode selection for mesh network communication | |
WO2024066812A1 (en) | Cell handover method, terminal device, and network device | |
US11546819B2 (en) | Cellular telecommunications network | |
WO2022233198A1 (en) | Wireless network switching method and apparatus, chip, electronic device, and storage medium | |
CN116939793A (en) | Power setting method, communication device and system of access point | |
CN116471605A (en) | Information configuration method and device and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |